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 22, 2008, 01:42:58 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: Mercbot (RK2) style raid plugin
Pages: [1] 2   Go Down
« previous next »
Print
Author Topic: Mercbot (RK2) style raid plugin  (Read 2562 times)
0 Members and 1 Guest are viewing this topic.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Mercbot (RK2) style raid plugin
« on: January 26, 2006, 05:41:39 AM »

As mentioned in some other thread, I've written a raid module based on the mercbot raidsystem that was used on RK2 by Omnis.

Basic ideas: you get a fixed amount of points for a specific raid, not points over time, and use those points to bid for the loot.

This module is written for guild use, so people can add themself to the raidlist as long as it's not closed. If closed, only raidleader can still add people.

For bidding it offers a few options:
  • You can set the amount of points it costs to bid.
  • You can chose whether the amount that someone bids is shown or not.
  • You can forbid reducing bids to stop last second ninja bidding. Unbidding or bidding the same as last highest bid always works.
If you bid X points and win, you will pay X+cost points in total.

The module logs all !raiddone/!raidpoints commands, including all people in raidlist, and logs all won items. Those information can be accessed by the !history and !raidhistory commands.

File, save as .php

Note: this module is still in some development, there doesn't exist any interface to define raid types yet, I'm still doing it directly in the database. And I make heavy use of my colors table and get_tablename function.
Further I depend on my custom rights management to check access rights, I'm not doing any checks in this code.
« Last Edit: January 26, 2006, 05:43:11 AM by Alreadythere » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #1 on: January 27, 2006, 09:09:24 AM »

Forgot to add in the original post: the module is works with the alts table, if raids_points_to_main is set to true all points will go to the main. And people can only join with one of their mains for points, adding a second will overwrite the first joined one. So they can use as many chars at once as they wish, they will only get points once.
No alts table or raid_points_to_main set to false disables this behavior.
Logged
stonybg
Rookie
**
Offline Offline

Posts: 23


Re: Mercbot (RK2) style raid plugin
« Reply #2 on: February 17, 2006, 05:47:34 PM »

hy nice modul but got a problem
Fatal error: Call to undefined function:  get_setting() in D:\bebot\modules\Raid_RAID.php on line 84
any idea what is problem?
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #3 on: February 18, 2006, 04:28:21 AM »

Yes, I've added the following two functions to my Bot class.
Code:
function get_setting($set)
{
$res = $this -> bot -> db -> select("SELECT * FROM settings WHERE setting = '" . $set . "'");

if (!empty($res))
return $res[0][1];
else
return "";
}

function set_setting($set, $value)
{
$this -> bot -> db -> query("UPDATE settings SET value = '" . $value . "' WHERE setting = '" . $set . "'");
}

Either add those two functions in the Bot class, or you can add them in the raid class too, then you just need to modify all $this -> bot -> [get|set]_setting() to $this -> [get|set]_setting().
Logged
stonybg
Rookie
**
Offline Offline

Posts: 23


Re: Mercbot (RK2) style raid plugin
« Reply #4 on: February 18, 2006, 02:26:09 PM »

weare i need to put functiom?
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #5 on: February 19, 2006, 04:32:54 AM »

Put the two functions in Bot.php, in the Bot class.
Logged
stonybg
Rookie
**
Offline Offline

Posts: 23


Re: Mercbot (RK2) style raid plugin
« Reply #6 on: February 19, 2006, 06:04:26 AM »

i put on bot clas but return erorr
Fatal error: Call to a member function on a non-object in D:\Install\bots\pandcom\Bot.php on line 75
i atach editet bot php if you can see it weare i make error, please chek it im too new in php programing.
« Last Edit: February 20, 2006, 07:28:32 PM by stonybg » Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: Mercbot (RK2) style raid plugin
« Reply #7 on: February 20, 2006, 04:31:48 PM »

You need to move both those functions to be inside the Function Bot which is part of the Class Bot.
Right under were Class Bot is defined won't quite work. Your best bet is find the following:
Code:
    /*
      Dissconnect the bot
    */
    function disconnect()
    {
      $this -> aoc -> disconnect();

      if (!empty($this -> commands["disconnect"]))
      {
        $keys = array_keys($this -> commands["disconnect"]);
        foreach ($keys as $key)
          $this -> commands["disconnect"][$key] -> disconnect();
      }
    }

Place the get and set functions above right after that.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
stonybg
Rookie
**
Offline Offline

Posts: 23


Re: Mercbot (RK2) style raid plugin
« Reply #8 on: February 20, 2006, 07:28:02 PM »

damed error
tnx Xenixa function work but now have next error

Fatal error: Call to undefined function:  get_tablename() in D:\Install\bots\modules\Raid_RAID.php on line 39
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #9 on: February 21, 2006, 04:58:36 AM »

Add the following function right behind the get/set_setting functions
Code:
function get_tablename($name)
{
return $name;
}
Should solve that problem.
Logged
stonybg
Rookie
**
Offline Offline

Posts: 23


Re: Mercbot (RK2) style raid plugin
« Reply #10 on: February 21, 2006, 11:02:44 PM »

tncx now work Wink
Logged
Otvertkin
Freshman
*
Offline Offline

Posts: 2


Re: Mercbot (RK2) style raid plugin
« Reply #11 on: July 27, 2006, 06:25:47 AM »

i have error
Fatal error: Call to undefined method Raids::get_setting() in ....\BeBot_v0.2.5\modules\raidsingle.php on line 84
after all changes in any case
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #12 on: July 27, 2006, 12:55:22 PM »

Quote from: Otvertkin on July 27, 2006, 06:25:47 AM
i have error
Fatal error: Call to undefined method Raids::get_setting() in ....\BeBot_v0.2.5\modules\raidsingle.php on line 84
after all changes in any case

Did you add the above mentioned get_setting() functions? They should solve the errors.
Logged
Otvertkin
Freshman
*
Offline Offline

Posts: 2


Re: Mercbot (RK2) style raid plugin
« Reply #13 on: July 28, 2006, 01:34:05 AM »

$this -> bot -> db ->
just wost need remove bot ->
i place it in bot.php
this is right if placed in raid.php
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Mercbot (RK2) style raid plugin
« Reply #14 on: July 28, 2006, 07:09:59 AM »

If you take my basic module it expects the get_tablename, get_/set_setting functions to be inside the Bot class.

If you put the functions into the raid module you have to modify the calls from $this -> bot -> to just $this ->.
Logged
Pages: [1] 2   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: Mercbot (RK2) style raid plugin
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 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: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 23
Total: 23

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.167 seconds with 28 queries. (Pretty URLs adds 0.034s, 4q)
Loading...