Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
ejohnisee
Newbie


Joined: 14 Jul 2005
Posts: 1

PostPosted: Thu Jul 14, 2005 6:30 am   

Automove Script
 
Hi there. I'm attempting to setup a script that will move throughout a zone while this class is active. This script will be used in conjunction with another that sends a kill command when a certain mob is in the occupied room.

I've used the following to move at random:

#var DirList {n|e|s|w|ne|se|sw|nw|u|d}
#alias amove {%item(@DirList,%random(1, 10))}

This seems to move it perfectly when I run the alias. My problem is that I can't seem to figure out what to trigger it on. I tried triggering it upon the death of a mob, but since several kill triggers are sent if there's multiple mobs in a room, there's the possibility of leaving my group behind if they're still fighting when I move. Also, if this moves into a room with no mob, it halts since there's no mob death to spur it on.

Anyone have any ideas?

Thanks,
Eric
Reply with quote
Maelstrom
Apprentice


Joined: 10 Feb 2005
Posts: 158

PostPosted: Thu Jul 14, 2005 7:44 pm   
 
I do. I use such a beast myself. You have to set up something close to a state machine to get it to work properly.

You'll need to trigger on three items:
Room name
Mob
Prompt (with hopefully HP information)

Also you'll need to have a variable called MobTarget (or anything similar)
and a variable called Moving.

Now things are going to get a little tricky

==========

Clear MobTarget variable, set Moving to 1, and move a random direction.

1> When you trigger on the roomname set Moving to 0
2> When the trigger on a mob populate MobTarget with mobs name.
3> When you see the prompt make a decision on what to do.

a> if Moving = 1 and you get a prompt trigger: ignore because move isnt finished
b> if Moving = 0 and MobName is not blank and you have HPs: send command to kill mob
c> if Moving = 0 and MobName is not blank and you have low HPs: set MobName to nothing and set a timer to get another prompt in X number of seconds to try again
d> if Moving = 0 and MobName is blank: room is empty so set Moving to 1 and send another move direction


This arrangement has several advantages but its hard to implement properly. If you have multiple mobs in a room it will try and kill the last one. If you are low on hps it will not kill anything but after some timers (when you do get enough) you will move to another room. This is easier than tracking if mobs come and go while you are waiting. It took me quite awile to set mine up so I wish you luck...
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net