Page 1 of 1
Waypoint jumping
Posted: Sun Dec 04, 2011 7:24 am
by zarakie
Hi again i got the last issue for the opening new way point fixed already tx to u rock .
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("userdefault"); -- Profile name
But what is really strange happening now is the Same Ks.xml file im using doing funny now again if i run the file alone it works perfectly and with that code the bot stooped to move and jumped and rotate screen etc . but now its choosing Different Way point suddenly at the start ex: its when it start it tells me " hence way point #66 is closer than 1 we start from it " or something but again when i run the bot as new way point file it works but if i Let another way point file open it that's what happens .
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 7:41 am
by rock5
I fixed the issue with changing character recently. Have you updated?
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 2:47 pm
by zarakie
Yah i updated both SVN and Rombot with update.lua and SVN update , the issue is still the same without the above code . but what i meant with the last question is the player choose to Run to different way point rather than start from beginning only at the dungeon not Outside it works fine outside and i tested the dungeon way-point alone without loading from another waypoint and its works great ,, its exactly happens like the file i attached thanks for help Rock once more.
I will Include the dungeon file maybe it show something .
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 3:48 pm
by BillDoorNZ
Hmm...very interesting that one. Clearly your character is at 4478, 949 (as the error message indicates). So it shouldn't be finding #66 as your closest waypoint.
Do you have any code in your onLoad for your characters profile?
Also, prolly best to cut out / overwrite your characters name when you grab screenshots !!

Re: Waypoint jumping
Posted: Sun Dec 04, 2011 5:00 pm
by zarakie
No no Onload code at all and that's whats makes me wonder why he choose that point :S he don't do that with other way-point file unless they are in dungeon.
tx for the warning about the name XD .already removed
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 5:20 pm
by BillDoorNZ
just another side note
I am assuming that in waypoint 1 where you do:
Code: Select all
<onLoad>changeProfileOption("TARGET_LEVELDIF_BELOW", 20);
changeProfileOption("MAX_TARGET_DIST", 50);
changeProfileOption("LOOT_DISTANCE", 60);
changeProfileOption("LOOT_AGAIN", 2000);
RoMScript("SetBootFrameAutoTake(1)");
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("MYTOONSPROFILE"); -- Profile name
that the changeProfileOption lines should be put below the settings.loadProfile ?? Presumably the settings.loadProfile call will overwrite the changeProfileOption changes?
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 5:22 pm
by BillDoorNZ
maybe a
call after the player = CPlayer.new();???
ahh...nm...I see it makes a call to that in the contructor anyway

Re: Waypoint jumping
Posted: Sun Dec 04, 2011 5:33 pm
by BillDoorNZ
nice hack below that might work:
Code: Select all
<onLoad>
RoMScript("SetBootFrameAutoTake(1)");
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("Xera"); -- Profile name
changeProfileOption("TARGET_LEVELDIF_BELOW", 20);
changeProfileOption("MAX_TARGET_DIST", 50);
changeProfileOption("LOOT_DISTANCE", 60);
changeProfileOption("LOOT_AGAIN", 2000);
__WPL:setWaypointIndex(1);
</onLoad>
Re: Waypoint jumping
Posted: Sun Dec 04, 2011 5:52 pm
by zarakie
Love u Man it worked

Re: Waypoint jumping
Posted: Mon Dec 05, 2011 1:10 pm
by BillDoorNZ
lol, glad I could help...not sure why its not getting the right index tho!

Re: Waypoint jumping
Posted: Mon Dec 05, 2011 10:33 pm
by rock5
Well, it is a bit unusual to load the profile in the onload section of the waypoint. I haven't seen it done like theat before. Off the top of my head I don't see an issue with that but maybe there is.
Re: Waypoint jumping
Posted: Mon Dec 05, 2011 11:13 pm
by lisa
I generally do it after doing the relog code, that way the profile is loaded before the WP, so the player information like coords is correct.
The issue of starting at the wrong waypoint might come down to that.
Re: Waypoint jumping
Posted: Tue Dec 06, 2011 5:37 am
by Germangold
This is rougly my onload section for my ks file
i have 10 Chars farming KS from start throgh boss "Locata" and then leaving ks to rerun
two pc's each runing 10 instances (5 for ks chars, 5 for invite buddys)
Code: Select all
<onLoad>
repeat zoneid = RoMScript("GetZoneID()") until zoneid
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));
-- your charnames
_firstChar = "firstchar";
_secondChar = "secondchar";
_thirdChar = "thirdchar";
-- generall idea is that each KS chars has a sparing partner
-- that is waitung for an invite
-- that to the addon InvitedByFriend
-- it automatically accepts the invite
--
function myinvite()
if (player.Name == _firstChar) then
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("firstToon")');
yrest(4000)
end
end
if (player.Name == _secondChar) then
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("secondtoon")');
yrest(4000)
end
end
if (player.Name == _thirdChar) then
while not RoMScript("UnitExists('party1')") do
sendMacro('InviteByName("thirdtoon")');
yrest(4000)
end
end
end
-- this is my subfunction that i check after 10-15 waypoint
-- to ensure there is still bagspace left while farming in ks
--
function bagchecker()
if inventory:itemTotalCount(0) == 0 then
sendMacro("LeaveParty();");
waitForLoadingScreen();
player:update();
__WPL:setWaypointIndex(__WPL:findWaypointTag("rerun"));
end
end
-- created this function to resolve someproblems with entering the ks portal
-- but i dont need it anymore thx to waittoloadingscreen()
function sokzone()
repeat zoneid = RoMScript("GetZoneID()") until zoneid
if (zoneid == 107) then
-- already in sok and go to first Sok coords
-- do nothing
end
if (zoneid == 6) or (zoneid == 1006) then
-- dust devil mountains
keyboardPress(key.VK_W); yrest(1000);
end
end
myinvite();
function myprofile()
if (player.Name == _secondChar) then
player = CPlayer.new();
settings.load();
settings.loadProfile("clfarm2");
-- clfarm2 is a profile for a mage/druid
end
if (player.Name ~= _secondChar) then
player = CPlayer.new();
settings.load();
settings.loadProfile("clfarm");
-- clfarm uses mainly purgartory fire to clean up monster group a
-- clfarm is a profile fora mage/priest
end
end
myprofile();
</onLoad>
Re: Waypoint jumping
Posted: Tue Dec 06, 2011 7:03 am
by lisa
I'd say the reason yours works is because you tell it to find nearest waypoint.
Code: Select all
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z));
On a side note you don't need to use
Code: Select all
repeat zoneid = RoMScript("GetZoneID()") until zoneid
anymore, I added a function to get id from memory.
Because it gets it from memory it will have values even while in loading screen, so you will never get a nil returned.