BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Age of Conan Archive => BeBot Hyborian modules => Topic started by: Monk4y on March 03, 2009, 06:23:36 am
-
Hello, I'm trying to create a personal for sale module for our guild that lists the items for sale in a php module.
Ive created a base template but I'm having problems inserting the Age of Conan item reference links. I enter them in a normal text block but they all come out as free text and not the nice blue itemlinks.
This is what im doing, encasing the itemlink in a txt line, I'm guessing this is not the correct way to do this? The blue test is the itemlink btw. Would some kind person please help. Many thanks.
$txt.= "##GI_orange##City Recipes:##end##\n";
$txt.= "<a style="text-decoration:none" href="itemref://131088/131088/5/0:0:0:0/0:0:0:0"><font color=html_link_color>[Test Item Link]</font></a>\n";
$txt.= "Insert Item Crafting Requirements\n";
-
A little bump for help please.
I'd be gratefull if someone could explain how I could do this.
Thankyou :)
-
basicly its because ur useing " which ur useing for the sides of ur string too
there are lots of ways around
put \" for the inside quotes
use ' instead for inver the inside or the outside
-
Temar thanks for your reply.
I followed your instructions and it displayed the link correctly.
However the link did not work, it was not a clickable link.
Is there another way to do this? Can you call the item directly from the item database?
I would be grateful if anyone could help.
Thank you.
-
Are you showing the link inside a blob? If yes, then try using different delimiter for the blob and the itemref, like " in the blob definition and ' in the itemref. I think if you use the same one FC's parser gets confused.
-
Are you showing the link inside a blob? If yes, then try using different delimiter for the blob and the itemref, like " in the blob definition and ' in the itemref. I think if you use the same one FC's parser gets confused.
Hi Alreadythere, you lost me at "Are you".
If you have the time could you give me an example please? This is very new to me.
many thanks.
-
Is the itemref directly shown on the output? Or is it inside a blob (aka popup text window)?
Blobs are created with $bot->core("tools")->make_blob($title, $content).
That function replaces all " with " before showing the $content, as otherwise it would break the parser.
So if you want to show an itemref inside a text window you have to use ' instead of " in the itemref definition.
So your line
$txt.= "<a style="text-decoration:none" href="itemref://131088/131088/5/0:0:0:0/0:0:0:0"><font color=html_link_color>[Test Item Link]</font></a>\n";
should be
$txt.= "<a style='text-decoration:none' href='itemref://131088/131088/5/0:0:0:0/0:0:0:0'><font color=html_link_color>[Test Item Link]</font></a>\n";