collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Leet command  (Read 5006 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Leet command
« 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

Code: [Select]
<?
  /*
   * 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

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 110
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal