BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Wanuarmi on December 09, 2005, 04:33:10 am
-
This was posted in the wrong place by mookie and im not sure if he is gonna move it, so..
==========================
Here is the Leet.php
<?
/*
* leet.php - A Social Module
* For BeBot - An Anarchy Online Chat Automaton Developed by Blondengy (RK1)
* Copyright (C) 2004 Jonas Jax
*
* Module Developed by Xenixa (RK1)
* Special thanks goes out to Zacix for his Helpful insight.
*
* As usual place this file in ./modules
*/
/*
Add a "_" at the beginning of the file (_leet.php) if you do not want it to be loaded.
*/
$leet = new leet($bot);
$commands["tell"]["leet"] = &$leet;
$commands["pgmsg"]["leet"] = &$leet;
$commands["gc"]["leet"] = &$leet;
/*
The Class itself...
*/
class leet
{
var $bot;
var $leet;
/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function leet (&$bot)
{
$this -> bot = &$bot;
$this->leets = array(
"joo suxxor",
"ph4t l3wt",
"*drool*",
"peekay",
"r u nubi",
"i'll get my main!",
"CREDZplzkthxbye",
"im uber",
"foo",
"NEED MONEY PLZ",
"CAN I HAVE UR SWORD?",
"WHY DID U LOOT ME?",
"whats ur equip?",
"foo",
"hoot",
"coo",
"stfu mofo");
// You can add more possible responses to the array above.
}
/*
This gets called on a tell with the command
*/
function tell($name, $msg)
{
$this -> bot -> send_tell($name, $this -> get_leets($name));
}
/*
This gets called on a msg in the privgroup with the command
*/
function pgmsg($name, $msg)
{
$this -> bot -> send_pgroup($this -> get_leets($name));
}
/*
This gets called on a msg in the guildchat with the command
*/
function gc($name, $msg)
{
$this -> bot -> send_gc($this -> get_leets($name));
}
/*
Build response
*/
function get_leets($name)
{
$dmg = rand(1,99999);
$creds = rand(1000,9999999);
$quality = rand(100,300);
$returnstr = $this -> leets[rand(0,sizeof($this->leets)-1)];
return $returnstr;
}
}
?>
I left the Dmg, Creds and qaulity in place to add leet variables.
Special thanks to Xenixa for coding them under the social post.
http://bebot.fieses.net/viewtopic.php?t=160