|
webwired Beginner
Joined: 22 Dec 2010 Posts: 18
|
Posted: Wed Dec 22, 2010 8:09 pm
Realms of Despair roller / reroller |
Hi everyone...
So I found this code in the zmud forum and sure enough it works for cmud as well...
nexela wrote: |
#TRIGGER "reroller" {^Strength %s (%d)} {#NOOP %t1}
#COND {^Dexterity %s (%d)} {#NOOP %t2} {within|param=1}
#COND {^Intelligence %s (%d)} {#NOOP %t3} {within|param=1}
#COND {^Wisdom %s (%d)} {#NOOP %t4} {within|param=1}
#COND {^Charisma %s (%d)} {#NOOP %t5} {within|param=1}
#COND {^Constitution %s (%d)} {#NOOP %t6} {within|param=1}
#COND {^Luck %s (%d)} {
#NOOP %t7
#IF ((%t1>=XX) AND (%t2>=XX) AND (%t3>=XX) AND (%t4>=XX) AND (%t5>=XX) AND (%t6>=XX) AND (%t7>=XX)) {
#BEEP
#ECHO good enough? Total %eval( %t1+%t2+%t3+%t4+%t5+%t6+%t7)
} {reroll}
} {within|param=1}
Used Pretty Print
Syntax Colourizer
EDIT Fixed it, Crap Happens |
I would just like to make a minor change... how can I change this line
Code: |
#ECHO good enough? Total %eval( %t1+%t2+%t3+%t4+%t5+%t6+%t7) |
To initiate these 3 commands instead "pull cord" "save" "quit" ? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Dec 22, 2010 8:52 pm |
Do you want it to always send those commands instead of the #ECHO? If so, just replace that line with those three lines. If you want to do something different, then you need to tell us exactly what you want.
There are a number of things in that code that are denigrated under Cmud. However, if it works, there's little reason to change it. |
|
|
|
webwired Beginner
Joined: 22 Dec 2010 Posts: 18
|
Posted: Wed Dec 22, 2010 8:54 pm |
I want it to always output those three commands... but I can't figure out the correct syntax... everytime I try to put those in, it breaks the trigger...
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Dec 23, 2010 4:24 pm |
If the original trigger worked, then the following should work:
Code: |
#TRIGGER "reroller" {^Strength %s (%d)} {#NOOP %t1}
#COND {^Dexterity %s (%d)} {#NOOP %t2} {within|param=1}
#COND {^Intelligence %s (%d)} {#NOOP %t3} {within|param=1}
#COND {^Wisdom %s (%d)} {#NOOP %t4} {within|param=1}
#COND {^Charisma %s (%d)} {#NOOP %t5} {within|param=1}
#COND {^Constitution %s (%d)} {#NOOP %t6} {within|param=1}
#COND {^Luck %s (%d)} {
#NOOP %t7
#IF ((%t1>=XX) AND (%t2>=XX) AND (%t3>=XX) AND (%t4>=XX) AND (%t5>=XX) AND (%t6>=XX) AND (%t7>=XX)) {
#BEEP
pull cord
save
quit
} {reroll}
} {within|param=1}
|
If you want to improve the code, then try the following:
Code: |
#TRIGGER "reroller" {^Strength %s (%d)} {#CALL %t1}
#COND {^Dexterity %s (%d)} {#CALL %t2} {within|param=1}
#COND {^Intelligence %s (%d)} {#CALL %t3} {within|param=1}
#COND {^Wisdom %s (%d)} {#CALL %t4} {within|param=1}
#COND {^Charisma %s (%d)} {#CALL %t5} {within|param=1}
#COND {^Constitution %s (%d)} {#CALL %t6} {within|param=1}
#COND {^Luck %s (%d)} {
#CALL %t7
#IF ((%t1>=XX) AND (%t2>=XX) AND (%t3>=XX) AND (%t4>=XX) AND (%t5>=XX) AND (%t6>=XX) AND (%t7>=XX)) {
#BEEP
#SEND pull cord
#SEND save
#SEND quit
} {reroll}
} {within|param=1}
|
If this is not working, you'll have to explain in more detail what is going on.
Actually, I'm not at all sure why your script has all those #NOOP commands. The argument is clearly just a number, so I can't see what that is intended to do. |
|
|
|
webwired Beginner
Joined: 22 Dec 2010 Posts: 18
|
Posted: Thu Dec 30, 2010 5:48 pm |
Sorry so late on response... Thanks, it worked great, much appreciated...
|
|
|
|
|
|