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 21, 2008, 08:44:45 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: Event System (beta)
Pages: [1] 2 3   Go Down
« previous next »
Print
Author Topic: Event System (beta)  (Read 2527 times)
0 Members and 1 Guest are viewing this topic.
Wanuarmi
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 121


Event System (beta)
« on: January 22, 2006, 01:51:38 AM »

This is a raid system similar to IGN's. I still gotta do the auction system and add missions. Current commands are:

startraid/endraid - starts and ends a raid
endraid (win|failure) - ends a raid with a win/lose flag
joinraid/leaveraid - joins/leaves a raid
closeraid/openraid - same as pause/lock, players cant join a raid while closed
raidpts <points> <reason> - gives xx points to all active raiders
addpts <name> <points> <reason> - gives xx points to a player
rempts <name> <points> <reason> - removes xx points from a player
addraider <name> - adds a player to raid
kickraider <name> (<reason>) - kicks a player from raid
raiders/check - shows the list of active raiders
account - shows your account info
account <name> - shows someone's account info
event - shows info on the current event
events - shows a list of events
event <number> - shows event info
« Last Edit: February 20, 2006, 05:41:42 PM by Wanuarmi » Logged
ZubZero
Freshman
*
Offline Offline

Posts: 10


Re: Event System (experimental)
« Reply #1 on: January 22, 2006, 08:47:24 AM »

can you write a quick helpfile for it please?
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Event System (experimental)
« Reply #2 on: January 22, 2006, 09:49:34 AM »

switch foreach ($junks as $junk) with foreach ($junks as $cmd) right below the $junks definition. You won't get any command otherwise Smiley
Logged
Wanuarmi
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 121


Re: Event System (experimental)
« Reply #3 on: January 22, 2006, 02:44:34 PM »

thanks, put in a cron function too to not crash

zubzero, ill make a helpfile when the module is finished, the commands arent complicated though

startraid <name>
closeraid / openraid
endraid
joinraid
leaveraid
raidpts <points> <reason>
addpoints <player> <points> <reason>
raiders
addraider <player>
kickraider <player>
account
Logged
Wanuarmi
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 121


Re: Event System (beta)
« Reply #4 on: February 20, 2006, 05:41:59 PM »

bump updated
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Event System (beta)
« Reply #5 on: June 23, 2006, 12:02:10 PM »

Still working on this one Wanu?

-jj-
Logged
Sammajos
Freshman
*
Offline Offline

Posts: 9


Re: Event System (beta)
« Reply #6 on: September 20, 2006, 02:00:16 AM »

Hello,

one thing before, Sorry for my bad English.

I try to use this nice Plugin r i have 1 Problem. When 1 Raider is alone in the Raid, i can do raidpts 5 leftzod and the Raider become the Points.
When more than 1 Raider in the Raid and i make raidpts 5 leftzod i become a MySql Error.

Here is the Code:

Quote
function event_points($name, $points, $reason)
   {
      if (empty($this -> event))
      {
         $this -> bot -> send_tell($name, "No event in progress.");
         return;
      }
      if ($this -> bot -> admin -> in_group($name, "raidleader") || $this -> bot -> admin -> in_group($name, "admin"))
      {
         $raiders = $this -> raiders;
         $eventid = $this -> event['id'];
         $query = '';
         foreach($raiders AS $raider)
         {
            $query .= "INSERT INTO event_account (uid, name, points, reason, givedby, time, eventid, type) VALUES ($raider[id], '$raider[name]', $points, '$reason', '$name', ".gmmktime().", $eventid, 1); " ;
         }
         $this -> bot -> db -> query($query);
         
         $this -> bot -> db -> query("UPDATE event SET totalpoints = totalpoints + $points WHERE id = ".$this -> event['id']);
         $this -> output("<font color=#ffff00>$points</font> point(s) have been added to all raiders.");
      }
      else
         $this -> bot -> send_tell($name, "You must be an event leader to do this");
   }

can someone help me pls?

Edit: ok, got fixed from Zimble.

Replace:

Quote
foreach($raiders AS $raider)
         {
            $query .= "INSERT INTO event_account (uid, name, points, reason, givedby, time, eventid, type) VALUES ($raider[id], '$raider[name]', $points, '$reason', '$name', ".gmmktime().", $eventid, 1); " ;
         }
         $this -> bot -> db -> query($query);

with

