Okey I fix that there wasnt another "end" but there is a problem, when I dont have spears it disables the targeting, but when I have spears again, it doesnt enable it, help please?
Thanks @icaro43 !
Edit: Okey I fix it.
lua code:
Code:
local spearID = 7378 -- set the spear id. [7378 = royal spear], [3277 = regular spear]
while(true)do
if(Self.ItemCount(spearID) == 0)then
setTargetingEnabled(false)
TargetingEnabled = false
wait(200, 600)
elseif(Self.ItemCount (spearID) == 34) then
setTargetingEnabled(true)
TargetingEnable = true
wait (200, 600)
end
end
But how can I change the amount of the spears, without change anything in the .lua?