Logout on level up

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
lagwagon
Posts: 8
Joined: Thu Dec 02, 2010 9:23 pm

Logout on level up

#1 Post 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!
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Logout on level up

#2 Post 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?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
lagwagon
Posts: 8
Joined: Thu Dec 02, 2010 9:23 pm

Re: Logout on level up

#3 Post by lagwagon »

thank you very much.

how I put this into the waypoints file correct?
User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Logout on level up

#4 Post 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.
Post Reply