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
chris74269
Novice


Joined: 26 Mar 2003
Posts: 40

PostPosted: Sat May 31, 2003 6:31 pm   

tellign if a trigger isnt fired
 
i have a trigger that goes off whenever a mob is killed to walk to the next room and look for the mob im trying to kill, so if it says Soldier is not here. I take the exits, pick a random one, and it goes, then it looks for 'A Soldier.', problem is, if it doesnt see A Soldier it won't move on to the next room. so is there a way that i can make a trigger check if it sees the mob in the room, if it does, attack it, if it doesn't, move on. and i dont want to make it so i attack everything, if i get an error like You don't see that here, itll move on because ill end up stealing kills that way.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat May 31, 2003 6:51 pm   
 
Have the trigger that fires on "A Soldier" set a variable to 1 indicating that there is in fact a soldier in the room. Then, have anothe trigger that fires on something that you know comes after the list of mobs in the room, like the prompt for example. Have this trigger check to see if the variable is set to 1, if it is, then there is a soldier in the room, kill it and reset the variable, if it isn't then there is no soldier, so move on.

Kjata
Reply with quote
chris74269
Novice


Joined: 26 Mar 2003
Posts: 40

PostPosted: Sun Jun 01, 2003 5:03 pm   
 
#var present 0
%item( @available, %random( 1, 5))
#IF (present = 1) {%null} {%item( @available, %random( 1, 5))}
is the trigger im using, available is the direction si can go. this is what i need to know though, how can i make it keep moving until i find a mob? cause as of right now, if it enters 2 empty rooms, it stops
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jun 01, 2003 11:18 pm   
 
Where did you put these commands in the "A Solider" trigger or in the prompt one? You should have three triggers similar to these:
#TRIGGER {A Solider.} {#VAR present 1}
#TRIGGER "getprompt" {~<%dhp %dm %dmv~>} {#IF (@present) {#T- getprompt;kill soldier} {#EXEC %item(@available, %random(1, %numitems(@available)))}} "" {prompt}
#TRIGGER {A Soldier is DEAD!!!} {#VAR present 0;#T+ getprompt;look}

The problem with using the prompt is that you will most likely get one after chats, people movement and in many other occasions. So, if you can find a line that always comes after the list of mobs in the room but only appears each time you enter a room, then use that line instead.

Kjata
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