Преглед изворни кода

* Script updates:
- Updated Nameless Island quests and added questlog support in quests_nameless and quests_prontera. (fixes bugreport:7992)
- Updated "God Item Creation" scripts to their latest versions: seals roll at 25/50 instead of 50/100 in Renewal.
- Updated Soul Linker job quest with new checks.
- Fixed an untranslated Manuk NPC.
- Some follow-ups to previous commits.

* GM Management System:
- Enabled all official GM Management NPCs and wrote a function to control their usage.
- Implemented some missing GM Management NPCs (still incomplete).

Signed-off-by: Euphy <euphy@rathena.org>

Euphy пре 11 година
родитељ
комит
5ab4d5ea90
60 измењених фајлова са 2687 додато и 2139 уклоњено
  1. 1 1
      db/item_delay.txt
  2. 3 3
      db/re/item_db.txt
  3. 3 1
      doc/script_commands.txt
  4. 8 8
      npc/battleground/bg_common.txt
  5. 7 7
      npc/battleground/flavius/flavius01.txt
  6. 7 7
      npc/battleground/flavius/flavius02.txt
  7. 8 8
      npc/battleground/tierra/tierra01.txt
  8. 8 8
      npc/battleground/tierra/tierra02.txt
  9. 4 8
      npc/cities/manuk.txt
  10. 1 1
      npc/cities/prontera.txt
  11. 6 9
      npc/events/gdevent_aru.txt
  12. 6 9
      npc/events/gdevent_sch.txt
  13. 12 12
      npc/events/god_se_festival.txt
  14. 28 31
      npc/instances/EndlessTower.txt
  15. 107 1
      npc/instances/NydhoggsNest.txt
  16. 55 6
      npc/jobs/2-2e/SoulLinker.txt
  17. 5 3
      npc/kafras/dts_warper.txt
  18. 12 11
      npc/other/arena/arena_aco.txt
  19. 58 82
      npc/other/arena/arena_room.txt
  20. 152 0
      npc/other/gm_npcs.txt
  21. 8 9
      npc/other/marriage.txt
  22. 68 4
      npc/other/monster_race.txt
  23. 3 4
      npc/quests/dandelion_request.txt
  24. 3 3
      npc/quests/first_class/tu_acolyte.txt
  25. 49 44
      npc/quests/quests_13_1.txt
  26. 29 41
      npc/quests/quests_13_2.txt
  27. 12 16
      npc/quests/quests_ein.txt
  28. 267 1
      npc/quests/quests_geffen.txt
  29. 68 1
      npc/quests/quests_juperos.txt
  30. 65 1
      npc/quests/quests_lighthalzen.txt
  31. 86 4
      npc/quests/quests_morocc.txt
  32. 55 1
      npc/quests/quests_moscovia.txt
  33. 470 851
      npc/quests/quests_nameless.txt
  34. 66 40
      npc/quests/quests_prontera.txt
  35. 2 2
      npc/quests/quests_rachel.txt
  36. 17 1
      npc/quests/quests_veins.txt
  37. 95 117
      npc/quests/seals/brisingamen_seal.txt
  38. 65 89
      npc/quests/seals/god_global.txt
  39. 50 34
      npc/quests/seals/god_weapon_creation.txt
  40. 127 123
      npc/quests/seals/megingard_seal.txt
  41. 136 138
      npc/quests/seals/mjolnir_seal.txt
  42. 234 299
      npc/quests/seals/sleipnir_seal.txt
  43. 5 6
      npc/re/guild/invest_main.txt
  44. 15 1
      npc/re/instances/BakonawaLake.txt
  45. 4 5
      npc/re/instances/BangungotHospital.txt
  46. 6 5
      npc/re/jobs/3-1/archbishop.txt
  47. 12 11
      npc/re/jobs/3-1/guillotine_cross.txt
  48. 3 3
      npc/re/jobs/3-1/ranger.txt
  49. 4 5
      npc/re/jobs/3-1/rune_knight.txt
  50. 4 4
      npc/re/jobs/3-1/warlock.txt
  51. 3 3
      npc/re/jobs/3-2/royal_guard.txt
  52. 3 3
      npc/re/jobs/3-2/sura.txt
  53. 4 5
      npc/re/jobs/repair.txt
  54. 16 25
      npc/re/quests/eden/eden_quests.txt
  55. 29 1
      npc/re/quests/quests_dicastes.txt
  56. 3 5
      npc/re/quests/quests_malangdo.txt
  57. 60 6
      npc/re/quests/quests_malaya.txt
  58. 39 3
      npc/re/quests/quests_mora.txt
  59. 2 1
      npc/scripts_athena.conf
  60. 9 8
      npc/warps/other/arena.txt

+ 1 - 1
db/item_delay.txt

@@ -23,7 +23,7 @@
 11524,3000	// White_Raffle_Sap
 11525,5000	// Mora_Hip_Tea
 
-// FIXE ME! I assume the delay like GD_ITEMEMERGENCYCALL cooldown time
+// FIX ME! Delays need confirmation.
 12968,300000	// Emergency_Scroll1
 12969,300000	// Emergency_Scroll2
 12970,300000	// Emergency_Scroll3

+ 3 - 3
db/re/item_db.txt

@@ -6243,9 +6243,9 @@
 12965,Emergency_Box1,Emergency Level 1 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12968,1; },{},{}
 12966,Emergency_Box2,Emergency Level 2 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12969,1; },{},{}
 12967,Emergency_Box3,Emergency Level 3 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12970,1; },{},{}
-12968,Emergency_Scroll1,Emergency Level 1 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ unitskilluseid getcharid(3),"GD_ITEMEMERGENCYCALL",1; },{},{}
-12969,Emergency_Scroll2,Emergency Level 2 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ unitskilluseid getcharid(3),"GD_ITEMEMERGENCYCALL",2; },{},{}
-12970,Emergency_Scroll3,Emergency Level 3 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ unitskilluseid getcharid(3),"GD_ITEMEMERGENCYCALL",3; },{},{}
+12968,Emergency_Scroll1,Emergency Level 1 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ itemskill "GD_ITEMEMERGENCYCALL",1; },{},{}
+12969,Emergency_Scroll2,Emergency Level 2 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ itemskill "GD_ITEMEMERGENCYCALL",2; },{},{}
+12970,Emergency_Scroll3,Emergency Level 3 Scroll,11,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ itemskill "GD_ITEMEMERGENCYCALL",3; },{},{}
 12971,Teleport_Box1,Teleport Scroll Box 1,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12977,10; },{},{}
 12972,Teleport_Box2,Teleport Scroll Box 2,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12978,10; },{},{}
 12973,Teleport_Box3,Teleport Scroll Box 3,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12979,10; },{},{}

+ 3 - 1
doc/script_commands.txt

@@ -1,4 +1,4 @@
-//===== rAthena Documentation ================================
+//===== rAthena Documentation ================================
 //= rAthena Script Commands
 //===== By: ==================================================
 //= rAthena Dev Team
@@ -4604,6 +4604,8 @@ This command will destroy whatever is currently equipped in the invoking
 character's specified equipment slot. For a full list of possible equipment 
 slots see 'getequipid'.
 
+This command will return 1 if an item was deleted and 0 otherwise.
+
 ---------------------------------------
 
 *clearitem;

+ 8 - 8
npc/battleground/bg_common.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= ????, L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.3
+//= 1.4
 //===== Compatible With: ===================================== 
 //= rAthena 1.0
 //===== Description: ========================================= 
@@ -19,6 +19,7 @@
 //= 1.1 Updated several NPCs to Official.
 //= 1.2 Updated Repairman NPC
 //= 1.3 Optimized "Erundek" NPC. [Euphy]
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 // Generals
@@ -322,17 +323,17 @@ bat_room,138,144,4	script	Repairman#bg	86,{
 	end;
 }
 
-/*
 // GM Management NPC
 //============================================================
 bat_room,1,151,3	script	Switch#batgnd	81,{
-	input .@input,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "The command has been cancelled.";
 		close;
-	}
-	else if (.@input == 1854) {
-		mes "May I help ypu?";
+	} else if (.@i == 0) {
+		end;
+	} else {
+		mes "May I help you?";
 		next;
 		switch(select("Close Battlefield:Open Battlefield:Reset a01:Reset b01:Reset a02:Reset b02")) {
 		case 1:
@@ -372,7 +373,6 @@ bat_room,1,151,3	script	Switch#batgnd	81,{
 		close;
 	}
 }
-*/
 
 // Badges Exchange
 //============================================================

+ 7 - 7
npc/battleground/flavius/flavius01.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.4
+//= 1.5
 //===== Compatible With: ===================================== 
 //= rAthena 1.0
 //===== Description: ========================================= 
@@ -17,6 +17,7 @@
 //= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //= 1.3 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
 //= 1.4 Label standardization. [Euphy]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 // Waiting Room NPCs
@@ -730,14 +731,14 @@ OnInit:
 	end;
 }
 
-/*
 bat_b01,1,10,3	script	Release all#b01	81,{
-	input .@input,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "Cancelled.";
 		close;
-	}
-	else if (.@input == 1854) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "May I help you?";
 		next;
 		switch(select("Release all.:Cancel.")) {
@@ -752,4 +753,3 @@ bat_b01,1,10,3	script	Release all#b01	81,{
 		}
 	}
 }
-*/

+ 7 - 7
npc/battleground/flavius/flavius02.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.5
+//= 1.6
 //===== Compatible With: ===================================== 
 //= rAthena 1.0
 //===== Description: ========================================= 
@@ -18,6 +18,7 @@
 //= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //= 1.4 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
 //= 1.5 Label standardization. [Euphy]
+//= 1.6 Added GM management function. [Euphy]
 //============================================================
 
 // Waiting Room NPCs
@@ -731,14 +732,14 @@ OnInit:
 	end;
 }
 
-/*
 bat_b02,1,10,3	script	Release all#b02	81,{
-	input .@input,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "Cancelled.";
 		close;
-	}
-	else if (.@input == 1854) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "May I help you?";
 		next;
 		switch(select("Release all.:Cancel.")) {
@@ -753,4 +754,3 @@ bat_b02,1,10,3	script	Release all#b02	81,{
 		}
 	}
 }
-*/

+ 8 - 8
npc/battleground/tierra/tierra01.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.4
+//= 1.5
 //===== Compatible With: ===================================== 
 //= rAthena 1.0
 //===== Description: ========================================= 
@@ -17,6 +17,7 @@
 //= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //= 1.3 Removed MaxLvl check in waitingrooms.
 //= 1.4 Label standardization. [Euphy]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 // Waiting Room NPCs
@@ -924,14 +925,14 @@ bat_a01,356,326,3	script	Guillaume Camp Soldier#bat_a01_guide	934,{
 }
 */
 
-/*
 bat_a01,1,1,3	script	Release all#a01	81,{
-	input .@input,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "Cancelled.";
 		close;
-	}
-	else if (.@input == 1854) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "May I help you?";
 		next;
 		switch(select("Release all.:Cancel.")) {
@@ -942,8 +943,7 @@ bat_a01,1,1,3	script	Release all#a01	81,{
 			end;
 		case 2:
 			mes "Cancelled.";
+			close;
 		}
 	}
 }
-*/
-

+ 8 - 8
npc/battleground/tierra/tierra02.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.3
+//= 1.4
 //===== Compatible With: ===================================== 
 //= rAthena 1.0
 //===== Description: ========================================= 
@@ -16,6 +16,7 @@
 //= 1.1 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //= 1.2 Removed MaxLvl check in waitingrooms.
 //= 1.3 Label standardization. [Euphy]
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 // Waiting Room NPCs
@@ -923,14 +924,14 @@ bat_a02,356,326,3	script	Guillaume Camp Soldier#bat_a02_guide	934,{
 }
 */
 
-/*
 bat_a02,1,1,3	script	Release all#a02	81,{
-	input .@input,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "Cancelled.";
 		close;
-	}
-	else if (.@input == 1854) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "May I help you?";
 		next;
 		switch(select("Release all.:Cancel.")) {
@@ -941,8 +942,7 @@ bat_a02,1,1,3	script	Release all#a02	81,{
 			end;
 		case 2:
 			mes "Cancelled.";
+			close;
 		}
 	}
 }
-*/
-	

+ 4 - 8
npc/cities/manuk.txt

@@ -443,19 +443,15 @@ manuk,103,311,3	script	Manuk Piom#tre2	455,{
 	}
 }
 
-/*
 manuk,194,189,3	script	Manuk Galtun#tre3	450,{
 	if ((isequipped(2782) == 1) && (ep13_2_rhea == 100)) {
 		mes "[Manuk Galtun]";
-		mes "��?������U�?�";
-		mes "��?��?��?���";
-		
-	}
-	else {
-		end;
+		mes "Welcome to Manuk.";
+		mes "How can I help you?";
+		close;
 	}
+	end;
 }
-*/
 
 manuk,293,203,3	script	Manuk Piom#tre4	454,{
 	if ((isequipped(2782) == 1) && (ep13_2_rhea == 100)) {

+ 1 - 1
npc/cities/prontera.txt

@@ -236,7 +236,7 @@ prontera,78,150,3	script	Dairenne#pront	90,{
 // inside Prontera
 //============================================================
 /*
-//This NPC has been disabled officiall.
+//This NPC has been disabled officially.
 prt_in,178,92,0	script	Curator of Library#pront	57,{
 	mes "[Curator Guiss]";
 	mes "Here, in the Western branch of the Prontera Library, ";

+ 6 - 9
npc/events/gdevent_aru.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //===== Additional Comments: =================================
 //= 1.0 First version
 //= 1.1 Changed spawn timer to 1 hour. [L0ne_w0lf]
+//= 1.2 Added GM management function. [Euphy]
 //============================================================
 
 arug_dun01,1,1,1	script	Monster Controler#aru_gd	81,{
@@ -1513,10 +1514,11 @@ arug_que01,114,105,3	duplicate(GD_Ev_Flower)	#aru_flower_53	978
 arug_que01,109,105,3	duplicate(GD_Ev_Flower)	#aru_flower_54	977
 arug_que01,104,105,3	duplicate(GD_Ev_Flower)	#aru_flower_55	976
 
-/*
 arug_dun01,5,5,1	script	Event controller#aru_gd	81,{
-	input .@input; //,0,9999;
-	if (input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "Incorrect password.";
+		close;
+	} else {
 		mes "How can I help you?";
 		next;
 		switch(select("Reset.:No, thanks.")) {
@@ -1534,9 +1536,4 @@ arug_dun01,5,5,1	script	Event controller#aru_gd	81,{
 			close;
 		}
 	}
-	else {
-		mes "Incorrect password.";
-		close;
-	}
 }
-*/

+ 6 - 9
npc/events/gdevent_sch.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //===== Additional Comments: =================================
 //= 1.0 First version
 //= 1.1 Changed spawn timer to 1 hour. [L0ne_w0lf]
+//= 1.2 Added GM management function. [Euphy]
 //============================================================
 
 schg_dun01,1,1,1	script	Monster Controler#sch_gd	81,{
@@ -1512,10 +1513,11 @@ schg_que01,114,105,3	duplicate(GD_Ev_Flower2)	#sch_flower_53	978
 schg_que01,109,105,3	duplicate(GD_Ev_Flower2)	#sch_flower_54	977
 schg_que01,104,105,3	duplicate(GD_Ev_Flower2)	#sch_flower_55	976
 
-/*
 schg_dun01,5,5,1	script	Event controller#sch_gd	81,{
-	input .@input; //,0,9999;
-	if (input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "Incorrect password.";
+		close;
+	} else {
 		mes "How can I help you?";
 		next;
 		switch(select("Reset.:No, thanks.")) {
@@ -1533,9 +1535,4 @@ schg_dun01,5,5,1	script	Event controller#sch_gd	81,{
 			close;
 		}
 	}
-	else {
-		mes "Incorrect password.";
-		close;
-	}
 }
-*/

+ 12 - 12
npc/events/god_se_festival.txt

@@ -3,25 +3,26 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
 //= [Official Conversion]
 //= Post-God Item SE Creation Summoning Event 
-//= Second Sister is a cusotm translation.
+//= Second Sister is a custom translation.
 //===== Additional Comments: ================================= 
 //= 1.0 First version. [L0ne_W0lf]
+//= 1.1 Added GM management function. [Euphy]
 //============================================================ 
 
-/*
-yuno,1,1,0	script	Festival Manager#gq_fes00	891,{
+// Original name: "Festival Manager#god_se_fes00"
+yuno,1,1,0	script	Festival Manager#gq_fes0	891,{
+	callfunc "F_GM_NPC";
 	mes "[Festival Manager]";
 	mes "I am the festival NPC manager for the God SE quest.";
 	mes "Please enter your password.";
 	next;
-	input .@input$;
-	if (.@input$ != "07godsefes") {
+	if (callfunc("F_GM_NPC","07godsefes",1) == 0) {
 		mes "[Festival Manager]";
 		mes "Password is incorrect.";
 		close;
@@ -44,7 +45,6 @@ yuno,1,1,0	script	Festival Manager#gq_fes00	891,{
 		close;
 	}
 }
-*/
 
 yuno,118,192,5	script	Rmimi Ravies#gq_fes01	891,{
 	set .@GID, getcharid(2);
@@ -392,14 +392,15 @@ OnTimer3900000:
 	end;
 }
 
-/*
-rachel,1,1,0	script	Festival Manager#god_se_fes02	891,{
+
+// Original name: "Festival Manager#god_se_fes02"
+rachel,1,1,0	script	Festival Manager#gq_fes2	891,{
+	callfunc "F_GM_NPC";
 	mes "[Festival Manager]";
 	mes "I am the festival NPC manager for the God SE quest.";
 	mes "Please enter your password.";
 	next;
-	input .@input$;
-	if (.@input$ != "07godsefes") {
+	if (callfunc("F_GM_NPC","07godsefes",1) == 0) {
 		mes "[Festival Manager]";
 		mes "Password is incorrect.";
 		close;
@@ -422,7 +423,6 @@ rachel,1,1,0	script	Festival Manager#god_se_fes02	891,{
 		close;
 	}
 }
-*/
 
 rachel,132,117,3	script	Rhehe Ravies#gq_fes03	891,{
 	set .@GID, getcharid(2);

+ 28 - 31
npc/instances/EndlessTower.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 2.3
+//= 2.4
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -35,6 +35,7 @@
 //= 2.1 Updated to match latest official script. [Euphy]
 //= 2.2 Instance system rewrite. [Euphy]
 //= 2.3 Added some missing announcements. [Euphy]
+//= 2.4 Added GM management function. [Euphy]
 //============================================================ 
 
 alberta,214,77,6	script	Captain Janssen	709,{
@@ -316,18 +317,20 @@ L_Enter:
 }
 
 e_tower,30,30,2	script	Huge Vortex	844,2,2,{
+	end;
 OnTouch:
 	mapannounce "e_tower","[ " + strcharinfo(0) + " ], seems to be engulfed by a huge vortex",bc_map,"0x00ff99",FW_NORMAL,12;
 	warp "alberta",223,36;
 	end;
 }
 
-/*
-e_tower,1,1,2	script	#102Administrator Mode104	844,{
+// Original name: "#102Administrator Mode104"
+e_tower,1,1,2	script	#102Administrator Mode	844,{
+	callfunc "F_GM_NPC";
 	mes "Please enter the password";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		switch(select("Generate Purification Stone:Remove Purification Stone:Cancel")) {
 		case 1:
 			mes "Create the Purification Stone that stays for 30 minutes.";
@@ -342,8 +345,7 @@ e_tower,1,1,2	script	#102Administrator Mode104	844,{
 			break;
 		}
 		close;
-	}
-	else {
+	} else {
 		mes "Enter the password exactly.";
 		close;
 	}
@@ -381,13 +383,13 @@ OnTimer1800000:
 }
 
 e_tower,151,185,4	script	Purification Stone#et2	844,{
+	callfunc "F_GM_NPC";
 	set etower_timer,0;
 	mes "^0000ffThe records and aftereffects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
-	close;
+	close2;
 	warp "e_tower",75,108;
 	end;
 }
-*/
 
 // Core Functions
 //============================================================
@@ -1368,12 +1370,12 @@ OnTimer120000:
 	end;
 }
 
-/*
 1@tower,71,1,0	script	#Manager Mode1	844,{
+	callfunc "F_GM_NPC";
 	mes "Please enter the password.";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		mes "This NPC manages the tower from the 1st to the 25th Level.";
 		mes "Please enter the Level number to open.";
 		mes "(i.g.: 1F->1, 25F->25)";
@@ -1388,7 +1390,6 @@ OnTimer120000:
 	}
 	close;
 }
-*/
 
 // Levels 26-50
 //============================================================
@@ -1485,12 +1486,12 @@ OnTouch_:
 	end;
 }
 
-/*
 2@tower,71,1,0	script	#Manager Mode2	844,{
+	callfunc "F_GM_NPC";
 	mes "Please enter the password.";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		mes "This NPC manages the tower from the 26st to the 50th Level.";
 		mes "Please enter the Level number to open.";
 		mes "(i.g.: 26F->26, 50F->50)";
@@ -1505,7 +1506,6 @@ OnTouch_:
 	}
 	close;
 }
-*/
 
 // Levels 51-75
 //============================================================
@@ -1602,12 +1602,12 @@ OnTouch_:
 	end;
 }
 
-/*
 3@tower,71,1,0	script	#Manager Mode3	844,{
+	callfunc "F_GM_NPC";
 	mes "Please enter the password.";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		mes "This NPC manages the tower from the 51st to the 75th Level.";
 		mes "Please enter the Level number to open.";
 		mes "(i.g.: 51F->51, 75F->75)";
@@ -1622,7 +1622,6 @@ OnTouch_:
 	}
 	close;
 }
-*/
 
 // Levels 76-99
 //============================================================
@@ -1718,12 +1717,12 @@ OnTouch_:
 	end;
 }
 
-/*
 4@tower,71,1,0	script	#Manager Mode4	844,{
+	callfunc "F_GM_NPC";
 	mes "Please enter the password.";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		mes "This NPC manages the tower from the 76th to the 99th Level.";
 		mes "Please enter the Level number to open.";
 		mes "(i.g.: 76F->76, 99F->99)";
@@ -1738,7 +1737,6 @@ OnTouch_:
 	}
 	close;
 }
-*/
 
 // Level 100
 //============================================================
@@ -1911,19 +1909,18 @@ OnEnable:
 	end;
 }
 
-/*
 5@tower,71,1,0	script	#Manager Mode5	844,{
+	callfunc "F_GM_NPC";
 	mes "This NPC manages the crystal on the 100th Level. Please enter the password.";
-	input .@inputstr$;
+	set .@i, callfunc("F_GM_NPC","dmc2008",1);
 	next;
-	if (.@inputstr$ == "dmc2008") {
+	if (.@i == 1) {
 		donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable";
 		mes "The 100th Level's crystal has been activated.";
-	}
-	else
+	} else
 		mes "Please enter the correct password.";
 	close;
-} */
+}
 
 // Level 101
 //============================================================

+ 107 - 1
npc/instances/NydhoggsNest.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf, various sources
 //===== Current Version: ===================================== 
-//= 1.5
+//= 1.6
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -17,6 +17,7 @@
 //=     the invoking party meets the requirements to join the Memorial Dungeon.
 //= 1.4 Cleaning. [Euphy]
 //= 1.5 Instance system rewrite. [Euphy]
+//= 1.6 Added GM management NPCs. [Euphy]
 //============================================================ 
 
 nyd_dun02,100,201,3	script	Yggdrasil Gatekeeper	111,8,8,{
@@ -2174,3 +2175,108 @@ OnMyPingDead:
 	areamonster instance_mapname("2@nyd"),200,92,180,80,"Dark Pinguicula",2015,1,instance_npcname("ins_nyd2_spawn_mobs")+"::OnMyPingDead";
 	end;
 }
+
+// GM Management NPCs
+//============================================================
+sec_in02,36,167,3	script	Nidhoggur Manager	447,1,1,{
+	callfunc "F_GM_NPC";
+	mes "Enter the password.";
+	next;
+	if (callfunc("F_GM_NPC","1854",1) == 0) {
+		mes "Incorrect password.";
+		close;
+	}
+	mes "What do you need to do?";
+	next;
+	switch(select("Reset variables to allow entrance to Nidhoggur:change variable 'ins_nyd':Remove 3 day timer 3135:Confirm variable number")) {
+	case 1:
+		set ins_nyd,200;
+		set ins_nyd2,0;
+		erasequest 3135;
+		mes "ins_nyd set to 200 ins_nyd2 set to 0";
+		mes "quest 3135 erased.";
+		close;
+	case 2:
+		mes "Which variable do you want to change?";
+		next;
+		switch(select("ins_nyd:ins_nyd2")) {
+			case 1: set .@var$,"ins_nyd"; break;
+			case 2: set .@var$,"ins_nyd2"; break;
+		}
+		mes "Input the variable number";
+		next;
+		input .@input;
+		setd .@var$, .@input;
+		mes .@var$+" has been set to "+.@input+" .";
+		close;
+	case 3:
+		mes "The 3 day timer will be removed when you close this dialog.";
+		next;
+		erasequest 3135;
+		mes "Finished removing Quest Timer.";
+		close;
+	case 4:
+		mes "ins_nyd is at "+ins_nyd+".";
+		mes "ins_nyd2 is at "+ins_nyd2+".";
+		close;
+	}
+}
+
+nyd_dun02,7,7,2	script	Purification Admin#nyd2	844,2,0,{
+	callfunc "F_GM_NPC";
+	mes "Please enter the password";
+	set .@i, callfunc("F_GM_NPC","dragonslayer",1);
+	next;
+	if (.@i == 0) {
+		mes "Enter the password exactly.";
+		close;
+	}
+	switch(select("Generate Purification Stone:Remove Purification Stone:Turn Entrance NPC OFF:Turn Entrance NPC On:Cancel")) {
+	case 1:
+		mes "Purification stone has been created and will stay on for 30 minutes.";
+		donpcevent "Purification Stone#nyd2::OnEnable";
+		close;
+	case 2:
+		mes "The Purification Stone has been destroyed.";
+		donpcevent "Purification Stone#nyd2::OnDisable";
+		close;
+	case 3:
+		mes "The Yggdrasil Gatekeeper at nyd_dun02 100 201 is now OFF.";
+		disablenpc "Yggdrasil Gatekeeper";
+		close;
+	case 4:
+		mes "The Yggdrasil Gatekeeper at nyd_dun02 100 201 is now On.";
+		enablenpc "Yggdrasil Gatekeeper";
+		close;
+	case 5:
+		close;
+	}
+}
+
+nyd_dun02,88,195,4	script	Purification Stone#nyd2	406,{
+	erasequest 3135;
+	erasequest 3136;
+	set ins_nyd,200;
+	set ins_nyd2,0;
+	mes "^0000FFThe records and after-effect related to the Nidhoggur's Nest have been removed. You can generate and enter the dungeon again.^000000";
+	close;
+OnInit:
+	disablenpc "Purification Stone#nyd2";
+	end;
+OnEnable:
+	initnpctimer;
+	end;
+OnDisable:
+	stopnpctimer;
+	disablenpc "Purification Stone#nyd2";
+	end;
+OnTimer1000:
+	enablenpc "Purification Stone#nyd2";
+	end;
+OnTimer1740000:
+	mapannounce "nyd_dun02","The Purification Stone will be destroyed in one minute.",bc_map,"0x00FF99",FW_NORMAL,12;
+	end;
+OnTimer1800000:
+	disablenpc "Purification Stone#nyd2";
+	end;
+}

+ 55 - 6
npc/jobs/2-2e/SoulLinker.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Celestria & Samuray22
 //===== Current Version: ===================================== 
-//= 1.5
+//= 1.6
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -14,12 +14,13 @@
 //===== Additional Comments: ================================= 
 //= 1.2 Rescripted to Aegis 10.3 standards. [Samuray22]
 //= 1.3 Slight updates and fixes to the script. [L0ne_W0lf]
-//=	Removes the use of labels, and corrects other errors.
-//=	Removed the GM-use only NPC from the sec_in map. 
-//=	No longer used a global var, uses an NPC var instead.
+//=     Removes the use of labels, and corrects other errors.
+//=     Removed the GM-use only NPC from the sec_in map. 
+//=     No longer used a global var, uses an NPC var instead.
 //= 1.3a Deleted Empty Color Tag. (bugreport:1572) [Samuray22]
 //= 1.4 Replaced effect numerics with constants. [L0ne_W0lf]
 //= 1.5 Added Quest Log commands. [Kisuka]
+//= 1.6 Updated to match the latest official script. [Euphy]
 //============================================================ 
 
 morocc_in,174,30,6	script	Kid#link1	716,{
@@ -399,6 +400,13 @@ OnTouch:
 				mes "if you talk to me later...";
 				close;
 			}
+			if (ismounting()) {
+				mes "[Maia]";
+				mes "You are on a riding pet,";
+				mes "so you cannot change your job.";
+				mes "Please unequip your riding pet and try again!";
+				close;
+			}
 			mes "[Maia]";
 			mes "Then let us begin the";
 			mes "ceremony. These items will";
