BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Alreadythere on January 26, 2006, 11: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 (http://www.m8y.de/ao/bebot/Raid_RAID.phps), 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.
-
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.
-
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?
-
Yes, I've added the following two functions to my Bot class.
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().
-
weare i need to put functiom?
-
Put the two functions in Bot.php, in the Bot class.
-
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.
-
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:
/*
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.
-
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
-
Add the following function right behind the get/set_setting functions
function get_tablename($name)
{
return $name;
}
Should solve that problem.
-
tncx now work ;)
-
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
-
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.
-
$this -> bot -> db ->
just wost need remove bot ->
i place it in bot.php
this is right if placed in raid.php
-
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 ->.
-
hmm i can't get the get(color) to work...
tryed to put it up as _colors.php and just colors.php
but i keep getting error when i start a raid
Fatal error: Call to a member function get() on a non-object in C:\halocom\modules\raid_RAID.php on line 377
377 = $this -> bot -> send_pgroup($this -> bot -> colors -> get("green") . "Raid started: " . $raid[0][1] . " ["
nvm i found it on the forum...
-
Can anyone post up their working Bot.php file for this module?
I canst seem to get this working at all even after all the changes.
-
current bot.php
-
Ok have finally got it working now but does anyone know how to start a raid?
Whenever I do !raidstart
it says to select a valid raid
How to I add raids into the .php file?
Very lost here
-
The version on the web doesn't offer an interface to add raids yet. Only way to add raids is to add them directly in the database.
I'll try to get around and post my up-to-date version which has an admin interface for it.
-
Uploaded my current version to the ftp, just redownload it.
It contains a basic admin interface which handles adding and removing raids.
Commands:
- !raidadmin addraid shortcut points full title adds a new raid. The shortcut is used in raidstart, and has to be unique. Points have to be greater then zero.
- !raidadmin addraid shortcut deletes an existing raid.
-
Bump for a working download link for this module!