Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
John Gilmore
Beginner


Joined: 22 Mar 2003
Posts: 19
Location: Park City Utah

PostPosted: Wed Dec 22, 2010 10:45 pm   

Help with a autoroller trigger
 
I used this in Zmud, but does not work in Cmud. Can anyone see what I am doing wrong with the script to make it compatible with Cmud v3?


#CLASS {Autoroller}
#ALIAS initroll {#var maxroll 0;#var high 0;#var max1 0;#var max2 0;#var max3 0;#var max4 0;#var max5 0;#status {%ansi( bold, red)current roll: @total %ansi( bold, blue)setpoint: @setpoint %ansi( bold, red)high roll: @high %ansi( bold, blue) max possible: @maxroll} autoroll}
#VAR setpoint {92}
#VAR STR {18}
#VAR INT {20}
#VAR WIS {18}
#VAR DEX {20}
#VAR CON {16}
#VAR total {92}
#VAR max1 {18}
#VAR max5 {17}
#VAR max4 {21}
#VAR max3 {18}
#VAR max2 {21}
#VAR maxroll {95}
#VAR high {92}
#TRIGGER {Strength: &str Intelligence: &int Wisdom: &wis Dexterity: &dex Constitution: &con} {#var total %EVAL( @str + @int + @wis + @dex + @con);#say {%ansi( bold, red)"Max is " @max1 " " @max2 " " @max3 " " @max4 " "@max5};#IF (@total < @setpoint) {no} {#beep;#status {Finished Rolling... got a @total};#wait 120000;#status ""};#If (@max1 < @str) {#var max1 {@str}};#If (@max5 < @con) {#var max5 {@con}};#If (@max4 < @dex) {#var max4 {@dex}};#If (@max3 < @wis) {#var max3 {@wis}};#If (@max2 < @int) {#var max2 {@int}};#var maxroll {%EVAL( @max1 + @max2 + @max3 + @max4 + @max5)};#If (@high < @total) {#var high {@total}}}
#CLASS 0
Reply with quote
John Gilmore
Beginner


Joined: 22 Mar 2003
Posts: 19
Location: Park City Utah

PostPosted: Wed Dec 22, 2010 10:53 pm   
 
Trigger Strength: &str Intelligence: &int Wisdom: &wis Dexterity: &dex C
Does not compile : invalid command: status120000 at row 0 col 548
That is the compatibility report from Cmud
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Dec 23, 2010 1:47 am   
 
It may or may not just be an issue with the formatting. At any rate, you will want to replace all the ; with newlines so you can read it better and more easily spot any mistakes.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Dec 23, 2010 4:47 pm   
 
This is very odd. I pasted that #TRIGGER line into my commandline and it produced a very odd result. The resulting value of the trigger is:
Code:

#var total  %EVAL(  @str +  @int +  @wis +  @dex +  @con);#say {%ansi(bold,red)"Max is " @max1 " " @max2 " " @max3 " " @max4 " "@max5};#IF (@total <  @setpoint) {no} {#beep;#status {Finished Rolling... got a @total};#wait 120000;#status120000};#If (@max1 <  @str) {#var max1 {@str}};#If (@max5 <  @con) {#var max5 {@con}};#If (@max4 <  @dex) {#var max4 {@dex}};#If (@max3 <  @wis) {#var max3 {@wis}};#If (@max2 <  @int) {#var max2 {@int}};#var maxroll {%EVAL(  @max1 +  @max2 +  @max3 +  @max4 +  @max5)};#If (@high <  @total) {#var high {@total}}

Notice the "#status120000" in there? That is what is causing the error. But that is not what I entered in the commandline. This looks like a very weird commandline parser bug.
[edit]Anyway, you should be able to fix it by changing #status120000 to #status "" within the Package Editor. But I think Zugg needs to take a look at this.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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