@@ -432,9 +440,13 @@ OnTouch:
 			mes "powers as a Soul Linker";
 			mes "wisely and for just purposes.";
 			next;
+			if (SkillPoint) {
+				mes "^0000ffYou still have unused skill points. Please use all remaining skill points and try again!^000000";
+				close;
+			}
 			completequest 6008;
 			callfunc "Job_Change",Job_Soul_Linker;
-			callfunc "F_ClearJobVar";		// clears all job variables for the current player
+			callfunc "F_ClearJobVar";	// clears all job variables for the current player
 			set SOUL_Q,0;
 			mes "[Maia]";
 			mes "I wish the best of luck";
@@ -653,11 +665,48 @@ OnTimer183000:
 	stopnpctimer;
 }
 
+sec_in02,35,153,0	script	Soul Linker Var	871,{
+	callfunc "F_GM_NPC";
+	mes "[Soul Linker Var]";
+	mes "I can reset the Soul Linker";
+	mes "NPCs if a Soul Linker candidate";
+	mes "encounters a problem during the";
+	mes "end of the job quest. Please do";
+	mes "not use this function if players are still in the Quest Map.";
+	next;
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "[Soul Linker Var]";
+		mes "Password";
+		mes "is incorrect.";
+		close;
+	} else {
+		mes "[Soul Linker Var]";
+		mes "Would you like to";
+		mes "reset the Soul Linker";
+		mes "Global Variable?";
+		next;
+		switch(select("Reset:Cancel")) {
+		case 1:
+			mes "[Soul Linker Var]";
+			mes "The Soul Linker";
+			mes "Job Quest NPCs";
+			mes "have been reset.";
+			set getvariableofnpc(.SoulLinkerTest,"Kid#link1"),0;
+			close;
+		case 2:
+			mes "[Soul Linker Var]";
+			mes "You have canceled";
+			mes "this command.";
+			close;
+		}
+	}
+}
+
 //============================================================ 
 // Old changelog
 //============================================================ 
 //= A temp Soul Linker Job Changer based on the kRO quest.
 //= Quest info from RagnaInfo. Sprites from kRO screenshots
-//= 1.0	Optimized and updated [Lupus]
+//= 1.0 Optimized and updated [Lupus]
 //= 1.1 Fixed NPC names according to iRO [Lupus]
 //============================================================ 

+ 5 - 3
npc/kafras/dts_warper.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Evera
 //===== Current Version: ===================================== 
-//= 2.8
+//= 2.9
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: =========================================
@@ -53,6 +53,7 @@
 //= 2.6 Moved Morroc NPCs to Morroc Ruins. [L0ne_W0lf]
 //= 2.7 Fixed a typo, a - to a +. Not sure how that happened. [L0ne_w0lf]
 //= 2.8 Corrected another typo this time in a variable.
+//= 2.9 Added GM management function. [Euphy]
 //============================================================ 
 
 einbroch,246,70,0	script	Vote Timer#ein	-1,{
@@ -1175,12 +1176,13 @@ OnTimer15000:
 
 /*
 // GM only NPC used for modifying values related to the DTS system.
+// Disabled in official script.
 sec_in02,17,160,4	script	Vote Globalvar Girl#yuno	864,{
+	callfunc "F_GM_NPC";
 	mes "[Christy's Maid]";
 	mes "Lady Christy!";
 	next;
-	input .@input,0,9000;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		mes "[Christy's Maid]";
 		mes "I am Lady Christy's Maid.";
 		next;

+ 12 - 11
npc/other/arena/arena_aco.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.4
+//= 1.5
 //===== Compatible With: =====================================
 //= Any Athena Version
 //===== Description: =========================================
@@ -14,6 +14,7 @@
 //= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
 //= 1.3 Label standardization. [Euphy]
 //= 1.4 Script updates, and removed two level restrictions. [Euphy]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 arena_room,114,102,0	script	onlyaco#arena	45,1,1,{
@@ -1709,14 +1710,14 @@ arena_room,140,136,3	script	Guide Alias	729,{
 	close;
 }
 
-/*
 arena_room,195,5,3	script	log-on-aco#arena	802,{
-	input .@input; //,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "^3355FFIncorrect Password.^000000";
 		close;
-	}
-	else if (.@input == 1357) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "[!!CAUTION!!]";
 		mes "^3355FFThe following menu";
 		mes "the record for that";
@@ -1754,13 +1755,14 @@ arena_room,195,5,3	script	log-on-aco#arena	802,{
 }
 
 arena_room,195,10,3	script	acolink#arena	802,{
-	input .@input; //,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "Command has";
 		mes "been canceled.";
 		close;
-	}
-	else if (.@input == 1357) {
+	} else if (.@i == 0) {
+		end;
+	} else {
 		mes "This NPC opens and";
 		mes "closes the Warp Portal";
 		mes "to the Arena's Acolyte";
@@ -1785,4 +1787,3 @@ arena_room,195,10,3	script	acolink#arena	802,{
 		}
 	}
 }
-*/

+ 58 - 82
npc/other/arena/arena_room.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= SinSloth
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= Any Athena Version
 //===== Description: =========================================
@@ -14,6 +14,7 @@
 //= 1.2 Label standardization, disabled GM NPCs. [Euphy]
 //= 1.2a Added Renewal level checksk. [Euphy]
 //= 1.3 Script updates. [Euphy]
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 arena_room,94,93,5	script	Vendigos	97,{
@@ -393,15 +394,15 @@ arena_room,158,82,1	script	Helper Lonik	828,{
 }
 
 sec_in02,72,180,3	script	Arena Manager#arena	802,{
-
-	if (!getgmlevel()) end;
-
-	input .@arena;
-	if (.@arena == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "[Arena Manager]";
 		mes "Command has been canceled.";
 		close;
-	} else if (.@arena == 1357) {
+	} else if (.@i == 0) {
+		mes "Password is incorrect.";
+		close;
+	} else {
 		mes "[Arena Manager]";
 		mes "Select an option.";
 		next;
@@ -471,83 +472,60 @@ sec_in02,72,180,3	script	Arena Manager#arena	802,{
 			case 2:
 				switch(select("Lv 50:Lv 60:Lv 70:Lv 80:Party Mode")) {
 				case 1:
-					mes "[Arena Manager]";
-					mes "Please enter 0 to cancel.";
-					mes "If not, please enter a value for minutes first and then seconds.";
-					next;
-					input .@arenamin;
-					set $top_50min,.@arenamin;
-					input .@arenasec;
-					set $top_50sec,.@arenasec;
-					mes "[Arena Manager]";
-					mes "Current Lv 50 ranker's play time has been rearranged to ^FF0000"+$top_50min+"^000000 minutes and ^FF0000"+$top_50sec+"^000000 seconds.";
-					close;
+					set .@min$,"$top50min";
+					set .@sec$,"$top50sec";
+					set .@mode$,"Lv 50";
+					break;
 				case 2:
-					mes "[Arena Manager]";
-					mes "Please enter 0 to cancel.";
-					mes "If not, please enter a value for minutes first and then seconds.";
-					next;
-					input .@arenamin;
-					set $top_60min,.@arenamin;
-					input .@arenasec;
-					set $top_60sec,.@arenasec;
-					mes "[Arena Manager]";
-					mes "Current Lv 60 ranker's play time has been rearranged to ^FF0000"+$top_60min+"^000000 minutes and ^FF0000"+$top_60sec+"^000000 seconds.";
-					close;
+					set .@min$,"$top60min";
+					set .@sec$,"$top60sec";
+					set .@mode$,"Lv 60";
+					break;
 				case 3:
-					mes "[Arena Manager]";
-					mes "Please enter 0 to cancel.";
-					mes "If not, please enter a value for minutes first and then seconds.";
-					next;
-					input .@arenamin;
-					set $top_70min,.@arenamin;
-					input .@arenasec;
-					set $top_70sec,.@arenasec;
-					mes "[Arena Manager]";
-					mes "Current Lv 70 ranker's play time has been rearranged to ^FF0000"+$top_70min+"^000000 minutes and ^FF0000"+$top_70sec+"^000000 seconds.";
-					close;
+					set .@min$,"$top70min";
+					set .@sec$,"$top70sec";
+					set .@mode$,"Lv 70";
+					break;
 				case 4:
-					mes "[Arena Manager]";
-					mes "Please enter 0 to cancel.";
-					mes "If not, please enter a value for minutes first and then seconds.";
-					next;
-					input .@arenamin;
-					set $top_80min,.@arenamin;
-					input .@arenasec;
-					set $top_80sec,.@arenasec;
-					mes "[Arena Manager]";
-					mes "Current Lv 80 ranker's play time has been rearranged to ^FF0000"+$top_80min+"^000000 minutes and ^FF0000"+$top_80sec+"^000000 seconds.";
-					close;
+					set .@min$,"$top80min";
+					set .@sec$,"$top80sec";
+					set .@mode$,"Lv 80";
+					break;
 				case 5:
-					mes "[Arena Manager]";
-					mes "Please enter 0 to cancel.";
-					mes "If not, please enter a value for minutes first and then seconds.";
-					next;
-					input .@arenamin;
-					set $top_ptmin,.@arenamin;
-					input .@arenasec;
-					set $top_ptsec,.@arenasec;
-					mes "[Arena Manager]";
-					mes "Current party ranker's play time has been rearranged to ^FF0000"+$top_ptmin+"^000000 minutes and ^FF0000"+$top_ptsec+"^000000 seconds.";
-					close;
+					set .@min$,"$top_ptmin";
+					set .@sec$,"$top_ptsec";
+					set .@mode$,"party";
+					break;
 				}
+				mes "[Arena Manager]";
+				// Doesn't work with Athena's implementation.
+				//mes "Please enter 0 to cancel.";
+				//mes "If not, please enter a value for minutes first and then seconds.";
+				mes "Please enter a value for minutes first and then seconds.";
+				next;
+				input .@arenamin;
+				setd .@min$,.@arenamin;
+				input .@arenasec;
+				setd .@sec$,.@arenasec;
+				mes "[Arena Manager]";
+				mes "Current "+.@mode$+" ranker's play time has been rearranged to ^FF0000"+getd(.@min$)+"^000000 minutes and ^FF0000"+getd(.@sec$)+"^000000 seconds.";
+				close;
 			}
 		}
 	}
-	mes "Password is incorrect.";
-	close;
 }
 
 sec_in02,79,171,3	script	Reward Manager#arena	802,{
-
-	if (!getgmlevel()) end;
-
-	input .@arena;
-	if (.@arena == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "[Reward Manager]";
 		mes "Command has been canceled.";
 		close;
-	} else if (.@arena == 1357) {
+	} else if (.@i == 0) {
+		mes "[Reward Manager]";
+		mes "Password is incorrect.";
+		close;
+	} else {
 		mes "[Reward Manager]";
 		mes "You have chosen to hide the teleporter NPC.";
 		next;
@@ -558,7 +536,7 @@ sec_in02,79,171,3	script	Reward Manager#arena	802,{
 			close;
 		case 2:
 			mes "[Reward Manager]";
-			mes "NPC has been hidden";
+			mes "NPC has been hidden.";
 			disablenpc "Teleporter#arena";
 			close;
 		case 3:
@@ -568,9 +546,6 @@ sec_in02,79,171,3	script	Reward Manager#arena	802,{
 			close;
 		}
 	}
-	mes "[Reward Manager]";
-	mes "Password is incorrect.";
-	close;
 }
 
 arena_room,105,93,5	script	Teleporter#arena	55,{
@@ -972,14 +947,18 @@ OnTimer62000:
 	stopnpctimer;
 	end;
 }
-/*
+
 sec_in02,72,171,3	script	Picture Manager#arena	802,{
-	input .@arena;
-	if (.@arena == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "[Picture Manager]";
 		mes "Command has been canceled.";
 		close;
-	} else if (.@arena == 1357) {
+	} else if (.@i == 0) {
+		mes "[Picture Manager]";
+		mes "Password is incorrect.";
+		close;
+	} else {
 		mes "[Picture Manager]";
 		mes "Would you like to reset Picture Reward variable to 0?";
 		next;
@@ -995,12 +974,10 @@ sec_in02,72,171,3	script	Picture Manager#arena	802,{
 			close;
 		}
 	}
-	mes "[Picture Manager]";
-	mes "Password is incorrect.";
-	close;
 }
 
 sec_in02,76,176,5	script	Live Broadcast#arena	802,{
+	callfunc "F_GM_NPC";
 	mes "[Live Broadcast]";
 	mes "Currently there are "+getmapusers("force_1-1")+" people in Lv 50s map.";
 	mes "Currently there are "+getmapusers("force_2-1")+" people in Lv 60s map.";
@@ -1010,7 +987,6 @@ sec_in02,76,176,5	script	Live Broadcast#arena	802,{
 	mes "Currently there are "+getmapusers("arena_room")+" people in the waiting room.";
 	close;
 }
-*/
 
 function	script	Func_Are_Rew	{
 	mes "[Givu]";

+ 152 - 0
npc/other/gm_npcs.txt

@@ -0,0 +1,152 @@
+//===== rAthena Script ======================================= 
+//= GM Management NPCs
+//===== By: ================================================== 
+//= Euphy
+//===== Current Version: ===================================== 
+//= 1.0
+//===== Compatible With: ===================================== 
+//= rAthena SVN
+//===== Description: ========================================= 
+//= Controls the official GM management NPCs in certain scripts.
+//===== Additional Comments: ================================= 
+//= 1.0 First version.
+//============================================================ 
+
+// callfunc("F_GM_NPC"{,<password>,<0:int | 1:str>{,<min>,<max>}})
+function	script	F_GM_NPC	{
+
+	// To disable all GM NPCs, uncomment the line below.
+	//end;
+
+	// To set a minimum GM level to access the NPCs, edit the line below.
+	if (getgmlevel() < 99) {
+		// Log the event.
+		getmapxy(.@map$,.@x,.@y,1);
+		logmes strcharinfo(0)+" attempted to access GM NPC "+strnpcinfo(0)+" ("+.@map$+","+.@x+","+.@y+").";
+		end;
+	}
+
+	if (!getargcount()) return;
+
+	// To disable password inputs, uncomment the line below.
+	//return 1;
+
+	// Password return values:
+	//  1: correct input
+	//  0: incorrect input
+	// -1: zero/cancel (integer only)
+	// -2: out of bounds (integer only)
+	if (getarg(1) == 0) {
+		// Integer password
+		if (getarg(3,0)) {
+			set .@error, input(.@input,getarg(2),getarg(3));
+			if (.@error)
+				return -2;
+		} else
+			input .@input;
+		if (.@input == 0)
+			return -1;
+		else
+			return (.@input == getarg(0))?1:0;
+	} else {
+		// String password
+		input .@inputstr$;
+		return (.@inputstr$ == getarg(0))?1:0;
+	}
+}
+
+/*
+List of GM Management NPCs (incomplete)
+--------------------------
+[ Battleground ]
+- Switch#batgnd
+- Release all#b01
+- Release all#b02
+- Release all#a01
+- Release all#a02
+
+[ Guild-related ]
+- Event controller#aru_gd
+- Event controller#sch_gd
+- Festival Manager#gq_fes0
+- Festival Manager#gq_fes2
+- Godly Item Quests#god
+- Golbal var
+- Investment_total#fund00 (RE)
+
+[ Instances ]
+------ Endless Tower -----
+- #102Administrator Mode
+- Purification Stone#et2
+- #Manager Mode1
+- #Manager Mode2
+- #Manager Mode3
+- #Manager Mode4
+- #Manager Mode5
+--------------------------
+- Nidhoggur Manager
+- Purification Admin#nyd2
+- Bakonawa's Rage (RE)
+- Bangungot Gate (RE)
+
+[ Job-related ]
+----- 3rd Class (RE) -----
+- control#arch
+- #GMhelper01_gc
+- #GMhelper02_gc
+- Worker#job_ranger
+- R.Knight Job Manager
+- #renshucheck
+- sorcereryal
+- Button Girl#wl
+- Button Girl#sura
+--------------------------
+- Soul Linker Var
+- 1st Job Quest Reset
+- Job Repair (RE)
+
+[ Quest ]
+--------- Renewal --------
+- 13.3 Related Reset
+- Scaraba Dungeon Entrance
+- Assistant#para_suvquest
+- Guidance for quest#ml
+- Initializing Mora Sanjo
+- Theore Set Guid
+- Field Bush Switch
+- Bakonawa Intro Helper
+- Pintados Manager#pin
+--------------------------
+- Allied Manager#gm
+- #timer_alba01
+- Translator Preparation#1
+- ep13_nd2f_mng
+- Factory Quest Test
+- boss::lght_boss_admin
+- #LyozienSwitch
+- Juperos Manager
+- Extra Story Patch
+- boss::boss_aru_monas
+- Koshei GlobalVar#admin
+- Morroc GlobalVar Admin::MorrocAdmin_sec
+- Morroc GlobalVar Admin::MorrocAdmin_moc
+- Morroc Invasion Manager (disabled)
+
+[ Other ]
+-------- Marriage --------
+- The King of Midgart
+- Divorce Staff
+- Remarry Staff
+------ Izlude Arena ------
+- log-on-aco#arena
+- acolink#arena
+- Arena Manager#arena
+- Reward Manager#arena
+- Picture Manager#arena
+- Live Broadcast#arena
+- #arenacontrol
+--------------------------
+- Monster Race Manager
+- Vote Globalvar Girl#yuno (disabled)
+
+*/

+ 8 - 9
npc/other/marriage.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.3
+//= 1.4
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -21,6 +21,7 @@
 //= 1.2 Corrected duration of Wedding status. [L0ne_W0lf]
 //= 1.3 Changed permanent global variables to temporary ones. [Euphy]
 //=     Added GM NPCs (commented).
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 prt_church,97,100,4	script	Wedding Staff#w	71,{
@@ -810,16 +811,15 @@ OnTimer180000:
 	end;
 }
 
-/*
 prt_church,28,178,4	script	The King of Midgart	108,{
+	callfunc "F_GM_NPC";
 	mes "[Vomars]";
 	mes "Wh-who are you?";
 	mes "You must know the";
 	mes "password to invoke";
 	mes "my awesome powers.";
 	next;
-	input .@input;
-	if (.@input != 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
 		mes "[Vomars]";
 		mes "This is";
 		mes "no place for";
@@ -857,13 +857,13 @@ prt_church,28,178,4	script	The King of Midgart	108,{
 }
 
 prt_church,20,179,4	script	Divorce Staff	71,{
+	callfunc "F_GM_NPC";
 	mes "[Bad Ending]";
 	mes "Uh oh...";
 	mes "You know I can't";
 	mes "do anything for you.";
 	next;
-	input .@input;
-	if (.@input != 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
 		mes "[Bad Ending]";
 		mes "Hmm...";
 		mes "You really";
@@ -904,13 +904,13 @@ prt_church,20,179,4	script	Divorce Staff	71,{
 }
 
 prt_church,22,179,4	script	Remarry Staff	71,{
+	callfunc "F_GM_NPC";
 	mes "[Wedding Again]";
 	mes "Hmm...?";
 	mes "What exactly are";
 	mes "you doing here?";
 	next;
-	input .@input;
-	if (.@input != 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
 		mes "[Wedding Again]";
 		mes "Ahk!";
 		mes "An adventurer";
@@ -960,4 +960,3 @@ prt_church,22,179,4	script	Remarry Staff	71,{
 		close;
 	}
 }
-*/

+ 68 - 4
npc/other/monster_race.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.9
+//= 2.0
 //===== Compatible With: =====================================
 //= rAthena SVN (Trunk, r12752+)
 //===== Description: =========================================
@@ -23,6 +23,7 @@
 //= 1.8 Optimized.
 //=     Fixed Medal Distributor (Dual Race) disappears accordingly. [Joseph] 
 //= 1.9 Updated RE/Pre-RE EXP. [Euphy]
+//= 2.0 Added GM management NPC. [Euphy]
 //============================================================
 
 // Monstrer Race - Single Monster Race
@@ -735,7 +736,13 @@ hugel,58,72,6	script	Eckar Ellebird#single	798,{
 	mes "which the winners can claim";
 	mes "their Prize Medals. The gate";
 	mes "will open soon, so please wait.";
-	close;				
+	close;
+OnEnable:
+	enablenpc "Eckar Ellebird#single";
+	end;
+OnDisable:
+	disablenpc "Eckar Ellebird#single";
+	end;
 }
 
 p_track01,39,49,3	script	Game Guide#single	845,{
@@ -1348,7 +1355,7 @@ hugel,62,69,1	script	Eckar Erenes#double	798,{
 		mes "I'm sorry, but you don't";
 		mes "have enough money to pay";
 		mes "the 500 zeny spectator fee.";
-		close;		
+		close;
 	}
 	mes "[Eckar Erenes]";
 	mes "I'm sorry, but a monster";
@@ -1358,6 +1365,12 @@ hugel,62,69,1	script	Eckar Erenes#double	798,{
 	mes "their Prize Medals. The gate";
 	mes "will open soon, so please wait.";
 	close;
+OnEnable:
+	enablenpc "Eckar Erenes#double";
+	end;
+OnDisable:
+	disablenpc "Eckar Erenes#double";
+	end;
 }
 
 p_track02,73,22,1	script	Ticket Helper#2	899,{
@@ -3053,4 +3066,55 @@ p_track01,45,42,3	script	Absent Minded Man#single	881,{
 	mes "I should win at least once,";
 	mes "right? What's going on?!";
 	close;
-}
+}
+
+hugel,5,5,3	script	Monster Race Manager	868,{
+	callfunc "F_GM_NPC";
+	mes "[Monster Race Manager]";
+	mes "I can activate and";
+	mes "deactivate the Arena";
+	mes "Entry NPCs for the Single";
+	mes "and Dual Monster Races.";
+	next;
+	set .@select, select("Single Race Entry - ON:Dual Race Entry - ON:Single Race Entry - OFF:Dual Race Entry - OFF");
+	mes "[Monster Race Manager]";
+	mes "Please enter";
+	mes "the password.";
+	next;
+	set .@i, callfunc("F_GM_NPC",1854,0,0,2000);
+	if (.@i == -2) {
+		mes "[Monster Race Manager]";
+		mes "Error.";
+		close;
+	} else if (.@i == -1) {
+		mes "[Monster Race Manager]";
+		mes "Incorrect password.";
+		close;
+	} else if (.@i == 0) {
+		close;
+	} else {
+		mes "[Monster Race Manager]";
+		switch(.@select) {
+		case 1:
+			mes "The Single Monster";
+			mes "Race Entry NPC is ON.";
+			donpcevent "Eckar Ellebird#single::OnEnable";
+			close;
+		case 2:
+			mes "The Dual Monster";
+			mes "Race Entry NPC is ON.";
+			donpcevent "Eckar Erenes#double::OnEnable";
+			close;
+		case 3:
+			mes "The Single Monster";
+			mes "Race Entry NPC is OFF.";
+			donpcevent "Eckar Ellebird#single::OnDisable";
+			close;
+		case 4:
+			mes "The Dual Monster";
+			mes "Race Entry NPC is OFF.";
+			donpcevent "Eckar Erenes#double::OnDisable";
+			close;
+		}
+	}
+}

+ 3 - 4
npc/quests/dandelion_request.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= SinSloth
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -11,6 +11,7 @@
 //===== Additional Comments: ================================= 
 //= 1.1 Fixed a small bug in Dandelion's Request. [SinSloth]
 //= 1.2 Moved Dandelion's Request to its own file.
+//= 1.3 Added GM management function. [Euphy]
 //============================================================ 
 
 izlude,103,106,3	script	Guildsman#1	48,3,3,{
@@ -10229,9 +10230,7 @@ que_job01,68,88,5	script	Simon#mao	881,{
 que_job01,70,84,1	duplicate(Simon#mao)	Kimmie	882,0,0
 
 sec_in02,38,162,0	script	Morroc Invasion Manager	882,{
-
-	if(getgmlevel() < 80) end;
-
+	callfunc "F_GM_NPC";
 	mes "A total of " + $maoattack + " users completed";
 	mes "the Satan Morroc: Lin Quest.";
 	mes "There are 2 requirements to";

+ 3 - 3
npc/quests/first_class/tu_acolyte.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Fix up by Jukka
 //===== Current Version: ===================================== 
-//= 1.8
+//= 1.9
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -20,6 +20,7 @@
 //= 1.6a Added 'npcskill' command. [Euphy]
 //= 1.7 Fixed exp, texts, and requirements in pre-renewal [Daegaladh]
 //= 1.8 Updated to match the official script. [Euphy]
+//= 1.9 Added GM management function. [Euphy]
 //============================================================ 
 
 // Priest Praupin
@@ -1779,8 +1780,8 @@ prt_monk,223,123,3	script	Eavesdrop#tu	111,{
 	}
 }
 
-/*
 sec_in02,17,156,3	script	1st Job Quest Reset	726,{
+	callfunc "F_GM_NPC";
 	mes "[1st Job Quest]";
 	mes "Which would you like to reset?";
 	next;
@@ -1808,4 +1809,3 @@ sec_in02,17,156,3	script	1st Job Quest Reset	726,{
 	mes "Completed.";
 	close;
 }
-*/

+ 49 - 44
npc/quests/quests_13_1.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 3.3a
+//= 3.4
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -26,6 +26,7 @@
 //= 3.2 Updated ep13_start and dialog to match official script. [Joseph]
 //= 3.3 Updated to match the latest official script. [Euphy]
 //= 3.3a Added Izlude RE coordinates. [Euphy]
+//= 3.4 Added GM management function and NPC. [Euphy]
 //============================================================ 
 
 // Onward to the New World
@@ -1921,23 +1922,25 @@ moc_ruins,137,89,5	script	Time-Space Gap Guard	707,{
 	close;
 }
 
-/*
 moc_fild22b,370,370,3	script	Allied Manager#gm	100,{
+	callfunc "F_GM_NPC";
 	mes "[Manager]";
 	mes "Please enter the password.";
 	next;
-	input .@input;
-	if ((.@input < 0) || (.@input > 9000) ) {
+	set .@i, callfunc("F_GM_NPC",8028,0,0,9000);
+	if (.@i == -2) {
 		mes "[Manager]";
 		mes "Incorrect password.";
 		close;
-	}
-	else if (.@input == 0) {
+	} else if (.@i == -1) {
 		mes "[Manager]";
 		mes "Please enter a password other then 0.";
 		close;
-	}
-	else if (.@input == 8028) {
+	} else if (.@i == 0) {
+		mes "[Manager]";
+		mes "Nevermind then.";
+		close;
+	} else {
 		mes "[Manager]";
 		mes "What would you like to do?";
 		next;
@@ -1954,13 +1957,7 @@ moc_fild22b,370,370,3	script	Allied Manager#gm	100,{
 			close;
 		}
 	}
-	else {
-		mes "[Manager]";
-		mes "Nevermind then.";
-		close;
-	}
 }
-*/
 
 // New Surroundings
 //============================================================ 
@@ -6951,11 +6948,13 @@ OnTimer300000:
 // Part Time Work
 //============================================================ 
 mid_camp,1,1,0	script	#timer_alba01	844,{
-	/*
+	callfunc "F_GM_NPC";
 	mes "Please enter the password";
 	next;
-	input .@input;
-	if (.@input == "1854") {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "Wrong password.";
+		close;
+	} else {
 		mes "Current Status:";
 		if ($@PartTimeOn == 1) {
 			mes "Recruiting.";
@@ -6963,7 +6962,7 @@ mid_camp,1,1,0	script	#timer_alba01	844,{
 		else {
 			mes "Not Recruiting.";
 		}
-		mes "Recruited part-timers" + $@PartTimeSlots + "part-timers.";
+		mes "Recruited " + $@PartTimeSlots + " part-timers.";
 		mes "What do you want to do?";
 		next;
 		switch(select("Reset the recruiting.:Cancel.")) {
@@ -6985,12 +6984,6 @@ mid_camp,1,1,0	script	#timer_alba01	844,{
 			close;
 		}
 	}
-	else {
-		mes "Wrong password.";
-		close;
-	}
-	end;
-	*/
 
 OnInit:
 	set $@PartTimeOn,0;
@@ -8473,6 +8466,21 @@ man_fild03,104,248,0	duplicate(manukrock)	Mysterious Rock#16	844
 man_fild03,91,272,0	duplicate(manukrock)	Mysterious Rock#17	844
 man_fild03,95,301,0	duplicate(manukrock)	Mysterious Rock#18	844
 
