inHi guys,
I'm using TFS 1.3 and the project OtServBR 12.64. I'm trying to remove the runes on taget in hotkey and let them just on crosshairs and use on yourself.
How can i do that?
Thanks
onCastSpell you could compare variant to caster/creaturefunction onCastSpell(creature, var, isHotkey)
if isHotkey then
local target = Player(var.number)
-- Don't allow the rune to be used on a different creature
if target_var and target_var:getId() ~= creature:getId() then
return true
end
end
return combat:execute(creature, var)
end
inonCastSpellyou could comparevarianttocaster/creature
LUA:function onCastSpell(creature, var, isHotkey) if isHotkey then local target = Player(var.number) -- Don't allow the rune to be used on a different creature if target_var and target_var:getId() ~= creature:getId() then return true end end return combat:execute(creature, var) end
same hereThis did not work. still attacks players by hotkey.
is something else necessary? tfs 1.3 and client 12.xx
FLP