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: Raid commands  (Read 3579 times)

0 Members and 1 Guest are viewing this topic.

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Raid commands
« 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

Code: [Select]
Raid command from Username :: Insert command here.

I would like it to say

Code: [Select]
Raid command from Username:
***************************
Insert command here.
***************************

Thanks  :)

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Raid commands
« Reply #1 on: August 12, 2007, 05:12:21 pm »
In modules/Raid.php you will find a code snippet like (as of the current trunk)

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

Code: [Select]
    /*
    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
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Raid commands
« Reply #2 on: August 12, 2007, 07:49:42 pm »
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.

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Re: Raid commands
« Reply #3 on: October 14, 2007, 11:27:21 pm »
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?

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Raid commands
« Reply #4 on: October 15, 2007, 04:39:30 pm »
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.

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Re: Raid commands
« Reply #5 on: October 15, 2007, 06:12:17 pm »
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.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Raid commands
« Reply #6 on: October 15, 2007, 09:33:48 pm »
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

 

* 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: 114
  • 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