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

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

Author Topic: Assist macro generator  (Read 3363 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Assist macro generator
« on: December 05, 2005, 09:11:32 am »
This one will open a window with links to create a macro or assist directly, and a couple other stuff

Pretty much the same script alot of people have, but in the bot

syntax is !assist <player name>

Code: [Select]
<?
$assist = new Assist($bot);

$commands["tell"]["assist"] = &$assist;
$commands["pgmsg"]["assist"] = &$assist;
$commands["gc"]["assist"] = &$assist;



  /*
    The Class itself...
  */
  class Assist
  {
    var $bot;
   
   

    /*
      Constructor:
        Hands over a referance to the "Bot" class.
    */
    function Assist (&$bot)
    {
      $this -> bot = &$bot;
    }



    /*
      This gets called on a tell with the command
    */
    function tell($name, $msg)
    {
if (preg_match("/^" . $this -> bot -> commpre . "assist (.+)$/i", $msg, $info)) { $output = $info[1]; }
$this -> bot -> send_tell($name, $this -> doAssist($output)) ;
    }



    /*
      This gets called on a msg in the privgroup with the command
    */
    function pgmsg($name, $msg)
    {
if (preg_match("/^" . $this -> bot -> commpre . "assist (.+)$/i", $msg, $info)) { $output = $info[1]; }
$this -> bot -> send_pgroup($this -> doAssist($output));
    }
   
   
   
    /*
      This gets called on a msg in the guildchat with the command
    */
    function gc($name, $msg)
    {
if (preg_match("/^" . $this -> bot -> commpre . "assist (.+)$/i", $msg, $info)) { $output = $info[1]; }
$this -> bot -> send_gc($this -> doAssist($output));
    }




    /*
    Makes the message
    */
    function doAssist($msg)
    {
$ucname = ucfirst($msg);
    $inside = "<font color=CCInfoText><font color=CCInfoHeader>Macro:</font>\nAssist <a href='chatcmd:///macro $msg /assist $msg'>$ucname</a>\n\n";
$inside .= "<font color=CCInfoHeader>Command:</font>\nAssist <a href='chatcmd:///assist $msg'>$ucname</a>\n\n";
   
$inside .= "<font color=CCInfoHeader>Extras:</font>\nAnnonymous on/off: <a href='chatcmd:///anon'>/anon</a>\n";
$inside .= "Turn auto attack player <a href='chatcmd:///option AutoAttackPvP 1'>on</a> <a href='chatcmd:///option AutoAttackPvP 0'>off</a>\n";
$inside .= "Turn auto target player <a href='chatcmd:///option AutoTargetPvP 1'>on</a> <a href='chatcmd:///option AutoTargetPvP 0'>off</a>\n";
$inside .= "Turn show all names <a href='chatcmd:///option ShowAllNames 1'>on</a> <a href='chatcmd:///option ShowAllNames 0'>off</a>";

  return "Assist: " . $this -> bot -> make_blob($ucname, $inside);
    }
  }
?>

Offline Akarah

  • Contributor
  • *******
  • Posts: 72
  • Karma: +0/-0
    • http://synergyfactor.net/
Assist macro generator
« Reply #1 on: December 05, 2005, 11:11:06 am »
that is quite handy! thanks :)

Offline skeezix

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Assist macro generator
« Reply #2 on: December 05, 2005, 04:39:27 pm »
the !target command does this I think, but only responds to people in the callers list.
nice addition tho :):)

Offline Areteh

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: Assist macro generator
« Reply #3 on: January 06, 2007, 07:06:18 am »
help file.  (yeah, I'm spamming them a bit, just figured since I'm writing them for my own bots, I may as well share.)

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 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: 479
  • 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