|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Mon Nov 27, 2006 8:36 pm
I need help with a bot script. |
Ok, here goes...
What I'm looking for is a bot script to level my spells on phoenixmud, here's what I'm looking to do, and here is the output from the mud:
I need to practice the spells - bless, armor, cure light and pixie dust. The syntax to cast is cast 'spell name'
When you cast any given spell (lets use pixie dust) this is what will be in the output
128/128H 107/332M 184/184V -1000A 10474G -24184X > You start chanting...
128/128H 48/332M 184/184V -1000A 10474G -24184X >
Casting: pixie dust*****
128/128H 48/332M 184/184V -1000A 10474G -24184X >
Casting: pixie dust****
128/128H 48/332M 184/184V -1000A 10474G -24184X >
Casting: pixie dust***
128/128H 48/332M 184/184V -1000A 10474G -24184X >
Casting: pixie dust**
128/128H 48/332M 184/184V -1000A 10474G -24184X >
Casting: pixie dust*
128/128H 48/332M 184/184V -1000A 10474G -24184X >
You complete your spell...
On this mud you often get a message saying Your knowledge of (spell) increases!
When this happens, you can not increase that spell further untill you've recieved the same message about another spell. Hence, once I recieve that message, I want to move on to another spell.
Also, when the spell is ready to be practiced you will get this message You must visit your guild master to learn more about (spell) At this point I need to walk to the guild master, and practice the spell by typing practice (spell name) The directions to the guild master from the room I'm casting in are three south, two west, one north, one east. I would then like to walk back to the room I was casting in.
Also, you will sometimes recieve this message Your loss of concentration stuns you momentarily! After that I'd like to recast the spell I was attempting to cast, or if I had gotten a message telling me either my knowledge of the spell increased or to visit the guild master I would like to cast a different spell or visit the guild master.
The last problem I run into is this, when I run out of mana I get this prompt: You haven't the energy to cast that spell! When that happens I would like to sleep for 80 seconds, then wake and resume the spell I was casting
If anyone could help me out with this I would really appreciate it, thank you in advance.
Ronnie |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Nov 28, 2006 2:24 am |
Seems relatively simple. I will pretty much write this off the top of my head so there may be mistakes and what not.
#CLASS {SpellsBot}
#VARIABLE SpellsListMaster {bless|armor|cure light|pixie dust}
#VARIABLE SpellsWorking {}
#ALIAS SpellBot {#IF (%trigger(SpellsBotTrigs)) {#T- SpellsBotTrigs} {#T+ SpellsBotTrigs;SpellsWorking=@SpellsListMaster;cast '%item(@SpellsWorking,1)'}}
#ALIAS WalkToTrainer {.3s2wne}
#ALIAS WalkFromTrainer {.ws2e3n}
#CLASS 0
#CLASS {SpellsBot|SpellsBotTrigs}
#TRIGGER {^{You complete your spell...|Your loss of concentration stuns you momentarily!}$} {#ALARM {+.2} {#IF (@SpellsWorking) {cast '%item(@SpellsWorking,1)'}}}
#TRIGGER {^Your knowledge of {@SpellsWorking} increases!$} {#ADDITEM SpellsWorking {%pop(SpellsWorking)}
#TRIGGER {You must visit your guild master to learn more about ({@SpellsWorking})} {#DELITEM SpellsWorking {%1};#IF (@SpellsWorking="") {WalkToTrainer}}
#TRIGGER {^Something that says arrived at trainer} {#FORALL @SpellsListMaster {practice %i};SpellsWorking=@SpellsListMaster;#ALARM {+1} {WalkFromTrainer}}
#TRIGGER {^Something that says arrived at practice room} {cast '%item(@SpellsWorking,1)}
#TRIGGER {^You haven't the energy to cast that spell!$} {sleep;#ALARM {+80} {wake;cast '%item(@SpellsWorking,1)'}}
#CLASS 0
#T- SpellsBotTrigs
There seems to be a few items of information you were missing, look for the bold texts and fill in that stuff and it should be pretty close to what you wanted. Also there were some things I didn't know like whether practicing spells caused a delay, sending too many directions at once could cause problems, and probably a few other things might be issues. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums
Last edited by Vijilante on Tue Nov 28, 2006 10:05 pm; edited 2 times in total |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Tue Nov 28, 2006 6:28 pm |
Thank you very much. And yes, there are delays when spells are cast, it's probably about a 5 second delay, don't know how much of a difference that'll make, but I really don't know anything about writing triggers. Also, for arriving at trainer and arriving at the practice room: The trainer is in the training room, so could I just put the line for that mob in there, and there is a candleabra (spelling) in the practice room, so I'd figure if I could use the trainer in the other, I should be able to use that to mark the practice room.
Any other suggestions for what you think would make this work better would be appreciated, as I said, I'm completly new to this, and I've never run bots before. The MUD I play doesn't allow boting unless you're at the keyboard anyway, so I'll be able to catch any problems since I'll be right there watching. Also, I don't know where to put this script at in zmud, so if you could let me know that I'd appreciate it, I think I can figure it out, and I'll try, but we'll see how that goes :-P
Thanks again
Ronnie |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Tue Nov 28, 2006 6:37 pm |
Alright, again like I said thanks. I really don't know how to get this to start, or where to put the script :-P I'm a complete noob with this, and I know absolutley nothing about scripting. So if you could help me figure this out, then point me in the direction of a good place to learn scripting it would be awsome.
Thank you
Ronnie |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Nov 28, 2006 7:39 pm |
First just copy all of it, then paste it into the command line and hit enter. I made one minor change at the time of this post. Next find the settings in the Settings Editor and paste in the correct texts for the portions I have bolded in the post. Finally you can activate and deactivate the bot by typing 'SpellBot' at the command line. It expects to start in your spell room.
As for learning I would suggest reading the Getting Started section of the help, then looking up everything used in the script in the Reference section of the help. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Tue Nov 28, 2006 9:17 pm |
Alright, this is what I have, and it doesn't work, I also get a syntax error: #ALIAS SpellBot {{{{#IF}}}
Which I got more {'s both times I edited the training room and the practice room. Can't figure out why it isn't working, so just let me know if you've got any info, and thanks for the advice about learning.
Ronnie
#CLASS {SpellsBot}
#ALIAS SpellBot {{{{#IF}}}
#ALIAS WalkToTrainer {.3s2wne}
#ALIAS WalkFromTrainer {.ws2e3n}
#VAR SpellsListMaster {bless|armor|cure light|pixie dust}
#VAR SpellsWorking {}
#CLASS 0
#CLASS {SpellsBot|SpellsBotTrigs}
#TRIGGER {^{You complete your spell...|Your loss of concentration stuns you momentarily!}$} {#ALARM {+.2} {#IF (@SpellsWorking) {cast '%item(@SpellsWorking,1)'}}}
#TRIGGER {^Your knowledge of {@SpellsWorking} increases!$} {{{{#ADDITEM}}}
#TRIGGER {You must visit your guild master to learn more about ({@SpellsWorking})} {#DELITEM SpellsWorking {%1};#IF (@SpellsWorking="") {WalkToTrainer}}
#TRIGGER {^The Cleric Guildmaster stands before you.} {#FORALL @SpellsListMaster {practice %i};SpellsWorking=@SpellsListMaster;#ALARM {+1} {WalkFromTrainer}}
#TRIGGER {^A candelabra glows dimly with a golden light.} {cast '%item(@SpellsWorking,1)}
#TRIGGER {^You haven't the energy to cast that spell!$} {sleep;#ALARM {+80} {wake;cast '%item(@SpellsWorking,1)'}}
#CLASS 0 |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Tue Nov 28, 2006 9:20 pm |
Ok, I got it to run, now I'm going to see if there are any errors. Thanks again.
Ronnie |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Tue Nov 28, 2006 9:26 pm |
Alright, a few errors so far: When a spell doesn't fire correctly, as in I lose concentration, it doesn't restart spell casting. When I get this message: Your knowledge of bless increases! I keep casting the same spell. And when I run out of energy I don't go to sleep :-P
So that's what's going on with it, if you know what my problem is then let me know.
Thanks much
Ronnie |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Nov 28, 2006 10:08 pm |
I doubt there is much more I can actually help with in terms of getting it working. Script wise there is nothing wrong with it based on the information you have provided. I found the flaw that caused the SpellBot alias to import incorrectly and corrected that in my original post. Best thing I can tell you to do is tweak around with it, and if you cause any major problems then you can always delete the class it is in and reimport it.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
darkantes Newbie
Joined: 27 Nov 2006 Posts: 7
|
Posted: Wed Nov 29, 2006 4:17 am |
Alright, thanks for your help.
Ronnie |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|