Stealth Or Unstealth Plus Weapon Swap
Use this script instead of the normal Ctrl-F1 to stealth. It will either stealth you and equip your dagger, or unstealth you and return your sword, depending on whether you're already stealthed or not. I make a Stealth macro that calls this (/ls N) and put it in action bar slot 1.
for i=0,15,1 do
t=GetPlayerBuffTexture(i)
if (t and string.find(t, "Ability_Stealth")) then
CancelPlayerBuff(i)
-- equip Sword, assumes above "Equip Sword" script is on page 2
LuaSlinger_Exec(2)
return
end
end
-- not stealthed
CastSpellByName("Stealth")
-- equip Dagger, assumes above "Equip Dagger" script is on page 1
LuaSlinger_Exec(1)