Issue information

Issue ID
#3616
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Sep 26, 2009 7:05
Last Post
Hercules Elf Bot
Mar 5, 2012 16:09
Confirmation
N/A

Hercules Elf Bot - Sep 26, 2009 7:05

Originally posted by [b]Kazukin[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3616

If there is a player waiting inside the waitingroom while its event trigger is disabled because another player is doing the quest, and the player doing the quest completes the optional portion where 'Am Muts' are summoned, the script will get halted and the quest will be bugged 'till the next reboot/reloadscript.

After completing the 'Am Mut' portion the following executes:
QUOTE
donpcevent "Assistant#ama::Onreset"; // <- Enables the waitingroomevent triggering the event
donpcevent "Timer#ama::OnDisable"; // Stops the timer AFTER a new timer is initialized by the above


This enables the waitingroomevent:
QUOTE
Onreset:
enablewaitingroomevent "Assistant#ama";
end;


Which causes the immediate execution of this code if there is a player already inside:
QUOTE
OnStartArena:
disablenpc "Coach#ama";
disablenpc "Am Mut::Onreset";
donpcevent "Dokebi#ez::Onreset";
donpcevent "Dokebi#hd::Onreset";
enablenpc "Grandma#ama1";
enablenpc "Grandpa#ama";
warpwaitingpc "ama_test",50,83;
donpcevent "Timer#ama::OnEnable"; // <-- initnpctimer
disablewaitingroomevent "Assistant#ama";
end;

After this executes, the call returns to:
QUOTE
donpcevent "Timer#ama::OnDisable"; // <-- stopnpctimer

Which stops the npc timer, so this player will play the event without the timer active.

If this player finishes the quest without doing the 'Amt Mut' portion the script will be able to function again.

However, if this player either logs out/loses the quest will be effectively bugged 'till the next reboot/reloadscript because if there is no timer, the waitingroomevent will never get enabled again. This also happens if this players finishes the 'Am Mut' portion and there isn't another player waiting inside the waiting room.

So... basically, the order should be:
QUOTE
donpcevent "Timer#ama::OnDisable"; // Line 725
donpcevent "Assistant#ama::Onreset";

Instead of:
QUOTE
donpcevent "Assistant#ama::Onreset"; // Line 725
donpcevent "Timer#ama::OnDisable";


This post has been edited by Kazukin: Sep 26 2009, 12:07 AM