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: Script module  (Read 23250 times)

0 Members and 1 Guest are viewing this topic.

Offline kelmino

  • BeBot User
  • **
  • Posts: 50
  • Karma: +0/-0
Script module
« on: August 07, 2008, 01:17:51 am »
This is a module to display scripts in guild chat or via tells.

This mod is just a modified copy of the guides script located here
http://bebot.link/aoc-modules/ported-modules/

from the readme included with the files

Quote
Extract both folders to your BeBot Hyborian folder.

The script folder is where you place your scripts at.

Each script must be in .txt format.

I included 2 example scripts as well as an example script list in a
folder called "Example scripts" in the script folder so you can see the
format that it needs to be in.  This also gives a few examples as to what it can be used for.

***tips***

1 - In order to keep your scripts looking nice I suggest opening them up in wordpad if you use windows.
Opening them up in wordpad will keep the formatting.  If you open them in the default notepad the
formatting does not stay, and it will look like a jumbled mess once you close them out.  You can set
it so wordpad opens .txt files by default so you don't forget when editing scripts. 
To do this right click on any .txt file. 
Go to open with. 
go to Choose Program. 
Choose Wordpad. 
check the box that says to "Always use this program to open this kind of file". 
That way wordpad will always open when you edit your scripts.

2 - Setting up Comalias
I have comalias set up for my scripts, an example of one I have is so people can now type !kos instead
of !script kos to get a list of our guild's diplomacy list.  !crafters would replace !script crafters.

To set these up you would type !comalias add <alias> <command>
from the examples I used above..
!comalias add kos script kos
!xomalias add crafters script crafters
remember if you forget a command type !help comalias for all the comalias commands

If you have any questions feel free to ask away, But don't count on me adding features since I know nothing about writing modules, and just edited the original guides.php for my liking.



Offline Veloraptor

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Script module
« Reply #1 on: August 07, 2008, 12:49:40 pm »
this works great, thx for the hard work both of u  :o ;)

iam sure people will see this as a major improvement ontop of the bot, being able to use scripts from aoc, so people like me who dont got a clue about php is ackly still able to create custom scripts for the bot.

u should consider uploading this addition on http://aoc.curse.com/
or atleast bebot should make some kind of "news" at cursed for the bot, it works great ;) (got v5.2 working after some problems with php... "got the php from php.net insted of the php packet which turned out to be a bunch of errors")

oh well keep up the great work guys :)

Offline jimango

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: Script module
« Reply #2 on: February 15, 2009, 10:09:35 am »
Is this mod possible to use in 6.x version?
If so, how do i install it?



jim

Offline xdave78

  • BeBot User
  • **
  • Posts: 26
  • Karma: +0/-0
Re: Script module
« Reply #3 on: February 15, 2009, 10:54:05 am »
Yes it works.
Just pit the SCripts Folder in your BeBot root an the scripts.php into /custom/modues
Then take a script in .txt fileform an put it into the Scripts folder - eg one of the examples.
Restart bot and call a script with !scripts scriptname.
If you dont want to always have to write the whole thing use comalias as described above.



Offline jimango

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: Script module
« Reply #4 on: February 15, 2009, 11:23:54 am »
This i have done, but still it doesnt find the scripts i put in, not even the examples scripts that i moved from the example folder to the script folder (thats now in root)

is there any thing i need to do to activate the scripts other then !restart?


jim

Offline Wizhk

  • BeBot Apprentice
  • ***
  • Posts: 85
  • Karma: +0/-0
Re: Script module
« Reply #5 on: February 15, 2009, 11:39:37 am »
Did you do !script <name of script>?

Wizhk

Offline jimango

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: Script module
« Reply #6 on: February 15, 2009, 11:45:10 am »
i tried the following commands:

!script kos.txt
!scripts kos.txt

!script kos
!scripts kos

"kos" is the example script that i moved up one folder to the Scripts folder thats now in root bot folder

all i get is the default message that it cant find script..

when i try to get list of scripts it do not find anything...

the files are like this:
/bebot/Scripts/kos.txt
/bebot/custom/modules/scripts.php



« Last Edit: February 15, 2009, 11:49:36 am by jimango »

Offline xdave78

  • BeBot User
  • **
  • Posts: 26
  • Karma: +0/-0
Re: Script module
« Reply #7 on: February 15, 2009, 12:20:52 pm »
did you restart the bot?

Offline jimango

  • BeBot User
  • **
  • Posts: 36
  • Karma: +0/-0
Re: Script module
« Reply #8 on: February 15, 2009, 12:34:33 pm »
yes, i did, but that did not help..

i did change the capital "S" in Scripts folder to small "s"
that seemed to do the trick ;)


Offline Sabcoll

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Script module
« Reply #9 on: March 10, 2009, 11:33:19 am »
Is it possible to make it post the script in global chat?
I would appreciate that :-)

I mean ... i want to type, for example

/tell mybotsname !script gilde

and my Bot posts the specified script into the global chat!
« Last Edit: March 10, 2009, 11:58:06 am by Sabcoll »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Script module
« Reply #10 on: March 10, 2009, 03:49:02 pm »
Bots should never put any output to a public channel. That's the fastest way to get a bot banned. It's one of the few ponts FC doesn't tolerate. In AO there have been instances of spamming by bots, which annoyed too many players.

Offline Sabcoll

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Script module
« Reply #11 on: March 10, 2009, 06:27:11 pm »
Well i dont want the Bot to spam the channels,
i simply want to enter
!scripts --> klick on one of my scripts --> it gets postet in a channel i told the bot in the script or anywhere else ...

For example: !scripts -> i klick on one of my scripts --> it gets postet in grp channel (or raid channel, or guild channel or EVEN public channel)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Script module
« Reply #12 on: March 10, 2009, 07:24:18 pm »
Let me clarify my point a bit:

Any function to offer easy posting on public channels can be exploited for spamming. And FC may decide not only to ban the account on which the spamming bot is on, but forbid all chatbots. Sure, this is a worst case scenario, but strictly going by the EULA even chatbots are forbidden.

For this simple reason I won't ever put any function to output chat to public channels into any bebot release. Even if it's basically a simple extension of AOChat.php, at least with some knowledge of the chat protocol.

This is in no way pointed at you, it's about the potential.

Offline Monk4y

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: Script module
« Reply #13 on: July 15, 2009, 01:09:59 pm »
are there any plans to update this module for the new bebote release, I seem to be getting lots of errors while using it in its current state.

thanks

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Script module
« Reply #14 on: October 14, 2009, 10:19:17 pm »
here's a script I made for how to get keyed for BRC.  enjoy!

 

* 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: 466
  • 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