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: Working on a new raidbot module  (Read 7220 times)

0 Members and 1 Guest are viewing this topic.

Offline ZubZero

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Working on a new raidbot module
« on: January 25, 2006, 11:27:13 pm »
I have completed all the !startraid <name>, !addpts <name>, !raidlock etc etc.
I am also working an !account command, so atm I am implementing logging onto the !addpts and !raid kick commands.
I have one little problem with the raid !kick commands if I dont write the reason in 8 words I get alot space like "(Reason: noob      )"

My raidscript is based of the original raidscript and the mercbot someone posted.

I can poste my code and see if someone else has a better way to do it.
How I call the function:
Code: [Select]

else if (preg_match("/^" . $this -> bot -> commpre . "raid kick (.+)$/i", $msg, $info))
$this -> kick_raid($name, $info[1]);
The function itself.
Code: [Select]
function kick_raid($name, $data)
{
$data = ucfirst(strtolower($data));
if ($this -> bot -> admin -> in_group($name, "leader") || $this -> bot -> admin -> in_group($name, "admin"))
{
$var = explode(" ", $data);
$raiding = $this -> bot -> db -> query("SELECT * FROM " . $this -> bot -> get_tablename("raid_list") . " WHERE name = '" . $var[0] . "'");
  if (!empty($raiding))
  $this -> bot -> send_tell($name, "<font color=#ffff00>$var[0]</font> is not in the raid.");
  else
  {
   
  unset($this -> user[$who]);
  $this -> bot -> send_pgroup("<font color=#ffff00>" . $var[0] . "</font> was kicked from the raid. Reason = $var[1] $var[2] $var[3] $var[4] $var[5] $var[6] $var[7] $var[8] $var[9]");
  $this -> bot -> send_tell($var[0], "<font color=#ffff00>$name</font> kicked you from the raid. Reason = $var[1] $var[2] $var[3] $var[4] $var[5] $var[6] $var[7] $var[8] $var[9]");
  $this -> bot -> db -> query("DELETE FROM " . $this -> bot -> get_tablename("raid_list") . " WHERE name = '" . $var[0] . "'");
$this -> bot -> db -> query("UPDATE raid_points SET raiding = 0 WHERE id =" . $this -> points_to($var[0]));
    //$this -> bot -> db -> query("INSERT INTO " . $this -> bot -> get_tablename("raid_account") . " (name, history) VALUES ('" . $var[0] . "','Kicked from raid. (Reason: " . $var[1] $var[2] $var[3] $var[4] $var[5] $var[6] $var[7] $var[8] $var[9] . ") by " . $name . "')");
    $this -> bot -> db -> query("INSERT INTO " . $this -> bot -> get_tablename("raid_account") . " (name, history) VALUES ('" . $var[0] . "','Kicked from raid. (Reason: " . $var[1] . " " . $var[2] . " " . $var[3] . " " . $var[4] . " " . $var[5] . " " . $var[6] . " " . $var[7] . " " . $var[8] . " " . $var[9] . ") by lamer')");
  }
}
else
$this -> bot -> send_tell($name, "You must be a raid leader to do this");
}

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Working on a new raidbot module
« Reply #1 on: January 26, 2006, 12:48:12 am »
Code: [Select]

else if (preg_match("/^" . $this -> bot -> commpre . "raid kick (.+)$/i", $msg, $info))
$this -> kick_raid($name, $info[1]);

else if (preg_match("/^" . $this -> bot -> commpre . "raid kick ([a-zA-Z0-9][a-zA-Z0-9]*) (.+)$/i", $msg, $info))
         return $this -> kick_raid($name, $info[1], $info[2]);

then you get two variables in the kick_raid() function, the name and the reason

this looks alot like the raid module im doing, why are you making another one, if I may ask :P

Offline ZubZero

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Working on a new raidbot module
« Reply #2 on: January 26, 2006, 02:24:03 pm »
Well I said it was based of your mercbot :P
I just want some similar stuff, I removed the add points out of your raiddone, I added a !addpts command that also logs to the raid_account file. so I can do !addpts APF or whatever. I also want alot of logging towards the raid_account like this raid kick.
I also want to redo the bid system since I need it to show how many points someone has bid. And I also want 2 different way of bidding, I want !bid 100 that makes you bid 100, and I want !bid +1 that makes you bid 1 over what has been bidden before. And I also want this to log to 2 different tables, the raid_account and a raid_auction.

As you might have guessed the raid_account will be used to display a log for someone using the !account command.

I also need to add !command and !announce.
Plus a bunch of aliases :P

Offline Wanuarmi

  • Contributor
  • *******
  • Posts: 121
  • Karma: +0/-0
Re: Working on a new raidbot module
« Reply #3 on: January 27, 2006, 01:06:16 am »
alreadythere just released another raid module based off mercbot
http://bebot.link/index.php/topic,313.0.html

mine isnt based on mercbot, its based on IGN bot, im planning on adding logging of raid kicks/auctions on account and an auction module to go with it, its just not finished yet

of course you can make all raid modules you want, I just wanted to know what was different from mine and why not use mine, to get some feedback

 

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