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


Joined: 18 Feb 2004
Posts: 6
Location: Israel

PostPosted: Wed Feb 18, 2004 11:48 pm   

Problem with stats reroll trigger
 
I found this finished scrip in this forum but for some reason it will not work for me.. Although it worked for the person that wrote it..
My problem is that the variables dont appear to reset...
They carry over the total from first roll and the add to second roll..
I'm using version 7.01

1. click on the triggers button
2. click on the arrow next to new to select "new class folder"
3. name this folder "roller" (without the quotes)
4. in this folder create a new trigger:
the Pattern should be: Str: %1 Int: %2 Wis: %3 Dex: %4 Con: %5
and the value:
#reset roller
#add str %1
#add int %2
#add wis %3
#add dex %4
#add con %5
#add rolls 1
#add total %1+%2+%3+%4+%5
#show %ansi( high, blue)Total:%ansi( high, red)@total
#if @total>84 {keep} {#cr}

I followed instructions as discribed with no joy..

The script was posted by NLM9802 on 01182004

thanks in advance for any help you can give me..
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Feb 19, 2004 6:52 am   
 
NLM9802's script relies on the #RESET command to reset the variables. This will only work if the variables have default values and are in the class being reset. Neither is the case with NLM's script, although it will work if the variables have been premade in the roller class with the needed defaults.

Try this instead. It only uses #ADD for the one variable that should carry over its previous value, and hence the variables don't need to be reset.
Pattern:
Str: (%d) Int: (%d) Wis: (%d) Dex: (%d) Con: (%d)
Value:
#VAR str %1
#VAR int %2
#VAR wis %3
#VAR dex %4
#VAR con %5
#ADD rolls 1
#MATH total (%1 + %2 + %3 + %4 + %5)
#SHOW %ansi( high, blue)Total:%ansi( high, red)@total
#IF (@total > 84) {keep} {#CR}
Reply with quote
galamor
Newbie


Joined: 18 Feb 2004
Posts: 6
Location: Israel

PostPosted: Thu Feb 19, 2004 7:44 am   
 
Great THANKS your solution works perfectly.
I must also say that i didn't expect an answer that fast..
Zmud.. best 25$ I've spent in a long time
Keep up the good work Smile
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