Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 9.14 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?
  2.  
  3. //------------------------------------------------------------------------------
  4. // LuckyPennies Plugin v0.1
  5. // by AbirPat
  6. //------------------------------------------------------------------------------
  7.  
  8. define ( 'LuckyPennies_URL', '/plugins/LuckyPennies/main.php');
  9. define( 'LuckyPennies_Dir', 'plugins/LuckyPennies/' );
  10. define( 'LuckyPennies_version', '0.1' );
  11. define ( 'LuckyPennies_File' , "plugins\\LuckyPennies\\coins.txt");
  12.  
  13. function LuckyPennies_init()
  14. {
  15. global $hooks;
  16. global $this_plugin;
  17. echo "Loaded LuckyPennies 0.1\r\n";
  18. $hooks ['after_load_settings'] = 'LuckyPennies_run';
  19. }
  20.  
  21. function LuckyPennies_form()
  22. {
  23. echo '<html><head>';
  24. echo '<style type="text/css">';
  25. echo 'body {background-color:grey;}';
  26. echo 'input {height:25px;width:60px;color:white;background-color:#94BC41;border: 2px solid #365A37;font-weight:bolder;}';
  27. echo 'a.donate {text-decoration: none;}';
  28. echo '</style></head><body>';
  29. echo '<h3>LuckyPennies 0.1 By AbirPat</h3><br>';
  30. echo '<form action='.LuckyPennies_URL.'>';
  31.  
  32.  
  33. if (isset($_GET['isEnabled']) && $_GET['isEnabled'] == 'true') {
  34.     echo '<br><input type="checkbox" name="isEnabled" value="true" checked> Enable Plugin?';
  35.      
  36.     if(isset($_GET['code'])) {
  37.         $code = $_GET['code'];
  38.     } else if (is_file(LuckyPennies_File)) {
  39.         $code = trim(file_get_contents(LuckyPennies_File));
  40.     }
  41.     echo '<br><input type="text" name="code" size="3" value="$code" style="{text-align: center}"> Your item code ';
  42. } else {
  43. echo '<br><input type="checkbox" name="isEnabled" value="true"> Enable Plugin?';
  44.     echo '<br><input type="text" name="code" size="3" value="0" style="{text-align: center}"> Item Code';
  45.      
  46.      
  47. }
  48. echo '<br><br><input type="submit" name="submit" value="Save"><br>';
  49. echo '</form>';
  50.  
  51.  
  52.  
  53.  
  54.      if (isset($_GET['submit']))
  55.         {
  56.          $f = fopen(LuckyPennies_File, "w+");
  57.          fwrite($f, $_GET['code']);
  58.          fclose($f);
  59.         }
  60.     }
  61.          
  62.  
  63.  
  64. function LuckyPennies_run() {
  65.     AddLog2('LuckyPennies initializing');
  66.      
  67.     if (file_exists(LuckyPennies_File))
  68. {
  69.         //$code = trim(file_get_contents(LuckyPennies_File));
  70.          
  71. Addlog("LuckyPennies: Starting (get coins)");
  72. Addlog2("LuckyPennies: Starting (get coins)");
  73.          
  74.             list($userId, $flashRevision, $token, $sequence, $flashSessionKey, $xp, $energy) = explode(';', file_get_contents(F
  75.  
  76. ('params.txt')));
  77.              
  78.  
  79.          
  80.                 AddLog2('getting item');
  81.  
  82.                 $amf = new AMFObject("");
  83. $amf->_bodys[0] = new MessageBody();
  84. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  85. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  86.  
  87. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  88. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  89. $amf->_bodys[0]->_value[1][0]['params'][0] = 75;
  90.  
  91. $amf->_bodys[0]->_value[2] = 0;
  92.  
  93.                 $res = RequestAMF($amf);
  94.                 AddLog2("LuckyPennies result: $res");
  95.                  
  96.                 AddLog2('getting item');
  97.  
  98.                 $amf = new AMFObject("");
  99. $amf->_bodys[0] = new MessageBody();
  100. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  101. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  102.  
  103. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  104. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  105. $amf->_bodys[0]->_value[1][0]['params'][0] = 73;
  106.  
  107. $amf->_bodys[0]->_value[2] = 0;
  108.  
  109.                 $res = RequestAMF($amf);
  110.                 AddLog2("LuckyPennies result: $res");
  111.                  
  112.                 AddLog2('getting item');
  113.  
  114.                 $amf = new AMFObject("");
  115. $amf->_bodys[0] = new MessageBody();
  116. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  117. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  118.  
  119. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  120. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  121. $amf->_bodys[0]->_value[1][0]['params'][0] = Aa;
  122.  
  123. $amf->_bodys[0]->_value[2] = 0;
  124.  
  125.                 $res = RequestAMF($amf);
  126.                 AddLog2("LuckyPennies result: $res");
  127.                  
  128.                 AddLog2('getting item');
  129.  
  130.                 $amf = new AMFObject("");
  131. $amf->_bodys[0] = new MessageBody();
  132. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  133. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  134.  
  135. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  136. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  137. $amf->_bodys[0]->_value[1][0]['params'][0] = A1;
  138.  
  139. $amf->_bodys[0]->_value[2] = 0;
  140.  
  141.                 $res = RequestAMF($amf);
  142.                 AddLog2("LuckyPennies result: $res");
  143.                  
  144.                 AddLog2('getting item');
  145.  
  146.                 $amf = new AMFObject("");
  147. $amf->_bodys[0] = new MessageBody();
  148. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  149. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  150.  
  151. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  152. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  153. $amf->_bodys[0]->_value[1][0]['params'][0] = Di;
  154.  
  155. $amf->_bodys[0]->_value[2] = 0;
  156.  
  157.                 $res = RequestAMF($amf);
  158.                 AddLog2("LuckyPennies result: $res");
  159.                  
  160.                 /*AddLog2('getting item');
  161.  
  162.                 $amf = new AMFObject("");
  163. $amf->_bodys[0] = new MessageBody();
  164. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  165. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  166.  
  167. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  168. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  169. $amf->_bodys[0]->_value[1][0]['params'][0] = sS;
  170.  
  171. $amf->_bodys[0]->_value[2] = 0;
  172.  
  173.                 $res = RequestAMF($amf);
  174.                 AddLog2("LuckyPennies result: $res");
  175.                  
  176.                 /*AddLog2('getting item');
  177.  
  178.                 $amf = new AMFObject("");
  179. $amf->_bodys[0] = new MessageBody();
  180. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  181. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  182.  
  183. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  184. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  185. $amf->_bodys[0]->_value[1][0]['params'][0] = 'Py';
  186.  
  187. $amf->_bodys[0]->_value[2] = 0;
  188.  
  189.                 $res = RequestAMF($amf);
  190.                 AddLog2("LuckyPennies result: $res");
  191.                  
  192.                 AddLog2('getting item');
  193.  
  194.                 $amf = new AMFObject("");
  195. $amf->_bodys[0] = new MessageBody();
  196. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  197. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  198.  
  199. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  200. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  201. $amf->_bodys[0]->_value[1][0]['params'][0] = 'AQ';
  202.  
  203. $amf->_bodys[0]->_value[2] = 0;
  204.  
  205.                 $res = RequestAMF($amf);
  206.                 AddLog2("LuckyPennies result: $res");
  207.                  
  208.                 AddLog2('getting item');
  209.  
  210.                 $amf = new AMFObject("");
  211. $amf->_bodys[0] = new MessageBody();
  212. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  213. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  214.  
  215. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  216. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  217. $amf->_bodys[0]->_value[1][0]['params'][0] = 'KX';
  218.  
  219. $amf->_bodys[0]->_value[2] = 0;
  220.  
  221.                 $res = RequestAMF($amf);
  222.                 AddLog2("LuckyPennies result: $res");
  223.                  
  224.                 AddLog2('getting item');
  225.  
  226.                 $amf = new AMFObject("");
  227. $amf->_bodys[0] = new MessageBody();
  228. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  229. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  230.  
  231. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  232. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  233. $amf->_bodys[0]->_value[1][0]['params'][0] = 'xZ';
  234.  
  235. $amf->_bodys[0]->_value[2] = 0;
  236.  
  237.                 $res = RequestAMF($amf);
  238.                 AddLog2("LuckyPennies result: $res");
  239.                  
  240.                 AddLog2('getting item');
  241.  
  242.                 $amf = new AMFObject("");
  243. $amf->_bodys[0] = new MessageBody();
  244. $amf->_bodys[0]->targetURI = 'FlashService.dispatchBatch';
  245. $amf->_bodys[0]->_value[0] = GetAMFHeaders();
  246.  
  247. $amf->_bodys[0]->_value[1][0]['sequence'] = GetSequense();
  248. $amf->_bodys[0]->_value[1][0]['functionName'] = "AnimalBreedingService.onAskForBreedingItem";
  249. $amf->_bodys[0]->_value[1][0]['params'][0] = 'Qi';
  250.  
  251. $amf->_bodys[0]->_value[2] = 0;
  252.  
  253.                 $res = RequestAMF($amf);
  254.                 AddLog2("LuckyPennies result: $res");
  255.         */        
  256.                  
  257.             }
  258.             //if (is_file(LuckyPennies_File)) unlink(LuckyPennies_File);
  259.  
  260. else
  261. {
  262. AddLog2("LuckyPennies : no work to do");
  263. }
  264. }
  265.  
  266.  
  267. ?>