collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: ItemDB Integration to YG Module  (Read 6445 times)

0 Members and 1 Guest are viewing this topic.

Offline Mojoh

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
ItemDB Integration to YG Module
« 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.
« Last Edit: June 16, 2010, 04:09:17 pm by Mojoh »

Offline Mojoh

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: ItemDB Integration to YG Module
« Reply #1 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.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 173
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal