Is there a way to have bot stop when a random, roaming boss is located for a set period of time? I know the game gives a warning when nearing a roaming boss, but the bot does not detect such a warning....... thanks in advance if possible.
EDIT:-
So, I guess there is no such option. How about someone please looking at why my profile options are not working, please..... Here are the parts I have edited.....
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="150" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="false" />
<option name="MAX_TARGET_DIST" value="140" />
<option name="AUTO_ELITE_FACTOR" value="4" /> <!-- mobs with x * your HP value counts as 'Elite' and we will not target it -->
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
startGMDetect()
local target = player:getTarget();
if( target.HP == target.MaxHP > player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR ) then
yrest(2000)
end
]]></onLoad>
as you can see, I am a total learner, but cannot think of any other way to stop moevement when an elite is detected....... sorry in advance
<onLoad><![CDATA[
function elites()
local obj = nil;
local objectList = CObjectList();
objectList:update();
for i = 0,objectList:size() do
obj = objectList:getObject(i);
if( obj ~= nil ) then
if( obj.Type == PT_MONSTER then
local pawn = CPawn(obj.Address);
pawn:update();
local _target = pawn:getTarget();
if( _target.MaxHP > player.MaxHP * settings.profile.options.AUTO_ELITE_FACTOR ) then
yrest(2000) -- put what you want to do here if elite nearby
end
end
end
end
end
]]></onLoad>
<onLoad><![CDATA[
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("",nil,eliteEval)
if mob then
yrest(2000) -- 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.
Can i enter in my profile that I would like to, say, start a particular waypoint (in the part where I can enter what I choose to do if an elite is detected)? This would have me run away, back to beginning of a loop, thus avoiding the elite?
And if I use Rocks suggestion, do I still change my waypoint to include 'elite'?
whome wrote:Can i enter in my profile that I would like to, say, start a particular waypoint (in the part where I can enter what I choose to do if an elite is detected)? This would have me run away, back to beginning of a loop, thus avoiding the elite?
When i put 'elite()' at the end of each waypoint i want to check I get error message "We can't find your waypoint file 'C:/program Files etc etc/scripts/rom/waypoints/myfile.xml'. Please create a valid waypoint file within the 'waypoints folder blah blah.
Because I wanted it to go back to waypoint one, I ask it to load that file 'Ostriches', which it tries to load even when an elite is not present. At least thats what I think it is doing.....
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
if( player.PetPtr == 0 or ( player.Pet.HP/player.Pet.MaxHP*100 ) < 20 ) then
player:cast("WARDEN_SUMMON_SPIRIT_OF_THE_OAK");
yrest(8000);
end;
startGMDetect()
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("",nil,eliteEval)
if mob then
loadPaths("1-9SS/8_Ostriches"); -- put what you want to do here if elite nearby
end
end
]]></onLoad>
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
if( player.PetPtr == 0 or ( player.Pet.HP/player.Pet.MaxHP*100 ) < 20 ) then
player:cast("WARDEN_SUMMON_SPIRIT_OF_THE_OAK");
yrest(8000);
end;
startGMDetect()
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("",nil,eliteEval)
if mob then
loadPaths("_WPL:setWaypointIndex(1)); -- put what you want to do here if elite nearby
end
end
]]></onLoad>
It loops and won't progress past the first waypoint.
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
if( player.PetPtr == 0 or ( player.Pet.HP/player.Pet.MaxHP*100 ) < 20 ) then
player:cast("WARDEN_SUMMON_SPIRIT_OF_THE_OAK");
yrest(8000);
end;
startGMDetect()
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("",nil,eliteEval)
if mob then
_WPL:setWaypointIndex(1); -- put what you want to do here if elite nearby
end
end
]]></onLoad>
and got this error.....
[string "..."]:21: attempt to index global '_WPL' (a nil value)
<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="150" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="false" />
<option name="MAX_TARGET_DIST" value="140" />
<option name="AUTO_ELITE_FACTOR" value="4" /> <!-- mobs with x * your HP value counts as 'Elite' and we will not target it -->
<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
if( player.PetPtr == 0 or ( player.Pet.HP/player.Pet.MaxHP*100 ) < 20 ) then
player:cast("WARDEN_SUMMON_SPIRIT_OF_THE_OAK");
yrest(8000);
end;
startGMDetect()
]]></onLoad>
<onDeath><![CDATA[
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
]]></onDeath>
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
catchCavy("cavy")
player:update()
if 65 > (player.Pet.HP/player.Pet.MaxHP * 100) then
player:target( player.Pet )
player:cast("WARDEN_ELVEN_PRAYER")
yrest(1000)
end
]]></onLeaveCombat>
<waypoints type="Normal">
<onLoad><![CDATA[
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("",nil,eliteEval)
if mob then
__WPL:setWaypointIndex(1); -- put what you want to do here if elite nearby
end
end
]]></onLoad>
<!-- # 1 --><waypoint x="4046" z="7804" y="-22"> elites() </waypoint>
<!-- # 2 --><waypoint x="4281" z="8018" y="-31"> elites() </waypoint>
<!-- # 3 --><waypoint x="4599" z="8071" y="-42"> elites() </waypoint>
<!-- # 4 --><waypoint x="4325" z="8258" y="-33"> elites() </waypoint>
<!-- # 5 --><waypoint x="4141" z="8582" y="-29"> elites() </waypoint>
<!-- # 6 --><waypoint x="4161" z="8820" y="-40"> elites() </waypoint>
<!-- # 7 --><waypoint x="4029" z="8859" y="-19"> elites() </waypoint>
<!-- # 8 --><waypoint x="3766" z="8678" y="0"> elites() </waypoint>
<!-- # 9 --><waypoint x="3794" z="8428" y="-14"> elites() </waypoint>
<!-- # 10 --><waypoint x="3628" z="8086" y="-19"> elites() </waypoint>
<!-- # 11 --><waypoint x="3660" z="7791" y="-37"> elites() </waypoint>
<!-- # 12 --><waypoint x="3840" z="7723" y="-35">
if( player.Level > 21 ) then
loadPaths("1-9SS/8_Ostriches-Tagena")
end
</waypoint>
</waypoints>
If it could move to the beginning of the waypoint as in #1, it would effectively run away from the elite. Leaving it load the path as I first tried would have it simply find the nearest waypoint (as suggested by Rock) and would be no good at all...... sorry for all the trouble guys
OMG, check this out, I have no idea what this is??? It ran from a silly ostrich, there was no elite around. I put in what you suggested Rock. At least it ran to my waypoint #1