Hi
Hopefully as below
This is my target
<aliases>
<alias
match="t *"
enabled="y"
expand_variables="y"
group="Target"
send_to="12"
sequence="100"
>
<send>SetVariable ("target2", "%1")
local spellname1 = GetVariable("spellname1")
local target2 = GetVariable("target2")
ColourNote ("white", "blue", "Spell is still: " .. spellname1)
ColourNote ("white", "blue", "Target is now: " .. target2)
SetStatus ("Target: " .. target2, " / Spell: " .. spellname1)
win = GetPluginID ( ) .. ":targetwindow"
font = "f"
WindowCreate ( win, 0, 0, 1, 1, 9, 0, 0)
WindowFont ( win, font, "Couier", 10)
height = WindowFontInfo ( win, font, 1) + 10
width = WindowTextWidth ( win, font, "Target is: " .. target2) + 10
WindowCreate ( win, 0, 0, width, height, 9, 0, ColourNameToRGB ( "salmon"))
WindowText ( win, font, "Target is: " .. target2, 5, 5, 0, 0, ColourNameToRGB ( "yellow"))
WindowShow ( win, true)
</send>
</alias>
</aliases>
This is one I use to cast on a me
<aliases>
<alias
match="arm"
enabled="y"
expand_variables="y"
group="mage"
send_to="12"
sequence="100"
>
<send>SetVariable ("spellname1", "armor")
SetVariable ("targetme", "me")
local spellname1 = GetVariable("spellname1")
local target = GetVariable("targetme")
SetStatus ("Target: " .. targetme," / Spell: " .. spellname1)
ColourNote ("white", "blue", "Spell is now: " .. spellname1)
ColourNote ("white", "blue", "Target is : " .. targetme)
</send>
</alias>
</aliases>
and this is one for a mob
<aliases>
<alias
match="aa"
enabled="y"
expand_variables="y"
group="mage"
send_to="12"
sequence="100"
>
<send>SetVariable ("spellname1", "acid arrow")
SetVariable ("targetme", "not me")
local spellname1 = GetVariable("spellname1")
local target2 = GetVariable("target2")
SetStatus ("Target: " .. target2," / Spell: " .. spellname1)
ColourNote ("white", "blue", "Spell is now: " .. spellname1)
ColourNote ("white", "blue", "Target is still: " .. target2)
world.Execute ("t " .. target2)</send>
</alias>
</aliases>
This is to let me use one alias to cast spells where it knows the difference between spells I cast on me and mobs with an option of casting a spell normally for me (a heal) to a friend, hence the if post I made
<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 target2 = GetVariable ("target2")
if x == "me" then Send ("cast " .. spellname, " on " .. targetme)
else
Send ("cast " .. spellname, " on " .. target2)
end
</send>
</alias>
</aliases>
With this done I will have to figure out how to move the target box in the 't *' and then see if I can master the inventory problem I have with the line.
Thank you for your help
val |