Page 1 of 1
selecting waypoint files
Posted: Mon Mar 03, 2014 1:36 pm
by masstic1es
So a few different questions here. Is there a way to select the next waypoint file based on the waypoint you came from?
example:
There is A1,A2, B (which you are currently on) and C1, C2. so if you came from A1 you would continue to C1, A2 -> C2, etc.
secondly, what defines a players secondary class level? i've seen player.class for the class type, and player.Level for the primary level. but what about their secondary level?
Noob questions I'm sure.
Also, is there a resource where it lists all the predefined items? (like player.Level, etc)?
Thanks!

Re: selecting waypoint files
Posted: Mon Mar 03, 2014 5:55 pm
by lisa
masstic1es wrote:secondly, what defines a players secondary class level? i've seen player.class for the class type, and player.Level for the primary level. but what about their secondary level?
first class is
player.Class1
second class is
player.Class2
first lvl is
player.Level
second lvl is
player.Level2
masstic1es wrote:So a few different questions here. Is there a way to select the next waypoint file based on the waypoint you came from?
You will need to tell the bot that you have finished with A1 and to start C1, this is done with
loadPaths("C1")
You need that code to be in the A1 waypoint.
Have a look at the waypoints that come with the bot, like 1-10PioneersQuests
Re: selecting waypoint files
Posted: Mon Mar 03, 2014 6:52 pm
by masstic1es
hmmm, I don't think I made it clear with what I meant.
I have multiple waypoints for doing secondary leveling at CoO, at each of the portal spots various dailies can be done. I can set them up according to secondary level, but than I would need to compensate for when I do the class swap.
examples included, I was gonna try explaining, but maybe by looking at the code you'd get a better idea?
Class Swap
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
__WPL:setWaypointIndex(1)
function checkdaily()
local dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()");
if dailyQuestsPerDay == dailyQuestCount then
RoMScript("Logout();");
error("dailies complete")
else
printf("You've done "..dailyQuestCount.." of " .. dailyQuestsPerDay .. " Daily Quests.\n");
end
end
</onload>
<!-- # 1 --><waypoint x="-6322" z="-3915" y="176"> </waypoint> -- Snoop
<!-- # 2 --><waypoint x="-6839" z="-3654" y="193"> </waypoint>
<!-- # 3 --><waypoint x="-6941" z="-3648" y="173">
player:target_NPC(117291) -- Nicole Rebecca
ChoiceOptionByName(getTEXT("SO_110581_1")) -- 'I want to switch my primary and secondary class.'
player:update()
checkdaily()
</waypoint> -- House Maid
<!-- # 2 --><waypoint x="-6839" z="-3654" y="193"> </waypoint>
<!-- # 1 --><waypoint x="-6322" z="-3915" y="176">
player:target_NPC(118002) -- Snoop the Stubborn
ChoiceOptionByName("Transport to: Desert Investigation Post")
AcceptPopup(SET_REQUESTDIALOG);
waitForLoadingScreen();
-- loadPaths("CoO_35_Power_for_Thousands")
loadPaths("CoO_38_Life_Hormone")
</waypoint> -- Snoop
</waypoints>
wp1
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
__WPL:setWaypointIndex(1)
</onload>
<!-- # 1 --><waypoint x="-7537" z="1467" y="632">
if player.Class1 == CLASS_XXX then
player:target_NPC(117281) -- Mufasa Luckshine
CompleteQuestByName(423957) -- Power for a Thousand Miles
__WPL:setWaypointIndex(__WPL:findWaypointTag("return"));
end
if player.Class1 == CLASS_XXX then
player:target_NPC(117281) -- Mufasa Luckshine
AcceptQuestByName(423957) -- Power for a Thousand Miles
wallon()
end
</waypoint>
<!-- # 2 --><waypoint x="-7600" z="1481" y="615">
player:target_Object(117580) -- High Power Generator
walloff()
</waypoint>
<!-- # 3 --><waypoint x="-7528" z="1780" y="612"> </waypoint>
<!-- # 4 --><waypoint x="-7427" z="2019" y="609"> </waypoint>
<!-- # 5 --><waypoint x="-7829" z="2339" y="523"> </waypoint>
<!-- # 6 --><waypoint x="-9369" z="2704" y="468"> </waypoint>
<!-- # 7 --><waypoint x="-9505" z="3210" y="465">
repeat
player:target_Object(117406) -- Fourth Grade Energy Snooper
yrest(15000);
until getQuestStatus(423957) == "complete"
</waypoint>
<!-- # 10 --><waypoint x="-9388" z="3227" y="527"> </waypoint>
<!-- # 11 --><waypoint x="-7982" z="2323" y="522"> </waypoint>
<!-- # 12 --><waypoint x="-7497" z="2170" y="549"> </waypoint>
<!-- # 13 --><waypoint x="-7615" z="2031" y="575"> </waypoint>
<!-- # 14 --><waypoint x="-7440" z="1928" y="614"> </waypoint>
<!-- # 15 --><waypoint x="-7572" z="1687" y="614"> </waypoint>
<!-- # 16 --><waypoint x="-7401" z="1181" y="615" tag="return">
player:target_NPC(118020) -- Ailic's Aide
ChoiceOptionByName("Transport to: Heffner Camp")
AcceptPopup(SET_REQUESTDIALOG);
waitForLoadingScreen();
loadPaths("CoO_class_switch_Desert")
</waypoint>
</waypoints>
wp2
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload>
__WPL:setWaypointIndex(1)
</onload>
<!-- # 1 --><waypoint x="-7489" z="1580" y="615"> </waypoint>
<!-- # 2 --><waypoint x="-7562" z="1750" y="613"> </waypoint>
<!-- # 3 --><waypoint x="-7419" z="2031" y="611"> </waypoint>
<!-- # 4 --><waypoint x="-7387" z="2467" y="534"> </waypoint>
<!-- # 5 --><waypoint x="-7250" z="2597" y="535"> </waypoint>
<!-- # 6 --><waypoint x="-7434" z="2891" y="578">
player:target_NPC(117588) -- Anbenron
if player.Level >= 38 then
AcceptQuestByName(423958) -- Life Hormone
else
CompleteQuestByName(423958) -- Life Hormone
end
</waypoint>
<!-- # 7 --><waypoint x="-7171" z="2617" y="526"> </waypoint>
<!-- # 8 --><waypoint x="-7636" z="2027" y="576"> </waypoint>
<!-- # 9 --><waypoint x="-7451" z="1945" y="612"> </waypoint>
<!-- # 10 --><waypoint x="-7526" z="1673" y="615"> </waypoint>
<!-- # 11 --><waypoint x="-7413" z="1180" y="615">
player:target_NPC(118020) -- Ailic's Aide
ChoiceOptionByName("Transport to: Heffner Camp")
AcceptPopup(SET_REQUESTDIALOG);
waitForLoadingScreen();
loadPaths("CoO_class_switch_Desert")
</waypoint>
</waypoints>
So, I'm trying to figure out a way to have it remember the last waypoint file it came from, to reload it when it swaps classes. Am i just over thinking this? The big picture is to just load 1 file and regardless of where my character is level wise, it will load and complete the appropriate daily.
Re: selecting waypoint files
Posted: Mon Mar 03, 2014 8:31 pm
by lisa
The easiest way I can think of to "remember" the previous WP is to just set a global variable in the onload.
So in wp1 you would have
Code: Select all
<onload>
__WPL:setWaypointIndex(1)
previouswp = "wp1"
</onload>
Then when you want to go back to that WP again just do
Of course this would only work if you don't have crashes or restart the change class WP for what ever reason.
If it was me I would do something crazy and just put the whole lot in 1 file, ohh wait I did do something similar ages ago
have a look
I set this up so regardless of where the char is upto in it's level/dailies it would always do the daily that it was on, because the bot goes to nearest WP by default.
Can't remember how many chars I did this with but I am pretty sure it worked well, it was a loooooong time ago.
Keep in mind this was just for the dailies and I had another WP that moved them from place to place and did quests along the way but each day I could start the daily wp and the dailies would get done without any hassle.
Re: selecting waypoint files
Posted: Tue Mar 04, 2014 12:42 am
by masstic1es
LoL! yeah, you definitely made it much more simple than I did
I decided to take a slightly different approach, I took what you said and combined the class swap and quest turn-in into 1 waypoint, and added some arguments for getting quest items if not enough. The entire file is called based on secondary level. so player spawns into predefined area, bot checks secondary class level, and sends character off to do the appropriate daily
that being said, would this argument be correct?
Code: Select all
if 38 > player.Level2 and player.Level2 >= 36 then
loadPaths("daily")
end
basically if I'm checking that both are true, can i do it this way? or do they need to be encased in "()"?
Re: selecting waypoint files
Posted: Tue Mar 04, 2014 12:49 am
by rock5
That's fine. That basically means if level2 is 36 or 37.