+sec_in02,80,171,0	script	Piece of crack#sec	406,{
+	callfunc "F_GM_NPC";
+	mes "1~3000";
+	input .@input;
+	next;
+	if (.@input < 1 || .@input > 3000) {
+		mes "Cat trading Point adjust";
+		mes "You can enter the number between 1~3000.";
+		close;
+	} else {
+		set ep13_yong1,.@input;
+		close;
+	}
+}
+
 // Report from the New World
 //============================================================ 
 mid_campin,90,121,5	script	Hibba Agip	459,{
@@ -13963,8 +13971,8 @@ que_dan02,102,42,3	script	Disfigured Corpse#moc2	457,{
 }
 
 /*
-//Mid Camp Warper (gogoash), Translated from the Official [Slim]
-prontera,161,192,5	script	Ash Vacuum Warper	707,{
+// Event NPC (gogoash), now disabled on official servers.
+prontera,161,192,5	script	Ash-Vacuum Warper	707,{
 	mes "[Warp Soldier]";
 	mes "For a limited period.";
 	mes "I can send you to Ash-Vacuum without any fee.";
@@ -13972,25 +13980,22 @@ prontera,161,192,5	script	Ash Vacuum Warper	707,{
 	mes "[Warp Soldier]";
 	mes "Do you want to go to Ash-Vacuum right now?";
 	next;
-	switch(select("Yes, please","Not yet")) {
-
-		case 1:
-			mes "[Warp Soldier]";
-			mes "Ok. I hope you";
-			mes "enjoy your trip.";
-			close2;
-			set ep13_ryu,100;
-			warp "mid_camp",210,291;
-			break;
-		case 2:
-			mes "[Warp Soldier]";
-			mes "No problem. I understand.";
-			mes "Tell me when you change your mind.";
-			mes "See you.";
-			close;
-			break;
+	switch(select("Yes, please:Not yet")) {
+	case 1:
+		mes "[Warp Soldier]";
+		mes "Ok. I hope you";
+		mes "enjoy your trip.";
+		close2;
+		set ep13_ryu,100;
+		warp "mid_camp",210,291;
+		end;
+	case 2:
+		mes "[Warp Soldier]";
+		mes "No problem. I understand.";
+		mes "Tell me when you change your mind.";
+		mes "See you.";
+		close;
 	}
-	end;
 }
 */
 

+ 29 - 41
npc/quests/quests_13_2.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 2.7a
+//= 2.8
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -48,6 +48,7 @@
 //= 2.6a Disabled GM NPC. [Euphy]
 //= 2.7 Updated RE/Pre-RE EXP. [Euphy]
 //= 2.7a Added Izlude RE coordinates. [Euphy]
+//= 2.8 Added GM management function. [Euphy]
 //============================================================ 
 
 // Cat Hand Addition.
@@ -4584,73 +4585,64 @@ OnTimer300000:
 	end;
 }
 
-/*
 mid_camp,7,3,0	script	Translator Preparation#1	708,{
-	mes "[Plot13 Translator Quest Preparation]";
-	mes "Input password.";
+	callfunc "F_GM_NPC";
+	mes "[EP13 Translator Quest Preparation]";
+	mes "First, you must confirm that you are my master.";
 	next;
-	input .@input; //,0,2000;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1854,0);
+	if (.@i == -1) {
 		mes "[EP 13 Translator Quest Preparation]";
 		mes "Cancelled";
 		close;
-	}
-	else if (.@input == 1854) {
+	} else if (.@i == 0) {
+		mes "[EP 13 Translator Quest Preparation]";
+		mes "Try again.";
+		close;
+	} else {
 		mes "[EP 13 Translator Quest Preparation]";
-		mes "I'm the provider of ep13.2 Translator Quest's quest item's NPC" <--Not my fault, they used bad chinese grammar in first place;
+		mes "I'm the NPC who gives the Episode 13.2 Translator Quest's Linked-Quest Items.";
 		next;
-		mes "What you want?";
+		mes "What would you like to do?";
 		next;
-		switch(select("Finish quest:Accept fairy / giant meetup quest")) {
+		switch(select("Receive EP13.1 Quest:Receive Quest Window - Meeting with Fairy and Giant")) {
 		case 1:
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Acquired the report's quest completion item";
+			mes "Episode 13.1 - The Report Quest Reward Item Received.";
 			next;
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Current report quest's item is "+ ep13_1_edq +" ";
-			mes "Start Quest?";
+			mes "Currently the Report Quest's Set Item is "+ep13_1_edq+".";
+			mes "Do you want to proceed?";
 			next;
-			switch(select("Yes:No")) {
-			case 1:
+			if(select("No:Yes") == 1) {
 				mes "[EP 13 Translator Quest Preparation]";
 				mes "Cancelled";
 				close;
-			case 2:
-				break;
 			}
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Acquired the report's quest completion item";
+			mes "Episode 13.1 - The Report Quest Reward Item Received.";
 			set ep13_1_edq,14;
 			close;
 		case 2:
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Accept the fairy / giant meetup quest";
+			mes "Episode 13.1 - Receiving the Quest window - Meeting with Fairy and Giant.";
 			next;
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Start Quest?";
+			mes "Do you want to proceed?";
 			next;
-			switch(select("Yes:No")) {
-			case 1:
+			if(select("No:Yes") == 1) {
 				mes "[EP 13 Translator Quest Preparation]";
 				mes "Cancelled";
 				close;
-			case 2:
-				break;
 			}
 			mes "[EP 13 Translator Quest Preparation]";
-			mes "Acquired the report's quest completion item";
+			mes "Episode 13.1 - The Report Quest Reward Item Received.";
 			setquest 2158;
 			setquest 2159;
 			close;
 		}
 	}
-	else {
-		mes "[EP 13 Translator Quest Preparation]";
-		mes "Please try again";
-		close;
-	}
 }
-*/
 
 // Daily Quests
 // - Midgard Ore
@@ -7307,30 +7299,26 @@ nyd_dun01,255,142,0	warp	nynm_dun1f_to_2f	1,1,nyd_dun02,61,265
 nyd_dun02,56,264,0	warp	nynm_dun2f_to_1f	1,1,nyd_dun01,249,143
 
 nyd_dun02,1,1,0	script	ep13_nd2f_mng	844,{
-/*
+	callfunc "F_GM_NPC";
 	mes "Enter password.";
 	next;
-	input .@input; //,0,4000;
-	if (.@input == 1854) {
-		mes "Reset Puzzle?";
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
+		mes "Reset Control devices?";
 		next;
 		switch(select("Yes:No")) {
 		case 1:
 			donpcevent "ep13_nd2f_mng::OnReset";
 			set $@08_ep13nydun02_in,0;
-			mes "Puzzle reset";
+			mes "Done.";
 			close;
 		case 2:
 			mes "Canceled.";
 			close;
 		}
-	}
-	else {
+	} else {
 		mes "Invalid.";
 		close;
 	}
-*/
-	end;
 
 OnReset:
 	donpcevent "ep13_warp_s1::OnEnable";

+ 12 - 16
npc/quests/quests_ein.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Evera and The rAthena Dev Team
 //===== Current Version: ===================================== 
-//= 2.6
+//= 2.7
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -50,6 +50,7 @@
 //=     - Factory Quest
 //=     - Murder Quest
 //= 2.6 Updated RE/Pre-RE EXP. [Euphy]
+//= 2.7 Added GM management function. [Euphy]
 //============================================================ 
 
 // Oridecon Stone OR Mineral Stone Quest
@@ -4168,21 +4169,24 @@ ein_in01,95,239,3	script	Conveyor#ins2	111,{
 }
 
 // Administrator NPC used to rig the invasion in Einbroch.
-/**/
 sec_in02,127,86,3	script	Factory Quest Test	851,{
-	input .@input; //,0,9000;
-	if ((.@input < 0) || (.@input > 9000)) {
+	set .@i, callfunc("F_GM_NPC",8028,0,0,9000);
+	if (.@i == -2) {
 		mes "[Test1]";
 		mes "Boo~ya.";
 		close;
-	}
-	else if (.@input == 0) {
+	} else if (.@i == -1) {
 		mes "[Test1]";
 		mes "Do you want";
 		mes "to cancel~?";
 		close;
-	}
-	else if (.@input == 8028) {
+	} else if (.@i == 0) {
+		mes "[Test1]";
+		mes "Whoa...";
+		mes "That is";
+		mes "sooo wrong!";
+		close;
+	} else {
 		mes "[Test1]";
 		mes "The current value";
 		mes "of the global variable";
@@ -4210,15 +4214,7 @@ sec_in02,127,86,3	script	Factory Quest Test	851,{
 			close;
 		}
 	}
-	else {
-		mes "[Test1]";
-		mes "Whoa...";
-		mes "That is";
-		mes "sooo wrong!";
-		close;
-	}
 }
-/**/
 
 // Murder Quest
 //============================================================ 

+ 267 - 1
npc/quests/quests_geffen.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88 & Samuray22
 //===== Current Version: ===================================== 
-//= 1.4
+//= 1.5
 //===== Compatible With: ===================================== 
 //= rAthena 7.15 +
 //===== Description: ========================================= 
@@ -14,6 +14,7 @@
 //= 1.3 Updated "Welding Mask" Quest to the Official one. [Samuray22]
 //= 1.3a replaced item "names" with item id. Added missing [Lupus]
 //= 1.4 Updated welding mask and headset quests. [L0ne_W0lf]
+//= 1.5 Added Number Match Game. [Euphy]
 //============================================================ 
 
 // Blacksmith: 'Welding Mask' Quest
@@ -162,3 +163,268 @@ geffen_in,30,71,4	script	Eric	83,{
 		close;
 	}
 }
+
+// Number Match Game :: gef_yagu
+//============================================================
+geffen,122,77,4	script	Nia#yagu	700,{
+	mes "[Nia]";
+	mes "Hello, I'm Nia, the fifth";
+	mes "disciple of Mawong, the";
+	mes "gaming mastermind. Now,";
+	mes "how would you like to play a";
+	mes "Number Match game with me?";
+	next;
+	switch(select("Number Match Game?:Practice Number Match:Play Number Match:Record Holder:Cancel")) {
+	case 1:
+		mes "[Nia]";
+		mes "Ah, well, the objective of";
+		mes "the Number Match game is to";
+		mes "guess the number I'm thinking";
+		mes "of. Of course, there are a few";
+		mes "rules that limit the numbers";
+		mes "that I can choose from.";
+		next;
+		mes "[Nia]";
+		mes "All the numbers that I make";
+		mes "up must be 3 digits, I can't";
+		mes "use 0 for any of the digits,";
+		mes "and I can't use the same";
+		mes "number for any of the digits";
+		mes "more than once.";
+		next;
+		mes "[Nia]";
+		mes "So, for example, I can't";
+		mes "use the numbers 103, 112,";
+		mes "252, or 701. Those numbers";
+		mes "either have a 0, or they use";
+		mes "the same number in the digits";
+		mes "more than once. Got it now?";
+		next;
+		mes "[Nia]";
+		mes "Now, you only get 5 guesses,";
+		mes "and after each guess, I'll tell";
+		mes "you how many digits you guessed";
+		mes "correctly, followed by the number of correctly guessed digits in";
+		mes "the correct digit place.";
+		next;
+		mes "[Nia]";
+		mes "For example, let's say the";
+		mes "number I come up with is 168.";
+		mes "If your first guess is 678, then you guessed two of the digits,";
+		mes "6 and 8, correctly. However,";
+		mes "only 8 is in the correct place.";
+		next;
+		mes "[Nia]";
+		mes "You know, it'd be a good idea";
+		mes "if you try the Practice Mode";
+		mes "first. Then, when you're more";
+		mes "comfortable, play the actual";
+		mes "Number Match game. Don't forget that speed counts for your score!";
+		next;
+		mes "[Nia]";
+		mes "Ah, if you happen to";
+		mes "make a new record in the";
+		mes "Number Match game, you'll";
+		mes "have your name recorded,";
+		mes "so don't miss this chance for";
+		mes "fame and maybe even fortune~";
+		close;
+	case 2:
+		mes "[Nia]";
+		mes "Great, let's do a practice";
+		mes "Number Match game. Please";
+		mes "try to guess my number, okay?";
+		mes "If you want to cancel, then please enter a number greater than 1,000.";
+		set .@practice,1;
+		break;
+	case 3:
+		mes "[Nia]";
+		mes "Great, let's play Number Match!";
+		mes "You will have 5 chances to guess the number that I'm thinking of.";
+		mes "If you want to cancel, then please enter a number greater than 1,000.";
+		set .@practice,0;
+		break;
+	case 4:
+		set .@name_record$, $050908_minus1_yagu$;
+		if (.@name_record$ == "") //custom
+			set .@name_record$,"(null)";
+		set .@score_record, $050908_minus1_yagu;
+		set .@score_min, .@score_record / 60;
+		set .@score_sec, .@score_record % 60;
+		mes "[Nia]";
+		mes "^ff0000" + .@name_record$ + "^000000 is the";
+		mes "record holder for the Number";
+		mes "Match game with a time of";
+		mes "^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
+		close;
+	case 5:
+		mes "[Nia]";
+		mes "Take care of yourself,";
+		mes "adventurer. If you ever";
+		mes "feel like playing a Number";
+		mes "Match game, come and talk";
+		mes "to me, alright? See you~";
+		close;
+	}
+	next;
+
+	// Generate 3 digits of a number.
+	while(1) {
+		set .@yagu100, rand(1,9);
+		set .@yagu10, rand(1,9);
+		set .@yagu1, rand(1,9);
+		if ((.@yagu100 != .@yagu10) && (.@yagu100 != .@yagu1) && (.@yagu10 != .@yagu1)) {
+			// Store the actual number (unofficial).
+			set .@yagu, (100*.@yagu100) + (10*.@yagu10) + .@yagu1;
+			break;
+		}
+	}
+
+	// The official time calculation is based on ServerTime,
+	// an int HHMMSS equivalent to atoi(gettimestr("%H%M%S",7)).
+	// UNIX time is really a better way to do this.
+	set .@start_time, gettimetick(2);
+
+	while(1) {
+
+		// Guess a number that meets all conditions.
+		while(1) {
+			if (input(.@input,100,999) != 0) {
+				mes "[Nia]";
+				mes "You've canceled the";
+				mes "Number Match game.";
+				close;
+			}
+			set .@input100, .@input / 100;
+			set .@input10, (.@input % 100) / 10;
+			set .@input1, .@input % 10;
+			if ((.@input100 > 0) && (.@input10 > 0) && (.@input1 > 0)) {
+				if ((.@input100 != .@input10) && (.@input100 != .@input1) && (.@input10 != .@input1))
+					break;
+			}
+			mes "[Nia]";
+			mes "You entered one of the";
+			mes "digits as 0, or input the";
+			mes "same numerical value in";
+			mes "the digits more than once.";
+			mes "Please enter another guess.";
+			next;
+		}
+
+		set .@retry, .@retry+1;
+		mes "[Nia]";
+		mes "^ff0000"+strcharinfo(0)+"^000000,";
+		mes "your guess is ^0000ff"+.@input+"^000000.";
+		mes "Give me a moment to";
+		mes "come up with your results.";
+		next;
+
+		// Correct digits in correct locations.
+		set .@strike,0;
+		if (.@yagu100 == .@input100)
+			set .@strike, .@strike+1;
+		if (.@yagu10 == .@input10)
+			set .@strike, .@strike+1;
+		if (.@yagu1 == .@input1)
+			set .@strike, .@strike+1;
+
+		// Correct digits in incorrect locations.
+		set .@ball,0;
+		if ((.@yagu100 == .@input10) || (.@yagu100 == .@input1))
+			set .@ball, .@ball+1;
+		if ((.@yagu10 == .@input100) || (.@yagu10 == .@input1))
+			set .@ball, .@ball+1;
+		if ((.@yagu1 == .@input100) || (.@yagu1 == .@input10))
+			set .@ball, .@ball+1;
+
+		if (.@strike == 3) {
+			if (.@practice) {
+				mes "[Nia]";
+				mes "Yes, the number that";
+				mes "I guessed was ^ff0000"+.@yagu+"^000000!";
+				mes "Congratulations, you";
+				mes "just won this practice";
+				mes "game! Now you should be";
+				mes "ready for the real thing~";
+				close;
+			} else {
+
+				// Calculate final time and check against the previous record.
+				set .@end_time, gettimetick(2);
+				if (.@end_time < .@start_time)
+					set .@end_time, .@end_time + 3600;
+				set .@total_time, .@end_time - .@start_time;
+				set .@total_min, .@total_time / 60;
+				set .@total_sec, .@total_time % 60;
+				set .@name_record$, $050908_minus1_yagu$;
+				if (.@name_record$ == "") //custom
+					set .@name_record$,"(null)";
+				set .@score_record, $050908_minus1_yagu;
+				set .@score_min, .@score_record / 60;
+				set .@score_sec, .@score_record % 60;
+
+				if (.@score_record >= .@total_time || !.@score_record) { //custom (second condition)
+					set $050908_minus1_yagu$, strcharinfo(0);
+					set $050908_minus1_yagu, .@total_time;
+					mes "[Nia]";
+					mes "Great! You guessed";
+					mes "my number, which was";
+					mes "^ff0000" + .@yagu + "^000000. You finished in";
+					mes "^ff0000" + .@total_min + " minutes, " + .@total_sec + " seconds^000000,";
+					mes "breaking the previous record";
+					mes "of ^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
+					next;
+					mes "[Nia]";
+					mes "^ff0000" + .@name_record$ + "^000000";
+					mes "set that old record,";
+					mes "but now you are the";
+					mes "new person to beat in the";
+					mes "Match Game. Congratulations";
+					mes "for setting a new record!";
+					close;
+				}
+				mes "[Nia]";
+				mes "Nice work, you guessed";
+				mes "my number! The answer, of";
+				mes "course, was ^ff0000" + .@yagu + "^000000. You managed";
+				mes "to guess this number correctly";
+				mes "in ^ff0000" + .@total_min + " minutes, " + .@total_sec + " seconds^000000.";
+				next;
+				mes "[Nia]";
+				mes "^ff0000" + .@name_record$ + "^000000 is";
+				mes "the current Number Match";
+				mes "record holder with a time";
+				mes "of ^ff0000" + .@score_min + " minutes, " + .@score_sec + " seconds^000000.";
+				mes "Good luck, and hopefully you";
+				mes "can break this record someday~";
+				close;
+			}
+		} else {
+			if (.@practice) {
+				mes "[Nia]";
+				mes "Your guess has ^ff0000" + .@ball + "^000000 of the";
+				mes "correct numbers. ^ff0000" + .@strike + "^000000 of the";
+				mes "digits in your guess have";
+				mes "the correct number in the";
+				mes "correct digit placement.";
+				mes "Alright, try it again~";
+				next;
+			} else {
+				mes "[Nia]";
+				mes "Your last guess had ^ff0000" + .@ball + "^000000";
+				mes "of the correct numbers,";
+				mes "and ^ff0000" + .@strike + "^000000 digits in your guess";
+				mes "had the correct number in";
+				mes "the correct digit placement.";
+				switch(.@retry) {
+					case 1: mes "You have four guesses left."; break;
+					case 2: mes "You have three guesses left."; break;
+					case 3: mes "You have two guesses left."; break;
+					case 4: mes "You only have one guess left..."; break;
+					case 5: mes "The answer was ^ff0000" + .@yagu + "^000000."; close;
+				}
+				next;
+			}
+		}
+	}
+}

+ 68 - 1
npc/quests/quests_juperos.txt

@@ -3,7 +3,7 @@
 //===== By ===================================================
 //= MasterOfMuppets
 //===== Version ==============================================
-//= 1.8
+//= 1.9
 //===== Compatible With ======================================
 //= rAthena SVN
 //===== Description ==========================================
@@ -23,6 +23,7 @@
 //= 1.6 Added missing close in "Popular Feats" [L0ne_W0lf]
 //= 1.7 Replaced effect numerics with constants. [L0ne_W0lf]
 //= 1.8 Updated RE/Pre-RE EXP. [Euphy]
+//= 1.9 Added GM management NPC. [Euphy]
 //============================================================
 
 yuno_in04,190,125,4	script	Scholar	700,{
@@ -5115,3 +5116,69 @@ OnTouch:
 	}
 	end;
 }
+
+//============================================================
+// GM Management NPC
+//============================================================
+sec_in02,39,167,0	script	Juperos Manager	864,{
+	callfunc "F_GM_NPC";
+	mes "[Juperos Manager]";
+	mes "I'm the NPC in";
+	mes "charge of managing";
+	mes "the global variables for";
+	mes "the quests related to";
+	mes "Juperos. GM, please";
+	mes "enter the password.";
+	next;
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "[Juperos Manager]";
+		mes "Incorrect password.";
+		close;
+	} else {
+		mes "[Juperos Manager]";
+		mes "Select a map. Remember:";
+		mes "Make sure that users aren't";
+		mes "doing the quest on the map";
+		mes "you're going to reset, or else";
+		mes "you'll cancel their progress";
+		mes "through the quest.";
+		next;
+		switch(select("jupe_Area1:jupe_Area2:jupe_ele_r:jupe_ele")) {
+		case 1:
+			set .@loc$,"jupe_Area1";
+			set .@var$,"$@JupreArea1InUse";
+			break;
+		case 2:
+			set .@loc$,"jupe_Area2";
+			set .@var$,"$@JupreArea2InUse";
+			break;
+		case 3:
+			set .@loc$,"jupe_ele_r";
+			set .@var$,"$@JupeElevatorInUse";
+			break;
+		case 4:
+			set .@loc$,"jupe_ele";
+			set .@var$,"$@JupeElevatorInUse2";
+			break;
+		}
+		mes "[Juperos Manager]";
+		mes "You've decided";
+		mes "to reset "+.@loc$+".";
+		mes "Shall we proceed?";
+		next;
+		switch(select("Yes.:No.")) {
+		case 1:
+			mes "[Juperos Manager]";
+			mes "The global variable in";
+			mes .@loc$+" has been";
+			mes "reset to 0. Thank you.";
+			setd .@var$,0;
+			close;
+		case 2:
+			mes "[Juperos Manager]";
+			mes "This command";
+			mes "has been canceled.";
+			close;
+		}
+	}
+}

+ 65 - 1
npc/quests/quests_lighthalzen.txt

@@ -4,7 +4,7 @@
 //= Persian, Vicious_Pucca, aoa00, Evera, MasterOfMupppets,
 //= Lupus, Lord Gywall
 //===== Current Version: ===================================== 
-//= 5.0
+//= 5.1
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -28,6 +28,7 @@
 //= 4.8 Fixed Cursed Spirit Quest EXP reward. [Euphy]
 //= 4.9 Fixed incorrect use of 'close'. [Joseph]
 //= 5.0 Updated RE/Pre-RE EXP. [Euphy]
+//= 5.1 Added GM management NPCs. [Euphy]
 //============================================================ 
 
 // Gangster Alert [Official Conversion]
@@ -10315,6 +10316,27 @@ lhz_dun02,282,278,0	script	Broken Machine	111,{
 	}
 }
 
+sec_in02,17,170,4	script	boss::lght_boss_admin	809,{
+	callfunc "F_GM_NPC";
+	mes "[Patch]";
+	mes "Tell me what you want.";
+	next;
+	switch(select("Current Variables:How Many:Shinokas - Quest Complete")) {
+	case 1:
+		break;
+	case 2:
+		input .@input,0,1000;
+		set lght_boss,.@input;
+		break;
+	case 3:
+		set Shinokas_Quest,11;
+		close;
+	}
+	mes " ";
+	mes ""+lght_boss;
+	close;
+}
+
 lhz_in02,19,274,2	script	Maintenance Guy	851,{
 
 	mes "[Kudiuu]";
@@ -11991,6 +12013,48 @@ OnTouch:
 	end;
 }
 
+airplane_01,10,10,3	script	#LyozienSwitch	111,{
+	callfunc "F_GM_NPC";
+	mes "[Lyozien Switch]";
+	mes "Input password.";
+	mes "Enter 0 to cancel.";
+	next;
+	set .@i, callfunc("F_GM_NPC",1028,0,0,4000);
+	if (.@i == -2) {
+		mes "[Lyozien Switch]";
+		mes "Incorrect.";
+		close;
+	} else if (.@i == -1) {
+		mes "[Lyozien Switch]";
+		mes "Canceled.";
+		close;
+	} else if (.@i == 0) {
+		close;
+	} else {
+		mes "[Lyozien Switch]";
+		mes "Do you want to";
+		mes "turn the Lyozien";
+		mes "NPC ON or OFF?";
+		next;
+		switch(select("On:OFF")) {
+		case 1:
+			set .@str$,"activated";
+			donpcevent "Man#Lyozien::OnEnable";
+			break;
+		case 2:
+			set .@str$,"deactivated";
+			donpcevent "Man#Lyozien::OnDisable";
+			break;
+		}
+		mes "[Lyozien Switch]";
+		mes "Lyozien NPC is";
+		mes "now "+.@str$+".";
+		mes " ";
+		mes "/mm airplane_01.gat 96 48";
+		close;
+	}
+}
+
 //============================================================ 
 // Old changelog
 //============================================================ 

+ 86 - 4
npc/quests/quests_morocc.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88
 //===== Current Version: ===================================== 
-//= 3.1
+//= 3.2
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -45,6 +45,7 @@
 //=     summoning of Satan Morroc until server reboot. [Gepard]
 //= 3.0 Updated RE/Pre-RE EXP. [Euphy]
 //= 3.1 Updated to match the latest official scripts. [Euphy]
+//= 3.2 Added GM management NPC and variable $@re_moc_time$. [Euphy]
 //============================================================ 
 
 // Stop Post Quest
@@ -1862,9 +1863,10 @@ morocc,159,113,3	script	Chief Balrog	752,{
 }
 
 moc_fild21,38,193,0	script	Morocc Timer#edq	-1,6,6,{
-OnInit:
-	set $@re_moc,0;
-	end;
+//OnInit:
+//	set $@re_moc,0;
+//	set $@re_moc_time$,"";
+//	end;
 
 OnTouch:
 	if ($@re_moc == 0) {
@@ -1930,6 +1932,7 @@ OnInit:
 
 OnEnable:
 	enablenpc "Group of Evil#edq";
+	set $@re_moc_time$,"";
 	end;
 
 OnDisable:
@@ -2004,6 +2007,7 @@ OnDisable:
 
 OnMyMobDead:
 	set $@re_moc,3;
+	set $@re_moc_time$, gettimestr("%H%M%S",7);
 	mapannounce "moc_fild21","I'll let live just a little longer. You'll never find me through this time-space gap!",bc_map,"0xFFFF00";
 	donpcevent "Time-Space Gap#edq::OnEnable";
 	donpcevent "Satan Broadcast#edq::OnDisable";
@@ -2024,6 +2028,84 @@ OnTimer5415000:
 	end;
 }
 
+sec_in02,14,43,5	script	Morroc GlobalVar Admin::MorrocAdmin_sec	971,{
+	callfunc "F_GM_NPC";
+	mes "[Helper]";
+	mes "Please enter the password and # button.";
+	next;
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "[Helper]";
+		mes "Please press the numbers we always sing about.";
+		close;
+	} else {
+		mes "[Helper]";
+		mes "Hello. I am a post office.";
+		mes "I am currently checking Morroc status.";
+		next;
+		mes "=============";
+		mes "Current State";
+		mes "=============";
+		mes "^3131FF<Morroc>^000000";
+		if ($@re_moc == 0) {
+			mes "Reset. Enable to summon Morroc.";
+			mes "^3131FF<Continental Guards>^000000";
+			mes "Enable to enter to moc_fild21 field.";
+		} else if ($@re_moc == 1) {
+			mes "^3131FF<Morroc>^000000";
+			mes "Some warrior entered after the reset. However, the warrior hasn't started the quest yet.";
+			mes "The warrior who has rebirth_moc_edq 4 and 7 is now enabled to summon Morroc.";
+			mes "^3131FF<Continental Guards>^000000";
+			mes "The warrior who has rebirth_moc_edq 4 ~ 7 is now enabled to enter to moc_fild21.";
+		} else if ($@re_moc == 2) {
+			mes "^3131FF<Morroc>^000000";
+			mes "Morroc has been summoned. After 90 minutes has passed, it will revert back to reset status.";
+			mes "^3131FF<Continental Guards>^000000";
+			mes "The warrior who has rebirth_moc_edq 4 ~ 7 is now enabled to enter to moc_fild21.";
+		} else if ($@re_moc == 3) {
+			mes "^3131FF<Morroc>^000000";
+			mes "Morroc has been killed. Death time is "+$@re_moc_time$+"(00 hr/00 min/00 sec).";
+			mes "After 6 hours later since the death time, it will be reset.";
+			mes "The warriors whom has remained in the field can continue the quest via Time Space Gap.";
+			mes "^3131FF<Continental Guards>^000000";
+			mes "Disabled to enter to moc_fild21 from outside of the field.";
+		} else {
+			mes "^3131FF<Morroc>^000000";
+			mes "Morroc has been killed. Death time is "+$@re_moc_time$+"(00 hr/00 min/00 sec).";
+			mes "After 6 hours later since the death time, it will be reset.";
+			mes "It has been already passed 30 minutes after Morroc's death, so warriors can not continue the quest even if they click the Time Space Gap.";
+			mes "^3131FF<Continental Guards>^000000";
+			mes "Disabled to enter to moc_fild21 from outside of the field.";
+		}
+		next;
+		mes "[Helper]";
+		mes "What do you want?";
+		next;
+		switch(select("Cancel.:Reset")) {
+		case 1:
+			mes "[Helper]";
+			mes "Alright.";
+			close;
+		case 2:
+			if (strnpcinfo(4) == "sec_in02")
+				mes "You can reset at moc_fild21 5 5.";
+			else {
+				mes "Reset starts.";
+				next;
+				donpcevent "Group of Evil#edq::OnEnable";
+				mes "Group of Evil NPC is appeared.";
+				mes "Time-Space Gap NPC is disappeared.";
+				mes "6 hours term timer is stopped.";
+				donpcevent "Satan Summon#edq::OnDisable";
+				mes "Morroc 90 minutes survival timer is stopped.";
+				mes "Morroc is being killed.";
+				mes "Now, Continental Guards will let players enter.";
+			}
+			close;
+		}
+	}
+}
+moc_fild21,5,5,5	duplicate(MorrocAdmin_sec)	Morroc GlobalVar Admin::MorrocAdmin_moc	971
+
 // The Crow of the Fate
 // ============================================================
 moc_ruins,137,70,3	script	Book-Touching Man#garas	48,{

+ 55 - 1
npc/quests/quests_moscovia.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Kisuka
 //===== Current Version: ===================================== 
-//= 2.2
+//= 2.3
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -26,6 +26,7 @@
 //= 2.0b Bug fixes. [Lemongrass]
 //= 2.1 Fixed incorrect use of 'close'. [Joseph]
 //= 2.2 Updated RE/Pre-RE EXP. [Euphy]
+//= 2.3 Added GM management NPC. [Euphy]
 //============================================================ 
 
 // The Moving Island
@@ -11850,3 +11851,56 @@ pay_dun04,163,186,0	script	Ghost Tree#rus45	111,{
 	}
 	end;
 }
+
+mosk_dun01,3,3,3	script	Koshei GlobalVar#admin	958,{
+	callfunc "F_GM_NPC";
+	mes "[Koshei GlobalVar]";
+	mes "Please enter the password";
+	set .@i, callfunc("F_GM_NPC","orchid",1);
+	next;
+	if (.@i == 0) {
+		mes "[Koshei GlobalVar]";
+		mes "Please input the password exactly.";
+		close;
+	} else {
+		mes "[Koshei GlobalVar]";
+		mes "I can tell you what the";
+		mes "Koshei GlobalVar";
+		mes "$@rus_req02";
+		mes "on mosk_dun01";
+		mes "is currently set to.";
+		next;
+		if ($@rus_req02 == 0) {
+			mes "[Koshei GlobalVar]";
+			mes "Currently the GlobalVar $@rus_req02 is set to 0";
+			next;
+		} else if ($@rus_req02 == 1) {
+			mes "[Koshei GlobalVar]";
+			mes "Currently the GlobalVar $@rus_req02 is set to 1";
+			next;
+		} else {
+			mes "[Koshei GlobalVar]";
+			mes "error";
+			close;
+		}
+		mes "[Koshei GlobalVar]";
+		mes "What would you like to set the GlobalVar to?";
+		next;
+		switch(select("0:1:Cancel")) {
+		case 1:
+			mes "[Koshei GlobalVar]";
+			mes "GlobalVar $@rus_req02 will now be set to '0'";
+			set $@rus_req02,0;
+			donpcevent "Koshei#rus47::OnDisable";
+			close;
+		case 2:
+			mes "[Koshei GlobalVar]";
+			mes "GlobalVar $@rus_req02 will now be set to '1'";
+			set $@rus_req02,1;
+			donpcevent "Koshei#rus47::OnEnable";
+			close;
+		case 3:
+			close;
+		}
+	}
+}

Разлика између датотеке није приказан због своје велике величине
+ 470 - 851
npc/quests/quests_nameless.txt


+ 66 - 40
npc/quests/quests_prontera.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= kobra_k88; L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 2.8
+//= 2.9
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -48,6 +48,7 @@
 //= 2.6 Replaced effect numerics with constants. [L0ne_W0lf]
 //= 2.7 Corrected 'IProntera' typo. (bugreport:4522) [L0ne_W0lf]
 //= 2.8 Updated RE/Pre-RE EXP. [Euphy]
+//= 2.9 Updated Nameless Island addition and added questlog support. [Euphy]
 //============================================================ 
 
 // Prontera Culvert
@@ -249,7 +250,7 @@ prt_in,38,108,4	script	Teacher	53,{
 	}
 }
 
-// Gaebolg Family Curse
+// Gaebolg Family Curse :: prt_curse
 //============================================================ 
 prontera,248,212,3	script	Busy Boy#prt	706,3,3,{
 	callsub S_CheckWeight; //Check Player's weight
@@ -1251,10 +1252,13 @@ morocc_in,45,126,3	script	Historian#prt02	702,{
 			mes "that she might spread around!";
 			mes "Oh well, I guess I better head";
 			mes "back to the priests...)^000000";
-			if (prt_curse == 30) 
+			if (prt_curse == 30)  {
 				set prt_curse,31;
-			else 
+				changequest 18042,18044;
+			} else {
 				set prt_curse,60;
+				changequest 18051,18052;
+			}
 			close;
 		}
 
@@ -1279,10 +1283,13 @@ morocc_in,45,126,3	script	Historian#prt02	702,{
 		mes "through Karlomoff's report.";
 		mes "For now, it would be best";
 		mes "to return to Father Bamph.^000000";
-		if (prt_curse == 30)
+		if (prt_curse == 30) {
 			set prt_curse,40;
-		else
+			changequest 18042,18045;
+		} else {
 			set prt_curse,56;
+			completequest 18051;
+		}
 		close;
 	}
 	else if (prt_curse == 31 || prt_curse == 40) {
@@ -1357,6 +1364,7 @@ S_GiveName:
 	mes "for the sake of my research...";
 	if (getarg(0) == 1) delitem 7342,1; //File01
 	set prt_curse,8;
+	changequest 18031,18032;
 	close;
 }
 
@@ -1495,6 +1503,7 @@ mjolnir_01,135,168,3	script	Historian#prt03	754,{
 		mes "for. Good luck in your";
 		mes "travels, adventurer.";
 		set prt_curse,11;
+		changequest 18032,18033;
 		close;
 	}
 	else {
@@ -1935,8 +1944,9 @@ mjolnir_01,316,268,3	script	Exhausted-Looking Woman	879,{
 		mes "I should deliver these";
 		mes "herbs to Prontera Church";
 		mes "before I talk to Rodafrian.)^000000";
-		getitem 7432,1;
+		getitem 7432,1; //Leather_Pouch
 		set prt_curse,13;
+		changequest 18033,18034;
 		close;
 	}
 	else if (prt_curse > 12 && prt_curse < 16) {
@@ -2035,6 +2045,7 @@ mjolnir_01,316,268,3	script	Exhausted-Looking Woman	879,{
 		mes "and let Father Bamph";
 		mes "know about this information.)^000000";
 		set prt_curse,17;
+		changequest 18035,18036;
 		close;
 	}
 	else if (prt_curse == 17) {
@@ -2109,14 +2120,19 @@ mjolnir_01,316,268,3	script	Exhausted-Looking Woman	879,{
 		mes "I can finally free myself from";
 		mes "this burdensome guilt...";
 		mes "Thank you, kind adventurer~";
-		if (prt_curse == 35) set prt_curse,36;
-		else if (prt_curse == 44) set prt_curse,45;
-		else {
+		if (prt_curse == 35) {
+			set prt_curse,36;
+			completequest 18050;
+		} else if (prt_curse == 44) {
+			set prt_curse,45;
+			completequest 18049;
+		} else {
 			next;
 			mes "^3355FFNow, you can return to";
 			mes "Rodafrian, the historian";
 			mes "stationed in Morroc.^000000";
 			set prt_curse,55;
+			changequest 18049,18051;
 		}
 
 		close;
@@ -2443,6 +2459,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "remember anything that happened";
 		mes "after the exorcism failed...";
 		set prt_curse,16;
+		changequest 18034,18035;
 		close;
 	}
 	else if (prt_curse == 16) {
@@ -2483,6 +2500,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "within the bookshelf and";
 		mes "I will meet you there.";
 		set prt_curse,18;
+		changequest 18036,18037;
 		close;
 	}
 	else if (prt_curse > 17 && prt_curse < 22) {
@@ -2519,6 +2537,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "we can verify whether poison";
 		mes "was used to kill the princes?";
 		set prt_curse,23;
+		changequest 18039,18040;
 		close;
 	}
 	else if (prt_curse == 23) {
@@ -2552,6 +2571,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "to the secret ceremonial grounds as soon as you can? I will wait";
 		mes "over there for you once again.";
 		set prt_curse,32;
+		changequest 18044,18046;
 		close;
 	}
 	else if (prt_curse == 32 || prt_curse == 33 || prt_curse == 41 || prt_curse == 42 || prt_curse == 51 || prt_curse == 52) {
@@ -2592,6 +2612,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "you for all of your help. I'm very grateful for what you have done,";
 		mes "adventurer. May safety accompany you on all of your journeys.";
 		set prt_curse,35;
+		changequest 18047,18050;
 		close;
 	}
 	else if (prt_curse > 34 && prt_curse < 40 && !aru_monas) {
@@ -2624,6 +2645,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "to the secret ceremonial grounds as soon as you can? I will wait";
 		mes "over there for you once again.";
 		set prt_curse,41;
+		changequest 18045,18046;
 		close;
 	}
 	else if (prt_curse == 43 || prt_curse == 53) {
@@ -2661,8 +2683,11 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "that I cannot personally thank";
 		mes "you for all of your help. I'm very grateful for what you have done,";
 		mes "adventurer. May safety accompany you on all of your journeys.";
-		if (prt_curse == 43) set prt_curse,44;
-		else set prt_curse,54;
+		if (prt_curse == 43)
+			set prt_curse,44;
+		else
+			set prt_curse,54;
+		changequest 18047,18049;
 		getexp (checkre(3))?90000:1600000,0;
 		close;
 	}
@@ -2698,6 +2723,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "to the secret ceremonial grounds as soon as you can? I will wait";
 		mes "over there for you once again.";
 		set prt_curse,51;
+		changequest 18043,18046;
 		close;
 	}
 	else if (prt_curse == 60) {
@@ -2752,12 +2778,20 @@ prt_church,185,106,3	script	Father Bamph	60,{
 		mes "secret ceremonial grounds";
 		mes "from now on. Thanks again for your help, "+strcharinfo(0)+".";
 		set prt_curse,61;
+		completequest 18052;
 		close;
 	}
 	else {
 		if (prt_curse == 36 || prt_curse == 45 || prt_curse == 56 || prt_curse == 61) {
 // Begin Nameless Island Access Quest Addition
-			if (aru_monas == 1) {
+			if (aru_monas == 0) {
+				mes "[Father Bamph]";
+				mes "I'm sorry, but would it";
+				mes "be alright if we talked";
+				mes "later? I have to handle";
+				mes "a very important task now...";
+				close;
+			} else if (aru_monas == 1) {
 				mes "[Father Bamph]";
 				mes "Oh, I've been waiting for";
 				mes "you, adventurer. I'm sorry";
@@ -2788,6 +2822,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 				mes "and he will assist you in your";
 				mes "search for the lost official.";
 				set aru_monas,2;
+				changequest 17000,17001;
 				close;
 			}
 			else if (aru_monas == 2 || aru_monas == 3) {
@@ -2820,7 +2855,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 				close;
 			}
 			else if (aru_monas == 5) {
-				if (rand(1,10) == 10) {
+				if (rand(1,5) == 4) {
 					mes "[Father Bamph]";
 					mes "Well, I've considered all";
 					mes "possible scenarios. I think";
@@ -2860,8 +2895,9 @@ prt_church,185,106,3	script	Father Bamph	60,{
 					mes "Please accept this money";
 					mes "to cover your Airship fee.";
 					mes "Thank you, and good luck.";
-					set zeny,zeny+1500;
 					set aru_monas,6;
+					set zeny, zeny + (checkre(0))?5000:1500;
+					changequest 17002,17003;
 					close;
 				}
 				else {
@@ -2885,7 +2921,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 				mes "Everything is tied to religion.";
 				close;
 			}
-			else if (aru_monas > 6 && aru_monas < 24) {
+			else if (aru_monas > 6 && aru_monas < 25) {
 				mes "[Father Bamph]";
 				mes "Thank you so much for all";
 				mes "of your hard work. Our agents";
@@ -2895,7 +2931,7 @@ prt_church,185,106,3	script	Father Bamph	60,{
 				mes "know what we've been doing.";
 				close;
 			}
-			else if (aru_monas == 24) {
+			else if (aru_monas == 25 || aru_monas == 26) {
 				mes "[Father Bamph]";
 				mes "Thank you for bring us such";
 				mes "important information. With";
@@ -2910,35 +2946,18 @@ prt_church,185,106,3	script	Father Bamph	60,{
 				mes "own selfish needs. I pray that";
 				mes "it does not grow worse, devolve";
 				mes "into chaos. ^666666*Sigh*^000000 We'll see...";
-				set aru_monas,25;
 				close;
 			}
-			else if (aru_monas >= 25) {
-				mes "[Father Bamph]";
-				mes "Thank you for bring us such";
-				mes "important information. With";
-				mes "your help, we were able to";
-				mes "clear a few unsolved cases.";
-				mes "We expected something like";
-				mes "this, but not this soon.";
-				next;
-				mes "[Father Bamph]";
-				mes "I fear that the Royal Court";
-				mes "has been bickering over their";
-				mes "own selfish needs. I pray that";
-				mes "it does not grow worse, devolve";
-				mes "into chaos. ^666666*Sigh*^000000 We'll see...";
-				close;
-			}
-// End Nameless Island Access Quest Addition
 			else {
 				mes "[Father Bamph]";
-				mes "I'm sorry, but would it";
-				mes "be alright if we talked";
-				mes "later? I have to handle";
-				mes "a very important task now...";
+				mes "It's upsetting to me that";
+				mes "Arunafeltz has been so quiet";
+				mes "lately. You know the expression";
+				mes "about there being a quiet lull";
+				mes "before a raging storm, right?";
 				close;
 			}
+// End Nameless Island Access Quest Addition
 		}
 	}
 }
@@ -2994,6 +3013,7 @@ prt_church,184,110,3	script	Father Biscuss	60,{
 		mes "Church, I want to thank";
 		mes "you for all of your help.";
 		set prt_curse,36;
+		completequest 18048;
 		getexp (checkre(3))?90000:1600000,0;
 		close;
 	}
@@ -3152,6 +3172,7 @@ prt_church,19,111,5	script	#prince1	887,{
 		mes "note that the mark resembles";
 		mes "the scales of a serpent.^000000";
 		set prt_curse,20;
+		changequest 18037,18038;
 		close;
 	}
 	else if (prt_curse == 33 || prt_curse > 41 && prt_curse < 51 || prt_curse == 52) {
@@ -3212,6 +3233,7 @@ prt_church,21,111,5	script	#prince2	887,{
 		mes "involved. Let's go check";
 		mes "the body of the third prince.";
 		set prt_curse,21;
+		changequest 18038,18039;
 		close;
 	}
 	else if (prt_curse == 33 || prt_curse > 41 && prt_curse < 51 || prt_curse == 52) {
@@ -3322,6 +3344,7 @@ prt_church,24,111,5	script	#prince3	887,{
 			if (prt_curse == 32) set prt_curse,33;
 			else if (prt_curse == 41) set prt_curse,42;
 			else set prt_curse,52;
+			changequest 18046,18047;
 			close;
 		}
 		mes "^3355FFYou'll need to have";
@@ -3381,6 +3404,7 @@ moc_fild16,201,295,5	script	Assassin Guildsman#poiso	884,{
 			mes "in Morroc. Go find someone";
 			mes "named ^3131FFMarjana^000000 inside.";
 			set prt_curse,24;
+			changequest 18040,18041;
 			close;
 		}
 		mes "[Assassin Guildsman]";
@@ -3567,6 +3591,7 @@ OnTouch:
 			mes "Father Bamph, so I guess";
 			mes "that I'll go talk to her first.";
 			set prt_curse,30;
+			changequest 18041,18042;
 			close;
 		}
 		mes "["+strcharinfo(0)+"]";
@@ -3576,6 +3601,7 @@ OnTouch:
 		mes "bodies. I better head over";
 		mes "to Prontera right away.";
 		set prt_curse,50;
+		changequest 18041,18043;
 		close;
 	}
 }

+ 2 - 2
npc/quests/quests_rachel.txt

@@ -5529,7 +5529,7 @@ ra_temin,277,159,3	script	High Priest Zhed#rachel	932,{
 				mes "me like that! Saying";
 				mes "it like that is kind of";
 				mes "overdoing it, isn't it?";
-				emotion 54,1;
+				emotion e_sigh,1;
 				next;
 				mes "[High Priest Zhed]";
 				mes "Not at all. In fact, I'm";
@@ -5539,7 +5539,7 @@ ra_temin,277,159,3	script	High Priest Zhed#rachel	932,{
 				mes "by the Valkyries. Now, how";
 				mes "may I help you, my friend?";
 				next;
-				select("Mysterious Building in the Volcano:");
+				select("Mysterious Building in the Volcano");
 				mes "["+strcharinfo(0)+"]";
 				mes "Actually, I was wondering";
 				mes "if you knew of anything about";

+ 17 - 1
npc/quests/quests_veins.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 2.4
+//= 2.5
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -48,6 +48,7 @@
 //= 2.2 Moved "Wincing Old Man" to pre-re/re coordinates. [Euphy]
 //= 2.3 Fixed incorrect use of 'close'. [Joseph]
 //= 2.4 Updated RE/Pre-RE EXP. [Euphy]
+//= 2.5 Added GM management NPC. [Euphy]
 //============================================================ 
 
 // Stone Quest
@@ -2649,6 +2650,20 @@ comodo,135,299,0	script	Young Man#sch2	809,{
 	}
 }
 
+sec_in02,10,43,4	script	Extra Story Patch	809,{
+	callfunc "F_GM_NPC";
+	mes "[Patch]";
+	mes "Yeah, you can try.";
+	next;
+	if(select("Now:How many?") == 2) {
+		input .@input,0,1000;
+		set que_sch, .@input;
+	}
+	mes " ";
+	mes ""+que_sch;
+	close;
+}
+
 // Siblings Quest
 //============================================================ 
 veins,327,185,3	script	Kid#camelcamel	944,{
@@ -3132,6 +3147,7 @@ veins,327,185,3	script	Kid#camelcamel	944,{
 				mes "I'm happy that";
 				mes "I can help you too!";
 				set aru_monas,16;
+				changequest 17011,17012;
 				close;
 			}
 			else if (aru_monas < 26) {

+ 95 - 117
npc/quests/seals/brisingamen_seal.txt

@@ -1,11 +1,11 @@
 //===== rAthena Script ======================================= 
-//= Brisingamen seal unlocking NPCs.
+//= God Item Quest - Brisingamen Seal
 //===== By: ================================================== 
 //= SinSloth
 //===== Current Version: ===================================== 
-//= 1.6
+//= 1.7
 //===== Compatible With: ===================================== 
-//= rAthena
+//= rAthena SVN
 //===== Description: ========================================= 
 //= Quest for breaking the seal of Brisingamen.
 //===== Additional Comments: =================================
@@ -18,12 +18,13 @@
 //= 1.4 Replaced effect numerics with constants. [Samuray22]
 //= 1.5 Corrected serverwide announcement. [L0ne_W0lf]
 //= 1.6 Updated RE/Pre-RE EXP. [Euphy]
+//= 1.7 Renewal script update. [Euphy]
 //============================================================
 
 prt_fild08,175,374,3	script	Bard#brising	51,{
 	cutin "god_nelluad01",2;
-	if (($God2 > 49) && ($God3 < 100)){
-		if (god_brising > 49){
+	if ($God2 >= $@god_check1 && $God3 < $@god_check2) {
+		if (god_brising > 49) {
 			mes "[Nelliorde]";
 			mes "Oh, I guess all is going well for you. So how has everything else been?";
 			next;
@@ -247,7 +248,7 @@ prt_fild08,175,374,3	script	Bard#brising	51,{
 				break;
 			}
 		}
-		else if((god_brising > 0) && (god_brising < 50)){
+		else if ((god_brising > 0) && (god_brising < 50)){
 			mes "[Nelliorde]";
 			mes "So, have you";
 			mes "met Mr. Kaili?";
@@ -846,7 +847,7 @@ yuno_in04,47,113,1	script	Studying Scholar#1	749,{
 		mes "^3355FFWait a second! Right now, you're carrying too many items with you. Please come back after putting some of your things into Kafra Storage.^000000";
 		close;
 	}
-	if ($God3 == 100) {
+	if ($God3 == $@god_check2) {
 		mes "[Studying Scholar]";
 		mes "Hmmm...";
 		mes "The highest quality Red Potion ever...";
@@ -855,7 +856,7 @@ yuno_in04,47,113,1	script	Studying Scholar#1	749,{
 		mes "If only I could figure a way to balance the consistency of the ground Red Herbs mixed with the water. That part is most crucial...";
 		close;
 	}
-	if ($God2 > 49) {
+	if ($God2 >= $@god_check1) {
 		if (god_brising == 50) {
 			mes "[Enrico Kaili]";
 			mes "Ah, " + strcharinfo(0) + ",";
@@ -877,40 +878,36 @@ yuno_in04,47,113,1	script	Studying Scholar#1	749,{
 			mes "[Enrico Kaili]";
 			mes "Oh! I'm so excited! I don't know what to do first! Should I report to His Majesty or publish my findings or...";
 			next;
-			switch(select("^333333*Ahem!*^000000 My reward!")) {
-			case 1:
-				mes "[Enrico Kaili]";
-				mes "Oh, right.";
-				mes "Thank you for all the trouble you have endured for my sake. You are truly one of the best researchers I've ever met.";
-				next;
-				mes "[Enrico Kaili]";
-				mes "Then as promised...";
-				mes "I will give you something from my precious collection! Now, let me see what we have here...";
-				next;
-				mes "[Enrico Kaili]";
-				mes "Please...";
-				mes "Take this.";
-				set god_brising,50;
-				getitem 616,1; // Old_Card_Album
-				getexp 600000,0; //unconfirmed
-				next;
-				mes "[Enrico Kaili]";
-				mes "Please accept this as my way of thanking you for assisting in my";
-				mes "research. If the opportunity arises, I would like to ask you for your help once again. Now please, take care.";
-				if ($God3 < 100) set $God3,$God3 +1;
-					if ($God3 == 50) {
-						announce "The 3rd Seal of [Brisingamen] has appeared.",bc_all;
-					}
-					else if ($God3 == 100) {
-						if ($God1 == 100 && $God2 == 100 && $God3 == 100 && $God4 == 100) {
-							announce "Four seals have been released at the same time with the seal of [Brisingamen].",bc_all;
-						}
-						else {
-							announce "The 3rd seal of [Brisingamen] has been released.",bc_all;
-						}
-					}
-				}
-				close;
+			select("^333333*Ahem!*^000000 My reward!");
+			mes "[Enrico Kaili]";
+			mes "Oh, right.";
+			mes "Thank you for all the trouble you have endured for my sake. You are truly one of the best researchers I've ever met.";
+			next;
+			mes "[Enrico Kaili]";
+			mes "Then as promised...";
+			mes "I will give you something from my precious collection! Now, let me see what we have here...";
+			next;
+			mes "[Enrico Kaili]";
+			mes "Please...";
+			mes "Take this.";
+			set god_brising,50;
+			getitem 616,1; // Old_Card_Album
+			getexp (checkre(3))?60000:600000,0;
+			next;
+			mes "[Enrico Kaili]";
+			mes "Please accept this as my way of thanking you for assisting in my";
+			mes "research. If the opportunity arises, I would like to ask you for your help once again. Now please, take care.";
+			if ($God3 < $@god_check2)
+				set $God3,$God3 +1;
+			if ($God3 == $@god_check1)
+				announce "The 3rd Seal of [Brisingamen] has appeared.",bc_all;
+			else if ($God3 == $@god_check2) {
+				if ($God1 == $@god_check2 && $God2 == $@god_check2 && $God3 == $@god_check2 && $God4 == $@god_check2)
+					announce "Four seals have been released at the same time with the seal of [Brisingamen].",bc_all;
+				else
+					announce "The 3rd seal of [Brisingamen] has been released.",bc_all;
+			}
+			close;
 		}
 		else if (god_brising == 48) {
 			mes "[Enrico Kaili]";
@@ -1262,7 +1259,7 @@ yuno_in04,47,113,1	script	Studying Scholar#1	749,{
 			mes "If she'll let you look at her records, you can probably find out where he lives. Now why don't you talk to that lady towards the left part of this room?";
 			close;
 		}
-		else if(god_brising == 2) {
+		else if (god_brising == 2) {
 			mes "[Enrico Kaili]";
 			mes "So, have you";
 			mes "considered my proposal?";
@@ -1400,7 +1397,7 @@ yuno_in04,47,113,1	script	Studying Scholar#1	749,{
 }
 
 prt_church,113,103,1	script	Praying Man	798,{
- 	if ($God2 < 50) {
+ 	if ($God2 < $@god_check1) {
 		mes "[Praying Man]";
 		mes "Let everyone live a life";
 		mes "of happiness. Let there be";
@@ -1412,7 +1409,7 @@ prt_church,113,103,1	script	Praying Man	798,{
 		mes "month's paycheck on...";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "[Praying Man]";
 		mes "Now is the time to reflect upon the past to prepare for the future.";
 		next;
@@ -1544,9 +1541,9 @@ prt_church,113,103,1	script	Praying Man	798,{
 		mes "to Lowen.";
 		close;
 	}
-	else if(god_brising == 5) {
+	else if (god_brising == 5) {
 		set @brising_try,rand(1,4);
-		if(@brising_try == 1) {
+		if (@brising_try == 1) {
 			mes "[Hermite Charles]";
 			mes "You're still here.";
 			mes "Does that mean you";
@@ -2087,13 +2084,13 @@ prt_church,113,103,1	script	Praying Man	798,{
 }
 
 prt_castle,80,52,0	script	Personnel Record#book1	111,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "[Librarian]";
 		mes "What are you doing?";
 		mes "Don't touch anything!";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "[Librarian]";
 		mes "What are you doing?";
 		mes "Don't touch anything!";
@@ -2270,13 +2267,13 @@ prt_castle,80,52,0	script	Personnel Record#book1	111,{
 
 //-----------librarian----------------------------------------------------------
 prt_castle,84,51,5	script	Librarian#2	105,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "[Librarian]";
 		mes "What are you doing here?";
 		mes "Don't touch anything!";
 		close;
 	}
- 	if ($God3 > 99) {
+ 	if ($God3 >= $@god_check2) {
 		mes "[Librarian]";
 		mes "What are you doing here?";
 		mes "Don't touch anything!";
@@ -2444,7 +2441,7 @@ prt_castle,84,51,5	script	Librarian#2	105,{
 }
 
 prontera,260,354,4	script	Woman#Rosa Ellenen	101,{
-	if ($God2 < 50){ 
+	if ($God2 < $@god_check1){ 
 		mes "[Woman]";
 		mes "Hm?";
 		mes "What brings";
@@ -2454,7 +2451,7 @@ prontera,260,354,4	script	Woman#Rosa Ellenen	101,{
 		mes "take a walk.";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "[Woman]";
 		mes "Hm?";
 		mes "What brings";
@@ -2464,7 +2461,7 @@ prontera,260,354,4	script	Woman#Rosa Ellenen	101,{
 		mes "take a walk.";
 		close;
 	}
-	if(god_brising > 33) {
+	if (god_brising > 33) {
 		mes "[Rosa Ellenen]";
 		mes "Are you the one";
 		mes "who visited me before?";
@@ -2570,7 +2567,7 @@ prontera,260,354,4	script	Woman#Rosa Ellenen	101,{
 }
 
 prontera,262,353,0	script	Gravestone	111,{
-	if($God2 > 49) {
+	if ($God2 > $@god_check1) {
 		if (god_brising > 33) {
 			mes "Lowen Ellenen";
 			mes " ";
@@ -2586,7 +2583,7 @@ prontera,262,353,0	script	Gravestone	111,{
 			close;
 		}
 	}
-	else	{
+	else {
 		mes "^3355FFIt's just an";
 		mes "ordinary gravestone.^000000";
 		next;
@@ -2597,12 +2594,12 @@ prontera,262,353,0	script	Gravestone	111,{
 }
  
 gef_dun01,89,192,0	script	#lowentrace	111,3,3,{
-	if($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "^3355FFIt's just an old,";
 		mes "dry piece of wood.^000000";
 		close;
 	}
-	if($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "^3355FFIt's just an old,";
 		mes "dry piece of wood.^000000";
 		close;
@@ -2614,7 +2611,7 @@ gef_dun01,89,192,0	script	#lowentrace	111,3,3,{
 		switch(select("Yes:No")) {
 		case 1:
 			input @lowenstring$;
-			if(@lowenstring$ == "Lowen") {
+			if (@lowenstring$ == "Lowen") {
 				if (god_brising == 30) {
 					mes "[Lowen Ellenen]";
 					mes "^6E7B8B...Y-you're...";
@@ -2713,21 +2710,19 @@ gef_dun01,89,192,0	script	#lowentrace	111,3,3,{
 	}
 
 OnTouch:
-	if((god_brising > 9) && (god_brising < 34)) {
+	if ((god_brising > 9) && (god_brising < 34)) {
 		emotion e_gasp;
 	}
 	end;
 }
 
 gef_dun01,203,48,0	script	#lowentrace1	111,3,3,{
-
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "^3355FFIt's just an old,";
 		mes "dry piece of wood.^000000";
 		close;
 	}
-
-	if( $God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "^3355FFIt's just an old,";
 		mes "dry piece of wood.^000000";
 		close;
@@ -2739,8 +2734,8 @@ gef_dun01,203,48,0	script	#lowentrace1	111,3,3,{
 		switch(select("Yes:No")) {
 		case 1:
 			input @lowenstring$;
-				if(@lowenstring$ == "Lowen") {
-					if(god_brising == 31) {
+				if (@lowenstring$ == "Lowen") {
+					if (god_brising == 31) {
 					mes "[Lowen Ellenen]";
 					mes "^6E7B8BYou came back!";
 					mes "You'll be with me";
@@ -2761,7 +2756,7 @@ gef_dun01,203,48,0	script	#lowentrace1	111,3,3,{
 						mes "care of yourself...^000000";
 						close;
 					}
-				} else if(god_brising == 30) {
+				} else if (god_brising == 30) {
 					mes "[Lowen Ellenen]";
 					mes "^6E7B8BAh yes. This is it.";
 					mes "You look very curious about me, yet I am amazed that you can hear my voice. Please let me tell you an old story.^000000";
@@ -2847,7 +2842,7 @@ gef_dun01,203,48,0	script	#lowentrace1	111,3,3,{
 	}
 
 OnTouch:
-	if((god_brising > 9) && (god_brising < 34)) {
+	if ((god_brising > 9) && (god_brising < 34)) {
 		emotion e_gasp;
 	}
 	end;
@@ -3135,7 +3130,7 @@ OnSummon:
 
 OnMobDeath:
 	set .brisinmobdead,.brisinmobdead -1;
-	if(.brisinmobdead > 0) end;
+	if (.brisinmobdead > 0) end;
 	set god_brising,31;
 	hideoffnpc "Valkyrie#1";
 	end;
@@ -3156,29 +3151,12 @@ OnReset:
 	end;
 }
 
-que_god02,173,58,4	script	#doppelganger1	739,{
-	end;
-}
-
-que_god02,175,55,4	script	#doppelganger2	739,{
-	end;
-}
-
-que_god02,175,54,1	script	#lowen	745,{
-	end;
-}
-
-que_god02,178,49,1	script	#knight1	751,{
-	end;
-}
-
-que_god02,168,53,7	script	#knight2	734,{
-	end;
-}
-
-que_god02,167,58,4	script	#knight3	752,{
-	end;
-}
+que_god02,173,58,4	script	#doppelganger1	739,{ end; }
+que_god02,175,55,4	script	#doppelganger2	739,{ end; }
+que_god02,175,54,1	script	#lowen	745,{ end; }
+que_god02,178,49,1	script	#knight1	751,{ end; }
+que_god02,168,53,7	script	#knight2	734,{ end; }
+que_god02,167,58,4	script	#knight3	752,{ end; }
 
 que_god02,174,49,0	script	#lowenone	139,0,0,{
 
@@ -3534,13 +3512,13 @@ que_god02,178,127,3	script	Valkyrie#1	811,{
 }
 
 xmas,38,105,0	script	#brisindwarf1	111,3,3,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "^3355FFA lot of snow";
 		mes "is heavily piled";
 		mes "here on the ground.^000000";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "^3355FFA lot of snow";
 		mes "is heavily piled";
 		mes "here on the ground.^000000";
@@ -3701,7 +3679,7 @@ xmas,38,105,0	script	#brisindwarf1	111,3,3,{
 	}
 
 OnTouch:
-	if(god_brising > 39) {
+	if (god_brising > 39) {
 		emotion e_gasp,1;
 	}
 	end;
@@ -4001,12 +3979,12 @@ OnInit:
 }
 
 prt_fild02,185,269,0	script	#brisindwarf2	111,3,3,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "^3355FFIt's just an";
 		mes "ordinary rock.^000000";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "^3355FFIt's just an";
 		mes "ordinary rock.^000000";
 		close;
@@ -4168,7 +4146,7 @@ prt_fild02,185,269,0	script	#brisindwarf2	111,3,3,{
 	}
 
 OnTouch:
-	if(god_brising > 41) {
+	if (god_brising > 41) {
 		emotion e_gasp,1;
 	}
 	end;
@@ -4193,7 +4171,7 @@ prt_fild02,185,270,3	script	Dvalin#1	826,{
 		hideonnpc "Dvalin#1";
 		end;
 	}
-	else if(god_brising == 42) {
+	else if (god_brising == 42) {
 		mes "[Dvalin]";
 		mes "Wah, it's not Alfrik?";
 		mes "Who are you to wake Dvalin?";
@@ -4278,7 +4256,7 @@ prt_fild02,185,270,3	script	Dvalin#1	826,{
 			end;
 		}
 	}
-	else if(god_brising == 43) {
+	else if (god_brising == 43) {
 		mes "[Dvalin]";
 		mes "Why do you keep calling me? I did everything I can do for you. I even gave you the key to the question.";
 		next;
@@ -4298,11 +4276,11 @@ OnInit:
 }
 
 mjolnir_09,85,129,0	script	#brisindwarf3	111,3,3,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "^3355FFThe sight of this bubbling stream refreshes you just by looking at it.^000000";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "^3355FFThe sight of this bubbling stream refreshes you just by looking at it.^000000";
 		close;
 	}
@@ -4362,14 +4340,14 @@ mjolnir_09,85,129,0	script	#brisindwarf3	111,3,3,{
 	}
 
 OnTouch:
-	if(god_brising > 42) {
+	if (god_brising > 42) {
 		emotion e_gasp,1;
 	}
 	end;
 }
 
 mjolnir_09,87,129,3	script	Berling#1	826,{
-	if(god_brising > 44) {
+	if (god_brising > 44) {
 		mes "[Berling]";
 		mes "You're the one that's awakened us? Hahaha, perhaps that's a sign we may see Freya again! Hahahaha!";
 		next;
@@ -4379,7 +4357,7 @@ mjolnir_09,87,129,3	script	Berling#1	826,{
 		hideonnpc "OnBerling#1";
 		end;
 	}
-	else if(god_brising == 43) {
+	else if (god_brising == 43) {
 		mes "[Berling]";
 		mes "What the...?";
 		mes "It's a human?!";
@@ -4484,7 +4462,7 @@ mjolnir_09,87,129,3	script	Berling#1	826,{
 			end;
 		}
 	}
-	else if(god_brising == 44) {
+	else if (god_brising == 44) {
 		mes "[Berling]";
 		mes "Did you already forget the lyrics? Let me tell them to you again, so don't forget this time.";
 		next;
@@ -4513,12 +4491,12 @@ OnInit:
 }
 
 mjo_dun02,126,36,0	script	#brisindwarf4	111,3,3,{
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "[" + strcharinfo(0) + "]";
 		mes "Bah, no way out.";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "[" + strcharinfo(0) + "]";
 		mes "Bah, no way out.";
 		close;
@@ -4536,35 +4514,35 @@ mjo_dun02,126,36,0	script	#brisindwarf4	111,3,3,{
 		mes "What was the first line...?";
 		next;
 		input @dwarfsong1$;
-		if(@dwarfsong1$ == "No jewel in the world can compare.") set @point,@point +1;
-		mes	"[" + strcharinfo(0) + "]";
+		if (@dwarfsong1$ == "No jewel in the world can compare.") set @point,@point +1;
+		mes "[" + strcharinfo(0) + "]";
 		mes " " + @dwarfsong1$ + "";
 		mes "Then...ummm..";
 		mes "The second line?";
 		next;
 		input @dwarfsong2$;
-		if(@dwarfsong2$ == "Our masterpiece made from love.") set @point,@point +1;
+		if (@dwarfsong2$ == "Our masterpiece made from love.") set @point,@point +1;
 		mes "[" + strcharinfo(0) + "]";
 		mes " " + @dwarfsong2$ + "";
 		mes "Now, what was";
 		mes "the third line...?";
 		next;
 		input @dwarfsong3$;
-		if(@dwarfsong3$ == "She wanted the dazzling necklace.") set @point,@point +1;
+		if (@dwarfsong3$ == "She wanted the dazzling necklace.") set @point,@point +1;
 		mes "[" + strcharinfo(0) + "]";
 		mes " " + @dwarfsong3$ + "";
 		mes "Now, the fourth";
 		mes "line after that...";
 		next;
 		input @dwarfsong4$;
-		if(@dwarfsong4$ == "We wanted the goddess of beauty.") set @point,@point +1;
+		if (@dwarfsong4$ == "We wanted the goddess of beauty.") set @point,@point +1;
 		mes "[" + strcharinfo(0) + "]";
 		mes " " + @dwarfsong4$ + "";
 		mes "Alright, now";
 		mes "for the last line...";
 		next;
 		input @dwarfsong5$;
-		if(@dwarfsong5$ == "Our happiest times were with her.") set @point,@point +1;
+		if (@dwarfsong5$ == "Our happiest times were with her.") set @point,@point +1;
 		mes "[" + strcharinfo(0) + "]";
 		mes " " + @dwarfsong5$ + "";
 		mes "Alright, let's give it a try.";
@@ -4602,12 +4580,12 @@ mjo_dun02,126,36,0	script	#brisindwarf4	111,3,3,{
 	}
 
 OnTouch:
-	if ($God2 < 50) {
+	if ($God2 < $@god_check1) {
 		mes "[" + strcharinfo(0) + "]";
 		mes "Beh, no way out.";
 		close;
 	}
-	if ($God3 > 99) {
+	if ($God3 >= $@god_check2) {
 		mes "[" + strcharinfo(0) + "]";
 		mes "Beh, no way out.";
 		close;
@@ -4679,7 +4657,7 @@ mjo_dun02,126,34,1	script	Grer#1	826,{
 		hideonnpc "Grer#1";
 		end;
 	}
-	else if(god_brising == 46) {
+	else if (god_brising == 46) {
 		mes "[Grer]";
 		mes "My name is Grer.";
 		mes "I should have been";

+ 65 - 89
npc/quests/seals/god_global.txt

@@ -1,113 +1,46 @@
 //===== rAthena Script ======================================= 
-//= Variable Management NPC for the god item quest
+//= God Item Quest - Variable Management
 //===== By: ================================================== 
 //= MasterOfMuppets
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
-//= rAthena
+//= rAthena SVN
 //===== Description: ========================================= 
 //= Use this NPC if the seals quest variables get messed up.
 //===== Additional Comments: =================================
 //= 1.0 First version. [MasterOfMuppets]
 //= 1.1 Updated several aspects of the script. [L0ne_W0lf]
+//= 1.2 Renewal script update. [Euphy]
+//=    Added GM management function.
 //============================================================
 
 sec_in02,15,170,0	script	Golbal var	817,{
-	//mes "[Check]";
-	//mes "Please enter the password.";
-	//next;
-	//set .@check,68392411;
-	//dlgwrite 0 10000000
-	//if (check == input){
-	if (getgmlevel() > 98) {
+	callfunc "F_GM_NPC";
+	mes "[Check]";
+	mes "Please enter the password.";
+	next;
+	if (callfunc("F_GM_NPC",68392411,0) == 1) {
 		mes "[Check]";
 		mes "Please choose a menu.";
 		next;
-		switch(select("Now:No.1:No.2:No.3:No.4:Reset")) {
+		switch(select("Now:No.1:No.2:No.3:No.4:Reset:god_sl_1:god_eremes:god_brising:god_mjo_0:god_mjo_1:god_mjo_2:god_mjo_3:god_mjo_4")) {
 		case 1:
 			mes "^0000FF$God1^000000 = ^FF0000" + $God1 + "^000000.";
 			mes "^0000FF$God2^000000 = ^FF0000" + $God2 + "^000000.";
 			mes "^0000FF$God3^000000 = ^FF0000" + $God3 + "^000000.";
 			mes "^0000FF$God4^000000 = ^FF0000" + $God4 + "^000000.";
 			close;
-		case 2:
-			input .@input,0,100;
-			mes "[Check]";
-			mes "Would you like to change to "+.@input+"?";
-			next;
-			if (select("Yes:No") == 1) {
-				mes "[Check]";
-				mes "The command "+.@input+" has been confirmed.";
-				next;
-				set $God1,.@input;
-				mes "$God1 "+.@input+"";
-				close;
-			}
-			else {
-				mes "[Check]";
-				mes "The command has been canceled.";
-				close;
-			}
-		case 3:
-			input .@input,0,100;
-			mes "[Check]";
-			mes "Would you like to change to "+.@input+"?";
-			next;
-			if (select("Yes:No") == 1) {
-				mes "[Check]";
-				mes "The command "+.@input+" has been confirmed.";
-				next;
-				set $God2,.@input;
-				mes "$God2 "+.@input+"";
-				close;
-			}
-			else {
-				mes "[Check]";
-				mes "The command has been canceled.";
-				close;
-			}
-		case 4:
-			input .@input,0,100;
-			mes "[Check]";
-			mes "Would you like to change to "+.@input+"?";
-			next;
-			if (select("Yes:No") == 1) {
-				mes "[Check]";
-				mes "The command "+.@input+" has been confirmed.";
-				next;
-				set $God3,.@input;
-				mes "$God3 "+.@input+"";
-				close;
-			}
-			else {
-				mes "[Check]";
-				mes "The command has been canceled.";
-				close;
-			}
-		case 5:
-			input .@input,0,100;
-			mes "[Check]";
-			mes "Would you like to change to "+.@input+"?";
-			next;
-			if (select("Yes:No") == 1) {
-				mes "[Check]";
-				mes "The command "+.@input+" has been confirmed.";
-				next;
-				set $God4,.@input;
-				mes "$God4 "+.@input+"";
-				close;
-			}
-			else {
-				mes "[Check]";
-				mes "The command has been canceled.";
-				close;
-			}
+		case 2: callsub L_Number,"$God1"; break;
+		case 3: callsub L_Number,"$God2"; break;
+		case 4: callsub L_Number,"$God3"; break;
+		case 5: callsub L_Number,"$God4"; break;
 		case 6:
 			mes "[Check]";
 			mes "Are you really sure that you want to reset the entire list of God Globalvar?";
+			mes "Please enter the password.";
 			next;
-			if (select("Yes:No") == 1) {
+			if (callfunc("F_GM_NPC",68392411,0) == 1) {
 				mes "[Check]";
 				mes "Now, the entire list of God Globalvar is being reset.";
 				next;
@@ -120,18 +53,61 @@ sec_in02,15,170,0	script	Golbal var	817,{
 				mes "^0000FF$God3^000000 = ^FF0000" + $God3 + "^000000.";
 				mes "^0000FF$God4^000000 = ^FF0000" + $God4 + "^000000.";
 				close;
-			}
-			else {
+			} else {
 				mes "[Check]";
 				mes "The command has been canceled.";
 				close;
 			}
+		case 7: callsub L_Var,"god_sl_1"; break;
+		case 8: callsub L_Var,"god_eremes"; break;
+		case 9: callsub L_Var,"god_brising"; break;
+		case 10: callsub L_Var,"god_mjo_0"; break;
+		case 11: callsub L_Var,"god_mjo_1"; break;
+		case 12: callsub L_Var,"god_mjo_2"; break;
+		case 13: callsub L_Var,"god_mjo_3"; break;
+		case 14: callsub L_Var,"god_mjo_4"; break;
 		}
+	} else {
+		mes "[Check]";
+		mes "Incorrect password.";
+		close;
 	}
-	else {
+
+L_Number:
+	input .@input,0,$@god_check2;
+	mes "[Check]";
+	mes "Would you like to change to "+.@input+"?";
+	mes "Please enter the password.";
+	next;
+	if (callfunc("F_GM_NPC",68392411,0) == 1) {
 		mes "[Check]";
-		//mes "Incorrect password.";
-		mes "You cannot access this NPC.";
+		mes "The command "+.@input+" has been confirmed.";
+		next;
+		setd getarg(0),.@input;
+		mes getarg(0)+" "+.@input;
+		close;
+	} else {
+		mes "[Check]";
+		mes "The command has been canceled.";
 		close;
 	}
+
+L_Var:
+	input .@input;
+	setd getarg(0),.@input;
+	next;
+	mes "[Check]";
+	mes "Done.";
+	close;
+
+OnInit:
+	// Seals roll at 25/50 in Renewal and 50/100 in Pre-Renewal.
+	if (checkre(0)) {
+		set $@god_check1,25;
+		set $@god_check2,50;
+	} else {
+		set $@god_check1,50;
+		set $@god_check2,100;
+	}
+	end;
 }

+ 50 - 34
npc/quests/seals/god_weapon_creation.txt

@@ -1,21 +1,22 @@
 //===== rAthena Script ======================================= 
-//= God items creation NPCs
+//= God Item Quest - Item Creation
 //===== By: ================================================== 
 //= SinSloth
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
-//= rAthena
+//= rAthena SVN
 //===== Description: ========================================= 
-//= 
+//= Craft god items after the four seals are broken.
 //===== Additional Comments: =================================
 //= 1.0 First version. Thanks to SinSloth for scripting it. [MasterOfMuppets]
 //= 1.1 Updated several aspects of the script. [L0ne_W0lf]
 //= 1.2 Corrected several incorrect item IDs. [L0ne_W0lf]
+//= 1.3 Renewal script update. [Euphy]
+//=     Added GM management function.
 //============================================================
 
 gld_dun01,28,85,0	script	Grunburti#1::GodDwarf	826,{
-	set .@GID,getcharid(2);
 	mes "[Dwarf Grunburti]";
 	mes "A human?!";
 	mes "This land is full";
@@ -69,8 +70,9 @@ gld_dun01,28,85,0	script	Grunburti#1::GodDwarf	826,{
 		mes "At least I was fortunate enough to find this cave. We Dwarves are most cozy living underground, after all.";
 		close;
 	case 3:
-		if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
-			if (($God1 > 49) && ($God2 > 49) && ($God3 > 49) && ($God4 > 49) && (strcharinfo(0) == getguildmaster(.@GID))) {
+		set .@GID,getcharid(2);
+		if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
+			if (($God1 >= $@god_check1) && ($God2 >= $@god_check1) && ($God3 >= $@god_check1) && ($God4 >= $@god_check1) && (strcharinfo(0) == getguildmaster(.@GID))) {
 				mes "[Dwarf Grunburti]";
 				mes "Hmm...";
 				mes "I'll need some things to make a weapon for you. What exactly were you interested in having?";
@@ -340,7 +342,6 @@ gld_dun01,28,85,0	script	Grunburti#1::GodDwarf	826,{
 		close;
 	}
 }
-
 gld_dun02,85,84,0	duplicate(GodDwarf)	Grunburti#2	826
 gld_dun03,92,105,0	duplicate(GodDwarf)	Grunburti#3	826
 gld_dun04,268,230,0	duplicate(GodDwarf)	Grunburti#4	826
@@ -376,7 +377,7 @@ que_god01,215,128,0	duplicate(GodEntrance)	 #que_godnpc2	111
 que_god01,213,128,0	duplicate(GodEntrance)	 #que_godnpc3	111
 
 que_god01,154,112,4	script	Grunburti#god	826,{
-	if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
+	if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
 		mes "[Dwarf Grunburti]";
 		mes "One of the godly";
 		mes "items has been created,";
@@ -463,7 +464,7 @@ que_god01,154,112,4	script	Grunburti#god	826,{
 				mes "Never in my wildest";
 				mes "imaginings have I thought that I'd be crafting this masterpiece for a mere human. Give me a moment.";
 				next;
-				if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
+				if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
 					mes "[Dwarf Grunburti]";
 					mes "But...";
 					mes "The seals";
@@ -543,7 +544,7 @@ que_god01,154,112,4	script	Grunburti#god	826,{
 				mes "I'd never believe that";
 				mes "something so powerful and dangerous as Megingjard would end up in the hands of a human...";
 				next;
-				if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
+				if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
 					mes "[Dwarf Grunburti]";
 					mes "But...";
 					mes "The seals";
@@ -630,7 +631,7 @@ que_god01,154,112,4	script	Grunburti#god	826,{
 				mes "used by a human.";
 				mes "Give me a moment...";
 				next;
-				if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
+				if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
 					mes "[Dwarf Grunburti]";
 					mes "But...";
 					mes "The seals";
@@ -718,7 +719,7 @@ que_god01,154,112,4	script	Grunburti#god	826,{
 				mes "or you will regret it.";
 				mes "Mark my words...";
 				next;
-				if (($God1 < 100) || ($God2 < 100) || ($God3 < 100) || ($God4 < 100)){
+				if (($God1 < $@god_check2) || ($God2 < $@god_check2) || ($God3 < $@god_check2) || ($God4 < $@god_check2)){
 					mes "[Dwarf Grunburti]";
 					mes "But...";
 					mes "The seals";
@@ -787,12 +788,7 @@ OnTimer610000:
 	end;
 
 OnTimer612000:
-	areawarp "que_god01",154,67,4,7,"prontera",156,324;
-	areawarp "que_god01",154,82,4,7,"prontera",156,324;
-	areawarp "que_god01",145,99,9,9,"prontera",156,324;
-	areawarp "que_god01",164,99,9,9,"prontera",156,324;
-	areawarp "que_god01",145,118,9,9,"prontera",156,324;
-	areawarp "que_god01",164,118,9,9,"prontera",156,324;
+	donpcevent "god_wep_warpmaster::OnEnable";
 	end;
 
 OnTimer615000:
@@ -802,24 +798,50 @@ OnTimer615000:
 	end;
 }
 
-/*
-que_god01,293,3,0	script	Godly Item Quests Related#god	90,{
+que_god01,169,82,0	script	god_wep_warpmaster	-1,{
+OnEnable:
+	for(set .@i,1; .@i<=6; set .@i,.@i+1)
+		enablenpc "god_failwarp#"+.@i;
+	end;
+OnDisable:
+	for(set .@i,1; .@i<=6; set .@i,.@i+1)
+		disablenpc "god_failwarp#"+.@i;
+	end;
+}
+
+que_god01,154,67,0	script	god_failwarp#1	-1,4,7,{
+OnInit:
+	disablenpc strnpcinfo(0);
+	end;
+OnTouch:
+	warp "prontera",156,324;
+	end;
+}
+que_god01,154,82,0	duplicate(god_failwarp#1)	god_failwarp#2	-1,4,7
+que_god01,145,99,0	duplicate(god_failwarp#1)	god_failwarp#3	-1,9,9
+que_god01,164,99,0	duplicate(god_failwarp#1)	god_failwarp#4	-1,9,9
+que_god01,145,118,0	duplicate(god_failwarp#1)	god_failwarp#5	-1,9,9
+que_god01,164,118,0	duplicate(god_failwarp#1)	god_failwarp#6	-1,9,9
+
+// Original name: "Godly Item Quests Related#god"
+que_god01,293,3,0	script	Godly Item Quests#god	90,{
+	callfunc "F_GM_NPC";
 	mes "[Use in case of emergency]";
 	mes "Please enter password.";
 	mes "If you wish to cancel, please enter 0.";
 	next;
-	input .@input,0,4001;
-	if (.@input < 0 || .@input > 4000) {
+	set .@i, callfunc("F_GM_NPC",1854,0,0,4000);
+	if (.@i == -2) {
 		mes "[Use in case of emergency]";
 		mes "Password is incorrect.";
 		close;
-	}
-	else if(.@input == 0) {
+	} else if (.@i == -1) {
 		mes "[Use in case of emergency]";
 		mes "You have canceled your request.";
 		close;
-	}
-	else if(.@input == 1854) {
+	} else if (.@i == 0) {
+		close;
+	} else {
 		mes "[Use in case of emergency]";
 		mes "What services would you like to use?";
 		next;
@@ -828,12 +850,7 @@ que_god01,293,3,0	script	Godly Item Quests Related#god	90,{
 			mes "[Use in case of emergency]";
 			mes "Press the 'Next' button to turn off warps.";
 			next;
-			areawarp "que_god01",154,67,4,7,"prontera",156,324;
-			areawarp "que_god01",154,82,4,7,"prontera",156,324;
-			areawarp "que_god01",145,99,9,9,"prontera",156,324;
-			areawarp "que_god01",164,99,9,9,"prontera",156,324;
-			areawarp "que_god01",145,118,9,9,"prontera",156,324;
-			areawarp "que_god01",164,118,9,9,"prontera",156,324;
+			donpcevent "god_wep_warpmaster::OnDisable";
 			mes "[Use in case of emergency]";
 			mes "You have successfully turned off warps.";
 			close;
@@ -856,4 +873,3 @@ que_god01,293,3,0	script	Godly Item Quests Related#god	90,{
 		}
 	}
 }
-*/

+ 127 - 123
npc/quests/seals/megingard_seal.txt

@@ -1,11 +1,11 @@
 //===== rAthena Script ======================================= 
-//= Megingjard seal unlocking NPCs.
+//= God Item Quest - Megingjard Seal
 //===== By: ================================================== 
 //= SinSloth
 //===== Current Version: ===================================== 
-//= 2.1
+//= 2.2
 //===== Compatible With: ===================================== 
-//= rAthena
+//= rAthena SVN
 //===== Description: ========================================= 
 //= Quest for breaking the seal of Megingjard.
 //===== Additional Comments: =================================
@@ -21,9 +21,14 @@
 //= 1.9 Fixed some input checks and variable types. [brianluau]
 //= 2.0 Updated RE/Pre-RE EXP. [Euphy]
 //= 2.1 Fixed minor bug with the Librarian Jekan
+//= 2.2 Renewal script update. [Euphy]
 //============================================================
 
 prt_castle,44,151,0	script	Rebarev Doug	56,{
+	if (checkweight(1301,3) == 0) {
+		mes "- You are carrying too many items! -";
+		close;
+	}
 	cutin "god_rebeireb",2;
 	if ((countitem(7080) > 3) && (countitem(7081) > 4) && (countitem(7082) > 3) && (countitem(7084) > 2) && (countitem(7085) > 2)) {
 		mes "[Rebarev Doug]";
@@ -54,7 +59,7 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 			break;
 		}
 	}
-	if ($God1 < 50) {
+	if ($God1 < $@god_check1) {
 		mes "[Rebarev Doug]";
 		mes "We are Crusaders that have";
 		mes "been training in preparation";
@@ -140,9 +145,9 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 			break;
 		}
 	}
-	else if($God1 > 49 && $God2 < 100) {
-		if(BaseLevel > 59) {
-			if(god_eremes == 0) {
+	else if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (BaseLevel > 59) {
+			if (god_eremes == 0) {
 				mes "[Rebarev Doug]";
 				mes "...";
 				next;
@@ -264,8 +269,8 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 					break;
 				}
 			}
-			else if(god_eremes > 0 && god_eremes < 4) {
-				if(rand(1,10) > 6 && god_eremes == 2) {
+			else if (god_eremes > 0 && god_eremes < 4) {
+				if (rand(1,10) > 6 && god_eremes == 2) {
 					mes "[Rebarev Doug]";
 					mes "I wonder how my old";
 					mes "comrades are doing now.";
@@ -361,7 +366,7 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 					}
 				}
 			}
-			else if(god_eremes > 3 && god_eremes < 18) {
+			else if (god_eremes > 3 && god_eremes < 18) {
 				mes "[Rebarev Doug]";
 				mes "Huh...?";
 				mes "The librarian";
@@ -382,8 +387,8 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 				mes "Oh...";
 				mes "It might be helpful to know that we were the ^660000Crusader Third Company, Third Platoon, First Squad^000000.";
 			}
-			else if(god_eremes > 17 && god_eremes < 20) {
-				if(god_megin_1 > 0 || god_megin_2 > 0 || god_megin_3 > 0 || god_megin_4 > 0 || god_megin_5 > 0 || god_megin_6 > 0) {
+			else if (god_eremes > 17 && god_eremes < 20) {
+				if (god_megin_1 > 0 || god_megin_2 > 0 || god_megin_3 > 0 || god_megin_4 > 0 || god_megin_5 > 0 || god_megin_6 > 0) {
 					mes "[Rebarev Doug]";
 					mes "Oh...";
 					mes "So did you meet them?";
@@ -421,7 +426,7 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 					mes "are doing for me.";
 				}
 			}
-			else if(god_eremes > 19 && god_eremes < 23) {
+			else if (god_eremes > 19 && god_eremes < 23) {
 				mes "[Rebarev Doug]";
 				mes "Welcome back~";
 				mes "It's been a while since I've last seen you. Have you met the rest";
@@ -469,7 +474,7 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 					break;
 				}
 			}
-			else if(god_eremes > 22 && god_eremes < 25) {
+			else if (god_eremes > 22 && god_eremes < 25) {
 				mes "^3355FFYou confront";
 				mes "Rebarev Doug with the";
 				mes "information you learned";
@@ -499,7 +504,7 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 				mes "If at least 100 people report the same crime, then maybe he'll hold";
 				mes "a trial. But do you really want to reveal this to the public?";
 			}
-			else if(god_eremes > 23 && god_eremes < 26) {
+			else if (god_eremes > 23 && god_eremes < 26) {
 				mes "[Rebarev Doug]";
 				mes "I didn't think";
 				mes "you'd actually do it.";
@@ -534,8 +539,8 @@ prt_castle,44,151,0	script	Rebarev Doug	56,{
 }
 
 prt_castle,48,164,0	script	Crusader#God	734,{
-	if($God1 > 49 && $God2 < 100) {
-		if(god_eremes > 22 && god_eremes < 25) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes > 22 && god_eremes < 25) {
 			mes "[Max Von Shedough]";
 			mes "Welcome, friend!";
 			mes "Here in the Prontera Castle, we Crusaders are busily preparing for the Holy War that is to come.";
@@ -558,24 +563,24 @@ prt_castle,48,164,0	script	Crusader#God	734,{
 			mes "[Max Von Shedough]";
 			mes "However, as of now, the petition you've just given me is considered classified information. Please keep this a military secret.";
 			set $God2,$God2+1;
-			if($God2 == 50) {
+			if ($God2 == $@god_check1) {
 				announce "The 2nd seal of [Megingjard] has appeared.",bc_all;
 			}
-			else if($God1 > 99 && $God2 > 99 && $God3 > 99 && $God4 > 99) {
-				announce "Four seals have been released at the same time with the seal of [Megingjard].",bc_all;
-			}
-			else if($God2 > 99) {
-				announce "The 2nd seal of [Megingjard] has been released.",bc_all;
+			else if ($God2 == $@god_check2) {
+				if ($God1 == $@god_check2 && $God2 == $@god_check2 && $God3 == $@god_check2 && $God4 == $@god_check2)
+					announce "Four seals have been released at the same time with the seal of [Megingjard].",bc_all;
+				else
+					announce "The 2nd seal of [Megingjard] has been released.",bc_all;
 			}
-			if(god_eremes == 23) {
+			if (god_eremes == 23) {
 				set god_eremes,25;
 			}
-			else if(god_eremes == 24) {
+			else if (god_eremes == 24) {
 				set god_eremes,26;
 			}
 			close;
 		}
-		else if(god_eremes > 26) {
+		else if (god_eremes > 26) {
 			mes "[Max Von Shedough]";
 			mes "Unfortunately, I'm not sure if it's possible to hold a trial against Rebarev Doug.";
 			next;
@@ -613,13 +618,13 @@ prt_castle,48,164,0	script	Crusader#God	734,{
 }
 
 prt_in,172,109,0	script	A File#megin1	111,{
-	if(god_eremes == 12) {
+	if (god_eremes == 12) {
 		mes "^3355FFYou have found";
 		mes "^660000The 3rd Platoon Records^3355FF!^000000";
 		close;
 	}
-	else if(god_eremes > 6 && god_eremes < 12) {
-		if(rand(1,10) > 6 && god_eremes > 6) {
+	else if (god_eremes > 6 && god_eremes < 12) {
+		if (rand(1,10) > 6 && god_eremes > 6) {
 			mes "^3355FFYou see a shelf filled with many files. You begin searching through them, one by one.^000000";
 			set god_eremes,god_eremes+1;
 			close;
@@ -629,18 +634,13 @@ prt_in,172,109,0	script	A File#megin1	111,{
 			close2;
 		}
 	}
-	else if(god_eremes < 7) {
+	else if (god_eremes < 7) {
 		mes "[Librarian Jekan]";
-		if(Sex) {
-			mes "I'm sorry sir,";
-		}
-		else {
-			mes "I'm sorry ma'am,";
-		}
+		mes "I'm sorry "+((Sex)?"sir":"ma'am")+",";
 		mes "but special authorization is required to browse that section. Otherwise, it's off limits.";
 		close;
 	}
-	 else {
+	else {
 		mes "[Librarian Jekan]";
 		mes "W-wait...!";
 		mes "That section";
@@ -650,11 +650,11 @@ prt_in,172,109,0	script	A File#megin1	111,{
 }
 
 prt_in,170,109,0	script	A File#megin2	111,{
-	if(god_eremes == 12) {
+	if (god_eremes == 12) {
 		mes "You have found ^0000FFThe 3rd Platoon Records^000000!";
 		close;
 	}
-	else if(god_eremes > 6 && god_eremes < 12) {
+	else if (god_eremes > 6 && god_eremes < 12) {
 		if (rand(1,10) > 6 && god_eremes > 6) {
 			mes "^3355FFYou see a shelf filled with many files. You begin searching through them, one by one.^000000";
 			set god_eremes,god_eremes+1;
@@ -665,7 +665,7 @@ prt_in,170,109,0	script	A File#megin2	111,{
 			close;
 		}
 	}
-	else if(god_eremes < 7) {
+	else if (god_eremes < 7) {
 		mes "[Librarian Jekan]";
 		mes "W-wait...!";
 		mes "That section";
@@ -682,12 +682,12 @@ prt_in,170,109,0	script	A File#megin2	111,{
 }
 
 prt_in,168,109,0	script	A File#megin3	111,{
-	if(god_eremes == 12) {
+	if (god_eremes == 12) {
 		mes "You have found";
 		mes "^0000FFThe 3rd Platoon Records^000000!";
 		close;
 	}
-	else if(god_eremes > 6 && god_eremes < 12) {
+	else if (god_eremes > 6 && god_eremes < 12) {
 		if (rand(1,10) > 6 && god_eremes > 6) {
 			mes "^3355FFYou see a shelf filled with many files. You begin searching through them, one by one.^000000";
 			set god_eremes,god_eremes+1;
@@ -698,7 +698,7 @@ prt_in,168,109,0	script	A File#megin3	111,{
 			close;
 		}
 	}
-	else if(god_eremes < 7) {
+	else if (god_eremes < 7) {
 		mes "[Librarian Jekan]";
 		mes "W-wait...!";
 		mes "That section";
@@ -715,11 +715,11 @@ prt_in,168,109,0	script	A File#megin3	111,{
 }
 
 prt_in,169,109,0	script	A File#megin4	111,{
-	if(god_eremes == 12) {
+	if (god_eremes == 12) {
 		mes "You have found ^0000FFThe 3rd Platoon Records^000000!";
 		close;
 	}
-	else if(god_eremes > 6 && god_eremes < 12) {
+	else if (god_eremes > 6 && god_eremes < 12) {
 		if (rand(1,10) > 6 && god_eremes > 6) {
 			mes "^3355FFYou see a shelf filled with many files. You begin searching through them, one by one.^000000";
 			set god_eremes,god_eremes+1;
@@ -730,7 +730,7 @@ prt_in,169,109,0	script	A File#megin4	111,{
 			close;
 		}
 	}
-	else if(god_eremes < 7) {
+	else if (god_eremes < 7) {
 		mes "[Librarian Jekan]";
 		mes "W-wait...!";
 		mes "That section";
@@ -747,12 +747,12 @@ prt_in,169,109,0	script	A File#megin4	111,{
 }
 
 prt_in,166,109,0	script	A File#megin5	111,{
-	if(god_eremes == 12) {
+	if (god_eremes == 12) {
 		mes "You have found";
 		mes "^0000FFThe 3rd Platoon Records^000000!";
 		close;
 	}
-	else if(god_eremes > 6 && god_eremes < 12) {
+	else if (god_eremes > 6 && god_eremes < 12) {
 		if (rand(1,10) > 6 && god_eremes > 6) {
 			mes "^3355FFYou see a shelf filled with many files. You begin searching through them, one by one.^000000";
 			set god_eremes,god_eremes+1;
@@ -763,7 +763,7 @@ prt_in,166,109,0	script	A File#megin5	111,{
 			close;
 		}
 	}
-	else if(god_eremes < 7) {
+	else if (god_eremes < 7) {
 		mes "[Librarian Jekan]";
 		mes "W-wait...!";
 		mes "That section";
@@ -780,8 +780,8 @@ prt_in,166,109,0	script	A File#megin5	111,{
 }
 
 prt_in,172,106,0	script	Librarian#megin	833,{
-	if($God1 > 49 && $God2 < 100) {
-		if(god_eremes > 2 && god_eremes < 7) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes > 2 && god_eremes < 7) {
 			mes "[Librarian Jekan]";
 			mes "Ah, please do";
 			mes "not touch the files";
@@ -813,7 +813,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 					mes "under dim light";
 					mes "for so long, my eyes have";
 					mes "gone bad. They should get me ^0000FFa new light^000000, otherwise I'll go blind sooner or later...";
-					if(god_eremes == 5 && ( countitem(2203) > 0 || countitem(1041) > 0 ) ) {
+					if (god_eremes == 5 && (countitem(2203) > 0 || countitem(1041) > 0)) {
 						next;
 						mes "[Librarian Jekan]";
 						mes "Hey, that's some pretty useful stuff that you've got with you. Do you mind letting me borrow it for a while? It'll help me in finding those files...";
@@ -829,14 +829,14 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 							mes "Oh, you are so kind!";
 							mes "Y-you really do want";
 							mes "to help me, don't you?";
-							if(countitem(2203) && countitem(1041)) {
-								delitem 1041,countitem(1041);  //Lantern
-								delitem 2203,1;  //Spectacles
+							if (countitem(2203) && countitem(1041)) {
+								delitem 1041,countitem(1041); //Lantern
+								delitem 2203,1; //Spectacles
 							}
-							else if(countitem(2203)) {
+							else if (countitem(2203)) {
 								delitem 2203,1;
 							}
-							else if(countitem(1041)) {
+							else if (countitem(1041)) {
 								delitem 1041,countitem(1041);
 							}
 							set god_eremes,6;
@@ -854,7 +854,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 							close;
 						}
 					}
-					else if(god_eremes > 5) {
+					else if (god_eremes > 5) {
 						next;
 						mes "[Librarian Jekan]";
 						mes "Thank you...";
@@ -865,7 +865,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 					}
 					break;
 				case 2:
-					if(god_eremes == 6) {
+					if (god_eremes == 6) {
 						mes "[Librarian Jekan]";
 						mes "Read some documents?";
 						mes "Well, you've come here";
@@ -898,7 +898,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						close;
 					}
 				case 3:
-					if(god_eremes == 4) {
+					if (god_eremes == 4) {
 						mes "[Librarian Jekan]";
 						mes "I'd gladly accept your";
 						mes "help if it weren't for the fact that I cannot allow classified information to be released to the public.";
@@ -914,7 +914,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "Working as a government official is easy except for the times when the beaucrats make you do stuff like this.";
 						set god_eremes,5;
 					}
-					else if(god_eremes > 4) {
+					else if (god_eremes > 4) {
 						mes "[Librarian Jekan]";
 						mes "I think I'm going to go";
 						mes "insane looking for this file...!";
@@ -958,7 +958,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 				}
 			}
 		}
-		else if(god_eremes == 2) {
+		else if (god_eremes == 2) {
 			mes "[Librarian Jekan]";
 			mes "Ah, please do not touch the files in this section. Usually, it's public domain but it seems that a classified file managed to get misplaced there.";
 			next;
@@ -1003,8 +1003,8 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 				close;
 			}
 		}
-		else if(god_eremes > 6 && god_eremes < 12) {
-			if(rand(1,10) > 4) {
+		else if (god_eremes > 6 && god_eremes < 12) {
+			if (rand(1,10) > 4) {
 				mes "[Librarian Jekan]";
 				mes "Hmm? So did you find it? I've been searching for that file for a long time, but I haven't been able to find it.";
 				next;
@@ -1019,7 +1019,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 				mes "I'll go ahead and check the left side, so would you look for it in the middle or the right side?";
 			}
 		}
-		else if(god_eremes == 12) {
+		else if (god_eremes == 12) {
 			mes "[Librarian Jekan]";
 			mes "Ah! There it is!";
 			mes "Thank you so much!";
@@ -1060,8 +1060,8 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 			set god_eremes,13;
 			close;
 		}
-		else if(god_eremes == 13) {
-			if(countitem(7111) > 1 && countitem(7151) && countitem(1024) > 2 && countitem(916) > 2 && countitem(717) > 19) {
+		else if (god_eremes == 13) {
+			if (countitem(7111) > 1 && countitem(7151) && countitem(1024) > 2 && countitem(916) > 2 && countitem(717) > 19) {
 				mes "[Librarian Jekan]";
 				mes "Oh, you came back.";
 				mes "I didn't expect you to return here so quickly. Whatever's inside must be really important for you to know.";
@@ -1104,8 +1104,8 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 				close;
 			}
 		}
-		else if(god_eremes > 13 && god_eremes < 16) {
-			if(rand(1,10) > 4) {
+		else if (god_eremes > 13 && god_eremes < 16) {
+			if (rand(1,10) > 4) {
 				mes "[Librarian Jekan]";
 				mes "Let me go over and review the document before I make a copy...";
 			}
@@ -1116,7 +1116,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 			}
 			close;
 		}
-		else if(god_eremes == 16) {
+		else if (god_eremes == 16) {
 			mes "[Librarian Jekan]";
 			mes "There you go. As I thought, the document didn't seem to contain any crucially important data.";
 			next;
@@ -1125,7 +1125,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 			set god_eremes,17;
 			close;
 		}
-		else if(god_eremes > 16) {
+		else if (god_eremes > 16) {
 			mes "[Librarian Jekan]";
 			mes "Welcome, my friend!";
 			mes "So, what do you need today?";
@@ -1210,7 +1210,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 								}
 							}
 						}
-						else if(compare(.@input$,"3rd_platoon") == 1) {
+						else if (compare(.@input$,"3rd_platoon") == 1) {
 							mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 							mes "Each Company consists";
 							mes "of 4 Platoons. Please";
@@ -1218,13 +1218,13 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 							next;
 							close2;
 						}
-						else if(compare(.@input$,"1st_squad") == 1) {
+						else if (compare(.@input$,"1st_squad") == 1) {
 							mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 							mes "The 1st Squad : Crusaders.";
 							mes "Each platoon consists of 4 squads. Please specify Company and Platoon for information on a specific squad.^000000";
 							close2;
 						}
-						else if(compare(.@input$,"record") == 1) {
+						else if (compare(.@input$,"record") == 1) {
 							mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 							mes "- No result has been found.-";
 							close2;
@@ -1302,28 +1302,28 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 							}
 						}
 					}
-					else if(compare(.@input$,"3rd_platoon") == 1) {
+					else if (compare(.@input$,"3rd_platoon") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "The 3rd Platoon : ";
 						mes "- No result has been found.-";
 						mes "- Suggested to enter a more specific keyword.-";
 						close2;
 					}
-					else if(compare(.@input$,"1st_squad") == 1) {
+					else if (compare(.@input$,"1st_squad") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "The 3rd Company : ";
 						mes "- No result has been found.-";
 						mes "- Suggested to enter a more specific keyword.-";
 						close2;
 					}
-					else if((compare(.@input$,"record") == 1) && (god_eremes > 17)) {
+					else if ((compare(.@input$,"record") == 1) && (god_eremes > 17)) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "- No result has been found.-";
 						mes "- Suggested to enter a specific name of the force for a better research.-";
 						next;
 						close2;
 					}
-					else if(compare(.@input$,"rebarev_doug") == 1) {
+					else if (compare(.@input$,"rebarev_doug") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former leader of";
 						mes "3rd Company, 3rd Platoon,";
@@ -1335,12 +1335,12 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Prontera Castle, Prontera^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"egnigem") == 1) {
+					else if (compare(.@input$,"egnigem") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "^FF0000Prohibited Search Term!^000000";
 						close2;
 					}
-					else if(compare(.@input$,"zan.huadoku") == 1) {
+					else if (compare(.@input$,"zan.huadoku") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1352,7 +1352,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Blacksmith Guild, Geffen^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"cuaque_donon") == 1) {
+					else if (compare(.@input$,"cuaque_donon") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1364,7 +1364,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Inn, Morroc^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"jack_o") == 1) {
+					else if (compare(.@input$,"jack_o") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1375,7 +1375,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Alberta Port^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"emma_searth") == 1) {
+					else if (compare(.@input$,"emma_searth") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1387,7 +1387,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Al De Baran^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"royal_myst") == 1) {
+					else if (compare(.@input$,"royal_myst") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1398,7 +1398,7 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 						mes "^996633Casino, Comodo^663300.^000000";
 						close2;
 					}
-					else if(compare(.@input$,"the_nineball") == 1) {
+					else if (compare(.@input$,"the_nineball") == 1) {
 						mes "^663300[Keyword: ^996633"+.@input$+"^663300]";
 						mes "Former member of";
 						mes "3rd Company, 3rd Platoon";
@@ -1538,8 +1538,8 @@ prt_in,172,106,0	script	Librarian#megin	833,{
 }
 
 geffen_in,109,161,3	script	Crusader#God1	751,{
-	if($God1 > 49 && $God2 < 100) {
-		if(god_eremes > 17 && god_megin_1 < 2) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes > 17 && god_megin_1 < 2) {
 			mes "[Zan.Huadoku]";
 			mes "^333333*Phew...*^000000";
 			mes "This work is really getting to me. Going on a mission with my war buddies sounds a lot better than this.";
@@ -1554,7 +1554,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 			next;
 			switch(select("Ask him about the 1st Squad.:Ask him how he's been doing.:Ask him about the 1st Squad's last mission.")) {
 			case 1:
-				if(god_eremes == 18) {
+				if (god_eremes == 18) {
 					mes "[Zan.Huadoku]";
 					mes "Yeah, I was a member of the 1st Squad in the 3rd Platoon a long time ago. How did you know that?";
 					next;
@@ -1564,7 +1564,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 					mes "^3355FFYou tell Zan about Rebarev Doug, and about how he is now an instructor for Crusader Boot Camp. He seems to be absorbed in his thoughts of the past.^000000";
 					close;
 				}
-				else if(god_eremes > 18) {
+				else if (god_eremes > 18) {
 					mes "[Zan.Huadoku]";
 					mes "Yeah, I was a member of the 1st Squad in the 3rd Platoon a long time ago. How did you know that?";
 					next;
@@ -1598,7 +1598,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 					next;
 					mes "[Zan.Huadoku]";
 					mes "^3355FFZan looks very confused and his eyes begin to glaze with a dazed look. You try speaking to him again, but he doesn't respond at all.^000000";
-					if(!god_megin_1) {
+					if (!god_megin_1) {
 						set god_megin_1,1;
 					}
 					close;
@@ -1618,7 +1618,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 				mes "A lot of people have been asking me weird questions about me recently. I feel like I'm getting spied on, but maybe I'm just getting paranoid.";
 				close;
 			case 3:
-				if(god_eremes == 18) {
+				if (god_eremes == 18) {
 					mes "[Zan.Huadoku]";
 					mes "Yeah, on our";
 					mes "final mission...";
@@ -1633,7 +1633,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 					mes "^3355FFZan seems to be having a very difficult time recalling that specific memory of his past.^000000";
 					close;
 				}
-				else if(god_eremes > 18 && god_megin_1 > 0) {
+				else if (god_eremes > 18 && god_megin_1 > 0) {
 					mes "[Zan.Huadoku]";
 					mes "The last mission...";
 					next;
@@ -1669,7 +1669,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 					mes "I can't think about anything further than that. I can't even remember what we found. But I'm sure it was damned important.";
 					next;
 					mes "^3355FFZan stood still in silence, with a pained look on his face.^000000";
-					if(god_megin_1 == 1) {
+					if (god_megin_1 == 1) {
 						set god_megin_1,2;
 					}
 					close;
@@ -1688,7 +1688,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 				}
 			}
 		}
-		else if(god_megin_1 > 1 && god_megin_1 < 3) {
+		else if (god_megin_1 > 1 && god_megin_1 < 3) {
 			mes "...";
 			next;
 			mes "...";
@@ -1712,7 +1712,7 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 			set god_megin_1,3;
 			close;
 		}
-		else if(god_megin_1 > 2) {
+		else if (god_megin_1 > 2) {
 			mes "^3355FFGrabbing his head,";
 			mes "tearing his hair and writhing in Agony, Zan kept repeating the same words over and over again...^000000";
 			next;
@@ -1792,8 +1792,8 @@ geffen_in,109,161,3	script	Crusader#God1	751,{
 }
 
 morocc_in,146,179,0	script	Employee#megin1	66,{
-	if($God1 > 49 && $God2 < 100) {
-		if(god_eremes > 17 && god_megin_2 < 1) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes > 17 && god_megin_2 < 1) {
 			mes "^3355FFThe Inn Employee";
 			mes "eyes you suspiciously.^000000";
 			next;
@@ -1816,7 +1816,7 @@ morocc_in,146,179,0	script	Employee#megin1	66,{
 					mes "here, maybe?";
 					close;
 				}
-				else if(god_eremes > 18) {
+				else if (god_eremes > 18) {
 					next;
 					mes "^3355FFOnce you said that name, she immediately drew closer to you";
 					mes "and began speaking in a low, threatening tone.^000000";
@@ -1830,7 +1830,7 @@ morocc_in,146,179,0	script	Employee#megin1	66,{
 					next;
 					switch(select("Rebarev Doug sent me!:Wait, is he in hiding?:Just... curious.")) {
 					case 1:
-						if(rand(1,10) > 3) {
+						if (rand(1,10) > 3) {
 							mes "[Ms. Scary Inn Employee]";
 							mes "Rebarev Doug...?!";
 							mes "That old coot must be afraid";
@@ -1867,7 +1867,7 @@ morocc_in,146,179,0	script	Employee#megin1	66,{
 							close;
 						}
 					case 2:
-						if(rand(1,10) > 4) {
+						if (rand(1,10) > 4) {
 							mes "[Ms. Scary Inn Employee]";
 							mes "Right.";
 							mes "If you're here";
@@ -1958,7 +1958,7 @@ morocc_in,146,179,0	script	Employee#megin1	66,{
 				close2;
 			}
 		}
-		else if(god_megin_2 > 0) {
+		else if (god_megin_2 > 0) {
 			mes "[Inn Employee]";
 			mes "Welcome to the Inn.";
 			mes "When you move to the entrance, you can also enter a PvP zone though a PvP doorman.";
@@ -1997,8 +1997,8 @@ morocc_in,146,179,0	script	Employee#megin1	66,{
 }
 
 in_rogue,243,61,0	script	Suspicious Man#megin	748,{
-	if($God1 > 49 && $God2 < 100) {
-		if(god_eremes == 18) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes == 18) {
 			mes "[Cuaque Donon]";
 			mes "Wh-who are you?!";
 			mes "How the hell did";
@@ -2007,8 +2007,8 @@ in_rogue,243,61,0	script	Suspicious Man#megin	748,{
 			mes "Geeeet awwwway!";
 			close;
 		}
-		else if(god_eremes > 18) {
-			if(god_megin_2 > 0 && god_megin_2 < 4) {
+		else if (god_eremes > 18) {
+			if (god_megin_2 > 0 && god_megin_2 < 4) {
 				mes "[Cuaque Donon]";
 				mes "Wh-who are you?!";
 				mes "How the hell did";
@@ -2022,31 +2022,31 @@ in_rogue,243,61,0	script	Suspicious Man#megin	748,{
 					if (countitem(740) > 0) {
 						set .@toy$,"Puppet";
 					}
-					else if(countitem(741) > 0) {
+					else if (countitem(741) > 0) {
 						set .@toy$,"Poring Doll";
 					}
-					else if(countitem(742) > 0) {
+					else if (countitem(742) > 0) {
 						set .@toy$,"Chonchon Doll";
 					}
-					else if(countitem(743) > 0) {
+					else if (countitem(743) > 0) {
 						set .@toy$,"Spore Doll";
 					}
 					else if (countitem(744) > 0) {
 						set .@toy$,"Baphomet Doll";
 					}
-					else if(countitem(751) > 0) {
+					else if (countitem(751) > 0) {
 						set .@toy$,"Osiris Doll";
 					}
-					else if(countitem(752) > 0) {
+					else if (countitem(752) > 0) {
 						set .@toy$,"Rocker Doll";
 					}
-					else if(countitem(753) > 0) {
+					else if (countitem(753) > 0) {
 						set .@toy$,"Yoyo Doll";
 					}
-					else if(countitem(754) > 0) {
+					else if (countitem(754) > 0) {
 						set .@toy$,"Racoon Doll";
 					}
-					else if(countitem(7206) > 0) {
+					else if (countitem(7206) > 0) {
 						set .@toy$,"Black Cat Doll";
 					}
 					else {
@@ -2266,8 +2266,8 @@ in_rogue,243,61,0	script	Suspicious Man#megin	748,{
 }
 
 alberta,196,146,0	script	Crusader#megin2	751,{
-	if ($God1 > 49 && $God2 < 100) {
-		if(god_eremes == 18) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes == 18) {
 			mes "[Jack O]";
 			mes "^333333*Yawn...*^000000";
 			mes "It's quiet and boring, as per usual. Let's see if there's any Swordmen I can recruit today.";
@@ -2457,14 +2457,18 @@ alberta,196,146,0	script	Crusader#megin2	751,{
 }
 
 aldebaran,66,213,0	script	Lady#megin	69,{
-	if ($God1 > 49 && $God2 < 100) {
-		if(god_eremes == 18) {
+	if (checkweight(1301,3) == 0) {
+		mes "- You are carrying too many items!";
+		close;
+	}
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
+		if (god_eremes == 18) {
 			mes "[Emma Searth]";
 			mes "^333333*Sigh...*^000000 I haven't gotten any response from them. I don't know";
 			mes "if I can wait much longer to join the Kafra Corporation.";
 			close;
 		}
-		else if(god_eremes > 18 && god_eremes < 26) {
+		else if (god_eremes > 18 && god_eremes < 26) {
 			if (god_megin_4 < 2) {
 				mes "[Emma Searth]";
 				mes "^333333*Sigh...*^000000 I haven't gotten any response from them. I don't know";
@@ -2614,7 +2618,7 @@ aldebaran,66,213,0	script	Lady#megin	69,{
 					}
 				}
 			}
-			else if(god_megin_4 > 1) {
+			else if (god_megin_4 > 1) {
 				mes "[Emma Searth]";
 				mes "^0000FFJack O, The Nineball, Zan.Huadoku, Cuaque Donon, Egnigem.^000000 Oh, I really miss those guys...";
 				close;
@@ -2702,7 +2706,7 @@ aldebaran,66,213,0	script	Lady#megin	69,{
 }
 
 cmd_in02,190,94,3	script	Man#megin	828,{
-	if ($God1 > 49 && $God2 < 100) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
 		if (god_eremes == 18) {
 			mes "[Royal Myst]";
 			mes "Wha...?";
@@ -2755,7 +2759,7 @@ cmd_in02,190,94,3	script	Man#megin	828,{
 				mes "which one do I bet on...?";
 				next;
 			}
-			else if(god_megin_6 > 0) {
+			else if (god_megin_6 > 0) {
 				mes "[Royal Myst]";
 				mes "Hmm?";
 				mes "What's up?";
@@ -2906,7 +2910,7 @@ cmd_in02,190,94,3	script	Man#megin	828,{
 }
 
 jawaii_in,44,110,0	script	Security Officer#megin	734,{
-	if ($God1 > 49 && $God2 < 100) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
 		if (god_eremes == 18) {
 			mes "[The Nineball]";
 			mes "Welcome to Jawaii,";
@@ -2964,7 +2968,7 @@ jawaii_in,44,110,0	script	Security Officer#megin	734,{
 }
 
 niflheim,109,254,0	script	Egnigem	796,{
-	if ($God1 > 49 && $God2 < 100) {
+	if ($God1 >= $@god_check1 && $God2 < $@god_check2) {
 		if (god_eremes > 19 && god_eremes < 25) {
 			if (god_eremes > 22) {
 				mes "[Egnigem]";

Разлика између датотеке није приказан због своје велике величине
+ 136 - 138
npc/quests/seals/mjolnir_seal.txt


+ 234 - 299
npc/quests/seals/sleipnir_seal.txt

@@ -1,11 +1,11 @@
 //===== rAthena Script ======================================= 
-//= Sleipnir seal unlocking NPCs.
+//= God Item Quest - Sleipnir Seal
 //===== By: ================================================== 
 //= MasterOfMuppets
 //===== Current Version: ===================================== 
-//= 1.3
+//= 1.4
 //===== Compatible With: ===================================== 
-//= rAthena
+//= rAthena SVN
 //===== Description: ========================================= 
 //= Quest for breaking the seal of Sleipnir.
 //===== Additional Comments: =================================
@@ -13,6 +13,7 @@
 //= 1.1 Updated several aspects of the script. [L0ne_W0lf]
 //= 1.2 Minor Touchups to quest. [L0ne_W0lf]
 //= 1.3 Fixed a typo with a variable. [L0ne_W0lf]
+//= 1.4 Renewal script update. [Euphy]
 //============================================================
 
 yuno,164,200,4	script	Noyee#G	101,{
@@ -31,7 +32,7 @@ yuno,164,200,4	script	Noyee#G	101,{
 		close;
 	}
 	else {
-		if ($God1 > 99) {
+		if ($God1 >= $@god_check2) {
 			mes "[Noyee]";
 			mes "Did you know that there's a difference between the armor you can buy from NPC shops and the kinds you obtain from hunting monsters?";
 			next;
@@ -73,10 +74,10 @@ que_god01,98,98,4	script	Manager#G	69,{
 		mes "Wait...!";
 		mes "I can't even remember the last";
 		mes "time I went out with a guy! At this rate, I might retire before I can find a boyfriend. Noooo, I'm still in my prime~!";
-		Emotion ET_PROFUSELY_SWAT;
+		emotion e_swt2;
 		close;
 	}
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if (god_sl_1 == 0) {
 			mes "[Cukure]";
 			mes "I can't believe how busy I am at work nowadays. I don't even have time to see any of my friends or go shopping.";
@@ -196,305 +197,239 @@ que_god01,98,98,4	script	Manager#G	69,{
 			mes "[Cukure]";
 			mes "Ah, there it is.";
 			mes "It might not be much, but I hope you accept it as a token of my gratitude. Good luck on your travels!";
-			if ($God1 < 100)set $God1,$God1+1;
-			if ($God1 == 50) {
+			if ($God1 < $@god_check2)
+				set $God1,$God1+1;
+			if ($God1 == $@god_check1)
 				announce "The 1st seal of [Sleipnir] has appeared.",bc_all;
-			}
-			else if ($God1 == 100) {
-				if ($God1 == 100 && $God2 == 100 && $God3 == 100 && $God4 == 100) {
+			else if ($God1 == $@god_check2) {
+				if ($God1 == $@god_check2 && $God2 == $@god_check2 && $God3 == $@god_check2 && $God4 == $@god_check2)
 					announce "our seals have been released at the same time with the seal of [Sleipnir].",bc_all;
-				}
-				else {
+				else
 					announce "The 1st seal of [Sleipnir] has been released.",bc_all;
-				}
 			}
 			set god_sl_1,51;
 			set .@god_treasure,rand(1,900);
 			set .@god_treasure1,rand(1,1000);
-			if (.@god_treasure < 101) {
-				if (.@god_treasure1 < 210) {
-					getitem 2102,1; // Guard_
-				}
-				else if (.@god_treasure1 < 420) {
-					getitem 2104,1; // Buckler_
-				}
-				else if (.@god_treasure1 < 630) {
-					getitem 2106,1; // Shield_
-				}
-				else if (.@god_treasure1 < 840) {
-					getitem 2108,1; // Mirror_Shield_
+			if (checkre(0)) {
+				if (.@god_treasure < 101) {
+					     if (.@god_treasure1 < 210) getitem 2102,1; //Guard_
+					else if (.@god_treasure1 < 420) getitem 2104,1; //Buckler_
+					else if (.@god_treasure1 < 630) getitem 2106,1; //Shield_
+					else if (.@god_treasure1 < 840) getitem 2108,1; //Mirror_Shield_
+					else getitem 2109,1; //Memorize_Book
+				}
+				else if (.@god_treasure < 201) {
+					     if (.@god_treasure1 < 48) getitem 2207,1; //Fancy_Flower
+					else if (.@god_treasure1 < 96) getitem 2210,1; //Hair_Band
+					else if (.@god_treasure1 < 150) getitem 2213,1; //Cat_Hairband
+					else if (.@god_treasure1 < 190) getitem 2215,1; //Flower_Hairband
+					else if (.@god_treasure1 < 238) getitem 2217,1; //Biretta_
+					else if (.@god_treasure1 < 290) getitem 2223,1; //Turban_
+					else if (.@god_treasure1 < 340) getitem 2227,1; //Cap_
+					else if (.@god_treasure1 < 348) getitem 2229,1; //Helm_
+					else if (.@god_treasure1 < 400) getitem 2231,1; //Gemmed_Sallet_
+					else if (.@god_treasure1 < 448) getitem 2233,1; //Circlet_
+					else if (.@god_treasure1 < 496) getitem 2236,1; //Santa's_Hat
+					else if (.@god_treasure1 < 544) getitem 2244,1; //Big_Sis'_Ribbon
+					else if (.@god_treasure1 < 592) getitem 2245,1; //Sweet_Gents
+					else if (.@god_treasure1 < 640) getitem 2247,1; //Oldman's_Romance
+					else if (.@god_treasure1 < 688) getitem 2248,1; //Western_Grace
+					else if (.@god_treasure1 < 736) getitem 2250,1; //Fillet
+					else if (.@god_treasure1 < 784) getitem 2251,1; //Holy_Bonnet
+					else if (.@god_treasure1 < 832) getitem 2252,1; //Star_Sparkling
+					else if (.@god_treasure1 < 880) getitem 2253,1; //Sunflower
+					else if (.@god_treasure1 < 940) getitem 2257,1; //Snowy_Horn
+					else getitem 2259,1; //Mini_Propeller
+				}
+				else if (.@god_treasure < 301) {
+					     if (.@god_treasure1 < 160) getitem 2267,1; //Cigar
+					else if (.@god_treasure1 < 320) getitem 2262,1; //Pierrot_Nose
+					else if (.@god_treasure1 < 480) getitem 2263,1; //Gangster_Patch
+					else if (.@god_treasure1 < 540) getitem 2265,1; //Ganster_Mask
+					else if (.@god_treasure1 < 700) getitem 2266,1; //Iron_Cane
+					else if (.@god_treasure1 < 800) getitem 2260,1; //Mini_Glasses
+					else if (.@god_treasure1 < 900) getitem 2269,1; //Centimental_Flower
+					else getitem 2270,1; //Centimental_Leaf
+				}
+				else if (.@god_treasure < 401) {
+					     if (.@god_treasure1 < 70) getitem 2298,1; //Green_Feeler
+					else if (.@god_treasure1 < 140) getitem 2275,1; //Red_Bandana
+					else if (.@god_treasure1 < 210) getitem 2276,1; //Eagle_Eyes
+					else if (.@god_treasure1 < 280) getitem 2277,1; //Nurse_Cap
+					else if (.@god_treasure1 < 350) getitem 2279,1; //Bomb_Wick
+					else if (.@god_treasure1 < 420) getitem 2282,1; //Spirit_Chain
+					else if (.@god_treasure1 < 490) getitem 2299,1; //Viking_Helm
+					else if (.@god_treasure1 < 560) getitem 2287,1; //Pirate_Bandana
+					else if (.@god_treasure1 < 630) getitem 2289,1; //Poo_Poo_Hat
+					else if (.@god_treasure1 < 700) getitem 2290,1; //Funeral_Costume
+					else if (.@god_treasure1 < 770) getitem 2291,1; //Masquerade
+					else if (.@god_treasure1 < 840) getitem 2294,1; //Star_Dust
+					else if (.@god_treasure1 < 900) getitem 2295,1; //Blinker
+					else if (.@god_treasure1 < 950) getitem 2271,1; //Jack_A_Dandy
+					else getitem 2285,1; //Apple_Of_Archer
+				}
+				else if (.@god_treasure < 501) {
+					     if (.@god_treasure1 < 80) getitem 2306,1; //Adventurere's_Suit_
+					else if (.@god_treasure1 < 160) getitem 2308,1; //Mantle_
+					else if (.@god_treasure1 < 240) getitem 2310,1; //Coat_
+					else if (.@god_treasure1 < 320) getitem 2311,1; //Mink_Coat
+					else if (.@god_treasure1 < 400) getitem 2313,1; //Padded_Armor_
+					else if (.@god_treasure1 < 480) getitem 2315,1; //Chain_Mail_
+					else if (.@god_treasure1 < 560) getitem 2329,1; //Wooden_Mail_
+					else if (.@god_treasure1 < 630) getitem 2320,1; //Formal_Suit
+					else if (.@god_treasure1 < 700) getitem 2322,1; //Silk_Robe_
+					else if (.@god_treasure1 < 760) getitem 2324,1; //Scapulare_
+					else if (.@god_treasure1 < 810) getitem 2326,1; //Saint_Robe_
+					else if (.@god_treasure1 < 850) getitem 2342,1; //Full_Plate_Armor_
+					else if (.@god_treasure1 < 900) getitem 2331,1; //Tights_
+					else if (.@god_treasure1 < 950) getitem 2333,1; //Silver_Robe_
+					else getitem 2336,1; //Thief_Clothes_
+				}
+				else if (.@god_treasure < 601) {
+					     if (.@god_treasure1 < 200) getitem 2402,1; //Sandals_
+					else if (.@god_treasure1 < 400) getitem 2404,1; //Shoes_
+					else if (.@god_treasure1 < 600) getitem 2406,1; //Boots_
+					else if (.@god_treasure1 < 800) getitem 2407,1; //Chrystal_Pumps
+					else getitem 2409,1; //Spiky_Heel
+				}
+				else if (.@god_treasure < 701) {
+					     if (.@god_treasure1 < 300) getitem 2502,1; //Hood_
+					else if (.@god_treasure1 < 550) getitem 2504,1; //Muffler_
+					else if (.@god_treasure1 < 750) getitem 2506,1; //Manteau_
+					else getitem 2508,1; //Ragamuffin_Cape
+				}
+				else if (.@god_treasure < 801) {
+					     if (.@god_treasure1 < 110) getitem 2601,1; //Ring
+					else if (.@god_treasure1 < 220) getitem 2602,1; //Earring
+					else if (.@god_treasure1 < 330) getitem 2603,1; //Necklace
+					else if (.@god_treasure1 < 440) getitem 2604,1; //Glove
+					else if (.@god_treasure1 < 550) getitem 2605,1; //Brooch
+					else if (.@god_treasure1 < 660) getitem 2607,1; //Clip
+					else if (.@god_treasure1 < 770) getitem 2608,1; //Rosary
+					else if (.@god_treasure1 < 880) getitem 2617,1; //Mitten_Of_Presbyter
+					else getitem 2618,1; //Matyr's_Flea_Guard
 				}
 				else {
-					getitem 2109,1; // Memorize_Book
-				}
-			}
-			else if (.@god_treasure < 201) {
-				if (.@god_treasure1 < 48) {
-					getitem 2254,1; // Angelic_Chain
-				}
-				else if (.@god_treasure1 < 96) {
-					getitem 2210,1; // Hair_Band
-				}
-				else if (.@god_treasure1 < 150) {
-					getitem 2213,1; // Cat_Hairband
-				}
-				else if (.@god_treasure1 < 190) {
-					getitem 2255,1; // Satanic_Chain
-				}
-				else if (.@god_treasure1 < 238) {
-					getitem 2217,1; // Biretta_
-				}
-				else if (.@god_treasure1 < 290) {
-					getitem 2223,1; // Turban_
-				}
-				else if (.@god_treasure1 < 340) {
-					getitem 2227,1; // Cap_
-				}
-				else if (.@god_treasure1 < 348) {
-					getitem 2229,1; // Helm_
-				}
-				else if (.@god_treasure1 < 400) {
-					getitem 2231,1; // Gemmed_Sallet_
-				}
-				else if (.@god_treasure1 < 448) {
-					getitem 2233,1; // Circlet_
-				}
-				else if (.@god_treasure1 < 496) {
-					getitem 5053,1; // Spinx_Helm
-				}
-				else if (.@god_treasure1 < 544) {
-					getitem 5019,1; // Corsair
-				}
-				else if (.@god_treasure1 < 592) {
-					getitem 2245,1; // Sweet_Gents
-				}
-				else if (.@god_treasure1 < 640) {
-					getitem 2247,1; // Oldman's_Romance
-				}
-				else if (.@god_treasure1 < 688) {
-					getitem 2248,1; // Western_Grace
-				}
-				else if (.@god_treasure1 < 736) {
-					getitem 5166,1; // Spinx_Helm_
-				}
-				else if (.@god_treasure1 < 784) {
-					getitem 5158,1; // Holy_Bonnet_
-				}
-				else if (.@god_treasure1 < 832) {
-					getitem 2249,1; // Coronet
-				}
-				else if (.@god_treasure1 < 880) {
-					getitem 5157,1; // Viking_Helm_
-				}
-				else if (.@god_treasure1 < 940) {
-					getitem 2285,1; // Apple_Of_Archer
-				}
-				else {
-					getitem 5093,1; // Blue_Coif_
-				}
-			}
-			else if (.@god_treasure < 301) {
-				if (.@god_treasure1 < 160) {
-					getitem 5014,1; // Fin_Helm
-				}
-				else if (.@god_treasure1 < 320) {
-					getitem 5005,1; // Gas_Mask
-				}
-				else if (.@god_treasure1 < 480) {
-					getitem 5054,1; // Assasin_Mask
-				}
-				else if (.@god_treasure1 < 540) {
-					getitem 2265,1; // Ganster_Mask
-				}
-				else if (.@god_treasure1 < 700) {
-					getitem 2266,1; // Iron_Cane
-				}
-				else if (.@god_treasure1 < 800) {
-					getitem 2260,1; // Mini_Glasses
-				}
-				else if (.@god_treasure1 < 900) {
-					getitem 5113,1; // Angry_Mouth
-				}
-				else {
-					// Pirate Dagger is iRO only, and requires extra files in client.
-					getitem 2270,1; // Centimental_Leaf
-					//getitem 5305,1 // Pirate_Dagger
-				}
-			}
-			else if (.@god_treasure < 401) {
-				if (.@god_treasure1 < 70) {
-					getitem 2286,1; // Elven_Ears
-				}
-				else if (.@god_treasure1 < 140) {
-					getitem 5002,1; // Gemmed_Crown
-				}
-				else if (.@god_treasure1 < 210) {
-					getitem 5147,1; // Baseball_Cap
-				}
-				else if (.@god_treasure1 < 280) {
-					getitem 2217,1; // Biretta_
-				}
-				else if (.@god_treasure1 < 350) {
-					getitem 5120,1; // Fedora_
-				}
-				else if (.@god_treasure1 < 420) {
-					getitem 2261,1; // Prontera_Army_Cap
-				}
-				else if (.@god_treasure1 < 490) {
-					getitem 5162,1; // Bone_Helm_
-				}
-				else if (.@god_treasure1 < 560) {
-					getitem 5030,1; // Panda_Cap
-				}
-				else if (.@god_treasure1 < 630) {
-					getitem 5109,1; // Red_Bonnet
-				}
-				else if (.@god_treasure1 < 700) {
-					getitem 5084,1; // Lazy_Raccoon
-				}
-				else if (.@god_treasure1 < 770) {
-					getitem 5168,1; // Bongun_Hat_
-				}
-				else if (.@god_treasure1 < 840) {
-					getitem 2214,1; // Bunny_Band
-				}
-				else if (.@god_treasure1 < 900) {
-					getitem 2295,1; // Blinker
-				}
-				else if (.@god_treasure1 < 950) {
-					getitem 5167,1; // Munak_Turban_
-				}
-				else {
-					getitem 5018,1; // Feather_Bonnet
-				}
-			} else if (.@god_treasure < 501) {
-				if (.@god_treasure1 < 85) {
-					getitem 2310,1; // Coat_
-				}
-				else if (.@god_treasure1 < 170) {
-					getitem 2311,1; // Mink_Coat
-				}
-				else if (.@god_treasure1 < 255) {
-					getitem 2313,1; // Padded_Armor_
-				}
-				else if (.@god_treasure1 < 340) {
-					getitem 2317,1; // Plate_Armor_
-				}
-				else if (.@god_treasure1 < 425) {
-					getitem 2319,1; // Glittering_Clothes
-				}
-				else if (.@god_treasure1 < 510) {
-					getitem 2320,1; // Formal_Suit
-				}
-				else if (.@god_treasure1 < 595) {
-					getitem 2322,1; // Silk_Robe_
-				}
-				else if (.@god_treasure1 < 680) {
-					getitem 2359,1; // Ninja_Suit_
-				}
-				else if (.@god_treasure1 < 765) {
-					getitem 2326,1; // Saint_Robe_
-				}
-				else if (.@god_treasure1 < 850) {
-					getitem 2342,1; // Full_Plate_Armor_
-				}
-				else if (.@god_treasure1 < 935) {
-					getitem 2331,1; // Tights_
-				}
-				else {
-					getitem 2336,1; // Thief_Clothes_
-				}
-			}
-			else if (.@god_treasure < 601) {
-				if (.@god_treasure1 < 200) {
-					getitem 2422,1; // High_Fashion_Sandals
-				}
-				else if (.@god_treasure1 < 400) {
-					getitem 2404,1; // Shoes_
-				}
-				else if (.@god_treasure1 < 600) {
-					getitem 2406,1; // Boots_
-				}
-				else if (.@god_treasure1 < 800) {
-					getitem 2407,1; // Chrystal_Pumps
-				}
-				else {
-					getitem 2412,1; // Grave_
-				}
-			}
-			else if (.@god_treasure < 701) {
-				if (.@god_treasure1 < 200) {
-					getitem 2513,1; // Celestial_Robe
-				}
-				else if (.@god_treasure1 < 400) {
-					getitem 2504,1; // Muffler_
-				}
-				else if (.@god_treasure1 < 600) {
-					getitem 2506,1; // Manteau_
-				}
-				else if (.@god_treasure1 < 800) {
-					getitem 2514,1; // Pauldron
-				}
-				else {
-					getitem 2508,1; // Ragamuffin_Cape
-				}
-			}
-			else if (.@god_treasure < 801) {
-				if (.@god_treasure1 < 110) {
-					getitem 1122,1; // Ring_
-				}
-				else if (.@god_treasure1 < 220) {
-					getitem 2622,1; // Earring_
-				}
-				else if (.@god_treasure1 < 330) {
-					getitem 2623,1; // Necklace_
-				}
-				else if (.@god_treasure1 < 440) {
-					getitem 2624,1; // Glove_
-				}
-				else if (.@god_treasure1 < 550) {
-					getitem 2625,1; // Brooch_
-				}
-				else if (.@god_treasure1 < 660) {
-					getitem 2607,1; // Clip
-				}
-				else if (.@god_treasure1 < 770) {
-					getitem 2626,1; // Rosary_
-				}
-				else if (.@god_treasure1 < 880) {
-					getitem 2617,1; // Mitten_Of_Presbyter
-				}
-				else {
-					getitem 2671,1; // Thimble_Of_Archer_
-				}
-			}
-			else {
-				if (.@god_treasure1 < 150) {
-					getitem 2281,1; // Phantom_Of_Opera
-				}
-				else if (.@god_treasure1 < 260) {
-					getitem 2297,1; // Goblini_Mask
-				}
-				else if (.@god_treasure1 < 370) {
-					getitem 5087,1; // Goblin_Mask_01
-				}
-				else if (.@god_treasure1 < 480) {
-					getitem 5088,1; // Goblin_Mask_02
-				}
-				else if (.@god_treasure1 < 590) {
-					getitem 5089,1; // Goblin_Mask_03
-				}
-				else if (.@god_treasure1 < 700) {
-					getitem 5090,1; // Goblin_Mask_04
-				}
-				else if (.@god_treasure1 < 810) {
-					getitem 5086,1; // Alarm_Mask
+					     if (.@god_treasure1 < 150) getitem 2288,1; //Mr_Scream
+					else if (.@god_treasure1 < 260) getitem 2297,1; //Goblini_Mask
+					else if (.@god_treasure1 < 370) getitem 5087,1; //Goblin_Mask_01
+					else if (.@god_treasure1 < 480) getitem 5088,1; //Goblin_Mask_02
+					else if (.@god_treasure1 < 590) getitem 5089,1; //Goblin_Mask_03
+					else if (.@god_treasure1 < 700) getitem 5090,1; //Goblin_Mask_04
+					else if (.@god_treasure1 < 810) getitem 5046,1; //Bongun_Hat
+					else if (.@god_treasure1 < 920) getitem 2264,1; //Munak_Turban
+					else getitem 2225,1; //Goggle_
+				}
+			} else {
+				if (.@god_treasure < 101) {
+					     if (.@god_treasure1 < 210) getitem 2102,1; //Guard_
+					else if (.@god_treasure1 < 420) getitem 2104,1; //Buckler_
+					else if (.@god_treasure1 < 630) getitem 2106,1; //Shield_
+					else if (.@god_treasure1 < 840) getitem 2108,1; //Mirror_Shield_
+					else getitem 2109,1; //Memorize_Book
+				}
+				else if (.@god_treasure < 201) {
+					     if (.@god_treasure1 < 48) getitem 2254,1; //Angelic_Chain
+					else if (.@god_treasure1 < 96) getitem 2210,1; //Hair_Band
+					else if (.@god_treasure1 < 150) getitem 2213,1; //Cat_Hairband
+					else if (.@god_treasure1 < 190) getitem 2255,1; //Satanic_Chain
+					else if (.@god_treasure1 < 238) getitem 2217,1; //Biretta_
+					else if (.@god_treasure1 < 290) getitem 2223,1; //Turban_
+					else if (.@god_treasure1 < 340) getitem 2227,1; //Cap_
+					else if (.@god_treasure1 < 348) getitem 2229,1; //Helm_
+					else if (.@god_treasure1 < 400) getitem 2231,1; //Gemmed_Sallet_
+					else if (.@god_treasure1 < 448) getitem 2233,1; //Circlet_
+					else if (.@god_treasure1 < 496) getitem 5053,1; //Spinx_Helm
+					else if (.@god_treasure1 < 544) getitem 5019,1; //Corsair
+					else if (.@god_treasure1 < 592) getitem 2245,1; //Sweet_Gents
+					else if (.@god_treasure1 < 640) getitem 2247,1; //Oldman's_Romance
+					else if (.@god_treasure1 < 688) getitem 2248,1; //Western_Grace
+					else if (.@god_treasure1 < 736) getitem 5166,1; //Spinx_Helm_
+					else if (.@god_treasure1 < 784) getitem 5158,1; //Holy_Bonnet_
+					else if (.@god_treasure1 < 832) getitem 2249,1; //Coronet
+					else if (.@god_treasure1 < 880) getitem 5157,1; //Viking_Helm_
+					else if (.@god_treasure1 < 940) getitem 2285,1; //Apple_Of_Archer
+					else getitem 5093,1; //Blue_Coif_
+				}
+				else if (.@god_treasure < 301) {
+					     if (.@god_treasure1 < 160) getitem 5014,1; //Fin_Helm
+					else if (.@god_treasure1 < 320) getitem 5005,1; //Gas_Mask
+					else if (.@god_treasure1 < 480) getitem 5054,1; //Assasin_Mask
+					else if (.@god_treasure1 < 540) getitem 2265,1; //Ganster_Mask
+					else if (.@god_treasure1 < 700) getitem 2266,1; //Iron_Cane
+					else if (.@god_treasure1 < 800) getitem 2260,1; //Mini_Glasses
+					else if (.@god_treasure1 < 900) getitem 5113,1; //Angry_Mouth
+					else {
+						// Pirate Dagger is iRO only, and requires extra files in client.
+						//getitem 5305,1 //Pirate_Dagger
+						getitem 2270,1; //Centimental_Leaf
+					}
 				}
-				else if (.@god_treasure1 < 920) {
-					getitem 2292,1; // Welding_Mask
+				else if (.@god_treasure < 401) {
+					     if (.@god_treasure1 < 70) getitem 2286,1; //Elven_Ears
+					else if (.@god_treasure1 < 140) getitem 5002,1; //Gemmed_Crown
+					else if (.@god_treasure1 < 210) getitem 5147,1; //Baseball_Cap
+					else if (.@god_treasure1 < 280) getitem 2217,1; //Biretta_
+					else if (.@god_treasure1 < 350) getitem 5120,1; //Fedora_
+					else if (.@god_treasure1 < 420) getitem 2261,1; //Prontera_Army_Cap
+					else if (.@god_treasure1 < 490) getitem 5162,1; //Bone_Helm_
+					else if (.@god_treasure1 < 560) getitem 5030,1; //Panda_Cap
+					else if (.@god_treasure1 < 630) getitem 5109,1; //Red_Bonnet
+					else if (.@god_treasure1 < 700) getitem 5084,1; //Lazy_Raccoon
+					else if (.@god_treasure1 < 770) getitem 5168,1; //Bongun_Hat_
+					else if (.@god_treasure1 < 840) getitem 2214,1; //Bunny_Band
+					else if (.@god_treasure1 < 900) getitem 2295,1; //Blinker
+					else if (.@god_treasure1 < 950) getitem 5167,1; //Munak_Turban_
+					else getitem 5018,1; //Feather_Bonnet
+				} else if (.@god_treasure < 501) {
+					     if (.@god_treasure1 < 85) getitem 2310,1; //Coat_
+					else if (.@god_treasure1 < 170) getitem 2311,1; //Mink_Coat
+					else if (.@god_treasure1 < 255) getitem 2313,1; //Padded_Armor_
+					else if (.@god_treasure1 < 340) getitem 2317,1; //Plate_Armor_
+					else if (.@god_treasure1 < 425) getitem 2319,1; //Glittering_Clothes
+					else if (.@god_treasure1 < 510) getitem 2320,1; //Formal_Suit
+					else if (.@god_treasure1 < 595) getitem 2322,1; //Silk_Robe_
+					else if (.@god_treasure1 < 680) getitem 2359,1; //Ninja_Suit_
+					else if (.@god_treasure1 < 765) getitem 2326,1; //Saint_Robe_
+					else if (.@god_treasure1 < 850) getitem 2342,1; //Full_Plate_Armor_
+					else if (.@god_treasure1 < 935) getitem 2331,1; //Tights_
+					else getitem 2336,1; //Thief_Clothes_
+				}
+				else if (.@god_treasure < 601) {
+					     if (.@god_treasure1 < 200) getitem 2422,1; //High_Fashion_Sandals
+					else if (.@god_treasure1 < 400) getitem 2404,1; //Shoes_
+					else if (.@god_treasure1 < 600) getitem 2406,1; //Boots_
+					else if (.@god_treasure1 < 800) getitem 2407,1; //Chrystal_Pumps
+					else getitem 2412,1; //Grave_
+				}
+				else if (.@god_treasure < 701) {
+					     if (.@god_treasure1 < 200) getitem 2513,1; //Celestial_Robe
+					else if (.@god_treasure1 < 400) getitem 2504,1; //Muffler_
+					else if (.@god_treasure1 < 600) getitem 2506,1; //Manteau_
+					else if (.@god_treasure1 < 800) getitem 2514,1; //Pauldron
+					else getitem 2508,1; //Ragamuffin_Cape
+				}
+				else if (.@god_treasure < 801) {
+					     if (.@god_treasure1 < 110) getitem 1122,1; //Ring_
+					else if (.@god_treasure1 < 220) getitem 2622,1; //Earring_
+					else if (.@god_treasure1 < 330) getitem 2623,1; //Necklace_
+					else if (.@god_treasure1 < 440) getitem 2624,1; //Glove_
+					else if (.@god_treasure1 < 550) getitem 2625,1; //Brooch_
+					else if (.@god_treasure1 < 660) getitem 2607,1; //Clip
+					else if (.@god_treasure1 < 770) getitem 2626,1; //Rosary_
+					else if (.@god_treasure1 < 880) getitem 2617,1; //Mitten_Of_Presbyter
+					else getitem 2671,1; //Thimble_Of_Archer_
 				}
 				else {
-					getitem 5006,1; // Machoman_Glasses
+					     if (.@god_treasure1 < 150) getitem 2281,1; //Phantom_Of_Opera
+					else if (.@god_treasure1 < 260) getitem 2297,1; //Goblini_Mask
+					else if (.@god_treasure1 < 370) getitem 5087,1; //Goblin_Mask_01
+					else if (.@god_treasure1 < 480) getitem 5088,1; //Goblin_Mask_02
+					else if (.@god_treasure1 < 590) getitem 5089,1; //Goblin_Mask_03
+					else if (.@god_treasure1 < 700) getitem 5090,1; //Goblin_Mask_04
+					else if (.@god_treasure1 < 810) getitem 5086,1; //Alarm_Mask
+					else if (.@god_treasure1 < 920) getitem 2292,1; //Welding_Mask
+					else getitem 5006,1; //Machoman_Glasses
 				}
 			}
 			next;
@@ -573,7 +508,7 @@ que_god01,98,98,4	script	Manager#G	69,{
 }
 
 que_god01,66,125,6	script	Researcher#G1	89,{
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if (god_sl_1 == 2) {
 			set god_sl_1,11;
 		}
@@ -739,7 +674,7 @@ que_god01,66,125,6	script	Researcher#G1	89,{
 }
 
 que_god01,11,136,6	script	Researcher#G2	742,{
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if (god_sl_1 == 2) {
 			set god_sl_1,21;
 		}
@@ -958,7 +893,7 @@ que_god01,11,136,6	script	Researcher#G2	742,{
 }
 
 que_god01,55,47,3	script	Researcher#G3	803,{
-	if (god_sl2 < 100) {
+	if ($God1 < $@god_check2) {
 		if (god_sl_1 == 2) {
 			set god_sl_1,31;
 		}
@@ -1224,7 +1159,7 @@ que_god01,55,47,3	script	Researcher#G3	803,{
 }
 
 que_god01,14,47,3	script	Researcher#G4	713,{
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if (god_sl_1 == 2) {
 			set god_sl_1,41;
 		}
@@ -1330,7 +1265,7 @@ que_god01,14,47,3	script	Researcher#G4	713,{
 }
 
 que_god01,20,48,0	script	Slab#G	111,{
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if ((god_sl_1 == 41) || (god_sl_1 == 12) || (god_sl_1 == 23) || (god_sl_1 == 34)) {
 			if ((god_sl_2 == 1) || (god_sl_2 == 2)) {
 				mes "....whgks ^ff00ffdirdnl^000000sjs wkrdjswhgks whdtnfb";
@@ -1476,7 +1411,7 @@ que_god01,20,48,0	script	Slab#G	111,{
 }
 
 payon,79,171,4	script	Friar#G5	95,{
-	if ($God1 < 100) {
+	if ($God1 < $@god_check2) {
 		if ((god_sl_1 == 21) || (god_sl_1 == 32) || (god_sl_1 == 43) || (god_sl_1 == 14)) {
 			if ((god_sl_2 == 1) || (god_sl_2 == 3)) {
 				mes "[Lania]";

+ 5 - 6
npc/re/guild/invest_main.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: =====================================
-//= 1.0
+//= 1.1
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -14,6 +14,7 @@
 //= - Hall of Abyss, total 70,000,000z.
 //===== Additional Comments: =================================
 //= 1.0 First version. Missing official times. [Euphy]
+//= 1.1 Added GM management function. [Euphy]
 //============================================================
 
 // Global Variables
@@ -388,11 +389,10 @@ OnReset:
 }
 
 prt_gld,2,2,0	script	Investment_total#fund00	844,{
-/*
+	callfunc "F_GM_NPC";
 	mes "Is this not working properly?";
 	next;
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		mes "If you think the investment timer is dead, please adjust the timer.";
 		next;
 		switch(select("Turn on the timer:Cancel")) {
@@ -408,8 +408,7 @@ prt_gld,2,2,0	script	Investment_total#fund00	844,{
 		mes "I don't need to adjust anything now.";
 		close;
 	}
-*/
-	end;
+
 OnInit:
 	if (callfunc("F_Invest_Status") == 1) {
 		initnpctimer;

+ 15 - 1
npc/re/instances/BakonawaLake.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Euphy
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //= Part of the "Bakonawa Extermination" quest.
 //===== Additional Comments: ================================= 
 //= 1.0 First version. [Euphy]
+//= 1.1 Added GM management NPC. [Euphy]
 //============================================================ 
 
 ma_scene01,174,179,4	script	Taho	541,{
@@ -104,6 +105,19 @@ ma_scene01,174,179,4	script	Taho	541,{
 	}
 }
 
+sec_in02,26,26,4	script	Bakonawa's Rage	541,{
+	callfunc "F_GM_NPC";
+	mes "[Taho]";
+	mes "My name is Minky.";
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
+		erasequest 12278;
+		erasequest 12279;
+		set malaya_bakona1,7;
+		set malaya_bakona2,15;
+	}
+	close;
+}
+
 1@ma_b,62,52,4	script	Taho#nf	541,{
 	mes "[Taho]";
 	mes "Heehee, I could join the Bakonawa hunt, but I'd rather hide behind that rock and cheer you guys on.";

+ 4 - 5
npc/re/instances/BangungotHospital.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Euphy
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //= Part of the "Nurse in Port Malaya" quest.
 //===== Additional Comments: ================================= 
 //= 1.0 First version. [Euphy]
+//= 1.1 Added GM management function. [Euphy]
 //============================================================ 
 
 // Instance Creation
@@ -347,12 +348,11 @@ L_Complete:
 	return;
 }
 
-/*
 sec_in02,27,30,0	script	Bangungot Gate	406,{
+	callfunc "F_GM_NPC";
 	mes "Password";
 	next;
-	input .@inputstr$;
-	if (.@inputstr$ != "1854") {
+	if (callfunc("F_GM_NPC","1854",1) == 0) {
 		mes "Good Luck.";
 		close;
 	}
@@ -370,7 +370,6 @@ sec_in02,27,30,0	script	Bangungot Gate	406,{
 		case 11: close;
 	}
 }
-*/
 
 // Instance Scripts
 //============================================================

+ 6 - 5
npc/re/jobs/3-1/archbishop.txt

@@ -4,7 +4,7 @@
 //= L0ne_W0lf
 //= Credits: Gepard
 //===== Current Version: =====================================
-//= 1.8
+//= 1.9
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -23,6 +23,7 @@
 //= 1.7 Updated script, many bugs fixed. [Euphy]
 //= 1.7a Moved warps to separate file. [Euphy]
 //= 1.8 Bug fixes and corrections. [Euphy]
+//= 1.9 Added GM management function. [Euphy]
 //============================================================
 
 prt_church,103,88,3	script	Praying Minister#arch	60,{
@@ -1642,16 +1643,17 @@ OnTouch:
 	if (countitem(2798)) delitem 2798, countitem(2798); //Will_Of_Exhausted_Angel
 	end;
 }
+*/
 
 job3_arch01,1,1,1	script	control#arch	844,{
+	callfunc "F_GM_NPC";
 	mes "[Troll]";
 	mes "Password please.";
 	next;
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		mes "[Transit]";
 		mes "The GlobalVar is";
-		mes "" + $@archbs + ".";
+		mes $@archbs + ".";
 		mes "Do you want to change it?";
 		next;
 		switch(select("0:1")) {
@@ -1670,7 +1672,6 @@ job3_arch01,1,1,1	script	control#arch	844,{
 		close;
 	}
 }
-*/
 
 odin_tem02,30,181,0	script	#wherearch01	139,10,10,{
 OnTouch:

+ 12 - 11
npc/re/jobs/3-1/guillotine_cross.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib
 //===== Current Version: ===================================== 
-//= 1.4
+//= 1.5
 //===== Compatible With: ===================================== 
 //= rAthena SVN r16945+
 //===== Description: ========================================= 
@@ -17,6 +17,7 @@
 //= 1.2 Moved "Girl" NPC off ve_fild05. [Euphy]
 //= 1.3 Added missing OnMyMobDead labels. [Euphy]
 //= 1.4 Added missing labels. [Joseph]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 que_job01,75,96,3	script	Guild Member#3rdgc01	997,{
@@ -3833,12 +3834,11 @@ OnTouch:
 	end;
 }
 
-/*
 job3_guil02,1,3,0	script	#GMhelper01_gc	844,{
+	callfunc "F_GM_NPC";
 	mes "What can I do for you?";
 	next;
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		set .@room01, $@3rdgc_room01;
 		mes "I check the recent situation.";
 		mes "The battle situation of storage: "+.@room01+"";
@@ -3867,16 +3867,17 @@ job3_guil02,1,3,0	script	#GMhelper01_gc	844,{
 			mes "A management for mansion is in mansion.";
 			close;
 		}
+	} else {
+		mes "-_-.";
+		close;
 	}
-	mes "-_-.";
-	close;
 }
 
 job3_guil03,1,8,0	script	#GMhelper02_gc	844,{
+	callfunc "F_GM_NPC";
 	mes "What can I do for you?";
 	next;
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		set .@room02, $@3rdgc_room02;
 		mes "Check the recent situation.";
 		mes "The battle situation of the mansion is: "+.@room02+"";
@@ -3937,8 +3938,8 @@ job3_guil03,1,8,0	script	#GMhelper02_gc	844,{
 			mes "The management of storage is in a storage.";
 			close;
 		}
+	} else {
+		mes "-_-.";
+		close;
 	}
-	mes "-_-.";
-	close;
 }
-*/

+ 3 - 3
npc/re/jobs/3-1/ranger.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib
 //===== Current Version: ===================================== 
-//= 1.5
+//= 1.6
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -20,6 +20,7 @@
 //= 1.3a Little beauty fix, changed break; to next; . [Masao]
 //= 1.4 Some optimization. [Euphy]
 //= 1.5 Updated script, optimized. [Euphy]
+//= 1.6 Added GM management function. [Euphy]
 //============================================================
 
 tur_dun01,156,36,5	script	Survival Instructor#jr01	59,{
@@ -1757,8 +1758,8 @@ job3_rang01,90,43,3	script	Ranger Master#jr_29	832,{
 	}
 }
 
-/*
 job3_rang01,58,1,0	script	Worker#job_ranger	88,{
+	callfunc "F_GM_NPC";
 	switch(select("Enable Waiting Room:Disable Waiting Room:Enable 1st Test:Disable 1st Test:Enable 2nd Test:Disable 2nd Test:Enable 3rd Test:Disable 3rd Test:Cancel")) {
 	case 1:
 		mes "Enabled Waiting Room";
@@ -1803,4 +1804,3 @@ job3_rang01,58,1,0	script	Worker#job_ranger	88,{
 		close;
 	}
 }
-*/

+ 4 - 5
npc/re/jobs/3-1/rune_knight.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= L0ne_W0lf, Muad_Dib
 //===== Current Version: =====================================
-//= 1.4a
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -16,6 +16,7 @@
 //= 1.3a Added 'npcskill' command. [Euphy]
 //= 1.4 Fixed a few bugs. [Euphy]
 //= 1.4a Moved Kafra to main file. [Euphy]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 prt_in,162,24,3	script	Splendid-Looking Knight	470,2,2,{
@@ -2135,12 +2136,11 @@ OnMyMobDead:
 	end;
 }
 
-/*
 sec_in02,34,167,3	script	R.Knight Job Manager	470,1,1,{
+	callfunc "F_GM_NPC";
 	mes "Enter the Password.";
 	next;
-	input .@inputstr$;
-	if (.@inputstr$ == "1854") {
+	if (callfunc("F_GM_NPC","1854",1) == 1) {
 		mes "Rune Knight Job Change Managing Module Start";
 		next;
 		switch(select("GlobalVar check:GlobalVar Oneshot Modification")) {
@@ -2157,4 +2157,3 @@ sec_in02,34,167,3	script	R.Knight Job Manager	470,1,1,{
 	close;
 }
 job3_rune01,1,1,3	duplicate(R.Knight Job Manager)	#renshucheck	844
-*/

+ 4 - 4
npc/re/jobs/3-1/warlock.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib, Gepard & L0ne_W0lf
 //===== Current Version: ===================================== 
-//= 1.3b
+//= 1.4
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -19,6 +19,7 @@
 //= 1.3 Updated script, optimized. [Euphy]
 //= 1.3a Added temporary coordinate fix #distorted_space_1-1. [Euphy]
 //= 1.3b Added official coordinates. [Euphy]
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 -	script	#distorted_space_	-1,{
@@ -1055,8 +1056,8 @@ OnTimer6000:
 	end;
 }
 
-/*
-job3_war01,1,2,0	script	Button Girl	66,{
+job3_war01,1,2,0	script	Button Girl#wl	66,{
+	callfunc "F_GM_NPC";
 	switch(select("Open Arena:Close Arena:Open the Chamber of Magic:Close the Chamber of Magic:Hollow Stone On:Hollow Stone Off:Cancel")) {
 	case 1:
 		mes "Opening the Arena.";
@@ -1092,7 +1093,6 @@ job3_war01,1,2,0	script	Button Girl	66,{
 		close;
 	}
 }
-*/
 
 spl_fild02,0,0,0,0	monster	Bradium Golem	2049,20,5000,0,0
 spl_fild02,0,0,0,0	monster	Naga	2047,20,5000,0,0

+ 3 - 3
npc/re/jobs/3-2/royal_guard.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib
 //===== Current Version: ===================================== 
-//= 1.1
+//= 1.2
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -12,6 +12,7 @@
 //===== Additional Comments: ================================= 
 //= 1.0 First Version. [brAthena]
 //= 1.1 Updated script. [Euphy]
+//= 1.2 Added GM management function. [Euphy]
 //============================================================
 
 prt_castle,48,161,3	script	Middle-aged Gentleman#rg	57,{
@@ -497,8 +498,8 @@ OnTouch:
 	end;
 }
 
-/*
 sec_in02,12,43,3	script	sorcereryal	57,1,1,{
+	callfunc "F_GM_NPC";
 	switch(select("Royal Guard:Rune Knight:Sorcerer")) {
 	case 1:
 		mes "1~5";
@@ -538,4 +539,3 @@ sec_in02,12,43,3	script	sorcereryal	57,1,1,{
 		close;
 	}
 }
-*/

+ 3 - 3
npc/re/jobs/3-2/sura.txt

@@ -3,7 +3,7 @@
 //===== By: ================================================== 
 //= Muad_Dib, Gepard
 //===== Current Version: ===================================== 
-//= 1.2
+//= 1.3
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -13,6 +13,7 @@
 //= 1.0 First Version. [Masao]
 //= 1.1 Removed disablenpc which causes players stucked in waitingroom. [Joseph]
 //= 1.2 Updated script, optimized. [Euphy]
+//= 1.3 Added GM management function. [Euphy]
 //============================================================
 
 ve_in,237,125,0	script	King Crab#job_shu	107,{
@@ -829,8 +830,8 @@ sword_1-1,223,167,2	script	Master#job_shu	483,{
 	end;
 }
 
-/*
 sword_2-1,1,2,0	script	Button Girl#sura	66,{
+	callfunc "F_GM_NPC";
 	switch(select("Turn on arena.:Turn off arena.:Turn on the living room.:Turn on Buddy.:Turn on Gara.:Turn off all.:Close")) {
 	case 1:
 		mes "Turn on arena.";
@@ -864,4 +865,3 @@ sword_2-1,1,2,0	script	Button Girl#sura	66,{
 		close;
 	}
 }
-*/

+ 4 - 5
npc/re/jobs/repair.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: ===================================== 
-//= 1.0
+//= 1.1
 //===== Compatible With: ===================================== 
 //= rAthena SVN
 //===== Description: ========================================= 
@@ -11,6 +11,7 @@
 //= Removes potentially conflicting job data.
 //===== Additional Comments: ================================= 
 //= 1.0 First version.
+//= 1.1 Added GM management function. [Euphy]
 //============================================================ 
 
 /*
@@ -277,12 +278,11 @@ in_rogue,376,104,4	duplicate(Valerie#sign)	Valerie#sc	837
 ve_in,244,122,4	duplicate(Valerie#sign)	Valerie#shu	837
 xmas,166,209,4	duplicate(Valerie#sign)	Valerie#wan	837
 
-/*
 sec_in02,12,40,5	script	Job Repair	57,1,1,{
+	callfunc "F_GM_NPC";
 	mes "Please input your password.";
 	next;
-	input .@inputstr$;
-	if (.@inputstr$ == "1854") {
+	if (callfunc("F_GM_NPC","1854",1) == 1) {
 		set job_arch,100;
 		set job_3rd_gc,100;
 		set job__mechanic,100;
@@ -313,4 +313,3 @@ sec_in02,12,40,5	script	Job Repair	57,1,1,{
 	}
 	close;
 }
-*/

+ 16 - 25
npc/re/quests/eden/eden_quests.txt

@@ -3,11 +3,11 @@
 //===== By: ==================================================
 //= L0ne_W0lf
 //===== Current Version: =====================================
-//= 1.4b
+//= 1.5
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
-//= Eden Group Headquarter NPC's.
+//= Eden Group Headquarter NPCs.
 //===== Additional Comments: =================================
 //= 1.0 First Version.
 //= 1.1 Removed unencoded comments (Korean -> Gibberish)
@@ -18,6 +18,7 @@
 //= 1.4 Partial cleaning and bug fixing. [Euphy]
 //= 1.4a Added 'npcskill' command. [Euphy]
 //= 1.4b Added 'disable_items' command. [Euphy]
+//= 1.5 Added GM management function. [Euphy]
 //============================================================
 
 moc_para01,25,35,4	script	Instructor Boya#para01	469,{
@@ -5120,32 +5121,22 @@ L_GetWeapon:
 	return;
 }
 
-/*
-sec_in02,25,33,4	script	Assistant	422,{
+sec_in02,25,33,4	script	Assistant#para_suvquest	422,{
+	callfunc "F_GM_NPC";
 	mes "Password";
 	next;
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		mes "Please select the variable you want to modify.";
 		next;
-		switch (select("para_suv01:para_suv02")) {
-		case 1:
-			mes "Enter the modified value";
-			next;
-			input .@input;
-			mes "Value of para_suv01 has been changed to "+.@input+".";
-			set para_suv01,.@input;
-			close;
-		case 2:
-			mes "Enter the modified value";
-			next;
-			input .@input;
-			mes "Value of para_suv02 has been changed to "+.@input+".";
-			set para_suv02,.@input;
-			close;
-		}
+		set .@var, select("para_suv01:para_suv02");
+		mes "Enter the modified value";
+		next;
+		input .@input,0,9999;
+		mes "Value of para_suv0"+.@var+" has been changed to "+.@input+".";
+		setd "para_suv0"+.@var,.@input;
+		close;
+	} else {
+		mes "......meow wee.";
+		close;
 	}
-	mes "......meow wee.";
-	close;
 }
-*/

+ 29 - 1
npc/re/quests/quests_dicastes.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Gennosuke Kouga, Muad_Dib
 //===== Current Version: =====================================
-//= 2.2
+//= 2.3
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -32,6 +32,7 @@
 //= 2.0 Fixed variables. [Joseph]
 //= 2.1 Added reset option to "Kareka". [Euphy]
 //= 2.2 Added Izlude duplicates. [Euphy]
+//= 2.3 Added GM management NPCs. [Euphy]
 //============================================================
 
 // Entrance
@@ -175,6 +176,20 @@ dic_dun01,266,113,5	script	Curious Sapha#ep13_3_	449,{
 	}
 }
 
+sec_in02,16,43,5	script	Scaraba Dungeon Entrance	449,{
+	callfunc "F_GM_NPC";
+	mes "Setting you for dungeon entry.";
+	mes "You will be able to go through if the password is correct.";
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
+		set ep13_3_secret,6;
+		getitem 2782,1; //Ring_Of_Wise_King
+		getitem 6437,2; //Scaraba_Perfume
+		mes "Setting Complete";
+	} else
+		mes "Wrong Password";
+	close;
+}
+
 // Vigilantes
 //============================================================
 -	script	Vigilante#main	-1,{
@@ -423,6 +438,19 @@ dic_in01,254,119,0	script	Item Storage#01	844,{
 	end;
 }
 
+sec_in02,10,42,1	script	13.3 Related Reset	449,{
+	callfunc "F_GM_NPC";
+	mes "[Reset]";
+	mes "Resets all quest windows including daily and map quests for 13.3.";
+	freeloop(1);
+	for(set .@i,12099; .@i<=12216; set .@i,.@i+1) {
+		if (checkquest(.@i) > -1)
+			erasequest .@i;
+	}
+	freeloop(0);
+	close;
+}
+
 // Civil Services
 //============================================================
 function	script	que_dic	{

+ 3 - 5
npc/re/quests/quests_malangdo.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Muad_Dib
 //===== Current Version: =====================================
-//= 1.5
+//= 1.6
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -21,6 +21,7 @@
 //= 1.4a Dialogue edits, source iRO.
 //= 1.5 Added Cat Gamers.
 //=     Added "Investment Cat Helper" and "Storekeeper" NPCs.
+//= 1.6 Added GM management function.
 //============================================================
 
 // Utility NPCs :: cat_merchant
@@ -3512,10 +3513,8 @@ malangdo,129,146,3	script	Crime Prevention Staff	545,{
 	close;
 }
 
-/*
 malangdo,3,1,3	script	Guidance for quest#ml	543,{
-	input .@input,1,9999;
-	if (.@input != 1854) {
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
 		mes "[Helper]";
 		mes "What is this security code?";
 		mes "Go away!";
@@ -3560,7 +3559,6 @@ malangdo,3,1,3	script	Guidance for quest#ml	543,{
 		close;
 	}
 }
-*/
 
 // Clean the Ship :: mal_day_qook
 //============================================================

+ 60 - 6
npc/re/quests/quests_malaya.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: =====================================
-//= 1.0
+//= 1.1
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -21,6 +21,7 @@
 //= 0.4 Added "Cautious Village" and subsequent quests [DeadlySilence]
 //= 0.5 Added "Bakonawa Extermination" quest. [Euphy]
 //= 1.0 Added "Nurse in Port Malaya" and "Pintados Festival" quests. [Euphy]
+//= 1.1 Added GM management function and NPC. [Euphy]
 //============================================================
 
 // Cautious Village & Daily Quests :: hi_malaya
@@ -6503,6 +6504,63 @@ OnTouch:
 	end;
 }
 
+// Original name: "Bakonawa Introduction Quest Helper#bako1"
+sec_in02,10,16,5	script	Bakonawa Intro Helper	543,{
+	if (callfunc("F_GM_NPC",1854,0) < 1) {
+		mes "Seafood and Black Bean Sauce Noodle!";
+		close;
+	}
+	mes "[Briquet Scheme]";
+	mes "Just boldly tell me";
+	mes "what is it that you want!";
+	next;
+	switch(select("Reset all quests:Just before the end of first quest:Reset secondary quest:Distribution of lost belongings:Just after hunting")) {
+	case 1:
+		mes "Here you go!";
+		set malaya_bakona1,0;
+		set malaya_bakona2,0;
+		for(set .@i,1174; .@i<=1193; set .@i,.@i+1) {
+			if (checkquest(.@i) > -1)
+				erasequest .@i;
+		}
+		close;
+	case 2:
+		mes "[Briquet Scheme]";
+		mes "Here you go!";
+		set malaya_bakona1,6;
+		for(set .@i,1174; .@i<=1178; set .@i,.@i+1) {
+			if (checkquest(.@i) > -1)
+				erasequest .@i;
+		}
+		setquest 1179;
+		close;
+	case 3:
+		mes "[Briquet Scheme]";
+		mes "Here you go!";
+		set malaya_bakona2,0;
+		for(set .@i,1180; .@i<=1193; set .@i,.@i+1) {
+			if (checkquest(.@i) > -1)
+				erasequest .@i;
+		}
+		close;
+	case 4:
+		mes "[Briquet Scheme]";
+		mes "Here you go!";
+		getitem 6520,17; //Lost_Belongings
+		close;
+	case 5:
+		mes "[Briquet Scheme]";
+		mes "Here you go!";
+		set malaya_bakona2,8;
+		setquest 1187;
+		for(set .@i,1178; .@i<=1193; set .@i,.@i+1) {
+			if (checkquest(.@i) > -1)
+				erasequest .@i;
+		}
+		close;
+	}
+}
+
 // Nurse in Port Malaya :: bang
 //============================================================
 function	script	F_Malaya_Nurse	{
@@ -8159,11 +8217,7 @@ $malaya_pintados_04$ - Last player to create a tattoo.
 */
 
 ma_fild01,1,1,4	script	Pintados Manager#pin	894,{
-
-	if (!getgmlevel()) end;
-
-	input .@input;
-	if (.@input == 1854) {
+	if (callfunc("F_GM_NPC",1854,0) == 1) {
 		mes "Bingo!";
 		next;
 	} else {

+ 39 - 3
npc/re/quests/quests_mora.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: =====================================
-//= 1.0
+//= 1.1
 //===== Compatible With: =====================================
 //= rAthena SVN
 //===== Description: =========================================
@@ -15,6 +15,7 @@
 //===== Additional Comments: =================================
 //= 0.1 NPCs are currently placeholders. [Euphy]
 //= 1.0 Implemented all official quests. [Euphy]
+//= 1.1 Added GM management function and NPCs. [Euphy]
 //============================================================
 
 // Theore's Request :: bs
@@ -509,12 +510,11 @@ spl_fild02,183,1,0	duplicate(#mora_bush_timer)	Bush4Timer	440
 spl_fild02,184,1,0	duplicate(#mora_bush_timer)	Bush5Timer	440
 spl_fild02,186,1,0	duplicate(#mora_bush_timer)	Bush6Timer	440
 
-/*
 spl_fild02,187,1,0	script	Field Bush Switch	440,{
+	callfunc "F_GM_NPC";
 	donpcevent "Bush#ep14_1_bs1::OnEnable";
 	end;
 }
-*/
 
 splendide,183,117,4	script	Tired-looking Fairy	438,{
 	if (!isequipped(2782)) {
@@ -1444,6 +1444,22 @@ splendide,121,260,4	script	Daphrer#ep14_1_bs	435,{
 	close;
 }
 
+sec_in02,35,175,0	script	Theore Set Guid	436,{
+	callfunc "F_GM_NPC";
+	switch(select("Set0:Set33:Set2_0")) {
+	case 1:
+		set ep14_1_bs,0;
+		end;
+	case 2:
+		set ep4_1_bs,3;
+		setquest 11183;
+		end;
+	case 3:
+		set ep14_1_bs2,0;
+		end;
+	}
+}
+
 // Chesire's New Day :: cheshir2
 //============================================================
 dic_in01,262,191,0	script	#ep14_1_xq02	139,0,3,{
@@ -5062,6 +5078,26 @@ mora,104,172,7	script	Victim#pa0829	520,{
 	close;
 }
 
+sec_in02,29,34,5	script	Initializing Mora Sanjo	453,{
+	callfunc "F_GM_NPC";
+	mes "Enter your password";
+	if (callfunc("F_GM_NPC","1854",1) == 0) {
+		mes "Hehe";
+		close;
+	} else {
+		mes "[Initialization]";
+		mes "14.1 Initializing all quest window include related daily quest and map and so on";
+		freeloop(1);
+		for(set .@i,12225; .@i<=12353; set .@i,.@i+1) {
+			if (checkquest(.@i) > -1)
+				erasequest .@i;
+		}
+		freeloop(0);
+		set ep14_1_mistwoods,10;
+		close;
+	}
+}
+
 // Mora Daily Quests - Souls :: md_cadaver_in
 //============================================================
 // callfunc "mora_remains",<quest ID>,<NPC name>,<Mora Coin amount>,<reward ID>,<max reward amount>;

+ 2 - 1
npc/scripts_athena.conf

@@ -177,6 +177,7 @@ npc: npc/other/bulletin_boards.txt
 npc: npc/other/comodo_gambling.txt
 npc: npc/other/divorce.txt
 npc: npc/other/fortune.txt
+npc: npc/other/gm_npcs.txt
 npc: npc/other/guildpvp.txt
 npc: npc/other/gympass.txt
 npc: npc/other/hugel_bingo.txt
@@ -214,7 +215,7 @@ npc: npc/quests/okolnir.txt
 // - The God Item Quest -----------------------------------------
 npc: npc/quests/seals/brisingamen_seal.txt
 // - Controller file, allow GMs to change variables.
-//npc: npc/quests/seals/god_global.txt
+npc: npc/quests/seals/god_global.txt
 npc: npc/quests/seals/god_weapon_creation.txt
 npc: npc/quests/seals/megingard_seal.txt
 npc: npc/quests/seals/mjolnir_seal.txt

+ 9 - 8
npc/warps/other/arena.txt

@@ -3,16 +3,17 @@
 //===== By: ==================================================
 //= SinSloth
 //===== Current Version: =====================================
-//= 1.3
+//= 1.4
 //===== Compatible With: =====================================
 //= Any Athena Version
 //===== Description: =========================================
-//= Warp Points related to Izlude Arena && Control Panel
+//= Warp Points related to Izlude Arena & Control Panel
 //===== Additional Comments: =================================
 //= 1.0 First version, done by SinSloth. [MasterOfMuppets]
 //= 1.1 updated welcome_arena warp coords (was 128,126) [Lupus]
 //= 1.2 Made some updates due to Izlude Battle Arena release. [SinSloth]
 //= 1.3 Split Izlude warps into Pre-Renewal/Renewal paths. [Euphy]
+//= 1.4 Added GM management function. [Euphy]
 //============================================================
 
 // Main Room Warps
@@ -63,11 +64,14 @@ force_1-2,33,178,0	warp	force_10_09	1,1,force_1-2,59,178
 // GM Control Panel
 //============================================================
 sec_in02,79,180,3	script	#arenacontrol	81,{
-	input .@input;
-	if (.@input == 0) {
+	set .@i, callfunc("F_GM_NPC",1357,0);
+	if (.@i == -1) {
 		mes "Error!";
 		close;
-	} else if (.@input == 1357) {
+	} else if (.@i == 0) {
+		mes "Closing control panel.";
+		close;
+	} else {
 		mes "Opening Control Panel";
 		mes "' A - R - E - N - A '";
 		next;
@@ -88,8 +92,5 @@ sec_in02,79,180,3	script	#arenacontrol	81,{
 			disablenpc "welcome_arena";
 			close;
 		}
-	} else {
-		mes "Closing control panel.";
-		close;
 	}
 }

Неке датотеке нису приказане због велике количине промена