Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. <?php
  2. $pclkey = "betas";/*Replace this with the PCLKey you were given.
  3. For just now, you can leave it how it is, but once the beta is over,
  4. you will need to put in your own one*/
  5. // Import of base class
  6. require_once ("library.php");
  7. require_once("tasks.php");
  8.  
  9. define ("NUM_THREAD", 4);// Set this to the number of penguins
  10. $user = array();
  11. $pass = array();
  12. $servertogo = "Frosty";//Set this to the server you want them to go to.
  13. $room = 801;//Set this to the ID of the room you want them to go to.
  14.  
  15. $user[1] = "Cowsaver";
  16. $user[2] = "Cowsaver2";
  17. $user[3] = "Cowsaver3";
  18. $user[4] = "Cowsaver4";
  19.  
  20.  
  21. $pass[1] = "1234554321";
  22. $pass[2] = "1234554321";
  23. $pass[3] = "1234554321";
  24. $pass[4] = "1234554321";
  25.  
  26. $numberphrases = 5;
  27. $phrases = array();
  28. $phrases[0] = "FEAR US";
  29. $phrases[1] = "PANIC";
  30. $phrases[2] = "WE ARE YOUR RULERS";
  31. $phrases[3] = "FEAR US NOW";
  32. $phrases[4] = "PANIC FOR YOUR LIFE";
  33. $phrases[5] = "PANIC";
  34.  
  35. $penguins = array();
  36. for($x = 1; $x <= NUM_THREAD; $x++){
  37. $penguins[$x] = new Pickle();
  38. $connect = $penguins[$x]->connect($user[$x], $pass[$x], $servertogo);
  39. if($connect != -1){
  40. die($connect);
  41. }
  42. if($penguins[$x]->extRoomID != $room){
  43. $penguins[$x]->joinRoom($room, rand(100,700), rand(100,700));
  44. }
  45. }
  46. while(true){
  47. for($x = 1; $x <= NUM_THREAD; $x++){
  48. $penguins[$x]->sendPosition(rand(100,700), rand(100,700));
  49. $phrase = rand(1, $numberphrases);
  50. $penguins[$x]->sendMessage($phrases[$phrase]);
  51. usleep((2000000 / NUM_THREAD));
  52. }
  53. }
  54.  
  55. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement