yes, this script has a bug, good job on pointing this out
this event can only ends when someone ACTUALLY play this event,
the .RoundCount variable only increase when someone answer it right
if nobody ever participate in this event, or players give up after 9 correct guess, the npc will continue non-stop
instead of ending after 40 minutes, its better to make it stop at exactly 10 rounds (.Rounds), including wrong guesses or nobody actually playing it
change the code under OnTimer30000: into something like this
OnTimer30000:
if (.Timer) end;
set .Change,0;
setnpcdisplay "Disguise Event",795;
npctalk "Disguise Event : You took too long to guess what I was. Please wait 10 seconds while I disguise again.";
specialeffect EF_DETECT2;
set $MonsterName$,"";
deletepset 1;
stopnpctimer;
setnpctimer 0;
set .RoundCount,.RoundCount+1;
if (.RoundCount>=.Rounds) {
setnpcdisplay "Disguise Event",795;
set .RoundCount,0; set .Change,0; set .EventON,0;
setnpctimer 0; stopnpctimer;
npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";
end;
}
initnpctimer;
end;
honestly speaking ... the way euphy rewrite this script is still not very optimize ...
if he actually learn to use sleep command, the script will be extremely clean ... I dislike using npc timers because of this reason