Help with math in mudlet

I tried fixing the script i found online and I can't get her to fire.

This is the one i found here, dated 2014.  I've tried switching from substring to perl and everything under the sun.

^If (\d+) cows jumped into Runaway River and (\d+)

answer = tonumber(matches[2])-tonumber(matches[3])
send("say " .. answer)


^If (\d+) beavers and (\d+) beavers got together with (\d+)

answer = tonumber(matches[2])+tonumber(matches[3])+tonumber(matches[4])
send("say " .. answer)

I've made adjustments, but I'm just learning.  Now I'm irritated.  tia

Comments

Sign In or Register to comment.