<? define ( 'GL_CheerPoints_URL', '/plugins/GL_CheerPoints/main.php'); define( 'GL_CheerPoints_Dir', 'plugins/GL_CheerPoints/' ); define( 'GL_CheerPoints_version', '1.0' ); define ( 'GL_CheerPoints_File' , "plugins\\GL_CheerPoints\\coins.txt"); define('GL_CheerPoints_settings', 'GL_CheerPoints_settings.txt'); function GL_CheerPoints_init(){ global $hooks; global $this_plugin; echo "Loaded GL_CheerPoints xx\r\n"; $hooks ['after_load_settings'] = 'GL_CheerPoints_run'; } // By GL function GL_CheerPoints_getus(){ $us = load_array(GL_CheerPoints_settings); if($us === false){ $us = array(); $us['Run'] = false; $us['Number'] = 0; $us['Disable'] = false; save_array($us, GL_CheerPoints_settings); } return $us; } // function GL_CheerPoints_form(){ echo '<center><html><head><style type="text/css"> body {background-color:Black;} </style></head><body>'; echo '<h3><font color = red>GL_CheerPointsv'.GL_CheerPoints_version .' - 06 November 2012 <font face="Tahoma" color="Purple" size="2"> >[Parser: '.PX_VER_PARSER .']</font></h3>'; echo '<hr></hr>'; echo ' <font color = Blue> Made By GL.</font color>'; echo '<hr></hr>'; echo '<form action='.GL_CheerPoints_URL.'>'; if (isset($_POST['submit'])){ $ns = array(); $ns['Run'] = isset($_POST['Run']) ? true : false; $ns['Number'] = isset($_POST['Number']) ? (integer)$_POST['Number'] : 0; $ns['Disable'] = isset($_POST['Disable']) ? true : false; save_array($ns, GL_CheerPoints_settings); } $us = GL_CheerPoints_getus(); echo '<br><input type="checkbox" name="Run" value="true"' . ($us['Run'] ? ' checked > ' : ' > ' ) . ' Enable Plugin?'; echo '<br><input type="text" name="Number" size="4" value="'.$us['Number'] . '"> How many Runs?'; echo '<br><input type="checkbox" name="Disable" value="true"' . ($us['Disable'] ? ' checked > ' : ' > ' ) . ' Disable After Run?'; global $vWorldtype; echo '<br><br><input type="submit" name="submit" value="Save"><br>'; if(isset($_GET['submit'])) echo ' <i>Saved '.date("G:i",time()).' For ['.$vWorldtype.'] </i>'; echo '<hr></hr>'; echo' Kindly Run This On Mistletoe farm Only with 8 storage spaces.'; echo '<hr></hr>'; echo '</body></html>'; } function zCashGL($goldz) { $amf = new AMFObject(""); $amf->_bodys[0] = new MessageBody(); $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch'; $amf->_bodys[0]->responseURI = '/1/onStatus'; $amf->_bodys[0]->responseIndex = '/1'; $amf->_bodys[0]->_value[0] = GetAMFHeaders(); $amfi = 0; $amf->_bodys[0]->_value[1][$amfi]['sequence'] = GetSequense(); $amf->_bodys[0]->_value[1][$amfi]['functionName'] = 'UserService.getBalance'; $amf->_bodys[0]->_value[1][$amfi]['params'] = array(); $amf->_bodys[0]->_value[2] = 0; $amf2=RequestAMFIntern($amf); $res=CheckAMF2Response($amf2); $goldz = $amf2->_bodys[0]->_value['data'][0]['data']['gold']; $amfi++; if ($res =='OK'){ Addlog2("GL_CheerPoints -> Current Coins are : " . number_format($goldz)); AddLog2(""); }else { Addlog2("GL_CheerPoints -> $res "); } } function GL_CheerPoints_run() { $us = GL_CheerPoints_getus(); if ($us['Run'] === true && $us['Number'] > 0){ Addlog2("GL_CheerPoints: Starting Engine."); for($i = 1; $i <= $us['Number'] ; $i++) { $Bitem = 'xhdbridgecedar'; $Bcode = Units_GetCodeByName($Bitem); $res = GL_CheerPoints_BuyItem($Bitem,$Bcode); if ($res <>'OK'){ Addlog2("GL_CheerPoints -> Something Went Wrong."); $i = $itime ; }else { Addlog2("GL_CheerPoints-->".$i."-> Consuming 400,000 Coins + Giving 40 Cheer Points."); zCashGL($goldz); } GL_CheerPoints_SellItem($Bitem,$Bcode); } AddLog2("GL_CheerPoints -> Finished, bye, Disabling plugin"); if($us['Disable']) GL_CheerPoints_disableMe(); }else { AddLog2("GL_CheerPoints -> Nothing to do, bye"); } } function GL_CheerPoints_BuyItem($Bitem,$Bcode) { $tid = 63000; $amf = new AMFObject(""); $amf->_bodys[0] = new MessageBody(); $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch'; $amf->_bodys[0]->responseURI = '/1/onStatus'; $amf->_bodys[0]->responseIndex = '/1'; $amf->_bodys[0]->_value[0] = GetAMFHeaders(); $z=0; for($z=0;$z<=7;$z++){ $amf->_bodys[0]->_value[1][$z]['functionName'] = "WorldService.performAction"; $amf->_bodys[0]->_value[1][$z]['sequence'] = GetSequense(); $amf->_bodys[0]->_value[1][$z]['params'] = array(); $amf->_bodys[0]->_value[1][$z]['params'][0] = 'store'; $amf->_bodys[0]->_value[1][$z]['params'][1]['direction'] = 0; $amf->_bodys[0]->_value[1][$z]['params'][1]['tempid'] = '-1'; $amf->_bodys[0]->_value[1][$z]['params'][1]['id'] = $tid; $amf->_bodys[0]->_value[1][$z]['params'][1]['state'] = 'horizontal'; $amf->_bodys[0]->_value[1][$z]['params'][1]['itemName'] = $Bitem; $amf->_bodys[0]->_value[1][$z]['params'][1]['className'] = 'RotateableDecoration'; $amf->_bodys[0]->_value[1][$z]['params'][1]['deleted'] = false; $amf->_bodys[0]->_value[1][$z]['params'][2] = array(); $amf->_bodys[0]->_value[1][$z]['params'][2][0]['isGift'] = false; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['resource'] = 0; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['storedItemCode'] = '9pL'; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['Code'] = '9pL'; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['cameFromLocation'] = '0'; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['storedItemName'] = $Bitem; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['storedClassName'] = 'RotateableDecoration'; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['target'] = -15; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['isStorageWithdrawal'] = 0; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['origin'] = 0; $amf->_bodys[0]->_value[1][$z]['params'][2][0]['currency'] = 'coins'; $tid++; } $amf->_bodys[0]->_value[2] = 0; $amf2=RequestAMFIntern($amf); $res=CheckAMF2Response($amf2); if ($res === 'OK'){ }else { Addlog2("GL_CheerPoints -->".$res); } return $res; } function GL_CheerPoints_SellItem($Bitem,$Bcode) { $amf = new AMFObject(""); $amf->_bodys[0] = new MessageBody(); $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch'; $amf->_bodys[0]->responseURI = '/1/onStatus'; $amf->_bodys[0]->responseIndex = '/1'; $amf->_bodys[0]->_value[0] = GetAMFHeaders(); $z=0; $amf->_bodys[0]->_value[1][$z]['functionName'] = "UserService.sellStoredItem"; $amf->_bodys[0]->_value[1][$z]['sequence'] = GetSequense(); $amf->_bodys[0]->_value[1][$z]['params'] = array(); $amf->_bodys[0]->_value[1][$z]['params'][0]['code'] = '9pL'; $amf->_bodys[0]->_value[1][$z]['params'][1] = false; $amf->_bodys[0]->_value[1][$z]['params'][2] = -15; $amf->_bodys[0]->_value[1][$z]['params'][3] = 8; $amf->_bodys[0]->_value[2] = 0; $res = RequestAMF($amf); if ($res === 'OK'){ }else { Addlog2("GL_CheerPoints ->".$res); } return $res; } function GL_CheerPoints_disableMe() { $uSet = GL_CheerPoints_getus(); $uSet['Run'] = false; save_array($uSet,GL_CheerPoints_settings); } ?> this is done by some else all i wanted 2 knw is how many item it buy & how can i change it plz help me