corrade-lsl-templates
/source/eggdrop/dice.lsl |
@@ -226,16 +226,19 @@ |
return; |
|
// Check if the command matches the current module. |
list command = llParseString2List(data, |
[wasKeyValueGet("command", configuration), " "], ["@"]); |
if(llList2String(command, 0) != "roll") |
list command = llParseString2List(data, [" "], []); |
if(llList2String(command, 0) != |
wasKeyValueGet("command", configuration) + "roll") |
return; |
|
// Remove command. |
command = llDeleteSubList(command, 0, 0); |
|
list range = wasCSVToList( |
wasKeyValueGet("roll range", configuration) |
); |
|
integer roll = llList2Integer(command, 1); |
integer roll = llList2Integer(command, 0); |
if(roll < llList2Integer(range, 0) || roll > llList2Integer(range, 1)) { |
data = "Value should be within bounds [" + |
llList2String(range, 0) + |