Hi, I am just wondering if there is a way to get the bot to shut off after you have hit a certain level. Lets say I have the bot running in a level 10-13 area and as soon as I hit 13 i want the bot to run to a safe spot and shut off. Is there any way to do that?
Any help appreciated, thank you very much!
Logout on level up
Re: Logout on level up
lagwagon wrote:Hi, I am just wondering if there is a way to get the bot to shut off after you have hit a certain level. Lets say I have the bot running in a level 10-13 area and as soon as I hit 13 i want the bot to run to a safe spot and shut off. Is there any way to do that?
Any help appreciated, thank you very much!
Code: Select all
if player.Level >= 13 then
player:logout();
endThanks for reading! 
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Logout on level up
thank you very much.
how I put this into the waypoints file correct?
how I put this into the waypoints file correct?
Re: Logout on level up
Just place it between <waypoint></waypoint> tags and it should work.
Example:
But this code just logs out at that waypoint. If you want to it to run safety you would need to add run away script to it.
That was fast done example. I use tag on waypoints to control where its going. If player is not lvl 13 it wil jump to start of the script and if it is lvl 13 it will jump to logout part and runs to safety and logs out there. Hope you get the idea from that.
Example:
Code: Select all
<!-- # 9 --><waypoint x="2390" z="33054"> </waypoint>
<!-- # 10 --><waypoint x="2362" z="32690">
if player.Level >= 13 then
player:logout();
end
</waypoint>
<!-- # 11 --><waypoint x="2287" z="32413"> </waypoint>Code: Select all
<!-- # 6 --><waypoint x="2407" z="33296" tag="startover"> </waypoint>
<!-- # 7 --><waypoint x="2419" z="33170"> </waypoint>
<!-- # 8 --><waypoint x="2415" z="33123"> </waypoint>
<!-- # 9 --><waypoint x="2390" z="33054"> </waypoint>
<!-- # 10 --><waypoint x="2362" z="32690">
if player.Level >= 13 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("logout"));
end
</waypoint>
<!-- # 11 --><waypoint x="2287" z="32413">__WPL:setWaypointIndex(__WPL:findWaypointTag("startover"));</waypoint>
<!-- # 12 --><waypoint x="2333" z="32077" tag="logout"></waypoint>
<!-- # 13 --><waypoint x="2321" z="31992"> </waypoint>
<!-- # 8 --><waypoint x="2415" z="33123"> </waypoint>
<!-- # 9 --><waypoint x="2390" z="33054">player:logout();</waypoint>