Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require "../core.php"; // Includes Pickle's core.php, required core functions
- require "../tasks.php"; // Includes Pickle's tasks.php, simple game tasks
- $Username = "Username";
- $Password = "Password";
- $Server = "Server";
- $TargetID = "Leader ID";
- if (connect($Server, $Username, $Password, true)) { //If it connects to the server do the following...
- echo ("Logged in succesfully\n"); // Show "Logged in succesfully" on the command line.
- findBuddy($TargetID); //Finds room that target is in.
- $rawPack = readRawPacket(); //Sets a variable for recieved packets.
- if (stripos($rawPack, "xt%bf%" . $myRoomID . "%")){ //If you get a recieved packet from finding the buddy...
- $Room = stribet($rawPack, "%xt%bf%$myRoomID%", "%"); //Set a variable for the room that they are in.
- if (($Room < 900) and ($Room != $extRoomID)){ //If the room ID that they are in is less than 900 and is not the current room they are in...
- gotoRoom($Room, 0, 0); //Go to the rooom.
- echo("Found target in room $Room\n"); // Show it on the command line.
- }
- elseif (($Room >= 900) and ($Room < 1000)){ // Or if the room is equal to or greater than 900, but less than 1000...
- echo("Your target is in a game. Waiting for game to end...\n"); //Show it on the command line.
- sleep(5); // Waits five seconds.
- findBuddy($TargetID); // Searches for target again.
- }
- elseif (($Room > 999) and ($Room != $extRoomID)){ // Or if the room ID they are in is above 999 and is not the current room you are in
- gotoRoom($Room, 0, 0); // Go to the igloo.
- echo("Found target in Igloo #$Room\n"); //Shows it on the command line.
- }
- }
- }
- while (true) {
- $rawPack = readRawPacket();
- if (stripos($rawPack, "xt%sm%$myRoomID%$TargetID")){ // If you get a recieve packet of your target talking...
- $Message = stribet($rawPack, "%xt%sm%$myRoomID%$TargetID%", "%"); // Isolate the message and set it as a variable.
- say($Message); //Say the variable
- echo("Message: '$Message'\n"); //Show the message on the command line.
- }
- elseif (stripos($rawPack, "xt%se%". $myRoomID . "%" . $TargetID)) { //Or if you get a recieve packet of your target performing an emote...
- $emoteID = stribet($rawPack, "%xt%se%$myRoomID%$TargetID%", "%"); // Isolate the emote ID and set it as a variable.
- sendEmote($emoteID); //Perform the emote.
- echo("Emote: $emoteID\n"); //Shows the emote Id on the command line.
- }
- elseif (stripos($rawPack, "xt%sp%". $myRoomID . "%" . $TargetID)) { //Or if your target switches its position...
- $x = stribet($rawPack, "%xt%sp%$myRoomID%$TargetID%", "%") + 20; //Isolate their x coordiante and set it as a variable with an offset of +20.
- $y = stribet($rawPack, "%xt%sp%$myRoomID%$TargetID%$x%", "%"); //Isolate their y coordinate and set it as a variable.
- goto($x, $y); //Walk to $x, $y.
- echo("Position: $x, $y\n"); // Show position on the command line.
- }
- elseif (stripos($rawPack, "xt%sb%". $myRoomID . "%" . $TargetID)) { //Or if your target throws a snowball...
- $x = stribet($rawPack, "%xt%sb%$myRoomID%$TargetID%", "%") + 20; //Isolate their x coordinate and set it as a variable with an offset of +20
- $y = stribet($rawPack, "%xt%sb%$myRoomID%$TargetID%$x%", "%"); //Isolate their y coordinate and set it as a variable.
- snowBall($x, $y); //Throw a snowball at $x, $y.
- echo("Snowball: $x, $y\n"); //Shows your snowball coords on the command line.
- }
- elseif (stripos($rawPack, "xt%ss%". $myRoomID . "%" . $TargetID)) { //Or if your target sends a safe chat message...
- $SafeMessage = stribet($rawPack, "%xt%ss%$myRoomID%$TargetID%", "%"); //Isolate the message and set it as a variable.
- safeMessage($MessageID); //Send the safe chat message.
- echo("Safe Chat: $SafeMessage\n"); //Show the safe chat message in the command line.
- }
- elseif (stripos($rawPack, "xt%rp%-1%" . $TargetID)) { //Or if your target leaves the room...
- findBuddy($TargetID); //Find the target...
- echo("Target left, finding target...\n"); //Show that they left on the command line.
- }
- if (stripos($rawPack, "xt%bf%" . $myRoomID . "%")){ //If you get a recieved packet from finding the buddy...
- $Room = stribet($rawPack, "%xt%bf%$myRoomID%", "%"); //Set a variable for the room that they are in.
- if (($Room < 900) and ($Room != $extRoomID)){ //If the room ID that they are in is less than 900 and is not the current room they are in...
- gotoRoom($Room, 0, 0); //Go to the rooom.
- echo("Found target in room $Room\n"); // Show it on the command line.
- }
- elseif (($Room >= 900) and ($Room < 1000)){ // Or if the room is equal to or greater than 900, but less than 1000...
- echo("Your target is in a game. Waiting for game to end...\n"); //Show it on the command line.
- sleep(5); // Waits five seconds.
- findBuddy($TargetID); // Searches for target again.
- }
- elseif (($Room > 999) and ($Room != $extRoomID)){ // Or if the room ID they are in is above 999 and is not the current room you are in
- gotoRoom($Room, 0, 0); // Go to the igloo.
- echo("Found target in Igloo #$Room\n"); //Shows it on the command line.
- }
- }
- elseif (stripos($rawPack, "xt%sa%" . $myRoomID . "%" . $TargetID)) { //Or if your target performs an action...
- $ActionID = stribet($rawPack, "%xt%sa%$myRoomID%$TargetID%", "%"); //Isolate the action ID and set it as a variable.
- sendAction($ActionID); //Perform the action.
- echo("Action: $ActionID\n"); //Show the action ID on the command line.
- }
- elseif (stripos($rawPack, "xt%upc%" . $myRoomID . "%" . $TargetID)) { //Or if your target changes its color...
- $ColorID = stribet($rawPack, "%xt%upc%$myRoomID%$TargetID%", "%"); //Isolate the ID of the color they put on and set it as a variable.
- updateColor($ColorID); //Change your color to theirs.
- echo("Color: $ColorID\n"); //Shows color change on the command line.
- }
- elseif (stripos($rawPack, "xt%sf%" . $myRoomID . "%" . $TargetID)) { //Or if your target switches its frame...
- $FrameID = stribet($rawPack, "%xt%sf%$myRoomID%$TargetID%", "%"); //Isolate the frame ID and set it as a variable.
- sendFrame($FrameID); //Send the frame.
- echo("Frame: $FrameID\n"); //Show the frame on the command line.
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement