Hey all, so I have minimal to zero knowledge of programming but I'm getting back into MUDs. I've been reading serval other forums on auto rollers and wanted to take a crack.
So based upon what I've read, I tried to mimic a lua string for my mud.
Basic MUD stats output:
I keep getting this error:
Below is the code I tried:
So based upon what I've read, I tried to mimic a lua string for my mud.
Basic MUD stats output:
Your abilities are:
Str [Weak ] Int [Brilliant ] Wis [Above Avg ]
Dex [Below Avg ] Con [Below Avg ] Cha [Below Avg ]
Roll again?(y/n):
I keep getting this error:
Error number: 0
Event: Compile error
Description: [string "Script file"]:1: unexpected symbol near '<'
Called by: Immediate execution
Below is the code I tried:
<triggers>
<trigger
ignore_case="y"
lines_to_match="2"
keep_evaluating="y"
match="^ Str \[(...........)\] Int \[(..........)\] Wis \[(............)\]\n Dex \[(...........)\] Con \[(..........)\] $"
multi_line="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>require "wait"
Str = Trim("%1")
Int = Trim("%2")
Wis = Trim("%3")
Dex = Trim("%4")
Con = Trim("%5")
YStr = "No"
YInt = "No"
YWis = "No"
YDex = "No"
YCon = "No"
YCha = "No"
if Str == "Strong" or
Str == "Potent" or
Str == "Muscular" or
then
YStr = "Yes"
end
if Int == "Genius" or
Int == "Gifted" or
then
YInt = "Yes"
end
if Wis == "Shrewd" or
Wis == "Crafty" or
then
YWis = "Yes"
end
if Dex == "Agile" or
Dex == "Nimble" or
Dex == "Smooth" or
then
YDex = "Yes"
end
if Con == "Sturdy" or
Con == "Hardy" or
Con == "Husky" or
then
YCon = "Yes"
end
if YStr == "Yes" and
YInt == "Yes" and
YWis == "Yes" and
YDex == "Yes" and
YCon == "Yes" and
YCha == "Yes"
then
Send ("n")
else
print ("** Stats rejected ** ", YStr, " ", YInt, " ", YWis, " ", YDex, " ", YCon, " ")
DoAfter(0.25,"y")
end
</send>
</trigger>
</triggers>