lua code:
local spearID = 7378 -- set the spear id. [7378 = royal spear], [3277 = regular spear]
local spearOFF = 3 -- set the spear amount to turn off targetting
local Targetting = true
while(true)do
if ((Self.ItemCount(spearID) <= spearOFF) and Targetting) then
setTargetingEnabled(false)
Targetting = false
elseif ((Self.ItemCount(spearID) > spearOFF) and not Targetting) then
setTargetingEnabled(true)
Targetting = true
end
wait(200, 600)
end
btw you can use (xcode=lua) and (/xcode) to wrap lua codes in that colorfull gay style, but using brackets [ ] instead of parenthesis ()