Page 2 of 2

Re: GoThroughPortal() - (Rock5 please come)

Posted: Wed Dec 12, 2012 4:11 pm
by mrtgtr
Can we solve this in different ways ?

Re: GoThroughPortal() - (Rock5 please come)

Posted: Wed Dec 12, 2012 6:12 pm
by mrtgtr
Maybe we can use getZoneId how I can use it ? I don't know
I tryied bot is give error. :S

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Wed Dec 12, 2012 9:49 pm
by rock5
Not needed. GoThroughPortal saves your current position then tries to portal. If it changes location then the portal worked and the function returns true. If your location doesn't change then it returns false and it can try again. This is 100% reliable. I don't use a zone check because some teleports can be to the same zone.

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 12:03 am
by mrtgtr
rock5 wrote:Not needed. GoThroughPortal saves your current position then tries to portal. If it changes location then the portal worked and the function returns true. If your location doesn't change then it returns false and it can try again. This is 100% reliable. I don't use a zone check because some teleports can be to the same zone.
rock5 I tryied to portal range to 50 and I set waypoint close to the exit portal but bot is didnt see the exit portal when I set portal range to 150 char is going to wrong portal

so bot is not see the kalin's exit portal :(

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 1:06 am
by rock5
It is possible it has like a double portal.

Ok, try this

Code: Select all

GoThroughPortal(nil,110987)

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 1:25 am
by mrtgtr
rock5 wrote:It is possible it has like a double portal.

Ok, try this

Code: Select all

GoThroughPortal(nil,110987)
Portal not found within range of 150 , I am near the portal :S

if not GoThroughPortal(nil,110987) then
__WPL:setWaypointIndex(__WPL.LastWaypoint - 1)
end

I think portal ID is wrong

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 1:39 am
by lisa
110578

that's as much as I am going to say.

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 2:05 am
by mrtgtr
lisa wrote:110578

that's as much as I am going to say.
thanx now going to true portal but when leave the dungeon bot says distance break :S

I must put waitforloadingscreen ?

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 3:04 am
by rock5
mrtgtr wrote:I think portal ID is wrong
Sorry I went out of ks and tested the function outside then accidentally copied the wrong id.
mrtgtr wrote:thanx now going to true portal but when leave the dungeon bot says distance break :S
It looks like it portals before it decides it reached the ids coords. The important thing is did it work? The distance break message didn't cause it to error did it?

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 3:52 am
by mrtgtr
rock5 wrote:
mrtgtr wrote:I think portal ID is wrong
Sorry I went out of ks and tested the function outside then accidentally copied the wrong id.
mrtgtr wrote:thanx now going to true portal but when leave the dungeon bot says distance break :S
It looks like it portals before it decides it reached the ids coords. The important thing is did it work? The distance break message didn't cause it to error did it?
I dont understand google translate is absurd translate

It did not work.Char is leaving dungeon and bot says distance break and char must leaving to party It is not leaving party and re-enter dungeon my last waypoint is this

Code: Select all

<!-- # 14 --><waypoint x="-18636" z="12189" y="-778">
   player:update();
   RoMScript("LeaveParty()");
   yrest(500)
   function settings.profile.events.onSkillCast()
   inventory:update()
   if 1 > inventory:itemTotalCount(0) then
   loadPaths("kalingerigelme.xml");
   end
</waypoint>
It is not apply to last code and re-enter to dungeon

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Thu Dec 13, 2012 11:39 am
by Budzer
Well there is some issue with waitForLoadingScreen(); As sometimes once every 10 runs on my KS alt, he passes trough portal and try to go back. Have no idea why. No problem while using GoThroughPortal()....

Re: Sometimes char does not leave the dungeon (Bug)

Posted: Fri Dec 14, 2012 6:01 am
by rock5
Try the new version of GoThroughPortal http://www.solarstrike.net/phpBB3/viewt ... 916#p37916

With Lisas help we've made it a lot more reliable.