Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pclkey = "betas";/*Replace this with the PCLKey you were given.
- For just now, you can leave it how it is, but once the beta is over,
- you will need to put in your own one*/
- // Import of base class
- require_once ("library.php");
- require_once("tasks.php");
- define ("NUM_THREAD", 4);// Set this to the number of penguins
- $user = array();
- $pass = array();
- $servertogo = "Frosty";//Set this to the server you want them to go to.
- $room = 801;//Set this to the ID of the room you want them to go to.
- $user[1] = "Cowsaver";
- $user[2] = "Cowsaver2";
- $user[3] = "Cowsaver3";
- $user[4] = "Cowsaver4";
- $pass[1] = "1234554321";
- $pass[2] = "1234554321";
- $pass[3] = "1234554321";
- $pass[4] = "1234554321";
- $numberphrases = 5;
- $phrases = array();
- $phrases[0] = "FEAR US";
- $phrases[1] = "PANIC";
- $phrases[2] = "WE ARE YOUR RULERS";
- $phrases[3] = "FEAR US NOW";
- $phrases[4] = "PANIC FOR YOUR LIFE";
- $phrases[5] = "PANIC";
- $penguins = array();
- for($x = 1; $x <= NUM_THREAD; $x++){
- $penguins[$x] = new Pickle();
- $connect = $penguins[$x]->connect($user[$x], $pass[$x], $servertogo);
- if($connect != -1){
- die($connect);
- }
- if($penguins[$x]->extRoomID != $room){
- $penguins[$x]->joinRoom($room, rand(100,700), rand(100,700));
- }
- }
- while(true){
- for($x = 1; $x <= NUM_THREAD; $x++){
- $penguins[$x]->sendPosition(rand(100,700), rand(100,700));
- $phrase = rand(1, $numberphrases);
- $penguins[$x]->sendMessage($phrases[$phrase]);
- usleep((2000000 / NUM_THREAD));
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement