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
Pats_mays
Newbie


Joined: 18 May 2004
Posts: 2
Location: United Kingdom

PostPosted: Tue May 18, 2004 1:12 pm   

Help with a reasonably complicated script
 
Hi, Im trying to setup a script, but keep failing miserably, I wonder if anybody here could give me a few pointers? :D


Basically, I need it to keep traveling in a set pattern, and kill any NPC's on the way, so it would go:
e,e,e,e,e
n
w,w,w,w,w
n
e,e,e,e,e
n
w,w,w,w,w
and so on...

If a predefined NPC (or npcs) is in a room it would stop the movement pattern attack the npc(s) bury the corpse(s) and then continue with the movement pattern.

say for instance there were 4 warriors in one of the rooms, it would attack the warriors, recieve the four death messages, you killed the warrior or x killed the warrior and then, when they are all deaded - bury the corpses

It would be great if anybody could help :)

Many thanks,
Reply with quote
hykou
Wanderer


Joined: 29 Apr 2004
Posts: 63
Location: USA

PostPosted: Wed May 19, 2004 5:14 pm   
 
you could record an alias to go in the directions, and make a trigger to attack the npc, bury the corpse, look, attack the next, and so on... then it goes into the next room
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 19, 2004 7:41 pm   
 
#VAR Path {e|e|e|e|e|n|w|w|w|w|w|n}
#VAR Next 0
#TR {death message} {kill warrior}
#TR {no warrior here} {kill thief}
#TR {no thief here} {bury all corpse;#IF (@Next < 12) {#ADD Next 1} {#VAR Next 1};%item( @Path, @Next);kill warrior}

This will kill all the warriors in the room. When there aren't any more, it will kill thieves. When all the thieves are gone, it will bury the corpses and move to the next room and start killing warriors again. It probably won't work without modification as there is very little chance that all the patterns and commands will be correct for your MUD.
Reply with quote
Pats_mays
Newbie


Joined: 18 May 2004
Posts: 2
Location: United Kingdom

PostPosted: Thu May 20, 2004 10:33 pm   
 
thanks! i kinda worked it out my self in the end! doh! I set up a path, then i set up a totalNPCs variable, and a deadNPCS variable, when deadNPCS (triggered from the death message) was equal to totalNPCS from the initial look it buried the corpses and trigger the #step command, very handy!

*Hugs #step and #move commands*

Thanks all!
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