[MudWalker] Need some help with a rolling trigger

Blastron blastron
Sat Jan 31 20:06:24 PST 2004


Well, several problems with your script.
First, == is only used to TEST for equality, not set equality. Use = 
instead.
When a line starts with @@, you do not need to put $(these)$ things 
into the script, as the @@ designates that the entire line is in Lua 
code.
Instead of echo (blah) or message (blah), the code is message('blah").
Otherwise, great job!

This is how I'd implement it...
Trigger:
Dice left to distribute: ^(.*), ^(.*), ^(.*), ^(.*), ^(.*), ^(.*), 
^(.*), ^(.*), ^(.*), ^(.*), ^(.*), ^(.*), ^(.*), ^(.*), ^(.*)

Script:
@@local total = (arg[1] + arg[2] + arg[3] + arg[4] + arg[5] + arg[6] + 
arg[7] + arg[8] + arg[9] + arg[10] + arg[11] + arg[12] + arg[13] + 
arg[14] + arg[15]
@@if total >= 1100 then
@@message("Your total is " .. total .. ".  Good roll!")
@@else
@@message("Your total is " .. total .. ".  Rerolling...")
reroll
@@end




More information about the MudWalker mailing list