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...
Xaviera - Catch Butterflies
Re: Xaviera - Catch Butterflies
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
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
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
Re: Xaviera - Catch Butterflies
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.
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>
- ThulsaDoom
- Posts: 131
- Joined: Mon Oct 19, 2015 2:46 pm
Re: Xaviera - Catch Butterflies
Hi;
The code try to find the function "redirectToWaypointTag", you should have it defined somewhere.
Try this on <onLoad/> section or as a userfunction:
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;
Re: Xaviera - Catch Butterflies
Ty for the tip, got it working, had to replace redirectToWaypointTag("entrance"); with _WPL:setWaypointIndex(idx); , and it's working now ty vm
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 1 guest