L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 01:22:20 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Assist macro generator
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Assist macro generator  (Read 681 times)
0 Members and 1 Guest are viewing this topic.
Wanuarmi
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 121


Assist macro generator
« on: December 05, 2005, 03: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:
<?
$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);
    }
  }
?>
Logged
Akarah
BeBot Contributor
Rookie
*******
Offline Offline

Posts: 72


WWW
Assist macro generator
« Reply #1 on: December 05, 2005, 05:11:06 AM »

that is quite handy! thanks Smiley
Logged
skeezix
Rookie
**
Offline Offline

Posts: 21


Assist macro generator
« Reply #2 on: December 05, 2005, 10:39:27 AM »

the !target command does this I think, but only responds to people in the callers list.
nice addition tho SmileySmiley
Logged
Areteh
Rookie
**
Offline Offline

Posts: 23


Re: Assist macro generator
« Reply #3 on: January 06, 2007, 01: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.)
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Assist macro generator
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 16
Total: 16

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.158 seconds with 28 queries. (Pretty URLs adds 0.031s, 4q)
Loading...