|
Gazzy123 Newbie
Joined: 01 Oct 2004 Posts: 4
|
Posted: Fri Oct 01, 2004 10:43 pm
Zmud 5.55 and alias |
Having problems with one of my areaalias,
havde the dirs in a list="n|w|n" etc
then doing a
#forall @list {%i;killmobs}
where the killmobs do:
#while (@mobs != 0) {k mobname;#add mobs -1)
and I got the @mobs read in on entering a room (with triggers)
Now I have problems combining the first with the killmobs alias... It runs all dirs and then nothing... it doesn't w8 for @mobs to be filled with a numeric value.. and it dont run the killmobs alias..
is there someway to do this...:
Enter room
Store data in @mobs
execute killmobs
continue to the next dir in the alias.
Would be grateful for any help. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Oct 02, 2004 11:40 am |
Right now your doing:
Enter room;execute killmobs
Enter room;execute killmobs
Enter room;execute killmobs
Store data in @mobs
Store data in @mobs
Store data in @mobs
Obviously your script needs more triggers to time things properly. What you are looking to make is a simple autokill bot, and even the simplest bots aren't that simple. We probably won't be all that much help to you, because such scripts are complex requiring lots of debugging and you are using an older version of zMud.
First step to making such a script is to think how you do it manually.
Code: |
Send direction
Watch room info...
react to mobs by remembering them
see end of room info indicator
Repeat:
send kill of mob you remeber and want dead
watch for mob to die
Determine if you killed all of your targets
Either by rechecking room info
Or by memory
Or by message like 'that is not here'
Go back to send direction |
Your method might vary somewhat, but basically that is how everyone does it manually, the script has to take the same steps unless you find some that can be removed in your case. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Gazzy123 Newbie
Joined: 01 Oct 2004 Posts: 4
|
Posted: Sat Oct 02, 2004 12:01 pm |
The thing is that I want it to be more aliases than triggers.
Like in the beginning of the area I type "runbot"
and then it starts the #slow .nnwd (example)
I already got a trigger that gets all mobs from the room and store them in the @mobs.
#trigger {^a mob stands here} {#add mobs 1}
I have problems doing the pause and such, cause I dont want to do a "Kill mobname" after each mobpattern, I want it to kill all the mobs at the end of the mobread.
I figured that using my prompt as a trigger that will exec the kills and then after the killalias has been executed it will #step again...
#alias killallmobs {#while (@mobs != 0) {kill mob;#add mobs -1}
#trigger {^~(%dhp~~|%dmana~%d|%dmove~)} {#pause;killallmobs;#ok;#step}
But when I run it it messes up.. running round not doing the thing.
But as I said I dont want a trigger that #pauses;kill mob everytime a pattern is found for the mob.
Want as minimum trigger that it can be and I also read about it can read commands from a textfile and execute them 1 by 1 so at it would be as doing it manually. Perhaps that can be the thing if this cant work.
This thing is driving me nuts. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Thu Oct 07, 2004 5:57 pm |
With just a modification to your original method, you can get it to work alright:
#alias runbot {#var RoomCount 0;#add RoomCount 1;%item(@list,@RoomCount)}
#trigger {^a mob stands here} {#add mobs 1}
#trigger {^~(%dhp~~|%dmana~%d|%dmove~)} {#if @mobs {#loop @mobs {kill mob}};#var mobs 0;#add RoomCount 1;%item(@list,@RoomCount)} |
|
|
|
Gazzy123 Newbie
Joined: 01 Oct 2004 Posts: 4
|
Posted: Thu Oct 07, 2004 9:43 pm |
I tried that midifications and it worked well for like 2-3 rooms then it messed up... spamming dirs and such.
:/ |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Oct 08, 2004 10:57 pm |
Quote: |
The thing is that I want it to be more aliases than triggers. |
Any successful bot will probably rely far more on triggers than on aliases. I suggest you start over using the outline Vijilante provided.
You should probably also upgrade to the current version. Version 7.05 contains many additional commands and functions since version 5.55 and many of the commands which do exist in both versions have expanded uses in version 7.05. This makes it quite likely that people will suggest doing things which won't work in your version. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
|
|