function eliteEval(address)
local target = CPawn(address)
-- Check if mob
if target.Type ~= PT_MONSTER then
return false
end
-- Check hp against elite factor
if( player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR > target.MaxHP ) then
return false
end
return true
end
I changed it around a bit so it will be easier to add more checks if needed.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
Loaded waypoint path 8_Ostriches.xml
No return path with default naming 1-9SS/8_Ostriches_return.xml found.
We use the normal waypoint path 8_Ostriches.xml now.
GM detection started
Moving to waypoint #1, (4046, 7804)
[string " elites() "]:1: attempt to call global 'elites' (a nil value)
when I used this however, it worked.... at least it ran away, but it didnt stay away for long enough. It detected, ran away, then reseumed after it looped through several times. This is what I used...
function eliteEval(address)
local target = CPawn(address)
if( target.MaxHP > player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR ) then
return true
end
return false
end
function elites()
mob = player:findNearestNameOrId("Bronze Shell Scooray",nil,eliteEval)
if mob then
print("Running away from "..(mob.Name or "<no name>"))
__WPL:setWaypointIndex(1); -- put what you want to do here if elite nearby
end
end
<onload>
function eliteEval(address)
local target = CPawn(address)
-- Check if mob
if target.Type ~= PT_MONSTER then
return false
end
-- Check hp against elite factor
if( player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR > target.MaxHP ) then
return false
end
return true
end
function elites()
mob = player:findNearestNameOrId("Bronze Shell Scooray",nil,eliteEval)
if mob then
print("Running away from "..(mob.Name or "<no name>"))
__WPL:setWaypointIndex(1); -- put what you want to do here if elite nearby
end
end
</onLoad>
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
Doh, sorry, im such a dud when it comes to this stuff....... You guys are such whizzes I am learning a little by little, slowly, slowly. Thanks for all the help anyway.... Ill give the new stuff a go and post only if I need. Thanks heaps