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


Joined: 03 Mar 2003
Posts: 7
Location: Russia

PostPosted: Mon Mar 03, 2003 7:32 pm   

Attack trigger after being summoned.
 
I have two problems here. In the moud i play enemies can have mirrors of themselves that differ just a bit from player. But they differ and i wish to use that in such way :
#trigger {XXXXX the bastard is here.} {add counter 1) - this is for mirror
#trigger ((pk) XXXXX is here.} {add counter 1;#show |. @counter .|} - this shows the number of real player
#trigger {|. &value1 .|} {kill %1.XXXXX}

This one works BUT :
1) somehow is types kill N.xxxxx two times
2) i don't want it be automatic... is it possible to make an alias for example like : #alias {xxx} {kill @counter.XXXXX} so that ZMud calculates the number for me and i type the string when i want not every time it counts?
Reply with quote
Etheledda
Newbie


Joined: 03 Mar 2003
Posts: 7
Location: Russia

PostPosted: Mon Mar 03, 2003 7:35 pm   
 
Forgot to add... i reset @counter by trigger
#trigger {XXXXX has summoned you!} {counter=0}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Mar 03, 2003 8:16 pm   
 
#trigger {XXXXX the * is here.} {#add counter 1}
#trigger {~(pk~) XXXXX is here.} {#MATH target (@counter + 1)}
#AL xxx {kill @{target}.XXXXX}
#trigger {XXXXX has summoned you!} {#VAR counter 0;#VAR target 0}

LightBulb
Advanced Member
Reply with quote
Etheledda
Newbie


Joined: 03 Mar 2003
Posts: 7
Location: Russia

PostPosted: Mon Mar 03, 2003 8:31 pm   
 
alias should be
#al {kill <@target>.XXXXX} as i figured
becuase else it doesn't understand it.

thanks for reply...

i have another question though now :P
how to connect resetting of variable to the moving throughout mud..
may be it is possible to connect it with moves variable? i just need to reset a certain variable every time i move.

any ideas?
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon Mar 03, 2003 9:41 pm   
 
Probably easier just to have the variable to default to zero when you connect.
#VAR counter {0} {0}

Then make triggers for the cases where you need it reset such as:
#TRIGGER {You flee trigger} {#VAR counter 0}
#TRIGGER {They flee trigger} {#VAR counter 0}
#TRIGGER {You die} {#VAR counter 0}
#TRIGGER {They die} {#VAR counter 0}

//

The other concept is what happens if you try to kill something else
when fighting something?

ie always try to target mirrored people:
kill 2.@target
kill 1.@target

Ton Diening
Reply with quote
Etheledda
Newbie


Joined: 03 Mar 2003
Posts: 7
Location: Russia

PostPosted: Mon Mar 03, 2003 11:23 pm   
 
you got me wrong...
i need to reset it after my each move...
because if i walk into room - i must have it resetted to count right
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