View difference between Paste ID: kBaaP5ys and
SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | /Made By AllTechDude | |
4 | * (C) Copyright 2011 - All Rights Reserved | |
5 | */ This is a code to create a CPPS Bot. NOTE: This will not work with just this code. You need lots more files to create it. This CPPS bot maker was created by AllTechDude. NyanCP.Tk | |
6 | ||
7 | ||
8 | require ("nyan.php"); | |
9 | ||
10 | do { | |
11 | fwrite(STDOUT, "Enter CPPS IP and Port. Ex: 127.0.0.1:6114 (DO NOT DO THE EXAMPLE) "); | |
12 | $strCPPS = trim(fgets(STDIN)); | |
13 | ||
14 | fwrite(STDOUT, "Username: "); | |
15 | $strUser = trim(fgets(STDIN)); | |
16 | ||
17 | fwrite(STDOUT, "Password: "); | |
18 | $strPass = trim(fgets(STDIN)); | |
19 | ||
20 | fwrite(STDOUT, "Game server on '$strCPPS' (Enter port if the IP is custom.): "); | |
21 | $strServer= trim(fgets(STDIN)); | |
22 | ||
23 | do { | |
24 | fwrite(STDOUT, "Room ID(Your bot will go to this room): "); | |
25 | $intRoom = strtolower(trim(fgets(STDIN))); | |
26 | if(!(is_numeric($intRoom))) | |
27 | echo "\nEnter The Room ID, not the Name\n"; | |
28 | } while((!(is_numeric($intRoom)))); | |
29 | ||
30 | do { | |
31 | fwrite(STDOUT, "Public Bot or Private Bot: "); | |
32 | $priv = strtolower(trim(fgets(STDIN))); | |
33 | } while(($priv != "private" && $priv != "public")); | |
34 | if ($priv == "private"){ | |
35 | $priv = true; | |
36 | do { | |
37 | fwrite(STDOUT, "Penguin ID to respond to: "); | |
38 | $privID = trim(fgets(STDIN)); | |
39 | } while((!(is_numeric($privID)))); | |
40 | } else { | |
41 | $priv = false; | |
42 | } | |
43 | ||
44 | $p = new nyancp; | |
45 | $login = $p->connect($strUser, $strPass, $strCPPS, $strServer); | |
46 | } while ($login != -1); | |
47 | ||
48 | ||
49 | if ($priv == true){ | |
50 | $p->bot($privID, $strUser, $strPass, $strCPPS, $strServer); | |
51 | } else { | |
52 | $p->bot("all", $strUser, $strPass, $strCPPS, $strServer); | |
53 | } | |
54 | ||
55 |