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
towel
Beginner


Joined: 27 May 2002
Posts: 13

PostPosted: Sun Jun 23, 2002 6:03 pm   

Need help to fix a trigger..
 
#VAR dmg 0#VAR xp1 0#VAR xp2 0#VAR cp 0#TRIGGER {Xp:(%d)} {#IF (@cp == 0) {#VAR cp 1;#VAR xp %1}}#TRIGGER {Xp:(%d)} {#IF (@cp == 1) {#VAR cp 0;#VAR xp2 %1;#MATH dmg (@xp2 - @xp1);#ECHO Damage: @dmg}}

should that work?

For example..
Let's say I have this report: Xp:200000
and each time any points are added to the Xp I want it to read Damage: (and then the number that gets added)

Please help with that =)
towel

towel
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Jun 23, 2002 10:11 pm   
 
#VAR dmg 0
#VAR xp1 0
#VAR xp2 0
#VAR cp 0
#TRIGGER {Xp:(%d)} {#IF (@cp == 0) {#VAR cp 1;#VAR xp1 %1} {#VAR cp 0;#VAR xp2 %1;#MATH dmg (@xp2 - @xp1);#ECHO Damage: @dmg}}


Try that? Although this concept just works for an odd number of consecutive
results. It will pair matches of the trigger say try 1,2 3,4 5,6 etc. But not
2,3 4,5 6,7 etc


Appended 9:54 24Jun02
Lightbulb's message below is what you would do to see your #ECHO damage: @dmg
every time your xp changed.


Ton Diening
Providing untested answers that tend to be
more complicated than others.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jun 24, 2002 6:44 am   
 
#VAR xp 0
#TR {Xp:(%d)} {#IF (%1 <> @xp) {#ECHO {Damage: %eval(%1 - @xp)};#VAR xp %1}

LightBulb
Senior Member
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