Hello guys, I need a simple action: when I'm with the leave supply number or ammo, the force leave will stop targeting and stop everything and will go directly to the city to ressupply. Can someone do it for me?
Hello guys, I need a simple action: when I'm with the leave supply number or ammo, the force leave will stop targeting and stop everything and will go directly to the city to ressupply. Can someone do it for me?
Something like this:
init start
local ManaName = 'strong mana potion'
local MinManas = 10
local AmmoName = 'prismatic bolt'
local MinAmmo = 50
ACTIVATED = false
init end
auto(1000)
if (itemcount(ManaName) < MinManas or itemcount(AmmoName) < MinAmmo) and not ACTIVATED then
if not $trapped then
settargeting('no')
else
settargeting('yes')
end
if $targeting.id > 0 then
stopattack()
end
gotolabel('CITY') -- change to refill label
ACTIVATED = true
else
settargeting('yes')
end
@StaR, it will keep changing waypoint forever
init start
local ManaName = 'strong mana potion'
local MinManas = 10
local AmmoName = 'prismatic bolt'
local MinAmmo = 50
ACTIVATED = false
init end
auto(1000)
if (itemcount(ManaName) < MinManas or itemcount(AmmoName) + $belt.count < MinAmmo) and not ACTIVATED then
settargeting('no')
if $targeting.id > 0 then
stopattack()
end
gotolabel('CITY') -- change to refill label
ACTIVATED = true
else
settargeting('yes')
end
Also, disabling targeting is bad idea, once you really know what you are doing. I would go for changing monsters to attack only if trapped.
@StaR itemcount() already count amounts on equipment slots.
(◣_◢)
Visit: Scripts - [Paid] | [Freebies] | [Showcase] ~ BlakW Market - [Tibia Gold] | [Tibia Coins] | [WindBot Licenses]
@blakw, correct thanks!
Guys, thank you very much for your attention and your help, I really appreciate.