The goal
- to break down this string into individual pieces that represent actions for my monk
what I have so far..
An alias that grabed this number, and sent it to my combo function (Do I have to convert this to a string first in mudlet?). The number/string is stored in "initial".
and, the combo function:
Code: Select all
function combo(initial)
a = ""
b = ""
c = ""
d = ""
if a == "1" then
guard("left leg")
end
if a == "3" then
guard("right leg")
end
if a == "4" then
guard("left arm")
end
if a == "5" then
guard("torso")
end
if a == "6" then
guard("right arm")
end
if a == "8" then
guard("head")
end
---Done with a -------
if b == "9" and c == "" then
c = "8"
d = "8"
end
if b == "3" then
send ("snk " .. target .. " right")
end
if b == "1" then
send ("snk " .. target .. " left")
end
if b == "6" then
send ( "mnk " .. target .. " right" )
end
if b == "4" then
send ( "mnk " .. target .. " left" )
end
if b == "8" then
send ("wwk " .. target )
end
if b == "5" then
send ( "sdk " .. target )
end
if b == "9" then
send ( "axk " .. target )
end
if c == "" then
c = b
c = b
end
------Done with b---------------
if c == "" and b == "9" then
c = "8"
d = "8"
end
if c == "6" then
send ("hfp " .. target .. " right")
end
if c == "1" then
send ("hfp " .. target .. " left")
end
if c == "6" then
send ( "spp " .. target .. " right" )
end
if c == "4" then
send ( "spp " .. target .. " left" )
end
if c == "8" then
send ("ucp " .. target )
end
if c == "5" then
send ( "hkp " .. target )
end
if d == "" then
d = c
end
--------Done with c-----------
if d == "3" then
send ("hfp " .. target .. " right")
end
if d == "1" then
send ("hfp " .. target .. " left")
end
if d == "6" then
send ( "spp " .. target .. " right" )
end
if d == "4" then
send ( "spp " .. target .. " left" )
end
if d == "8" then
send ("ucp " .. target )
end
if d == "5" then
send ( "hkp " .. target )
end
-----------Done with D---------
a = ""
b = ""
c = ""
d = ""
end
So if I send the command 1883. my monk will:
-guard his left leg
-kick their head,
-punch their head
-punch their right leg.
Also If I only send 18 he will:
-guard left leg
-full combo to their head.
please help!