BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => AO 0.6.x Custom/Unofficial modules => Topic started by: Nogoal on August 19, 2009, 04:39:50 pm
-
Most recent version I could find was for 0.4 and axp calculation seemed wrong to me.
So I updated it to work with 0.6, corrected AI calc and added LE research.
Xp.phps (http://aotn.binarywastes.net/Xp.phps)
-
Nice one.
Just for reference, the command handling would benefit from being upgraded too when upgrading modules from 0.4
/*
Unified message handler
$source: The originating player
$msg: The actual message, including command prefix and all
$type: The channel the message arrived from. This can be either "tell", "pgmsg" or "gc"
*/
function command_handler($source, $msg, $origin)
{
//ALWAYS reset the error handler before parsing the commands to prevent stale errors from giving false reports
$this->error->reset();
//The default is to split the command to com, sub and args. If you want to split it some other way change the pattern for it
//parse_com() returns an array where the pattern is the keys and the values are split out from $msg
$com = $this->parse_com($msg, array('com', 'sub', 'args'));
$command = $vars[0];
switch($com['com'])
{
case 'command1':
return($this -> somefunction($name, $com));
break;
case 'command2':
return($this -> someotherfunction($name, $com));
default:
// Just a safety net to allow you to catch errors where a module has registered a command, but fails to actually do anything about it
$this -> error -> set("Broken plugin, recieved unhandled command: $command");
return($this->error->message());
}
}
-
Updated
-
Is this mod still working and wtb install / usage instructions.
-
Is this mod still working and wtb install / usage instructions.
1. Download the Xp.phps from the 1st posting and save it in your "bot/custom/modules" folder.
2. Rename it to Xp.php
3. restart your bot
/tell <yourbot> !help xp
/tell <yourbot> !help axp
/tell <yourbot> !help lexp
:)
Shelly
-
Loaded fine without any errors, but it doesnt work, all i get is: xp does not exist or you do not have access to it.
-
check your "/tell <yourbot> !commands and look for the Xp. Set the access to member or guest... It is probably set too high.
-
Hmmm its not on the list.
-
Did you rename Xp.phps to Xp.php and place it in your <bothome>/custom/modules folder?
Does not seem like it is even loading.
Try "/tell <yourbot> modules" and see if Xp is listed. If it is not there, then it is not loading. You might have a corrupted module or something like that.
Might want to capture and post the startup spam from your bot and post it here... unless the first statement fixes your problem... :)
-
Yes i have correctly renamed it and it shows on modules list, so no idea whats wrong with it.
-
All my bots still use that module from 2009 without any problem.
Are you sure you don't have another (broken) module registering the same commands? Did you try !lexp ?
-
I dont have any other mods installed besides alien waves counter and aigen and !lexp just returns /tell mybot !help.
-
do "/tell <yourbot> !commands" from whatever toon is registered as the bot owner and see if you see:
!axp: [ AN | G | M | L | A | SA | O | D ]
!lexp: [ AN | G | M | L | A | SA | O | D ]
!xp: [ AN | G | M | L | A | SA | O | D ]
You will need to check for the different channels. If these are not there, then your database has not been updated with the commands. and thus they will not work.
-
Alrighty, checked every channel and none of them lists any of those commands, how do i add them to my (Mysql 5 i think and have access to phpmyadmin and running on Linux if that makes any difference) db?
-
I solved the problem, the download of this mod got corrupted, so after re-download, its working perfectly.
-
I solved the problem, the download of this mod got corrupted, so after re-download, its working perfectly.
Great to hear Wagu. Glad you got it working. :)
Shelly