Well i just dont see the point in having that large amount of code for a simple task...
You just add a simple If condition with (not ZetaDia.CurrentWorldId == 154587) to check which dungeon you are in and the use <ExploreDungeon questId="72801" stepId="2" boxTolerance="0.45" boxSize="30" exploreUntilExit="False" /> if its a Fake dungeon. You can do the same with the "real" dungeon then you just do ZetaDia.CurrentWorldId == 154587 and return it as <ExploreDungeon questId="72801" stepId="2" boxTolerance="0.45" boxSize="30" exploreUntilExit="True" exitNameHash="-1861222193" />.
Its alot more simple............
Still don't get it huh?
Facts:
There are (3) dungeons in the cemetery
All (3) dungeons are at static positions
All (3) dungeons have the same actorid
All (3) dungeons have different worldid and spawns randomly.
Even with destinationWorldId="154587", it will still get ignored and enter in the closest portal near you.
That is where my code comes in. It goes to dungeon (1) and check if CurrentWorldId == 154587, if not, go to dungeon (2) and check if CurrentWorldId == 154587, if not, go to dungeon (3) and check if CurrentWorldId == 154587. Once it finds CurrentWorldId == 154587, it then use ExploreDungeon.
There is no need to ExploreDungeon when it isn't CurrentWorldId == 154587, therefore my code runs to dungeon 1,2, and 3, until CurrentWorldId == 154587 is found and then you can proceed to ExploreDungeon.
That is why I don't know why you throw in ExploreDungeon because that has no resemblance in the problem we are trying to fix. The initial problem we were talking about is finding the "correct randomly spawned dungeon".
I don't get why you still don't understand it, maybe if you actually try out my code and your code, you will understand, cause i tried it first hand and understand it all. I think you are confusing randomly spawned dungeon for dungeon that is randomized inside.
EDIT: JUST TRY YOUR PART OF THE CODE, so you can see ><