BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: Metaphblade on August 11, 2007, 01:39:30 am
-
how would i go about changing the way the raid commands show up?
Right now i get
Raid command from Username :: Insert command here.
I would like it to say
Raid command from Username:
***************************
Insert command here.
***************************
Thanks :)
-
In modules/Raid.php you will find a code snippet like (as of the current trunk)
/*
Issues a raid command
*/
function raid_command($name, $command)
{
if ($this -> bot -> security -> check_access($name, "leader"))
{
$this -> bot -> send_pgroup("<font color=#ff0000>Raid command from </font><font color=#ffff00>$name</font> :: $command");
}
else
$this -> bot -> send_tell($name, "You must be a raidleader to do this");
}
To do what you want you would want to change this to something like:
/*
Issues a raid command
*/
function raid_command($name, $command)
{
if ($this -> bot -> security -> check_access($name, "leader"))
{
$separator='*********************************';
$this -> bot -> send_pgroup("<font color=#ff0000>Raid command from </font><font color=#ffff00>$name</font> \n $separator \n $command \n $separator");
}
else
$this -> bot -> send_tell($name, "You must be a raidleader to do this");
}
This code has not been tested, but it should adequatly show the concept of what needs to be done to make the desired results.
As of making this optional I see no reason as to why the $separator variable can't be a setting so that, if set it is used, if not the :: is used.
I hope that helps
-Terje
-
In the raid branch there is also an improved version of the command/shout module that has been separated from the raid module. The format of the output is changeable via an in game setting.
You will however have to edit or replace the default raid module.
-
i have been working on this module again. i have it somewhat working, but am not liking the output it is giving me. using the shout module in the raid branch, how do i go about adding line breask via in game settings?
-
The rand branch shout module has three tags that you can use in settings that will be replaced on output. %LEADER%, %INPUT%, %BR%.
%LEADER% - The person who used the s or c command.
%INPUT% - The message (Everything that follows s or c)
%BR% - Replaced with a line break.
To change the output format for c, /tell <botname> <pre>set Shout Format_c new_format. To change the output format for s, /tell <botname> <pre>set Shout Format_s new_format.
For example, if you wanted your output to look like this:
========== RAID COMMAND ====================================
Glarawyn: Move it or loose it!
============================================================
/tell <yourbot> !set Shot Format_c ##RED##========== RAID COMMAND ====================================##END####BR####YELLOW##%LEADER%: %INPUT%##END##%BR%##RED##============================================================##END##
Note the format for the color tags. That's BeBot's color tags, not the shout modules.
-
Thank you VERY much. I had the color portion down, but coulnt get line breaks to save my life.....i tried everything, but that, lol.
-
Thank you VERY much. I had the color portion down, but coulnt get line breaks to save my life.....i tried everything, but that, lol.
Did you try reading the help? It was fully documented there. :P