Quote
foreach($raiders AS $raider)
{
$query = "INSERT INTO event_account (uid, name, points, reason, `givedby`, time, eventid, type) VALUES ($raider[id], '$raider[name]', $points, '$reason', '$name', ".gmmktime().", $eventid, 1); " ;
$this -> bot -> db -> query($query);
}

I also fixed some wrong SQL Queries and updatet the Bid Funktion in the Bid.php. Now this Plugin run very fine.
« Last Edit: September 20, 2006, 06:56:03 AM by Sammajos » Logged
Landcast
Freshman
*
Offline Offline

Posts: 8


Re: Event System (beta)
« Reply #7 on: November 01, 2006, 07:40:45 PM »

Made a helpfile for this. ( i just edited the raid.txt for this )

Dont know if this will help anyone. Just thought i put it up here since i did something

/LC

Quote
<font color=CCInfoHeader><pre>RAID COMMANDS</font>
<font color=CCInfoText>Here you will find the basic commands to lead a raid.

<font color=CCInfoHeader><pre>startraid|endraid - name of raid </font>
<font color=CCInfoText>Starts/Stops the raid.
Once the raid is started people can join the raid and gain points.</font>

<font color=CCInfoHeader><pre>endraid (win|failure)</font>
<font color=CCInfoText>ends a raid with a win/lose flag.</font>

<font color=CCInfoHeader><pre>joinraid/leaveraid</font>
<font color=CCInfoText>joins/leaves a raid.</font>

<font color=CCInfoHeader><pre>closeraid|openraid</font>
<font color=CCInfoText>same as pause or lock, players cant join a raid while closed.</font>

<font color=CCInfoHeader><pre>raidpts</font>
<font color=CCInfoText>points reason - gives xx points to all active raiders.</font>

<font color=CCInfoHeader><pre>addpts</font>
<font color=CCInfoText>name points reason - gives xx points to a player.</font>

<font color=CCInfoHeader><pre>rempts</font>
<font color=CCInfoText>name points reason - removes xx points from a player.</font>

<font color=CCInfoHeader><pre>addraider</font>
<font color=CCInfoText>name - adds a player to raid.</font>

<font color=CCInfoHeader><pre>kickraider</font>
<font color=CCInfoText>name (reason) - kicks a player from raid.</font>

<font color=CCInfoHeader><pre>raiders/check</font>
<font color=CCInfoText>shows the list of active raiders.</font>

<font color=CCInfoHeader><pre>account</font>
<font color=CCInfoText>shows the list of active raiders.</font>

<font color=CCInfoHeader><pre>account name</font>
<font color=CCInfoText>shows someone's account info.</font>

<font color=CCInfoHeader><pre>event</font>
<font color=CCInfoText>shows info on the current event.</font>

<font color=CCInfoHeader><pre>events</font>
<font color=CCInfoText>shows a list of events.</font>

<font color=CCInfoHeader><pre>event number</font>
<font color=CCInfoText>shows event info.</font>
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Event System (beta)
« Reply #8 on: May 04, 2007, 01:31:22 AM »

I was asked to fix this up, however I've only focused on getting the "non point" features working.  The points will be fixed at a later date, however would like feedback if anybody uses a raffle type raid system.  Will probably add a switch between timed and single point raids in time also.

Eventsystem Changelog:
- fixed numerous typos and bad variable names
- tracks people in raidbot and allows joining of raid only if in bot
- made usage of points functions optional via !settings
- fixed conversion of old raid points table
- revised logging method and added new things to logging
- compatible with php5 where possible
- functions accessable by other modules (for logging of raffles etc)
- added logging (and fixed sql errors) for raid locking and unlocking
- bot will ask for raid description instead of sending help if none given
- reworked points logging
- updated the conversion function for old raid points table
- fixed attendance calculation
- fixed event start crashing bot with ' in name
- added switchable output to settings
* points are now tested and confirmed working ok
Raffle Changelog:
- if raid running, will log winner to database
- if raid running, will only allow people in raid to join raffle
Multi-raffle Changelog:
- modified glara's multiraffle plugin to add logging with the raid system and also added output to GC if needed (switchable in !settings as usual).
Auction/bid Changelog:
- converted the standard bebot !bid system to add logging with the raid system, uses new points table and also added output to GC if needed (switchable in !settings as usual).

Eventsystem PHP
Standard Raffle (modified) PHP*
Multi-Raffle (modified) PHP*+
Auction (modified) PHP
Requires Glara's module settings plugin
* only use one raffle plugin!
+ multi raffle instructions explained here

