I'm really stuck and I'm not sure what I'm doing wrong. Any help would be appreciated.
This is the output from the mud:
This is a script that a friend sent me:
For some reason it just keeps sending reroll to the mud, even if the ouput is well over 16 on str and dex. I played around with it a bit and couldn't get it to work, so I attempted to code one based off other forum posts. I don't know how to script really, so I'm not surprised it doesn't work.. but here's what I came up with.
The last script gives me an error message at this line: if arrWildCards(2) >= dex and _
So.. can please someone enlighten me to the error of my ways? Thanks again.
This is the output from the mud:
Your character's base stats have been rerolled...
New Previous
Strength 14 14
Dexterity 14 16
Intelligence 13 12
Wisdom 12 13
Charisma 9 11
Constitution 18 16
Luck 15 13
This is a script that a friend sent me:
<triggers>
<trigger
enabled="y"
match="Charisma *"
name="ccha"
script="checkcha"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
<trigger
enabled="y"
match="Constitution *"
name="ccon"
script="checkcon"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
<trigger
enabled="y"
match="Dexterity *"
name="cdex"
script="checkdex"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
<trigger
enabled="y"
match="Intelligence *"
name="cint"
script="checkint"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
<trigger
enabled="y"
match="Luck *"
name="clck"
script="checklck"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
<trigger
enabled="y"
match="Strength *"
name="cstr"
script="checkstr"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
</triggers>
dim rerollstats
sub checkstr(strtriggerName, trig_line, arrWildCards)
rerollstats = 0
dim str
str = 16
if arrWildCards(1) >= str then
rerollstats = 1
end if
end sub
sub checkdex(strtriggerName, trig_line, arrWildCards)
dim dex
dex = 16
if arrWildCards(1) >= dex then
rerollstats = 1
end if
end sub
sub checkint(strtriggerName, trig_line, arrWildCards)
dim int
int = 0
if arrWildCards(1) >= int then
rerollstats = 1
end if
end sub
sub checkwis(strtriggerName, trig_line, arrWildCards)
dim wis
wis = 0
if arrWildCards(1) >= wis then
rerollstats = 1
end if
end sub
sub checkcha(strtriggerName, trig_line, arrWildCards)
dim cha
cha = 0
if arrWildCards(1) >= cha then
rerollstats = 1
end if
end sub
sub checkcon(strtriggerName, trig_line, arrWildCards)
dim con
con = 0
if arrWildCards(1) >= con then
rerollstats = 1
end if
end sub
sub checklck(strtriggerName, trig_line, arrWildCards)
dim lck
lck = 12
if arrWildCards(1) >= lck then
rerollstats = 1
end if
reroll()
end sub
sub reroll()
if rerollstats = 1 then
world.send "reroll"
rerollstats = 0
else
world.send "touch orb"
end if
end sub
For some reason it just keeps sending reroll to the mud, even if the ouput is well over 16 on str and dex. I played around with it a bit and couldn't get it to work, so I attempted to code one based off other forum posts. I don't know how to script really, so I'm not surprised it doesn't work.. but here's what I came up with.
<triggers>
<trigger
enabled="y"
match="(Strength|Dexterity|Intelligence|Wisdom|Charisma|Constitution|Luck)\s*(\d+)\s*(\d+)$"
name="Stats"
script="checkstats"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
</triggers>
dim rerollstats
sub checkstats(strtriggerName, trig_line, arrWildCards)
rerollstats = 0
dim str, dex, int, wis, cha, con, lck
str = 18
dex = 18
int = 0
wis = 0
cha = 0
con = 0
lck = 12
if arrWildCards(2) >= str and _
if arrWildCards(2) >= dex and _
if arrWildCards(2) >= int and _
if arrWildCards(2) >= wis and _
if arrWildCards(2) >= cha and _
if arrWildCards(2) >= con and _
if arrWildCards(2) >= lck then
rerollstats = 1
end if
reroll()
end sub
sub reroll()
if rerollstats = 1 then
world.send "reroll"
rerollstats = 0
else
world.send "touch orb"
end if
end sub
The last script gives me an error message at this line: if arrWildCards(2) >= dex and _
So.. can please someone enlighten me to the error of my ways? Thanks again.