Xaviera - Catch Butterflies

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
najtel
Posts: 3
Joined: Fri Dec 30, 2016 6:36 pm

Xaviera - Catch Butterflies

#1 Post by najtel » Thu Feb 02, 2017 11:10 am

Hello guys,
I was trying to make a wp file for doing the Catch Butterflies daily in Xaviera. It runs fine, until it reaches this part:
redirectToWaypointTag("entrance");
When it reaches that point, I get the following message:
[string "..."]:5: attempt to call global 'redirectToWaypointTag' <a nil value>

Previously I have a waypoint with the specified tag:
<!-- # 20 --><waypoint x="7595" z="2802" y="184" tag="entrance">
queststate = getQuestStatus(424181);
if queststate == "complete" then
player:mount()
__WPL:setDirection(WPT_BACKWARD)
else
player:mount(true)
__WPL:setDirection(WPT_FORWARD)
end
</waypoint>

If you could help me with this, I'ld realy appreciate it, spent hours trying to fix it, but it seems i'm too much of a noob for this...

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Xaviera - Catch Butterflies

#2 Post by BlubBlab » Thu Feb 02, 2017 3:33 pm

I'm not sure what happening here but it seems a bug or do you have a var called 'redirectToWaypointTag'
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

najtel
Posts: 3
Joined: Fri Dec 30, 2016 6:36 pm

Re: Xaviera - Catch Butterflies

#3 Post by najtel » Fri Feb 03, 2017 1:48 am

Wish I'ld have one... at least i'ld know what the problem is... but sadly no.
Here is the whole code, maybe it'll help to determine the problem...
+ I added a few mobs to that friend list in the character profile, to ignore them. I don't think it has anything to do with this... But I'ld rather mention it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="6418" z="5451" y="149" type="TRAVEL">
		player:mount()
		player:target_NPC(118072) -- Robbie Butcher
		queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			CompleteQuestByName(424181)
		else
			AcceptQuestByName(424181) -- Catch Butterflies
		end
		local dqCount, dqPerDay = RoMScript("Daily_count()");
    		if dqCount == 10 then 
			logPlayer()	
		end
		player:updateBuffs();
	 	if not player:hasBuff("Unbridled Enthusiasm") then
        		inventory:useItem(207200);
		end	
		__WPL:setDirection(WPT_FORWARD)
	</waypoint>
	<!-- #  2 --><waypoint x="6375" z="5230" y="187" type="TRAVEL">	</waypoint>
	<!-- #  3 --><waypoint x="6331" z="4963" y="184" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="6401" z="4637" y="185" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="6454" z="4384" y="183" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="6516" z="4080" y="205" type="TRAVEL">	</waypoint>
	<!-- #  7 --><waypoint x="6575" z="3871" y="205" type="TRAVEL">	</waypoint>
	<!-- #  8 --><waypoint x="6625" z="3735" y="175" type="TRAVEL">	</waypoint>
	<!-- #  9 --><waypoint x="6865" z="3579" y="175" type="TRAVEL">	</waypoint>
	<!-- # 10 --><waypoint x="7024" z="3481" y="192" type="TRAVEL">	</waypoint>
	<!-- # 11 --><waypoint x="7091" z="3301" y="193" type="TRAVEL">	</waypoint>
	<!-- # 12 --><waypoint x="7120" z="3227" y="192" type="TRAVEL">	</waypoint>
	<!-- # 13 --><waypoint x="7365" z="3196" y="184" type="TRAVEL">	</waypoint>
	<!-- # 14 --><waypoint x="7344" z="3345" y="184" type="TRAVEL">	</waypoint>
	<!-- # 15 --><waypoint x="7459" z="3360" y="184" type="TRAVEL">	</waypoint>
	<!-- # 16 --><waypoint x="7517" z="3168" y="184" type="TRAVEL">	</waypoint>
	<!-- # 17 --><waypoint x="7638" z="3172" y="184" type="TRAVEL">	</waypoint>
	<!-- # 18 --><waypoint x="7645" z="3107" y="184" type="TRAVEL">	</waypoint>
	<!-- # 19 --><waypoint x="7559" z="3021" y="184" type="TRAVEL">	</waypoint>
	<!-- # 20 --><waypoint x="7595" z="2802" y="184" tag="entrance"> 	
		queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
               		__WPL:setDirection(WPT_BACKWARD)
		else	
			 player:mount(true)
			__WPL:setDirection(WPT_FORWARD)
		end
	</waypoint>
	<!-- # 21 --><waypoint x="7378" z="2730" y="184">	
		queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance);
		end
	</waypoint>
	<!-- # 22 --><waypoint x="7423" z="2642" y="184">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
		</waypoint>
	<!-- # 23 --><waypoint x="7521" z="2593" y="183">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 24 --><waypoint x="7592" z="2559" y="185">	
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 25 --><waypoint x="7731" z="2528" y="184">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 26 --><waypoint x="7617" z="2350" y="183">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 27 --><waypoint x="7646" z="2174" y="185">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 28 --><waypoint x="7643" z="2019" y="184">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 29 --><waypoint x="7715" z="1864" y="184">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 30 --><waypoint x="7851" z="1747" y="185">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 31 --><waypoint x="7773" z="1650" y="185">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 32 --><waypoint x="7905" z="1518" y="185">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end
	</waypoint>
	<!-- # 33 --><waypoint x="7794" z="1378" y="185"  type="TRAVEL">
			queststate = getQuestStatus(424181);
         	if queststate == "complete" then
			player:mount()
			redirectToWaypointTag("entrance");
		end	
			__WPL:setDirection(WPT_BACKWARD)
	</waypoint>
</waypoints>

User avatar
ThulsaDoom
Posts: 128
Joined: Mon Oct 19, 2015 2:46 pm

Re: Xaviera - Catch Butterflies

#4 Post by ThulsaDoom » Fri Feb 03, 2017 2:42 am

Hi;
The code try to find the function "redirectToWaypointTag", you should have it defined somewhere.
Try this on <onLoad/> section or as a userfunction:

Code: Select all

function redirectToWaypointTag(tag)
	local idx = __WPL:findWaypointTag(tag);
	__WPL:setWaypointIndex(idx);
end;

najtel
Posts: 3
Joined: Fri Dec 30, 2016 6:36 pm

Re: Xaviera - Catch Butterflies

#5 Post by najtel » Fri Feb 03, 2017 5:18 am

Ty for the tip, got it working, had to replace redirectToWaypointTag("entrance"); with _WPL:setWaypointIndex(idx); , and it's working now :) ty vm

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest