Page 1 of 1
Logout on level up
Posted: Thu Dec 02, 2010 9:27 pm
by lagwagon
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!
Re: Logout on level up
Posted: Thu Dec 02, 2010 9:51 pm
by jduartedj
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();
end
this?
Re: Logout on level up
Posted: Fri Dec 03, 2010 1:37 am
by lagwagon
thank you very much.
how I put this into the waypoints file correct?
Re: Logout on level up
Posted: Fri Dec 03, 2010 3:05 am
by Giram
Just place it between <waypoint></waypoint> tags and it should work.
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>
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.
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>
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.