买草不扣钱补丁~
修改newmc.php
找到:- if ( $_REQUEST['mod'] == "cgi_feed_food" )
- {
复制代码 接下来应该是:- if ( $_REQUEST['type'] == "1" )
- {
- echo "{"errorContent":"\\u8D2D\\u4E70\\u7267\\u8349\\u7684\\u529F\\u80FD\\u6682\\u65F6\\u4E0D\\u5F00\\u653E\\uFF0C\\u8BF7\\u53BB\\u519C\\u573A\\u79CD\\u690D\\u7267\\u8349\\uFF01","errorType":"1011"}";
- exit( );
- }
复制代码 如果你打过所谓的买草补丁,则是这样的:- /*if ( $_REQUEST['type'] == "1" )
- {
- echo "{"errorContent":"\\u8D2D\\u4E70\\u7267\\u8349\\u7684\\u529F\\u80FD\\u6682\\u65F6\\u4E0D\\u5F00\\u653E\\uFF0C\\u8BF7\\u53BB\\u519C\\u573A\\u79CD\\u690D\\u7267\\u8349\\uFF01","errorType":"1011"}";
- exit( );
- }*/
复制代码 这哪是打补丁?这是连买草的代码直接注释掉了。
将找到的这段代码(IF那个过程),替换为能用的买草代码:- if ( $_REQUEST['type'] == "1" )
- {
- //echo "{"errorContent":"\\u8D2D\\u4E70\\u7267\\u8349\\u7684\\u529F\\u80FD\\u6682\\u65F6\\u4E0D\\u5F00\\u653E\\uFF0C\\u8BF7\\u53BB\\u519C\\u573A\\u79CD\\u690D\\u7267\\u8349\\uFF01","errorType":"1011"}";
- $mc_price = 60;
- $mc_id = 40;
- $fruit = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT fruit FROM ".tname( "plug_newfarm" )." where uid=".$_SGLOBAL['supe_uid'] ), 0 );
- $fruit = json_decode( $fruit );
- $money = $_SGLOBAL['db']->result( $_SGLOBAL['db']->query( "SELECT money FROM ".tname( "plug_newfarm" )." where uid=".$_SGLOBAL['supe_uid'] ), 0 );
- $money = json_decode( $money );
- if ( $money < $mc_price * $_REQUEST['foodnum'] ){
- echo "{"errorContent":"\\u4F60\\u7684\\u91D1\\u5E01\\u4E0D\\u8DB3\\uFF0C\\u8D2D\\u4E70".$_REQUEST['foodnum']."\\u68F5\\u7267\\u8349\\uFF0C\\u5171\\u9700\\u8981".($mc_price * $_REQUEST['foodnum'])."\\u4E2A\\u91D1\\u5E01\\u3002","errorType":"1011"}";
- exit();
- }
- $fruit->$mc_id = $fruit->$mc_id + $_REQUEST['foodnum'];
- $fruit = json_encode( $fruit );
- $money = $money - ($mc_price * $_REQUEST['foodnum']);
- $money = json_encode( $money );
- $_SGLOBAL['db']->query("UPDATE ".tname( "plug_newfarm" )." set fruit='".$fruit."',money=".$money." where uid=".$_SGLOBAL['supe_uid'] );
- $fruit = json_decode( $fruit );
- echo stripslashes("{"addExp":0,"added":0,"direction":"\\\\u6210\\\\u529f\\\\u8d2d\\\\u4e70".$_REQUEST['foodnum']."\\\\u68f5\\\\u7267\\\\u8349\\\\uff0c\\\\u5171\\\\u82b1\\\\u8d39\\\\u91d1\\\\u5e01".($mc_price * $_REQUEST['foodnum'])."\\\\uff0c\\\\u5df2\\\\u653e\\\\u5165\\\\u60a8\\\\u7684\\\\u98df\\\\u7269\\\\u7b50\\\\u5185\\\\u3002","money":".($mc_price * $_REQUEST['foodnum']).","total":".$fruit->$mc_id.","uId":".intval( $_REQUEST['uId'] )."}");
- exit();
- }
复制代码 |