Change waypoint type in an argument?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Ascendency4
Posts: 11
Joined: Fri Feb 11, 2011 12:26 pm

Change waypoint type in an argument?

#1 Post by Ascendency4 » Mon Sep 12, 2011 3:23 pm

im currently working on a gaurd dog meat bot that farms the dailies, if the bag is full loads another path to go very all items other than III runes and the dailies and if the bot exceeds 5 stacks of dogmeats walks the ENTIRE length of the zone to a mailbox to send the dailies to my merchanting alt (much easier than comming into the zone and manually trading with the characters everday very time consuming)

the only issue i have with my system is at this point the waypoint system "RUN" has excessive downtime killing random mobs due to the high amount of them populatiing the roads in the new zone, the other downside is that "TRAVEL" leaves the characters exposed to various bleeds.

the upside is all of the characters i farm with are healers, or have healer secondaries so if i could have them stop at random waypoints when they get bogged down to heavly and kill off the swarm that is following them. it would save me allot of trouble.


so my question is, would an argument like this work, and what would be the proper snythax to make it functional? i honestly dont even know if the bot is capable of alternating waypoint type in an argument.

Code: Select all

<!-- # 2 --><waypoint x="-637" z="-8155" if playerHP >50% then type="TRAVEL" else type="RUN" ></waypoint>
the goal of this code is obviously at the waypoint marked, to check the players HP, if he has more than half his HP continue ignoring the mobs, if the player has less than half his HP switch to run mode in which he would heal and fend off whatever weakened him so much.

i would place this code into every single waypoint unless someone has a more effective idea.

your thoughts?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Change waypoint type in an argument?

#2 Post by lisa » Mon Sep 12, 2011 5:48 pm

In WP onload

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
local function hpcheck()
if player.HP / player.MaxHP * 100 > 50 then 
waypoint.Type = WPT_TRAVEL 
else 
waypoint.Type = WPT_RUN 
end
end
</onload>

then use hpcheck() in the coords you want.

Code: Select all

<!-- # 2 --><waypoint x="-637" z="-8155"> hpcheck()</waypoint>
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

kanta
Posts: 424
Joined: Thu Nov 11, 2010 4:08 pm

Re: Change waypoint type in an argument?

#3 Post by kanta » Mon Sep 12, 2011 5:52 pm

Looks like you're trying to something similar to what I have, and use, in my daily wp.

Code: Select all

   <!-- # 34 --><waypoint x="-8584" z="43212" y="384">
   	if (inventory:itemTotalCount(208547) ~= 10) then
   		getewp();
   		else
		   __WPL:setForcedWaypointType("TRAVEL")
		   player:mount()
	end
   </waypoint>
Once I have enough items to complete the daily, it changes the type to TRAVEL. Then just change the forced type back to your preferred method once you reach a certain wp or condition.

***EDIT***
Or just do what Lisa posted a couple minutes before I did :D
Scout/Knight/Rogue 70/66/66

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 17 guests