BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6.x Custom/Unofficial modules => Topic started by: Mojoh on June 16, 2010, 03:51:24 pm

Title: ItemDB Integration to YG Module
Post by: Mojoh on June 16, 2010, 03:51:24 pm
I was writing a module to allow the !yg module to display a linkable armor/weapon display using Getrix's ItemDB registry.  I am stuck after attempting to call the !items command to display the actual itemref.....

Here is what I have so far
-this is taken from yg.php line 116

for($i=0; $i<=16; $i=$i+1) {
if ($xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname)
$blobname .= "##seagreen##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname."##end## ::
{
$origin = False;
$name = this -> bot -> botname;
$msg = $xmlobj->aocygplayerprofile->equipment->slot[$i]->itemname;
$this->bot->core('items')->command_handler($name, $msg, $origin);
}
."<a style='text-decoration:none' href='itemref://".$output."]</font></a>";

Am I that far off? 
It comes back with an error saying
"Parse error: syntax err, unexpected T_STRING in C:\Bebot\xxxxxx\ygfilename.php on line 125"
-------------------
I must be displaying the function incorrectly, or do I need to call the search function, then call the item function to display the actual itemref location? 


Any help would be appriciated.
Title: Re: ItemDB Integration to YG Module
Post by: Mojoh on June 16, 2010, 05:27:51 pm
I've updated my problems..... The bot will now load, however I am still recieveing an error while viewing/running the YG Updater...  Either ItemDB is not gathering the required information or I have not listed it properly.  Before I can figure out if it will display the end result, I will have to wait until I can insert the search query properly.

Here is a list of the new error.


My new code is as follows from line 117-125:

/these lines are original from code
for($i=0; $i<=16; $i=$i+1)
{
if ($xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname)

/added variable to give the botname, then the item name that is current in this array (maybe this is incorrect?)
$name = $this->bot->botname;
$msg = $xmlobj->aocygplayerprofile->equipment->slot[$i]->itemname;

/call the routine to query the database
$this->bot->core('items')->command_handler($name, $msg, $origin);

/post the form data inserted with the original text
$blobname .= "##seagreen##".$xmlobj->aocygplayerprofile->equipment->slot[$i]->slotname."##end## ::<a style='text-decoration:none' href='itemref://".$output."##end##\n";

}

////  This is me sending the command to !yg myself
<botname> [GROUP]       [MSG]   [<guild>s] <playername>: !yg <playername>
<botname> [ERROR]       [Items_Core]    Undefined function command_handler(<bot name>
, ::object::, )!
<botname> [ERROR]       [Items_Core]    Undefined function command_handler(<bot name>
, ::object::, )!
<botname> [ERROR]       [Items_Core]    Undefined function command_handler(<bot name>
, ::object::, )!
<botname> [ERROR]       [Items_Core]    Undefined function command_handler(<bot name>
, ::object::, )!

... this error continues for each piece of eq, then stops without an exit code.
SimplePortal 2.3.7 © 2008-2024, SimplePortal