BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Module Requests => Topic started by: Poonjab on November 21, 2009, 12:26:21 am

Title: Modified Script Module
Post by: Poonjab on November 21, 2009, 12:26:21 am
So I'd like to see a modification done to the scripts module (found here: http://bebot.link/index.php/topic,1487.0.html) so that the output of the result was more customizable.

So instead of the bot saying back "Scripts::click to view" it would actually spit back the proper title of link like you would get if you executed an ingame (AoC) script, like the following script would spit back a clickable link that said actually said "Battlekeep Info"

Code: [Select]
<a href = "text://<FONT COLOR='#EA0000'>blah blah blah</FONT><br>">Battlekeep Info</a>
Is there a module already around that will do this, or could the scripts or guides module be easily changed to do something like that?  It just seems like it would be more informative to people to have it output that way.

I know next to nothing in the way of writing php, so I'm lost there, but I am starting to figure out how to write these useful little scripts for ingame info that I would like to start making available through the bot.

Thanks.
Title: Re: Modified Script Module
Post by: Angelux on May 17, 2010, 06:00:08 am
Sorry for the post necro-ing, but I would also like to know how to do this...

Looked everywhere, and could find it.

Hopefully someone knows!

Thanks!
Title: Re: Modified Script Module
Post by: Kyr on May 17, 2010, 08:17:44 am
This is a repost from:
http://bebot.link/aoc-0-6-support/scripts-to-module/

Here is a new version of the scripts module that allows for the use of special fonts and colors in links as well as text before and after the link.
Your old script files will continue working without any modification.

I have included a sample version 2 for you to review.

add this line to your scripts.lst file for easy clicking
Code: [Select]
<a href='chatcmd:///tell <botname> <pre>script epic_raid_drops'>Epic Raid Drops</a> - <a href='chatcmd:///gu <pre>script epic_raid_drops'>show guild</a><br>
Here is how to create version 2 script files. 
script must start exactly with the text:
//-- script ver 2 --//
If the script file doesn't start with that the module will read it as the old format and that won't work.
 
Lines can start with these tags (always 8 characters):
BEFOREH-
HLINK---
AFTERH--
SPECIAL-
BODY----

The special tag is for adding text to the a tag that isn't the href i.e. <a href='blah' SPECIAL->click here</a>

The only thing I need that for so far is:
style='text-decoration:none'  (this allows non-default color and font to be used on links)

There can only be one of each.  The order of the tags is not significant, but I suggest the body tag always come last.
SimplePortal 2.3.7 © 2008-2024, SimplePortal