<?php
/Made By AllTechDude
* (C) Copyright 2011 - All Rights Reserved
*/ 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
require ("nyan.php");
do {
fwrite(STDOUT, "Enter CPPS IP and Port. Ex: 127.0.0.1:6114 (DO NOT DO THE EXAMPLE) ");
$strCPPS = trim(fgets(STDIN));
fwrite(STDOUT, "Username: ");
$strUser = trim(fgets(STDIN));
fwrite(STDOUT, "Password: ");
$strPass = trim(fgets(STDIN));
fwrite(STDOUT, "Game server on '$strCPPS' (Enter port if the IP is custom.): ");
$strServer= trim(fgets(STDIN));
do {
fwrite(STDOUT, "Room ID(Your bot will go to this room): ");
$intRoom = strtolower(trim(fgets(STDIN)));
if(!(is_numeric($intRoom)))
echo "\nEnter The Room ID, not the Name\n";
} while((!(is_numeric($intRoom))));
do {
fwrite(STDOUT, "Public Bot or Private Bot: ");
$priv = strtolower(trim(fgets(STDIN)));
} while(($priv != "private" && $priv != "public"));
if ($priv == "private"){
$priv = true;
do {
fwrite(STDOUT, "Penguin ID to respond to: ");
$privID = trim(fgets(STDIN));
} while((!(is_numeric($privID))));
} else {
$priv = false;
}
$p = new nyancp;
$login = $p->connect($strUser, $strPass, $strCPPS, $strServer);
} while ($login != -1);
if ($priv == true){
$p->bot($privID, $strUser, $strPass, $strCPPS, $strServer);
} else {
$p->bot("all", $strUser, $strPass, $strCPPS, $strServer);
}