Page 1 of 1
DOD exit load screen problem
Posted: Thu Jun 20, 2013 12:25 pm
by 883Dman
This is the biggest frustration I am having with my DOD script. The problem is the bot not recognizing that it has entered or exited (most often on exit) and continues to run to the next dungeon waypoint while having already exited into the sewers. The bot then runs to the end of the hall until reaching the wall. This is fairly frequent. Is there a way to have the bot occasionally verify its position relative to the waypoint it is trying to reach? Some sort of check that says "oh, I'm here not here so I'll go ahead and run to the nearest waypoint of my current position".
The other problem is the disappearing exit portal but nothing we can do about that. Thanks.
Re: DOD exit load screen problem
Posted: Thu Jun 20, 2013 1:29 pm
by rock5
You probably just need to add a pause after transporting and then do a player:update().
Re: DOD exit load screen problem
Posted: Thu Jun 20, 2013 3:21 pm
by 883Dman
Ah, playerupdate. I knew it wouldbe simple. I did put (20) in the waitforloadscreen, but that didn't do anything. How do I add a pause to the load screen?
Re: DOD exit load screen problem
Posted: Thu Jun 20, 2013 10:30 pm
by rock5
You can't make waitForLoadingScreen wait extra. The number you give waitForLoadingScreen is the maximum time it should wait for the loading screen. Once the loading screen appears, it just waits for it to disappear then returns control. It
does wait a couple of seconds and then do a playerupdate before returning control but for some systems/servers it's not enough so you have to do an extra wait and update. eg.
Code: Select all
waitForLoadingScreen(20)
rest(3000)
player:update()
Note, I use rest in this case because yrest 'yields' to other threads, such as the gmmonitor userfunction, and you don't want other code running if the game hasn't fully loaded yet.
Also, make sure you aren't still using revision 758 as I temporarily tried removing the player:update() from waitForLoadingScreen. It was restored in 759.
Re: DOD exit load screen problem
Posted: Fri Jun 21, 2013 12:28 am
by 883Dman
Ah, I had yrest in there. maybe that's why it's not working. Thanks.
Re: DOD exit load screen problem
Posted: Fri Jun 21, 2013 1:02 am
by rock5
883Dman wrote:Ah, I had yrest in there. maybe that's why it's not working. Thanks.
I doubt it. Typically something yielded to might cause an error but if it doesn't error then doing a player:update() after a sufficient pause should fix the player coords and it should work correctly. Maybe there is something wrong with the code in general, that you use to portal. If it still happens it might help to see your porting code. Or maybe you could just use the 'travelTo' userfunction to get to Dod.