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

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

Author Topic: !raid lock  (Read 2376 times)

0 Members and 1 Guest are viewing this topic.

Offline womp

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
!raid lock
« on: February 06, 2006, 10:01:43 pm »
I have 2 questions about this function...

1. When I "!raid lock" I get the message as well as well as all in the group the the raid has been locked.  Even while the raid is locked people are still able to join the raid where is the command line for this located and how can I fix this...

2. Is there a command already to add a point to all people in the raid so I dont have to go through and add a point to everyones account manually?

Im a newbie at this

Is running in raidbot mode

Using bebot v0.2..2
« Last Edit: February 08, 2006, 08:53:10 am by womp »

Offline womp

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: !raid lock
« Reply #1 on: February 08, 2006, 11:31:28 am »
Upgraded to bebot 3.1 and still the same problems are there. !raid lock will lock the raid but still allowing people to join the raid. Has a ticker in the bot I think I will learn to deal with that. Can't find an !auction command on !raffle... Now the bot is not liking new members. any normal command they try to run says they have to be a member of the bot. !members doesnt show them as a member but if I !member >name< it shows that I have added this player to the bot. ??? any assistance would be appreciated.


**Edit Feb 8 2k6**
OK after doing some searching I was able to find certain things that I needed to help me along with the bot. The only thing is still I like the points ticking for the raids... but how do I stop people from joining the raid once the raid is locked?
« Last Edit: February 08, 2006, 11:54:28 am by womp »

Offline skeezix

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: !raid lock
« Reply #2 on: February 08, 2006, 06:39:06 pm »
btw I fiddled with this bot setup some
I'm getting the bug when adding a member who isn't in a guild, on the console it shows this then doesn't add them as a member

 (Incorrect integer value: '' for column 'rank' at row 1)

It says it added the person as a member, sends them a tell, then shows them logged on/off (not member)

To show more clearly from the console when one of the admins added someone's alt who wasn't in a guild ->

Code: [Select]
[2006-02-08 17:32:07]   [PGRP]  [MSG]   [Pfbot] Reverentia: !member zawhollop

 (Incorrect integer value: '' for column 'rank' at row 1)

[2006-02-08 17:32:08]   [TELL]  [OUT]   -> zawhollop: Reverentia has added you to the bot.
[2006-02-08 17:32:08]   [BUDDY] [LOG]   Zawhollop logged [on] (not member)
[2006-02-08 17:32:08]   [PGRP]  [MSG]   [Pfbot] Pfbot: Player zawhollop has been
 added to the bot.
[2006-02-08 17:32:13]   [TELL]  [INC]   Zawhollop: !chat
[2006-02-08 17:32:13]   [TELL]  [OUT]   -> Zawhollop: I only listen to members of this bot.

Haven't looked much at the !raid lock setup, but after a raid is locked anyone who's listed as a member can still join the raid.  I can understand admins+ being able to join a locked raid, but what about regular members?

Offline lonillen

  • BeBot Rookie
  • *
  • Posts: 15
  • Karma: +0/-0
Re: !raid lock
« Reply #3 on: February 09, 2006, 01:35:33 pm »
for the lock issue, you may need to modify your RaidTime.php to add check for locked status in join_raid function. something similar to the following might be a solution:
Code: [Select]
function join_raid($name)

{

if (isset($this -> user[$name]))

$this -> bot -> send_tell($name, "You are already in the raid", 1);

else if ($this -> locked)

$this -> bot -> send_tell($name, "The raid status is currently <font color=#ffff00>locked</font>.");

else if ($this -> raid)

{

$id = $this -> bot -> aoc -> get_uid($name);


$result = $this -> bot -> db -> select ("SELECT id FROM raid_points WHERE id = " . $this -> points_to($name));

if (empty($result))

$this -> bot -> db -> query("INSERT INTO raid_points (id, points, raiding) VALUES (" . $this -> points_to($name) . ", 0, 0)");


$this -> user[$name] = $this -> bot -> aoc -> get_uid($name);

$this -> bot -> send_pgroup("<font color=#ffff00>$name</font> has <font color=#ffff00>joined</font> the raid :: " . $this -> clickjoin());

$this -> bot -> db -> query("UPDATE raid_points SET raiding = 1 WHERE id = " . $this -> points_to($name));
}

else

$this -> bot -> send_tell($name, "No raid in progress");

}



Offline skeezix

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: !raid lock
« Reply #4 on: February 20, 2006, 07:18:54 pm »
just for an update - I also added !raid pause/unpause since it was nice to have - and in case someone else can use it (if it's not already somewhere)

In raidtime.php -

under the class definition -
Code: [Select]
var $paused;

function Raid
Code: [Select]
function Raid (&$bot)
{
$this -> bot = &$bot;
$this -> raid = false;
$this -> user = array();
$this -> announce = 0;
$this -> locked = false;
$this -> paused = false;
}

added under function tell and function pgmsg
Code: [Select]
else if (preg_match("/^" . $this -> bot -> commpre . "raid (pause|unpause)$/i", $msg, $info))
$this -> pause_raid($name, $info[1]);

Under function end_raid - when confirmed stopping it
Code: [Select]
$this -> locked = false;
$this -> paused = false;

under function join_raid
Code: [Select]
if($this -> locked == false)
{
$this -> user[$name] = $this -> bot -> aoc -> get_uid($name);
$this -> bot -> send_pgroup("<font color=#ffff00>$name</font> has <font color=#ffff00>joined</font> the raid :: " . $this -> clickjoin());
$this -> bot -> db -> query("UPDATE raid_points SET raiding = 1 WHERE id = " . $this -> points_to($name));
}
else
{
$this -> bot -> send_tell($name, "piss off raid is locked omg!11!!!!!1one");
}

Also added function pause_raid
Code: [Select]
function pause_raid($name, $pause)
{
if ($this -> bot -> admin -> in_group($name, "raidleader"))
{
if ($this -> raid)
{
if (strtolower($pause) == "pause")
{
if($this -> paused)
$this -> bot -> send_tell($name, "Raid already paused");
else
{
$this -> paused = true;
unset($this -> bot -> cron["1min"]["raid"]);
$this -> bot -> send_pgroup("<font color=#ffff00>$name</font> has <font color=#ffff00>paused</font> the raid.");
}
}
else
{
if($this -> paused)
{
$this -> paused = false;
$this -> bot -> cron["1min"]["raid"] = &$this -> bot -> commands["tell"]["raid"];
$this -> bot -> send_pgroup("<font color=#ffff00>$name</font> has <font color=#ffff00>unpaused</font> the raid.");
}
else
$this -> bot -> send_tell($name, "Raid is not paused");
}
}
else
{
$this -> bot -> send_tell($name, "No raid is in progress n00b");
}
}
else
$this -> bot -> send_tell($name, "You must be a raidleader to do this HAHA ownt");
}

Erm I think that was it.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 92
  • 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