general:
!startraid <name>
!endraid (optional : win / failure)
!joinraid
!leaveraid
!closeraid - a.k.a. lock
!openraid - a.k.a. unlock
!addraider
!kickraider (optional: reason)
!checkraid

logging:
!event <eventnumber> - shows raid summary
!events - shows list of all raids
!raiders <eventnumber> - shows raid logs

points management:
!raidpts <points> - awards points to whole raid
!addpts <name> <points> <reason>
!rempts <name> <points> <reason>
!account (optional: name to check)

-jj-
« Last Edit: May 17, 2007, 04:57:58 PM by jjones666 » Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Event System (beta)
« Reply #9 on: May 04, 2007, 06:51:49 AM »

I for one think the commands should be different. I might be at odds with everyone else as I haven't really done much raiding but I think that the commands should have been:

Code:
!raid start [description] - starts a raid with an optional [description]
!raid end <(win|failure)> - ends a raid with a win/lose flag
!raid join - joins a raid
!raid leave - leave a raid
!raid (pause|lock|close) - pause/lock/close the raid
!raid (unpause|unlock|open) - unpause/unlock/open the raid
!raid points <points> [reason] - Gives <points> points to all players that has participated in the raid
!raid addpts <name> <points> <reason> - gives <points> points to player <name> with a given <reason>
!raid rempts <name> <points> <reason> - removes <points> points from player <name> for the given <reason>
!raid add <name> - adds player <name> to the raid
!raid kick <name> [reason] - kicks player <name> from raid with an optional [reason] for the kick
!raid (list|check) - shows the list of active raiders
!raid account [name] - shows the raid account for player [name]. If no [name] is given it shows the players raid account
!raid event [id] - shows info on the event with a given [id]. If no [id] is given it shows the last event
!raid events - shows a list of events

This because ie. !account might be a command that several modules would want to register, and to avoid conflicts I think it's a good idea to have one command that takes several keywords instead of multiple commands for a module. Not only because it's easier to see which module handles the command but it also keeps the $bot -> commands array to a minimum and that's always good for the speed of the bot.

Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Event System (beta)
« Reply #10 on: May 04, 2007, 06:54:33 AM »

Yeah the commands suck for sure.  They're omni style :-)

I'll perhaps change them.

-jj-
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Event System (beta)
« Reply #11 on: May 05, 2007, 06:44:25 PM »

eventsystem:
- added logging (and fixed sql errors) for raid locking and unlocking
- bot will ask for raid description instead of sending help if none given

raffle (standard):
- fixed a typo

raffle (multi):
- modified glara's multiraffle plugin to add logging with the raid system and also added output to GC if needed (switchable in !settings as usual).

updated links above.

-jj-
« Last Edit: May 05, 2007, 06:47:32 PM by jjones666 » Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Event System (beta)
« Reply #12 on: May 06, 2007, 04:16:19 PM »

eventsystem:
- reworked points logging
- updated the conversion function for old raid points table
- fixed attendance calculation
* points are now tested and confirmed working ok

auction:
- converted the standard bebot !bid system to add logging with the raid system and also added output to GC if needed (switchable in !settings as usual).

updated links above.

-jj-
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Event System (beta)
« Reply #13 on: May 06, 2007, 11:44:35 PM »

Jack secretly working on plans to overthrow me? Shocked Shocked
That's some nice work you're putting into this
Logged
tonyuh
Rookie
**
Offline Offline

Posts: 48


Re: Event System (beta)
« Reply #14 on: May 16, 2007, 12:38:03 PM »

good work! seems like this is aimed for a raidbot and not a guildbot though... the commands are returned by "return" command without checking which channel the command was initiated from. a simple
Code:
if ($channel == 'pgmsg')
     this -> bot -> send_pgroup(blah);
else
     this -> bot -> send_gc(blah);
should work. but of course since you are awesome you will probably create a setting in the setting module to toggle between the channels or something Tongue

Cheers,
Tony

P.S. since i'm on this subject, command !startraid with a ' in the reason will break the module and restart the bot.
« Last Edit: May 16, 2007, 12:45:44 PM by tonyuh » Logged
Pages: [1] 2 3   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: Event System (beta)
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[Today at 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: 16
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 19
Total: 20
upstart

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.418 seconds with 29 queries. (Pretty URLs adds 0.035s, 4q)
Loading...