Page 1 of 1

logging another char issue that bugs me

Posted: Sun Feb 26, 2012 9:53 am
by lisa
I haven't pinpointed the cause as yet but this is starting to annoy me so i thought I would post it to see if others have it or not.

Ok so I have a very simple WP which walks tot he NPC in varanas that teleports you to sascilia steppes, where AT is.
Issue is that occasionally when new char logs it does this.

Code: Select all

Ranged skill found: SCOUT_SHOT
Changing to character 1 account 3.
Player address changed: 0x36655F00
No ranged skills specified in profile; Turning COMBAT_RANGED_PULL off.
Maximum range of range attack skills is less than COMBAT_DISTANCE 200. Reducing
COMBAT_DISTANCE setting to 50.
Loaded waypoint path varat.xml
No return path with default naming varat_return.xml found.
We use the normal waypoint path varat.xml now.
Loaded waypoint path varat.xml
No return path with default naming Vines_return.xml found.
We use the normal waypoint path varat.xml now.
Clearing target.
Moving to waypoint #1, (4952, -1899)
Clearing target.
Unsticking player... at position 0,0. Trial 1 from maximum 10 trials
Moving to waypoint #1, (4952, -1899)
Clearing target.
Unsticking player... at position 0,0. Trial 2 from maximum 10 trials
Moving to waypoint #1, (4952, -1899)
Clearing target.
Unsticking player... at position 0,0.
does that mean it thinks the character is at coords 0,0 ?? not even close to it's actual coords.

Notice at the start of what I posted it hss.

Code: Select all

Loaded waypoint path varat.xml
No return path with default naming varat_return.xml found.
We use the normal waypoint path varat.xml now.
Loaded waypoint path varat.xml
No return path with default naming Vines_return.xml found.
So it loads the same waypoint twice but checks for the return path of a completely different WP.
Normal print looks like this

Code: Select all

Loaded waypoint path varat.xml
No return path with default naming varat_return.xml found.
We use the normal waypoint path varat.xml now.
Moving to waypoint #1, (4952, -1899)
Moving to waypoint #2, (5112, -2085)
Moving to waypoint #3, (5218, -2231)
This is the WP varat.xml, has no mention of the WP vines which it printed about checking the return path.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
yrest(5000)
player:update()
</onload>
	<!-- #  1 --><waypoint x="4952" z="-1899" y="103">	</waypoint>
	<!-- #  2 --><waypoint x="5112" z="-2085" y="103">	</waypoint>
	<!-- #  3 --><waypoint x="5218" z="-2231" y="103">	</waypoint>
	<!-- #  4 --><waypoint x="5286" z="-2204" y="103">		
		player:target_NPC("Kat Ro")
		AcceptQuestByName()
		yrest(2000)
		player:target_NPC("Kat Ro")
		sendMacro("ChoiceOption(2);")
		waitForLoadingScreen(20)
		if getZoneId() == 2 or getZoneId() == 1002 then player:sleep() end
		loadPaths("AT")
	</waypoint>
</waypoints>
Ok so the WP before this one has this, it's name just happens to be vines.xml.
I am wondering if there is some residue left from the previous WP which is causing it issues?

Code: Select all

		SetCharList(CharList)
		unregisterTimer("GMdetection");
		LoginNextChar()
		yrest(5000)
		player:update()
		loadPaths("varat");
My other thought is that the vines.xml is purely onload, no actual waypoints, perhaps this is causing an issue.

Either way it is happening once every 6 or 7 chars.

Re: logging another char issue that bugs me

Posted: Sun Feb 26, 2012 12:41 pm
by rock5
Without actually seeing everything it's hard to figure out. Maybe you have nested code so when it finishes loading the next file it's going back to finish the previous code? So my guess is the problem is the onload waypoint you mentioned.

Re: logging another char issue that bugs me

