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

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

Author Topic: Modified Script Module  (Read 2988 times)

0 Members and 1 Guest are viewing this topic.

Offline Poonjab

  • BeBot User
  • **
  • Posts: 59
  • Karma: +0/-0
Modified Script Module
« 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.

Offline Angelux

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Modified Script Module
« Reply #1 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!

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Modified Script Module
« Reply #2 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.

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


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


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 674
  • 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