Hi
I have the following code, built up from past help using this forum
I would like to add an extra line to the Commands which will send the local variable 'spellbag' to the MUD.
I've tried "" ..bag, which will sends the variable but it will stop there and not send the second line. I've also tried using / also ; and enclosing the entire line in brackets.
I know it will be something obvious (which is just annoying for me) so the white flag is up and I'm asking for help.
Thank you
Val
[Moderator edit] Code tags added.
I have the following code, built up from past help using this forum
<aliases>
<alias
match="keypad_0"
enabled="y"
expand_variables="y"
group="cast"
send_to="12"
sequence="100"
>
<send>local x = GetVariable("targetme")
local spellname = GetVariable("spellname1")
local targetme = GetVariable("targetme")
local class = GetVariable("class")
local target2 = GetVariable ("target2")
local bag = GetVariable ("spellbag")
Commands = {}
Commands["room"] = "cast " .. class .. " ".. spellname .. " on " .. targetme
Commands["me"] = "cast " .. class .. " ".. spellname .. " on " .. targetme
Commands["none"] ="cast " .. class .. " ".. spellname
Commands.Default = "cast " .. class .. " " .. spellname .. " on " .. target2
tosend = Commands[x]
--this line sets your command to a default if it's something not already in Commands
if not tosend then tosend = Commands.Default end
Send(tosend)
</send>
</alias>
</aliases>
I would like to add an extra line to the Commands which will send the local variable 'spellbag' to the MUD.
I've tried "" ..bag, which will sends the variable but it will stop there and not send the second line. I've also tried using / also ; and enclosing the entire line in brackets.
I know it will be something obvious (which is just annoying for me) so the white flag is up and I'm asking for help.
Thank you
Val
[Moderator edit] Code tags added.