Posted: Sun Feb 26, 2012 7:34 pm
by lisa
vines.xml is farely simple.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onload>
		repeat
			player:moveTo(CWaypoint(10317, 5435),true,false,30)
			player:target_NPC("Fiona Andus") yrest(500)
			AcceptQuestByName("The Elves")
			player:moveTo(CWaypoint(10340,5554),true,true,30)
			player:moveTo(CWaypoint(10322,5679),true,false,30)
			while getQuestStatus("The Elves' Defenses") == "incomplete" do
				player:update()
				player:target_Object("Protector Vine",1,false,false)
				if inventory:itemTotalCount(209459) > 3 then yrest(1000) end
			end
			player:moveTo(CWaypoint(10340,5554),true,true,30)
			player:moveTo(CWaypoint(10317, 5435),true,false,30)
			player:target_NPC("Fiona Andus") yrest(500)
			CompleteQuestByName("The Elves") yrest(1500)
		until RoMScript("Daily_count()") == 10
		
		yrest(3000)
		RoMScript('CastSpellByName("Transport: Heffner Camp")')
		waitForLoadingScreen()
		yrest(1000)
		player:target_NPC("Snoop the Stubborn")
		sendMacro("ChoiceOption(2);")
		yrest(1000)
		sendMacro('StaticPopup_OnClick(StaticPopup1, 1);')
		waitForLoadingScreen();
		yrest(1000)
		player:moveTo(CWaypoint(2776,963))
		player:target_NPC("Lieve");	
		yrest(1000)	
		ChoiceOptionByName("Central")
		waitForLoadingScreen(30)
		yrest(5000)
		player:update()
		player:moveTo(CWaypoint(4847,-1884))
	
		CharList = {
		
		{account=1,chars={1,2,3}},
		{account=2,chars={2,3,4}},
		{account=3,chars={1,3,4}},
		{account=4,chars={1,2,3}},
		{account=5,chars={2,3}},
		}

		SetCharList(CharList)
		unregisterTimer("GMdetection");
		LoginNextChar()
		yrest(5000)
		player:update()
		loadPaths("varat");
</onload>
</waypoints>
So the loadPaths is the very last bit of code being done.
I added the 5 second rest and the player:update just before loadPaths hopping I wouldn't get that player at coords 0,0 but it still does it.

Re: logging another char issue that bugs me

Posted: Sun Feb 26, 2012 8:56 pm
by Romplayer
i think it has to do with loading loadPaths not in a waypoint.

I've run into loadPaths messing up tho by loading 2 paths at once, by mistake i coded 2 if statements at a waypoint and both were true and it loaded 2 different .xmls but finally sticking to the first xml loaded it was weird it would load FPublicTURNIN1.xml then load FPublic1toPublic.xml then load up FPublicTURNIN1.xml then it would mount repeatedly b/c there was player:mount() in FPublicTURNIN1.xml... all errata but i do notice when using loadPaths there is a 2 second or so buffer time before it moves or whatever maybe that buffer is making the residue maybe try using the outdated method of loadPaths... i forgot what it was... path_load or load_Paths?

Re: logging another char issue that bugs me

Posted: Mon Feb 27, 2012 1:13 am
by rock5
lisa wrote:So the loadPaths is the very last bit of code being done.
So it's not what I said. Still, I think it has something to do with the sequence it does things. As far as I know, it loads the waypoints, calculates the closest waypoint then runs the onload. I'm not sure how it's resulting in your proble.

Re: logging another char issue that bugs me

Posted: Mon Feb 27, 2012 1:23 am
by lisa
theory I have at the moment is the last bit of code int he vines WP is to loadpath but then it keeps going anyway, sort of, and what is next is to move to a waypoint that doesn't exist, which results in it trying to get to 0,0.

Then somehow it thinks it is at 0,0 when the next WP actually loads, even though I added player:updates every in between to try and stop it.


Think I will need to add a lot of prints to narrow it down =(