Forums » General

Writing Scripts

Jul 30, 2003 igrok link
I'm looking to get started writing some decent scripts for Vendetta, but I need some help. I took a look at the script that BusMasteR recently updated, which was very helpful for getting the script started.

Where I get into trouble is when I want to write a fully-featured script such as the one running BountyBot. If [player] writes /msg [mybot] "hi there", my script can read error.log and pick up the activity. However, I can't figure out how my script writes /msg [player] "Nice to meet you." Can anyone give me some tips here?

For my first project (once I resolve this issue), I'm going to have a crack at writing a script that will pilot your ship to any arbitrary position in a sector. That way you can write /displayshippos when you are at the wormhole to s18 and then return to that point any time you want to. It will be a rudimentary sort of beacon system :)
Jul 30, 2003 HumpyThePenguin link
sounds snazzy!
Hope you can get it to work....Im only familiar with aliasses
Jul 30, 2003 Phaserlight link
Who wrote BountyBot anyway? I'd like to shake their hand. (I'd also like to know how to place a bounty :P)
Jul 30, 2003 Suicidal Lemming link
bountybot emulates fake keypresses.
Jul 30, 2003 The Kid link
asphy did a nice job with an IRC chat bot before... maybe ask him.
Jul 31, 2003 asphyxia link
I managed to get it running by passing fake X-Events to the vendetta window (e.g. the bot actually pulls down the console and starts typing in the window, followed by hitting the enter key).

IRC bot was written in perl and, ottomh, used the X11:SendEvent perl module to pass events to the VD window. I dont know who developed bountybot, but i THINK it was done the same way. Remember to employ a basic mutex around your writeback function, otherwise your bot will start to suffer from crosstalk =)

If you want a place to go for advice and help, try the programming forum on www.roguelazer.com. There's some exceptional talent there!

hth

asphy
Jul 31, 2003 igrok link
Thanks for the tips, I'll keep everyone posted on my progress.