|
iodem Newbie
Joined: 18 Oct 2000 Posts: 9 Location: USA
|
Posted: Sat Apr 06, 2002 5:48 pm
script priority |
This is the deal.. got a zone with about 5 different types of mobiles. For example peasants, commoners, knights, lords, guards.
Now the problem is I have to attack the guards first, then lords, then knights.. etc.. because they assist those below them. Right now, I have it setup so when you walk into the room you set the mob in a variable "moblist", then wait, and if the variable "target" is still null then add it to "target" and kill it. The only mobile i dont have a wait statement for is the guards because I wanted those killed first.. then I have a scaling wait time for each of the other mobs. Here's a small example..
Pattern is the mobs room descr.. this is the command:
moblist=%additem( "child", @moblist)
#ti off
#wait 300
#if {@target=null} {
#var target child
k child
}
But since I have these waits in I have to add a wait to my promptmove trigger also.. which slows me down in rooms with no
mobiles at all.
Pattern is my prompt.. command is this:
#t- promptmove
#t+ exitmove
#wait 300
#if {@moblist=null} {#step}
I'd like to find a quicker way to do this... if anyone has any ideas or suggestions let me know.. I am willing to
change my whole way of setting up a moblist etc.. if someone has a better/quicker idea. Thanks.
Iodem |
|
|
|
heidi Newbie
Joined: 04 May 2002 Posts: 1
|
Posted: Sat Apr 06, 2002 10:57 pm |
How about instead of this approach you do something a bit different. Create a moblist that is in the order that you want to fight things. e.g.:
#Var Mobs {Guards|Lords|Knights|Commoners|Peasants}
Then, the triggers you use to populate the mob list would turn on the AutoKill class that has this trigger:
#Trigger {-Prompt-} {#Class AutoKill 0;#Temp {-You have killed the enemy prompt-} {#Class AutoKill 1};#Var InKill 0;#forall @moblist {#If @InKill {} {#If %ismember(%i,@moblist) {kill %i;#Var MobList %delitem(%i,@moblist);#var InKill 1}}}} "AutoKill"
Naturally you need to make the trigger prompts match what your mud actually sends.
El_Dickman |
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Tue Apr 30, 2002 7:39 am |
Put all the mobs in a list, start killing when you reach the prompt and then watch for each 'death pattern' before killing the next mob. I never use the #wait command, and up to now I only use the #alarm command to escape idle timeouts.
|
|
|
|
Sildaren Wanderer
Joined: 19 Jul 2001 Posts: 59 Location: Germany
|
Posted: Tue Apr 30, 2002 11:44 am |
For details, why you should avoid using #WAIT whereever possible read http://www.zuggsoft.com/zmud/timers.htm
Especially having several triggers active with each of them containing a #WAIT, can have nasty side effects. |
|
|
|
|
|