Pārlūkot izejas kodu

Academy monster re-spawn (#3280)

* This PR adds a custom delay to avoid abusive behaviour in the novice academy.
Atemo 6 gadi atpakaļ
vecāks
revīzija
4db212bf1b
1 mainītis faili ar 18 papildinājumiem un 3 dzēšanām
  1. 18 3
      npc/re/jobs/novice/academy.txt

+ 18 - 3
npc/re/jobs/novice/academy.txt

@@ -11972,7 +11972,12 @@ OnReset:
 OnMyMobDead:
 	.@dead_num = mobcount(""+strnpcinfo(4)+"", "#"+strnpcinfo(2)+"::OnMyMobDead");
 	if (.@dead_num < 1)
-		donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
+		initnpctimer;
+	end;
+
+OnTimer5000:	// custom timer (there is officially no respawn delay)
+	stopnpctimer;
+	donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
 	end;
 
 OnSpawn:
@@ -12005,7 +12010,12 @@ OnReset:
 OnMyMobDead:
 	.@dead_num = mobcount(""+strnpcinfo(4)+"", "#"+strnpcinfo(2)+"::OnMyMobDead");
 	if (.@dead_num < 1)
-		donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
+		initnpctimer;
+	end;
+
+OnTimer5000:	// custom timer (there is officially no respawn delay)
+	stopnpctimer;
+	donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
 	end;
 
 OnSpawn:
@@ -12038,7 +12048,12 @@ OnReset:
 OnMyMobDead:
 	.@dead_num = mobcount(""+strnpcinfo(4)+"", "#"+strnpcinfo(2)+"::OnMyMobDead");
 	if (.@dead_num < 1)
-		donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
+		initnpctimer;
+	end;
+
+OnTimer5000:	// custom timer (there is officially no respawn delay)
+	stopnpctimer;
+	donpcevent "#"+strnpcinfo(2)+"::OnSpawn";
 	end;
 
 OnSpawn: