Archive > 0.2.x Custom/Unofficial Modules

Mercbot (RK2) style raid plugin

(1/5) > >>

Alreadythere:
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.

Alreadythere:
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.

stonybg:
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?

Alreadythere:
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 . "'");
}
--- End code ---

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().

stonybg:
weare i need to put functiom?

Navigation

[0] Message Index

[#] Next page

Go to full version