How to send to the point

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

How to send to the point

#1 Post by Lamkefyned » Sat May 10, 2014 2:23 pm

Hi, I have to do that when die and I arrived at the waypoint 44 and choose what I chose from the menu

-- Menu

Code: Select all

		function LTU_Hoss_Menu()
                     print("Here are the options:")
                     print("   1. Main character")
                     print("   2. Character to level up")
                     printf("Enter a number > ")
                     local selected = io.stdin:read()
                     if selected == "1" then
					 LTU_Hoss_BUFF()
                     __WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
                     elseif selected == "2" then
					 LTU_HossCharacters()
                     __WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
			end
		end
-- Waypoint

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<onload>
	LTU_loading()
	
		invite =
	{
	'larinja','example'
	};
		
	LTU_Hoss_Menu()
	</onload>
	
	<onLeaveCombat>
	LTU_HossLevel()
	</onLeaveCombat>
	
-- MC

	<!-- #  1 --><waypoint x="3732" z="11454" y="-44" type="TRAVEL" tag="MC">
	            LTU_Hoss_ireset()
				LTU_HossEP("start")
	</waypoint>
	<!-- #  2 --><waypoint x="3801" z="11427" y="-44" type="TRAVEL">
				waitForLoadingScreen()
	</waypoint>
	<!-- #  3 --><waypoint x="-1424" z="-2653" y="1437" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="-1045" z="-2657" y="1481" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="-1013" z="-2530" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="-1009" z="-2115" y="1480" type="NORMAL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- #  7 --><waypoint x="-775" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  8 --><waypoint x="-600" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  9 --><waypoint x="-465" z="-2046" y="1480" type="NORMAL">	</waypoint>
	<!-- # 10 --><waypoint x="-320" z="-2045" y="1480" type="TRAVEL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 11 --><waypoint x="-287" z="-2189" y="1480" type="NORMAL">	</waypoint>
	<!-- # 12 --><waypoint x="-155" z="-2120" y="1480" type="NORMAL">	</waypoint>
	<!-- # 13 --><waypoint x="-49" z="-2116" y="1480" type="NORMAL">	</waypoint>
	<!-- # 14 --><waypoint x="-288" z="-2043" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 15 --><waypoint x="-591" z="-2043" y="1480" type="TRAVEL">	
				LTU_HossSPC("next")
	</waypoint>
	<!-- # 16 --><waypoint x="-732" z="-2118" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 17 --><waypoint x="-936" z="-2116" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 18 --><waypoint x="-1006" z="-2261" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 19 --><waypoint x="-1009" z="-2589" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 20 --><waypoint x="-1456" z="-2590" y="1437" type="TRAVEL">	
				LTU_HossEP("finish")
	</waypoint>
	<!-- # 21 --><waypoint x="-1460" z="-2512" y="1437" type="TRAVEL">	</waypoint>
	<!-- # 22 --><waypoint x="-1459" z="-2529" y="1437" type="TRAVEL">
				waitForLoadingScreen()
				__WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
	</waypoint>
	
-- CTL

	<!-- # 23 --><waypoint x="3732" z="11454" y="-44" type="TRAVEL" tag="CTL">
				LTU_HossSPC("start")
	</waypoint>
	<!-- # 24 --><waypoint x="3801" z="11427" y="-44" type="TRAVEL">
				waitForLoadingScreen()
	</waypoint>
	<!-- # 25 --><waypoint x="-1424" z="-2653" y="1437" type="TRAVEL">	</waypoint>
	<!-- # 26 --><waypoint x="-1045" z="-2657" y="1481" type="TRAVEL">
				LTU_HossEP("next")
	</waypoint>
	<!-- # 27 --><waypoint x="-1013" z="-2530" y="1480" type="TRAVEL"> 	</waypoint>
	<!-- # 28 --><waypoint x="-1009" z="-2115" y="1480" type="TRAVEL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 29 --><waypoint x="-775" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 30 --><waypoint x="-600" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 31 --><waypoint x="-465" z="-2046" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 32 --><waypoint x="-320" z="-2045" y="1480" type="TRAVEL">
             	LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 33 --><waypoint x="-591" z="-2043" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 34 --><waypoint x="-732" z="-2118" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 35 --><waypoint x="-936" z="-2116" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 36 --><waypoint x="-1006" z="-2261" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 37 --><waypoint x="-1009" z="-2589" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 38 --><waypoint x="-1456" z="-2590" y="1437" type="TRAVEL">
             	LTU_HossSPC("finish")
	</waypoint>
	<!-- # 39 --><waypoint x="-1460" z="-2512" y="1437" type="TRAVEL">
				waitForLoadingScreen()
				yrest(5000)
                __WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
	</waypoint>
	
-- DEAD

	<!-- # 40 --><waypoint x="2344" z="11537" y="-32" type="TRAVEL">	</waypoint>
	<!-- # 41 --><waypoint x="2624" z="11467" y="-35" type="TRAVEL">	</waypoint>
	<!-- # 42 --><waypoint x="2690" z="11524" y="-35" type="TRAVEL">	</waypoint>
	<!-- # 43 --><waypoint x="2819" z="11830" y="-44" type="TRAVEL">	</waypoint>
	<!-- # 44 --><waypoint x="3624" z="11498" y="-44" type="TRAVEL">	</waypoint>
</waypoints>
If you think something is right just because everyone else believes,you're not thinking.

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

Re: How to send to the point

#2 Post by lisa » Sat May 10, 2014 7:41 pm

if in doubt do a print.

in the function do.

Code: Select all

print(__WPL:findWaypointTag("MC"))
if it prints the number then it should work as intended but if it doesn't print the number and prints nil then you know that you can't use findWaypointTag in the function and should just use the number.
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

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to send to the point

#3 Post by Lamkefyned » Sun May 11, 2014 8:22 am

I do not understand your code
---------------------------------------------------------------
I thought of another thing

If I make a function that when the character is less than level 30 load a tag, and if it is higher than level 30 load another...

---------------------------------------------------------------

Code: Select all

if( player.Level >= 30 ) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
end

Code: Select all

if( player.Level <= 30 ) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
end
----------------------------------------------------------------

Assuming that ">=" is greater than

and

Assuming that "<=" is less than
If you think something is right just because everyone else believes,you're not thinking.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: How to send to the point

#4 Post by rock5 » Sun May 11, 2014 8:51 am

>= means greater than or equal to
<= means less than or equal to
> means greater than
< means less than

An important thing to remember about xml files is the symbol < will cause an error. This is easily fixed by flipping the condition around.

So instead of

Code: Select all

if a < b then
use

Code: Select all

if b > a then
and instead of

Code: Select all

if a <= b then 
use

Code: Select all

if b >= a then
Remember this is just for xml files. In lua files < works fine. There are other ways to solve this problem but this is just the easiest.
  • 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.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: How to send to the point

#5 Post by Lamkefyned » Sun May 11, 2014 1:17 pm

Thanks Rock5 and Lisa
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest