Help: new Userfunction CheckInstance
Posted: Sat Apr 16, 2011 1:49 pm
Ok, biggest problem I'm having is when I'm trying to enter the Cyclops Stronghold instance to farm for gold. Since the instance entrance glitches, you sometimes do not enter the instance when you approach it. Because of this my character just stands there doing nothing and eventually gets killed because a mob comes up and attacks while waiting for the loading screen. My pain in the butt brainchild is this:
I know the coding is defunct. I don't really know what I'm doing, but trying to go with the idea anyway. I do not know what is allowed and what is not. I'm just trying to pull code that I can see in your existing LUA coding and mash it together to make my function.
The idea is this: Once it arrives at the waypoint that is supposed to trigger the loading into the instance it checks that waypoint value against the previous waypoint. If it determines that the last waypoint isn't changed then it needs to return to that last waypoint and try again. If it sees that it has changed then it can continue with a loading screen wait and then continue with the rest of the waypoints.
As I said, my coding is a horror story and shows I have no clue what I'm doing but I'm hoping my idea is a good one and something you'd like to incorporate into your code. As I see it, it could come in handy for many things. Maybe something like this is already in existence and I just can't find a reference to it. If that's the case could you please inform me of what that command is and how to use it?
Thank in advance for any advice.
I know the coding is defunct. I don't really know what I'm doing, but trying to go with the idea anyway. I do not know what is allowed and what is not. I'm just trying to pull code that I can see in your existing LUA coding and mash it together to make my function.
Code: Select all
function CheckInstance()
self:setWaypointIndex(self:getNearestWaypoint(player.X, player.Z, player.Y));
self.LastWaypoint = self.CurrentWaypoint -1
if self.LastWaypoint < 1 then
self.CurrentWaypoint = self.CurrentWaypoint - 2;
else
waitForLoadingScreen();
yrest(1000);
end
endAs I said, my coding is a horror story and shows I have no clue what I'm doing but I'm hoping my idea is a good one and something you'd like to incorporate into your code. As I see it, it could come in handy for many things. Maybe something like this is already in existence and I just can't find a reference to it. If that's the case could you please inform me of what that command is and how to use it?
Thank in advance for any advice.