소스 검색

Academy monster re-spawn (#3280)

* This PR adds a custom delay to avoid abusive behaviour in the novice academy.
Atemo 6 년 전
부모
커밋
4db212bf1b
1개의 변경된 파일18개의 추가작업 그리고 3개의 파일을 삭제
  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: