瀏覽代碼

Merge pull request #981 from rathena/woe_te-restrictions

WoE:Training Edition implementation
* Added a new version of WoE, WoE:TE which forbids 3rd class and 2nd expanded class from joining.
  - 10 new WoE castles.
  - New zone for job_noenter_map.txt
  - Various items are restricted.
* New monsters for the guild dungeon.
Jittapan Pluemsumran 8 年之前
父節點
當前提交
7a011ecd34
共有 69 個文件被更改,包括 7107 次插入315 次删除
  1. 1 1
      conf/battle/items.conf
  2. 8 2
      conf/msg_conf/map_msg.conf
  3. 26 9
      db/castle_db.txt
  4. 1 0
      db/import-tmpl/job_noenter_map.txt
  5. 2 0
      db/pre-re/item_noequip.txt
  6. 1 0
      db/pre-re/job_noenter_map.txt
  7. 2 7
      db/pre-re/skill_nocast_db.txt
  8. 3 2
      db/re/item_db.txt
  9. 212 96
      db/re/item_noequip.txt
  10. 67 0
      db/re/job_noenter_map.txt
  11. 48 48
      db/re/mob_db.txt
  12. 1 1
      db/re/mob_race2_db.txt
  13. 454 0
      db/re/mob_skill_db.txt
  14. 18 0
      db/re/quest_db.txt
  15. 41 5
      db/re/skill_nocast_db.txt
  16. 284 0
      db/status_disabled.txt
  17. 13 0
      doc/mapflags.txt
  18. 40 9
      doc/script_commands.txt
  19. 2 0
      npc/mapflag/gvg.txt
  20. 182 0
      npc/re/guides/guides_woe_te.txt
  21. 1218 0
      npc/re/guild3/agit_main_te.txt
  22. 51 0
      npc/re/guild3/agit_start_te.txt
  23. 72 0
      npc/re/guild3/te_aldecas1.txt
  24. 67 0
      npc/re/guild3/te_aldecas2.txt
  25. 70 0
      npc/re/guild3/te_aldecas3.txt
  26. 72 0
      npc/re/guild3/te_aldecas4.txt
  27. 71 0
      npc/re/guild3/te_aldecas5.txt
  28. 65 0
      npc/re/guild3/te_prtcas01.txt
  29. 67 0
      npc/re/guild3/te_prtcas02.txt
  30. 65 0
      npc/re/guild3/te_prtcas03.txt
  31. 65 0
      npc/re/guild3/te_prtcas04.txt
  32. 63 0
      npc/re/guild3/te_prtcas05.txt
  33. 18 1
      npc/re/mapflag/gvg.txt
  34. 15 0
      npc/re/mapflag/nobranch.txt
  35. 16 9
      npc/re/mapflag/noicewall.txt
  36. 15 0
      npc/re/mapflag/nomemo.txt
  37. 17 8
      npc/re/mapflag/nosave.txt
  38. 23 0
      npc/re/mapflag/noteleport.txt
  39. 24 0
      npc/re/mapflag/nowarp.txt
  40. 15 8
      npc/re/mapflag/nowarpto.txt
  41. 7 8
      npc/re/mapflag/restricted.txt
  42. 144 0
      npc/re/merchants/te_merchant.txt
  43. 30 0
      npc/re/mobs/dungeons/teg_dun.txt
  44. 27 0
      npc/re/other/Global_Functions.txt
  45. 1007 0
      npc/re/quests/woe_te/te_goditem_alde1.txt
  46. 1004 0
      npc/re/quests/woe_te/te_goditem_prt01.txt
  47. 42 0
      npc/re/quests/woe_te/te_mission_alde.txt
  48. 568 0
      npc/re/quests/woe_te/te_mission_main.txt
  49. 41 0
      npc/re/quests/woe_te/te_mission_prt.txt
  50. 9 1
      npc/re/scripts_athena.conf
  51. 13 0
      npc/re/scripts_guild.conf
  52. 1 0
      npc/re/scripts_monsters.conf
  53. 288 1
      npc/re/warps/guildcastles.txt
  54. 73 23
      src/map/atcommand.c
  55. 2 2
      src/map/battle.c
  56. 1 1
      src/map/clif.c
  57. 47 23
      src/map/guild.c
  58. 4 0
      src/map/guild.h
  59. 3 3
      src/map/itemdb.c
  60. 1 1
      src/map/log.c
  61. 3 2
      src/map/map.c
  62. 23 10
      src/map/map.h
  63. 16 1
      src/map/mob.c
  64. 19 0
      src/map/npc.c
  65. 3 2
      src/map/pc.c
  66. 210 17
      src/map/script.c
  67. 3 0
      src/map/script_constants.h
  68. 14 8
      src/map/skill.c
  69. 9 6
      src/map/status.c

+ 1 - 1
conf/battle/items.conf

@@ -81,7 +81,7 @@ autospell_stacking: no
 // Allow the consumption of usable items that are disabled by item_noequip.txt? (Note 1)
 // no = can't be consumed
 // yes = consumed with no effect
-allow_consume_restricted_item: yes
+allow_consume_restricted_item: no
 
 // Allow equipping items that are disabled by item_noequip.txt? (Note 1)
 // no = can't be equipped and will be unequipped when entering the map

+ 8 - 2
conf/msg_conf/map_msg.conf

@@ -418,7 +418,7 @@
 400: Usage: @jailfor <time> <character name>
 401: You have been jailed for %d years, %d months, %d days, %d hours and %d minutes
 402: %s in jail for %d years, %d months, %d days, %d hours and %d minutes
-// WoE SE (@agitstart2)
+// WoE SE (@agitstart2/@agitend2)
 403: War of Emperium SE has been initiated.
 404: War of Emperium SE is currently in progress.
 405: War of Emperium SE has been ended.
@@ -795,7 +795,13 @@
 747: The Baby is not a Novice.
 748: A parent or Baby was not found.
 
-//749-899 free
+// WoE TE (@agitstart3/@agitend3)
+749: War of Emperium TE has been initiated.
+750: War of Emperium TE is currently in progress.
+751: War of Emperium TE has been ended.
+752: War of Emperium TE is currently not in progress.
+
+//753-899 free
 
 //------------------------------------
 // More atcommands message

+ 26 - 9
db/castle_db.txt

@@ -9,18 +9,19 @@
 // 04. OnGuildBreakEventName    NPC unique name to invoke ::OnGuildBreak on, when a occupied
 //                              castle is abandoned during guild break.
 
-0,aldeg_cas01,Neuschwanstein,Agit#aldeg_cas01		// kRO : Noisyubantian
-1,aldeg_cas02,Hohenschwangau,Agit#aldeg_cas02		// kRO : Hohensyubangawoo
-2,aldeg_cas03,Nuernberg,Agit#aldeg_cas03			// kRO : Nyirenverk
-3,aldeg_cas04,Wuerzburg,Agit#aldeg_cas04			// kRO : Byirtsburi
+// WOE FE castle
+0,aldeg_cas01,Neuschwanstein,Agit#aldeg_cas01	// kRO : Noisyubantian
+1,aldeg_cas02,Hohenschwangau,Agit#aldeg_cas02	// kRO : Hohensyubangawoo
+2,aldeg_cas03,Nuernberg,Agit#aldeg_cas03		// kRO : Nyirenverk
+3,aldeg_cas04,Wuerzburg,Agit#aldeg_cas04		// kRO : Byirtsburi
 4,aldeg_cas05,Rothenburg,Agit#aldeg_cas05		// kRO : Rotenburk
 5,gefg_cas01,Repherion,Agit#gefg_cas01			// kRO : Reprion
 6,gefg_cas02,Eeyolbriggar,Agit#gefg_cas02		// kRO : Yolbriger
 7,gefg_cas03,Yesnelph,Agit#gefg_cas03			// kRO : Isinlife
-8,gefg_cas04,Bergel,Agit#gefg_cas04			// kRO : Berigel
+8,gefg_cas04,Bergel,Agit#gefg_cas04				// kRO : Berigel
 9,gefg_cas05,Mersetzdeitz,Agit#gefg_cas05		// kRO : Melsedetsu
 10,payg_cas01,Bright Arbor,Agit#payg_cas01		// kRO : Mingting
-11,payg_cas02,Scarlet Palace,Agit#payg_cas02		// kRO : Tiantan
+11,payg_cas02,Scarlet Palace,Agit#payg_cas02	// kRO : Tiantan
 12,payg_cas03,Holy Shadow,Agit#payg_cas03		// kRO : Fuying
 13,payg_cas04,Sacred Altar,Agit#payg_cas04		// kRO : Honglou
 14,payg_cas05,Bamboo Grove Hill,Agit#payg_cas05	// kRO : Zhulinxian
@@ -29,17 +30,33 @@
 17,prtg_cas03,Fadhgridh,Agit#prtg_cas03			// kRO : Lazrigees
 18,prtg_cas04,Skoegul,Agit#prtg_cas04			// kRO : Squagul
 19,prtg_cas05,Gondul,Agit#prtg_cas05			// kRO : Guindull
+
+// WOE NGuild castle
 20,nguild_alde,Earth,Agit_N01
 21,nguild_gef,Air,Agit_N02
 22,nguild_pay,Water,Agit_N03
 23,nguild_prt,Fire,Agit_N04
+
+// WOE SE castle
 24,schg_cas01,Himinn,Manager#schg_cas01			// kRO : Himinn
-25,schg_cas02,Andlangr,Manager#schg_cas02			// kRO : Andlangr
-26,schg_cas03,Viblainn,Manager#schg_cas03			// kRO : Viblainn
+25,schg_cas02,Andlangr,Manager#schg_cas02		// kRO : Andlangr
+26,schg_cas03,Viblainn,Manager#schg_cas03		// kRO : Viblainn
 27,schg_cas04,Hljod,Manager#schg_cas04			// kRO : Hljod
-28,schg_cas05,Skidbladnir,Manager#schg_cas05			// kRO : Skidbladnir
+28,schg_cas05,Skidbladnir,Manager#schg_cas05	// kRO : Skidbladnir
 29,arug_cas01,Mardol,Manager#arug_cas01			// kRO : Mardol
 30,arug_cas02,Cyr,Manager#arug_cas02			// kRO : Cyr
 31,arug_cas03,Horn,Manager#arug_cas03			// kRO : Horn
 32,arug_cas04,Gefn,Manager#arug_cas04			// kRO : Gefn
 33,arug_cas05,Bandis,Manager#arug_cas05			// kRO : Bandis
+
+// WOE TE castle
+34,te_aldecas1,Kafragarten 1,Manager_TE#Glaris
+35,te_aldecas2,Kafragarten 2,Manager_TE#Defolty
+36,te_aldecas3,Kafragarten 3,Manager_TE#Sorin
+37,te_aldecas4,Kafragarten 4,Manager_TE#Bennit
+38,te_aldecas5,Kafragarten 5,Manager_TE#W
+39,te_prtcas01,Gloria 1,Manager_TE#Gaebolg
+40,te_prtcas02,Gloria 2,Manager_TE#Richard
+41,te_prtcas03,Gloria 3,Manager_TE#Wigner
+42,te_prtcas04,Gloria 4,Manager_TE#Heine
+43,te_prtcas05,Gloria 5,Manager_TE#Nerious

+ 1 - 0
db/import-tmpl/job_noenter_map.txt

@@ -10,6 +10,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2

+ 2 - 0
db/pre-re/item_noequip.txt

@@ -9,6 +9,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2
@@ -17,6 +18,7 @@
 // 512  - restricted in zone 5
 // 1024 - restricted in zone 6
 // 2048 - restricted in zone 7
+// 4096 - restricted in zone 8
 //
 // Passing negative value as flag will unset the flag instead.
 //

+ 1 - 0
db/pre-re/job_noenter_map.txt

@@ -10,6 +10,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2

+ 2 - 7
db/pre-re/skill_nocast_db.txt

@@ -9,7 +9,7 @@
 // 2    - cannot be used in PvP maps (use this instead of 1 for PK-mode servers)
 // 4    - cannot be used in GvG maps
 // 8    - cannot be used in Battleground maps
-// 16   - cannot be cloned (clones will not copy this skill)
+// 16   - cannot be used in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - cannot be used in zone 1 maps
 // 64   - cannot be used in zone 2 maps
@@ -18,6 +18,7 @@
 // 512  - cannot be used in zone 5 maps
 // 1024 - cannot be used in zone 6 maps
 // 2048 - cannot be used in zone 7 maps
+// 4096 - cannot be used in zone 8 maps
 //
 // Example:
 // 8,6  // Endure cannot be used in PvP and GvG maps (2+4)
@@ -99,12 +100,6 @@
 488,3	//CG_HERMODE
 3013,3	//KO_KYOUGAKU
 
-//----------------------------------------------------------------------------
-// Clone Forbidden/pointless skills
-//----------------------------------------------------------------------------
-77,16	//PR_TURNUNDEAD
-79,16	//PR_MAGNUS
-
 //----------------------------------------------------------------------------
 // Zone 1 - Aldebaran Turbo Track
 //----------------------------------------------------------------------------

+ 3 - 2
db/re/item_db.txt

@@ -1288,7 +1288,7 @@
 2017,Divine_Cross_,Divine Cross,5,20,,1500,120:210,,1,1,0x00008100,63,2,34,4,70,1,23,{ bonus bUnbreakableWeapon,1; bonus bAtkEle,Ele_Holy; bonus bDex,4; },{},{}
 2018,Metal_Staff,Metal Staff,5,20,,0,50:70,,1,1,0x00818315,63,2,34,3,1,1,23,{ if(BaseJob==Job_Wizard) bonus bMatk,15; else if(BaseJob==Job_Sage) bonus bMatk,10; bonus bMatk,(getrefine()*5); .@i = min(BaseLevel/10,12); if(.@i>2) bonus bMatk,((.@i-2)*5); },{},{}
 2019,TE_Woe_Two_Hand_Staff,TE Woe Two Hand Staff,5,0,,0,50:130,,1,0,0x00818315,63,2,34,3,40,1,23,{ bonus2 bMagicAddRace,RC_Player,20; bonus3 bAddEff,Eff_Stun,1000,ATF_MAGIC; bonus bHPRecovRate,5; bonus bSPRecovRate,5; },{},{}
-2020,Jormungand,Jormungand,5,10,,3000,200:280,,,0,0x810200,63,2,34,4,1,,23,{ bonus bInt,20; bonus bUnbreakableWeapon,1; },{},{}
+2020,Jormungand,Jormungand,5,10,,3000,200:280,,,0,0x810200,63,2,34,4,1,0,23,{ bonus bInt,20; bonus bUnbreakableWeapon,1; },{},{}
 2021,Ganbantein,Ganbantein,5,0,,2000,100:320,,1,0,0x00000200,56,2,2,4,100,1,10,{ bonus bInt,25; bonus bDex,25; bonus3 bAddEff,Eff_Poison,1000,ATF_MAGIC; bonus3 bAutoSpell,"AB_SILENTIUM",1,100; bonus bUnbreakableWeapon,1; },{},{}
 2022,Geffen_Staff,Staff of Geffen,5,20,,1000,100:300,,1,1,0x00000200,18,2,34,1,150,1,23,{ bonus bInt,20; },{},{}
 2023,Tanos_Two-handed_Stick,Tanos Two-handed Stick,5,10,,1400,120:250,,,1,0x810200,63,2,34,4,120,1,23,{ bonus bInt,6; bonus bVit,6; bonus bLuk,-6; bonus bHealPower,18; bonus2 bHPLossRate,100,10000; },{},{}
@@ -1381,7 +1381,7 @@
 2179,TE_Woe_Shield,TE Woe Shield,4,0,,0,,25,,0,0x000444A2,63,2,32,1,40,1,3,{ bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20; },{},{}
 2180,TE_Woe_Magic_Guard,TE Woe Magic Guard,4,0,,0,,5,,0,0x00818315,63,2,32,1,40,1,1,{ bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10; },{},{}
 2181,Hervor,Hervor,4,10,,1500,,100,,0,0xFFFFFFFF,63,2,32,,1,,2,{ bonus bMdef,5; bonus2 bSubRace,RC_All,30; bonus bUnbreakableArmor,1; },{},{}
-2182,Hervor_Alvitr,Hervor Alvitr,4,0,,3000,,150,,0,0x000FDF80,56,2,32,1,100,0,2,{ bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_Player,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT; },{},{}
+2182,Hervor_Alvitr,Hervor Alvitr,4,0,,3000,,150,,0,0x000FDF80,56,2,32,1,100,0,2,{ bonus bMdef,10; bonus bVit,20; bonus2 bSubRace,RC_All,30; bonus bUnbreakableShield,1; autobonus2 "{ sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_STONE; sc_end SC_POISON; sc_end SC_BLIND; sc_end SC_SILENCE; sc_end SC_BLEEDING; sc_end SC_CONFUSION; sc_end SC_FREEZE; bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Sleep,10000; bonus2 bResEff,Eff_Curse,10000; bonus2 bResEff,Eff_Stone,10000; bonus2 bResEff,Eff_Poison,10000; bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Silence,10000; bonus2 bResEff,Eff_Bleeding,10000; bonus2 bResEff,Eff_Confusion,10000; bonus2 bResEff,Eff_Freeze,10000; }",10,60000,BF_SHORT; },{},{}
 2183,Impr_Angel's_Safeguard,Advanced Angelic Guard,4,10000,,400,,30,,1,0x00000001,63,2,32,,99,1,1,{ bonus2 bSubRace,RC_Demon,5; bonus2 bSubEle,Ele_All,5; bonus2 bSubEle,Ele_Neutral,-5; },{},{}
 2185,Magic_Reflect,Magic Reflect,4,10,,1000,,50,,1,0xFFFFFFFF,63,2,32,,99,1,3,{ bonus bMdef,10; bonus bMagicDamageReturn,3+((getrefine()>=9) ? 3 : 0); },{},{}
 2186,Great_Encyclopedia_Revision,Great Encyclopedia Revision,4,10,,200,0:5,50,,1,0x00810100,63,2,32,,99,1,4,{ bonus bInt,3; bonus bDex,2; .@r = getrefine(); bonus bCritical,3+((.@r >= 7) ? 2 : 0); if(.@r >= 9) bonus bMatk,5; },{},{}
@@ -6013,6 +6013,7 @@
 11056,Elemental_Spirit_Guide,Elemental Spirit Guide,3,1000,,10,,,,,,,,,,,,,{},{},{}
 11057,Feb_Sweets,February Sweets,3,20,,50,,,,,,,,,,,,,{},{},{}
 11058,Novice_Combi_Book,Novice Combi Book,3,0,,10,,,,,,,,,,,,,{},{},{}
+11059,WoE_TE_Rental_List,WoE TE Rental List,3,0,,10,,,,,,,,,,,,,{},{},{}
 11060,Energy_Xtal_Combi_Book,Energy Crystal Book,3,0,,10,,,,,,,,,,,,,{},{},{}
 11061,Honor_Proof_Exchange_List,Honor Proof Exchange List,3,20,,10,,,,,,,,,,,,,{},{},{}
 //===================================================================

+ 212 - 96
db/re/item_noequip.txt

@@ -9,6 +9,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2
@@ -17,6 +18,7 @@
 // 512  - restricted in zone 5
 // 1024 - restricted in zone 6
 // 2048 - restricted in zone 7
+// 4096 - restricted in zone 8
 //
 // Passing negative value as flag will unset the flag instead.
 //
@@ -31,129 +33,243 @@
 //----------------------------------------------------------------------------
 // Normal maps
 //----------------------------------------------------------------------------
-2483,1	//Siege_Greave
-2484,1	//Siege_Boots
-2485,1	//Siege_Shoes
-2586,1	//Siege_Manteau
-2587,1	//Siege_Muffler
-15046,1	//Siege_Plate
-15047,1	//Siege_Suits
-15048,1	//Siege_Robe
-1776,1	//Siege_Arrow_S
-1775,1	//Siege_Arrow_A
-1293,1	//Velum_Jamadhar
-1294,1	//Velum_Scare
-1395,1	//Velum_Buster
-1492,1	//Velum_Glaive
-2016,1	//Velum_Arc_Wand
-21001,1	//Velum_Claymore
-21002,1	//Velum_Katzbalger
-18113,1	//Velum_Arbalest
-18114,1	//Velum_CrossBow
-1586,1	//Velum_Bible
-1587,1	//Velum_Encyclopedia
-1832,1	//Velum_Claw
-13072,1	//Velum_Damascus
-16020,1	//Velum_Stunner
-16021,1	//Velum_Flail
-1436,1	//Velum_Spear
-1396,1	//Velum_Guillotine
-11548,1	//Woe_White_Potion
-11549,1	//Woe_Blue_Potion
-11547,1	//Woe_Violet_Potion
-12600,1	//Treasure_Box_Scroll
+2483,1		// Siege_Greave
+2484,1		// Siege_Boots
+2485,1		// Siege_Shoes
+2586,1		// Siege_Manteau
+2587,1		// Siege_Muffler
+15046,1		// Siege_Plate
+15047,1		// Siege_Suits
+15048,1		// Siege_Robe
+1776,1		// Siege_Arrow_S
+1775,1		// Siege_Arrow_A
+1293,1		// Velum_Jamadhar
+1294,1		// Velum_Scare
+1395,1		// Velum_Buster
+1492,1		// Velum_Glaive
+2016,1		// Velum_Arc_Wand
+21001,1		// Velum_Claymore
+21002,1		// Velum_Katzbalger
+18113,1		// Velum_Arbalest
+18114,1		// Velum_CrossBow
+1586,1		// Velum_Bible
+1587,1		// Velum_Encyclopedia
+1832,1		// Velum_Claw
+13072,1		// Velum_Damascus
+16020,1		// Velum_Stunner
+16021,1		// Velum_Flail
+1436,1		// Velum_Spear
+1396,1		// Velum_Guillotine
+11548,1		// Woe_White_Potion
+11549,1		// Woe_Blue_Potion
+11547,1		// Woe_Violet_Potion
+12600,1		// Treasure_Box_Scroll
 
 //----------------------------------------------------------------------------
 // PVP
 //----------------------------------------------------------------------------
-14529,2	//Greed_Scroll
+14529,2		// Greed_Scroll
 
 //----------------------------------------------------------------------------
 // GVG
 //----------------------------------------------------------------------------
-12218,4	//Assumptio_5_Scroll
-14529,4	//Greed_Scroll
-14590,4	//Pty_Assumptio_Scroll
+12218,4		// Assumptio_5_Scroll
+14529,4		// Greed_Scroll
+14590,4		// Pty_Assumptio_Scroll
 
 //----------------------------------------------------------------------------
 // Battlegrounds
 //----------------------------------------------------------------------------
-12218,8	//Assumptio_5_Scroll
-14590,8	//Pty_Assumptio_Scroll
+12218,8		// Assumptio_5_Scroll
+14590,8		// Pty_Assumptio_Scroll
+
+//----------------------------------------------------------------------------
+// CANNOT be consumed/equipped in WoE:TE Castles (16)
+//----------------------------------------------------------------------------
+// Krieger Gear
+1187,16		// Krieger_Twohand_Sword1
+1281,16		// Krieger_Katar1
+1282,16		// Krieger_Katar2
+1310,16		// Krieger_Onehand_Axe1
+1382,16		// Krieger_Twohand_Axe1
+1426,16		// Krieger_Onehand_Spear1
+1486,16		// Krieger_Twohand_Spear1
+1546,16		// Krieger_Onehand_Mace1
+1576,16		// Krieger_Book1
+1577,16		// Krieger_Book2
+1640,16		// Krieger_Onehand_Staff1
+1641,16		// Krieger_Onehand_Staff2
+1743,16		// Krieger_Bow1
+1826,16		// Krieger_Knuckle1
+1827,16		// Krieger_Knuckle2
+1927,16		// Krieger_Instrument1
+1981,16		// Krieger_Whip1
+2002,16		// Krieger_Twohand_Staff1
+2394,16		// Krieger_Suit1
+2395,16		// Krieger_Suit2
+2396,16		// Krieger_Suit3
+2444,16		// Krieger_Shoes1
+2445,16		// Krieger_Shoes2
+2446,16		// Krieger_Shoes3
+2549,16		// Krieger_Muffler1
+2772,16		// Krieger_Ring1
+2773,16		// Krieger_Ring2
+2774,16		// Krieger_Ring3
+13042,16	// Krieger_Dagger1
+13110,16	// Krieger_Pistol1
+13176,16	// Krieger_Rifle1
+13177,16	// Krieger_Gatling1
+13178,16	// Krieger_Shotgun1
+13179,16	// Krieger_Launcher1
+13307,16	// Krieger_Huuma_Shuriken1
+13416,16	// Krieger_Onehand_Sword1
+13417,16	// Krieger_Onehand_Sword2
+13418,16	// Krieger_Onehand_Sword3
+
+// Vellum Gear
+1293,16		// Velum_Jamadhar
+1294,16		// Velum_Scare
+1395,16		// Velum_Buster
+1396,16		// Velum_Guillotine
+1436,16		// Velum_Spear
+1492,16		// Velum_Glaive
+1586,16		// Velum_Bible
+1587,16		// Velum_Encyclopedia
+1832,16		// Velum_Claw
+2016,16		// Velum_Arc_Wand
+13072,16	// Velum_Damascus
+16020,16	// Velum_Stunner
+16021,16	// Velum_Flail
+18113,16	// Velum_Arbalest
+18114,16	// Velum_CrossBow
+21001,16	// Velum_Claymore
+21002,16	// Velum_Katzbalger
+
+// Siege Gear
+1775,16		// Siege_Arrow_A
+1776,16		// Siege_Arrow_S
+2483,16		// Siege_Greave
+2484,16		// Siege_Boots
+2485,16		// Siege_Shoes
+2586,16		// Siege_Manteau
+2587,16		// Siege_Muffler
+15046,16	// Siege_Plate
+15047,16	// Siege_Suits
+15048,16	// Siege_Robe
+
+// God Items
+1530,16		// Mjolnir
+2383,16		// Brynhild
+2410,16		// Sleipnir
+2541,16		// Asprika
+2629,16		// Magingiorde
+2630,16		// Brysinggamen
+7058,16		// Gullraifnir
+
+// Misc
+605,16		// Anodyne
+2365,16		// Orleans_Gown
+4077,16		// Phen_Card
+4128,16		// Golden_Bug_Card
+4198,16		// Maya_Puple_Card
+4327,16		// Blood_Butterfly_Card
+11503,16	// Siege_White_Potion
+11504,16	// Siege_Blue_Potion
+11547,16	// Woe_Violet_Potion
+11548,16	// Woe_White_Potion
+11549,16	// Woe_Blue_Potion
+12033,16	// Box_Of_Sunlight
+12213,16	// Neuralizer
+12218,16	// Assumptio_5_Scroll
+12388,16	// Runstone_Crush
+12389,16	// Runstone_Storm
+12390,16	// Runstone_Millennium
+12429,16	// Savage_Full_Roast
+12430,16	// Cocktail_Warg_Blood
+12431,16	// Minor_Stew
+12432,16	// Siroma_Iced_Tea
+12433,16	// Drosera_Herb_Salad
+12434,16	// Petite_Tail_Noodles
+12435,16	// Black_Mass
+12436,16	// Vitata_500
+12437,16	// Concentrated_Ceromain_Soup
+12580,16	// Vending_Search_Scroll
+12581,16	// Vending_Search_Scroll2
+12591,16	// Uni_Catalog_Bz
+12600,16	// Treasure_Box_Scroll
+14590,16	// Pty_Assumptio_Scroll
 
 //----------------------------------------------------------------------------
 // Zone 1 - Aldebaran Turbo Track
 //----------------------------------------------------------------------------
-601,32	//Wing_Of_Fly
-605,32	//Anodyne
-506,32	//Green_Potion
-525,32	//Panacea
+601,32		// Wing_Of_Fly
+605,32		// Anodyne
+506,32		// Green_Potion
+525,32		// Panacea
 
 //----------------------------------------------------------------------------
 // Zone 2 - Jail
 //----------------------------------------------------------------------------
-601,64	//Wing_Of_Fly
-602,64	//Wing_Of_Butterfly
-12212,64	//Giant_Fly_Wing
-14582,64	//WOB_Rune
-14583,64	//WOB_Schwaltz
-14584,64	//WOB_Rachel
-14585,64	//WOB_Local
+601,64		// Wing_Of_Fly
+602,64		// Wing_Of_Butterfly
+12212,64	// Giant_Fly_Wing
+14582,64	// WOB_Rune
+14583,64	// WOB_Schwaltz
+14584,64	// WOB_Rachel
+14585,64	// WOB_Local
 
 //----------------------------------------------------------------------------
 // Zone 3 - Izlude Battle Arena
 //----------------------------------------------------------------------------
-601,128	//Wing_Of_Fly
+601,128		// Wing_Of_Fly
 
 //----------------------------------------------------------------------------
 // Zone 7 - Towns
 //----------------------------------------------------------------------------
-14529,2048	//Greed_Scroll
+14529,2048	// Greed_Scroll
 
 //----------------------------------------------------------------------------
-// WoE TE Items - Only can be used in WoE TE maps
-// Assumed WOE TE maps are restricted zone 8.
-// TODO: &1 (Normal) is currently removed since if the map is restricted, it'll fail.
-//----------------------------------------------------------------------------
-//1299,4094	// TE_Woe_Katar
-//1319,4094	// TE_Woe_Axe
-//1399,4094	// TE_Woe_Two_Handed_Axe
-//1437,4094	// TE_Woe_Pike
-//1495,4094	// TE_Woe_Lance
-//1591,4094	// TE_Woe_Book
-//1667,4094	// TE_Woe_Staff
-//1834,4094	// TE_Woe_Fist
-//1932,4094	// TE_Woe_Guitar
-//1987,4094	// TE_Woe_Rope
-//2019,4094	// TE_Woe_Two_Hand_Staff
-//2178,4094	// TE_Woe_Buckler
-//2179,4094	// TE_Woe_Shield
-//2180,4094	// TE_Woe_Magic_Guard
-//2496,4094	// TE_Woe_Shoes
-//2497,4094	// TE_Woe_Boots
-//2498,4094	// TE_Woe_Magic_Sandal
-//2944,4094	// TE_Ring_Of_Protection
-//2945,4094	// TE_Ring_Of_Rage
-//2946,4094	// TE_Ring_Of_Defiance
-//11557,4094	// TE_White_Potion
-//11558,4094	// TE_White_Slim_Potion
-//13083,4094	// TE_Woe_Knife
-//13117,4094	// TE_Woe_Pistol
-//13184,4094	// TE_Woe_Rifle
-//13185,4094	// TE_Woe_Gatling
-//13186,4094	// TE_Woe_Shotgun
-//13187,4094	// TE_Woe_Grenade
-//13317,4094	// TE_Woe_Huuma
-//13439,4094	// TE_Woe_Sword
-//15062,4094	// TE_Woe_Coat
-//15063,4094	// TE_Woe_Chain_Mail
-//15064,4094	// TE_Woe_Mage_Coat
-//16025,4094	// TE_Woe_Mace
-//18118,4094	// TE_Woe_Bow
-//18732,4094	// TE_Woe_Cap
-//18733,4094	// TE_Woe_Bone_Helm
-//18734,4094	// TE_Woe_Magic_Eyes
-//20702,4094	// TE_Woe_Muffler
-//20703,4094	// TE_Woe_Manteau
-//20704,4094	// TE_Woe_Magic_Manteau
-//21006,4094	// TE_Woe_Two_Hand_Sword
+// WoE:TE Items - Only can be used in WoE:TE Castles (All except &16)
+//----------------------------------------------------------------------------
+1299,8175	// TE_Woe_Katar
+1319,8175	// TE_Woe_Axe
+1399,8175	// TE_Woe_Two_Handed_Axe
+1437,8175	// TE_Woe_Pike
+1495,8175	// TE_Woe_Lance
+1591,8175	// TE_Woe_Book
+1667,8175	// TE_Woe_Staff
+1834,8175	// TE_Woe_Fist
+1932,8175	// TE_Woe_Guitar
+1987,8175	// TE_Woe_Rope
+2019,8175	// TE_Woe_Two_Hand_Staff
+2178,8175	// TE_Woe_Buckler
+2179,8175	// TE_Woe_Shield
+2180,8175	// TE_Woe_Magic_Guard
+2496,8175	// TE_Woe_Shoes
+2497,8175	// TE_Woe_Boots
+2498,8175	// TE_Woe_Magic_Sandal
+2944,8175	// TE_Ring_Of_Protection
+2945,8175	// TE_Ring_Of_Rage
+2946,8175	// TE_Ring_Of_Defiance
+11557,8175	// TE_White_Potion
+11558,8175	// TE_White_Slim_Potion
+13083,8175	// TE_Woe_Knife
+13117,8175	// TE_Woe_Pistol
+13184,8175	// TE_Woe_Rifle
+13185,8175	// TE_Woe_Gatling
+13186,8175	// TE_Woe_Shotgun
+13187,8175	// TE_Woe_Grenade
+13317,8175	// TE_Woe_Huuma
+13439,8175	// TE_Woe_Sword
+15062,8175	// TE_Woe_Coat
+15063,8175	// TE_Woe_Chain_Mail
+15064,8175	// TE_Woe_Mage_Coat
+16025,8175	// TE_Woe_Mace
+18118,8175	// TE_Woe_Bow
+18732,8175	// TE_Woe_Cap
+18733,8175	// TE_Woe_Bone_Helm
+18734,8175	// TE_Woe_Magic_Eyes
+20702,8175	// TE_Woe_Muffler
+20703,8175	// TE_Woe_Manteau
+20704,8175	// TE_Woe_Magic_Manteau
+21006,8175	// TE_Woe_Two_Hand_Sword

+ 67 - 0
db/re/job_noenter_map.txt

@@ -10,6 +10,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2
@@ -25,3 +26,69 @@
 // NOTES:
 // - Restriction will be overwritten for multiple defines with the same Job ID
 // - The flag is used by 'jobcanentermap' script.
+
+JOB_RUNE_KNIGHT,4112,100
+JOB_WARLOCK,4112,100
+JOB_RANGER,4112,100
+JOB_ARCH_BISHOP,4112,100
+JOB_MECHANIC,4112,100
+JOB_GUILLOTINE_CROSS,4112,100
+
+JOB_RUNE_KNIGHT_T,4112,100
+JOB_WARLOCK_T,4112,100
+JOB_RANGER_T,4112,100
+JOB_ARCH_BISHOP_T,4112,100
+JOB_MECHANIC_T,4112,100
+JOB_GUILLOTINE_CROSS_T,4112,100
+
+JOB_ROYAL_GUARD,4112,100
+JOB_SORCERER,4112,100
+JOB_MINSTREL,4112,100
+JOB_WANDERER,4112,100
+JOB_SURA,4112,100
+JOB_GENETIC,4112,100
+JOB_SHADOW_CHASER,4112,100
+
+JOB_ROYAL_GUARD_T,4112,100
+JOB_SORCERER_T,4112,100
+JOB_MINSTREL_T,4112,100
+JOB_WANDERER_T,4112,100
+JOB_SURA_T,4112,100
+JOB_GENETIC_T,4112,100
+JOB_SHADOW_CHASER_T,4112,100
+
+JOB_RUNE_KNIGHT2,4112,100
+JOB_RUNE_KNIGHT_T2,4112,100
+JOB_ROYAL_GUARD2,4112,100
+JOB_ROYAL_GUARD_T2,4112,100
+JOB_RANGER2,4112,100
+JOB_RANGER_T2,4112,100
+JOB_MECHANIC2,4112,100
+JOB_MECHANIC_T2,4112,100
+
+JOB_BABY_RUNE,4112,100
+JOB_BABY_WARLOCK,4112,100
+JOB_BABY_RANGER,4112,100
+JOB_BABY_BISHOP,4112,100
+JOB_BABY_MECHANIC,4112,100
+JOB_BABY_CROSS,4112,100
+JOB_BABY_GUARD,4112,100
+JOB_BABY_SORCERER,4112,100
+JOB_BABY_MINSTREL,4112,100
+JOB_BABY_WANDERER,4112,100
+JOB_BABY_SURA,4112,100
+JOB_BABY_GENETIC,4112,100
+JOB_BABY_CHASER,4112,100
+
+JOB_BABY_RUNE2,4112,100
+JOB_BABY_GUARD2,4112,100
+JOB_BABY_RANGER2,4112,100
+JOB_BABY_MECHANIC2,4112,100
+
+JOB_SUPER_NOVICE_E,4112,100
+JOB_SUPER_BABY_E,4112,100
+
+JOB_KAGEROU,4112,100
+JOB_OBORO,4112,100
+
+JOB_REBELLION,4112,100

+ 48 - 48
db/re/mob_db.txt

@@ -1566,54 +1566,54 @@
 2413,DUMMY_10_FIRE,Dummy 10,Dummy 10,10,99999999,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,1,0,23,0x0,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 
 //2414,RUNAWAY_BOOK
-//2415,L_SEYREN
-//2416,L_EREMES
-//2417,L_HARWORD
-//2418,L_SHECIL
-//2419,L_KATRINN
-//2420,L_MAGALETA
-//2421,L_YGNIZEM
-//2422,L_WHIKEBAIN
-//2423,L_ARMAIA
-//2424,L_KAVAC
-//2425,L_DANCER
-//2426,L_RAWREL
-//2427,L_EREND
-//2428,G_L_SEYREN
-//2429,G_L_EREMES
-//2430,G_L_HARWORD
-//2431,G_L_SHECIL
-//2432,G_L_KATRINN
-//2433,G_L_MAGALETA
-//2434,G_L_YGNIZEM
-//2435,G_L_WHIKEBAIN
-//2436,G_L_ARMAIA
-//2437,G_L_KAVAC
-//2438,G_L_DANCER
-//2439,G_L_RAWREL
-//2440,G_L_EREND
-//2441,B_NOVICE
-//2442,B_SUPERNOVICE
-//2443,AIRA
-//2444,KULUNA
-//2445,MALLINA
-//2446,EZELLA
-//2447,LUNE
-//2448,MORIN
-//2449,NASARIN
-//2450,THIEF_PORING
-//2451,BABY_STRANGE
-//2452,TREASURE_BOX_TE
-//2453,TREASURE_BOX_TE_1
-//2454,TREASURE_BOX_TE_2
-//2455,TREASURE_BOX_TE_3
-//2456,TREASURE_BOX_TE_4
-//2457,TREASURE_BOX_TE_5
-//2458,TREASURE_BOX_TE_6
-//2459,TREASURE_BOX_TE_7
-//2460,TREASURE_BOX_TE_8
-//2461,TREASURE_BOX_TE_9
-//2462,TREASURE_BOX_TE_10
+2415,L_SEYREN,Knight Seyren,Knight Seyren,98,13260,1,2950,1974,1,827,1112,149,10,127,62,77,44,118,49,10,12,1,7,63,0x3885,150,432,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1163,100,1164,5,2314,500,2315,5,603,2,0,0,0,0,0,0
+2416,L_EREMES,Assassin Eremes,Assassin Eremes,98,9029,1,3150,1484,1,739,892,109,10,130,78,53,60,114,68,10,12,1,7,85,0x3885,160,432,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1261,100,1285,5,2337,500,2359,5,603,2,0,0,0,0,0,0
+2417,L_HARWORD,Blacksmith Harword,Blacksmith Howard,98,11803,1,2750,1640,1,782,1035,117,9,124,71,55,47,73,43,10,12,1,7,81,0x3885,160,432,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1361,100,1375,5,2310,500,2318,5,603,2,0,0,0,0,0,0
+2418,L_SHECIL,Hunter Shecil,Hunter Cecil,98,8835,1,2750,1668,14,574,797,68,13,108,113,60,72,148,37,10,12,1,7,64,0x3885,160,432,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1721,100,1722,5,2330,500,2331,5,603,2,0,0,0,0,0,0
+2419,L_KATRINN,Wizard Katrinn,Wizard Kathryne,98,7092,1,2750,1934,1,512,1162,69,66,97,70,49,129,125,44,10,12,1,7,68,0x3885,130,864,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1619,100,1629,5,2343,500,2372,5,603,2,0,0,0,0,0,0
+2420,L_MAGALETA,Prist Magaleta,Priest Margaretha,98,9192,1,2150,1634,1,644,1142,97,83,113,66,63,110,89,58,10,12,1,7,66,0x3885,160,864,400,288,0,0,0,0,0,0,0,7345,5000,7347,2500,1522,100,1526,5,2326,500,2373,5,603,2,0,0,0,0,0,0
+2421,L_YGNIZEM,Crusader Ygnizem,Crusader Egnigem,98,13440,1,1896,2928,1,852,1194,136,8,158,101,94,75,108,74,10,12,1,7,43,0x3885,155,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1129,100,1145,5,2316,500,2317,5,603,2,0,0,0,0,0,0
+2422,L_WHIKEBAIN,Log Whikebain,Rogue Wickebine,98,11712,1,1740,2454,1,545,761,125,72,125,100,75,46,93,60,10,12,1,7,65,0x3885,130,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1239,100,1231,5,2335,500,2336,5,603,2,0,0,0,0,0,0
+2423,L_ARMAIA,Alchemist Armaia,Alchemist Armeyer,98,11376,1,1814,3618,1,662,877,130,4,135,64,93,71,105,68,10,12,1,7,62,0x3885,130,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1304,100,1305,5,2310,500,2318,5,603,2,0,0,0,0,0,0
+2424,L_KAVAC,Bard Kavac,Bard Kavach,98,12637,1,1772,3164,9,605,798,94,52,113,119,68,55,163,52,10,12,1,7,44,0x3885,160,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1910,100,1913,5,2330,500,2331,5,603,2,0,0,0,0,0,0
+2425,L_DANCER,Dancer Joshepina,Dancer Josephina,98,12637,1,1972,3164,9,605,798,94,52,113,119,68,55,163,52,10,12,1,7,44,0x3885,160,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1959,100,1963,5,2330,500,2331,5,603,2,0,0,0,0,0,0
+2426,L_RAWREL,Sage Rawrel,Sage Laurell,98,9868,1,1880,3840,1,247,895,83,96,73,86,71,134,123,62,10,12,1,7,48,0x3885,160,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1551,100,1564,5,2343,500,2372,5,603,2,0,0,0,0,0,0
+2427,L_EREND,Monk Erend,Monk Errende,98,11168,1,1810,2000,1,972,1455,116,108,84,72,99,115,95,68,10,12,1,7,46,0x3885,140,432,400,288,0,0,0,0,0,0,0,7347,5000,7345,2500,1809,100,1813,5,2326,500,2373,5,603,2,0,0,0,0,0,0
+2428,G_L_SEYREN,Knight Seyren,Knight Seyren,98,13260,1,0,0,1,827,1112,149,10,127,62,77,44,118,49,10,12,1,7,63,0x3885,150,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2429,G_L_EREMES,Assassin Eremes,Assassin Eremes,98,9029,1,0,0,1,739,892,109,10,130,78,53,60,114,68,10,12,1,7,85,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2430,G_L_HARWORD,Blacksmith Harword,Blacksmith Howard,98,11803,1,0,0,1,782,1035,117,9,124,71,55,47,73,43,10,12,1,7,81,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2431,G_L_SHECIL,Hunter Shecil,Hunter Cecil,98,8835,1,0,0,14,574,797,68,13,108,113,60,72,148,37,10,12,1,7,64,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2432,G_L_KATRINN,Wizard Katrinn,Wizard Kathryne,98,7092,1,0,0,1,512,1162,69,66,97,70,49,129,125,44,10,12,1,7,68,0x3885,130,864,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2433,G_L_MAGALETA,Prist Magaleta,Priest Margaretha,98,9192,1,0,0,1,644,1142,97,83,113,66,63,110,89,58,10,12,1,7,66,0x3885,160,864,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2434,G_L_YGNIZEM,Crusader Ygnizem,Crusader Egnigem,98,13440,1,0,0,1,852,1194,136,8,158,101,94,75,108,74,10,12,1,7,43,0x3885,155,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2435,G_L_WHIKEBAIN,Log Whikebain,Rogue Wickebine,98,11712,1,0,0,1,545,761,125,72,125,100,75,46,93,60,10,12,1,7,65,0x3885,130,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2436,G_L_ARMAIA,Alchemist Armaia,Alchemist Armeyer,98,11376,1,0,0,1,537,769,130,4,135,64,93,71,105,68,10,12,1,7,62,0x3885,130,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2437,G_L_KAVAC,Bard Kavac,Bard Kavach,98,12637,1,0,0,9,605,798,94,52,113,119,68,55,163,52,10,12,1,7,44,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2438,G_L_DANCER,Dancer Joshepina,Dancer Josephina,98,12637,1,0,0,9,605,798,94,52,113,119,68,55,163,52,10,12,1,7,44,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2439,G_L_RAWREL,Sage Rawrel,Sage Laurell,98,9868,1,0,0,1,247,895,83,96,73,86,71,134,123,62,10,12,1,7,48,0x3885,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2440,G_L_EREND,Monk Erend,Monk Errende,98,11168,1,0,0,1,972,1455,116,108,84,72,99,115,95,68,10,12,1,7,46,0x3885,140,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2441,B_NOVICE,The Last One,The Last One,99,265203,1,212534,175494,3,3747,5435,510,139,272,148,162,99,160,59,10,12,1,7,83,0x6283E95,100,76,384,288,106267,0,0,0,0,0,0,7345,2500,603,3000,617,4000,616,500,1148,100,1140,5,1181,2,0,0,0,0,0,0
+2442,B_SUPERNOVICE,King of the Alley,King of the Alley,99,268800,1,217620,178000,3,5006,7357,410,192,206,194,181,156,203,115,10,12,1,7,83,0x6283E95,100,76,384,288,108810,0,0,0,0,0,0,7345,2500,603,3000,617,4000,616,500,1622,100,0,0,2000,2,0,0,0,0,0,0
+2443,AIRA,Aira,Aira,99,270000,1,220000,180000,1,887,1218,149,10,127,62,77,44,118,49,10,12,1,7,63,0x6283695,150,432,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2444,KULUNA,Kuluna,Kuluna,99,270000,1,220000,180000,1,820,1115,109,10,130,78,53,60,114,68,10,12,1,7,68,0x6283695,160,432,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2445,MALLINA,Mallina,Mallina,99,270000,1,220000,180000,1,782,1035,117,9,124,71,55,47,73,43,10,12,1,7,82,0x6283695,160,432,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2446,EZELLA,Ezella,Ezella,99,270000,0,110000,90000,1,666,895,68,13,108,113,60,72,148,37,10,12,1,7,64,0x6283695,160,432,400,288,55000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2447,LUNE,Lune,Lune,99,270000,1,220000,180000,1,512,1162,69,66,97,70,49,129,125,44,10,12,1,7,61,0x6283695,130,864,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2448,MORIN,Morin,Morin,99,270000,1,220000,180000,1,727,984,97,83,113,66,63,110,89,58,10,12,1,7,67,0x6283695,160,864,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2449,NASARIN,Nasarin,Nasarin,99,270000,1,220000,180000,1,938,1279,136,8,158,101,94,75,108,74,10,12,1,7,45,0x6283695,155,432,400,288,110000,0,0,0,0,0,0,739,3000,2407,50,2409,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2450,THIEF_PORING,Thief Poring,Thief Poring,1,30,0,0,0,1,13,16,2,5,6,1,1,0,6,5,10,12,1,3,21,0x0170081,200,672,864,288,0,0,0,0,0,0,0,7056,5000,7056,5000,7056,5000,644,500,603,100,0,0,0,0,0,0,0,0,0,0
+2451,BABY_STRANGE,Suspicious Baby,Strange Baby Orc,1,30,1,0,0,1,13,16,2,5,6,1,1,0,6,5,10,12,1,3,21,0x0170081,200,672,864,288,0,0,0,0,0,0,0,6592,5000,6592,5000,6592,5000,644,500,603,100,0,0,0,0,0,0,0,0,0,0
+2452,TREASURE_BOX_TE,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,607,5000,608,5000,7444,10000,7444,10000,617,5000,0,0,616,400,607,500,0,0,0,0
+2453,TREASURE_BOX_TE_1,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6595,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2454,TREASURE_BOX_TE_2,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6596,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2455,TREASURE_BOX_TE_3,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6594,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2456,TREASURE_BOX_TE_4,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6597,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2457,TREASURE_BOX_TE_5,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6602,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2458,TREASURE_BOX_TE_6,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6603,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2459,TREASURE_BOX_TE_7,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6599,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2460,TREASURE_BOX_TE_8,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6598,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2461,TREASURE_BOX_TE_9,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6601,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
+2462,TREASURE_BOX_TE_10,Treasure Chest,Treasure Chest,99,0,1,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,20,0x1000000,0,0,0,0,0,0,0,0,0,0,0,6600,40,658,500,7444,10000,7444,10000,12399,5000,0,0,616,400,12399,500,0,0,0,0
 //2463,E_BOMBPORING
 
 // Old Glast Heim (currently placeholders)

+ 1 - 1
db/re/mob_race2_db.txt

@@ -20,7 +20,7 @@ RC2_GVG,1143,1905,1906,1907
 // Battlefield
 RC2_BATTLEFIELD,1906,1909,1914,1915
 // Treasure Chests
-RC2_TREASURE,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946
+RC2_TREASURE,1324,1325,1326,1327,1328,1329,1330,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,1363,1938,1939,1940,1941,1942,1943,1944,1945,1946,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462
 // Bio Labs
 // TODO : Monsters in lhz_dun_n not implemented yet. [secretdataz]
 RC2_BIOLAB,1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241

+ 454 - 0
db/re/mob_skill_db.txt

@@ -8280,6 +8280,460 @@
 2410,Dummy 100@AL_HEAL,idle,28,11,10000,0,10000,no,self,myhpltmaxrate,50,,,,,,,
 2411,Dummy 150@AL_HEAL,idle,28,11,10000,0,10000,no,self,myhpltmaxrate,50,,,,,,,
 
+2415,Knight Seyren@KN_SPEARBOOMERANG,idle,59,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2415,Knight Seyren@KN_SPEARBOOMERANG,chase,59,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2415,Knight Seyren@KN_SPEARBOOMERANG,follow,59,5,10000,0,0,yes,target,always,0,,,,,,6,
+2415,Knight Seyren@KN_TWOHANDQUICKEN,attack,60,30,10000,0,300000,yes,self,always,0,,,,,,2,
+2415,Knight Seyren@KN_BOWLINGBASH,attack,62,5,1000,0,10000,yes,target,always,0,,,,,,,
+2415,Knight Seyren@SM_BASH,attack,5,10,1000,0,5000,yes,target,always,0,,,,,,,
+2415,Knight Seyren@KN_PIERCE,attack,56,10,1000,0,5000,yes,target,always,0,,,,,,,
+2415,Knight Seyren@SM_MAGNUM,attack,7,25,1000,0,0,yes,self,attackpcge,2,,,,,,,
+2415,Knight Seyren@SM_PROVOKE,attack,6,5,1000,0,300000,yes,target,always,0,,,,,,29,
+2415,Knight Seyren@SM_PROVOKE,chase,6,5,1000,0,5000,yes,target,always,0,,,,,,29,
+2415,Knight Seyren@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,yes,target,always,0,,,,,,,
+2415,Knight Seyren@NPC_STUNATTACK,attack,179,5,2000,0,5000,yes,target,always,0,,,,,,,
+2415,Knight Seyren@NPC_FIREATTACK,attack,186,5,2000,0,5000,yes,target,always,0,,,,,,9,
+2416,Assassin Eremes@AS_CLOAKING,attack,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2416,Assassin Eremes@AS_CLOAKING,idle,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2416,Assassin Eremes@AS_CLOAKING,chase,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2416,Assassin Eremes@AS_GRIMTOOTH,idle,137,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2416,Assassin Eremes@AS_SONICBLOW,attack,136,10,2000,0,5000,yes,target,always,0,,,,,,6,
+2416,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,2000,0,0,yes,target,always,0,,,,,,,
+2416,Assassin Eremes@AS_VENOMDUST,idle,140,10,2000,0,50000,yes,randomtarget,always,0,,,,,,29,
+2416,Assassin Eremes@AS_VENOMDUST,attack,140,10,2000,0,50000,yes,target,always,0,,,,,,29,
+2416,Assassin Eremes@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2416,Assassin Eremes@NPC_STUNATTACK,attack,179,5,1000,0,5000,yes,target,always,0,,,,,,,
+2416,Assassin Eremes@NPC_POISONATTACK,attack,188,5,1000,0,5000,yes,target,always,0,,,,,,,
+2416,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,10000,0,0,no,target,skillused,18,,,,,,6,
+2416,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2417,Blacksmith Howard@BS_ADRENALINE,attack,111,10,2000,0,150000,yes,self,always,0,,,,,,,
+2417,Blacksmith Howard@BS_MAXIMIZE,attack,114,1,1000,0,60000,yes,self,always,0,,,,,,,
+2417,Blacksmith Howard@MC_MAMMONITE,attack,42,22,2000,0,5000,yes,target,always,0,,,,,,23,
+2417,Blacksmith Howard@BS_HAMMERFALL,chase,110,5,2000,0,5000,yes,target,always,0,,,,,,,
+2417,Blacksmith Howard@BS_HAMMERFALL,attack,110,5,2000,0,5000,yes,target,always,0,,,,,,,
+2417,Blacksmith Howard@NPC_ARMORBRAKE,attack,344,10,1000,0,5000,yes,target,always,0,,,,,,19,
+2417,Blacksmith Howard@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2417,Blacksmith Howard@NPC_FIREATTACK,attack,186,5,1000,0,5000,yes,target,always,0,,,,,,,
+2417,Blacksmith Howard@NPC_WATERATTACK,attack,184,5,1000,0,5000,yes,target,always,0,,,,,,,
+2418,Hunter Cecil@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2418,Hunter Cecil@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2418,Hunter Cecil@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,6,
+2418,Hunter Cecil@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2418,Hunter Cecil@HT_SKIDTRAP,idle,115,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@HT_SKIDTRAP,attack,115,5,500,0,5000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@HT_FLASHER,idle,120,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@HT_FLASHER,attack,120,5,500,0,5000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@HT_FREEZINGTRAP,idle,121,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@HT_FREEZINGTRAP,attack,121,5,500,0,5000,yes,around2,always,0,,,,,,,
+2418,Hunter Cecil@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2418,Hunter Cecil@NPC_STUNATTACK,attack,179,5,1000,0,5000,yes,target,always,0,,,,,,,
+2418,Hunter Cecil@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_SIGHT,idle,10,1,2000,0,5000,yes,self,always,0,,,,,,,
+2419,Wizard Kathryne@MG_SIGHT,idle,10,1,10000,0,5000,yes,self,skillused,137,,,,,,,
+2419,Wizard Kathryne@MG_FROSTDIVER,idle,15,1,10000,1000,10000,no,randomtarget,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_JUPITEL,idle,84,28,10000,1000,10000,no,randomtarget,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FROSTDIVER,attack,15,1,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_JUPITEL,attack,84,28,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_JUPITEL,chase,84,28,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_COLDBOLT,attack,14,5,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_COLDBOLT,chase,14,5,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_SIGHTRASHER,attack,81,2,3000,0,10000,yes,self,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_QUAGMIRE,chase,92,5,3000,0,10000,yes,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_SAFETYWALL,attack,12,10,3000,0,10000,yes,self,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FIREBOLT,chase,19,4,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FIREBOLT,attack,19,4,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FIREWALL,chase,18,10,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FIREWALL,attack,18,10,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_LIGHTNINGBOLT,chase,20,4,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_LIGHTNINGBOLT,attack,20,4,3000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_FROSTNOVA,chase,88,10,3000,1000,10000,no,self,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_FROSTNOVA,attack,88,10,3000,1000,10000,no,self,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_METEOR,attack,83,11,3000,1500,10000,yes,target,myhpltmaxrate,50,,,,,,,
+2419,Wizard Kathryne@WZ_STORMGUST,attack,89,10,3000,1500,10000,yes,target,myhpltmaxrate,50,,,,,,,
+2419,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,10000,1000,10000,yes,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_JUPITEL,chase,84,28,10000,1000,10000,yes,target,always,0,,,,,,,
+2419,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,10000,1000,10000,no,target,always,0,,,,,,,
+2419,Wizard Kathryne@WZ_JUPITEL,chase,84,28,10000,1000,10000,no,target,always,0,,,,,,,
+2420,Priest Margaretha@PR_KYRIE,idle,73,10,10000,1000,10000,no,randomtarget,myhpltmaxrate,99,,,,,,,
+2420,Priest Margaretha@PR_KYRIE,chase,73,10,10000,1000,10000,no,target,myhpltmaxrate,100,,,,,,,
+2420,Priest Margaretha@PR_KYRIE,idle,73,10,10000,1000,10000,no,friend,friendhpltmaxrate,100,,,,,,,
+2420,Priest Margaretha@PR_KYRIE,chase,73,10,10000,1000,10000,no,friend,friendhpltmaxrate,100,,,,,,,
+2420,Priest Margaretha@AL_PNEUMA,idle,25,1,10000,0,0,yes,self,longrangeattacked,,,,,,,,
+2420,Priest Margaretha@AL_INCAGI,attack,29,1,2000,0,240000,yes,self,always,0,,,,,,2,
+2420,Priest Margaretha@AL_INCAGI,chase,29,1,2000,0,240000,yes,self,always,0,,,,,,2,
+2420,Priest Margaretha@AL_DECAGI,chase,30,48,2000,0,10000,yes,target,always,0,,,,,,,
+2420,Priest Margaretha@MG_SAFETYWALL,attack,12,10,1000,0,5000,yes,self,always,0,,,,,,,
+2420,Priest Margaretha@AL_PNEUMA,attack,25,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2420,Priest Margaretha@AL_PNEUMA,chase,25,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2420,Priest Margaretha@PR_LEXDIVINA,attack,76,5,2000,0,5000,yes,target,always,0,,,,,,18,
+2420,Priest Margaretha@PR_LEXDIVINA,chase,76,5,2000,0,5000,yes,target,always,0,,,,,,18,
+2420,Priest Margaretha@PR_LEXDIVINA,idle,76,5,10000,0,5000,yes,target,casttargeted,,,,,,,18,
+2420,Priest Margaretha@PR_LEXDIVINA,attack,76,5,5000,0,5000,yes,target,casttargeted,,,,,,,18,
+2420,Priest Margaretha@PR_LEXDIVINA,chase,76,5,5000,0,5000,yes,target,casttargeted,,,,,,,18,
+2420,Priest Margaretha@PR_LEXAETERNA,attack,78,1,1000,0,5000,yes,target,always,0,,,,,,29,
+2420,Priest Margaretha@PR_LEXAETERNA,chase,78,1,1000,0,5000,yes,target,always,0,,,,,,29,
+2420,Priest Margaretha@NPC_HOLYATTACK,attack,189,10,1000,0,5000,yes,target,always,0,,,,,,,
+2420,Priest Margaretha@AL_HEAL,attack,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2420,Priest Margaretha@AL_HEAL,attack,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2420,Priest Margaretha@AL_HEAL,idle,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2420,Priest Margaretha@AL_HEAL,idle,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2420,Priest Margaretha@AL_HEAL,chase,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2420,Priest Margaretha@AL_HEAL,chase,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2421,Crusader Egnigem@CR_SHIELDCHARGE,attack,250,5,2000,0,5000,no,target,always,0,,,,,,6,
+2421,Crusader Egnigem@CR_SHIELDBOOMERANG,idle,251,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2421,Crusader Egnigem@CR_SHIELDBOOMERANG,chase,251,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2421,Crusader Egnigem@CR_SHIELDBOOMERANG,follow,251,5,10000,0,0,yes,target,always,0,,,,,,6,
+2421,Crusader Egnigem@CR_DEFENDER,idle,257,3,10000,0,0,yes,self,longrangeattacked,,,,,,,,
+2421,Crusader Egnigem@CR_DEFENDER,chase,257,3,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2421,Crusader Egnigem@CR_DEFENDER,attack,257,3,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2421,Crusader Egnigem@CR_AUTOGUARD,chase,249,10,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
+2421,Crusader Egnigem@CR_AUTOGUARD,attack,249,10,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
+2421,Crusader Egnigem@CR_REFLECTSHIELD,attack,252,3,1000,0,200000,yes,self,always,0,,,,,,7,
+2421,Crusader Egnigem@CR_REFLECTSHIELD,chase,252,5,10000,0,300000,yes,self,always,0,,,,,,32,
+2421,Crusader Egnigem@CR_GRANDCROSS,attack,254,10,2000,500,2500,yes,self,always,0,,,,,,,
+2421,Crusader Egnigem@CR_HOLYCROSS,attack,253,10,2000,0,5000,yes,target,always,0,,,,,,,
+2421,Crusader Egnigem@AL_HEAL,idle,28,5,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2421,Crusader Egnigem@AL_HEAL,chase,28,5,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2422,Rogue Wickebine@TF_THROWSTONE,chase,152,1,10000,0,3000,yes,target,always,0,,,,,,,
+2422,Rogue Wickebine@TF_THROWSTONE,follow,152,1,10000,0,3000,yes,target,always,0,,,,,,,
+2422,Rogue Wickebine@NPC_POISON,attack,176,5,1000,800,5000,no,target,always,0,,,,,,,
+2422,Rogue Wickebine@RG_STRIPWEAPON,attack,215,5,500,0,10000,yes,target,always,0,,,,,,18,
+2422,Rogue Wickebine@RG_STRIPARMOR,attack,217,5,500,0,10000,yes,target,always,0,,,,,,18,
+2422,Rogue Wickebine@RG_STRIPSHIELD,attack,216,5,500,0,10000,yes,target,always,0,,,,,,17,
+2422,Rogue Wickebine@RG_STRIPHELM,attack,218,5,500,0,10000,yes,target,always,0,,,,,,,
+2422,Rogue Wickebine@RG_INTIMIDATE,attack,219,10,2000,0,60000,no,target,always,0,,,,,,,
+2422,Rogue Wickebine@RG_CLOSECONFINE,attack,1005,1,1000,0,30000,yes,target,always,0,,,,,,,
+2422,Rogue Wickebine@NPC_POISONATTACK,attack,188,5,1000,0,5000,yes,target,always,0,,,,,,,
+2423,Alchemist Armeyer@ITM_TOMAHAWK,idle,337,1,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2423,Alchemist Armeyer@ITM_TOMAHAWK,chase,337,1,10000,0,0,yes,target,skillused,18,,,,,,6,
+2423,Alchemist Armeyer@ITM_TOMAHAWK,follow,337,1,10000,0,0,yes,target,always,0,,,,,,6,
+2423,Alchemist Armeyer@BS_ADRENALINE,attack,111,10,2000,0,150000,yes,self,always,0,,,,,,,
+2423,Alchemist Armeyer@MC_MAMMONITE,attack,42,22,2000,0,5000,yes,target,always,0,,,,,,23,
+2423,Alchemist Armeyer@AM_DEMONSTRATION,chase,229,5,5000,0,2000,yes,target,always,0,,,,,,6,
+2423,Alchemist Armeyer@AM_DEMONSTRATION,attack,229,5,5000,0,2000,yes,target,always,0,,,,,,6,
+2423,Alchemist Armeyer@AM_POTIONPITCHER,idle,231,4,10000,0,0,yes,friend,friendhpltmaxrate,90,,,,,,2,
+2423,Alchemist Armeyer@AM_POTIONPITCHER,attack,231,4,10000,0,0,yes,friend,friendhpltmaxrate,90,,,,,,2,
+2423,Alchemist Armeyer@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,29,
+2424,Bard Kavach@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2424,Bard Kavach@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2424,Bard Kavach@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,,
+2424,Bard Kavach@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2424,Bard Kavach@BA_FROSTJOKER,idle,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2424,Bard Kavach@BA_FROSTJOKER,chase,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2424,Bard Kavach@BA_FROSTJOKER,follow,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2424,Bard Kavach@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2425,Dancer Josephina@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2425,Dancer Josephina@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2425,Dancer Josephina@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,,
+2425,Dancer Josephina@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2425,Dancer Josephina@DC_SCREAM,idle,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2425,Dancer Josephina@DC_SCREAM,chase,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2425,Dancer Josephina@DC_SCREAM,follow,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2425,Dancer Josephina@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2426,Sage Laurell@MG_SOULSTRIKE,idle,13,10,10000,0,1000,yes,randomtarget,always,0,,,,,,,
+2426,Sage Laurell@MG_SOULSTRIKE,attack,13,10,5000,0,1000,yes,target,always,0,,,,,,,
+2426,Sage Laurell@MG_SOULSTRIKE,chase,13,10,3000,500,5000,yes,target,always,0,,,,,,,
+2426,Sage Laurell@MG_SAFETYWALL,attack,12,10,1000,0,5000,yes,self,always,0,,,,,,,
+2426,Sage Laurell@SA_SPELLBREAKER,attack,277,5,1000,0,10000,yes,target,casttargeted,,,,,,,,
+2426,Sage Laurell@SA_DISPELL,attack,289,1,200,0,10000,yes,target,always,0,,,,,,18,
+2426,Sage Laurell@MG_THUNDERSTORM,attack,21,20,1000,1500,5000,no,target,always,0,,,,,,,
+2426,Sage Laurell@SA_LANDPROTECTOR,attack,288,1,3000,500,10000,no,target,myhpltmaxrate,80,,,,,,32,
+2426,Sage Laurell@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,,
+2426,Sage Laurell@NPC_MENTALBREAKER,chase,159,3,500,800,5000,no,target,always,0,,,,,,,
+2426,Sage Laurell@SA_LANDPROTECTOR,chase,288,1,3000,500,10000,yes,target,always,0,,,,,,,
+2426,Sage Laurell@SA_LANDPROTECTOR,chase,288,1,3000,500,10000,no,target,always,0,,,,,,,
+2427,Monk Errende@MO_FINGEROFFENSIVE,idle,267,3,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2427,Monk Errende@MO_FINGEROFFENSIVE,chase,267,3,10000,0,0,yes,target,skillused,18,,,,,,6,
+2427,Monk Errende@MO_FINGEROFFENSIVE,follow,267,3,10000,0,0,yes,target,always,0,,,,,,6,
+2427,Monk Errende@MO_TRIPLEATTACK,attack,263,5,1000,0,0,yes,target,always,0,,,,,,,
+2427,Monk Errende@MO_INVESTIGATE,attack,266,5,1000,0,0,yes,target,always,0,,,,,,,
+2427,Monk Errende@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,,
+2427,Monk Errende@MO_BODYRELOCATION,walk,264,1,2000,500,5000,no,target,always,0,,,,,,,
+2427,Monk Errende@MO_EXTREMITYFIST,attack,271,5,100,1500,15000,no,target,myhpltmaxrate,50,,,,,,32,
+2427,Monk Errende@MO_EXTREMITYFIST,attack,271,5,50,1500,15000,no,target,always,0,,,,,,,
+2428,Knight Seyren@KN_SPEARBOOMERANG,idle,59,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2428,Knight Seyren@KN_SPEARBOOMERANG,chase,59,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2428,Knight Seyren@KN_SPEARBOOMERANG,follow,59,5,10000,0,0,yes,target,always,0,,,,,,6,
+2428,Knight Seyren@KN_TWOHANDQUICKEN,attack,60,30,10000,0,300000,yes,self,always,0,,,,,,2,
+2428,Knight Seyren@KN_BOWLINGBASH,attack,62,5,1000,0,10000,yes,target,always,0,,,,,,,
+2428,Knight Seyren@SM_BASH,attack,5,10,1000,0,5000,yes,target,always,0,,,,,,,
+2428,Knight Seyren@KN_PIERCE,attack,56,10,1000,0,5000,yes,target,always,0,,,,,,,
+2428,Knight Seyren@SM_MAGNUM,attack,7,25,1000,0,0,yes,self,attackpcge,2,,,,,,,
+2428,Knight Seyren@SM_PROVOKE,attack,6,5,1000,0,300000,yes,target,always,0,,,,,,29,
+2428,Knight Seyren@SM_PROVOKE,chase,6,5,1000,0,5000,yes,target,always,0,,,,,,29,
+2428,Knight Seyren@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,yes,target,always,0,,,,,,,
+2428,Knight Seyren@NPC_STUNATTACK,attack,179,5,2000,0,5000,yes,target,always,0,,,,,,,
+2428,Knight Seyren@NPC_FIREATTACK,attack,186,5,2000,0,5000,yes,target,always,0,,,,,,9,
+2429,Assassin Eremes@AS_CLOAKING,attack,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2429,Assassin Eremes@AS_CLOAKING,idle,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2429,Assassin Eremes@AS_CLOAKING,chase,135,3,2000,200,5000,yes,self,always,0,,,,,,,
+2429,Assassin Eremes@AS_GRIMTOOTH,idle,137,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2429,Assassin Eremes@AS_SONICBLOW,attack,136,10,2000,0,5000,yes,target,always,0,,,,,,6,
+2429,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,2000,0,0,yes,target,always,0,,,,,,,
+2429,Assassin Eremes@AS_VENOMDUST,idle,140,10,2000,0,50000,yes,randomtarget,always,0,,,,,,29,
+2429,Assassin Eremes@AS_VENOMDUST,attack,140,10,2000,0,50000,yes,target,always,0,,,,,,29,
+2429,Assassin Eremes@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2429,Assassin Eremes@NPC_STUNATTACK,attack,179,5,1000,0,5000,yes,target,always,0,,,,,,,
+2429,Assassin Eremes@NPC_POISONATTACK,attack,188,5,1000,0,5000,yes,target,always,0,,,,,,,
+2429,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,10000,0,0,no,target,skillused,18,,,,,,6,
+2429,Assassin Eremes@AS_GRIMTOOTH,chase,137,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2430,Blacksmith Howard@BS_ADRENALINE,attack,111,10,2000,0,150000,yes,self,always,0,,,,,,,
+2430,Blacksmith Howard@BS_MAXIMIZE,attack,114,1,1000,0,60000,yes,self,always,0,,,,,,,
+2430,Blacksmith Howard@MC_MAMMONITE,attack,42,22,2000,0,5000,yes,target,always,0,,,,,,23,
+2430,Blacksmith Howard@BS_HAMMERFALL,chase,110,5,2000,0,5000,yes,target,always,0,,,,,,,
+2430,Blacksmith Howard@BS_HAMMERFALL,attack,110,5,2000,0,5000,yes,target,always,0,,,,,,,
+2430,Blacksmith Howard@NPC_ARMORBRAKE,attack,344,10,1000,0,5000,yes,target,always,0,,,,,,19,
+2430,Blacksmith Howard@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2430,Blacksmith Howard@NPC_FIREATTACK,attack,186,5,1000,0,5000,yes,target,always,0,,,,,,,
+2430,Blacksmith Howard@NPC_WATERATTACK,attack,184,5,1000,0,5000,yes,target,always,0,,,,,,,
+2431,Hunter Cecil@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2431,Hunter Cecil@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2431,Hunter Cecil@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,6,
+2431,Hunter Cecil@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2431,Hunter Cecil@HT_SKIDTRAP,idle,115,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@HT_SKIDTRAP,attack,115,5,500,0,5000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@HT_FLASHER,idle,120,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@HT_FLASHER,attack,120,5,500,0,5000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@HT_FREEZINGTRAP,idle,121,5,2000,0,60000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@HT_FREEZINGTRAP,attack,121,5,500,0,5000,yes,around2,always,0,,,,,,,
+2431,Hunter Cecil@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2431,Hunter Cecil@NPC_STUNATTACK,attack,179,5,1000,0,5000,yes,target,always,0,,,,,,,
+2431,Hunter Cecil@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_SIGHT,idle,10,1,2000,0,5000,yes,self,always,0,,,,,,,
+2432,Wizard Kathryne@MG_SIGHT,idle,10,1,10000,0,5000,yes,self,skillused,137,,,,,,,
+2432,Wizard Kathryne@MG_FROSTDIVER,idle,15,1,10000,1000,10000,no,randomtarget,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_JUPITEL,idle,84,28,10000,1000,10000,no,randomtarget,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FROSTDIVER,attack,15,1,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_JUPITEL,attack,84,28,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_JUPITEL,chase,84,28,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_COLDBOLT,attack,14,5,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_COLDBOLT,chase,14,5,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_SIGHTRASHER,attack,81,2,3000,0,10000,yes,self,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_QUAGMIRE,chase,92,5,3000,0,10000,yes,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_SAFETYWALL,attack,12,10,3000,0,10000,yes,self,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FIREBOLT,chase,19,4,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FIREBOLT,attack,19,4,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FIREWALL,chase,18,10,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FIREWALL,attack,18,10,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_LIGHTNINGBOLT,chase,20,4,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_LIGHTNINGBOLT,attack,20,4,3000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_FROSTNOVA,chase,88,10,3000,1000,10000,no,self,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_FROSTNOVA,attack,88,10,3000,1000,10000,no,self,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_METEOR,attack,83,11,3000,1500,10000,yes,target,myhpltmaxrate,50,,,,,,,
+2432,Wizard Kathryne@WZ_STORMGUST,attack,89,10,3000,1500,10000,yes,target,myhpltmaxrate,50,,,,,,,
+2432,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,10000,1000,10000,yes,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_JUPITEL,chase,84,28,10000,1000,10000,yes,target,always,0,,,,,,,
+2432,Wizard Kathryne@MG_FROSTDIVER,chase,15,1,10000,1000,10000,no,target,always,0,,,,,,,
+2432,Wizard Kathryne@WZ_JUPITEL,chase,84,28,10000,1000,10000,no,target,always,0,,,,,,,
+2433,Priest Margaretha@PR_KYRIE,idle,73,10,10000,1000,10000,no,randomtarget,myhpltmaxrate,99,,,,,,,
+2433,Priest Margaretha@PR_KYRIE,chase,73,10,10000,1000,10000,no,target,myhpltmaxrate,100,,,,,,,
+2433,Priest Margaretha@PR_KYRIE,idle,73,10,10000,1000,10000,no,friend,friendhpltmaxrate,100,,,,,,,
+2433,Priest Margaretha@PR_KYRIE,chase,73,10,10000,1000,10000,no,friend,friendhpltmaxrate,100,,,,,,,
+2433,Priest Margaretha@AL_PNEUMA,idle,25,1,10000,0,0,yes,self,longrangeattacked,,,,,,,,
+2433,Priest Margaretha@AL_INCAGI,attack,29,1,2000,0,240000,yes,self,always,0,,,,,,2,
+2433,Priest Margaretha@AL_INCAGI,chase,29,1,2000,0,240000,yes,self,always,0,,,,,,2,
+2433,Priest Margaretha@AL_DECAGI,chase,30,48,2000,0,10000,yes,target,always,0,,,,,,,
+2433,Priest Margaretha@MG_SAFETYWALL,attack,12,10,1000,0,5000,yes,self,always,0,,,,,,,
+2433,Priest Margaretha@AL_PNEUMA,attack,25,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2433,Priest Margaretha@AL_PNEUMA,chase,25,1,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2433,Priest Margaretha@PR_LEXDIVINA,attack,76,5,2000,0,5000,yes,target,always,0,,,,,,18,
+2433,Priest Margaretha@PR_LEXDIVINA,chase,76,5,2000,0,5000,yes,target,always,0,,,,,,18,
+2433,Priest Margaretha@PR_LEXDIVINA,idle,76,5,10000,0,5000,yes,target,casttargeted,,,,,,,18,
+2433,Priest Margaretha@PR_LEXDIVINA,attack,76,5,5000,0,5000,yes,target,casttargeted,,,,,,,18,
+2433,Priest Margaretha@PR_LEXDIVINA,chase,76,5,5000,0,5000,yes,target,casttargeted,,,,,,,18,
+2433,Priest Margaretha@PR_LEXAETERNA,attack,78,1,1000,0,5000,yes,target,always,0,,,,,,29,
+2433,Priest Margaretha@PR_LEXAETERNA,chase,78,1,1000,0,5000,yes,target,always,0,,,,,,29,
+2433,Priest Margaretha@NPC_HOLYATTACK,attack,189,10,1000,0,5000,yes,target,always,0,,,,,,,
+2433,Priest Margaretha@AL_HEAL,attack,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2433,Priest Margaretha@AL_HEAL,attack,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2433,Priest Margaretha@AL_HEAL,idle,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2433,Priest Margaretha@AL_HEAL,idle,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2433,Priest Margaretha@AL_HEAL,chase,28,11,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2433,Priest Margaretha@AL_HEAL,chase,28,11,3000,0,2000,yes,self,myhpltmaxrate,99,,,,,,3,
+2434,Crusader Egnigem@CR_SHIELDCHARGE,attack,250,5,2000,0,5000,no,target,always,0,,,,,,6,
+2434,Crusader Egnigem@CR_SHIELDBOOMERANG,idle,251,5,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2434,Crusader Egnigem@CR_SHIELDBOOMERANG,chase,251,5,10000,0,0,yes,target,skillused,18,,,,,,6,
+2434,Crusader Egnigem@CR_SHIELDBOOMERANG,follow,251,5,10000,0,0,yes,target,always,0,,,,,,6,
+2434,Crusader Egnigem@CR_DEFENDER,idle,257,3,10000,0,0,yes,self,longrangeattacked,,,,,,,,
+2434,Crusader Egnigem@CR_DEFENDER,chase,257,3,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2434,Crusader Egnigem@CR_DEFENDER,attack,257,3,5000,0,10000,yes,self,longrangeattacked,,,,,,,19,
+2434,Crusader Egnigem@CR_AUTOGUARD,chase,249,10,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
+2434,Crusader Egnigem@CR_AUTOGUARD,attack,249,10,2000,0,300000,yes,self,longrangeattacked,,,,,,,,
+2434,Crusader Egnigem@CR_REFLECTSHIELD,attack,252,3,1000,0,200000,yes,self,always,0,,,,,,7,
+2434,Crusader Egnigem@CR_REFLECTSHIELD,chase,252,5,10000,0,300000,yes,self,always,0,,,,,,32,
+2434,Crusader Egnigem@CR_GRANDCROSS,attack,254,10,2000,500,2500,yes,self,always,0,,,,,,,
+2434,Crusader Egnigem@CR_HOLYCROSS,attack,253,10,2000,0,5000,yes,target,always,0,,,,,,,
+2434,Crusader Egnigem@AL_HEAL,idle,28,5,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2434,Crusader Egnigem@AL_HEAL,chase,28,5,3000,0,2000,yes,friend,friendhpltmaxrate,99,,,,,,3,
+2435,Rogue Wickebine@TF_THROWSTONE,chase,152,1,10000,0,3000,yes,target,always,0,,,,,,,
+2435,Rogue Wickebine@TF_THROWSTONE,follow,152,1,10000,0,3000,yes,target,always,0,,,,,,,
+2435,Rogue Wickebine@NPC_POISON,attack,176,5,1000,800,5000,no,target,always,0,,,,,,,
+2435,Rogue Wickebine@RG_STRIPWEAPON,attack,215,5,500,0,10000,yes,target,always,0,,,,,,18,
+2435,Rogue Wickebine@RG_STRIPARMOR,attack,217,5,500,0,10000,yes,target,always,0,,,,,,18,
+2435,Rogue Wickebine@RG_STRIPSHIELD,attack,216,5,500,0,10000,yes,target,always,0,,,,,,17,
+2435,Rogue Wickebine@RG_STRIPHELM,attack,218,5,500,0,10000,yes,target,always,0,,,,,,,
+2435,Rogue Wickebine@RG_INTIMIDATE,attack,219,10,2000,0,60000,no,target,always,0,,,,,,,
+2435,Rogue Wickebine@RG_CLOSECONFINE,attack,1005,1,1000,0,30000,yes,target,always,0,,,,,,,
+2435,Rogue Wickebine@NPC_POISONATTACK,attack,188,5,1000,0,5000,yes,target,always,0,,,,,,,
+2436,Alchemist Armeyer@ITM_TOMAHAWK,idle,337,1,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2436,Alchemist Armeyer@ITM_TOMAHAWK,chase,337,1,10000,0,0,yes,target,skillused,18,,,,,,6,
+2436,Alchemist Armeyer@ITM_TOMAHAWK,follow,337,1,10000,0,0,yes,target,always,0,,,,,,6,
+2436,Alchemist Armeyer@BS_ADRENALINE,attack,111,10,2000,0,150000,yes,self,always,0,,,,,,,
+2436,Alchemist Armeyer@MC_MAMMONITE,attack,42,22,2000,0,5000,yes,target,always,0,,,,,,23,
+2436,Alchemist Armeyer@AM_DEMONSTRATION,chase,229,5,5000,0,2000,yes,target,always,0,,,,,,6,
+2436,Alchemist Armeyer@AM_DEMONSTRATION,attack,229,5,5000,0,2000,yes,target,always,0,,,,,,6,
+2436,Alchemist Armeyer@AM_POTIONPITCHER,idle,231,4,10000,0,0,yes,friend,friendhpltmaxrate,90,,,,,,2,
+2436,Alchemist Armeyer@AM_POTIONPITCHER,attack,231,4,10000,0,0,yes,friend,friendhpltmaxrate,90,,,,,,2,
+2436,Alchemist Armeyer@NPC_CRITICALSLASH,attack,170,1,500,500,5000,no,target,always,0,,,,,,29,
+2437,Bard Kavach@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2437,Bard Kavach@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2437,Bard Kavach@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,,
+2437,Bard Kavach@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2437,Bard Kavach@BA_FROSTJOKER,idle,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2437,Bard Kavach@BA_FROSTJOKER,chase,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2437,Bard Kavach@BA_FROSTJOKER,follow,318,3,100,0,5000,yes,self,always,0,,,,,,,
+2437,Bard Kavach@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2438,Dancer Josephina@AC_DOUBLE,attack,46,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2438,Dancer Josephina@AC_SHOWER,attack,47,10,2000,0,3000,yes,target,always,0,,,,,,6,
+2438,Dancer Josephina@AC_CHARGEARROW,attack,148,1,2000,0,3000,yes,target,always,0,,,,,,,
+2438,Dancer Josephina@NPC_RUN,follow,354,1,10000,0,5000,no,self,always,0,,,,,,22,
+2438,Dancer Josephina@DC_SCREAM,idle,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2438,Dancer Josephina@DC_SCREAM,chase,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2438,Dancer Josephina@DC_SCREAM,follow,326,3,100,0,5000,yes,self,always,0,,,,,,,
+2438,Dancer Josephina@NPC_WINDATTACK,attack,187,5,1000,0,5000,yes,target,always,0,,,,,,,
+2439,Sage Laurell@MG_SOULSTRIKE,idle,13,10,10000,0,1000,yes,randomtarget,always,0,,,,,,,
+2439,Sage Laurell@MG_SOULSTRIKE,attack,13,10,5000,0,1000,yes,target,always,0,,,,,,,
+2439,Sage Laurell@MG_SOULSTRIKE,chase,13,10,3000,500,5000,yes,target,always,0,,,,,,,
+2439,Sage Laurell@MG_SAFETYWALL,attack,12,10,1000,0,5000,yes,self,always,0,,,,,,,
+2439,Sage Laurell@SA_SPELLBREAKER,attack,277,5,1000,0,10000,yes,target,casttargeted,,,,,,,,
+2439,Sage Laurell@SA_DISPELL,attack,289,1,200,0,10000,yes,target,always,0,,,,,,18,
+2439,Sage Laurell@MG_THUNDERSTORM,attack,21,20,1000,1500,5000,no,target,always,0,,,,,,,
+2439,Sage Laurell@SA_LANDPROTECTOR,attack,288,1,3000,500,10000,no,target,myhpltmaxrate,80,,,,,,32,
+2439,Sage Laurell@NPC_MENTALBREAKER,attack,159,3,500,800,5000,no,target,always,0,,,,,,,
+2439,Sage Laurell@NPC_MENTALBREAKER,chase,159,3,500,800,5000,no,target,always,0,,,,,,,
+2439,Sage Laurell@SA_LANDPROTECTOR,chase,288,1,3000,500,10000,yes,target,always,0,,,,,,,
+2439,Sage Laurell@SA_LANDPROTECTOR,chase,288,1,3000,500,10000,no,target,always,0,,,,,,,
+2440,Monk Errende@MO_FINGEROFFENSIVE,idle,267,3,10000,0,0,yes,randomtarget,always,0,,,,,,6,
+2440,Monk Errende@MO_FINGEROFFENSIVE,chase,267,3,10000,0,0,yes,target,skillused,18,,,,,,6,
+2440,Monk Errende@MO_FINGEROFFENSIVE,follow,267,3,10000,0,0,yes,target,always,0,,,,,,6,
+2440,Monk Errende@MO_TRIPLEATTACK,attack,263,5,1000,0,0,yes,target,always,0,,,,,,,
+2440,Monk Errende@MO_INVESTIGATE,attack,266,5,1000,0,0,yes,target,always,0,,,,,,,
+2440,Monk Errende@MO_BODYRELOCATION,chase,264,1,2000,500,5000,no,target,always,0,,,,,,,
+2440,Monk Errende@MO_BODYRELOCATION,walk,264,1,2000,500,5000,no,target,always,0,,,,,,,
+2440,Monk Errende@MO_EXTREMITYFIST,attack,271,5,100,1500,15000,no,target,myhpltmaxrate,50,,,,,,32,
+2440,Monk Errende@MO_EXTREMITYFIST,attack,271,5,50,1500,15000,no,target,always,0,,,,,,,
+2441,The Last One@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
+2441,The Last One@AL_TELEPORT,walk,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,
+2441,The Last One@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,yes,target,always,0,,,,,,,
+2441,The Last One@NPC_POWERUP,attack,349,5,10000,0,30000,yes,self,myhpltmaxrate,50,,,,,,6,
+2441,The Last One@NPC_AGIUP,attack,350,5,10000,0,30000,yes,self,myhpltmaxrate,30,,,,,,6,
+2441,The Last One@KN_TWOHANDQUICKEN,attack,60,30,10000,0,120000,yes,self,myhpltmaxrate,30,,,,,,6,
+2441,The Last One@NPC_HELLJUDGEMENT,attack,662,5,10000,700,15000,no,self,always,0,,,,,,,
+2441,The Last One@NPC_CALLSLAVE,attack,352,1,10000,0,10000,yes,self,always,0,,,,,,,
+2441,The Last One@NPC_CALLSLAVE,idle,352,1,10000,0,10000,yes,self,always,0,,,,,,,
+2441,The Last One@NPC_SUMMONSLAVE,attack,196,1,10000,700,10000,no,self,slavele,3,2428,,,,,,
+2441,The Last One@NPC_SUMMONSLAVE,idle,196,1,10000,700,10000,no,self,slavele,3,2428,,,,,,
+2442,King of the Alley@AL_TELEPORT,idle,26,1,10000,0,0,yes,self,rudeattacked,,,,,,,,
+2442,King of the Alley@AL_TELEPORT,walk,26,1,5000,0,5000,yes,self,rudeattacked,,,,,,,,
+2442,King of the Alley@NPC_WIDESILENCE,attack,663,5,10000,1000,20000,no,self,myhpltmaxrate,80,,,,,,32,
+2442,King of the Alley@NPC_WIDESILENCE,chase,663,5,10000,1000,20000,no,self,always,0,,,,,,18,
+2442,King of the Alley@WZ_STORMGUST,attack,89,10,2000,500,5000,no,target,always,0,,,,,,21,
+2442,King of the Alley@WZ_STORMGUST,chase,89,10,10000,500,5000,no,target,always,0,,,,,,21,
+2442,King of the Alley@NPC_EARTHQUAKE,attack,653,5,10000,1500,30000,no,self,myhpltmaxrate,80,,,,,,32,
+2442,King of the Alley@NPC_EARTHQUAKE,chase,653,5,10000,1500,30000,no,self,myhpltmaxrate,80,,,,,,32,
+2442,King of the Alley@MG_SAFETYWALL,attack,12,10,1000,0,5000,no,self,always,0,,,,,,,
+2442,King of the Alley@HW_GANBANTEIN,attack,483,1,10000,500,7000,no,target,always,0,,,,,,,
+2442,King of the Alley@NPC_WIDESLEEP,attack,668,5,10000,1000,20000,no,self,always,0,,,,,,,
+2442,King of the Alley@NPC_WIDESLEEP,chase,668,5,10000,1000,20000,no,self,always,0,,,,,,,
+2442,King of the Alley@NPC_CALLSLAVE,attack,352,1,10000,0,10000,yes,self,always,0,,,,,,,
+2442,King of the Alley@NPC_CALLSLAVE,idle,352,1,10000,0,10000,yes,self,always,0,,,,,,,
+2442,King of the Alley@NPC_SUMMONSLAVE,attack,196,1,10000,700,10000,no,self,slavele,3,2434,,,,,,
+2442,King of the Alley@NPC_SUMMONSLAVE,idle,196,1,10000,700,10000,no,self,slavele,3,2434,,,,,,
+2442,King of the Alley@WZ_JUPITEL,attack,84,28,5000,0,0,yes,target,always,0,,,,,,,
+2442,King of the Alley@WZ_JUPITEL,chase,84,28,5000,0,0,yes,target,always,0,,,,,,,
+2442,King of the Alley@WZ_JUPITEL,attack,84,28,5000,0,0,no,target,always,0,,,,,,,
+2442,King of the Alley@WZ_JUPITEL,chase,84,28,5000,0,0,no,target,always,0,,,,,,,
+2443,Aira@KN_SPEARBOOMERANG,idle,59,5,10000,0,0,no,randomtarget,always,0,,,,,,6,
+2443,Aira@KN_SPEARBOOMERANG,chase,59,5,10000,0,0,no,target,skillused,18,,,,,,6,
+2443,Aira@KN_SPEARBOOMERANG,follow,59,5,10000,0,0,no,target,always,0,,,,,,6,
+2443,Aira@KN_TWOHANDQUICKEN,attack,60,30,10000,0,300000,no,self,always,0,,,,,,2,
+2443,Aira@KN_BOWLINGBASH,attack,62,5,1000,0,10000,no,target,always,0,,,,,,,
+2443,Aira@SM_BASH,attack,5,10,1000,0,5000,no,target,always,0,,,,,,,
+2443,Aira@KN_PIERCE,attack,56,10,1000,0,5000,no,target,always,0,,,,,,,
+2443,Aira@SM_MAGNUM,attack,7,25,1000,0,0,no,self,attackpcge,2,,,,,,,
+2443,Aira@SM_PROVOKE,attack,6,5,1000,0,300000,no,target,always,0,,,,,,29,
+2443,Aira@SM_PROVOKE,chase,6,5,1000,0,5000,no,target,always,0,,,,,,29,
+2443,Aira@NPC_CRITICALSLASH,attack,170,1,2000,0,5000,no,target,always,0,,,,,,,
+2443,Aira@NPC_STUNATTACK,attack,179,5,2000,0,5000,no,target,always,0,,,,,,,
+2443,Aira@NPC_FIREATTACK,attack,186,5,2000,0,5000,no,target,always,0,,,,,,9,
+2444,Kuluna@MG_SOULSTRIKE,idle,13,10,10000,0,1000,no,randomtarget,always,0,,,,,,,
+2444,Kuluna@MG_SOULSTRIKE,attack,13,10,5000,0,1000,no,target,always,0,,,,,,,
+2444,Kuluna@MG_SOULSTRIKE,chase,13,10,3000,500,5000,no,target,always,0,,,,,,,
+2444,Kuluna@MG_SAFETYWALL,attack,12,10,1000,0,5000,no,self,always,0,,,,,,,
+2444,Kuluna@SA_SPELLBREAKER,attack,277,5,1000,0,10000,no,target,casttargeted,,,,,,,,
+2444,Kuluna@SA_DISPELL,attack,289,1,200,0,10000,no,target,always,0,,,,,,18,
+2444,Kuluna@MG_THUNDERSTORM,attack,21,20,1000,1500,5000,yes,target,always,0,,,,,,,
+2444,Kuluna@SA_LANDPROTECTOR,attack,288,1,3000,500,10000,yes,target,myhpltmaxrate,80,,,,,,32,
+2444,Kuluna@SA_LANDPROTECTOR,chase,288,1,3000,500,10000,yes,target,always,0,,,,,,,
+2444,Kuluna@NPC_MENTALBREAKER,attack,159,3,500,800,5000,yes,target,always,0,,,,,,,
+2444,Kuluna@NPC_MENTALBREAKER,chase,159,3,500,800,5000,yes,target,always,0,,,,,,,
+2445,Mallina@ITM_TOMAHAWK,idle,337,1,10000,0,0,no,randomtarget,always,0,,,,,,6,
+2445,Mallina@ITM_TOMAHAWK,chase,337,1,10000,0,0,no,target,skillused,18,,,,,,6,
+2445,Mallina@ITM_TOMAHAWK,follow,337,1,10000,0,0,no,target,always,0,,,,,,6,
+2445,Mallina@BS_ADRENALINE,attack,111,10,2000,0,150000,no,self,always,0,,,,,,,
+2445,Mallina@MC_MAMMONITE,attack,42,22,2000,0,5000,no,target,always,0,,,,,,23,
+2445,Mallina@AM_DEMONSTRATION,chase,229,5,5000,0,2000,no,target,always,0,,,,,,6,
+2445,Mallina@AM_DEMONSTRATION,attack,229,5,5000,0,2000,no,target,always,0,,,,,,6,
+2445,Mallina@AM_POTIONPITCHER,idle,231,4,10000,0,0,no,friend,friendhpltmaxrate,90,,,,,,2,
+2445,Mallina@AM_POTIONPITCHER,attack,231,4,10000,0,0,no,friend,friendhpltmaxrate,90,,,,,,2,
+2445,Mallina@NPC_CRITICALSLASH,attack,170,1,500,500,5000,yes,target,always,0,,,,,,29,
+2446,Ezella@AC_DOUBLE,attack,46,10,2000,0,3000,no,target,always,0,,,,,,6,
+2446,Ezella@AC_SHOWER,attack,47,10,2000,0,3000,no,target,always,0,,,,,,6,
+2446,Ezella@AC_CHARGEARROW,attack,148,1,2000,0,3000,no,target,always,0,,,,,,6,
+2446,Ezella@NPC_RUN,follow,354,1,10000,0,5000,yes,self,always,0,,,,,,22,
+2446,Ezella@HT_SKIDTRAP,idle,115,5,2000,0,60000,no,around2,always,0,,,,,,,
+2446,Ezella@HT_SKIDTRAP,attack,115,5,500,0,5000,no,around2,always,0,,,,,,,
+2446,Ezella@HT_FLASHER,idle,120,5,2000,0,60000,no,around2,always,0,,,,,,,
+2446,Ezella@HT_FLASHER,attack,120,5,500,0,5000,no,around2,always,0,,,,,,,
+2446,Ezella@HT_FREEZINGTRAP,idle,121,5,2000,0,60000,no,around2,always,0,,,,,,,
+2446,Ezella@HT_FREEZINGTRAP,attack,121,5,500,0,5000,no,around2,always,0,,,,,,,
+2446,Ezella@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,no,target,always,0,,,,,,,
+2446,Ezella@NPC_STUNATTACK,attack,179,5,1000,0,5000,no,target,always,0,,,,,,,
+2446,Ezella@NPC_WINDATTACK,attack,187,5,1000,0,5000,no,target,always,0,,,,,,,
+2447,Lune@BS_ADRENALINE,attack,111,10,2000,0,150000,no,self,always,0,,,,,,,
+2447,Lune@BS_MAXIMIZE,attack,114,1,1000,0,60000,no,self,always,0,,,,,,,
+2447,Lune@MC_MAMMONITE,attack,42,22,2000,0,5000,no,target,always,0,,,,,,23,
+2447,Lune@BS_HAMMERFALL,chase,110,5,2000,0,5000,no,target,always,0,,,,,,,
+2447,Lune@BS_HAMMERFALL,attack,110,5,2000,0,5000,no,target,always,0,,,,,,,
+2447,Lune@NPC_ARMORBRAKE,attack,344,10,1000,0,5000,no,target,always,0,,,,,,19,
+2447,Lune@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,no,target,always,0,,,,,,,
+2447,Lune@NPC_FIREATTACK,attack,186,5,1000,0,5000,no,target,always,0,,,,,,,
+2447,Lune@NPC_WATERATTACK,attack,184,5,1000,0,5000,no,target,always,0,,,,,,,
+2448,Morin@AS_CLOAKING,attack,135,3,2000,200,5000,no,self,always,0,,,,,,,
+2448,Morin@AS_CLOAKING,idle,135,3,2000,200,5000,no,self,always,0,,,,,,,
+2448,Morin@AS_CLOAKING,chase,135,3,2000,200,5000,no,self,always,0,,,,,,,
+2448,Morin@AS_GRIMTOOTH,idle,137,5,10000,0,0,no,randomtarget,always,0,,,,,,6,
+2448,Morin@AS_GRIMTOOTH,chase,137,5,10000,0,0,no,target,skillused,18,,,,,,6,
+2448,Morin@AS_SONICBLOW,attack,136,10,2000,0,5000,no,target,always,0,,,,,,6,
+2448,Morin@AS_GRIMTOOTH,chase,137,5,2000,0,0,no,target,always,0,,,,,,,
+2448,Morin@AS_VENOMDUST,idle,140,10,2000,0,50000,no,randomtarget,always,0,,,,,,29,
+2448,Morin@AS_VENOMDUST,attack,140,10,2000,0,50000,no,target,always,0,,,,,,29,
+2448,Morin@NPC_CRITICALSLASH,attack,170,1,1000,0,5000,no,target,always,0,,,,,,,
+2448,Morin@NPC_STUNATTACK,attack,179,5,1000,0,5000,no,target,always,0,,,,,,,
+2448,Morin@NPC_POISONATTACK,attack,188,5,1000,0,5000,no,target,always,0,,,,,,,
+2449,Nasarin@TF_THROWSTONE,chase,152,1,10000,0,3000,no,target,always,0,,,,,,,
+2449,Nasarin@TF_THROWSTONE,follow,152,1,10000,0,3000,no,target,always,0,,,,,,,
+2449,Nasarin@NPC_POISON,attack,176,5,1000,800,5000,yes,target,always,0,,,,,,,
+2449,Nasarin@RG_STRIPWEAPON,attack,215,5,500,0,10000,no,target,always,0,,,,,,18,
+2449,Nasarin@RG_STRIPARMOR,attack,217,5,500,0,10000,no,target,always,0,,,,,,18,
+2449,Nasarin@RG_STRIPSHIELD,attack,216,5,500,0,10000,no,target,always,0,,,,,,17,
+2449,Nasarin@RG_STRIPHELM,attack,218,5,500,0,10000,no,target,always,0,,,,,,,
+2449,Nasarin@RG_INTIMIDATE,attack,219,10,2000,0,60000,yes,target,always,0,,,,,,,
+2449,Nasarin@RG_CLOSECONFINE,attack,1005,1,1000,0,30000,no,target,always,0,,,,,,,
+2449,Nasarin@NPC_POISONATTACK,attack,188,5,1000,0,5000,no,target,always,0,,,,,,,
+
 // Old Glast Heim (currently placeholders)
 2464,MG Zombie@AL_HEAL,idle,28,10,10000,0,5000,yes,self,always,0,,,,,,,26
 2464,MG Zombie@NPC_UNDEADATTACK,chase,347,10,8000,1000,5000,yes,target,always,0,,,,,,,

+ 18 - 0
db/re/quest_db.txt

@@ -1367,6 +1367,24 @@
 7493,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Battle of 17 vs. 1"
 7494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cleanup of the mushroom farm"
 
+// WOE TE Mission
+7501,14400,2451,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"1 Suspicious Babe"
+7502,14400,2451,10,0,0,0,0,0,0,0,0,0,0,0,0,0,"10 Suspicious Babes"
+7503,14400,2451,30,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Suspicious Babes"
+7504,14400,1288,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Destroy 1 Emperium"
+7505,14400,1288,3,0,0,0,0,0,0,0,0,0,0,0,0,0,"Destroy 3 Emperiums"
+7506,14400,1288,5,0,0,0,0,0,0,0,0,0,0,0,0,0,"Destroy 5 Emperiums"
+7507,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"10 Small Wooden Boxes"
+7508,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"20 Small Wooden Boxes"
+7509,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Small Wooden Boxes"
+7510,14400,2450,1,0,0,0,0,0,0,0,0,0,0,0,0,0,"Fight Off a Thief"
+7511,14400,2450,10,0,0,0,0,0,0,0,0,0,0,0,0,0,"Fight Off 10 Thieves"
+7512,14400,2450,30,0,0,0,0,0,0,0,0,0,0,0,0,0,"Fight Off 30 Thieves"
+7513,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"10 Paychecks"
+7514,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"20 Paychecks"
+7515,14400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"30 Paychecks"
+7516,1200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"A break for Commercial Development"
+
 //7619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""
 //7621,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""
 //7622,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,""

+ 41 - 5
db/re/skill_nocast_db.txt

@@ -9,7 +9,7 @@
 // 2    - cannot be used in PvP maps (use this instead of 1 for PK-mode servers)
 // 4    - cannot be used in GvG maps
 // 8    - cannot be used in Battleground maps
-// 16   - cannot be cloned (clones will not copy this skill)
+// 16   - cannot be used in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - cannot be used in zone 1 maps
 // 64   - cannot be used in zone 2 maps
@@ -18,6 +18,7 @@
 // 512  - cannot be used in zone 5 maps
 // 1024 - cannot be used in zone 6 maps
 // 2048 - cannot be used in zone 7 maps
+// 4096 - cannot be used in zone 8 maps
 //
 // Example:
 // 8,6  // Endure cannot be used in PvP and GvG maps (2+4)
@@ -100,10 +101,38 @@
 3013,3	//KO_KYOUGAKU
 
 //----------------------------------------------------------------------------
-// Clone Forbidden/pointless skills
-//----------------------------------------------------------------------------
-77,16	//PR_TURNUNDEAD
-79,16	//PR_MAGNUS
+// Restricted in WOE:TE Castles
+//----------------------------------------------------------------------------
+8,16	// SM_ENDURE
+26,16	// AL_TELEPORT
+27,16	// AL_WARP
+41,16	// MC_VENDING
+87,16	// WZ_ICEWALL
+147,16	// AC_MAKINGARROW
+150,16	// TF_BACKSLIDING
+211,16	// RG_STEALCOIN
+219,16	// RG_INTIMIDATE
+336,16	// WE_CALLPARTNER
+359,16	// LK_BERSERK
+361,16	// HP_ASSUMPTIO
+362,16	// HP_BASILICA
+389,16	// ST_CHASEWALK
+395,16	// CG_MOONLIT
+396,16	// CG_MARIONETTE
+409,16	// WE_CALLPARENT
+410,16	// WE_CALLBABY
+426,16	// TK_HIGHJUMP
+491,16	// CR_CULTIVATION
+529,16	// NJ_SHADOWJUMP
+// 530,16	// NJ_KIRIKAGE
+691,16	// CASH_ASSUMPTIO
+//!TODO: More 3rd Class skills
+// 2284,16	// SC_FATALMENACE
+// 2300,16	// SC_DIMENSIONDOOR
+// 2293,16	// SC_GROOMY
+// 2296,16	// SC_UNLUCKY
+// 2494,16	// GN_CHANGEMATERIAL
+// 2462,16	// SO_EL_ANALYSIS
 
 //----------------------------------------------------------------------------
 // Zone 1 - Aldebaran Turbo Track
@@ -187,3 +216,10 @@
 2419,2048	//WM_POEMOFNETHERWORLD
 2482,2048	//GN_WALLOFTHORN
 2493,2048	//GN_SLINGITEM
+
+//----------------------------------------------------------------------------
+// Zone 8 - WOE:TE Dungeons
+//----------------------------------------------------------------------------
+336,4096 // WE_CALLPARTNER
+409,4096 // WE_CALLPARENT
+410,4096 // WE_CALLBABY

+ 284 - 0
db/status_disabled.txt

@@ -11,6 +11,7 @@
 // 2    - restricted in PVP
 // 4    - restricted in GVG
 // 8    - restricted in Battlegrounds
+// 16   - restricted in WOE:TE castles
 // Restricted zones - configured by 'restricted <number>' mapflag
 // 32   - restricted in zone 1
 // 64   - restricted in zone 2
@@ -19,7 +20,290 @@
 // 512  - restricted in zone 5
 // 1024 - restricted in zone 6
 // 2048 - restricted in zone 7
+// 4096 - restricted in zone 8
 //
 // Example:
 // SC_ENDURE,4   // Endure status will be removed when the player enters GvG and WoE Castle maps; Also cannot be inflicted again.
 
+//----------------------------------------------------------------------------
+// Disabled/Removed statuses in WoE:TE Castles (16)
+//----------------------------------------------------------------------------
+SC_ENDURE,16
+SC_BERSERK,16
+SC_ASSUMPTIO,16
+
+// RUNE_KNIGHT
+SC_ENCHANTBLADE,16
+SC_DEATHBOUND,16
+SC_MILLENNIUMSHIELD,16
+SC_CRUSHSTRIKE,16
+SC_REFRESH,16
+SC_REUSE_REFRESH,16
+SC_GIANTGROWTH,16
+SC_STONEHARDSKIN,16
+SC_VITALITYACTIVATION,16
+SC_STORMBLAST,16
+SC_FIGHTINGSPIRIT,16
+SC_ABUNDANCE,16
+
+// ARCH_BISHOP
+SC_ADORAMUS,16
+SC_EPICLESIS,16
+SC_ORATIO,16
+SC_LAUDAAGNUS,16
+SC_LAUDARAMUS,16
+SC_RENOVATIO,16
+SC_EXPIATIO,16
+SC_DUPLELIGHT,16
+SC_SECRAMENT,16
+
+// WARLOCK
+SC_WHITEIMPRISON,16
+SC_MARSHOFABYSS,16
+SC_RECOGNIZEDSPELL,16
+SC_STASIS,16
+SC_SPHERE_1,16
+SC_SPHERE_2,16
+SC_SPHERE_3,16
+SC_SPHERE_4,16
+SC_SPHERE_5,16
+SC_READING_SB,16
+SC_FREEZE_SP,16
+SC_SPELLBOOK1,16
+SC_SPELLBOOK2,16
+SC_SPELLBOOK3,16
+SC_SPELLBOOK4,16
+SC_SPELLBOOK5,16
+SC_SPELLBOOK6,16
+SC_MAXSPELLBOOK,16
+
+// RANGER
+SC_FEARBREEZE,16
+SC_ELECTRICSHOCKER,16
+SC_WUGDASH,16
+SC_BITE,16
+SC_CAMOUFLAGE,16
+
+// MECHANIC
+SC_ACCELERATION,16
+SC_HOVERING,16
+SC_SHAPESHIFT,16
+SC_INFRAREDSCAN,16
+SC_ANALYZE,16
+SC_MAGNETICFIELD,16
+SC_NEUTRALBARRIER,16
+SC_NEUTRALBARRIER_MASTER,16
+SC_STEALTHFIELD,16
+SC_STEALTHFIELD_MASTER,16
+SC_OVERHEAT,16
+SC_OVERHEAT_LIMITPOINT,16
+
+// GUILLOTINE_CROSS
+SC_VENOMIMPRESS,16
+SC_POISONINGWEAPON,16
+SC_WEAPONBLOCKING,16
+SC_CLOAKINGEXCEED,16
+SC_HALLUCINATIONWALK,16
+SC_HALLUCINATIONWALK_POSTDELAY,16
+SC_ROLLINGCUTTER,16
+SC_TOXIN,16
+SC_PARALYSE,16
+SC_VENOMBLEED,16
+SC_MAGICMUSHROOM,16
+SC_DEATHHURT,16
+SC_PYREXIA,16
+SC_OBLIVIONCURSE,16
+SC_LEECHESEND,16
+
+// ROYAL_GUARD
+SC_REFLECTDAMAGE,16
+SC_FORCEOFVANGUARD,16
+SC_SHIELDSPELL_DEF,16
+SC_SHIELDSPELL_MDEF,16
+SC_SHIELDSPELL_REF,16
+SC_EXEEDBREAK,16
+SC_PRESTIGE,16
+SC_BANDING,16
+SC_BANDING_DEFENCE,16
+SC_EARTHDRIVE,16
+SC_INSPIRATION,16
+
+// SORCERER
+SC_SPELLFIST,16
+SC_CRYSTALIZE,16
+SC_STRIKING,16
+SC_WARMER,16
+SC_VACUUM_EXTREME,16
+SC_PROPERTYWALK,16
+SC_VACUUM_EXTREME_POSTDELAY,16
+
+// MINSTREL
+SC_SWINGDANCE,16
+SC_SYMPHONYOFLOVER,16
+SC_MOONLITSERENADE,16
+SC_RUSHWINDMILL,16
+SC_ECHOSONG,16
+SC_HARMONIZE,16
+
+// WANDERER
+SC_VOICEOFSIREN,16
+SC_DEEPSLEEP,16
+SC_SIRCLEOFNATURE,16
+SC_GLOOMYDAY,16
+SC_GLOOMYDAY_SK,16
+
+// MINSTREL & WANDERER
+SC_SONGOFMANA,16
+SC_DANCEWITHWUG,16
+SC_SATURDAYNIGHTFEVER,16
+SC_LERADSDEW,16
+SC_MELODYOFSINK,16
+SC_BEYONDOFWARCRY,16
+SC_UNLIMITEDHUMMINGVOICE,16
+
+// SURA
+SC_SITDOWN_FORCE,16
+SC_NETHERWORLD,16
+SC_CRESCENTELBOW,16
+SC_CURSEDCIRCLE_ATKER,16
+SC_CURSEDCIRCLE_TARGET,16
+SC_LIGHTNINGWALK,16
+SC_RAISINGDRAGON,16
+SC_GT_ENERGYGAIN,16
+SC_GT_CHANGE,16
+SC_GT_REVITALIZE,16
+SC_GN_CARTBOOST,16
+
+// GENETIC
+SC_THORNSTRAP,16
+SC_BLOODSUCKER,16
+SC_SMOKEPOWDER,16
+SC_TEARGAS,16
+SC_MANDRAGORA,16
+SC_STOMACHACHE,16
+SC_MYSTERIOUS_POWDER,16
+SC_MELON_BOMB,16
+SC_BANANA_BOMB,16
+SC_BANANA_BOMB_SITDOWN,16
+SC_SAVAGE_STEAK,16
+SC_COCKTAIL_WARG_BLOOD,16
+SC_MINOR_BBQ,16
+SC_SIROMA_ICE_TEA,16
+SC_DROCERA_HERB_STEAMED,16
+SC_PUTTI_TAILS_NOODLES,16
+SC_BOOST500,16
+SC_FULL_SWING_K,16
+SC_MANA_PLUS,16
+SC_MUSTLE_M,16
+SC_LIFE_FORCE_F,16
+SC_EXTRACT_WHITE_POTION_Z,16
+SC_VITATA_500,16
+SC_EXTRACT_SALAMINE_JUICE,16
+
+// Homunculus
+SC_STYLE_CHANGE,16
+SC_TINDER_BREAKER,16
+SC_TINDER_BREAKER2,16
+SC_CBC,16
+SC_EQC,16
+SC_GOLDENE_FERSE,16
+SC_ANGRIFFS_MODUS,16
+SC_OVERED_BOOST,16
+SC_LIGHT_OF_REGENE,16
+SC_ASH,16
+SC_GRANITIC_ARMOR,16
+SC_MAGMA_FLOW,16
+SC_PYROCLASTIC,16
+SC_PARALYSIS,16
+SC_PAIN_KILLER,16
+
+// SHADOW_CHASER
+SC__REPRODUCE,16
+SC__AUTOSHADOWSPELL,16
+SC__SHADOWFORM,16
+SC__BODYPAINT,16
+SC__INVISIBILITY,16
+SC__DEADLYINFECT,16
+SC__ENERVATION,16
+SC__GROOMY,16
+SC__IGNORANCE,16
+SC__LAZINESS,16
+SC__UNLUCKY,16
+SC__WEAKNESS,16
+SC__STRIPACCESSORY,16
+SC__MANHOLE,16
+SC__BLOODYLUST,16
+
+// Elemental SORCERER
+SC_CIRCLE_OF_FIRE,16
+SC_CIRCLE_OF_FIRE_OPTION,16
+SC_FIRE_CLOAK,16
+SC_FIRE_CLOAK_OPTION,16
+SC_WATER_SCREEN,16
+SC_WATER_SCREEN_OPTION,16
+SC_WATER_DROP,16
+SC_WATER_DROP_OPTION,16
+SC_WATER_BARRIER,16
+SC_WIND_STEP,16
+SC_WIND_STEP_OPTION,16
+SC_WIND_CURTAIN,16
+SC_WIND_CURTAIN_OPTION,16
+SC_ZEPHYR,16
+SC_SOLID_SKIN,16
+SC_SOLID_SKIN_OPTION,16
+SC_STONE_SHIELD,16
+SC_STONE_SHIELD_OPTION,16
+SC_POWER_OF_GAIA,16
+SC_PYROTECHNIC,16
+SC_PYROTECHNIC_OPTION,16
+SC_HEATER,16
+SC_HEATER_OPTION,16
+SC_TROPIC,16
+SC_TROPIC_OPTION,16
+SC_AQUAPLAY,16
+SC_AQUAPLAY_OPTION,16
+SC_COOLER,16
+SC_COOLER_OPTION,16
+SC_CHILLY_AIR,16
+SC_CHILLY_AIR_OPTION,16
+SC_GUST,16
+SC_GUST_OPTION,16
+SC_BLAST,16
+SC_BLAST_OPTION,16
+SC_WILD_STORM,16
+SC_WILD_STORM_OPTION,16
+SC_PETROLOGY,16
+SC_PETROLOGY_OPTION,16
+SC_CURSED_SOIL,16
+SC_CURSED_SOIL_OPTION,16
+SC_UPHEAVAL,16
+SC_UPHEAVAL_OPTION,16
+SC_TIDAL_WEAPON,16
+SC_TIDAL_WEAPON_OPTION,16
+SC_ROCK_CRUSHER,16
+SC_ROCK_CRUSHER_ATK,16
+SC_FIRE_INSIGNIA,16
+SC_WATER_INSIGNIA,16
+SC_WIND_INSIGNIA,16
+SC_EARTH_INSIGNIA,16
+
+// KAGEROU / OBORO
+SC_MEIKYOUSISUI,16
+SC_JYUMONJIKIRI,16
+SC_KYOUGAKU,16
+SC_IZAYOI,16
+SC_ZENKAI,16
+SC_KAGEHUMI,16
+SC_KYOMU,16
+SC_KAGEMUSYA,16
+SC_ZANGETSU,16
+SC_GENSOU,16
+SC_AKAITSUKI,16
+
+// Others
+SC_FEAR,16
+SC_BURNING,16
+SC_FREEZING,16
+SC_TEARGAS_SOB,16
+SC__FEINTBOMB,16
+SC__CHAOS,16

+ 13 - 0
doc/mapflags.txt

@@ -170,6 +170,16 @@ Disables certain items and skills on a map through a specified zone number. The
 located in 'db/(pre-)re/item_noequip.txt' and 'db/(pre-)re/skill_nocast_db.txt', both of which
 contain explanations and examples of how this mapflag is used.
 
+Restricted Zones:
+1 - Aldebaran Turbo Track
+2 - Jail
+3 - Izlude Battle Arena
+4 - WoE:SE Maps
+5 - Sealed Shrine
+6 - Instances: Endless Tower, Orc's Memory, Nidhoggr's Instance
+7 - Towns
+8 - WOE:TE Dungeons
+
 ---------------------------------------
 
 *monster_noteleport
@@ -256,11 +266,14 @@ because it does not necessarily require PvP mode to be set.
 *gvg_noparty
 *gvg_castle
 *gvg_dungeon
+*gvg_te
+*gvg_te_castle
 
 Enables Guild vs. Guild mode on a map and applies the corresponding damage adjustments.
 'gvg_noparty' will ignore party alliances.
 'gvg_castle' marks a guild castle. GvG mode will be active only during the War of Emperium.
 'gvg_dungeon' marks a guild dungeon. Players will be warped out after two deaths.
+'gvg_te' and 'gvg_te_castle' marks a WOE:TE area and special restrictions are applied.
 
 ---------------------------------------
 

+ 40 - 9
doc/script_commands.txt

@@ -876,6 +876,9 @@ OnAgitInit:
 OnAgitStart2:
 OnAgitEnd2:
 OnAgitInit2:
+OnAgitStart3:
+OnAgitEnd3:
+OnAgitInit3:
 
 OnAgitStart will run whenever the server shifts into WoE mode, whether it is 
 done with @agitstart GM command or with 'AgitStart' script command. OnAgitEnd 
@@ -3184,7 +3187,7 @@ This command requests the guild data from the char server and merrily continues
 with the execution. Whenever the guild information becomes available (which 
 happens instantly if the guild information is already in memory, or later, if it 
 isn't and the map server has to wait for the char server to reply) it will run 
-the specified event as in a 'doevent' call.
+the specified event as in a 'donpcevent' call.
 
 ---------------------------------------
 
@@ -3663,10 +3666,11 @@ Name is optional, and defaults to the attached player if omitted.
 
 *agitcheck()
 *agitcheck2()
+*agitcheck3()
 
-These function will let you check whether the server is currently in WoE mode
-(or WoE SE mode if the second function is called) and will return 1 if War of
-Emperium is on and 0 if it isn't. 
+These function will let you check whether the server is currently in WoE:FE mode
+(agitcheck()), WoE:SE mode (agitcheck2()), or WoE:TE mode (agitcheck3()) and will
+return true if War of Emperium is on and false if it isn't. 
 
 ---------------------------------------
 
@@ -6686,15 +6690,19 @@ For examples, check the WoE scripts in the distribution.
 *agitend;
 *agitstart2;
 *agitend2;
+*agitstart3;
+*agitend3;
 
-These four commands will start and end War of Emperium or War of Emperium SE.
+These commands will start and end War of Emperium FE, War of Emperium SE,
+or War of Emperium TE.
 
 This is a bit more complex than it sounds, since the commands themselves won't 
 actually do anything interesting, except causing all 'OnAgitStart:' and 
-'OnAgitEnd:', or 'OnAgitStart2:' and 'OnAgitEnd2:' in the case of latter two
-commands, events to run everywhere, respectively. They are used as  simple 
-triggers to run a lot of complex scripts all across the server, and they, 
-in turn, are triggered by clock with an 'OnClock<time>:' time-triggering label.
+'OnAgitEnd:', 'OnAgitStart2:' and 'OnAgitEnd2:', or 'OnAgitStart3:' and
+'OnAgitEnd3:' in the case of latter two commands, events to run everywhere,
+respectively. They are used as  simple triggers to run a lot of complex scripts
+all across the server, and they, in turn, are triggered by clock with an
+'OnClock<time>:' time-triggering label.
 
 ---------------------------------------
 
@@ -6707,6 +6715,13 @@ even though WoE itself may or may not actually be in effect.
 
 ---------------------------------------
 
+*gvgon3 "<map name>";
+*gvgoff3 "<map name>";
+
+Theses commands behave identically to gvgon/gvgoff, but apply GVG_TE mapflag. 
+
+---------------------------------------
+
 *flagemblem <guild id>;
 
 This command only works when run by the NPC objects which have sprite id 722, 
@@ -6751,6 +6766,22 @@ Type indicates what information to return:
  1 - max. hp
  2 - current hp
 
+---------------------------------------
+
+*getguildalliance(<guild id1>, <guild id2>);
+
+This command will return the relation between 2 guilds.
+
+NOTE: This should be used in collaboration with 'requestguildinfo' as the
+map-server needs to request for information from the char-server.
+
+Return values:
+	-2 - Guild ID1 does not exist
+	-1 - Guild ID2 does not exist
+	 0 - Both guilds have no relation OR guild ID aren't given
+	 1 - Both guilds are allies
+	 2 - Both guilds are antagonists
+
 ---------------------------------------
 //
 5,2.- End of guild-related commands

+ 2 - 0
npc/mapflag/gvg.txt

@@ -12,6 +12,8 @@
 //= gvg: Turns on GvG mode.
 //= gvg_castle: Describes castle maps for WoE.
 //= gvg_dungeon: Describes dungeon maps for WoE.
+//= gvg_te: Turns on GvG mode for WoE:TE.
+//= gvg_te_castle: Describes castle maps for WoE:TE.
 //===== Additional Comments: ================================= 
 //= 1.1 Added Novice Guild Castles.
 //= 1.2 Updated with new meanings of gvg and gvg_castle.

+ 182 - 0
npc/re/guides/guides_woe_te.txt

@@ -0,0 +1,182 @@
+//===== rAthena Script =======================================
+//= Guides WoE TE
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPC Guide for WoE TE
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+prt_gld,118,151,4	script	Guide in Gloria#tes01	8W_SOLDIER,{
+	mes "[Guide Soldier]";
+	mes "May the endless glory be with the Kingdom of Rune-Midgarts and its seven royal families!";
+	mes "Welcome to Gloria, the fortress in Siege Battle TE. We provide services in cooperation with Kafra and the major royal families of the kingdom.";
+	next;
+	switch( select( "Gloria?", "About Siege Battle TE", "About requirements for participation", "Forget it." ) ) {
+	case 1:
+		mes "[Guide Soldier]";
+		mes "It has been named in honor of the seven royal families and the kingdom.";
+		mes "The whole city closely resembles Valkyrie Realm, and here resides the aspirations of the royal family for everyone.";
+		next;
+		mes "[Guide Soldier]";
+		mes "In Kafragarten of Aldebaran, managed by Gloria and Kafra Service, we have special rules that are slightly different from the existing ones.";
+		mes "We call it Siege Battle TE.";
+		next;
+		mes "[Guide Soldier]";
+		mes "You should not have troubles understanding the new rules since it is simply about setting a limit on qualifications for participation.";
+		close;
+	case 2:
+		mes "[Guide Soldier]";
+		mes "It is a new stage prepared by the royal family in order to let more people participate in siege battles.";
+		mes "Different rules are applied, and sufficient supports are provided since its atmosphere is similar to that of a gymnasium.";
+		next;
+		mes "[Guide Soldier]";
+		mes "^4d4dffTertiary job class and users with expanded levels are not allowed in Gloria and Kafragarten regions, where Siege Battle TE rules are applied.^000000";
+		next;
+		mes "[Guide Soldier]";
+		mes "Also, we lend a variety of battlegears that you use only in corresponding regions for free.";
+		mes "This may be the biggest difference.";
+		close;
+	case 3:
+		mes "[Guide Soldier]";
+		mes "^4d4dffNovice, primary, and secondary job classes are allowed to participate as well as extra job class.^000000";
+		mes "Of course, primary and secondary job classes are included as well.";
+		next;
+		mes "[Guide Soldier]";
+		mes "In other words, tertiary job class and jobs with expanded levels such as Kagerou and Oboro are not allowed.";
+		mes "Also, their buff effects get eliminated here.";
+		next;
+		mes "[Guide Soldier]";
+		mes "Other than that, it is not much different from the existing siege battles.";
+		close;
+	case 4:
+		mes "[Guide Soldier]";
+		mes "May the glory of the royal family and Odin's protection be with you!";
+		close;
+	}
+}
+
+prt_gld,122,151,4	script	Guide in Gloria#tes02	8W_SOLDIER,{
+	mes "[Guide Soldier]";
+	mes "This warp gate here will let you go into Gloria region.";
+	mes "Please keep in mind that you are supposed to travel through warps here.";
+	close;
+}
+
+te_prt_gld,118,151,4	script	Guide in Gloria#tes03	8W_SOLDIER,{
+	mes "[Guide Soldier]";
+	mes "You are now at the fortress in Gloria.";
+	mes "If you wish to return to Valkyrie Realm, you can travel through warp.";
+	close;
+}
+
+te_prt_gld,122,151,4	script	Guide in Gloria#tes04	8W_SOLDIER,{
+	mes "[Guide Soldier]";
+	mes "Welcome to Gloria.";
+	mes "Job classes that are allowed to participate in siege battles at the fortresses in Kafragarten and Gloria regions are limited to ^4d4dffprimary and secondary job classes as well as those without expanded levels.^000000";
+	next;
+	mes "[Guide Soldier]";
+	mes "In Kafragarten and Gloria regions, you get separate missions.";
+	mes "Some of them are not related to Emperiums, so challenge yourself!";
+	next;
+	mes "[Guide Soldier]";
+	mes "The royal family and Kafra Service have prepared a variety of retal items for you.";
+	mes "Although the rental period is relatively short, it's all free. So, don't miss the chance!";
+	close;
+}
+
+alde_gld,228,189,3	script	Sorin of Kafragarten	4_F_KAFRA3,{
+	mes "[Sorin]";
+	mes "Welcome to Kafra Service~ We always provide the best to our customers.";
+	mes "Finally, Kafra Service has established its own fortress!";
+	next;
+	switch( select( "What is Kafragarten?", "What is Siege Battle TE?", "Qualifications for participation", "Forget it." ) ) {
+	case 1:
+		mes "[Sorin]";
+		mes "This is a fortress provided by Kafra Service in cooperation with the royal family of Rune-Midgarts.";
+		mes "It means 'Kafra's garden.'";
+		next;
+		mes "[Sorin]";
+		mes "Although it looks very similar to Luina";
+		mes "It should be fine since it's servicing different users.";
+		mes "It's like a training stage, so to speak.";
+		next;
+		mes "[Sorin]";
+		mes "Kafragarten is built in the region of Luina, and in Valkyrie Realm, the royal family's Gloria is founded.";
+		mes "Kafra Service hopes that you would gain valuable experience in this new fortress.";
+		close;
+	case 2:
+		mes "[Sorin]";
+		mes "Siege Battle TE is ^4d4dffsiege battles designed for primary and secondary job classes only, ruling out tertiary job class.^000000";
+		next;
+		mes "[Sorin]";
+		mes "It's been newly established in an effort to allow more users to gain experience through siege battles.";
+		next;
+		mes "[Sorin]";
+		mes "Moreover, for your convenience, we lend a variety of items that you can use only inside the corresponding fortress. So, take advantage of this opportunity.";
+		next;
+		mes "[Sorin]";
+		mes "As they say, 'action speaks louder than words.'";
+		mes "Now, go and see for yourself~";
+		close;
+	case 3:
+		mes "[Sorin]";
+		mes "Primary, secondary, and extra job classes without expanded levels as well as primary and secondary job classes are allowed to participate only.";
+		next;
+		mes "[Sorin]";
+		mes "In other words, tertiary job class and jobs with expanded levels such as Kagerou and Oboro are not allowed.";
+		close;
+	case 4:
+		mes "[Sorin]";
+		mes "Kafra Service will do its utmost to bring joy to your life through Kafragarten.";
+		close;
+	}
+}
+
+alde_gld,224,185,5	script	Defolty of Kafragarten	4_F_KAFRA1,{
+	mes "[Defolty]";
+	mes "Kafragarten is like a mirrored image of Luina, so its structure is exactly the same as that of Luina.";
+	next;
+	mes "[Defolty]";
+	mes "You can travel by these warps here.";
+	mes "You can travel to Kafragarten using warp.";
+	close;
+}
+
+te_alde_gld,228,189,3	script	W of Kafragarten#tes01	4_F_KAFRA6,{
+	mes "[W]";
+	mes "You can travel to Luina using this warp here.";
+	mes "Make good use of it";
+	next;
+	mes "[W]";
+	mes "Who took the castle that was named after me, W?";
+	mes "Hehe doesn't it mean that I'm superior to Tailing?";
+	close;
+}
+
+te_alde_gld,224,185,5	script	Tailing of Kafragarten	4_F_KAFRA2,{
+	mes "[Tailing]";
+	mes "This is the region of Kafragarten.";
+	mes "In siege battles in the regions of Kafragarten and Gloria, only primary and secondary job classes as well as users without expanded levels are allowed to participate.";
+	next;
+	mes "[Tailing]";
+	mes "... .";
+	mes "In Kafragarten and Gloria regions, you get separate missions.";
+	mes "So you should pay close attention.";
+	next;
+	mes "[Tailing]";
+	mes "Also, we have prepared a variety of battlegears, which are available anytime upon your request.";
+	next;
+	mes "[Tailing]";
+	mes "But obviously, they're only valid in the regions of Kafragarten and Gloria.";
+	next;
+	mes "[Tailing]";
+	mes "... ..";
+	mes "Ah if you think I'm mad because my name is missing from Kafragarten and if my way of speaking is a little stiff because of that";
+	next;
+	mes "[Tailing]";
+	mes "Oh my.";
+	mes "Is that really true?";
+	mes "No way. W is no better than me..hahaha.";
+	close;
+}

+ 1218 - 0
npc/re/guild3/agit_main_te.txt

@@ -0,0 +1,1218 @@
+//===== rAthena Script =======================================
+//= War of Emperium TE - Template File
+//===== Description: =========================================
+//= [Official Conversion]
+//= Like agit_main, this file is required
+//= for TE castles to function.
+//= - Enables AGIT Manager.
+//= - Enables Stewards to invest.
+//= - Enables Kafra Services inside Guild.
+//= - Treasure Chest spawning.
+//= - Flag Template.
+//= - GM NPC.
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+-	script	Manager_TE	-1,{
+OnAgitInit3:
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "") end;
+	.@npc_name$ = strnpcinfo(0);
+	.@guild_id = getcastledata(.@map$,1);
+	if (.@guild_id == 0) {
+		killmonster .@map$, .@npc_name$ +"::OnMyMobDead";
+		donpcevent strnpcinfo(0)+"::OnEmpSpawn";
+		if (compare(.@map$,"te_aldecas")) {
+			monster .@map$,0,0,"Evil Druid",1117,10,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Khalitzburg",1132,4,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Abysmal Knight",1219,2,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Executioner",1205,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Penomena",1216,10,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Alarm",1193,18,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Clock",1269,9,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Raydric Archer",1276,7,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Wanderer",1208,3,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Alice",1275,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Bloody Knight",1268,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Dark Lord",1272,1,.@npc_name$ +"::OnMyMobDead";
+			if (.@map$ == "te_aldecas1") { setarray .@emproom[0],216,23; }
+			else if (.@map$ == "te_aldecas2") { setarray .@emproom[0],213,23; }
+			else if (.@map$ == "te_aldecas3") { setarray .@emproom[0],205,31; }
+			else if (.@map$ == "te_aldecas4") { setarray .@emproom[0],36,217; }
+			else if (.@map$ == "te_aldecas5") { setarray .@emproom[0],27,101; }
+			monster .@map$,.@emproom[0],.@emproom[1],"Dark Lord",1272,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Tower Keeper",1270,4,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Bloody Knight",1268,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Abysmal Knight",1219,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Raydric Archer",1276,5,.@npc_name$ +"::OnMyMobDead";
+		}
+		else if (compare(.@map$,"te_prtcas")) {
+			monster .@map$,0,0,"Raydric",1163,10,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Khalitzburg",1132,10,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Abysmal Knight",1219,5,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Bloody Knight",1268,5,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Stormy Knight",1251,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Hatii",1252,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Raydric Archer",1276,5,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Gryphon",1259,2,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Chimera",1283,2,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Alice",1275,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,0,0,"Zealotus",1200,1,.@npc_name$ +"::OnMyMobDead";
+			if (.@map$ == "te_prtcas01") { setarray .@emproom[0],197,197; }
+			else if (.@map$ == "te_prtcas02") { setarray .@emproom[0],157,174; }
+			else if (.@map$ == "te_prtcas03") { setarray .@emproom[0],16,220; }
+			else if (.@map$ == "te_prtcas04") { setarray .@emproom[0],291,14; }
+			else if (.@map$ == "te_prtcas05") { setarray .@emproom[0],266,266; }
+			monster .@map$,.@emproom[0],.@emproom[1],"Guardian Knight of Emperium",1268,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Chief Guardian Knight of Emperium",1251,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Hatii",1252,1,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Guardian Knight of Emperium",1219,2,.@npc_name$ +"::OnMyMobDead";
+			monster .@map$,.@emproom[0],.@emproom[1],"Raydric Archer",1276,5,.@npc_name$ +"::OnMyMobDead";
+		}
+		disablenpc "Kafra Employee#"+ .@map$;
+	}
+	else {
+		requestguildinfo .@guild_id;
+		donpcevent "::OnFlagTE" + strnpcinfo(2);// Guild emblem on flags.
+		if (getcastledata(.@map$,9)  == 0)
+			disablenpc "Kafra Employee#"+ .@map$;
+
+		// Load purchased Guardian in castles.
+		if (.@map$ == "te_aldecas1") donpcevent "Clode::OnSpawnGuardians";
+		else if (.@map$ == "te_aldecas2") donpcevent "Lares::OnSpawnGuardians";
+		else if (.@map$ == "te_aldecas3") donpcevent "Valerian::OnSpawnGuardians";
+		else if (.@map$ == "te_aldecas4") donpcevent "Alpores::OnSpawnGuardians";
+		else if (.@map$ == "te_aldecas5") donpcevent "Anpere::OnSpawnGuardians";
+		else if (.@map$ == "te_prtcas01") donpcevent "Kurbe::OnSpawnGuardians";
+		else if (.@map$ == "te_prtcas02") donpcevent "Kamiyu::OnSpawnGuardians";
+		else if (.@map$ == "te_prtcas03") donpcevent "Eduare::OnSpawnGuardians";
+		else if (.@map$ == "te_prtcas04") donpcevent "Casate::OnSpawnGuardians";
+		else if (.@map$ == "te_prtcas05") donpcevent "Pisaro::OnSpawnGuardians";
+	}
+	end;
+
+OnEmpSpawn:
+	.@map$ = strnpcinfo(4);
+	if (!mobcount( .@map$, strnpcinfo(0) +"::OnAgitBreak" )) {
+		if (.@map$ == "te_aldecas1") { setarray .@emproom[0],216,23; }
+		else if (.@map$ == "te_aldecas2") { setarray .@emproom[0],213,23; }
+		else if (.@map$ == "te_aldecas3") { setarray .@emproom[0],205,31; }
+		else if (.@map$ == "te_aldecas4") { setarray .@emproom[0],36,217; }
+		else if (.@map$ == "te_aldecas5") { setarray .@emproom[0],27,101; }
+		else if (.@map$ == "te_prtcas01") { setarray .@emproom[0],197,197; }
+		else if (.@map$ == "te_prtcas02") { setarray .@emproom[0],157,174; }
+		else if (.@map$ == "te_prtcas03") { setarray .@emproom[0],16,220; }
+		else if (.@map$ == "te_prtcas04") { setarray .@emproom[0],291,14; }
+		else if (.@map$ == "te_prtcas05") { setarray .@emproom[0],266,266; }
+		monster .@map$,.@emproom[0],.@emproom[1],"Emperium",1288,1, strnpcinfo(0) +"::OnAgitBreak";
+	}
+	end;
+
+OnAgitStart3:
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "") end;
+	if (agitcheck3()) {
+		maprespawnguildid .@map$, getcastledata(.@map$,1),2;// warp all non-guild members
+		gvgon3 .@map$;
+		donpcevent strnpcinfo(0)+"::OnEmpSpawn";
+		callsub S_Message,"OnCommandOn";
+	}
+	end;
+
+OnAgitEnd3:
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "") end;
+	gvgoff3 .@map$;
+	if (getcastledata(.@map$,1))
+		killmonster .@map$, strnpcinfo(0) +"::OnAgitBreak";
+	callsub S_Message,"OnReset";
+	end;
+
+OnAgitBreak:
+	.@guild_id = getcharid(2);
+	.@map$ = strnpcinfo(4);
+
+	.@economy = getcastledata(.@map$,2) - 5;// Adjust economy Invest Level for Castle
+	if (.@economy < 1)
+		setcastledata .@map$, 2,1;
+	else
+		setcastledata .@map$, 2,.@economy;
+	.@defense = getcastledata(.@map$,3) - 5;// Adjust Defense Invest Level for Castle
+	if (.@defense < 1)
+		setcastledata .@map$, 3,1;
+	else
+		setcastledata .@map$, 3,.@defense;
+	setcastledata .@map$,1,.@guild_id;
+
+	// Reset Invest information and refresh castle data
+	for ( .@i = 4; .@i <= 9; .@i++ )
+		setcastledata .@map$,.@i,0;
+	donpcevent strnpcinfo(0) +"::OnAgitInit3";// spawn guardians / monsters
+
+	// Erase Guardian Database information if the new owners do not have Guardian Research.
+	if (getgdskilllv(.@guild_id,10002) == 0) {
+		for ( .@i = 10; .@i <= 17; .@i++ )
+			setcastledata .@map$,.@i,0;
+	}
+
+	mapannounce .@map$,"Emperium has been destroyed.",bc_map,"0x00FF00",FW_BOLD,20,0,40;
+	maprespawnguildid .@map$,.@guild_id,2;// Respawn all but new castle-occupants, don't remove monsters.
+
+	sleep 500;
+	if (agitcheck3())
+		donpcevent strnpcinfo(0) +"::OnEmpSpawn";
+	sleep 7000;
+	announce "The [" + getcastlename(.@map$) + "] castle has been conquered by the [" + getguildName(.@guild_id) + "] guild.",bc_all|bc_woe;
+	end;
+
+OnGuildBreak:
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "") end;
+	killmonster .@map$, "Kafra Employee#"+ strnpcinfo(4) +"::OnGuardianDied";
+	disablenpc "Kafra Employee#"+ .@map$;
+	setcastledata .@map$,1,0;
+	sleep 7000;
+	announce "Guild Base [" + getcastlename(.@map$) + "] has been abandoned.",bc_all;
+	donpcevent strnpcinfo(0) +"::OnAgitInit3";
+	end;
+
+S_Message:
+	.@map$ = strnpcinfo(4);
+	.@guild_id = getcastledata(.@map$,1);
+	
+	if (.@guild_id)
+		announce "The [" + getcastlename(.@map$) + "] castle is occupied by the [" + getguildname(.@guild_id) + "] guild.",bc_all,"0xFF0000",FW_NORMAL,10;
+	else
+		announce "The [" + getcastlename(.@map$) + "] castle is currently unoccupied.", bc_all,"0xFF0000",FW_NORMAL,10;
+	if (compare( .@map$,"te_alde" ))
+		.@string$ = "alde0"+ charat( .@map$,getstrlen(.@map$)-1 );
+	else
+		.@string$ = "prt0"+ charat( .@map$,getstrlen(.@map$)-1 );
+	donpcevent "#popswitch_"+ .@string$ +"::"+ getarg(0);// monsters for mission TE
+
+	if (.@map$ == "te_aldecas1") {
+		donpcevent "Blacksmith Cano#tegod01::OnInit";// god item TE
+		$2012_tegod_kafra = 0;
+		$@2012_tegirls_alde01 = 0;
+	}
+	else if (.@map$ == "te_prtcas01") {
+    	$2012_tegod_gloria = 0;
+    	$@2012_tegirls_prt01 = 0;
+    	donpcevent "Blacksmith Kai#tegod01::OnInit";
+	}
+	return;
+
+OnMyMobDead:
+	end;
+}
+
+// Guild Kafras
+//============================================================
+-	script	Kafra_Staff_TE	-1,{
+	.@guild_id = getcastledata( strnpcinfo(4),1 );
+	.@guildname$ = getguildname(.@guild_id);
+
+	cutin "kafra_01",2;
+	mes "[Kafra Employee]";
+	if (.@guild_id == getcharid(2)) {
+		mes "Welcome. ^ff0000" + .@guildname$ + "^000000 Member.";
+		mes "The Kafra Corporation will stay with you wherever you go.";
+		next;
+		switch( select( "Use Storage", "Use Teleport Service", "Rent a Pushcart", "Cancel" ) ) {
+		case 1:
+			if (getskilllv("NV_BASIC") > 5) {
+				mes "[Kafra Employee]";
+				mes "Here, let me open";
+				mes "your Storage for you.";
+				mes "Thank you for using";
+				mes "the Kafra Service.";
+				close2;
+				openstorage;
+			} else {
+				mes "[Kafra Employee]";
+				mes "I'm sorry, but you";
+				mes "need the Novice's";
+				mes "Basic Skill Level 6 to";
+				mes "use the Storage Service.";
+				close2;
+			}
+			break;
+		case 2:
+			if (compare( strnpcinfo(4),"alde" ) == 1)
+				callsub( S_Warp, "Aldebaran", "aldebaran",132,103 );
+			else
+				callsub( S_Warp, "Prontera", "prontera",278,211 );
+		case 3:
+			mes "[Kafra Employee]";
+			if (BaseClass != Job_Merchant) {
+				mes "I'm sorry, but the";
+				mes "Pushcart rental service";
+				mes "is only available to Merchants,";
+				mes "Blacksmiths and Alchemists.";
+				close2;
+			}
+			else if (checkcart()) {
+				mes "You already have";
+				mes "a Pushcart equipped.";
+				mes "Unfortunately, we can't";
+				mes "rent more than one to";
+				mes "each customer at a time.";
+				close2;
+			}
+			else {
+				mes "The Pushcart rental";
+				mes "fee is 800 zeny. Would";
+				mes "you like to rent a Pushcart?";
+				next;
+				if (select( "Rent a Pushcart","Cancel" ) == 1) {
+					if (Zeny < 800) {
+						mes "[Kafra Employee]";
+						mes "I'm sorry, but you";
+						mes "don't have enough";
+						mes "zeny to pay the Pushcart";
+						mes "rental fee of 800 zeny.";
+						close2;
+					}
+					else {
+						RESRVPTS = RESRVPTS + 80;
+						Zeny = Zeny - 800;
+						setcart();
+					}
+				}
+			}
+			break;
+		case 4:
+			mes "[Kafra Employee]";
+			mes "We, here at Kafra Corporation,";
+			mes "are always endeavoring to provide you with the best services. We hope that we meet your adventuring needs and standards of excellence.";
+			close2;
+			break;
+		}
+	}
+	else {
+		mes "I am instructed to only offer my services to the ^ff0000"+.@guildname$+"^000000 Guild. Please try another Kafra Employee around here. Sorry for the inconvenience.";
+		close2;
+	}
+	cutin "",255;
+	end;
+
+S_Warp:
+	mes "[Kafra Employee]";
+	mes "Please choose";
+	mes "your destination.";
+	next;
+	switch( select( getarg(0) + " -> 200 z", "Cancel it" ) ) {
+	case 1:
+		if (Zeny < 200) {
+			mes "[Kafra Employee]";
+			mes "I'm sorry, but you don't have";
+			mes "enough zeny for the Teleport";
+			mes "Service. The fee to teleport";
+			mes "to "+getarg(0)+" is 200 zeny.";
+			close2;
+			cutin "",255;
+			end;
+		}
+		Zeny = Zeny - 200;
+		RESRVPTS = RESRVPTS + 20;
+		warp getarg(1), getarg(2),getarg(3);
+		end;
+	case 2:
+		cutin "",255;
+		end;
+	}
+
+OnGuardianDied:
+	end;
+}
+
+// Castle Managers (Invest)
+//============================================================
+-	script	invest_TE	-1,{
+function GuardianData;
+
+	.@map$ = strnpcinfo(4);
+	.@npc_name$ = "[ Butler "+ strnpcinfo(1) +"]";
+	.@guild_id = getcastledata(.@map$,1);
+	.@guildmaster$ = getguildmaster(.@guild_id);
+
+	mes .@npc_name$;
+	if (.@guild_id == 0) {
+		mes "I have been waiting for a master to fulfill my destiny.";
+		mes "Brave soul... fate will guide you towards your future...";
+		close;
+	}
+	if (strcharinfo(0) != .@guildmaster$) {
+		mes "No matter how much you pester me, I'll still follow my master ^ff0000"+.@guildmaster$+"^000000. Where are the Guardians?! Send these ruffians away right now!";
+		close;
+	}
+	mes "Welcome. My honorable master, ^ff0000"+strcharinfo(0)+"^000000...";
+	mes "Your humble servent, "+strnpcinfo(1)+", is here to serve you.";
+	next;
+	switch( select( "Castle briefing", "Invest in commercial growth", "Invest in Castle Defenses", "Summon Guardian", "Hire / Fire a Kafra Employee", "Go into Master's room" ) ) {
+	case 1:
+		.@economy_today = getcastledata(.@map$,4);
+		.@defense_today = getcastledata(.@map$,5);
+		mes .@npc_name$;
+		mes "I will report the Castle briefing, Master.";
+		mes " ";
+		mes "^0000ffNow, the commercial growth level is "+GetCastleData(.@map$,2)+".";
+		if (.@economy_today > 0)
+			mes " You invested "+.@economy_today+" times in past 1 day.";
+		mes " Now, the Castle Defense level is "+GetCastleData(.@map$,3)+".^000000";
+		if (.@defense_today > 0)
+			mes " ^0000ff- You invested "+.@defense_today+" times in past 1 day.^000000";
+		mes " ";
+		mes "That's all I have to report, Master.";
+		close;
+
+	case 2:
+		.@economy = getcastledata(.@map$,2);
+		setarray .@eco_invest[0], 5,5000, 10,10000, 15,20000, 20,35000, 25,55000, 30,80000, 35,110000, 40,145000, 45,185000, 50,230000,
+			55,280000, 60,335000, 65,395000, 70,460000, 75,530000, 80,605000, 85,685000, 90,770000, 95,860000, 100,955000;
+		for ( .@i = 0; .@i < getarraysize(.@eco_invest); .@i += 2 )
+			if (.@economy <= .@eco_invest[.@i]) break;
+		callsub( S_Invest, 4, .@eco_invest[.@i+1], getcastledata(.@map$,4), "commercial growth", "quantity of goods made by the guild will increase", "future", "economist", "riches" );
+
+	case 3:
+		.@defense = getcastledata(.@map$,3);
+		setarray .@def_invest[0], 5,10000, 10,20000, 15,40000, 20,70000, 25,110000, 30,160000, 35,220000, 40,290000, 45,370000, 50,460000,
+			55,560000, 60,670000, 65,790000, 70,920000, 75,1060000, 80,1210000, 85,1370000, 90,1540000, 95,1720000, 100,1910000;
+		for ( .@i = 0; .@i < getarraysize(.@def_invest); .@i += 2 )
+			if (.@defense <= .@def_invest[.@i]) break;
+		callsub( S_Invest, 5, .@def_invest[.@i+1], getcastledata(.@map$,5), "Castle Defenses", "durability of Guardians and the Emperium will increase", "coming battles", "strategist", "Defenses" );
+
+	case 4:
+		mes .@npc_name$;
+		mes "Will you summon a Guardian? It'll be a protector to defend us loyally.";
+		mes "Please select a guardian to defend us.";
+		next;
+		GuardianData( .@mob_id, .@x, .@y, .@name$ );
+		for ( .@i = 0; .@i < MAX_GUARDIANS ; .@i++ ) {
+			if (guardianinfo(.@map$,.@i,0))
+				.@menu$ = .@menu$ + getmonsterinfo(.@mob_id[.@i],MOB_NAME) + " - Implemented (" + guardianinfo(.@map$,.@i,2) + "/" + guardianinfo(.@map$,.@i,1) + "):";// hp/hpmax
+			else
+				.@menu$ = .@menu$ + getmonsterinfo(.@mob_id[.@i],MOB_NAME) + " - Not Implemented:";
+		}
+		.@s = select(.@menu$) -1;
+		mes .@npc_name$;
+		mes "Will you summon the chosen guardian? 10,000 zeny are required to summon a Guardian.";
+		next;
+		if (select( "Summon","Cancel" ) == 2) {
+			mes .@npc_name$;
+			mes "I did as you ordered. But please remember if you the have money to spare, it'll be better to set it up.";
+			close;
+		}
+		mes .@npc_name$;
+		if (getgdskilllv(.@guild_id,10002) == 0) {
+			mes "Master, we have not the resources to Summon the Guardian. If you want to accumulate them, you have to learn the Guild skill. We failed to summon the Guardian.";
+		}
+		else if (getcastledata( .@map$,(.@s+10) ) == 1)
+			mes "Master, you already have summoned that Guardian. We cannot summon another.";
+		else if (Zeny <  10000)
+			mes "Well... I'm sorry but we don't have funds to summon the Guardian. We failed to summon the Guardian.";
+		else {
+			Zeny = Zeny - 10000;
+			setcastledata .@map$,(.@s+10),1;
+			guardian .@map$, .@x[.@s], .@y[.@s], .@name$[.@s], .@mob_id[.@s], "Kafra Employee#"+ strnpcinfo(4) +"::OnGuardianDied", .@s;
+			mes "We completed the summoning of the Guardian. Our defenses are now increased with it in place.";
+		}
+		close;
+
+	case 5:
+		mes .@npc_name$;
+		if (getcastledata(.@map$,9) == 1) {
+			mes "We are currently hiring a Kafra Employee... Do you want to fire the Kafra Employee?";
+			next;
+			if (select( "Fire","Cancel" ) == 2) {
+				mes .@npc_name$;
+				mes "She worked hard in my opinion. It was a good decision to keep her.";
+				close;
+			}
+			cutin "kafra_01",2;
+			mes "[ Hired Kafra Employee ]";
+			mes "I worked so hard... How can you do that, Master?... Please... Please reconsider... Check it again, Master... Please...";
+			next;
+			if (select( "Fire","Cancel" ) == 2) {
+				mes "[ Hired Kafra Employee ]";
+				mes "I'll work hard for you... Thank you!";
+				close;
+			}
+			mes "[ Hired Kafra Employee ]";
+			mes "Oh, my goodness! This is nonsense!";
+			next;
+			cutin "",255;
+			disablenpc "Kafra Employee#" + .@map$;
+			setcastledata .@map$,9,0;
+			mes .@npc_name$;
+			mes "....";
+			mes "I have discharged the Kafra Employee... But... are you unsatisfied with something?";
+			close;
+		}
+		mes "Will you contact the kafra Main Office and Hire a Employee for our Castle?";
+		mes "^ff0000 10,000 zeny is required for their services. ";
+		next;
+		if (select( "Hire.","Cancel" ) == 2) {
+			mes .@npc_name$;
+			mes "I did as you ordered, but some of our members will be unhappy. It will be better to hire a Kafra Employee quickly.";
+			close;
+		}
+		mes .@npc_name$;
+		if (getgdskilllv(.@guild_id,10001) == 0) {
+			mes "Master, we can't hire a Kafra Employee because we don't have a contract with the Kafra Main Office. If you want to obtain a contract with the Kafra Main Office, you will need to learn the Guild skill first.";
+			close;
+		}
+		if (Zeny <  10000) {
+			mes "Well... I'm sorry but we don't have enough funds to hire a Kafra Employee.";
+			close;
+		}
+		Zeny = Zeny - 10000;
+		enablenpc "Kafra Employee#" + .@map$;
+		setcastledata .@map$,9,1;
+
+		mes "We obtained a contract with the kafra Main Office, and hired a Kafra Employee.";
+		next;
+		cutin "kafra_01",2;
+		mes "[ Hired Kafra Employee ]";
+		mes "How do you do? I was dispatched from the Main Office.";
+		mes "I'll do my best to not tarnish the reputation of the Guild.";
+		next;
+		cutin "",255;
+		mes .@npc_name$;
+		mes "The Contract terms of the hired Kafra Employee are for 1 month and after this term, you will need to to pay an additional fee.";
+		mes "It will be useful for our members.";
+		close;
+
+	case 6:
+		mes .@npc_name$;
+		mes "Do you want to visit the room where our valuables are stored?";
+		mes "That room is restricted to you... you are the only one with access to it.";
+		next;
+		mes .@npc_name$;
+		mes "If you don't open the treasure box within time limits, there is a possibility of losing it when unexpected situation occurs.";
+		mes "Please make sure to remember that always, Master.";
+		mes "So, for our guild's improvement, you must find time to collect it.";
+		next;
+		switch( select( "Go into Master's room.","Cancel" ) ) {
+		case 1:
+			mes .@npc_name$;
+			mes "I'll show you the secret path. Follow me...please.";
+			mes "When you want to return here, please press the secret switch.";
+			close2;
+			if (.@map$ == "te_aldecas1") warp "te_aldecas1",113,223;
+			else if (.@map$ == "te_aldecas2") warp "te_aldecas2",134,225;
+			else if (.@map$ == "te_aldecas3") warp "te_aldecas3",229,267;
+			else if (.@map$ == "te_aldecas4") warp "te_aldecas4",83,17;
+			else if (.@map$ == "te_aldecas5") warp "te_aldecas5",64,8;
+			else if (.@map$ == "te_prtcas01") warp "te_prtcas01",15,209;
+			else if (.@map$ == "te_prtcas02") warp "te_prtcas02",207,229;
+			else if (.@map$ == "te_prtcas03") warp "te_prtcas03",190,130;
+			else if (.@map$ == "te_prtcas04") warp "te_prtcas04",275,160;
+			else if (.@map$ == "te_prtcas05") warp "te_prtcas05",281,176;
+			end;
+		case 2:
+			mes .@npc_name$;
+			mes "Goods are produced once a day... if you don't remove them in time, they will not be produced anymore.";
+			mes "Therefore, it will be better if you check up on them from time to time.";
+			close;
+		}
+	}
+
+S_Invest:
+	.@cost_invest = getarg(1);
+	.@num_invest_today = getarg(2);
+	.@npc_name$ = "[ Butler "+ strnpcinfo(1) +"]";
+	if (.@num_invest_today)// Quadruple the cost of investing if you've already invested once.
+		.@cost_invest = .@cost_invest * 4;
+
+	mes .@npc_name$;
+	mes "If you invest in "+ getarg(3) +", the "+ getarg(4) +". Therfore, if you consider our "+ getarg(5) +", investments will be a necessity.";
+	mes " ";
+	mes "Initially, you are able to invest just once but if you pay more money, you will be able to invest twice.";
+	mes " ";
+	if (getcastledata(strnpcinfo(4),2) >= 100) {
+		mes "^ff0000The "+ getarg(3) +" level of our Castle is at it's highest, 100%. No more investments are needed. Just as I have expected from a great "+ getarg(6) +" like you, Master.^000000";
+		close;
+	}
+	if (.@num_invest_today >= 2) {
+		mes "^ff0000You have already invested twice today. You cannot invest any more.^000000 I expect the "+ getarg(7) +" of the guild to grow at a high rate.";
+		close;
+	}
+	if (.@num_invest_today == 0)
+		mes "The current investment amount required is ^ff0000"+.@cost_invest+"^000000 zeny. Will you invest?";
+	else
+		mes "You've invested once today... if you wish to invest once more, ^ff0000"+.@cost_invest+"^000000 more zeny will be needed.";
+	next;
+	switch( select( "Invest in "+ getarg(3) +".","Cancel" ) ) {
+	case 1:
+		mes .@npc_name$;
+		if (Zeny < .@cost_invest) {
+			mes "I'm sorry but there is not enough zeny to invest. You will have to try again when you have the funds, Master.";
+			close;
+		}
+		Zeny = Zeny - .@cost_invest;
+		setcastledata strnpcinfo(4), getarg(0), (.@num_invest_today +1);
+		mes "We finished the investment safely. I expect that our "+ getarg(3) +" level will be increased by tomorrow.";
+		close;
+	case 2:
+		mes .@npc_name$;
+		mes "I'll do as you bid, my master... There is no hurry. We will do our best.";
+		close;
+	}
+
+function GuardianData {
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "te_aldecas1") {
+		setarray .@data$[0],
+			1287, 17, 218, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 39, 205, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 38, 196, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 21, 194, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 218, 24, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 213, 24, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 73, 70, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1285, 45, 228, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_aldecas2") {
+		setarray .@data$[0],
+			1287, 51, 183, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1286, 27, 184, "Outer Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 88, 43, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1285, 210, 7, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1287, 60, 203, "Outer Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 21, 177, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 117, 46, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1285, 36, 183, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_aldecas3") {
+		setarray .@data$[0],
+			1285, 110, 217, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 90, 112, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 86, 120, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 195, 151, "Inner Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 116, 112, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 116, 76, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 64, 103, "Outer Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 212, 160, "Inner Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_aldecas4") {
+		setarray .@data$[0],
+			1285, 187, 100, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 192, 42, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 55, 88, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 145, 209, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 169, 53, "Outer Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 198, 77, "Outer Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 148, 88, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 48, 72, "Inner Castle Knight Guardian";// KNIGHT_GUARDIAN
+	}
+	else if (.@map$ == "te_aldecas5") {
+		setarray .@data$[0],
+			1285, 51, 202, "Inner Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 27, 221, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 145, 78, "Outer Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 157, 192, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 157, 74, "Outer Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 188, 79, "Inner Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 156, 73, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 41, 112, "Inner Castle Knight Guardian";// KNIGHT_GUARDIAN
+	}
+	else if (.@map$ == "te_prtcas01") {
+		setarray .@data$[0],
+			1287, 182, 68, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 182, 116, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 153, 86, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 59, 28, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 50, 36, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1286, 184, 183, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 196, 189, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 107, 179, "Inner Castle Knight Guardian";// KNIGHT_GUARDIAN
+	}
+	else if (.@map$ == "te_prtcas02") {
+		setarray .@data$[0],
+			1286, 162, 161, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 153, 161, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 178, 44, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 71, 75, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 49, 28, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 64, 186, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 76, 196, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 75, 175, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_prtcas03") {
+		setarray .@data$[0],
+			1286, 191, 190, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 137, 190, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 45, 99, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 50, 87, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 41, 87, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 191, 42, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 179, 43, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 191, 72, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_prtcas04") {
+		setarray .@data$[0],
+			1286, 276, 14, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 274, 35, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 246, 246, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 38, 240, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 29, 240, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 33, 258, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 78, 48, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 36, 61, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	else if (.@map$ == "te_prtcas05") {
+		setarray .@data$[0],
+			1286, 266, 262, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 287, 280, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1286, 245, 250, "Inner Castle Knight Guardian",// KNIGHT_GUARDIAN
+			1287, 236, 63, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 251, 63, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1287, 278, 71, "Inner Castle Soldier Guardian",// SOLDIER_GUARDIAN
+			1285, 32, 253, "Outer Castle Archer Guardian",// ARCHER_GUARDIAN
+			1285, 44, 248, "Outer Castle Archer Guardian";// ARCHER_GUARDIAN
+	}
+	for ( .@i = 0; .@i < getarraysize(.@data$); .@i += 4 ) {
+		set getelementofarray( getarg(0),.@index ), .@data$[.@i];
+		set getelementofarray( getarg(1),.@index ), .@data$[.@i+1];
+		set getelementofarray( getarg(2),.@index ), .@data$[.@i+2];
+		set getelementofarray( getarg(3),.@index ), .@data$[.@i+3];
+		.@index++;
+	}
+}
+
+OnSpawnGuardians:
+	GuardianData( .@mob_id, .@x, .@y, .@name$ );
+	.@map$ = strnpcinfo(4);
+	killmonster .@map$, "Kafra Employee#"+ strnpcinfo(4) +"::OnGuardianDied";
+	for ( .@i = 0; .@i < MAX_GUARDIANS; .@i++ ) {
+		if (getcastledata( .@map$,(.@i+10) ))
+			guardian .@map$, .@x[.@i], .@y[.@i], .@name$[.@i], .@mob_id[.@i], "Kafra Employee#"+ strnpcinfo(4) +"::OnGuardianDied",.@i;
+	}
+}
+
+// Guild Dungeon Entrances
+//============================================================
+-	script	lever2_TE	-1,{
+	.@guild_id = getcastledata( strnpcinfo(4),1 );
+	if (.@guild_id == 0) {
+		mes "[Ringing Voice]";
+		mes "'Those who overcome an ordeal shows a great deal of bravery... and will find their way to another ordeal.'";
+		close;
+	}
+	mes "[Ringing Voice]";
+	mes "'Only the truly brave can take the test.'";
+	next;
+	mes " ";
+	mes "There's a small lever. Will you pull it?";
+	next;
+	if (select( "Pull.","Don't pull." ) == 1) {
+		if (.@guild_id == getcharid(2)) {
+			.@npc_map$ = strnpcinfo(4);
+			if (compare( .@npc_map$,"te_alde" )) {
+				.@map$ = "teg_dun02";
+				if (.@npc_map$ == "te_aldecas1") setarray .@coord[0],32,122;
+				else if (.@npc_map$ == "te_aldecas2") setarray .@coord[0],79,30;
+				else if (.@npc_map$ == "te_aldecas3") setarray .@coord[0],165,38;
+				else if (.@npc_map$ == "te_aldecas4") setarray .@coord[0],160,148;
+				else if (.@npc_map$ == "te_aldecas5") setarray .@coord[0],103,169;
+			}
+			else {
+				.@map$ = "teg_dun01";
+				if (.@npc_map$ == "te_prtcas01") setarray .@coord[0],28,251;
+				else if (.@npc_map$ == "te_prtcas02") setarray .@coord[0],164,268;
+				else if (.@npc_map$ == "te_prtcas03") setarray .@coord[0],164,179;
+				else if (.@npc_map$ == "te_prtcas04") setarray .@coord[0],268,203;
+				else if (.@npc_map$ == "te_prtcas05") setarray .@coord[0],199,28;
+			}
+			warp .@map$,.@coord[0],.@coord[1];
+		}
+		else {
+			mes " ";
+			mes "Nothing happened.";
+			close;
+		}
+	}
+	end;
+}
+
+// Treasure Room Exit
+//============================================================
+-	script	lever1_TE	-1,{
+	mes " ";
+	mes "There's a small lever. Will you pull it?";
+	next;
+	if ( select( "Pull.","Do not." ) == 1 ) {
+		.@map$ = strnpcinfo(4);
+		if (.@map$ == "te_aldecas1") setarray .@coord[0],218,176;
+		else if (.@map$ == "te_aldecas2") setarray .@coord[0],51,179;
+		else if (.@map$ == "te_aldecas3") setarray .@coord[0],110,119;
+		else if (.@map$ == "te_aldecas4") setarray .@coord[0],67,117;
+		else if (.@map$ == "te_aldecas5") setarray .@coord[0],51,179;
+		else if (.@map$ == "te_prtcas01") setarray .@coord[0],112,183;
+		else if (.@map$ == "te_prtcas02") setarray .@coord[0],94,62;
+		else if (.@map$ == "te_prtcas03") setarray .@coord[0],51,101;
+		else if (.@map$ == "te_prtcas04") setarray .@coord[0],259,265;
+		else if (.@map$ == "te_prtcas05") setarray .@coord[0],36,38;
+		warp .@map$,.@coord[0],.@coord[1];
+	}
+	end;
+}
+
+// Treasure Room Spawn Template
+//============================================================
+-	script	treasure_TE	-1,{
+OnClock0001:// Spawn Treasure Chests based on castle economy.
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "") end;
+	.@guild_id = getcastledata(.@map$,1);
+	if (.@guild_id == 0) end;
+
+	.@economy = getcastledata(.@map$,2);
+	.@defense = getcastledata(.@map$,3);
+	.@economy_today = getcastledata(.@map$,4);
+	.@defense_today = getcastledata(.@map$,5);
+
+	killmonster .@map$, strnpcinfo(0)+"::OnTreasureDied";
+	if (.@economy_today) {
+		.@economy = .@economy + .@economy_today + (rand(2) && getgdskilllv(.@guild_id,10014));
+		.@economy = ( .@economy > 100 ) ? 100 : .@economy;
+		setcastledata .@map$,2,.@economy;
+		setcastledata .@map$,4,0;
+	}
+	if (.@defense_today) {
+		.@defense = .@defense + .@defense_today;
+		.@defense = ( .@defense > 100 ) ? 100 : .@defense;
+		setcastledata .@map$,3,.@defense;
+		setcastledata .@map$,5,0;
+	}
+
+	if (.@map$ == "te_aldecas1") {
+		setarray .@data[0],// <mob_id>, <x>,<y>
+			2452, 115,226,// TREASURE_BOX_TE
+			2458, 122,226,// TREASURE_BOX_TE_6
+			2452, 115,219,
+			2458, 122,219,
+			2452, 116,225,
+			2458, 117,225,
+			2452, 118,225,
+			2458, 119,225,
+			2452, 120,225,
+			2458, 121,225,
+			2452, 121,224,
+			2458, 121,223,
+			2452, 121,222,
+			2458, 121,221,
+			2452, 121,220,
+			2458, 120,220,
+			2452, 119,220,
+			2458, 118,220,
+			2452, 117,220,
+			2458, 116,220,
+			2452, 116,221,
+			2458, 116,222,
+			2452, 116,223,
+			2458, 116,224;
+	}
+	else if (.@map$ == "te_aldecas2") {
+		setarray .@data[0],
+			2452, 134,231,// TREASURE_BOX_TE
+			2459, 135,231,// TREASURE_BOX_TE_7
+			2452, 135,230,
+			2459, 134,230,
+			2452, 132,233,
+			2459, 133,233,
+			2452, 134,233,
+			2459, 135,233,
+			2452, 136,233,
+			2459, 137,233,
+			2452, 137,232,
+			2459, 137,231,
+			2452, 137,230,
+			2459, 137,229,
+			2452, 137,228,
+			2459, 136,228,
+			2452, 135,228,
+			2459, 134,228,
+			2452, 133,228,
+			2459, 132,228,
+			2452, 132,229,
+			2459, 132,230,
+			2452, 132,231,
+			2459, 132,232;
+	}
+	else if (.@map$ == "te_aldecas3") {
+		setarray .@data[0],
+			2452, 224,269,// TREASURE_BOX_TE
+			2460, 225,269,// TREASURE_BOX_TE_8
+			2452, 225,268,
+			2460, 224,268,
+			2452, 222,271,
+			2460, 223,271,
+			2452, 224,271,
+			2460, 225,271,
+			2452, 226,271,
+			2460, 227,271,
+			2452, 227,270,
+			2460, 227,269,
+			2452, 227,268,
+			2460, 227,267,
+			2452, 227,266,
+			2460, 226,266,
+			2452, 225,266,
+			2460, 224,266,
+			2452, 223,266,
+			2460, 222,266,
+			2452, 222,267,
+			2460, 222,268,
+			2452, 222,269,
+			2460, 222,270;
+	}
+	else if (.@map$ == "te_aldecas4") {
+		setarray .@data[0],
+			2452, 84,13,// TREASURE_BOX_TE
+			2461, 85,13,// TREASURE_BOX_TE_9
+			2452, 85,12,
+			2461, 84,12,
+			2452, 82,15,
+			2461, 83,15,
+			2452, 84,15,
+			2461, 85,15,
+			2452, 86,15,
+			2461, 87,15,
+			2452, 87,14,
+			2461, 87,13,
+			2452, 87,12,
+			2461, 87,11,
+			2452, 87,10,
+			2461, 86,10,
+			2452, 85,10,
+			2461, 84,10,
+			2452, 83,10,
+			2461, 82,10,
+			2452, 82,11,
+			2461, 82,12,
+			2452, 82,13,
+			2461, 82,14;
+	}
+	else if (.@map$ == "te_aldecas5") {
+		setarray .@data[0],
+			2452, 62,12,// TREASURE_BOX_TE
+			2462, 62,11,// TREASURE_BOX_TE_10
+			2452, 61,11,
+			2462, 59,14,
+			2452, 60,14,
+			2462, 61,14,
+			2452, 62,14,
+			2462, 63,14,
+			2452, 64,14,
+			2462, 64,13,
+			2452, 64,12,
+			2462, 64,11,
+			2452, 64,10,
+			2462, 64,9,
+			2452, 63,9,
+			2462, 62,9,
+			2452, 61,9,
+			2462, 60,9,
+			2452, 59,9,
+			2462, 59,10,
+			2452, 59,11,
+			2462, 59,12,
+			2452, 59,13;
+	}
+	else if (.@map$ == "te_prtcas01") {
+		setarray .@data[0],
+			2452, 8,211,// TREASURE_BOX_TE
+			2453, 9,211,// TREASURE_BOX_TE_1
+			2452, 10,211,
+			2453, 11,211,
+			2452, 12,211,
+			2453, 13,211,
+			2452, 13,209,
+			2453, 12,209,
+			2452, 11,209,
+			2453, 10,209,
+			2452, 9,209,
+			2453, 8,209,
+			2452, 8,207,
+			2453, 9,207,
+			2452, 10,207,
+			2453, 11,207,
+			2452, 12,207,
+			2453, 13,207,
+			2452, 13,206,
+			2453, 12,206,
+			2452, 11,206,
+			2453, 10,206,
+			2452, 9,206,
+			2453, 8,206;
+	}
+	else if (.@map$ == "te_prtcas02") {
+		setarray .@data[0],
+			2452, 201,228,// TREASURE_BOX_TE
+			2454, 202,228,// TREASURE_BOX_TE_2
+			2452, 202,227,
+			2454, 201,227,
+			2452, 199,230,
+			2454, 200,230,
+			2452, 201,230,
+			2454, 202,230,
+			2452, 203,230,
+			2454, 204,230,
+			2452, 204,229,
+			2454, 204,228,
+			2452, 204,227,
+			2454, 204,226,
+			2452, 204,225,
+			2454, 203,225,
+			2452, 202,225,
+			2454, 201,225,
+			2452, 200,225,
+			2454, 199,225,
+			2452, 199,226,
+			2454, 199,227,
+			2452, 199,228,
+			2454, 199,229;
+	}
+	else if (.@map$ == "te_prtcas03") {
+		setarray .@data[0],
+			2452, 187,132,// TREASURE_BOX_TE
+			2455, 188,132,// TREASURE_BOX_TE_3
+			2452, 188,131,
+			2455, 187,131,
+			2452, 185,134,
+			2455, 186,134,
+			2452, 187,134,
+			2455, 188,134,
+			2452, 189,134,
+			2455, 190,134,
+			2452, 190,133,
+			2455, 190,132,
+			2452, 190,131,
+			2455, 190,130,
+			2452, 190,129,
+			2455, 189,129,
+			2452, 188,129,
+			2455, 187,129,
+			2452, 186,129,
+			2455, 185,129,
+			2452, 185,130,
+			2455, 185,131,
+			2452, 185,132,
+			2455, 185,133;
+	}
+	else if (.@map$ == "te_prtcas04") {
+		setarray .@data[0],
+			2452, 269,162,// TREASURE_BOX_TE
+			2456, 270,162,// TREASURE_BOX_TE_4
+			2452, 270,161,
+			2456, 269,161,
+			2452, 267,164,
+			2456, 268,164,
+			2452, 269,164,
+			2456, 270,164,
+			2452, 271,164,
+			2456, 272,164,
+			2452, 272,163,
+			2456, 272,162,
+			2452, 272,161,
+			2456, 272,160,
+			2452, 272,159,
+			2456, 271,159,
+			2452, 270,159,
+			2456, 269,159,
+			2452, 268,159,
+			2456, 267,159,
+			2452, 267,160,
+			2456, 267,161,
+			2452, 267,162,
+			2456, 267,163;
+	}
+	else if (.@map$ == "te_prtcas05") {
+		setarray .@data[0],
+			2452, 275,178,// TREASURE_BOX_TE
+			2457, 276,178,// TREASURE_BOX_TE_5
+			2452, 276,177,
+			2457, 275,177,
+			2452, 273,180,
+			2457, 274,180,
+			2452, 275,180,
+			2457, 276,180,
+			2452, 277,180,
+			2457, 278,180,
+			2452, 278,179,
+			2457, 278,178,
+			2452, 278,177,
+			2457, 278,176,
+			2452, 278,175,
+			2457, 277,175,
+			2452, 276,175,
+			2457, 275,175,
+			2452, 274,175,
+			2457, 273,175,
+			2452, 273,176,
+			2457, 273,177,
+			2452, 273,178,
+			2457, 273,179;
+	}
+	.@treasure_num = ( 4 + ( .@economy /5 ) ) *3;// x3 <-> data[] size
+	for ( .@i = 0; .@i < getarraysize(.@data) && .@treasure_num > .@i; .@i += 3 )// nb. [4;24] chests
+		monster .@map$, .@data[.@i+1], .@data[.@i+2],"Treasure Chest", .@data[.@i],1, strnpcinfo(0)+"::OnTreasureDied";
+
+OnTreasureDied:
+	end;
+}
+
+// Flag warp Template
+//============================================================
+function	script	F_flag_woe_TE	{
+	.@castle$ = getarg(1);
+	.@guild_id = getcastledata( .@castle$,1 );
+	if (.@guild_id == 0) {
+		mes "[ Edict of the Divine Rune-Midgarts Kingdom ]";
+		mes " ";
+		mes "1. Follow the ordinance of The Divine Rune-Midgarts Kingdom, ";
+		mes "We declare that";
+		mes "there is no formal master of this castle.";
+		mes " ";
+		mes "2. To the one who can ";
+		mes "overcome all trials";
+		mes "and destroy the Emperium,";
+		mes "the king will endow the one with";
+		mes "ownership of this castle.";
+		close;
+	}
+	if (.@guild_id == getcharid(2) && getarg(0)) {
+		mes "[ Echoing Voice ]";
+		mes "Brave ones...";
+		mes "Do you wish to return to your honorable place?";
+		next;
+		if (select( "Return to the guild castle.","Quit." ) == 1) {
+			if (jobcanentermap(.@castle$) == 0) {
+				mes "Tertiary job class and users with expanded levels are not allowed to participate in Training Siege Battles.";
+				close;
+			}
+			if (getcastledata( getarg(1),1 ) == getcharid(2))
+				warp getarg(1),getarg(2),getarg(3);
+			end;
+		}
+	}
+	.@guildname$ = getguildname(.@guild_id);
+	.@guildmaster$ = getguildmaster(.@guild_id);
+	mes "[ Edict of the Divine Rune-Midgarts Kingdom ]";
+	mes " ";
+	mes "1. Follow the ordinance of The Divine Rune-Midgarts Kingdom, ";
+	mes "we approve that this place is in";
+	mes "the private prossession of ^ff0000"+.@guildname$+"^000000 Guild.";
+	mes " ";
+	mes "2. The guild Master of ^ff0000"+.@guildname$+"^000000 Guild is";
+	mes "^ff0000"+.@guildmaster$+"^000000";
+	mes "If there is anyone who objects to this,";
+	mes "prove your strength and honor with a steel blade in your hand.";
+	close;
+}
+
+-	script	simple_info_TE	-1,{
+	callfunc( "F_flag_woe_TE",0,strnpcinfo(4) );
+OnInit:
+	if (strnpcinfo(4) != "")
+		flagemblem getcastledata( strnpcinfo(4),1 );
+	end;
+}
+
+-	script	flag_te	GUILD_FLAG,{
+	end;
+OnInit:
+	if (strnpcinfo(2) != "")
+		flagemblem getcastledata( strnpcinfo(2),1 );
+	end;
+}
+
+
+// GM NPC
+//============================================================
+prt_gld,1,4,0	script	#Enterance Button prt	CLEAR_NPC,{
+	mes "password";
+	next;
+	if ( callfunc( "F_GM_NPC", 1854,0, 0,9000 ) < 1 ) {
+		mes "That's not right";
+		close;
+	}
+	mes "What do you want to do with the Gloria-bound warp?";
+	next;
+	switch( select( "Open it","Close it","Cancel","Rental item provided" ) ) {
+	case 1:
+		mes "Opening the warp.";
+		enablenpc "to_gloria";
+		close;
+	case 2:
+		mes "Closing the warp.";
+		disablenpc "to_gloria";
+		close;
+	case 3:
+		end;
+	case 4:
+		mes "You have 300 seconds.";
+		rentitem 13083,300;// TE_Woe_Knife
+		close;
+	}
+}
+
+alde_gld,1,4,0	script	#Enterance Button ald	CLEAR_NPC,{
+	mes "password";
+	next;
+	if ( callfunc( "F_GM_NPC", 1854,0, 0,9000 ) < 1 ) {
+		mes "That's not right";
+		close;
+	}
+	mes "What do you want to do with the Kafragarten-bound warp?";
+	next;
+	switch( select( "Open it","Close it","Cancel" ) ) {
+	case 1:
+		mes "Opening the warp.";
+		enablenpc "to_kafragarten";
+		close;
+	case 2:
+		mes "Closing the warp.";
+		disablenpc "to_kafragarten";
+		close;
+	case 3:
+		end;
+	}
+}
+
+// God Item Hervor & Jormungand
+sec_in02,20,20,0	script	Test Guide	CLEAR_NPC,{
+	mes "Password?";
+	next;
+	if (callfunc( "F_GM_NPC", 18543792,0, 0,99999999 ) < 1) {
+		mes "Aww...";
+		close;
+	}
+	mes "We provide material items needed for testing TE.";
+	next;
+	switch( select( "Materials for Hervor","Materials for Jormungand" ) ) {
+	case 1:
+		getitem 6595,2;// Hammer_Of_Velund
+		getitem 6596,1;// Anvil_Of_Velund
+		getitem 6594,4;// Magic_Bronze_Bullion
+		getitem 6597,3;// Bracelet_Of_Velund
+		getitem 6602,1;// Secret_Of_Rune
+		getitem 6605,1;// Muspellium
+		getitem 6604,1;// Essence_Of_Rune
+		getitem 2115,1;// Valkyrja's_Shield
+		end;
+	case 2:
+		getitem 6603,4;// Skin_Of_Hraesvelg
+		getitem 6599,1;// Spirit_Of_Hugin
+		getitem 6598,1;// Rib_Of_Jormungand
+		getitem 6601,4;// Chisel_Of_Giant
+		getitem 6600,1;// Spirit_Of_Munin
+		getitem 6605,1;// Muspellium
+		getitem 6604,1;// Essence_Of_Rune
+		getitem 1473,1;// Wizardy_Staff
+		end;
+	}
+}

+ 51 - 0
npc/re/guild3/agit_start_te.txt

@@ -0,0 +1,51 @@
+//===== rAthena Script =======================================
+//= War of Emperium - Auto-Start
+//===== Description: =========================================
+//= Basic auto-start for War of Emperium TE.
+//===== Changelogs: ==========================================
+//= 1.0 First version. [Capuche]
+//============================================================
+
+-	script	woe_TE_contoller	-1,{
+function WoeTimer;
+
+OnSun2000:// date woe start
+	if (agitcheck3() == 0)
+		agitstart3;
+	end;
+OnSun2100:// date woe end
+	if (agitcheck3() == 1)
+		agitend3;
+	end;
+
+OnAgitInit3:
+	WoeTimer( "Sunday",20,21 );// <day>, <hour start>, <hour end>
+	end;
+
+function WoeTimer {
+	.@Sunday    = 0;
+	.@Monday    = 1;
+	.@Tuesday   = 2;
+	.@Wednesday = 3;
+	.@Thursday  = 4;
+	.@Friday    = 5;
+	.@Saturday  = 6;
+
+	.@day = getd( ".@"+ getarg(0) );
+	.@hour_start = getarg(1);
+	.@hour_end   = getarg(2);
+	.@woe_status = agitcheck3();
+	.@hour_today = gettime(3);
+	.@day_today  = gettime(4);
+	setd ".day_"+ .@day, 1;
+	setd ".hour_start_"+ .@hour_start, 1;
+
+	if (.@day_today == .@day) {
+		if (.@hour_today >= .@hour_start && .@hour_today < .@hour_end && .@woe_status == 0)
+			agitstart3;
+		else if (.@hour_today == .@hour_end && .@woe_status)
+			agitend3;
+	}
+	return;
+}
+}

+ 72 - 0
npc/re/guild3/te_aldecas1.txt

@@ -0,0 +1,72 @@
+//===== rAthena Script =======================================
+//= War of Emperium TE (Al De Baran) - Kafragarten 1
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Al De Baran Training Guild Castle 1
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+alde_gld,222,186,4	duplicate(flag_te)	Glaris#te_aldecas1	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_aldecas1,30,248,4	duplicate(simple_info_TE)	Glaris#1	GUILD_FLAG
+te_aldecas1,37,248,4	duplicate(simple_info_TE)	Glaris#2	GUILD_FLAG
+te_aldecas1,37,246,4	duplicate(simple_info_TE)	Glaris#3	GUILD_FLAG
+te_aldecas1,30,246,4	duplicate(simple_info_TE)	Glaris#4	GUILD_FLAG
+te_aldecas1,95,80,2	duplicate(simple_info_TE)	Glaris#5	GUILD_FLAG
+te_aldecas1,90,09,2	duplicate(simple_info_TE)	Glaris#6	GUILD_FLAG
+te_aldecas1,62,75,2	duplicate(simple_info_TE)	Glaris#7	GUILD_FLAG
+te_aldecas1,66,75,2	duplicate(simple_info_TE)	Glaris#8	GUILD_FLAG
+te_aldecas1,70,75,2	duplicate(simple_info_TE)	Glaris#9	GUILD_FLAG
+te_aldecas1,74,75,2	duplicate(simple_info_TE)	Glaris#10	GUILD_FLAG
+te_aldecas1,62,64,2	duplicate(simple_info_TE)	Glaris#11	GUILD_FLAG
+te_aldecas1,66,64,2	duplicate(simple_info_TE)	Glaris#12	GUILD_FLAG
+te_aldecas1,70,64,2	duplicate(simple_info_TE)	Glaris#13	GUILD_FLAG
+te_aldecas1,74,64,2	duplicate(simple_info_TE)	Glaris#14	GUILD_FLAG
+te_aldecas1,74,64,2	duplicate(simple_info_TE)	Glaris#15	GUILD_FLAG
+te_aldecas1,203,150,4	duplicate(simple_info_TE)	Glaris#16	GUILD_FLAG
+te_aldecas1,210,150,4	duplicate(simple_info_TE)	Glaris#17	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_alde_gld,61,87,6	script	Glaris#18	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE", 1, "te_aldecas1" ,218,170 );
+OnFlagTEGlaris:
+	flagemblem getcastledata( "te_aldecas1",1 );
+	end;
+}
+te_alde_gld,61,79,6	duplicate(Glaris#18)	Glaris#19	GUILD_FLAG
+te_alde_gld,45,87,8	duplicate(Glaris#18)	Glaris#20	GUILD_FLAG
+te_alde_gld,51,87,8	duplicate(Glaris#18)	Glaris#21	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_aldecas1,218,170,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_aldecas1	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_aldecas1,123,223,0	duplicate(lever1_TE)	#lever1_te_aldecas1	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_aldecas1,211,181,0	duplicate(lever2_TE)	#lever2_te_aldecas1	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_aldecas1,218,175,0	duplicate(invest_TE)	Clode	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_aldecas1,1,1,0	duplicate(treasure_TE)	treasure_TE#te_aldecas1	-1
+
+// Rental items npc
+//============================================================
+te_alde_gld,45,84,3	duplicate(rental_woe_TE)	Rental Manager#ag01	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_aldecas1,1,1,0	duplicate(Manager_TE)	Manager_TE#Glaris	-1

+ 67 - 0
npc/re/guild3/te_aldecas2.txt

@@ -0,0 +1,67 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Al De Baran) - Kafragarten 2
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Al De Baran Training Guild Castle 2
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+alde_gld,220,184,4	duplicate(flag_te)	Defolty#te_aldecas2	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_aldecas2,82,71,2	duplicate(simple_info_TE)	Defolty#1	GUILD_FLAG
+te_aldecas2,67,30,2	duplicate(simple_info_TE)	Defolty#2	GUILD_FLAG
+te_aldecas2,183,140,2	duplicate(simple_info_TE)	Defolty#3	GUILD_FLAG
+te_aldecas2,212,152,2	duplicate(simple_info_TE)	Defolty#4	GUILD_FLAG
+te_aldecas2,108,39,2	duplicate(simple_info_TE)	Defolty#5	GUILD_FLAG
+te_aldecas2,57,213,2	duplicate(simple_info_TE)	Defolty#6	GUILD_FLAG
+te_aldecas2,103,53,2	duplicate(simple_info_TE)	Defolty#7	GUILD_FLAG
+te_aldecas2,73,53,2	duplicate(simple_info_TE)	Defolty#8	GUILD_FLAG
+te_aldecas2,63,41,2	duplicate(simple_info_TE)	Defolty#9	GUILD_FLAG
+te_aldecas2,229,6,2	duplicate(simple_info_TE)	Defolty#10	GUILD_FLAG
+te_aldecas2,230,40,2	duplicate(simple_info_TE)	Defolty#11	GUILD_FLAG
+te_aldecas2,197,40,2	duplicate(simple_info_TE)	Defolty#12	GUILD_FLAG
+te_aldecas2,32,213,2	duplicate(simple_info_TE)	Defolty#13	GUILD_FLAG
+te_aldecas2,121,29,2	duplicate(simple_info_TE)	Defolty#14	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_alde_gld,99,251,4	script	Defolty#15	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE", 1, "te_aldecas2" ,84,74 );
+OnFlagTEDefolty:
+	flagemblem getcastledata( "te_aldecas2",1 );
+	end;
+}
+te_alde_gld,99,244,4	duplicate(Defolty#15)	Defolty#16	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_aldecas2,84,74,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_aldecas2	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_aldecas2,139,234,0	duplicate(lever1_TE)	#lever1_te_aldecas2	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_aldecas2,194,136,0	duplicate(lever2_TE)	#lever2_te_aldecas2	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_aldecas2,78,74,0	duplicate(invest_TE)	Lares	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_aldecas2,1,1,0	duplicate(treasure_TE)	treasure_TE#te_aldecas2	-1
+
+// Rental items npc
+//============================================================
+te_alde_gld,99,252,3	duplicate(rental_woe_TE)	Rental Manager#ag02	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_aldecas2,1,1,0	duplicate(Manager_TE)	Manager_TE#Defolty	-1

+ 70 - 0
npc/re/guild3/te_aldecas3.txt

@@ -0,0 +1,70 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Al De Baran) - Kafragarten 3
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Al De Baran Training Guild Castle 3
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+alde_gld,218,182,4	duplicate(flag_te)	Sorin#te_aldecas3	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_aldecas3,176,175,2	duplicate(simple_info_TE)	Sorin#1	GUILD_FLAG
+te_aldecas3,77,115,2	duplicate(simple_info_TE)	Sorin#2	GUILD_FLAG
+te_aldecas3,77,215,2	duplicate(simple_info_TE)	Sorin#3	GUILD_FLAG
+te_aldecas3,112,107,2	duplicate(simple_info_TE)	Sorin#4	GUILD_FLAG
+te_aldecas3,112,117,2	duplicate(simple_info_TE)	Sorin#5	GUILD_FLAG
+te_aldecas3,69,71,2	duplicate(simple_info_TE)	Sorin#6	GUILD_FLAG
+te_aldecas3,85,62,6	duplicate(simple_info_TE)	Sorin#7	GUILD_FLAG
+te_aldecas3,108,60,2	duplicate(simple_info_TE)	Sorin#8	GUILD_FLAG
+te_aldecas3,121,73,2	duplicate(simple_info_TE)	Sorin#9	GUILD_FLAG
+te_aldecas3,121,73,2	duplicate(simple_info_TE)	Sorin#10	GUILD_FLAG
+te_aldecas3,75,102,2	duplicate(simple_info_TE)	Sorin#11	GUILD_FLAG
+te_aldecas3,199,169,2	duplicate(simple_info_TE)	Sorin#12	GUILD_FLAG
+te_aldecas3,181,179,2	duplicate(simple_info_TE)	Sorin#13	GUILD_FLAG
+te_aldecas3,192,44,2	duplicate(simple_info_TE)	Sorin#14	GUILD_FLAG
+te_aldecas3,208,145,2	duplicate(simple_info_TE)	Sorin#15	GUILD_FLAG
+te_aldecas3,207,75,2	duplicate(simple_info_TE)	Sorin#16	GUILD_FLAG
+te_aldecas3,96,62,2	duplicate(simple_info_TE)	Sorin#17	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_alde_gld,146,82,0	script	Sorin#18	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_aldecas3",118,76 );
+OnFlagTESorin:
+	flagemblem getcastledata( "te_aldecas3",1 );
+	end;
+}
+te_alde_gld,138,83,0	duplicate(Sorin#18)	Sorin#19	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_aldecas3,118,76,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_aldecas3	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_aldecas3,219,269,0	duplicate(lever1_TE)	#lever1_te_aldecas3	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_aldecas3,200,177,0	duplicate(lever2_TE)	#lever2_te_aldecas3	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_aldecas3,110,118,0	duplicate(invest_TE)	Valerian	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_aldecas3,1,1,0	duplicate(treasure_TE)	treasure_TE#te_aldecas3	-1
+
+// Rental items npc
+//============================================================
+te_alde_gld,137,84,3	duplicate(rental_woe_TE)	Rental Manager#ag03	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_aldecas3,1,1,0	duplicate(Manager_TE)	Manager_TE#Sorin	-1

+ 72 - 0
npc/re/guild3/te_aldecas4.txt

@@ -0,0 +1,72 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Al De Baran) - Kafragarten 4
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Al De Baran Training Guild Castle 4
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+alde_gld,216,180,4	duplicate(flag_te)	Bennit#te_aldecas4	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_aldecas4,167,61,2	duplicate(simple_info_TE)	Bennit#1	GUILD_FLAG
+te_aldecas4,164,90,2	duplicate(simple_info_TE)	Bennit#2	GUILD_FLAG
+te_aldecas4,129,193,2	duplicate(simple_info_TE)	Bennit#3	GUILD_FLAG
+te_aldecas4,112,206,2	duplicate(simple_info_TE)	Bennit#4	GUILD_FLAG
+te_aldecas4,113,212,2	duplicate(simple_info_TE)	Bennit#5	GUILD_FLAG
+te_aldecas4,77,117,2	duplicate(simple_info_TE)	Bennit#6	GUILD_FLAG
+te_aldecas4,186,42,2	duplicate(simple_info_TE)	Bennit#7	GUILD_FLAG
+te_aldecas4,30,69,2	duplicate(simple_info_TE)	Bennit#8	GUILD_FLAG
+te_aldecas4,55,97,2	duplicate(simple_info_TE)	Bennit#9	GUILD_FLAG
+te_aldecas4,45,98,2	duplicate(simple_info_TE)	Bennit#10	GUILD_FLAG
+te_aldecas4,33,116,2	duplicate(simple_info_TE)	Bennit#11	GUILD_FLAG
+te_aldecas4,130,180,2	duplicate(simple_info_TE)	Bennit#12	GUILD_FLAG
+te_aldecas4,129,193,2	duplicate(simple_info_TE)	Bennit#13	GUILD_FLAG
+te_aldecas4,33,107,2	duplicate(simple_info_TE)	Bennit#14	GUILD_FLAG
+te_aldecas4,133,220,2	duplicate(simple_info_TE)	Bennit#15	GUILD_FLAG
+te_aldecas4,169,22,2	duplicate(simple_info_TE)	Bennit#16	GUILD_FLAG
+te_aldecas4,169,15,2	duplicate(simple_info_TE)	Bennit#17	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_alde_gld,239,246,2	script	Bennit#18	GUILD_FLAG,{
+	// callfunc( "F_flag_woe_TE",1,"te_aldecas1",218,170 );
+	callfunc( "F_flag_woe_TE",1,"te_aldecas4",45,88 );
+OnFlagTEBennit:
+	flagemblem getcastledata( "te_aldecas4",1 );
+	end;
+}
+// te_alde_gld,45,87,8	duplicate(Bennit#18)	Bennit#19	GUILD_FLAG
+te_alde_gld,239,239,2	duplicate(Bennit#18)	Bennit#20	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_aldecas4,45,88,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_aldecas4	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_aldecas4,79,15,0	duplicate(lever1_TE)	#lever1_te_aldecas4	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_aldecas4,76,64,0	duplicate(lever2_TE)	#lever2_te_aldecas4	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_aldecas4,67,116,0	duplicate(invest_TE)	Alpores	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_aldecas4,1,1,0	duplicate(treasure_TE)	treasure_TE#te_aldecas4	-1
+
+// Rental items npc
+//============================================================
+te_alde_gld,240,245,3	duplicate(rental_woe_TE)	Rental Manager#ag04	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_aldecas4,1,1,0	duplicate(Manager_TE)	Manager_TE#Bennit	-1

+ 71 - 0
npc/re/guild3/te_aldecas5.txt

@@ -0,0 +1,71 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Al De Baran) - Kafragarten 5
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Al De Baran Training Guild Castle 5
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+alde_gld,214,178,4	duplicate(flag_te)	W#te_aldecas5	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_aldecas5,170,85,2	duplicate(simple_info_TE)	W#1	GUILD_FLAG
+te_aldecas5,142,212,2	duplicate(simple_info_TE)	W#2	GUILD_FLAG
+te_aldecas5,149,196,2	duplicate(simple_info_TE)	W#3	GUILD_FLAG
+te_aldecas5,41,180,2	duplicate(simple_info_TE)	W#4	GUILD_FLAG
+te_aldecas5,38,201,2	duplicate(simple_info_TE)	W#5	GUILD_FLAG
+te_aldecas5,65,182,2	duplicate(simple_info_TE)	W#6	GUILD_FLAG
+te_aldecas5,65,205,2	duplicate(simple_info_TE)	W#7	GUILD_FLAG
+te_aldecas5,10,218,2	duplicate(simple_info_TE)	W#8	GUILD_FLAG
+te_aldecas5,10,218,2	duplicate(simple_info_TE)	W#9	GUILD_FLAG
+te_aldecas5,164,201,2	duplicate(simple_info_TE)	W#10	GUILD_FLAG
+te_aldecas5,14,117,2	duplicate(simple_info_TE)	W#11	GUILD_FLAG
+te_aldecas5,10,225,2	duplicate(simple_info_TE)	W#12	GUILD_FLAG
+te_aldecas5,187,59,2	duplicate(simple_info_TE)	W#13	GUILD_FLAG
+te_aldecas5,154,51,2	duplicate(simple_info_TE)	W#14	GUILD_FLAG
+te_aldecas5,22,211,2	duplicate(simple_info_TE)	W#15	GUILD_FLAG
+te_aldecas5,150,202,2	duplicate(simple_info_TE)	W#16	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_alde_gld,265,93,6	script	W#17	GUILD_FLAG,{
+	// callfunc( "F_flag_woe_TE",1,"te_aldecas1",218,170 );
+	callfunc( "F_flag_woe_TE",1,"te_aldecas5",31,190 );
+OnFlagTEW:
+	flagemblem getcastledata( "te_aldecas5",1 );
+	end;
+}
+// te_alde_gld,45,87,8	duplicate(W#17)	Glaris	GUILD_FLAG
+te_alde_gld,265,87,6	duplicate(W#17)	W#18	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_aldecas5,31,190,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_aldecas5	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_aldecas5,68,13,0	duplicate(lever1_TE)	#lever1_te_aldecas5	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_aldecas5,22,205,0	duplicate(lever2_TE)	#lever2_te_aldecas5	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_aldecas5,51,179,0	duplicate(invest_TE)	Anpere	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_aldecas5,1,1,0	duplicate(treasure_TE)	treasure_TE#te_aldecas5	-1
+
+// Rental items npc
+//============================================================
+te_alde_gld,264,94,3	duplicate(rental_woe_TE)	Rental Manager#ag05	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_aldecas5,1,1,0	duplicate(Manager_TE)	Manager_TE#W	-1

+ 65 - 0
npc/re/guild3/te_prtcas01.txt

@@ -0,0 +1,65 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Prontera) - Gloria 1
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Prontera Training Guild Castle 1
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+prt_gld,112,155,4	duplicate(flag_te)	Gaeborg#te_prtcas01	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_prtcas01,58,56,4	duplicate(simple_info_TE)	Gaebolg#1	GUILD_FLAG
+te_prtcas01,64,56,4	duplicate(simple_info_TE)	Gaebolg#2	GUILD_FLAG
+te_prtcas01,76,32,4	duplicate(simple_info_TE)	Gaebolg#3	GUILD_FLAG
+te_prtcas01,84,32,4	duplicate(simple_info_TE)	Gaebolg#4	GUILD_FLAG
+te_prtcas01,94,39,4	duplicate(simple_info_TE)	Gaebolg#5	GUILD_FLAG
+te_prtcas01,94,24,4	duplicate(simple_info_TE)	Gaebolg#6	GUILD_FLAG
+te_prtcas01,73,14,4	duplicate(simple_info_TE)	Gaebolg#7	GUILD_FLAG
+te_prtcas01,73,6,4	duplicate(simple_info_TE)	Gaebolg#8	GUILD_FLAG
+te_prtcas01,55,46,4	duplicate(simple_info_TE)	Gaebolg#9	GUILD_FLAG
+te_prtcas01,45,46,4	duplicate(simple_info_TE)	Gaebolg#10	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_prt_gld,131,60,6	script	Gaebolg#11	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_prtcas01",96,173 );
+OnFlagTEGaebolg:
+	flagemblem getcastledata( "te_prtcas01",1 );
+	end;
+}
+te_prt_gld,138,68,6	duplicate(Gaebolg#11)	Gaebolg#12	GUILD_FLAG
+te_prt_gld,138,60,6	duplicate(Gaebolg#11)	Gaebolg#13	GUILD_FLAG
+te_prt_gld,135,60,6	duplicate(Gaebolg#11)	Gaebolg#14	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_prtcas01,96,173,0	duplicate(Kafra_Staff_TE)	Kafra Employee#te_prtcas01	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_prtcas01,7,205,0	duplicate(lever1_TE)	#lever1_te_prtcas01	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_prtcas01,94,200,0	duplicate(lever2_TE)	#lever2_te_prtcas01	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_prtcas01,112,181,0	duplicate(invest_TE)	Kurbe	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_prtcas01,1,1,0	duplicate(treasure_TE)	treasure_TE#te_prtcas01	-1
+
+// Rental items npc
+//============================================================
+te_prt_gld,136,72,3	duplicate(rental_woe_TE)	Rental Manager#pg01	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_prtcas01,1,1,0	duplicate(Manager_TE)	Manager_TE#Gaebolg	-1

+ 67 - 0
npc/re/guild3/te_prtcas02.txt

@@ -0,0 +1,67 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Prontera) - Gloria 2
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Prontera Training Guild Castle 2
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+prt_gld,116,155,4	duplicate(flag_te)	Richard#te_prtcas02	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_prtcas02,40,227,4	duplicate(simple_info_TE)	Richard#1	GUILD_FLAG
+te_prtcas02,46,227,4	duplicate(simple_info_TE)	Richard#2	GUILD_FLAG
+te_prtcas02,11,219,4	duplicate(simple_info_TE)	Richard#3	GUILD_FLAG
+te_prtcas02,11,214,4	duplicate(simple_info_TE)	Richard#4	GUILD_FLAG
+te_prtcas02,20,219,4	duplicate(simple_info_TE)	Richard#5	GUILD_FLAG
+te_prtcas02,20,214,4	duplicate(simple_info_TE)	Richard#6	GUILD_FLAG
+te_prtcas02,79,227,8	duplicate(simple_info_TE)	Richard#7	GUILD_FLAG
+te_prtcas02,70,227,8	duplicate(simple_info_TE)	Richard#8	GUILD_FLAG
+te_prtcas02,38,189,8	duplicate(simple_info_TE)	Richard#9	GUILD_FLAG
+te_prtcas02,34,189,8	duplicate(simple_info_TE)	Richard#10	GUILD_FLAG
+te_prtcas02,153,161,4	duplicate(simple_info_TE)	Richard#11	GUILD_FLAG
+te_prtcas02,162,161,4	duplicate(simple_info_TE)	Richard#12	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_prt_gld,244,126,8	script	Richard#13	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_prtcas02",71,36 );
+OnFlagTERichard:
+	flagemblem getcastledata( "te_prtcas02",1 );
+	end;
+}
+te_prt_gld,244,128,8	duplicate(Richard#13)	Richard#14	GUILD_FLAG
+te_prt_gld,236,126,8	duplicate(Richard#13)	Richard#15	GUILD_FLAG
+te_prt_gld,236,128,8	duplicate(Richard#13)	Richard#16	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_prtcas02,71,36,4	duplicate(Kafra_Staff_TE)	Kafra Employee#te_prtcas02	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_prtcas02,206,228,0	duplicate(lever1_TE)	#lever1_te_prtcas02	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_prtcas02,84,72,0	duplicate(lever2_TE)	#lever2_te_prtcas02	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_prtcas02,94,61,4	duplicate(invest_TE)	Kamiyu	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_prtcas02,1,1,0	duplicate(treasure_TE)	treasure_TE#te_prtcas02	-1
+
+// Rental items npc
+//============================================================
+te_prt_gld,246,134,3	duplicate(rental_woe_TE)	Rental Manager#pg02	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_prtcas02,1,1,0	duplicate(Manager_TE)	Manager_TE#Richard	-1

+ 65 - 0
npc/re/guild3/te_prtcas03.txt

@@ -0,0 +1,65 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Prontera) - Gloria 3
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Prontera Training Guild Castle 3
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+prt_gld,120,155,4	duplicate(flag_te)	Wigner#te_prtcas03	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_prtcas03,168,28,4	duplicate(simple_info_TE)	Wigner#1	GUILD_FLAG
+te_prtcas03,182,28,4	duplicate(simple_info_TE)	Wigner#2	GUILD_FLAG
+te_prtcas03,43,50,4	duplicate(simple_info_TE)	Wigner#3	GUILD_FLAG
+te_prtcas03,48,50,4	duplicate(simple_info_TE)	Wigner#4	GUILD_FLAG
+te_prtcas03,43,58,4	duplicate(simple_info_TE)	Wigner#5	GUILD_FLAG
+te_prtcas03,48,58,4	duplicate(simple_info_TE)	Wigner#6	GUILD_FLAG
+te_prtcas03,158,210,4	duplicate(simple_info_TE)	Wigner#7	GUILD_FLAG
+te_prtcas03,169,210,4	duplicate(simple_info_TE)	Wigner#8	GUILD_FLAG
+te_prtcas03,162,201,4	duplicate(simple_info_TE)	Wigner#9	GUILD_FLAG
+te_prtcas03,165,201,4	duplicate(simple_info_TE)	Wigner#10	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_prt_gld,147,140,4	script	Wigner#11	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_prtcas03",181,215 );
+OnFlagTEWigner:
+	flagemblem getcastledata( "te_prtcas03",1 );
+	end;
+}
+te_prt_gld,147,136,4	duplicate(Wigner#11)	Wigner#12	GUILD_FLAG
+te_prt_gld,158,140,4	duplicate(Wigner#11)	Wigner#13	GUILD_FLAG
+te_prt_gld,158,136,4	duplicate(Wigner#11)	Wigner#14	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_prtcas03,181,215,4	duplicate(Kafra_Staff_TE)	Kafra Employee#te_prtcas03	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_prtcas03,192,134,0	duplicate(lever1_TE)	#lever1_te_prtcas03	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_prtcas03,5,70,0	duplicate(lever2_TE)	#lever2_te_prtcas03	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_prtcas03,51,100,4	duplicate(invest_TE)	Eduare	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_prtcas03,1,1,0	duplicate(treasure_TE)	treasure_TE#te_prtcas03	-1
+
+// Rental items npc
+//============================================================
+te_prt_gld,162,141,3	duplicate(rental_woe_TE)	Rental Manager#pg03	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_prtcas03,1,1,0	duplicate(Manager_TE)	Manager_TE#Wigner	-1

+ 65 - 0
npc/re/guild3/te_prtcas04.txt

@@ -0,0 +1,65 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Prontera) - Gloria 4
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Prontera Training Guild Castle 4
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+prt_gld,124,155,4	duplicate(flag_te)	Heine#te_prtcas04	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_prtcas04,82,29,4	duplicate(simple_info_TE)	Heine#1	GUILD_FLAG
+te_prtcas04,75,29,4	duplicate(simple_info_TE)	Heine#2	GUILD_FLAG
+te_prtcas04,75,27,4	duplicate(simple_info_TE)	Heine#3	GUILD_FLAG
+te_prtcas04,82,27,4	duplicate(simple_info_TE)	Heine#4	GUILD_FLAG
+te_prtcas04,59,29,4	duplicate(simple_info_TE)	Heine#5	GUILD_FLAG
+te_prtcas04,67,29,4	duplicate(simple_info_TE)	Heine#6	GUILD_FLAG
+te_prtcas04,258,25,4	duplicate(simple_info_TE)	Heine#7	GUILD_FLAG
+te_prtcas04,258,20,4	duplicate(simple_info_TE)	Heine#8	GUILD_FLAG
+te_prtcas04,263,20,4	duplicate(simple_info_TE)	Heine#9	GUILD_FLAG
+te_prtcas04,263,27,4	duplicate(simple_info_TE)	Heine#10	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_prt_gld,120,243,6	script	Heine#11	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_prtcas04",258,247 );
+OnFlagTEHeine:
+	flagemblem getcastledata( "te_prtcas04",1 );
+	end;
+}
+te_prt_gld,120,236,6	duplicate(Heine#11)	Heine#12	GUILD_FLAG
+te_prt_gld,122,243,6	duplicate(Heine#11)	Heine#13	GUILD_FLAG
+te_prt_gld,122,236,6	duplicate(Heine#11)	Heine#14	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_prtcas04,258,247,4	duplicate(Kafra_Staff_TE)	Kafra Employee#te_prtcas04	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_prtcas04,274,161,0	duplicate(lever1_TE)	#lever1_te_prtcas04	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_prtcas04,56,283,0	duplicate(lever2_TE)	#lever2_te_prtcas04	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_prtcas04,259,265,4	duplicate(invest_TE)	Casate	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_prtcas04,1,1,0	duplicate(treasure_TE)	treasure_TE#te_prtcas04	-1
+
+// Rental items npc
+//============================================================
+te_prt_gld,117,243,3	duplicate(rental_woe_TE)	Rental Manager#pg04	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_prtcas04,1,1,0	duplicate(Manager_TE)	Manager_TE#Heine	-1

+ 63 - 0
npc/re/guild3/te_prtcas05.txt

@@ -0,0 +1,63 @@
+//===== rAthena Script =======================================
+//= War of Emperium (Prontera) - Gloria 5
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPCs that relate to Prontera Training Guild Castle 5
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// Simple flags (no message)
+//============================================================
+prt_gld,128,155,4	duplicate(flag_te)	Nerious#te_prtcas05	GUILD_FLAG
+
+// Simple infos flags
+//============================================================
+te_prtcas05,19,247,4	duplicate(simple_info_TE)	Nerious#1	GUILD_FLAG
+te_prtcas05,19,243,4	duplicate(simple_info_TE)	Nerious#2	GUILD_FLAG
+te_prtcas05,26,247,4	duplicate(simple_info_TE)	Nerious#3	GUILD_FLAG
+te_prtcas05,26,243,4	duplicate(simple_info_TE)	Nerious#4	GUILD_FLAG
+te_prtcas05,249,289,4	duplicate(simple_info_TE)	Nerious#5	GUILD_FLAG
+te_prtcas05,256,289,4	duplicate(simple_info_TE)	Nerious#6	GUILD_FLAG
+te_prtcas05,253,271,4	duplicate(simple_info_TE)	Nerious#7	GUILD_FLAG
+te_prtcas05,273,257,4	duplicate(simple_info_TE)	Nerious#8	GUILD_FLAG
+
+// Infos flags + warp guildmaster inside
+//============================================================
+te_prt_gld,199,243,2	script	Nerious#9	GUILD_FLAG,{
+	callfunc( "F_flag_woe_TE",1,"te_prtcas05",52,41 );
+OnFlagTENerious:
+	flagemblem getcastledata( "te_prtcas05",1 );
+	end;
+}
+te_prt_gld,199,236,2	duplicate(Nerious#9)	Nerious#10	GUILD_FLAG
+te_prt_gld,197,243,2	duplicate(Nerious#9)	Nerious#11	GUILD_FLAG
+te_prt_gld,197,236,2	duplicate(Nerious#9)	Nerious#12	GUILD_FLAG
+
+// Guild kafra
+//============================================================
+te_prtcas05,52,41,4	duplicate(Kafra_Staff_TE)	Kafra Employee#te_prtcas05	4_F_KAFRA1
+
+// Lever 1 (warp outside treasure)
+//============================================================
+te_prtcas05,280,177,0	duplicate(lever1_TE)	#lever1_te_prtcas05	HIDDEN_NPC
+
+// Lever 2 (warp to dungeon)
+//============================================================
+te_prtcas05,212,95,0	duplicate(lever2_TE)	#lever2_te_prtcas05	HIDDEN_NPC
+
+// Invest eco / def / guardian
+//============================================================
+te_prtcas05,36,37,4	duplicate(invest_TE)	Pisaro	1_M_JOBTESTER
+
+// Treasure spawn
+//============================================================
+te_prtcas05,1,1,0	duplicate(treasure_TE)	treasure_TE#te_prtcas05	-1
+
+// Rental items npc
+//============================================================
+te_prt_gld,203,243,3	duplicate(rental_woe_TE)	Rental Manager#pg05	4_F_HUWOMAN
+
+// Manager woe
+//============================================================
+te_prtcas05,1,1,0	duplicate(Manager_TE)	Manager_TE#Nerious	-1

+ 18 - 1
npc/re/mapflag/gvg.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= rAthena Dev Team
 //===== Current Version: =====================================
-//= 1.0
+//= 1.1
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: ========================================= 
@@ -12,8 +12,11 @@
 //= gvg: Turns on GvG mode.
 //= gvg_castle: Describes castle maps for WoE.
 //= gvg_dungeon: Describes dungeon maps for WoE.
+//= gvg_te: Turns on GvG mode for WoE:TE.
+//= gvg_te_castle: Describes castle maps for WoE:TE.
 //===== Additional Comments: ================================= 
 //= 1.0 Renewal split. [Euphy]
+//= 1.1 Added GVG TE Castles. [Cydh]
 //============================================================
 
 // Guild Dungeons =========
@@ -21,3 +24,17 @@ gld2_ald	mapflag	gvg_dungeon
 gld2_gef	mapflag	gvg_dungeon
 gld2_pay	mapflag	gvg_dungeon
 gld2_prt	mapflag	gvg_dungeon
+teg_dun01	mapflag	gvg_dungeon
+teg_dun02	mapflag	gvg_dungeon
+
+// WOE:Training Edition Castles =====
+te_prtcas01	mapflag	gvg_te_castle
+te_prtcas02	mapflag	gvg_te_castle
+te_prtcas03	mapflag	gvg_te_castle
+te_prtcas04	mapflag	gvg_te_castle
+te_prtcas05	mapflag	gvg_te_castle
+te_aldecas1	mapflag	gvg_te_castle
+te_aldecas2	mapflag	gvg_te_castle
+te_aldecas3	mapflag	gvg_te_castle
+te_aldecas4	mapflag	gvg_te_castle
+te_aldecas5	mapflag	gvg_te_castle

+ 15 - 0
npc/re/mapflag/nobranch.txt

@@ -10,6 +10,7 @@
 //= 1.2 Added Nightmare Clock Tower [Lemongrass]
 //= 1.3 Added dali02 [Nova]
 //= 1.4 Added Nightmare Glastheim [Ridley8819]
+//= 1.5 Added WOE:TE maps [Cydh]
 //============================================================
 
 // 3rd Class Job Maps & Paradise
@@ -101,3 +102,17 @@ izlude_d	mapflag	nobranch
 1@ge_st	mapflag	nobranch
 dali	mapflag	nobranch
 dali02	mapflag	nobranch
+
+// WOE:TE Maps ===================
+te_alde_gld	mapflag	nobranch
+te_prt_gld	mapflag	nobranch
+te_prtcas01	mapflag	nobranch
+te_prtcas02	mapflag	nobranch
+te_prtcas03	mapflag	nobranch
+te_prtcas04	mapflag	nobranch
+te_prtcas05	mapflag	nobranch
+te_aldecas1	mapflag	nobranch
+te_aldecas2	mapflag	nobranch
+te_aldecas3	mapflag	nobranch
+te_aldecas4	mapflag	nobranch
+te_aldecas5	mapflag	nobranch

+ 16 - 9
npc/re/mapflag/noicewall.txt

@@ -1,15 +1,10 @@
 //===== rAthena Script =======================================
-//= Mapflag: Disable Ice Wall.
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
-//===== Description: ========================================= 
+//= Mapflag: Disables Ice Wall.
+//===== Description: =========================================
 //= Blocks usage of WZ_ICEWALL.
-//===== Additional Comments: ================================= 
+//===== Changelogs: ==========================================
 //= 1.0 Renewal split. [Euphy]
+//= 1.1 Added WOE:TE maps [Cydh]
 //============================================================
 
 // Misty Forest Labyrinth ===========
@@ -40,3 +35,15 @@
 // Heroes' Trail Part 1 =======
 1@sara	mapflag	noicewall
 1@face	mapflag	noicewall
+
+// WOE:TE Maps ===================
+te_prtcas01	mapflag	noicewall
+te_prtcas02	mapflag	noicewall
+te_prtcas03	mapflag	noicewall
+te_prtcas04	mapflag	noicewall
+te_prtcas05	mapflag	noicewall
+te_aldecas1	mapflag	noicewall
+te_aldecas2	mapflag	noicewall
+te_aldecas3	mapflag	noicewall
+te_aldecas4	mapflag	noicewall
+te_aldecas5	mapflag	noicewall

+ 15 - 0
npc/re/mapflag/nomemo.txt

@@ -8,6 +8,7 @@
 //= 1.1 Added Nightmare Clock Tower [Secret]
 //= 1.2 Added dali, dali02 [Nova]
 //= 1.3 Added Nightmare Glastheim [Ridley8819]
+//= 1.4 Added GVG TE Maps. [Cydh]
 //============================================================
 
 // Episode 13 ====================
@@ -127,3 +128,17 @@ gl_cas02_	mapflag	nomemo
 1@gef_in	mapflag	nomemo
 dali	mapflag	nomemo
 dali02	mapflag	nomemo
+
+// WOE:TE Maps ===================
+te_prtcas01	mapflag	nomemo
+te_prtcas02	mapflag	nomemo
+te_prtcas03	mapflag	nomemo
+te_prtcas04	mapflag	nomemo
+te_prtcas05	mapflag	nomemo
+te_aldecas1	mapflag	nomemo
+te_aldecas2	mapflag	nomemo
+te_aldecas3	mapflag	nomemo
+te_aldecas4	mapflag	nomemo
+te_aldecas5	mapflag	nomemo
+teg_dun01	mapflag	nomemo
+teg_dun02	mapflag	nomemo

+ 17 - 8
npc/re/mapflag/nosave.txt

@@ -1,16 +1,11 @@
 //===== rAthena Script =======================================
 //= Mapflag: Disable auto-save.
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
-//===== Description: ========================================= 
+//===== Description: =========================================
 //= Characters logging out on the specified map will be warped
 //= to the map specified in the last field, or "SavePoint".
-//===== Additional Comments: ================================= 
+//===== Changelogs: ==========================================
 //= 1.0 Renewal split. [Euphy]
+//= 1.1 Added GVG TE Guild Dungeons. [Capuche]
 //============================================================
 
 // Job Quests ====================
@@ -43,6 +38,20 @@ gld2_ald	mapflag	nosave	SavePoint
 gld2_gef	mapflag	nosave	SavePoint
 gld2_pay	mapflag	nosave	SavePoint
 gld2_prt	mapflag	nosave	SavePoint
+teg_dun01	mapflag	nosave	SavePoint
+teg_dun02	mapflag	nosave	SavePoint
+
+// WOE:Training Edition Castles =====
+te_prtcas01	mapflag	nosave	SavePoint
+te_prtcas02	mapflag	nosave	SavePoint
+te_prtcas03	mapflag	nosave	SavePoint
+te_prtcas04	mapflag	nosave	SavePoint
+te_prtcas05	mapflag	nosave	SavePoint
+te_aldecas1	mapflag	nosave	SavePoint
+te_aldecas2	mapflag	nosave	SavePoint
+te_aldecas3	mapflag	nosave	SavePoint
+te_aldecas4	mapflag	nosave	SavePoint
+te_aldecas5	mapflag	nosave	SavePoint
 
 // Misty Forest Labyrinth =========
 1@mist	mapflag	nosave	SavePoint

+ 23 - 0
npc/re/mapflag/noteleport.txt

@@ -11,6 +11,7 @@
 //===== Changelogs: ================================= 
 //= 1.0 Renewal split. [Euphy]
 //= 1.1 Added dali, dali02 [Nova]
+//= 1.2 Added WOE:TE maps [Cydh,Capuche]
 //============================================================
 
 // Cities ========================
@@ -92,3 +93,25 @@ gl_cas02_	mapflag	noteleport
 1@gef_in	mapflag	monster_noteleport
 dali	mapflag	noteleport
 dali02	mapflag	noteleport
+
+// WOE:TE Maps ===================
+te_prtcas01	mapflag	noteleport
+te_prtcas02	mapflag	noteleport
+te_prtcas03	mapflag	noteleport
+te_prtcas04	mapflag	noteleport
+te_prtcas05	mapflag	noteleport
+te_aldecas1	mapflag	noteleport
+te_aldecas2	mapflag	noteleport
+te_aldecas3	mapflag	noteleport
+te_aldecas4	mapflag	noteleport
+te_aldecas5	mapflag	noteleport
+te_prtcas01	mapflag	monster_noteleport
+te_prtcas02	mapflag	monster_noteleport
+te_prtcas03	mapflag	monster_noteleport
+te_prtcas04	mapflag	monster_noteleport
+te_prtcas05	mapflag	monster_noteleport
+te_aldecas1	mapflag	monster_noteleport
+te_aldecas2	mapflag	monster_noteleport
+te_aldecas3	mapflag	monster_noteleport
+te_aldecas4	mapflag	monster_noteleport
+te_aldecas5	mapflag	monster_noteleport

+ 24 - 0
npc/re/mapflag/nowarp.txt

@@ -0,0 +1,24 @@
+//===== rAthena Script =======================================
+//= Mapflag: Disable warping.
+//===== Description: ========================================= 
+//= Disables warping from a map.
+//= Script commands 'warpparty' and 'warpguild' will not warp
+//=   players.
+//= Atcommands @warp, @go, @load, @jump, @partyrecall,
+//=   @guildrecall, and @recallall will not warp players.
+//= GD_EMERGENCYCALL and UNT_CALLFAMILY will not warp players.
+//===== Changelogs: ==========================================
+//= 1.0 Added WoE TE maps. [Capuche]
+//============================================================
+
+// WOE:TE Maps ===================
+te_prtcas01	mapflag	nowarp
+te_prtcas02	mapflag	nowarp
+te_prtcas03	mapflag	nowarp
+te_prtcas04	mapflag	nowarp
+te_prtcas05	mapflag	nowarp
+te_aldecas1	mapflag	nowarp
+te_aldecas2	mapflag	nowarp
+te_aldecas3	mapflag	nowarp
+te_aldecas4	mapflag	nowarp
+te_aldecas5	mapflag	nowarp

+ 15 - 8
npc/re/mapflag/nowarpto.txt

@@ -1,18 +1,13 @@
 //===== rAthena Script =======================================
 //= Mapflag: Disable warpto.
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
-//===== Description: ========================================= 
+//===== Description: =========================================
 //= Disables warping to a map.
 //= Atcommands @warp, @go, @load, @jump, @partyrecall,
 //=   @guildrecall, and @recallall are disabled.
 //= Command /memo is disabled.
-//===== Additional Comments: ================================= 
+//===== Changelogs: ==========================================
 //= 1.0 Renewal split. [Euphy]
+//= 1.1 Added WOE:TE maps [Cydh]
 //============================================================
 
 // 14.1 Bifrost ==================
@@ -57,3 +52,15 @@ gl_cas02_	mapflag	nowarpto
 1@face	mapflag	nowarpto
 1@sara	mapflag	nowarpto
 1@gef_in	mapflag	nowarpto
+
+// WOE:TE Maps ===================
+te_prtcas01	mapflag	nowarpto
+te_prtcas02	mapflag	nowarpto
+te_prtcas03	mapflag	nowarpto
+te_prtcas04	mapflag	nowarpto
+te_prtcas05	mapflag	nowarpto
+te_aldecas1	mapflag	nowarpto
+te_aldecas2	mapflag	nowarpto
+te_aldecas3	mapflag	nowarpto
+te_aldecas4	mapflag	nowarpto
+te_aldecas5	mapflag	nowarpto

+ 7 - 8
npc/re/mapflag/restricted.txt

@@ -1,17 +1,12 @@
 //===== rAthena Script =======================================
 //= Mapflag: Restricted.
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Current Version: =====================================
-//= 1.1
-//===== Compatible With: =====================================
-//= rAthena Project
-//===== Description: ========================================= 
+//===== Description: =========================================
 //= Disables items configured in item_noequip.txt
 //= and skills configured in skill_nocast_db.txt.
-//===== Additional Comments: ================================= 
+//===== Changelogs: ==========================================
 //= 1.0 Renewal split. [Euphy]
 //= 1.1 Copied towns into this file. [Euphy]
+//= 1.2 Added WOE:TE maps [Cydh]
 //============================================================
 
 // Instances =====================
@@ -37,3 +32,7 @@ izlude_d	mapflag	restricted	7
 malangdo	mapflag	restricted	7
 malaya	mapflag	restricted	7
 mora	mapflag	restricted	7
+
+// Restricted maps for WOE:TE Items ==
+teg_dun01	mapflag	restricted	8
+teg_dun02	mapflag	restricted	8

+ 144 - 0
npc/re/merchants/te_merchant.txt

@@ -0,0 +1,144 @@
+//===== rAthena Script =======================================
+//= Merchant WoE TE
+//===== Description: =========================================
+//= [Official Conversion]
+//= Merchants and Rental merchant template for WoE TE
+//	(duplicates in re/woe_te/<castle file>).
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+te_prt_gld,114,153,4	shop	TE Potion Merchant#prt	4_M_TELEPORTER,11557:-1,11558:-1
+te_alde_gld,215,184,4	duplicate(TE Potion Merchant#prt)	TE Potion Merchant#alde	4_M_TELEPORTER
+
+// Rental Items manager
+//=======================================
+-	script	rental_woe_TE	-1,{
+	mes "[Rental Items Manager]";
+	if (jobcanentermap("te_prtcas01") == 1) {
+		.@list01$ = "[Shield] [Armor] [Garment]";
+		.@list02$ = "[Helmet] [Accessory] [Shoes]";
+		.@list03$ = "[Sword] [Spear] [Axe] [Katar]";
+		.@list04$ = "[Mace] [Staff] [Fist] [Book]";
+		.@list05$ = "[Bow] [Gun] [Musical Instrument] [Whip]";
+
+		mes "^4d4dffWe offer various battlegears that you can use in the regions of Gloria and Kafragarten based on the rules of Siege Battle TE.^000000";
+		next;
+		mes "[Rental Items Manager]";
+		mes "^4d4dffWe provide 1-day rental periods for free.^000000";
+		mes "However, the provided rental items ^4d4dffwill not be effective outside the Siege Battle TE area.^000000";
+		next;
+		mes "[Rental Items Manager]";
+		mes "^4d4dffYou have to be Lv 40 or higher in order to rent an item.^000000";
+		mes "Select the desired equipment.";
+		next;
+		while(1) {
+			switch( select( "View rental equipments", .@list01$, .@list02$, .@list03$, .@list04$, .@list05$, "Leave" ) ) {
+			case 1:
+				mes "[Rental Items Manager]";
+				mes "Here is a list of rental items and descriptions.";
+				close2;
+				readbook 11059,1;// WoE_TE_Rental_List
+				end;
+			case 2:
+				callsub( S_Rent, "shields, armors, and garments",
+					 2178,"TE Siege Buckler",		// TE_Woe_Buckler
+					 2179,"TE Siege Shield",		// TE_Woe_Shield
+					 2180,"TE Siege Magic Guard",	// TE_Woe_Magic_Guard
+					15062,"TE Siege Long Coat",		// TE_Woe_Coat
+					15063,"TE Siege Mail",			// TE_Woe_Chain_Mail
+					15064,"TE Siege Magic Coat",	// TE_Woe_Mage_Coat
+					20702,"TE Siege Muffler",		// TE_Woe_Muffler
+					20703,"TE Siege Cape",			// TE_Woe_Manteau
+					20704,"TE Siege Magic Cape" );	// TE_Woe_Magic_Manteau
+				break;
+			case 3:
+				callsub( S_Rent, "helmets, accessories, and shoes",
+					2496,"TE Siege Shoes",			// TE_Woe_Shoes
+					2497,"TE Siege Boots",			// TE_Woe_Boots
+					2498,"TE Siege Magic Sandals",	// TE_Woe_Magic_Sandal
+					2944,"TE Guardian Ring",		// TE_Ring_Of_Protection
+					2945,"TE Ring of Wrath",		// TE_Ring_Of_Rage
+					2946,"TE Ring of Rebellion",	// TE_Ring_Of_Defiance
+					18732,"TE Siege Cap",			// TE_Woe_Cap
+					18733,"TE Siege Bone Helm",		// TE_Woe_Bone_Helm
+					18734,"TE Siege Magic Eyes" );	// TE_Woe_Magic_Eyes
+				break;
+			case 4:
+				callsub( S_Rent, "swords, spears, axes, and katars",
+					1299,"TE Siege Katar",				// TE_Woe_Katar
+					1399,"TE Siege Two-Handed Axe",		// TE_Woe_Two_Handed_Axe
+					1495,"TE Siege Lance",				// TE_Woe_Lance
+					13317,"TE Siege Magic Shuriken",	// TE_Woe_Huuma
+					21006,"TE Siege Two-Handed Sword",	// TE_Woe_Two_Hand_Sword
+					1319,"TE Siege Axe",				// TE_Woe_Axe
+					1437,"TE Siege Pike",				// TE_Woe_Pike
+					13083,"TE Siege Knife",				// TE_Woe_Knife
+					13439,"TE Siege Sword" );			// TE_Woe_Sword
+				break;
+			case 5:
+				callsub( S_Rent, "staves, maces, books, and fists",
+					2019,"TE Siege Two-Handed Staff",// TE_Woe_Two_Hand_Staff
+					1591,"TE Siege Book",			// TE_Woe_Book
+					1667,"TE Siege Staff",			// TE_Woe_Staff
+					1834,"TE Siege Fist",			// TE_Woe_Fist
+					16025,"TE Siege Mace" );		// TE_Woe_Mace
+				break;
+			case 6:
+				callsub( S_Rent, "bows, guns, musical instruments, and whips",
+					18118,"TE Siege Bow",			// TE_Woe_Bow
+					13117,"TE Siege Pistol",		// TE_Woe_Pistol
+					13184,"TE Siege Rifle",			// TE_Woe_Rifle
+					13185,"TE Siege Gatling Gun",	// TE_Woe_Gatling
+					13186,"TE Siege Shotgun",		// TE_Woe_Shotgun
+					13187,"TE Siege Grenade Gun",	// TE_Woe_Grenade
+					1932,"TE Siege Guitar",			// TE_Woe_Guitar
+					1987,"TE Siege Rope" );			// TE_Woe_Rope
+				break;
+			case 7:
+				mes "[Rental Items Manager]";
+				mes "Come back anytime then.";
+				close;
+			}
+		}
+	}
+	mes "We offer various battlegears that you can use in the regions of Gloria and Kafragarten based on the rules of Siege Battle TE.";
+	next;
+	mes "[Rental Items Manager]";
+	mes "I'm sorry but your job class is not allowed to participate in Siege Battles TE.";
+	mes "I'm afraid I can't offer any items to you.";
+	close;
+
+S_Rent:
+	mes "[Rental Items Manager]";
+	if (checkweight(1304,3) == 0) {
+		mes "You already have too many items to receive a new rental equipment.";
+		mes "Please organize your items and try again.";
+		close;
+	}
+	mes "We have "+ getarg(0) +" ready for you.";
+	mes "Select the desired item.";
+	next;
+	for ( .@i = 1; .@i < getargcount(); .@i += 2 ) {
+		if (countitem(getarg(.@i)) > isequippedcnt(getarg(.@i)))// don't count item equipped
+			.@menu$ = .@menu$ + "^4d4dff"+ getarg(.@i+1) +" - Checked out^000000:";
+		else
+			.@menu$ = .@menu$ + getarg(.@i+1) + ":";
+	}
+	.@total_item = (getargcount() -1) /2;
+	.@s = select( .@menu$ + ":View other items" ) -1;
+	if (.@s <= .@total_item) {
+		.@index = .@s *2 +1;
+		mes "[Rental Items Manager]";
+		if (countitem(getarg(.@index)) > isequippedcnt(getarg(.@index)))
+			mes "You already have "+ getarg(.@index+1) +".";
+		else {
+			mes "Here is "+ getarg(.@index+1) +".";
+			mes "^4d4dffThis item is effective for the next 24 hours^000000 and after that it expires.";
+			rentitem getarg(.@index),86400;
+		}
+		mes "Do you need anything else?";
+		next;
+	}
+	return;
+}

+ 30 - 0
npc/re/mobs/dungeons/teg_dun.txt

@@ -0,0 +1,30 @@
+//===== rAthena Script =======================================
+//= TE Guild Dungeon Monster
+//===== Description: =========================================
+//= Official monster spawn for TE Guild Dungeons
+//===== Changelogs: ==========================================
+//= 1.0 First version
+//============================================================
+
+// =======================
+// Gloria Guild Dungeon
+// =======================
+teg_dun01,0,0,0,0	monster	Knight Seyren	2415,20,5000,0,0
+teg_dun01,0,0,0,0	monster	Assassin Eremes	2416,15,5000,0,0
+teg_dun01,0,0,0,0	monster	Blacksmith Howard	2417,15,5000,0,0
+teg_dun01,0,0,0,0	monster	Hunter Cecil	2418,35,5000,0,0
+teg_dun01,0,0,0,0	monster	Wizard Kathryne	2419,30,5000,0,0
+teg_dun01,0,0,0,0	monster	Priest Margaretha	2420,20,5000,0,0
+teg_dun01,0,0,0,0	boss_monster	The Last One	2441,1,28800000,0,0
+
+// =======================
+// Kafragaten Guild Dungeon
+// =======================
+teg_dun02,0,0,0,0	monster	Crusader Egnigem	2421,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Rogue Wickebine	2422,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Alchemist Armeyer	2423,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Bard Kavach	2424,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Dancer Josephina	2425,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Sage Laurell	2426,15,5000,0,0
+teg_dun02,0,0,0,0	monster	Monk Errende	2427,15,5000,0,0
+teg_dun02,0,0,0,0	boss_monster	King of the Alley	2442,1,7200000,0,0

+ 27 - 0
npc/re/other/Global_Functions.txt

@@ -0,0 +1,27 @@
+//============================================================ 
+//===== rAthena Script =======================================
+//= Global Functions
+//===== Description: =========================================
+//= General script functions.
+//===== Changelogs: ==========================================
+//= 1.0 WoeTETimeStart(X) function check if the woe
+//	will start in X seconds or less. [Capuche]
+//============================================================
+
+// WoeTETimeStart(<seconds>) : return true if the woe te will start in X seconds or less, false otherwise
+function	script	WoeTETimeStart	{
+	.@woe_status = agitcheck3();
+	.@min_today  = gettime(2);
+	.@hour_today = gettime(3);
+	.@day_today  = gettime(4);
+
+	if (getvariableofnpc( getd( ".day_"+ .@day_today ),"woe_TE_contoller" )) {
+		.@h = getvariableofnpc( getd( ".hour_start_"+ .@hour_today ),"woe_TE_contoller" );
+		if (.@h > .@hour_today) {
+			.@time = (60 - .@min_today) *60 + ( .@h - .@hour_today -1 ) *3600;
+			if (.@time <= getarg(0))
+				return true;
+		}
+	}
+	return false;
+}

+ 1007 - 0
npc/re/quests/woe_te/te_goditem_alde1.txt

@@ -0,0 +1,1007 @@
+//===== rAthena Script =======================================
+//= God Items Quest
+//===== Description: =========================================
+//= [Official Conversion]
+//= God Item Jormungand Creation script (WoE TE)
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+te_aldecas1,226,34,3	script	Blacksmith Cano#tegod01	4_M_RACHMAN1,{
+	if (checkweight(1201,1) == 0) {
+		mes "You have too many items to proceed with the quest.";
+		mes "Please lighten your load and try again.";
+		close;
	}
+
+	.@guild_id = getcastledata("te_aldecas1",1);
+	.@economy  = getcastledata("te_aldecas1",2);
+	.@npc_name$ = "Cano";
+
+	mes "["+ .@npc_name$ +"]";
+	if (.@guild_id != getcharid(2)) {
+		mes "You... don't look familiar to me... ?";
+		mes "Are you going to threaten me?";
+		mes "No, right?";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I have my reasons.";
+		mes "Please, pretend not to see me.";
+		close;
+	}
+	if (WoeTETimeStart(14400) == 1 || agitcheck3() == 1) {// cannot start the quest 4 hours before and during WOE TE
+		mes "From now on, I'll stay here quietly and not interrupt anyone until the siege ends.";
+		mes "Don't worry about me.";
+		close;
+	}
+	if (getguildmaster(.@guild_id) != strcharinfo(0)) {
+		mes "I feel so grateful all the time about you letting me stay here.";
+		mes "It's nothing special... but if you want, I'll make you tools that could be of use.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I mean if the guild master wants it.";
+		mes "I'm also a master who pursues the ultimate way.";
+		mes "I hope I can find that way here.";
+		close;
+	}
+	if ($2012_tegod_kafra == 0) {// event status
+		mes "Ah... Master.";
+		mes "I feel so thankful all the time.";
+		mes "Since I owe you big time, I'll help you with anything anytime.";
+		next;
+		switch( select( "Make Jormungand.","Fuse materials.","Relax." ) ) {
+		case 1:
+			if (.@economy > 29) {
+				if (countitem(6603) > 3 && countitem(6599) > 0 && countitem(6598) > 0 && countitem(6601) > 3 && countitem(6600) > 0 && countitem(6605) > 0 && countitem(6604) > 0 && countitem(1473) > 0) {
+					mes "^ff0000Wizardry staff is needed in the process of making Jormungand.";
+					mes "You should not possess any other items except for Wizardry Staffs in order to proceed with the quest.^ff0000";
+					next;
+					mes "^ff0000Even if the refinement level and cards have been applied, the process requires any one of the Wizardry Staffs you may have.";
+					mes "Please try again after organizing your possessions.^000000";
+					next;
+					if (select( "Organize possessions.","Continue as it is." ) == 1) {
+						mes "You've decided to keep Wizardry Staffs only.";
+						close;
+					}
+					mes "["+ .@npc_name$ +"]";
+					mes "I see that you've developed the fortress as you promised.";
+					mes "Moreover, you've found Twilight of Trail...";
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "... so..let's get the work done.";
+					mes "Before the girls find us...";
+					next;
+					mes "[" + strcharinfo(0) + "]";
+					mes "The girls... ?";
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "... yeah, there were some girls..";
+					mes "I had to run away because of them...";
+					donpcevent "#tequest_master_alde01::OnCommandOn";
+					mapannounce "te_aldecas1","A girl's voice: Hey, were you talking about us? It's "+ .@npc_name$ +", right? I can't believe you ran away to a place like this.",bc_map,"0x00FF00",FW_BOLD,20,0,40;
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "Oh, no... !";
+					mes "They're here..!!";
+					next;
+					mes "[" + strcharinfo(0) + "]";
+					mes "Leave it to me.";
+					next;
+					mes "^4d4dff!- Instruction -!";
+					mes "Soon, 7 girls that are after "+ .@npc_name$ +" will try to invade the fortress.";
+					mes "You have to protect "+ .@npc_name$ +" for 1 hour.^000000";
+					next;
+					mes "^4d4dff!- Instruction -!";
+					mes "When the actual attack starts, the doorway of Emperium region will be blocked up for protection.^000000";
+					close;
+				}
+				mes "["+ .@npc_name$ +"]";
+				mes "Jormungand is a staff that is modeled on Jormungand, the son of god who embraces the world.";
+				mes "It also refers to Ragnarok, the twilight of the gods.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "But, here we have items that symbolize the twilight of the gods...";
+				mes "and I can't believe I'm going to use them to make Jormungand myself... with my own hands!";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "However, it seems like we need more materials.";
+				mes "Could you check again? I'll give you the list of what we need.";
+				callsub S_Material, .@npc_name$,1,"since Jormungand has a great power.";
+			}
+			mes "["+ .@npc_name$ +"]";
+			mes "However, would it be okay if I said something?";
+			mes "Jormungand is one of the most powerful battlegears I make and you deserve to receive something like that from me...";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "but I would like you to have the minimum qualification at least.";
+			mes "Manage this fortress well and raise ^4d4dffits commerce level by 30 or more^000000.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "With great power comes great responsibility and duty.";
+			mes "I would like you to master the basics first.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I'll make Jormungand afterward.";
+			mes "Let me give you the list of materials if you want.";
+			callsub S_Material, .@npc_name$,0,"since Jormungand has a great power.";
+		case 2:
+			callsub S_Fuse, .@npc_name$, "Jormungand";
+		case 3:
+			mes "["+ .@npc_name$ +"]";
+			mes "That is so nice of you to say that.";
+			mes "By the way, I wonder how my older brother Kai is doing?";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I'm sure he's doing fine just like I am.";
+			mes "... I hope things stay as peaceful as they are now.";
+			close;
+		}
+	}
+	if ($2012_tegod_kafra == 1) {// event started
+		mes "Did you hear the news?";
+		mes "The girls are coming.";
+		mes "The merciless girls!!!";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "They'll get here any minute since they've declared war already.";
+		mes "I'm sure they're coming to get Jormungand.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Stop them. Please!";
+		next;
+		switch( select( "Leave it to me.","What do you mean 'the girls?'" ) ) {
+		case 1:
+			mes "["+ .@npc_name$ +"]";
+			mes "Thank you...";
+			mes "I'm sorry that I'm causing you troubles, but my hands are tied.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "Please, stop them for me!";
+			close;
+		case 2:
+			mes "["+ .@npc_name$ +"]";
+			mes "... They are the girls who want to be Valkyries...";
+			mes "and they always go around in groups of seven.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "What they want is a powerful battlegear...";
+			mes "They always threatened my older brother Kai and me.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "They were satisfied with basic weapons at first, but";
+			mes "soon they started threatening us saying that they need something more powerful in order to become Valkyries.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I couldn't stand it, so I ran away... but they're here...";
+			mes "You have to be careful since they found out that materials for Jormungand are here.";
+			close;
+		}
+	}
+	if ($2012_tegod_kafra == 2) {// after 10 minutes delay
+		mes "Ah stop following me around!";
+		mes "If you could just get rid of them... Jormungand, that's right! I'll make you Jormungand!";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "When will they ever stop following me...";
+		mes "Now I'm scared of girls in general... and I'm too scared to do anything...";
+		next;
+		mes "He's babbling now.";
+		mes "Just wait and he'll calm down.";
+		mes "You have to get rid of those girls first.";
+		close;
+	}
+	if ($2012_tegod_kafra == 3) {// event failed
+		mes "... Although I managed to escape from them again...";
+		mes "it's hard.";
+		mes "life is... just so hard.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I'm so exhausted that I can't do anything.";
+		mes "... I don't think I can do anything for a while, whether it's producing or smithing or whatever it is.";
+		mes "I'm sorry. I'll take a break.";
+		close;
+	}
+	if ($2012_tegod_kafra == 4) {
+		mes "I can finally breathe now.";
+		mes "I'll start making Jormungand as promised.";
+		next;
+		switch( select( "Make Jormungand.","Fuse materials.","Not now." ) ) {
+		case 1:
+			if (countitem(6603) > 3 && countitem(6599) > 0 && countitem(6598) > 0 && countitem(6601) > 3 && countitem(6600) > 0 && countitem(6605) > 0 && countitem(6604) > 0 && countitem(1473) > 0) {
+				mes "^ff0000Wizardry staff is needed in the process of making Jormungand.";
+				mes "You should not possess any other items except for Wizardry Staffs in order to proceed with the quest.^ff0000";
+				next;
+				mes "^ff0000Even if the refinement level and cards have been applied, the process requires any one of the Wizardry Staffs you may have.";
+				mes "Please try again after organizing your possessions.^000000";
+				next;
+				if (select( "Organize possessions.","Continue as it is." ) == 1) {
+					mes "You've decided to keep Wizardry Staffs only.";
+					close;
+				}
+				mes "["+ .@npc_name$ +"]";
+				mes "Oh... thank you.";
+				mes "I can't believe I'm finally touching these materials myself...";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "Here it is.";
+				mes "Wasn't it fast although we had to go through many steps?";
+				mes "I was so overwhelmed that it felt as short as a moment.";
+				next;
+				mes "Jormungand, a powerful weapon and collection of all traces in myths, is finally made";
+				mes "at the hands of "+ .@npc_name$ +".";
+				delitem 6603,4;// Skin_Of_Hraesvelg
+				delitem 6599,1;// Spirit_Of_Hugin
+				delitem 6598,1;// Rib_Of_Jormungand
+				delitem 6601,4;// Chisel_Of_Giant
+				delitem 6600,1;// Spirit_Of_Munin
+				delitem 6605,1;// Muspellium
+				delitem 6604,1;// Essence_Of_Rune
+				delitem 1473,1;// Wizardy_Staff
+				$2012_tegod_kafra = 5;
+				getitem 2020,1;// Jormungand
+				announce "Twilight of trail [ Jormungand ] is introduced to this world by ["+ strcharinfo(0) +"] of ["+ getguildname(.@guild_id) +"] Guild.",bc_all,"0x70dbdb",FW_NORMAL,12;
+				if (.@economy > 20)
+					setcastledata "te_aldecas1",2,(.@economy -20);
+				else
+					setcastledata "te_aldecas1",2,1;// min is 1 for WOE TE
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "Whew.. I don't think I can work for a while.";
+				mes "I'm all exhausted. Hahaha...";
+				close;
+			}
+			mes "["+ .@npc_name$ +"]";
+			mes "However, it seems like we need more materials.";
+			mes "Could you check again? I'll give you the list of what we need.";
+			callsub S_Material, .@npc_name$,1;
+		case 2:
+			callsub S_Fuse, .@npc_name$, "Jormungand";
+		case 3:
+			mes "["+ .@npc_name$ +"]";
+			mes "Now is actually the right time to make it.";
+			mes "By the time next Emperium appears, there won't be any chances left.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "Also, keep in mind the fact that I can only do this once a week.";
+			close;
+		}
+	}
+	if ($2012_tegod_kafra == 5) {
+		mes "I'm tired a little bit.";
+		mes "I think I should rest for a few days.";
+		mes "I may look just fine, but I was mentally very tired.";
+		close;
+	}
+	mes "It's strange.";
+	mes "I can't tell how I feel.";
+	mes "Am I having some kind of a health problem?";
+	mes "Is it something uncurable?";
+	close;
+
+S_Material:
+	.@npc_name$ = getarg(0);
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "^4d4dff4 Presberk's Leather";
+	mes "1 Spirit of Hugin";
+	mes "1 Spirit of Munin";
+	mes "1 Giant's Chisel";
+	mes "1 Jormungand's Rib";
+	mes "1 Wizardry Staff";
+	mes "1 Muspellium and Essence of Rune, respectively^000000";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "We need as many materials as these";
+	mes getarg(2,"");
+	mes "By the way, Muspellium and Essence of Rune need to be made separately with additional materials.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "In order to make Muspellium, you need to ^4d4dffcombine 50 Eluniums and 50 Oridecons^000000.";
+	mes "For Essence of Rune, you need to ^4d4dffcombine 200 Ancient Rough Runestones and 100 Mystic Rough Runestones^000000.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "I'll make Muspellium and Essence of Rune anytime upon your request,";
+	mes "and of course, I'll make Jormungand as soon as we gather all the materials needed.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	if (getarg(1))
+		mes "What I'm doing is never enough compared to what you've done for me.";
+	else {
+		mes "However, you won't be able to find Twilight of Trail.";
+		mes "... but people say it definitely appears to those who truly want it. I wish you all the luck.";
+	}
+	close;
+
+S_Fuse:
+	.@npc_name$ = getarg(0);
+	mes "["+ .@npc_name$ +"]";
+	mes "Which material do you want to make?";
+	next;
+	switch( select( "Muspellium","Essence of Rune","Forget it." ) ) {
+	case 1:
+		mes "["+ .@npc_name$ +"]";
+		if (countitem(985) > 49 && countitem(984) > 49) {
+			mes "I'll make Muspellium with the materials you've prepared.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "It shouldn't take long.";
+			mes "Here it is.";
+			mes "It is an essential material for making Hervor and Jormungand.";
+			delitem 985,50;// Elunium
+			delitem 984,50;// Oridecon
+			getitem 6605,1;// Muspellium
+			close;
+		}
+		mes "In order to make Muspellium,";
+		mes "^4d4dffyou need 50 Eluniums and 50 Oridecons.^000000";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "We should have all the materials ready, right?";
+		close;
+	case 2:
+		mes "["+ .@npc_name$ +"]";
+		if (countitem(12735) > 199 && countitem(12736) > 99) {
+			mes "I'll make Essence of Rune with the materials you've prepared.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "It shouldn't take long.";
+			mes "Here it is.";
+			mes "It is an essential material for making Hervor and Jormungand.";
+			delitem 12735,200;// Runstone_Ancient
+			delitem 12736,100;// Runstone_Mystic
+			getitem 6604,1;// Essence_Of_Rune
+			close;
+		}
+		mes "For Essence of Rune,";
+		mes "^4d4dffyou need 200 Ancient Rough Runestones and 100 Mystic Rough Runestones.^000000";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Surely, it takes a lot...";
+		close;
+	case 3:
+		mes "["+ .@npc_name$ +"]";
+		mes "Tell me whenever you need it.";
+		mes "I'm glad I can at least do this for you.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Also, a place where you can find materials for "+ getarg(1) +"...";
+		mes "this is like a dream place for me, too.";
+		close;
+	}
+
+OnInit:
+	if ($2012_tegod_kafra == 3 || agitcheck3())// 3 -> quest failed
+		disablenpc strnpcinfo(0);
+	else
+		enablenpc strnpcinfo(0);
+	end;
+}
+
+te_aldecas1,3,2,0	script	#tequest_master_alde01	CLEAR_NPC,{
+	mes "password?";
+	next;
+	if ( callfunc( "F_GM_NPC", 1854,0, 0,9999 ) < 1 ) {
+		mes "Go away";
+		close;
+	}
+	.@map$ = "te_aldecas1";
+	mes "Current Status: " + $2012_tegod_kafra;
+	mes "0: Able to proceed with the quest";
+	mes "1: Proceed with the quest. 10-minute wait";
+	mes "2: Quest in progress";
+	mes "3: Quest failed";
+	mes "4: Able to produce items , 5: Items produced successfully.";
+	next;
+	mes "Princess Status: " + $@2012_tegirls_alde01;
+	mes "Current Commerce Level of the Fortress:" + getcastledata(.@map$,2);
+	next;
+	switch( select( "Do not proceed","Initialization","Raise Commerce Level","Lower Commerce Level" ) ) {
+	case 1:
+		end;
+	case 2:
+		mes "Initialize";
+		donpcevent "#tequest_master_alde01::OnReset";
+		close;
+	case 3:
+		.@economy = getcastledata(.@map$,2) +30;
+		.@economy = .@economy > 100 ? 100 : .@economy;
+		setcastledata .@map$,2,.@economy;
+		mes "Raise Commerce Level by 30";
+		mes "Modified Commerce Level:" + .@economy;
+		close;
+	case 4:
+		.@economy1 = getcastledata(.@map$,2);
+		.@economy2 = .@economy1 > 30 ? (.@economy1 -30) : 1;
+		if (.@economy1 > 30) {
+			mes "Lower Commerce Level by 30";
+			setcastledata .@map$,2,.@economy2;
+		}
+		else {
+			mes "Commerce Level gets decreased to 0 since current level is lower than 30.";
+			setcastledata .@map$,2,1;// min is 1 for WOE TE
+		}
+		mes "Modified Commerce Level:" + .@economy2;
+		close;
+	}
+
+OnReset:// gm Initialization
+	callsub S_EventReset;// kill all quests mobs and stop timer of others npcs
+	callsub S_EventOff;// clear setnpcdisplay
+	$2012_tegod_kafra = 0;
+	$@2012_tegirls_alde01 = 0;
+	.npc_name$ = "";
+	enablenpc "aldeg-1-11_aldeg-1-15#te";
+	enablenpc "Blacksmith Cano#tegod01";
+	stopnpctimer;
+	end;
+
+OnCommandOn:
+	$2012_tegod_kafra = 1;
+	.npc_name$ = strnpcinfo(0);// for script readability
+	initnpctimer;
+	end;
+
+OnTimer10000:
+	announce "Girls' voices: Cano~ We already know where you are. It's over!",bc_all,"0xFF0000",FW_NORMAL,10;
+	end;
+OnTimer15000:
+	announce "Girls' Voices: We'll wait just 10 minutes. If you don't show up in the meantime, we'll storm the fortress!",bc_all,"0xFF0000",FW_NORMAL,10;
+	end;
+OnTimer595000:
+	mapannounce "te_aldecas1","A girl's voice: Cano! How dare you ignore our warning! So, you have company there, huh? But how long do you think they'll stay with you?!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer598000:
+	mapannounce "te_aldecas1","You are forced out of the fortress by unknown power.",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+
+OnTimer600000:
+	$2012_tegod_kafra = 2;
+	mapwarp "te_aldecas1", "te_alde_gld",130,264;
+	donpcevent "Aira#fake01_alde01::OnCommandOn";
+	donpcevent "Kuluna#fake01_alde01::OnCommandOn";
+	donpcevent "Mallina#fake01_alde01::OnCommandOn";
+	donpcevent "Ezella#fake01_alde01::OnCommandOn";
+	donpcevent "Lune#fake01_alde01::OnCommandOn";
+	donpcevent "Morin#fake01_alde01::OnCommandOn";
+	donpcevent "Nasarin#fake01_alde01::OnCommandOn";
+
+	disablenpc "aldeg-1-11_aldeg-1-15#te";// warp to emperium room
+	end;
+
+OnTimer602000:
+	announce "Glaris in Kafragarten region is being attacked by a group of unidentified beings.",bc_all,"0xFF0000",FW_NORMAL,10;
+	monster "te_aldecas1",0,0,"Raydric",1163,15, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Abysmal Knight",1219,5, .npc_name$ +"::OnMyMobDead";
+
+	monster "te_aldecas1",207,34,"Dalongee",1272,1, .npc_name$ +"::OnMyMobDead";// DARK_LORD
+	monster "te_aldecas1",213,46,"Summoned Reindeer",1251,1, .npc_name$ +"::OnMyMobDead";// KNIGHT_OF_WINDSTORM
+	monster "te_aldecas1",218,46,"Summoned Wolf",1252,1, .npc_name$ +"::OnMyMobDead";// GARM
+
+	monster "te_aldecas1",26,224,"Dalongee",1272,1, .npc_name$ +"::OnMyMobDead";// DARK_LORD
+	monster "te_aldecas1",24,199,"Summoned Reindeer",1251,1, .npc_name$ +"::OnMyMobDead";// KNIGHT_OF_WINDSTORM
+	monster "te_aldecas1",113,93,"Summoned Wolf",1252,1, .npc_name$ +"::OnMyMobDead";// GARM
+	end;
+
+OnTimer610000:
+	monster "te_aldecas1",0,0,"Raydric",1163,15, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Abysmal Knight",1219,5, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Bloody Knight",1268,5, .npc_name$ +"::OnMyMobDead";
+	end;
+
+OnTimer1000000:
+OnTimer1300000:
+OnTimer1900000:
+OnTimer2500000:
+OnTimer3100000:
+	callsub S_MobRedondant;
+	end;
+S_MobRedondant:
+	monster "te_aldecas1",0,0,"Raydric",1163,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Abysmal Knight",1219,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"High Orc",1213,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_aldecas1",0,0,"Bloody Knight",1268,5, .npc_name$ +"::OnMyMobDead";
+	end;
+
+OnTimer4200000:
+	mapannounce "te_aldecas1","Girls: ... how long do we have to wait?",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4205000:
+	mapannounce "te_aldecas1","Girls: Jormungand should be made for us!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4210000:
+	mapannounce "te_aldecas1","Girls: Come on, cut if off! You guys are so persistent!!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4220000:
+	mapannounce "te_aldecas1","Aira: Ah! I can't take it anymore! Girls, come here!",bc_map,"0x00ff00",FW_NORMAL,12;
+
+	$2012_tegod_kafra = 3;// quest off until someone break the emp
+	callsub S_EventReset;
+	enablenpc "aldeg-1-11_aldeg-1-15#te";
+	end;
+
+OnTimer4225000:
+	donpcevent "#eproom_girls_alde01::OnReset";
+	donpcevent "#end_aira_alde01::OnCommandOn";
+	donpcevent "#end_kuluna_alde01::OnCommandOn";
+	donpcevent "#end_mallina_alde01::OnCommandOn";
+	donpcevent "#end_ezella_alde01::OnCommandOn";
+	donpcevent "#end_lune_alde01::OnCommandOn";
+	donpcevent "#end_morin_alde01::OnCommandOn";
+	donpcevent "#end_nasarin_alde01::OnCommandOn";
+	end;
+
+OnTimer4227000:
+	npctalk "Cano: Oh... no! What are you going to do to me?!", "Blacksmith Cano#tegod01";
+	end;
+OnTimer4230000:
+	npctalk "Aira: Mm? Hey Cano. You're going home.", "#end_aira_alde01";
+	end;
+OnTimer4233000:
+	npctalk "Kuluna: Yup~ You have to fix my broken wand and make powerful weapons for me once you get back!", "#end_kuluna_alde01";
+	end;
+OnTimer4236000:
+	npctalk "Ezella: Try to run away again. You'll be sorry, understand?", "#end_ezella_alde01";
+	end;
+OnTimer4237000:
+	npctalk "Nasarin: ... Just take him. Why are you guys talking to him so much?", "#end_nasarin_alde01";
+	end;
+OnTimer4240000:
+	npctalk "Aira: You're right! Alright then!", "#end_aira_alde01";
+	npctalk "Cano: Oh... No... Noooo!!!!!", "Blacksmith Cano#tegod01";
+	end;
+
+OnTimer4243000:
+	mapannounce "te_aldecas1","You've failed to recapture the fortress. Cano is now gone.",bc_map,"0x00ff00",FW_NORMAL,12;
+	disablenpc "Blacksmith Cano#tegod01";
+	callsub S_EventOff;// clear setnpcdisplay
+	.npc_name$ = "";
+	stopnpctimer;
+	end;
+
+S_EventOff:
+	donpcevent "#end_aira_alde01::OnCommandOff";
+	donpcevent "#end_kuluna_alde01::OnCommandOff";
+	donpcevent "#end_mallina_alde01::OnCommandOff";
+	donpcevent "#end_ezella_alde01::OnCommandOff";
+	donpcevent "#end_lune_alde01::OnCommandOff";
+	donpcevent "#end_morin_alde01::OnCommandOff";
+	donpcevent "#end_nasarin_alde01::OnCommandOff";
+	return;
+
+OnStop:// all girls have been defeated, kill remaining mobs and stop timer
+	callsub S_EventReset;
+	$@2012_tegirls_alde01 = 0;
+	.npc_name$ = "";
+	stopnpctimer;
+	end;
+
+S_EventReset:
+	killmonster "te_aldecas1", .npc_name$ +"::OnMyMobDead";
+	donpcevent "#eproom_girls_alde01::OnReset";
+	donpcevent "Aira#fake01_alde01::OnReset";
+	donpcevent "Kuluna#fake01_alde01::OnReset";
+	donpcevent "Mallina#fake01_alde01::OnReset";
+	donpcevent "Ezella#fake01_alde01::OnReset";
+	donpcevent "Lune#fake01_alde01::OnReset";
+	donpcevent "Morin#fake01_alde01::OnReset";
+	donpcevent "Nasarin#fake01_alde01::OnReset";
+
+	donpcevent "#aira_real_alde01::OnReset";
+	donpcevent "#kuluna_real_alde01::OnReset";
+	donpcevent "#mallina_real_alde01::OnReset";
+	donpcevent "#ezella_real_alde01::OnReset";
+	donpcevent "#lune_real_alde01::OnReset";
+	donpcevent "#morin_real_alde01::OnReset";
+	donpcevent "#nasarin_real_alde01::OnReset";
+	return;
+
+OnMyMobDead:
+	end;
+
+OnInit:
+	$@2012_tegirls_alde01 = 0;// girls mobs killed count
+	if ($2012_tegod_kafra < 3)
+		$2012_tegod_kafra = 0;
+	end;
+}
+
+
+te_aldecas1,40,226,3	script	Aira#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Aira#fake01_alde01";
+	setnpcdisplay "Aira#fake01_alde01",2443;// AIRA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Aira#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#aira_real_alde01::OnCommandOn";
+	npctalk "Aira: My summon water balls! I'll get you! With my own hands!!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Aira#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Aira#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Aira#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",26,224,"Bodyguard",1213,5, "Aira#fake01_alde01::OnMyMobDead";// HIGH_ORC
+	monster "te_aldecas1",26,224,"Bodyguard",1309,5, "Aira#fake01_alde01::OnMyMobDead";// GAJOMART
+	end;
+OnTimer2000:
+	monster "te_aldecas1",26,224,"Bodyguard",1367,5, "Aira#fake01_alde01::OnMyMobDead";// BLAZZER
+	monster "te_aldecas1",26,223,"Bodyguard",1837,5, "Aira#fake01_alde01::OnMyMobDead";// IMP
+	end;
+OnTimer3000:
+	monster "te_aldecas1",26,223,"Bodyguard",1949,1, "Aira#fake01_alde01::OnMyMobDead";// B_S_GUARDIAN
+	monster "te_aldecas1",26,224,"Bodyguard",1833,2, "Aira#fake01_alde01::OnMyMobDead";// KASA
+	monster "te_aldecas1",26,224,"Bodyguard",1831,2, "Aira#fake01_alde01::OnMyMobDead";// SALAMANDER
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,33,197,3	script	Kuluna#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Kuluna#fake01_alde01";
+	setnpcdisplay "Kuluna#fake01_alde01",2444;// KULUNA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Kuluna#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#kuluna_real_alde01::OnCommandOn";
+	npctalk "Kuluna: Hmm? So you're going to be that way? You'd better be ready!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Kuluna#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Kuluna#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Kuluna#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",24,199,"Guardian",1143,10, "Kuluna#fake01_alde01::OnMyMobDead";// MARIONETTE
+	end;
+OnTimer2000:
+	monster "te_aldecas1",24,199,"Guardian",1693,10, "Kuluna#fake01_alde01::OnMyMobDead";// PLASMA_Y
+	end;
+OnTimer3000:
+	monster "te_aldecas1",24,199,"Guardian",1869,5, "Kuluna#fake01_alde01::OnMyMobDead";// FLAME_SKULL
+	monster "te_aldecas1",24,199,"Guardian",1704,1, "Kuluna#fake01_alde01::OnMyMobDead";// THA_ODIUM
+	monster "te_aldecas1",24,199,"Guardian",1705,1, "Kuluna#fake01_alde01::OnMyMobDead";// THA_DESPERO
+	monster "te_aldecas1",24,199,"Guardian",1706,1, "Kuluna#fake01_alde01::OnMyMobDead";// THA_MAERO
+	monster "te_aldecas1",24,199,"Guardian",1707,1, "Kuluna#fake01_alde01::OnMyMobDead";// THA_DOLOR
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,90,69,3	script	Mallina#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Mallina#fake01_alde01";
+	setnpcdisplay "Mallina#fake01_alde01",2445;// MALLINA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Mallina#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#mallina_real_alde01::OnCommandOn";
+	npctalk "Mallina: Stop it!! Stop bothering me!!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Mallina#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Mallina#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Mallina#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",83,70,"The Absolute",1993,10, "Mallina#fake01_alde01::OnMyMobDead";// NAGA
+	end;
+OnTimer3000:
+	monster "te_aldecas1",83,70,"The Absolute",1695,10, "Mallina#fake01_alde01::OnMyMobDead";// PLASMA_G
+	end;
+OnTimer5000:
+	monster "te_aldecas1",83,71,"The Absolute",1717,1, "Mallina#fake01_alde01::OnMyMobDead";// FERUS_
+	monster "te_aldecas1",82,71,"The Absolute",1717,1, "Mallina#fake01_alde01::OnMyMobDead";// FERUS_
+	monster "te_aldecas1",81,71,"The Absolute",1717,1, "Mallina#fake01_alde01::OnMyMobDead";// FERUS_
+	monster "te_aldecas1",80,71,"The Absolute",1717,1, "Mallina#fake01_alde01::OnMyMobDead";// FERUS_
+	monster "te_aldecas1",79,71,"The Absolute",1717,1, "Mallina#fake01_alde01::OnMyMobDead";// FERUS_
+
+	monster "te_aldecas1",83,70,"The Absolute",1991,2, "Mallina#fake01_alde01::OnMyMobDead";// TENDRILRION
+	monster "te_aldecas1",83,70,"The Absolute",1989,2, "Mallina#fake01_alde01::OnMyMobDead";// HILLSRION
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,109,91,3	script	Ezella#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Ezella#fake01_alde01";
+	setnpcdisplay "Ezella#fake01_alde01",2446;// EZELLA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Ezella#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#ezella_real_alde01::OnCommandOn";
+	npctalk "Ezella: Ahh... This only makes both of us more tired...";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Ezella#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Ezella#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Ezella#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",113,93,"Convoy",1692,10, "Ezella#fake01_alde01::OnMyMobDead";// BREEZE
+	end;
+OnTimer2000:
+	monster "te_aldecas1",113,93,"Convoy",1627,2, "Ezella#fake01_alde01::OnMyMobDead";// ANOPHELES
+	monster "te_aldecas1",113,93,"Convoy",1656,2, "Ezella#fake01_alde01::OnMyMobDead";// KAVAC
+	monster "te_aldecas1",113,93,"Convoy",1315,6, "Ezella#fake01_alde01::OnMyMobDead";// ASSULTER
+	end;
+OnTimer3000:
+	monster "te_aldecas1",113,93,"Convoy",1669,5, "Ezella#fake01_alde01::OnMyMobDead";// DIMIK
+	monster "te_aldecas1",113,93,"Convoy",1259,2, "Ezella#fake01_alde01::OnMyMobDead";// GRYPHON
+	monster "te_aldecas1",113,93,"Convoy",1783,1, "Ezella#fake01_alde01::OnMyMobDead";// GALION
+	monster "te_aldecas1",113,93,"Convoy",1950,1, "Ezella#fake01_alde01::OnMyMobDead";// B_B_GUARDIAN
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,85,108,3	script	Lune#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Lune#fake01_alde01";
+	setnpcdisplay "Lune#fake01_alde01",2447;// LUNE
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Lune#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#lune_real_alde01::OnCommandOn";
+	npctalk "Lune: ..you want to be drowned in the deep sea? Huh?";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Lune#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Lune#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Lune#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",74,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";// GAZETI
+	monster "te_aldecas1",75,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",76,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",77,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",78,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",79,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",80,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",81,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",82,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",83,83,"Bodyguard",1778,1, "Lune#fake01_alde01::OnMyMobDead";
+	end;
+OnTimer2000:
+	monster "te_aldecas1",84,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";// AQUA_ELEMENTAL
+	monster "te_aldecas1",85,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",86,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",87,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",88,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",89,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",90,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",91,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",92,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	monster "te_aldecas1",93,83,"Bodyguard",2016,1, "Lune#fake01_alde01::OnMyMobDead";
+	end;
+OnTimer3000:
+	monster "te_aldecas1",82,95,"Bodyguard",1777,5, "Lune#fake01_alde01::OnMyMobDead";// ICE_TITAN
+	monster "te_aldecas1",82,95,"Bodyguard",1681,1, "Lune#fake01_alde01::OnMyMobDead";// GEMINI
+	monster "te_aldecas1",82,95,"Bodyguard",2021,1, "Lune#fake01_alde01::OnMyMobDead";// PHYLLA
+	monster "te_aldecas1",82,95,"Bodyguard",2020,2, "Lune#fake01_alde01::OnMyMobDead";// RHYNCHO
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,207,156,3	script	Morin#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Morin#fake01_alde01";
+	setnpcdisplay "Morin#fake01_alde01",2448;// MORIN
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Morin#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#morin_real_alde01::OnCommandOn";
+	npctalk "Morin: ... . ...";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Morin#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Morin#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Morin#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",207,148,"Nightmare Gang",1379,10, "Morin#fake01_alde01::OnMyMobDead";// NIGHTMARE_TERROR
+	end;
+OnTimer2000:
+	monster "te_aldecas1",207,148,"Nightmare Gang",1701,5, "Morin#fake01_alde01::OnMyMobDead";// SHELTER
+	monster "te_aldecas1",207,148,"Nightmare Gang",1753,5, "Morin#fake01_alde01::OnMyMobDead";// FRUS
+	end;
+OnTimer3000:
+	monster "te_aldecas1",207,148,"Nightmare Gang",1752,5, "Morin#fake01_alde01::OnMyMobDead";// SKOGUL
+	monster "te_aldecas1",207,148,"Nightmare Gang",1733,1, "Morin#fake01_alde01::OnMyMobDead";// KIEL
+	monster "te_aldecas1",207,148,"Nightmare Gang",1205,1, "Morin#fake01_alde01::OnMyMobDead";// EXECUTIONER
+	monster "te_aldecas1",207,148,"Nightmare Gang",2040,1, "Morin#fake01_alde01::OnMyMobDead";// TIRFING_R
+	monster "te_aldecas1",207,148,"Nightmare Gang",1203,1, "Morin#fake01_alde01::OnMyMobDead";// MYSTELTAINN
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,214,176,3	script	Nasarin#fake01_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Nasarin#fake01_alde01";
+	setnpcdisplay "Nasarin#fake01_alde01",2449;// NASARIN
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","Nasarin#fake01_alde01::OnMyMobDead" )) end;
+	donpcevent "#nasarin_real_alde01::OnCommandOn";
+	npctalk "Nasarin: ..Ahh.. It's so hard to become a Valkyrie!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "Nasarin#fake01_alde01::OnMyMobDead";
+	setnpcdisplay "Nasarin#fake01_alde01",CLEAR_NPC;
+OnInit:
+	disablenpc "Nasarin#fake01_alde01";
+	end;
+
+OnTimer1000:
+	monster "te_aldecas1",212,170,"Gang of Poison",1987,10, "Nasarin#fake01_alde01::OnMyMobDead";// CENTIPEDE
+	end;
+OnTimer2000:
+	monster "te_aldecas1",212,170,"Gang of Poison",2015,10, "Nasarin#fake01_alde01::OnMyMobDead";// PINGUICULA_D
+	end;
+OnTimer3000:
+	monster "te_aldecas1",212,170,"Gang of Poison",1618,3, "Nasarin#fake01_alde01::OnMyMobDead";// UNGOLIANT
+	monster "te_aldecas1",212,170,"Khalitz",1949,1, "Nasarin#fake01_alde01::OnMyMobDead";// B_S_GUARDIAN
+	stopnpctimer;
+	end;
+}
+
+-	script	real_alde01	-1,{
+	end;
+OnCommandOn:
+	.@npc_name$ = strnpcinfo(0);
+	if (.@npc_name$ == "#aira_real_alde01")
+		monster "te_aldecas1",26,224,"Aira in a blaze",2443,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#kuluna_real_alde01")
+		monster "te_aldecas1",24,199,"Passionate Kuluna",2444,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#mallina_real_alde01")
+		monster "te_aldecas1",83,70,"Mallina of the Earth",2445,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#ezella_real_alde01")
+		monster "te_aldecas1",113,93,"Ezella of Verdure",2446,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#lune_real_alde01")
+		monster "te_aldecas1",82,95,"Lune of the Eternal Glacier",2447,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#morin_real_alde01")
+		monster "te_aldecas1",207,148,"Morin of the Abyss",2448,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#nasarin_real_alde01")
+		monster "te_aldecas1",212,170,"Fatal Nasarin",2449,1, .@npc_name$ +"::OnMyMobDead";
+	end;
+
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", strnpcinfo(0)+"::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1",strnpcinfo(0) +"::OnMyMobDead" ) == 0)
+		initnpctimer;
+	end;
+
+OnTimer1000:
+	if (mobcount( "te_aldecas1",strnpcinfo(0) +"::OnMyMobDead" ) == 0) {
+		$@2012_tegirls_alde01++;
+		if ($@2012_tegirls_alde01 == 7) {
+			mapannounce "te_aldecas1","Cano: aaahh!! The girls broke the shields and made their way into where Emperium is!!!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			donpcevent "#eproom_girls_alde01::OnCommandOn";
+		}
+		else {
+			.@npc_name$ = strnpcinfo(0);
+			if (.@npc_name$ == "#aira_real_alde01")
+				mapannounce "te_aldecas1","Aira: You think I lost? You're wrong! We force our way to where Cano is!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#kuluna_real_alde01")
+				mapannounce "te_aldecas1","Kuluna: ... This is called a strategic retreat.",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#mallina_real_alde01")
+				mapannounce "te_aldecas1","Mallina: ... Why are you disturbing us so much? But victory will be ours in the end!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#ezella_real_alde01")
+				mapannounce "te_aldecas1","Ezella: Oh you, a weakling that would just disappear like the wind... !!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#lune_real_alde01")
+				mapannounce "te_aldecas1","Lune: ..Alright. Let the battle begin!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#morin_real_alde01")
+				mapannounce "te_aldecas1","Morin: It's not... interesting anymore.",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#nasarin_real_alde01")
+				mapannounce "te_aldecas1","Nasarin: .. I wasted my time. Cano is in the center of this fortress?",bc_map,"0x00ff00",FW_NORMAL,12;
+		}
+	}
+	stopnpctimer;
+	end;
+}
+te_aldecas1,4,2,0	duplicate(real_alde01)	#aira_real_alde01	CLEAR_NPC
+te_aldecas1,5,2,0	duplicate(real_alde01)	#kuluna_real_alde01	CLEAR_NPC
+te_aldecas1,6,2,0	duplicate(real_alde01)	#mallina_real_alde01	CLEAR_NPC
+te_aldecas1,7,2,0	duplicate(real_alde01)	#ezella_real_alde01	CLEAR_NPC
+te_aldecas1,8,2,0	duplicate(real_alde01)	#lune_real_alde01	CLEAR_NPC
+te_aldecas1,9,2,0	duplicate(real_alde01)	#morin_real_alde01	CLEAR_NPC
+te_aldecas1,10,2,0	duplicate(real_alde01)	#nasarin_real_alde01	CLEAR_NPC
+
+
+te_aldecas1,11,2,0	script	#eproom_girls_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "aldeg-1-11_aldeg-1-15#te";
+	monster "te_aldecas1",207,34,"Fatal Nasarin",2449,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",216,26,"Morin of the Abyss",2448,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",205,21,"Lune of the Eternal Glacier",2447,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",215,34,"Ezella of Verdure",2446,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",226,24,"Mallina of the Earth",2445,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",213,46,"Passionate Kuluna",2444,1, "#eproom_girls_alde01::OnMyMobDead";
+	monster "te_aldecas1",218,46,"Aira in a blaze",2443,1, "#eproom_girls_alde01::OnMyMobDead";
+	end;
+
+OnReset:
+	stopnpctimer;
+	killmonster "te_aldecas1", "#eproom_girls_alde01::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_aldecas1","#eproom_girls_alde01::OnMyMobDead" ) == 0)
+		initnpctimer;
+	end;
+
+OnTimer3000:
+	if (mobcount( "te_aldecas1","#eproom_girls_alde01::OnMyMobDead" ) == 0) {
+		donpcevent "#tequest_master_alde01::OnStop";
+		$2012_tegod_kafra = 4;
+		mapannounce "te_aldecas1","You have defeated the girls and recaptured the fortress successfully.",bc_map,"0x00ff00",FW_NORMAL,12;
+	}
+	stopnpctimer;
+	end;
+}
+
+te_aldecas1,225,34,5	script	#end_aira_alde01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	.@npc_name$ = strnpcinfo(0);
+	enablenpc .@npc_name$;
+	if (compare(.@npc_name$,"aira")) setnpcdisplay .@npc_name$,2443;
+	else if (compare(.@npc_name$,"kuluna")) setnpcdisplay .@npc_name$,2444;
+	else if (compare(.@npc_name$,"mallina")) setnpcdisplay .@npc_name$,2445;
+	else if (compare(.@npc_name$,"ezella")) setnpcdisplay .@npc_name$,2446;
+	else if (compare(.@npc_name$,"lune")) setnpcdisplay .@npc_name$,2447;
+	else if (compare(.@npc_name$,"morin")) setnpcdisplay .@npc_name$,2448;
+	else if (compare(.@npc_name$,"nasarin")) setnpcdisplay .@npc_name$,2449;
+	end;
+
+OnCommandOff:
+	setnpcdisplay strnpcinfo(0),CLEAR_NPC;
+OnInit:
+	disablenpc strnpcinfo(0);
+	end;
+}
+te_aldecas1,227,35,3	duplicate(#end_aira_alde01)	#end_kuluna_alde01	CLEAR_NPC
+te_aldecas1,226,33,7	duplicate(#end_aira_alde01)	#end_mallina_alde01	CLEAR_NPC
+te_aldecas1,225,35,5	duplicate(#end_aira_alde01)	#end_ezella_alde01	CLEAR_NPC
+te_aldecas1,227,34,3	duplicate(#end_aira_alde01)	#end_lune_alde01	CLEAR_NPC
+te_aldecas1,226,35,4	duplicate(#end_aira_alde01)	#end_morin_alde01	CLEAR_NPC
+te_aldecas1,227,33,1	duplicate(#end_aira_alde01)	#end_nasarin_alde01	CLEAR_NPC

+ 1004 - 0
npc/re/quests/woe_te/te_goditem_prt01.txt

@@ -0,0 +1,1004 @@
+//===== rAthena Script =======================================
+//= God Items Quest
+//===== Description: =========================================
+//= [Official Conversion]
+//= God Item Hervor Creation script (WoE TE)
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+te_prtcas01,204,204,3	script	Blacksmith Kai#tegod01	4_M_RACHMAN2,{
+	if (checkweight(1201,1) == 0) {
+		mes "You have too many items to proceed with the quest.";
+		mes "Please lighten your load and try again.";
+		close;
	}
+
+	.@guild_id = getcastledata("te_prtcas01",1);
+	.@economy  = getcastledata("te_prtcas01",2);
+	.@npc_name$ = "Kai";
+
+	mes "["+ .@npc_name$ +"]";
+	if (.@guild_id != getcharid(2)) {
+		mes "You... don't look familiar to me... ?";
+		mes "Are you going to threaten me?";
+		mes "No, right?";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I have my reasons.";
+		mes "Please, pretend not to see me.";
+		close;
+	}
+	if (WoeTETimeStart(14400) == 1 || agitcheck3() == 1) {// cannot start the quest 4 hours before and during WOE TE
+		mes "From now on, I'll stay here quietly and not interrupt anyone until the siege ends.";
+		mes "Don't worry about me.";
+		close;
+	}
+	if (getguildmaster(.@guild_id) != strcharinfo(0)) {
+		mes "I feel so grateful all the time about you letting me stay here.";
+		mes "It's nothing special... but if you want, I'll make you tools that could be of use.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I mean if the guild master wants it.";
+		mes "I'm also a master who pursues the ultimate way.";
+		mes "I hope I can find that way here.";
+		close;
+	}
+	if ($2012_tegod_gloria == 0) {// event status
+		mes "Ah... Master.";
+		mes "I feel so thankful all the time.";
+		mes "Since I owe you big time, I'll help you with anything anytime.";
+		next;
+		switch( select( "Make Hervor.","Fuse materials.","Relax." ) ) {
+		case 1:
+			if (.@economy > 29) {
+				if (countitem(6595) > 1 && countitem(6596) > 0 && countitem(6594) > 3 && countitem(6597) > 2 && countitem(6602) > 0 && countitem(6605) > 0 && countitem(6604) > 0 && countitem(2115) > 0) {
+					mes "^ff0000Valkyrja's Shield is needed in the process of making Hervor.";
+					mes "You should not possess any other items except for Valkyrja's Shields in order to proceed with the quest.^ff0000";
+					next;
+					mes "^ff0000Even if the refinement level and cards have been applied, the process requires any one of the Valkyrja's Shields you may have.";
+					mes "Please try again after organizing your possessions.^000000";
+					next;
+					if (select( "Organize possessions.","Continue as it is." ) == 1) {
+						mes "You've decided to keep Valkyrja's Shields only.";
+						close;
+					}
+					mes "["+ .@npc_name$ +"]";
+					mes "I see that you've developed the fortress as you promised.";
+					mes "Moreover, you've found Velund's items...";
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "... so..let's get the work done.";
+					mes "Before the girls find us...";
+					next;
+					mes "[" + strcharinfo(0) + "]";
+					mes "The girls... ?";
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "... yeah, there were some girls..";
+					mes "I had to run away because of them...";
+					donpcevent "#tequest_master_prt01::OnCommandOn";
+					mapannounce "te_prtcas01","A girl's voice: Hey, were you talking about us? It's "+ .@npc_name$ +", right? I can't believe you ran away to a place like this.",bc_map,"0x00FF00",FW_BOLD,20,0,40;
+					next;
+					mes "["+ .@npc_name$ +"]";
+					mes "Oh, no... !";
+					mes "They're here..!!";
+					next;
+					mes "[" + strcharinfo(0) + "]";
+					mes "Leave it to me.";
+					next;
+					mes "^4d4dff!- Instruction -!";
+					mes "Soon, 7 girls that are after "+ .@npc_name$ +" will try to invade the fortress.";
+					mes "You have to protect "+ .@npc_name$ +" for 1 hour.^000000";
+					next;
+					mes "^4d4dff!- Instruction -!";
+					mes "When the actual attack starts, the doorway of Emperium region will be blocked up for protection.^000000";
+					close;
+				}
+				mes "["+ .@npc_name$ +"]";
+				mes "Hervor is a shield named after Hervor the Valkyrie.";
+				mes "I didn't know this fortress would have the items that used to belong to Velund, a husband of Hervor...";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "If we use them, we could make Hervor.";
+				mes "It's like a dream come true for me... my hands are shaking.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "However, it seems like we need more materials.";
+				mes "Could you check again? I'll give you the list of what we need.";
+				callsub S_Material, .@npc_name$,1,"since it is a crystal of Velund's love.";
+			}
+			mes "["+ .@npc_name$ +"]";
+			mes "However, would it be okay if I said something?";
+			mes "Hervor is one of the most powerful battlegears I make and you deserve to receive something like that from me...";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "but I would like you to have the minimum qualification at least.";
+			mes "Manage this fortress well and raise ^4d4dffits commerce level by 30 or more^000000.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "With great power comes great responsibility and duty.";
+			mes "I would like you to master the basics first.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I'll make you Hervor afterward.";
+			mes "Let me give you the list of materials if you want.";
+			callsub S_Material, .@npc_name$,0,"since it is a crystal of Velund's love.";
+		case 2:
+			callsub S_Fuse, .@npc_name$, "Hervor";
+		case 3:
+			mes "["+ .@npc_name$ +"]";
+			mes "That is so nice of you to say that.";
+			mes "By the way, I wonder how my younger brother Cano is doing?";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I'm sure he's doing fine just like I am.";
+			mes "... I hope things stay as peaceful as they are now.";
+			close;
+		}
+	}
+	if ($2012_tegod_gloria == 1) {// event started
+		mes "Did you hear the news?";
+		mes "The girls are coming.";
+		mes "The merciless girls!!!";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "They'll get here any minute since they've declared war already.";
+		mes "I'm sure they're coming to get Hervor.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Stop them. Please!";
+		next;
+		switch( select( "Leave it to me.","What do you mean 'the girls?'" ) ) {
+		case 1:
+			mes "["+ .@npc_name$ +"]";
+			mes "Thank you...";
+			mes "I'm sorry that I'm causing you troubles, but my hands are tied.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "Please, stop them for me!";
+			close;
+		case 2:
+			mes "["+ .@npc_name$ +"]";
+			mes "... They are the girls who want to be Valkyries...";
+			mes "and they always go around in groups of seven.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "What they want is a powerful battlegear...";
+			mes "They always threatened my younger brother Cano and me.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "They were satisfied with basic weapons at first, but";
+			mes "soon they started threatening us saying that they need something more powerful in order to become Valkyries.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "I couldn't stand it, so I ran away... but they're here...";
+			mes "You have to be careful since they found out that materials for Hervor are here.";
+			close;
+		}
+	}
+	if ($2012_tegod_gloria == 2) {// after 10 minutes delay
+		mes "Ah stop following me around!";
+		mes "If you could just get rid of them... Hervor, that's right! I'll make you Hervor!";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "When will they ever stop following me...";
+		mes "Now I'm scared of girls in general... and I'm too scared to do anything...";
+		next;
+		mes "He's babbling now.";
+		mes "Just wait and he'll calm down.";
+		mes "You have to get rid of those girls first.";
+		close;
+	}
+	if ($2012_tegod_gloria == 3) {// event failed
+		mes "... Although I managed to escape from them again...";
+		mes "it's hard.";
+		mes "life is... just so hard.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "I'm so exhausted that I can't do anything.";
+		mes "... I don't think I can do anything for a while, whether it's producing or smithing or whatever it is.";
+		mes "I'm sorry. I'll take a break.";
+		close;
+	}
+	if ($2012_tegod_gloria == 4) {
+		mes "I can finally breathe now.";
+		mes "I'll start making Hervor as promised.";
+		next;
+		switch( select( "Make Hervor.","Fuse materials.","Not now." ) ) {
+		case 1:
+			if (countitem(6595) > 1 && countitem(6596) > 0 && countitem(6594) > 3 && countitem(6597) > 2 && countitem(6602) > 0 && countitem(6605) > 0 && countitem(6604) > 0 && countitem(2115) > 0) {
+				mes "^ff0000Valkyrja's Shield is needed in the process of making Hervor.";
+				mes "You should not possess any other items except for Valkyrja's Shields in order to proceed with the quest.^ff0000";
+				next;
+				mes "^ff0000Even if the refinement level and cards have been applied, the process requires any one of the Valkyrja's Shields you may have.";
+				mes "Please try again after organizing your possessions.^000000";
+				next;
+				if (select( "Organize possessions.","Continue as it is." ) == 1) {
+					mes "You've decided to keep Valkyrja's Shields only.";
+					close;
+				}
+				mes "["+ .@npc_name$ +"]";
+				mes "Oh... thank you.";
+				mes "I can't believe I'm finally touching these materials myself...";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "Here it is.";
+				mes "Wasn't it fast although we had to go through many steps?";
+				mes "I was so overwhelmed that it felt as short as a moment.";
+				next;
+				mes "Hervor, a shield that Blacksmith Velund made for his wife Hervor, is finally made";
+				mes "at the hands of "+ .@npc_name$ +".";
+				delitem 6595,2;// Hammer_Of_Velund
+				delitem 6596,1;// Anvil_Of_Velund
+				delitem 6594,4;// Magic_Bronze_Bullion
+				delitem 6597,3;// Bracelet_Of_Velund
+				delitem 6602,1;// Secret_Of_Rune
+				delitem 6605,1;// Muspellium
+				delitem 6604,1;// Essence_Of_Rune
+				delitem 2115,1;// Valkyrja's_Shield
+				$2012_tegod_gloria = 5;
+				getitem 2181,1;// Hervor
+				announce "Velund's gift [ Hervor ] is introduced to this world by ["+ strcharinfo(0) +"] of ["+ getguildname(.@guild_id) +"] Guild.",bc_all,"0x70dbdb",FW_NORMAL,12;
+				if (.@economy > 20)
+					setcastledata "te_prtcas01",2,(.@economy-20);
+				else
+					setcastledata "te_prtcas01",2,1;// min is 1 for WOE TE
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "Whew.. I don't think I can work for a while.";
+				mes "I'm all exhausted. Hahaha...";
+				close;
+			}
+			mes "["+ .@npc_name$ +"]";
+			mes "However, it seems like we need more materials.";
+			mes "Could you check again? I'll give you the list of what we need.";
+			callsub S_Material, .@npc_name$,1;
+		case 2:
+			callsub S_Fuse, .@npc_name$, "Hervor";
+		case 3:
+			mes "["+ .@npc_name$ +"]";
+			mes "Now is actually the right time to make it.";
+			mes "By the time next Emperium appears, there won't be any chances left.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "Also, keep in mind the fact that I can only do this once a week.";
+			close;
+		}
+	}
+	if ($2012_tegod_gloria == 5) {
+		mes "I'm tired a little bit.";
+		mes "I think I should rest for a few days.";
+		mes "I may look just fine, but I was mentally very tired.";
+		close;
+	}
+	mes "It's strange.";
+	mes "I can't tell how I feel.";
+	mes "Am I having some kind of a health problem?";
+	mes "Is it something uncurable?";
+	close;
+
+S_Material:
+	.@npc_name$ = getarg(0);
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "^4d4dff2 of Velund's Hammer";
+	mes "1 Velund's Anvil";
+	mes "4 Bronze bars with magical power";
+	mes "3 of Velund's Bracelet";
+	mes "1 Rune characters' Secret";
+	mes "1 Valkyrja's Shield";
+	mes "1 Muspellium and Essence of Rune, respectively^000000";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "We need as many materials as these.";
+	mes getarg(2,"");
+	mes "By the way, Muspellium and Essence of Rune need to be made separately with additional materials.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "In order to make Muspellium, you need to ^4d4dffcombine 50 Eluniums and 50 Oridecons^000000.";
+	mes "For Essence of Rune, you need to ^4d4dffcombine 200 Ancient Rough Runestones and 100 Mystic Rough Runestones^000000.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	mes "I'll make Muspellium and Essence of Rune anytime upon your request,";
+	mes "and of course, I'll make Jormungand as soon as we gather all the materials needed.";
+	next;
+	mes "["+ .@npc_name$ +"]";
+	if (getarg(1))
+		mes "What I'm doing is never enough compared to what you've done for me.";
+	else {
+		mes "However, you won't be able to find Velund's items.";
+		mes "... but people say they definitely appear to those who truly want it. I wish you all the luck.";
+	}
+	close;
+
+S_Fuse:
+	.@npc_name$ = getarg(0);
+	mes "["+ .@npc_name$ +"]";
+	mes "Which material do you want to make?";
+	next;
+	switch( select( "Muspellium","Essence of Rune","Forget it." ) ) {
+	case 1:
+		mes "["+ .@npc_name$ +"]";
+		if (countitem(985) > 49 && countitem(984) > 49) {
+			mes "I'll make Muspellium with the materials you've prepared.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "It shouldn't take long.";
+			mes "Here it is.";
+			mes "It is an essential material for making Hervor and Jormungand.";
+			delitem 985,50;// Elunium
+			delitem 984,50;// Oridecon
+			getitem 6605,1;// Muspellium
+			close;
+		}
+		mes "In order to make Muspellium,";
+		mes "^4d4dffyou need 50 Eluniums and 50 Oridecons.^000000";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "We should have all the materials ready, right?";
+		close;
+	case 2:
+		mes "["+ .@npc_name$ +"]";
+		if (countitem(12735) > 199 && countitem(12736) > 99) {
+			mes "I'll make Essence of Rune with the materials you've prepared.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "It shouldn't take long.";
+			mes "Here it is.";
+			mes "It is an essential material for making Hervor and Jormungand.";
+			delitem 12735,200;// Runstone_Ancient
+			delitem 12736,100;// Runstone_Mystic
+			getitem 6604,1;// Essence_Of_Rune
+			close;
+		}
+		mes "For Essence of Rune,";
+		mes "^4d4dffyou need 200 Ancient Rough Runestones and 100 Mystic Rough Runestones.^000000";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Surely, it takes a lot...";
+		close;
+	case 3:
+		mes "["+ .@npc_name$ +"]";
+		mes "Tell me whenever you need it.";
+		mes "I'm glad I can at least do this for you.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Also, a place where you can find materials for "+ getarg(1) +"...";
+		mes "this is like a dream place for me, too.";
+		close;
+	}
+
+OnInit:
+	if ($2012_tegod_gloria == 3 || agitcheck3())// 3 -> quest failed
+		disablenpc strnpcinfo(0);
+	else
+		enablenpc strnpcinfo(0);
+	end;
+}
+
+te_prtcas01,190,2,0	script	#tequest_master_prt01	CLEAR_NPC,{
+	mes "password?";
+	next;
+	if ( callfunc( "F_GM_NPC", 1854,0, 0,9999 ) < 1 ) {
+		mes "Go away";
+		close;
+	}
+	.@map$ = "te_prtcas01";
+	mes "Current Status: " + $2012_tegod_gloria;
+	mes "0: Able to proceed with the quest";
+	mes "1: Proceed with the quest. 10-minute wait";
+	mes "2: Quest in progress";
+	mes "3: Quest failed";
+	mes "4: Able to produce items , 5: Items produced successfully.";
+	next;
+	mes "Princess Status: " + $@2012_tegirls_prt01;
+	mes "Current Commerce Level of the Fortress:" + getcastledata(.@map$,2);
+	next;
+	switch( select( "Do not proceed","Initialization","Raise Commerce Level","Lower Commerce Level" ) ) {
+	case 1:
+		end;
+	case 2:
+		mes "Initialize";
+		donpcevent "#tequest_master_prt01::OnReset";
+		close;
+	case 3:
+		.@economy = getcastledata(.@map$,2) +30;
+		.@economy = .@economy > 100 ? 100 : .@economy;
+		setcastledata .@map$,2,.@economy;
+		mes "Raise Commerce Level by 30";
+		mes "Modified Commerce Level:" + .@economy;
+		close;
+	case 4:
+		.@economy1 = getcastledata(.@map$,2);
+		.@economy2 = .@economy1 > 30 ? (.@economy1 -30) : 1;
+		if (.@economy1 > 30) {
+			mes "Lower Commerce Level by 30";
+			setcastledata .@map$,2,.@economy2;
+		}
+		else {
+			mes "Commerce Level gets decreased to 0 since current level is lower than 30.";
+			setcastledata .@map$,2,1;// min is 1 for WOE TE
+		}
+		mes "Modified Commerce Level:" + .@economy2;
+		close;
+	}
+
+OnReset:// gm Initialization
+	callsub S_EventReset;// kill some quests mobs and stop timer of others npcs
+	callsub S_EventOff;// clear setnpcdisplay
+	$2012_tegod_gloria = 0;
+	$@2012_tegirls_prt01 = 0;
+	.npc_name$ = "";
+	enablenpc "prtg-1-22_prtg-1-31#te";
+	enablenpc "Blacksmith Kai#tegod01";
+	stopnpctimer;
+	end;
+
+OnCommandOn:
+	$2012_tegod_gloria = 1;
+	.npc_name$ = strnpcinfo(0);// for script readability
+	initnpctimer;
+	end;
+
+OnTimer10000:
+	announce "Girls' voices: Kai~ We already know where you are. It's over!",bc_all,"0xFF0000",FW_NORMAL,10;
+	end;
+OnTimer15000:
+	announce "Girls' Voices: We'll wait just 10 minutes. If you don't show up in the meantime, we'll storm the fortress!",bc_all,"0xFF0000",FW_NORMAL,10;
+	end;
+OnTimer595000:
+	mapannounce "te_prtcas01", "A girl's voice: Kai! How dare you ignore our warning! So, you have company there, huh? But how long do you think they'll stay with you?!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer598000:
+	mapannounce "te_prtcas01", "You are forced out of the fortress by unknown power.",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+
+OnTimer600000:
+	$2012_tegod_gloria = 2;
+	mapwarp "te_prtcas01", "te_prt_gld",159,211;
+	donpcevent "Aira#fake01_prt01::OnCommandOn";
+	donpcevent "Kuluna#fake01_prt01::OnCommandOn";
+	donpcevent "Mallina#fake01_prt01::OnCommandOn";
+	donpcevent "Ezella#fake01_prt01::OnCommandOn";
+	donpcevent "Lune#fake01_prt01::OnCommandOn";
+	donpcevent "Morin#fake01_prt01::OnCommandOn";
+	donpcevent "Nasarin#fake01_prt01::OnCommandOn";
+
+	disablenpc "prtg-1-22_prtg-1-31#te";// warp to emperium room
+	end;
+
+OnTimer602000:
+	announce "Gaebolg in Gloria region is being attacked by a group of unidentified beings.",bc_all,"0xFF0000",FW_NORMAL,10;
+	monster "te_prtcas01",0,0,"Raydric",1163,15, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Abysmal Knight",1219,5, .npc_name$ +"::OnMyMobDead";
+
+	monster "te_prtcas01",197,197,"Dalongee",1272,1, .npc_name$ +"::OnMyMobDead";// DARK_LORD
+	monster "te_prtcas01",197,197,"Summoned Reindeer",1251,1, .npc_name$ +"::OnMyMobDead";// KNIGHT_OF_WINDSTORM
+	monster "te_prtcas01",197,197,"Summoned Wolf",1252,1, .npc_name$ +"::OnMyMobDead";// GARM
+
+	monster "te_prtcas01",40,26,"Dalongee",1272,1, .npc_name$ +"::OnMyMobDead";// DARK_LORD
+	monster "te_prtcas01",80,33,"Summoned Reindeer",1251,1, .npc_name$ +"::OnMyMobDead";// KNIGHT_OF_WINDSTORM
+	monster "te_prtcas01",151,96,"Summoned Wolf",1252,1, .npc_name$ +"::OnMyMobDead";// GARM
+	end;
+
+OnTimer610000:
+	monster "te_prtcas01",0,0,"Raydric",1163,15, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Abysmal Knight",1219,5, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Bloody Knight",1268,5, .npc_name$ +"::OnMyMobDead";
+	end;
+
+OnTimer1000000:
+OnTimer1300000:
+OnTimer1900000:
+OnTimer2500000:
+OnTimer3100000:
+	callsub S_MobRedondant;
+	end;
+S_MobRedondant:
+	monster "te_prtcas01",0,0,"Raydric",1163,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Khalitzburg",1132,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Abysmal Knight",1219,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"High Orc",1213,10, .npc_name$ +"::OnMyMobDead";
+	monster "te_prtcas01",0,0,"Bloody Knight",1268,5, .npc_name$ +"::OnMyMobDead";
+	end;
+
+OnTimer4200000:
+	mapannounce "te_prtcas01", "Girls: ... how long do we have to wait?",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4205000:
+	mapannounce "te_prtcas01", "Girls: Hervor should be made for us!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4210000:
+	mapannounce "te_prtcas01", "Girls: Come on, cut if off! You guys are so persistent!!",bc_map,"0x00ff00",FW_NORMAL,12;
+	end;
+OnTimer4220000:
+	mapannounce "te_prtcas01", "Aira: Ah! I can't take it anymore! Girls, come here!",bc_map,"0x00ff00",FW_NORMAL,12;
+
+	$2012_tegod_gloria = 3;// quest off until someone break the emp
+	callsub S_EventReset;
+	enablenpc "prtg-1-22_prtg-1-31#te";
+	end;
+
+OnTimer4225000:
+	donpcevent "#eproom_girls_prt01::OnReset";
+	donpcevent "#end_aira_prt01::OnCommandOn";
+	donpcevent "#end_kuluna_prt01::OnCommandOn";
+	donpcevent "#end_mallina_prt01::OnCommandOn";
+	donpcevent "#end_ezella_prt01::OnCommandOn";
+	donpcevent "#end_lune_prt01::OnCommandOn";
+	donpcevent "#end_morin_prt01::OnCommandOn";
+	donpcevent "#end_nasarin_prt01::OnCommandOn";
+	end;
+
+OnTimer4227000:
+	npctalk "Kai: Oh... no! What are you going to do to me?!", "Blacksmith Kai#tegod01";
+	end;
+OnTimer4230000:
+	npctalk "Aira: Mm? Hey Kai. You're going home.", "#end_aira_prt01";
+	end;
+OnTimer4233000:
+	npctalk "Kuluna: Yup~ You have to fix my broken wand and make powerful weapons for me once you get back!", "#end_kuluna_prt01";
+	end;
+OnTimer4236000:
+	npctalk "Ezella: Try to run away again. You'll be sorry, understand?", "#end_ezella_prt01";
+	end;
+OnTimer4237000:
+	npctalk "Nasarin: ... Just take him. Why are you guys talking to him so much?", "#end_nasarin_prt01";
+	end;
+OnTimer4240000:
+	npctalk "Aira: You're right! Alright then!", "#end_aira_prt01";
+	npctalk "Kai: Oh... No... Noooo!!!!!", "Blacksmith Kai#tegod01";
+	end;
+
+OnTimer4243000:
+	mapannounce "te_prtcas01", "You've failed to recapture the fortress. Kai is now gone.",bc_map,"0x00ff00",FW_NORMAL,12;
+	disablenpc "Blacksmith Kai#tegod01";
+	callsub S_EventOff;// clear setnpcdisplay
+	.npc_name$ = "";
+	stopnpctimer;
+	end;
+
+S_EventOff:
+	donpcevent "#end_aira_prt01::OnCommandOff";
+	donpcevent "#end_kuluna_prt01::OnCommandOff";
+	donpcevent "#end_mallina_prt01::OnCommandOff";
+	donpcevent "#end_ezella_prt01::OnCommandOff";
+	donpcevent "#end_lune_prt01::OnCommandOff";
+	donpcevent "#end_morin_prt01::OnCommandOff";
+	donpcevent "#end_nasarin_prt01::OnCommandOff";
+	return;
+
+OnStop:// all girls have been defeated, kill remaining mobs and stop timer
+	callsub S_EventReset;
+	$@2012_tegirls_prt01 = 0;
+	.npc_name$ = "";
+	stopnpctimer;
+	end;
+
+S_EventReset:
+	killmonster "te_prtcas01", .npc_name$ +"::OnMyMobDead";
+	donpcevent "#eproom_girls_prt01::OnReset";
+	donpcevent "Aira#fake01_prt01::OnReset";
+	donpcevent "Kuluna#fake01_prt01::OnReset";
+	donpcevent "Mallina#fake01_prt01::OnReset";
+	donpcevent "Ezella#fake01_prt01::OnReset";
+	donpcevent "Lune#fake01_prt01::OnReset";
+	donpcevent "Morin#fake01_prt01::OnReset";
+	donpcevent "Nasarin#fake01_prt01::OnReset";
+
+	donpcevent "#aira_real_prt01::OnReset";
+	donpcevent "#kuluna_real_prt01::OnReset";
+	donpcevent "#mallina_real_prt01::OnReset";
+	donpcevent "#ezella_real_prt01::OnReset";
+	donpcevent "#lune_real_prt01::OnReset";
+	donpcevent "#morin_real_prt01::OnReset";
+	donpcevent "#nasarin_real_prt01::OnReset";
+	return;
+
+OnMyMobDead:
+	end;
+
+OnInit:
+	$@2012_tegirls_prt01 = 0;// girls mobs killed count
+	if ($2012_tegod_gloria < 3)
+		$2012_tegod_gloria = 0;
+	end;
+}
+
+
+te_prtcas01,64,20,3	script	Aira#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Aira#fake01_prt01";
+	setnpcdisplay "Aira#fake01_prt01",2443;// AIRA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Aira#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#aira_real_prt01::OnCommandOn";
+	npctalk "Aira: My summon water balls! I'll get you! With my own hands!!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Aira#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Aira#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Aira#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",65,28,"Bodyguard",1213,5, "Aira#fake01_prt01::OnMyMobDead";// HIGH_ORC
+	monster "te_prtcas01",65,28,"Bodyguard",1309,5, "Aira#fake01_prt01::OnMyMobDead";// GAJOMART
+	end;
+OnTimer2000:
+	monster "te_prtcas01",65,28,"Bodyguard",1367,5, "Aira#fake01_prt01::OnMyMobDead";// BLAZZER
+	monster "te_prtcas01",65,10,"Bodyguard",1837,5, "Aira#fake01_prt01::OnMyMobDead";// IMP
+	end;
+OnTimer3000:
+	monster "te_prtcas01",65,10,"Bodyguard",1949,1, "Aira#fake01_prt01::OnMyMobDead";// B_S_GUARDIAN
+	monster "te_prtcas01",65,28,"Bodyguard",1833,2, "Aira#fake01_prt01::OnMyMobDead";// KASA
+	monster "te_prtcas01",65,28,"Bodyguard",1831,2, "Aira#fake01_prt01::OnMyMobDead";// SALAMANDER
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,50,54,3	script	Kuluna#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Kuluna#fake01_prt01";
+	setnpcdisplay "Kuluna#fake01_prt01",2444;// KULUNA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Kuluna#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#kuluna_real_prt01::OnCommandOn";
+	npctalk "Kuluna: Hmm? So you're going to be that way? You'd better be ready!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Kuluna#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Kuluna#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Kuluna#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",54,61,"Guardian",1143,10, "Kuluna#fake01_prt01::OnMyMobDead";// MARIONETTE
+	end;
+OnTimer2000:
+	monster "te_prtcas01",54,61,"Guardian",1693,10, "Kuluna#fake01_prt01::OnMyMobDead";// PLASMA_Y
+	end;
+OnTimer3000:
+	monster "te_prtcas01",54,61,"Guardian",1869,5, "Kuluna#fake01_prt01::OnMyMobDead";// FLAME_SKULL
+	monster "te_prtcas01",54,61,"Guardian",1704,1, "Kuluna#fake01_prt01::OnMyMobDead";// THA_ODIUM
+	monster "te_prtcas01",54,61,"Guardian",1705,1, "Kuluna#fake01_prt01::OnMyMobDead";// THA_DESPERO
+	monster "te_prtcas01",54,61,"Guardian",1706,1, "Kuluna#fake01_prt01::OnMyMobDead";// THA_MAERO
+	monster "te_prtcas01",54,61,"Guardian",1707,1, "Kuluna#fake01_prt01::OnMyMobDead";// THA_DOLOR
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,175,92,3	script	Mallina#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Mallina#fake01_prt01";
+	setnpcdisplay "Mallina#fake01_prt01",2445;// MALLINA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Mallina#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#mallina_real_prt01::OnCommandOn";
+	npctalk "Mallina: Stop it!! Stop bothering me!!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Mallina#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Mallina#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Mallina#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",182,92,"The Absolute",1993,10, "Mallina#fake01_prt01::OnMyMobDead";// NAGA
+	end;
+OnTimer3000:
+	monster "te_prtcas01",182,92,"The Absolute",1695,10, "Mallina#fake01_prt01::OnMyMobDead";// PLASMA_G
+	end;
+OnTimer5000:
+	monster "te_prtcas01",182,92,"The Absolute",1717,5, "Mallina#fake01_prt01::OnMyMobDead";// FERUS_
+	monster "te_prtcas01",182,92,"The Absolute",1991,2, "Mallina#fake01_prt01::OnMyMobDead";// TENDRILRION
+	monster "te_prtcas01",182,92,"The Absolute",1989,2, "Mallina#fake01_prt01::OnMyMobDead";// HILLSRION
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,159,113,3	script	Ezella#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Ezella#fake01_prt01";
+	setnpcdisplay "Ezella#fake01_prt01",2446;// EZELLA
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Ezella#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#ezella_real_prt01::OnCommandOn";
+	npctalk "Ezella: Ahh... This only makes both of us more tired...";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Ezella#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Ezella#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Ezella#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",161,111,"Convoy",1692,10, "Ezella#fake01_prt01::OnMyMobDead";// BREEZE
+	end;
+OnTimer2000:
+	monster "te_prtcas01",161,111,"Convoy",1627,2, "Ezella#fake01_prt01::OnMyMobDead";// ANOPHELES
+	monster "te_prtcas01",161,111,"Convoy",1656,2, "Ezella#fake01_prt01::OnMyMobDead";// KAVAC
+	monster "te_prtcas01",161,111,"Convoy",1315,6, "Ezella#fake01_prt01::OnMyMobDead";// ASSULTER
+	end;
+OnTimer3000:
+	monster "te_prtcas01",161,111,"Convoy",1669,5, "Ezella#fake01_prt01::OnMyMobDead";// DIMIK
+	monster "te_prtcas01",161,111,"Convoy",1259,2, "Ezella#fake01_prt01::OnMyMobDead";// GRYPHON
+	monster "te_prtcas01",161,111,"Convoy",1783,1, "Ezella#fake01_prt01::OnMyMobDead";// GALION
+	monster "te_prtcas01",161,111,"Convoy",1950,1, "Ezella#fake01_prt01::OnMyMobDead";// B_B_GUARDIAN
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,152,102,3	script	Lune#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Lune#fake01_prt01";
+	setnpcdisplay "Lune#fake01_prt01",2447;// LUNE
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Lune#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#lune_real_prt01::OnCommandOn";
+	npctalk "Lune: ..you want to be drowned in the deep sea? Huh?";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Lune#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Lune#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Lune#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",144,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";// GAZETI
+	monster "te_prtcas01",145,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",146,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",147,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",148,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",149,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",150,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",151,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",152,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",153,97,"Bodyguard",1778,1, "Lune#fake01_prt01::OnMyMobDead";
+	end;
+
+OnTimer2000:
+	monster "te_prtcas01",155,97,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";// AQUA_ELEMENTAL
+	monster "te_prtcas01",155,96,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,95,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,94,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,93,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,92,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,91,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,90,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,89,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	monster "te_prtcas01",155,87,"Bodyguard",2016,1, "Lune#fake01_prt01::OnMyMobDead";
+	end;
+
+OnTimer3000:
+	monster "te_prtcas01",149,97,"Bodyguard",1777,5, "Lune#fake01_prt01::OnMyMobDead";// ICE_TITAN
+	monster "te_prtcas01",149,97,"Bodyguard",1681,1, "Lune#fake01_prt01::OnMyMobDead";// GEMINI
+	monster "te_prtcas01",149,97,"Bodyguard",2021,1, "Lune#fake01_prt01::OnMyMobDead";// PHYLLA
+	monster "te_prtcas01",149,97,"Bodyguard",2020,2, "Lune#fake01_prt01::OnMyMobDead";// RHYNCHO
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,99,180,3	script	Morin#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Morin#fake01_prt01";
+	setnpcdisplay "Morin#fake01_prt01",2448;// MORIN
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Morin#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#morin_real_prt01::OnCommandOn";
+	npctalk "Morin: ... . ...";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Morin#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Morin#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Morin#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",99,176,"Nightmare Gang",1379,10, "Morin#fake01_prt01::OnMyMobDead";// NIGHTMARE_TERROR
+	end;
+OnTimer2000:
+	monster "te_prtcas01",99,176,"Nightmare Gang",1701,5, "Morin#fake01_prt01::OnMyMobDead";// SHELTER
+	monster "te_prtcas01",99,176,"Nightmare Gang",1753,5, "Morin#fake01_prt01::OnMyMobDead";// FRUS
+	end;
+OnTimer3000:
+	monster "te_prtcas01",99,176,"Nightmare Gang",1752,5, "Morin#fake01_prt01::OnMyMobDead";// SKOGUL
+	monster "te_prtcas01",99,176,"Nightmare Gang",1733,1, "Morin#fake01_prt01::OnMyMobDead";// KIEL
+	monster "te_prtcas01",99,176,"Nightmare Gang",1205,1, "Morin#fake01_prt01::OnMyMobDead";// EXECUTIONER
+	monster "te_prtcas01",99,176,"Nightmare Gang",2040,1, "Morin#fake01_prt01::OnMyMobDead";// TIRFING_R
+	monster "te_prtcas01",99,176,"Nightmare Gang",1203,1, "Morin#fake01_prt01::OnMyMobDead";// MYSTELTAINN
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,120,174,3	script	Nasarin#fake01_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "Nasarin#fake01_prt01";
+	setnpcdisplay "Nasarin#fake01_prt01",2449;// NASARIN
+	initnpctimer;
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","Nasarin#fake01_prt01::OnMyMobDead" )) end;
+	donpcevent "#nasarin_real_prt01::OnCommandOn";
+	npctalk "Nasarin: ..Ahh.. It's so hard to become a Valkyrie!";
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "Nasarin#fake01_prt01::OnMyMobDead";
+	setnpcdisplay "Nasarin#fake01_prt01",CLEAR_NPC;
+OnInit:
+	disablenpc "Nasarin#fake01_prt01";
+	end;
+
+OnTimer1000:
+	monster "te_prtcas01",125,170,"Gang of Poison",1987,10, "Nasarin#fake01_prt01::OnMyMobDead";// CENTIPEDE
+	end;
+OnTimer2000:
+	monster "te_prtcas01",125,170,"Gang of Poison",2015,10, "Nasarin#fake01_prt01::OnMyMobDead";// PINGUICULA_D
+	end;
+OnTimer3000:
+	monster "te_prtcas01",125,170,"Gang of Poison",1618,3, "Nasarin#fake01_prt01::OnMyMobDead";// UNGOLIANT
+	monster "te_prtcas01",125,170,"Khalitz",1949,1, "Nasarin#fake01_prt01::OnMyMobDead";// B_S_GUARDIAN
+	stopnpctimer;
+	end;
+}
+
+-	script	real_prt01	-1,{
+	end;
+OnCommandOn:
+	.@npc_name$ = strnpcinfo(0);
+	if (.@npc_name$ == "#aira_real_prt01")
+		monster "te_prtcas01",65,28,"Aira in a blaze",2443,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#kuluna_real_prt01")
+		monster "te_prtcas01",54,61,"Passionate Kuluna",2444,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#mallina_real_prt01")
+		monster "te_prtcas01",182,92,"Mallina of the Earth",2445,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#ezella_real_prt01")
+		monster "te_prtcas01",161,111,"Ezella of Verdure",2446,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#lune_real_prt01")
+		monster "te_prtcas01",149,97,"Lune of the Eternal Glacier",2447,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#morin_real_prt01")
+		monster "te_prtcas01",99,176,"Morin of the Abyss",2448,1, .@npc_name$ +"::OnMyMobDead";
+	else if (.@npc_name$ == "#nasarin_real_prt01")
+		monster "te_prtcas01",125,170,"Fatal Nasarin",2449,1, .@npc_name$ +"::OnMyMobDead";
+	end;
+
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", strnpcinfo(0) +"::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01",strnpcinfo(0) +"::OnMyMobDead" ) == 0)
+		initnpctimer;
+	end;
+
+OnTimer1000:
+	if (mobcount( "te_prtcas01",strnpcinfo(0) +"::OnMyMobDead" ) == 0) {
+		$@2012_tegirls_prt01++;
+		if ($@2012_tegirls_prt01 == 7) {
+			mapannounce "te_prtcas01","Kai: aaahh!! The girls broke the shields and made their way into where Emperium is!!!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			donpcevent "#eproom_girls_prt01::OnCommandOn";
+		}
+		else {
+			.@npc_name$ = strnpcinfo(0);
+			if (.@npc_name$ == "#aira_real_prt01")
+				mapannounce "te_prtcas01","Aira: You think I lost? You're wrong! We force our way to where Kai is!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#kuluna_real_prt01")
+				mapannounce "te_prtcas01","Kuluna: ... This is called a strategic retreat.",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#mallina_real_prt01")
+				mapannounce "te_prtcas01","Mallina: ... Why are you disturbing us so much? But victory will be ours in the end!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#ezella_real_prt01")
+				mapannounce "te_prtcas01","Ezella: Oh you, a weakling that would just disappear like the wind... !!!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#lune_real_prt01")
+				mapannounce "te_prtcas01","Lune: ..Alright. Let the battle begin!",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#morin_real_prt01")
+				mapannounce "te_prtcas01","Morin: It's not... interesting anymore.",bc_map,"0x00ff00",FW_NORMAL,12;
+			else if (.@npc_name$ == "#nasarin_real_prt01")
+				mapannounce "te_prtcas01","Nasarin: .. I wasted my time. Kai is in the center of this fortress?",bc_map,"0x00ff00",FW_NORMAL,12;
+		}
+	}
+	stopnpctimer;
+	end;
+}
+te_prtcas01,192,2,0	duplicate(real_prt01)	#aira_real_prt01	CLEAR_NPC
+te_prtcas01,193,2,0	duplicate(real_prt01)	#kuluna_real_prt01	CLEAR_NPC
+te_prtcas01,194,2,0	duplicate(real_prt01)	#mallina_real_prt01	CLEAR_NPC
+te_prtcas01,194,2,0	duplicate(real_prt01)	#ezella_real_prt01	CLEAR_NPC
+te_prtcas01,196,2,0	duplicate(real_prt01)	#lune_real_prt01	CLEAR_NPC
+te_prtcas01,197,2,0	duplicate(real_prt01)	#morin_real_prt01	CLEAR_NPC
+te_prtcas01,198,2,0	duplicate(real_prt01)	#nasarin_real_prt01	CLEAR_NPC
+
+
+te_prtcas01,199,2,0	script	#eproom_girls_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	enablenpc "prtg-1-22_prtg-1-31#te";
+	monster "te_prtcas01",184,188,"Fatal Nasarin",2449,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",191,182,"Morin of the Abyss",2448,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",183,183,"Lune of the Eternal Glacier",2447,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",197,188,"Ezella of Verdure",2446,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",202,190,"Mallina of the Earth",2445,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",199,192,"Passionate Kuluna",2444,1, "#eproom_girls_prt01::OnMyMobDead";
+	monster "te_prtcas01",200,195,"Aira in a blaze",2443,1, "#eproom_girls_prt01::OnMyMobDead";
+	end;
+
+OnReset:
+	stopnpctimer;
+	killmonster "te_prtcas01", "#eproom_girls_prt01::OnMyMobDead";
+	end;
+
+OnMyMobDead:
+	if (mobcount( "te_prtcas01","#eproom_girls_prt01::OnMyMobDead" ) == 0)
+		initnpctimer;
+	end;
+
+OnTimer3000:
+	if (mobcount( "te_prtcas01","#eproom_girls_prt01::OnMyMobDead" ) == 0) {
+		donpcevent "#tequest_master_prt01::OnStop";
+		$2012_tegod_gloria = 4;
+		mapannounce "te_prtcas01","You have defeated the girls and recaptured the fortress successfully.",bc_map,"0x00ff00",FW_NORMAL,12;
+	}
+	stopnpctimer;
+	end;
+}
+
+te_prtcas01,203,204,5	script	#end_aira_prt01	CLEAR_NPC,{
+	end;
+OnCommandOn:
+	.@npc_name$ = strnpcinfo(0);
+	enablenpc .@npc_name$;
+	if (compare(.@npc_name$,"aira")) setnpcdisplay .@npc_name$,2443;
+	else if (compare(.@npc_name$,"kuluna")) setnpcdisplay .@npc_name$,2444;
+	else if (compare(.@npc_name$,"mallina")) setnpcdisplay .@npc_name$,2445;
+	else if (compare(.@npc_name$,"ezella")) setnpcdisplay .@npc_name$,2446;
+	else if (compare(.@npc_name$,"lune")) setnpcdisplay .@npc_name$,2447;
+	else if (compare(.@npc_name$,"morin")) setnpcdisplay .@npc_name$,2448;
+	else if (compare(.@npc_name$,"nasarin")) setnpcdisplay .@npc_name$,2449;
+	end;
+
+OnCommandOff:
+	setnpcdisplay strnpcinfo(0),CLEAR_NPC;
+OnInit:
+	disablenpc strnpcinfo(0);
+	end;
+}
+te_prtcas01,205,205,3	duplicate(#end_aira_prt01)	#end_kuluna_prt01	CLEAR_NPC
+te_prtcas01,204,203,7	duplicate(#end_aira_prt01)	#end_mallina_prt01	CLEAR_NPC
+te_prtcas01,203,205,5	duplicate(#end_aira_prt01)	#end_ezella_prt01	CLEAR_NPC
+te_prtcas01,205,204,3	duplicate(#end_aira_prt01)	#end_lune_prt01	CLEAR_NPC
+te_prtcas01,204,205,4	duplicate(#end_aira_prt01)	#end_morin_prt01	CLEAR_NPC
+te_prtcas01,205,203,1	duplicate(#end_aira_prt01)	#end_nasarin_prt01	CLEAR_NPC

+ 42 - 0
npc/re/quests/woe_te/te_mission_alde.txt

@@ -0,0 +1,42 @@
+//===== rAthena Script =======================================
+//= Mission WoE TE
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPC for mission WoE TE at Aldebaran
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+te_aldecas1,2,2,0	duplicate(#popswitch)	#popswitch_alde01	CLEAR_NPC
+te_aldecas2,2,2,0	duplicate(#popswitch)	#popswitch_alde02	CLEAR_NPC
+te_aldecas3,2,2,0	duplicate(#popswitch)	#popswitch_alde03	CLEAR_NPC
+te_aldecas4,2,2,0	duplicate(#popswitch)	#popswitch_alde04	CLEAR_NPC
+te_aldecas5,2,2,0	duplicate(#popswitch)	#popswitch_alde05	CLEAR_NPC
+
+te_aldecas1,2,3,0	duplicate(pop_mission_TE)	#popa_alde01	CLEAR_NPC
+te_aldecas1,2,3,0	duplicate(pop_mission_TE)	#popb_alde01	CLEAR_NPC
+te_aldecas1,2,3,0	duplicate(pop_mission_TE)	#popc_alde01	CLEAR_NPC
+te_aldecas1,2,3,0	duplicate(pop_mission_TE)	#popd_alde01	CLEAR_NPC
+
+te_aldecas2,2,3,0	duplicate(pop_mission_TE)	#popa_alde02	CLEAR_NPC
+te_aldecas2,2,3,0	duplicate(pop_mission_TE)	#popb_alde02	CLEAR_NPC
+te_aldecas2,2,3,0	duplicate(pop_mission_TE)	#popc_alde02	CLEAR_NPC
+te_aldecas2,2,3,0	duplicate(pop_mission_TE)	#popd_alde02	CLEAR_NPC
+
+te_aldecas3,2,3,0	duplicate(pop_mission_TE)	#popa_alde03	CLEAR_NPC
+te_aldecas3,2,3,0	duplicate(pop_mission_TE)	#popb_alde03	CLEAR_NPC
+te_aldecas3,2,3,0	duplicate(pop_mission_TE)	#popc_alde03	CLEAR_NPC
+te_aldecas3,2,3,0	duplicate(pop_mission_TE)	#popd_alde03	CLEAR_NPC
+
+te_aldecas4,2,3,0	duplicate(pop_mission_TE)	#popa_alde04	CLEAR_NPC
+te_aldecas4,2,3,0	duplicate(pop_mission_TE)	#popb_alde04	CLEAR_NPC
+te_aldecas4,2,3,0	duplicate(pop_mission_TE)	#popc_alde04	CLEAR_NPC
+te_aldecas4,2,3,0	duplicate(pop_mission_TE)	#popd_alde04	CLEAR_NPC
+
+te_aldecas5,2,3,0	duplicate(pop_mission_TE)	#popa_alde05	CLEAR_NPC
+te_aldecas5,2,3,0	duplicate(pop_mission_TE)	#popb_alde05	CLEAR_NPC
+te_aldecas5,2,3,0	duplicate(pop_mission_TE)	#popc_alde05	CLEAR_NPC
+te_aldecas5,2,3,0	duplicate(pop_mission_TE)	#popd_alde05	CLEAR_NPC
+
+
+te_alde_gld,218,182,5	duplicate(Training_Instructor_TE)	Kafragarten Instructor#t	4_M_HUMAN_02

+ 568 - 0
npc/re/quests/woe_te/te_mission_main.txt

@@ -0,0 +1,568 @@
+//===== rAthena Script =======================================
+//= Mission WoE TE
+//===== Description: =========================================
+//= [Official Conversion]
+//= Template for mission WoE TE
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+// This npc call the duplicate of pop_mission_TE npc in order to spawn the mobs mission.
+-	script	#popswitch	-1,{
+OnInit:
+	if (strnpcinfo(4) == "") end;
+	if (agitcheck3() == 1)
+		donpcevent strnpcinfo(0) + "::OnCommandOn";
+	else
+		donpcevent strnpcinfo(0) + "::OnReset";
+	end;
+
+OnCommandOn:
+	.@map$ = strnpcinfo(4);
+	if (compare( .@map$,"te_alde" ))
+		callsub S_Event, "alde0"+ charat( .@map$,getstrlen(.@map$)-1 ) + "::OnCommandOn";// #popa_alde0[1-5]::OnCommandOn
+	else
+		callsub S_Event, "prt0"+ charat( .@map$,getstrlen(.@map$)-1 ) + "::OnCommandOn";
+	end;
+
+OnReset:
+	.@map$ = strnpcinfo(4);
+	if (compare( .@map$,"te_alde" ))
+		callsub S_Event, "alde0"+ charat( .@map$,getstrlen(.@map$)-1 ) + "::OnReset";
+	else
+		callsub S_Event, "prt0"+ charat( .@map$,getstrlen(.@map$)-1 ) + "::OnReset";
+	end;
+
+S_Event:
+	.@string$ = getarg(0);
+	donpcevent "#popa_"+ .@string$;
+	donpcevent "#popb_"+ .@string$;
+	donpcevent "#popc_"+ .@string$;
+	donpcevent "#popd_"+ .@string$;
+	end;
+}
+
+-	script	pop_mission_TE	-1,{
+OnMyMobDead:
+	.@map$ = strnpcinfo(4);
+	if (mobcount( .@map$,strnpcinfo(0) +"::OnMyMobDead" ) < 1 && playerattached()) {// playerattached stop the script if killmonster / maprespawnguildid
+		callsub S_Coord, .@item_id, .@mob_id, .@coord;
+		for ( .@mtem = 0; .@mtem < 20; .@mtem++ )
+			makeitem .@item_id,1, .@map$, rand( .@coord[0],.@coord[1] ), rand( .@coord[2],.@coord[3] );
+		initnpctimer;
+	}
+	end;
+
+OnTimer12000:
+	stopnpctimer;
+OnCommandOn:
+	callsub S_Coord, .@item_id, .@mob_id, .@coord;
+	monster strnpcinfo(4), rand( .@coord[0],.@coord[1] ), rand( .@coord[2],.@coord[3] ),"--ja--",.@mob_id,1,strnpcinfo(0) + "::OnMyMobDead";
+	end;
+
+OnReset:
+	killmonster strnpcinfo(4),strnpcinfo(0) +"::OnMyMobDead";
+	stopnpctimer;
+	end;
+
+S_Coord:
+	if (compare( strnpcinfo(4),"te_alde" )) {
+		set getarg(0), 7056;// Payroll_Of_Kafra
+		set getarg(1), 2450;// THIEF_PORING
+		.@hidden_name$ = strnpcinfo(2);
+
+		if (.@hidden_name$ == "popa_alde01") setarray .@coord[0],178,234, 128,175;// area x1,x2, y1,y2
+		else if (.@hidden_name$ == "popb_alde01") setarray .@coord[0],14,65, 186,222;
+		else if (.@hidden_name$ == "popc_alde01") setarray .@coord[0],46,114, 37,105;
+		else if (.@hidden_name$ == "popd_alde01") setarray .@coord[0],198,233, 5,41;
+		else if (.@hidden_name$ == "popa_alde02") setarray .@coord[0],29,73, 169,211;
+		else if (.@hidden_name$ == "popb_alde02") setarray .@coord[0],175,220, 136,184;
+		else if (.@hidden_name$ == "popc_alde02") setarray .@coord[0],196,231, 7,40;
+		else if (.@hidden_name$ == "popd_alde02") setarray .@coord[0],53,125, 11,80;
+		else if (.@hidden_name$ == "popa_alde03") setarray .@coord[0],43,107, 212,264;
+		else if (.@hidden_name$ == "popb_alde03") setarray .@coord[0],181,215, 150,187;
+		else if (.@hidden_name$ == "popc_alde03") setarray .@coord[0],59,121, 63,123;
+		else if (.@hidden_name$ == "popd_alde03") setarray .@coord[0],192,215, 24,51;
+		else if (.@hidden_name$ == "popa_alde04") setarray .@coord[0],154,189, 34,101;
+		else if (.@hidden_name$ == "popb_alde04") setarray .@coord[0],21,76, 64,125;
+		else if (.@hidden_name$ == "popc_alde04") setarray .@coord[0],120,143, 200,219;
+		else if (.@hidden_name$ == "popd_alde04") setarray .@coord[0],13,37, 199,222;
+		else if (.@hidden_name$ == "popa_alde05") setarray .@coord[0],145,207, 47,78;
+		else if (.@hidden_name$ == "popb_alde05") setarray .@coord[0],13,43, 87,116;
+		else if (.@hidden_name$ == "popc_alde05") setarray .@coord[0],11,63, 177,230;
+		else if (.@hidden_name$ == "popd_alde05") setarray .@coord[0],130,167, 191,225;
+	}
+	else {
+		set getarg(0), 6592;// Small_Wooden_Chest
+		set getarg(1), 2451;// BABY_STRANGE
+		.@hidden_name$ = strnpcinfo(2);
+
+		if (.@hidden_name$ == "popa_prt01") setarray .@coord[0],10,90, 10,80;
+		else if (.@hidden_name$ == "popb_prt01") setarray .@coord[0],146,190, 64,118;
+		else if (.@hidden_name$ == "popc_prt01") setarray .@coord[0],92,128, 170,204;
+		else if (.@hidden_name$ == "popd_prt01") setarray .@coord[0],188,204, 180,204;
+		else if (.@hidden_name$ == "popa_prt02") setarray .@coord[0],15,95, 162,225;
+		else if (.@hidden_name$ == "popb_prt02") setarray .@coord[0],144,172, 152,175;
+		else if (.@hidden_name$ == "popc_prt02") setarray .@coord[0],43,99, 23,62;
+		else if (.@hidden_name$ == "popd_prt02") setarray .@coord[0],168,204, 24,58;
+		else if (.@hidden_name$ == "popa_prt03") setarray .@coord[0],7,76, 48,110;
+		else if (.@hidden_name$ == "popb_prt03") setarray .@coord[0],160,204, 32,81;
+		else if (.@hidden_name$ == "popc_prt03") setarray .@coord[0],138,190, 183,232;
+		else if (.@hidden_name$ == "popd_prt03") setarray .@coord[0],8,36, 202,227;
+		else if (.@hidden_name$ == "popa_prt04") setarray .@coord[0],246,270, 233,275;
+		else if (.@hidden_name$ == "popb_prt04") setarray .@coord[0],14,53,236,273;
+		else if (.@hidden_name$ == "popc_prt04") setarray .@coord[0],13,96, 12,63;
+		else if (.@hidden_name$ == "popd_prt04") setarray .@coord[0],259,283, 14,35;
+		else if (.@hidden_name$ == "popa_prt05") setarray .@coord[0],17,95, 226,281;
+		else if (.@hidden_name$ == "popb_prt05") setarray .@coord[0],243,287, 243,288;
+		else if (.@hidden_name$ == "popc_prt05") setarray .@coord[0],16,66, 17,60;
+		else if (.@hidden_name$ == "popd_prt05") setarray .@coord[0],205,282, 12,93;
+	}
+	for ( .@i = 0; .@i < 4; .@i++ )
+		set getelementofarray( getarg(2),.@i ), .@coord[.@i];
+	return;
+}
+
+
+-	script	Training_Instructor_TE	-1,{
+	if (checkweight(1201,5) == 0) {
+		mes "You have too many items to proceed with the quest.";
+		mes "Please lighten your load and try again.";
+		close;
+	}
+	.@map$ = strnpcinfo(4);
+	if (.@map$ == "te_alde_gld") {
+		.@npc_name$ = "Mana";
+		.@fortress$ = "Kafragarten";
+		.@menu$ = callsub( S_Menu, .@quest_id,
+			7510,"1 Suspicious Poring",
+			7511,"10 Suspicious Poring",
+			7512,"30 Suspicious Poring",
+			7504,"Destroy 1 Emperium",
+			7505,"Destroy 3 Emperiums",
+			7506,"Destroy 5 Emperiums",
+			7513,"10 Kafra's Paychecks",
+			7514,"20 Kafra's Paychecks",
+			7515,"30 Kafra's Paychecks" );
+	}
+	else {
+		.@npc_name$ = "Rune";
+		.@fortress$ = "Gloria";
+		.@menu$ = callsub( S_Menu, .@quest_id,
+			7501,"1 Suspicious Babee",
+			7502,"10 Suspicious Babee",
+			7503,"30 Suspicious Babee",
+			7504,"Destroy 1 Emperium",
+			7505,"Destroy 3 Emperiums",
+			7506,"Destroy 5 Emperiums",
+			7507,"10 Small Wooden Boxes",
+			7508,"20 Small Wooden Boxes",
+			7509,"30 Small Wooden Boxes" );
+	}
+	mes "["+ .@npc_name$ +"]";
+	if (jobcanentermap("te_prtcas01") == 0) {
+		mes "Ah... you...";
+		mes "based on TE rules, I won't be ordering you or asking you favors unfortunately.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Hey now, since this place is just for primary and secondary job classes as well as users without expanded levels, could you leave if you got nothing else to do here?";
+		close;
+	}
+	mes "There are missions you can complete in TE region.";
+	mes "Let's see, what do you want?";
+	next;
+	switch( select( "Accept/Conform Missions", "What do you mean a mission?", "I don't have any." ) ) {
+	case 1:
+		mes "["+ .@npc_name$ +"]";
+		if (BaseLevel < 70) {
+			mes "Mm, I'm sorry but missions are for users with ^4d4dff70 level^000000 or higher.";
+			mes "Honestly, it's hard to complete a mission if your level is too low.";
+			close;
+		}
+		.@time_check = WoeTETimeStart(3600);
+		.@siege_check = agitcheck3();
+		mes "You already know that you have to accept a mission in a certain period of time, right?";
+		if (.@time_check == 1 || .@siege_check == 1)
+			mes "Moreover, you have to keep in mind that you can't accept both high-level and low-level missions simultaneously if they are of the same content.";
+		else {
+			mes "Unfortunately, you can't accept missions right now.";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			.@playtime_check2 = checkquest(7516,PLAYTIME);// A Break for Commercial Development
+			if (.@playtime_check2 == 2) {
+				erasequest 7516;
+				mes "Mm, you were taking a break?";
+				mes "Well, it doesn't matter anymore.";
+			}
+			mes "You can only check the results of the missions you've already accepted.";
+		}
+		next;
+		.@s = select( .@menu$ + "Cancel" ) -1;
+		mes "["+ .@npc_name$ +"]";
+		if (.@s == 9) {
+			mes "See you later then.";
+			close;
+		}
+
+		.@main_quest = .@quest_id[.@s];
+		deletearray .@quest_id[.@s],1;
+		.@mission01 = isbegin_quest(.@main_quest);
+		.@playtime_check = checkquest(.@main_quest,PLAYTIME);
+		.@hunting_check = checkquest(.@main_quest,HUNTING);
+
+		.@index = (.@s/3) *3;
+		.@mission02 = isbegin_quest(.@quest_id[.@index]);
+		.@mission03 = isbegin_quest(.@quest_id[.@index+1]);
+
+		if (.@s == 0 || .@s == 1 || .@s == 2) {// Hunting suspicious quest
+			if (.@map$ == "te_alde_gld")
+				setarray .@mob_name$[0],"Porings","suspicious Porings";
+			else
+				setarray .@mob_name$[0],"Orc Babies","suspicious creatures";
+
+			if (.@s == 0)
+				.@num_kill = 1;
+			else if (.@s == 1) {
+				.@num_tool_box = 2;
+				.@num_kill = 10;
+				setarray .@reward[0],12873,2;
+				setarray .@exp[0],20000,10000;
+			}
+			else if (.@s == 2) {
+				.@num_tool_box = 3;
+				.@num_kill = 30;
+				setarray .@reward[0],12873,3;
+				setarray .@exp[0],30000,15000;
+			}
+
+			if (.@mission01 == 1) {
+				if (.@playtime_check == 0) {
+					if (.@hunting_check == 2) {
+						mes "You did it in time.";
+						mes "I don't understand why "+ .@mob_name$[0] +" appear at that time of the day.";
+						mes "Anyway, good job.";
+						if (.@num_tool_box == 0) {
+							erasequest .@main_quest;
+							getitem 11558,5;// TE_White_Slim_Potion
+							getexp 5000,2500;
+							close;
+						}
+						next;
+						mes "["+ .@npc_name$ +"]";
+						mes "Since you've done a good job, I'll let you open my tool box " + .@num_tool_box + " times.";
+						mes "Although you won't find anything mostly...";
+						mes "It's a bonus, so don't complaint even if you don't find anything.";
+						next;
+						mes "Just like "+ .@npc_name$ +" said, you went through the box in front, and...";
+						erasequest .@main_quest;
+						getitem .@reward[0],.@reward[1];
+						getexp .@exp[0],.@exp[1];
+						callsub( S_Rentbox, .@num_tool_box );
+					}
+					callsub( S_Cancelquest, .@main_quest, .@npc_name$, "This mission is to eliminate "+ .@mob_name$[1] +" that secretly appear at the fortress in "+ .@fortress$ +"." );
+				}
+				mes "Time's up.";
+				mes "Unfortunately, mission failed!";
+				mes "Maybe next time!";
+				erasequest .@main_quest;
+				close;
+			}
+			if (.@time_check != 1 && .@siege_check != 1) {
+				mes "You're not on this mission currently.";
+				mes "Could you check again?";
+				close;
+			}
+			if (.@mission02 == 1 || .@mission03 == 1) {
+				if (.@num_tool_box == 0) {
+					mes "You are already on a high-level mission!";
+					mes "You cannot accept a low-level mission if you're already on a high-level mission of the same content!";
+				}
+				else {
+					mes "You're already on a elimination mission!";
+					mes "I would like you to take care of what you already have unless you want to cancel it.";
+				}
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "It only makes sense that way, doesn't it?";
+				mes "Don't you think so?";
+				close;
+			}
+			mes "I've been told that "+ .@mob_name$[1] +" appear during the busy siege hours at the fortress in "+ .@fortress$ +".";
+			mes "I would like you to ^4d4dffeliminate "+ .@num_kill +" or more of "+ .@mob_name$[1] +"^000000.";
+			callsub( S_Acceptquest, .@main_quest, .@npc_name$ );
+		}
+		else if (.@s == 3 || .@s == 4 || .@s == 5) {// Breaking Emperiums
+			if (.@s == 3) {
+				.@num_tool_box = 1;
+				.@num_kill = 1;
+				setarray .@reward[0],12873,3;
+				setarray .@exp[0],30000,10000;
+			}
+			else if (.@s == 4) {
+				.@num_tool_box = 3;
+				.@num_kill = 3;
+				setarray .@reward[0],12873,9;
+				setarray .@exp[0],90000,30000;
+			}
+			else if (.@s == 5) {
+				.@num_tool_box = 5;
+				.@num_kill = 5;
+				setarray .@reward[0],12873,15;
+				setarray .@exp[0],150000,50000;
+			}
+			if (.@mission01 == 1) {
+				if (.@playtime_check == 0) {
+					if (.@hunting_check == 2) {
+						mes "Incredible!";
+						mes "Breaking Emperiums is definitely not an easy job.";
+						mes "You must be contributing a lot to your guild. Good job!";
+						next;
+						mes "["+ .@npc_name$ +"]";
+						mes "Since you've done a good job, I'll let you open my tool box "+ .@num_tool_box +" times.";
+						mes "Although you won't find anything mostly...";
+						mes "It's a bonus, so don't complaint even if you don't find anything.";
+						next;
+						mes "Just like "+ .@npc_name$ +" said, you went through the box in front, and...";
+						erasequest .@main_quest;
+						setquest 7516;
+						getitem .@reward[0],.@reward[1];
+						getexp .@exp[0],.@exp[1];
+						callsub( S_Rentbox, .@num_tool_box );
+					}
+					callsub( S_Cancelquest, .@main_quest, .@npc_name$, "This mission is to ^4d4dff destroy Emperiums that exist all over Gloria and Kafragarten regions.^000000" );
+				}
+				mes "Time's up.";
+				mes "Unfortunately, mission failed!";
+				mes "Maybe next time!";
+				erasequest .@main_quest;
+				close;
+			}
+			if (.@time_check != 1 && .@siege_check != 1) {
+				mes "You're not on this mission currently.";
+				mes "Could you check again?";
+				close;
+			}
+			if (.@mission02 == 1 || .@mission03 == 1) {
+				mes "You're already on a mission of the same content,";
+				mes "the level is different though";
+				mes "I would like you to take care of what you already have unless you want to cancel it.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "It only makes sense that way, doesn't it?";
+				mes "Don't you think so?";
+				close;
+			}
+			.@playtime_check2 = checkquest(7516,PLAYTIME);
+			if (.@playtime_check2 == 0) {
+				mes "There is something called 'commercial development level' in each fortress.";
+				mes "It increases as much as each guild invests.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "However, this is closely related to Emperiums.";
+				mes "Destroying Emperiums repeatedly staggers commercial development level.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "So, now we take a break in order to prevent an excessive decrease in commercial development level.";
+				mes "See you in a bit.";
+				close;
+			}
+			else if (.@playtime_check2 == 2) {
+				erasequest 7516;
+				mes "The break for commercial development of the fortress is over now.";
+				mes "Good. Think about what kind of missions you want and come back again.";
+				close;
+			}
+			mes "What is the most important thing in siege battles?";
+			mes "It's destroying Emperiums! Let me give you that exact mission of destroying Emperiums!";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "Gloria or Kafragarten, wherever it is! Right now, at this very hour, ^4d4dffdestroy Emperiums!^000000";
+			mes "^4d4dffTarget number is "+ .@num_kill +" or more!^000000";
+			callsub( S_Acceptquest, .@main_quest, .@npc_name$ );
+		}
+		else if (.@s == 6 || .@s == 7 || .@s == 8) {
+			if (.@map$ == "te_alde_gld") {
+				.@item_quest = 7056;// Payroll_Of_Kafra
+				setarray .@string$[0], "paychecks", "I don't understand why Porings would steal Kafra's Paychecks", "Kafra's stolen paychecks";
+			}
+			else {
+				.@item_quest = 6592;// Small_Wooden_Chest
+				setarray .@string$[0], "wooden boxes", "So, those Orc Babies were after this, huh?", "wooden boxes";
+			}
+			if (.@s == 6) {
+				.@num_tool_box = 1;
+				.@num_items = 10;
+				setarray .@reward[0],12873,1;
+				setarray .@exp[0],10000,5000;
+			}
+			else if (.@s == 7) {
+				.@num_tool_box = 2;
+				.@num_items = 20;
+				setarray .@reward[0],12873,2;
+				setarray .@exp[0],20000,10000;
+			}
+			else if (.@s == 8) {
+				.@num_tool_box = 3;
+				.@num_items = 30;
+				setarray .@reward[0],12873,3;
+				setarray .@exp[0],30000,15000;
+			}
+
+			if (.@mission01 == 1) {
+				if (.@playtime_check == 0) {
+					if (countitem(.@item_quest) > 9) {
+						mes .@num_items +" or more of "+ .@string$[0] +" let's see you've done it right.";
+						mes .@string$[1];
+						mes "Anyway, good job.";
+						next;
+						mes "["+ .@npc_name$ +"]";
+						mes "Let me take the rest of the "+ .@string$[0] +".";
+						mes "I'll return it to its original owner.";
+						next;
+						mes "["+ .@npc_name$ +"]";
+						mes "Since you've done a good job, I'll let you open my tool box "+ .@num_tool_box +" times.";
+						mes "Although you won't find anything mostly...";
+						mes "It's a bonus, so don't complaint even if you don't find anything.";
+						next;
+						mes "Just like "+ .@npc_name$ +" said, you went through the box in front, and...";
+						delitem .@item_quest, countitem(.@item_quest);
+						erasequest .@main_quest;
+						getitem .@reward[0],.@reward[1];
+						getexp .@exp[0],.@exp[1];
+						callsub( S_Rentbox, .@num_tool_box );
+					}
+					callsub( S_Cancelquest, .@main_quest, .@npc_name$, "This mission is to ^4d4dffcollect "+ .@string$[2] +"^000000 at the fortress in "+ .@fortress$ +"." );
+				}
+				mes "Time's up.";
+				mes "Unfortunately, mission failed!";
+				mes "Maybe next time!";
+				erasequest .@main_quest;
+				close;
+			}
+			if (.@time_check != 1 && .@siege_check != 1) {
+				mes "You're not on this mission currently.";
+				mes "Could you check again?";
+				close;
+			}
+			if (.@mission02 == 1 || .@mission03 == 1) {
+				mes "You're already on a mission of the same content,";
+				mes "the level is different though";
+				mes "I would like you to take care of what you already have unless you want to cancel it.";
+				next;
+				mes "["+ .@npc_name$ +"]";
+				mes "It only makes sense that way, doesn't it?";
+				mes "Don't you think so?";
+				close;
+			}
+			mes "Hmm you wouldn't believe it, but this mission is related to a theft.";
+			mes "They told me a bunch of "+ .@string$[2] +" is missing from the fortress in "+ .@fortress$ +".";
+			next;
+			mes "["+ .@npc_name$ +"]";
+			mes "The thief probably took advantage of the siege hours.";
+			mes "It's a request to find ^4d4dff"+ .@num_items +" or more of "+ .@string$[2] +"^000000.";
+			callsub( S_Acceptquest, .@main_quest, .@npc_name$ );
+		}
+	case 2:
+		mes "["+ .@npc_name$ +"]";
+		mes "Since TE Region has more of a casual atmosphere,";
+		mes "it's not fun doing just siege battles, right?";
+		mes "So, I brought ^4d4dffsome works you can do during the siege hours^000000~";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "You can accept missions ^4d4dffstarting from 1 hour before the beginning of the siege and until the end of the siege battle TE^000000,";
+		mes "and every mission has ^4d4dffa 4-hour time limit^000000 for completion.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Simply put, you accept a mission from me during the siege hours and";
+		mes "^4d4dffcome back to give me a report within the time limit^000000.";
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Try it for fun.";
+		close;
+	case 3:
+		mes "["+ .@npc_name$ +"]";
+		mes "I see.";
+		mes "Come back anytime if you change your mind.";
+		mes "I might not be available, though. Hehehe.";
+		close;
+	}
+
+S_Cancelquest:
+	.@npc_name$ = getarg(1);
+	if (WoeTETimeStart(3600) == 1 || agitcheck3()) {
+		mes "It seems like you haven't accomplished the mission yet?";
+		mes getarg(2);
+		next;
+		mes "["+ .@npc_name$ +"]";
+		mes "Do you want to cancel by any chance?";
+		next;
+		switch( select( "No.","Yes." ) ) {
+		case 1:
+			mes "["+ .@npc_name$ +"]";
+			mes "Good luck!";
+			close;
+		case 2:
+			mes "["+ .@npc_name$ +"]";
+			mes "As you wanted, this mission is canceled.";
+			erasequest getarg(0);
+			close;
+		}
+	}
+	else {
+		mes "Hmm you still have some time left, but it's not the siege hour yet";
+		mes "I don't think you should go on.";
+		mes "You should cancel this mission. I would say it's failed.";
+		next;
+		switch( select( "I would like to go on.","Yes, I'll cancel it." ) ) {
+		case 1:
+			mes "["+ .@npc_name$ +"]";
+			mes "I don't think it's worth it. Well, good luck!";
+			close;
+		case 2:
+			mes "["+ .@npc_name$ +"]";
+			mes "As you wanted, this mission is canceled.";
+			erasequest getarg(0);
+			close;
+		}
+	}
+
+S_Acceptquest:
+	.@npc_name$ = getarg(1);
+	next;
+	switch( select( "Accept it.","Do not accept it." ) ) {
+	case 1:
+		mes "["+ .@npc_name$ +"]";
+		mes "^4d4dffThe time limit is 4 hours.^000000";
+		mes "Accomplish the mission with in that time and report to me.";
+		setquest getarg(0);
+		close;
+	case 2:
+		mes "["+ .@npc_name$ +"]";
+		mes "Try another mission then.";
+		close;
+	}
+
+S_Rentbox:
+	setarray .@item_id[0], 2950,15067,20709,22012;// Rune_Ring, Rune_Suit, Mana_Manteau, Mana_Boots
+	for ( .@count = 0; .@count < getarg(0); .@count++ ) {
+		.@miss_item01 = rand(100);
+		if (.@miss_item01 > 3)
+			mes "You didn't find anything.";
+		else {
+			rentitem .@item_id[ .@miss_item01 ],86400;
+			mes "You found '"+ getitemname(.@item_id[ .@miss_item01 ]) +" !'";
+		}
+	}
+	close;
+
+S_Menu:
+	for ( .@i = 1; .@i < getargcount(); .@i += 2 ) {
+		if ( isbegin_quest(getarg(.@i)) )
+			.@menu$ = .@menu$ + getarg(.@i+1) + " ^4d4dffCheck the result^000000:";
+		else
+			.@menu$ = .@menu$ + getarg(.@i+1) + ":";
+		set getelementofarray( getarg(0),.@index ), getarg(.@i);
+		.@index++;
+	}
+	return .@menu$;
+}

+ 41 - 0
npc/re/quests/woe_te/te_mission_prt.txt

@@ -0,0 +1,41 @@
+//===== rAthena Script =======================================
+//= Mission WoE TE
+//===== Description: =========================================
+//= [Official Conversion]
+//= NPC for mission WoE TE at Prontera
+//===== Changelogs: ==========================================
+//= 1.0 First Version. [Capuche]
+//============================================================
+
+te_prtcas01,2,2,0	duplicate(#popswitch)	#popswitch_prt01	CLEAR_NPC
+te_prtcas02,2,2,0	duplicate(#popswitch)	#popswitch_prt02	CLEAR_NPC
+te_prtcas03,2,2,0	duplicate(#popswitch)	#popswitch_prt03	CLEAR_NPC
+te_prtcas04,2,2,0	duplicate(#popswitch)	#popswitch_prt04	CLEAR_NPC
+te_prtcas05,2,2,0	duplicate(#popswitch)	#popswitch_prt05	CLEAR_NPC
+
+te_prtcas01,2,3,0	duplicate(pop_mission_TE)	#popa_prt01	CLEAR_NPC
+te_prtcas01,2,3,0	duplicate(pop_mission_TE)	#popb_prt01	CLEAR_NPC
+te_prtcas01,2,3,0	duplicate(pop_mission_TE)	#popc_prt01	CLEAR_NPC
+te_prtcas01,2,3,0	duplicate(pop_mission_TE)	#popd_prt01	CLEAR_NPC
+
+te_prtcas02,2,3,0	duplicate(pop_mission_TE)	#popa_prt02	CLEAR_NPC
+te_prtcas02,2,3,0	duplicate(pop_mission_TE)	#popb_prt02	CLEAR_NPC
+te_prtcas02,2,3,0	duplicate(pop_mission_TE)	#popc_prt02	CLEAR_NPC
+te_prtcas02,2,3,0	duplicate(pop_mission_TE)	#popd_prt02	CLEAR_NPC
+
+te_prtcas03,2,3,0	duplicate(pop_mission_TE)	#popa_prt03	CLEAR_NPC
+te_prtcas03,2,3,0	duplicate(pop_mission_TE)	#popb_prt03	CLEAR_NPC
+te_prtcas03,2,3,0	duplicate(pop_mission_TE)	#popc_prt03	CLEAR_NPC
+te_prtcas03,2,3,0	duplicate(pop_mission_TE)	#popd_prt03	CLEAR_NPC
+
+te_prtcas04,2,3,0	duplicate(pop_mission_TE)	#popa_prt04	CLEAR_NPC
+te_prtcas04,2,3,0	duplicate(pop_mission_TE)	#popb_prt04	CLEAR_NPC
+te_prtcas04,2,3,0	duplicate(pop_mission_TE)	#popc_prt04	CLEAR_NPC
+te_prtcas04,2,3,0	duplicate(pop_mission_TE)	#popd_prt04	CLEAR_NPC
+
+te_prtcas05,2,3,0	duplicate(pop_mission_TE)	#popa_prt05	CLEAR_NPC
+te_prtcas05,2,3,0	duplicate(pop_mission_TE)	#popb_prt05	CLEAR_NPC
+te_prtcas05,2,3,0	duplicate(pop_mission_TE)	#popc_prt05	CLEAR_NPC
+te_prtcas05,2,3,0	duplicate(pop_mission_TE)	#popd_prt05	CLEAR_NPC
+
+te_prt_gld,125,149,3	duplicate(Training_Instructor_TE)	Gloria Instructor#tem01	4_M_HUMAN_02

+ 9 - 1
npc/re/scripts_athena.conf

@@ -48,6 +48,7 @@ npc: npc/re/guides/guides_prontera.txt
 npc: npc/re/guides/guides_rachel.txt
 npc: npc/re/guides/guides_umbala.txt
 npc: npc/re/guides/guides_veins.txt
+npc: npc/re/guides/guides_woe_te.txt
 
 // ------------------------ Instances ---------------------------
 npc: npc/re/instances/BakonawaLake.txt
@@ -90,10 +91,12 @@ npc: npc/re/merchants/shops.txt
 //npc: npc/re/merchants/ticket_refiner.txt
 //npc: npc/re/merchants/enchan_upg.txt
 //npc: npc/re/merchants/cash_trader-idRO.txt
+npc: npc/re/merchants/te_merchant.txt
 
 // --------------------------- Others ---------------------------
-npc: npc/re/other/bulletin_boards.txt
 npc: npc/re/other/adven_boards.txt
+npc: npc/re/other/bulletin_boards.txt
+npc: npc/re/other/Global_Functions.txt
 npc: npc/re/other/dimensional_gap.txt
 npc: npc/re/other/item_merge.txt
 npc: npc/re/other/mail.txt
@@ -151,3 +154,8 @@ npc: npc/re/quests/quests_mora.txt
 npc: npc/re/quests/quests_morocc.txt
 npc: npc/re/quests/quests_nameless.txt
 npc: npc/re/quests/quests_veins.txt
+npc: npc/re/quests/woe_te/te_mission_main.txt
+npc: npc/re/quests/woe_te/te_mission_alde.txt
+npc: npc/re/quests/woe_te/te_mission_prt.txt
+npc: npc/re/quests/woe_te/te_goditem_prt01.txt
+npc: npc/re/quests/woe_te/te_goditem_alde1.txt

+ 13 - 0
npc/re/scripts_guild.conf

@@ -6,3 +6,16 @@
 // - Hall of Abyss
 npc: npc/re/guild/invest_main.txt
 npc: npc/re/guild/invest_npc.txt
+
+npc: npc/re/guild3/agit_main_te.txt
+npc: npc/re/guild3/agit_start_te.txt
+npc: npc/re/guild3/te_aldecas1.txt
+npc: npc/re/guild3/te_aldecas2.txt
+npc: npc/re/guild3/te_aldecas3.txt
+npc: npc/re/guild3/te_aldecas4.txt
+npc: npc/re/guild3/te_aldecas5.txt
+npc: npc/re/guild3/te_prtcas01.txt
+npc: npc/re/guild3/te_prtcas02.txt
+npc: npc/re/guild3/te_prtcas03.txt
+npc: npc/re/guild3/te_prtcas04.txt
+npc: npc/re/guild3/te_prtcas05.txt

+ 1 - 0
npc/re/scripts_monsters.conf

@@ -47,6 +47,7 @@ npc: npc/re/mobs/dungeons/pay_dun.txt
 npc: npc/re/mobs/dungeons/prt_maze.txt
 npc: npc/re/mobs/dungeons/prt_sew.txt
 npc: npc/re/mobs/dungeons/ra_san.txt
+npc: npc/re/mobs/dungeons/teg_dun.txt
 npc: npc/re/mobs/dungeons/tha_t.txt
 npc: npc/re/mobs/dungeons/thor_v.txt
 npc: npc/re/mobs/dungeons/treasure.txt

+ 288 - 1
npc/re/warps/guildcastles.txt

@@ -3,13 +3,14 @@
 //===== By: ==================================================
 //= Euphy
 //===== Current Version: =====================================
-//= 1.0
+//= 2.0
 //===== Compatible With: =====================================
 //= rAthena Project
 //===== Description: =========================================
 //= Warp Points for Renewal Guild Castles
 //===== Additional Comments: =================================
 //= 1.0 First version. [Euphy]
+//= 2.0 Added WoE:TE warps. [Capuche]
 //============================================================
 
 // Hall of Abyss
@@ -41,3 +42,289 @@ gld2_ald,104,250,0	warp	dun2gef_to_gld#9	1,1,alde_gld,229,185
 gld2_ald,247,156,0	warp	dun2gef_to_gld#10	1,1,alde_gld,242,121
 gld_dun02_2,20,160,0	warp	gdun02a_aldega#abyss	1,1,alde_gld,229,185
 gld_dun02_2,180,112,0	warp	gdun02b_aldegb#abyss	1,1,alde_gld,242,121
+
+
+// WOE TE
+prt_gld,120,153,0	warp	to_gloria	1,1,te_prt_gld,120,149
+te_prt_gld,120,153,0	warp	to_valkyrie	1,1,prt_gld,120,149
+
+alde_gld,225,188,0	warp	to_kafragarten	1,1,te_alde_gld,228,185
+te_alde_gld,225,188,0	warp	to_luina	1,1,alde_gld,228,185
+
+//------------------------------------------------------------//
+// prontera
+//------------------------------------------------------------//
+// te_prt_gld
+/*
+te_prt_gld,159,298,0	warp	prtg01_NorthField	1,1,prt_fild01,199,30
+te_prt_gld,159,25,0	warp	prtg02_Castle	1,1,prt_castle,102,178
+*/
+
+-	script	warp_TE_castle	-1,{
+OnTouch:
+	.@num = strnpcinfo(2);
+	switch(.@num) {
+		case 1: callsub( S_Warp, "te_prtcas01",99,32 );
+		case 2: callsub( S_Warp, "te_prtcas02",43,229 );
+		case 3: callsub( S_Warp, "te_prtcas03",168,12 );
+		case 4: callsub( S_Warp, "te_prtcas04",86,13 );
+		case 5: callsub( S_Warp, "te_prtcas05",17,235 );
+		case 6: callsub( S_Warp, "te_aldecas1",34,248 );
+		case 7: callsub( S_Warp, "te_aldecas2",88,163 );
+		case 8: callsub( S_Warp, "te_aldecas3",114,286 );
+		case 9: callsub( S_Warp, "te_aldecas4",149,17 );
+		case 10: callsub( S_Warp, "te_aldecas5",216,103 );
+	}
+	end;
+
+S_Warp:
+	.@castle$ = getarg(0);
+	if (jobcanentermap(.@castle$) == 0) {
+		mes "3rd and expansion job level can't enter in WoE TE.";
+		close;
+	}
+
+	.@guild_id = getcastledata(.@castle$,1);
+	.@my_guild_id = getcharid(2);
+
+	if (.@guild_id && .@guild_id == .@my_guild_id) {
+		warp .@castle$,getarg(1),getarg(2);
+		end;
+	}
+
+	if (WoeTETimeStart(3600) == 1) {
+		if (!.@guild_id || !.@my_guild_id) {
+			mes "It's time for preparing to WoE. Only Alliance guild is able to enter.";
+			close;
+		}
+		if (getguildalliance(.@my_guild_id,.@guild_id) != 1) {
+			mes "It's time for preparing to WoE. Only Alliance guild is able to enter.";
+			close;
+		}
+		mes "Welcome alliance guild.";
+		close2;
+	}
+	warp .@castle$,getarg(1),getarg(2);
+	end;
+}
+
+te_prt_gld,129,65,0	duplicate(warp_TE_castle)	prtg-1_prtg-1-01#1_te	WARPNPC,1,1
+te_prt_gld,240,124,0	duplicate(warp_TE_castle)	prtg-2_prtg-2#2_te	WARPNPC,1,1
+te_prt_gld,153,141,0	duplicate(warp_TE_castle)	prtg-3_prtg-3#3_te	WARPNPC,1,1
+te_prt_gld,107,240,0	duplicate(warp_TE_castle)	prtg-4_prtg-4#4_te	WARPNPC,1,1
+te_prt_gld,212,240,0	duplicate(warp_TE_castle)	prtg-5_prtg-5#5_te	WARPNPC,1,1
+
+
+// te_prtcas01
+te_prtcas01,103,32,0	warp	prtg-1-01_prtg-1#te	1,1,te_prt_gld,134,65
+te_prtcas01,57,19,0	warp	prtg-1-02_prtg-1-07#te	1,1,te_prtcas01,80,49
+te_prtcas01,41,34,0	warp	prtg-1-03_prtg-1-08#te	1,1,te_prtcas01,40,47
+te_prtcas01,37,54,0	warp	prtg-1-04_prtg-1-13#te	1,1,te_prtcas01,192,119
+te_prtcas01,71,54,0	warp	prtg-1-05_prtg-1-12#te	1,1,te_prtcas01,192,65
+te_prtcas01,51,70,0	warp	prtg-1-06_prtg-1-11#te	1,1,te_prtcas01,202,92
+te_prtcas01,84,49,0	warp	prtg-1-07_prtg-1-02#te	1,1,te_prtcas01,61,19
+te_prtcas01,37,47,0	warp	prtg-1-08_prtg-1-03#te	1,1,te_prtcas01,45,34
+te_prtcas01,62,34,0	warp	prtg-1-09_prtg-1-13#te	1,1,te_prtcas01,192,119
+te_prtcas01,84,19,0	warp	prtg-1-010_prtg-1-12#te	1,1,te_prtcas01,192,65
+te_prtcas01,206,92,0	warp	prtg-1-11_prtg-1-06#te	1,1,te_prtcas01,55,70
+te_prtcas01,196,65,0	warp	prtg-1-12_prtg-1-05#te	1,1,te_prtcas01,75,54
+te_prtcas01,196,119,0	warp	prtg-1-13_prtg-1-04#te	1,1,te_prtcas01,40,54
+te_prtcas01,147,120,0	warp	prtg-1-14_prtg-1-21#te	1,1,te_prtcas01,75,187
+te_prtcas01,75,183,0	warp	prtg-1-21_prtg-1-14#te	1,1,te_prtcas01,147,116
+te_prtcas01,109,163,0	warp	prtg-1-22_prtg-1-31#te	1,1,te_prtcas01,202,183
+te_prtcas01,206,183,0	warp	prtg-1-31_prtg-1-22#te	1,1,te_prtcas01,113,163
+
+// te_prtcas02
+te_prtcas02,43,233,0	warp	prtg-2-01_prtg-2#te	1,1,te_prt_gld,240,128
+te_prtcas02,88,215,0	warp	prtg-2-02_prtg-2-22#te	1,1,te_prtcas02,206,41
+te_prtcas02,53,202,0	warp	prtg-2-03_prtg-2-21#te	1,1,te_prtcas02,165,41
+te_prtcas02,64,164,0	warp	prtg-2-04_prtg-2-12#te	1,1,te_prtcas02,98,25
+te_prtcas02,35,183,0	warp	prtg-2-05_prtg-2-11#te	1,1,te_prtcas02,71,82
+te_prtcas02,71,86,0	warp	prtg-2-11_prtg-2-05#te	1,1,te_prtcas02,35,187
+te_prtcas02,98,21,0	warp	prtg-2-12_prtg-2-04#te	1,1,te_prtcas02,64,168
+te_prtcas02,45,21,0	warp	prtg-2-13_prtg-2-24#te	1,1,te_prtcas02,203,25
+te_prtcas02,161,41,0	warp	prtg-2-21_prtg-2-03#te	1,1,te_prtcas02,57,202
+te_prtcas02,210,41,0	warp	prtg-2-22_prtg-2-02#te	1,1,te_prtcas02,84,215
+te_prtcas02,184,44,0	warp	prtg-2-23_prtg-2-31#te	1,1,te_prtcas02,157,140
+te_prtcas02,203,21,0	warp	prtg-2-24_prtg-2-13#te	1,1,te_prtcas02,45,25
+te_prtcas02,157,135,0	warp	prtg-2-31_prtg-2-23#te	1,1,te_prtcas02,184,40
+
+// te_prtcas03
+te_prtcas03,178,85,0	warp	prtg-3-01_prtg-3-12#te	1,1,te_prtcas03,82,73
+te_prtcas03,191,55,0	warp	prtg-3-02_prtg-3-22#te	1,1,te_prtcas03,190,233
+te_prtcas03,168,8,0	warp	prtg-3-03_prtg-3#te	1,1,te_prt_gld,153,137
+te_prtcas03,172,44,0	warp	prtg-3-04_prtg-3-14#te	1,1,te_prtcas03,10,78
+te_prtcas03,165,59,0	warp	prtg-3-05_prtg-3-13#te	1,1,te_prtcas03,45,47
+te_prtcas03,45,120,0	warp	prtg-3-11_prtg-3-23#te	1,1,te_prtcas03,164,177
+te_prtcas03,86,73,0	warp	prtg-3-12_prtg-3-01#te	1,1,te_prtcas03,178,81
+te_prtcas03,45,43,0	warp	prtg-3-13_prtg-3-05#te	1,1,te_prtcas03,165,54
+te_prtcas03,6,78,0	warp	prtg-3-14_prtg-3-04#te	1,1,te_prtcas03,176,44
+te_prtcas03,169,235,0	warp	prtg-3-21_prtg-3-31#te	1,1,te_prtcas03,11,200
+te_prtcas03,194,233,0	warp	prtg-3-22_prtg-3-02#te	1,1,te_prtcas03,191,59
+te_prtcas03,164,173,0	warp	prtg-3-23_prtg-3-11#te	1,1,te_prtcas03,45,117
+te_prtcas03,7,200,0	warp	prtg-3-31_prtg-3-21#te	1,1,te_prtcas03,169,231
+
+// te_prtcas04
+te_prtcas04,48,48,0	warp	prtg-4-01_prtg-4-15#te	1,1,te_prtcas04,10,233
+te_prtcas04,63,30,0	warp	prtg-4-02_prtg-4-14#te	1,1,te_prtcas04,34,229
+te_prtcas04,86,9,0	warp	prtg-4-03_prtg-3#te	1,1,te_prt_gld,111,240
+te_prtcas04,32,28,0	warp	prtg-4-04_prtg-4-16#te	1,1,te_prtcas04,11,254
+te_prtcas04,42,13,0	warp	prtg-4-05_prtg-4-12#te	1,1,te_prtcas04,56,254
+te_prtcas04,54,25,0	warp	prtg-4-06_prtg-4-13#te	1,1,te_prtcas04,56,233
+te_prtcas04,34,290,0	warp	prtg-4-11_prtg-4-21#te	1,1,te_prtcas04,238,261
+te_prtcas04,60,254,0	warp	prtg-4-12_prtg-4-05#te	1,1,te_prtcas04,42,17
+te_prtcas04,56,229,0	warp	prtg-4-13_prtg-4-06#te	1,1,te_prtcas04,54,29
+te_prtcas04,34,225,0	warp	prtg-4-14_prtg-4-02#te	1,1,te_prtcas04,63,26
+te_prtcas04,10,229,0	warp	prtg-4-15_prtg-4-01#te	1,1,te_prtcas04,48,44
+te_prtcas04,7,254,0	warp	prtg-4-16_prtg-4-04#te	1,1,te_prtcas04,32,32
+te_prtcas04,238,257,0	warp	prtg-4-21_prtg-4-11#te	1,1,te_prtcas04,34,286
+te_prtcas04,247,258,0	warp	prtg-4-22_prtg-4-31#te	1,1,te_prtcas04,255,14
+te_prtcas04,251,14,0	warp	prtg-4-31_prtg-4-22#te	1,1,te_prtcas04,247,254
+
+// te_prtcas05
+te_prtcas05,38,250,0	warp	prtg-5-01_prtg-5-14#te	1,1,te_prtcas05,244,7
+te_prtcas05,76,242,0	warp	prtg-5-02_prtg-5-13#te	1,1,te_prtcas05,288,13
+te_prtcas05,66,225,0	warp	prtg-5-03_prtg-5-12#te	1,1,te_prtcas05,260,92
+te_prtcas05,17,231,0	warp	prtg-5-04_prtg-5#te	1,1,te_prt_gld,208,240
+te_prtcas05,53,246,0	warp	prtg-5-05_prtg-5-15#te	1,1,te_prtcas05,199,13
+te_prtcas05,228,96,0	warp	prtg-5-11_prtg-5-21#te	1,1,te_prtcas05,26,7
+te_prtcas05,260,96,0	warp	prtg-5-12_prtg-5-03#te	1,1,te_prtcas05,66,229
+te_prtcas05,292,13,0	warp	prtg-5-13_prtg-5-02#te	1,1,te_prtcas05,76,246
+te_prtcas05,244,3,0	warp	prtg-5-14_prtg-5-01#te	1,1,te_prtcas05,35,247
+te_prtcas05,195,13,0	warp	prtg-5-15_prtg-5-05#te	1,1,te_prtcas05,55,248
+te_prtcas05,26,3,0	warp	prtg-5-21_prtg-5-11#te	1,1,te_prtcas05,228,92
+te_prtcas05,58,7,0	warp	prtg-5-22_prtg-5-31#te	1,1,te_prtcas05,253,290
+te_prtcas05,253,294,0	warp	prtg-5-31_prtg-5-22#te	1,1,te_prtcas05,58,11
+
+//------------------------------------------------------------//
+// aldebaran
+//------------------------------------------------------------//
+// aldebaran
+/*
+aldebaran,35,140,0	warp	alde-a_aldeg01	1,1,te_alde_gld,280,160
+te_alde_gld,284,160,0	warp	aldeg01_alde-a	1,1,aldebaran,39,140
+*/
+
+te_alde_gld,48,79,0	duplicate(warp_TE_castle)	aldeg-1_aldeg-1-1#6_te	WARPNPC,1,1
+te_alde_gld,95,253,0	duplicate(warp_TE_castle)	aldeg-2_aldeg-2-1#7_te	WARPNPC,1,1
+te_alde_gld,142,81,0	duplicate(warp_TE_castle)	aldeg-3_aldeg-3-1#8_te	WARPNPC,1,1
+te_alde_gld,243,242,0	duplicate(warp_TE_castle)	aldeg-4_aldeg-4-1#9_te	WARPNPC,1,1
+te_alde_gld,259,90,0	duplicate(warp_TE_castle)	aldeg-5_aldeg-5-1#10_te	WARPNPC,1,1
+
+// te_aldecas1
+te_aldecas1,34,252,0	warp	aldeg-1-1_aldeg-1#te	1,1,te_alde_gld,48,83
+te_aldecas1,50,222,0	warp	aldeg-1-2_aldeg-1-6#te	1,1,te_aldecas1,104,108
+te_aldecas1,66,191,0	warp	aldeg-1-3_aldeg-1-7#te	1,1,te_aldecas1,122,61
+te_aldecas1,26,188,0	warp	aldeg-1-4_aldeg-1-10#te	1,1,te_aldecas1,50,70
+te_aldecas1,70,112,0	warp	aldeg-1-5_aldeg-1-18#te	1,1,te_aldecas1,42,225
+te_aldecas1,104,112,0	warp	aldeg-1-6_aldeg-1-2#te	1,1,te_aldecas1,45,224
+te_aldecas1,126,61,0	warp	aldeg-1-7_aldeg-1-3#te	1,1,te_aldecas1,62,191
+te_aldecas1,89,23,0	warp	aldeg-1-8_aldeg-1-13#te	1,1,te_aldecas1,207,132
+te_aldecas1,54,27,0	warp	aldeg-1-9_aldeg-1-3#te	1,1,te_aldecas1,62,191
+te_aldecas1,46,70,0	warp	aldeg-1-10_aldeg-1-4#te	1,1,te_aldecas1,24,188
+te_aldecas1,206,188,0	warp	aldeg-1-11_aldeg-1-15#te	1,1,te_aldecas1,216,50
+te_aldecas1,232,186,0	warp	aldeg-1-12_aldeg-1-16#te	1,1,te_aldecas1,42,197
+te_aldecas1,207,128,0	warp	aldeg-1-13_aldeg-1-8#te	1,1,te_aldecas1,89,27
+te_aldecas1,171,175,0	warp	aldeg-1-14_aldeg-1-17#te	1,1,te_aldecas1,35,197
+te_aldecas1,216,54,0	warp	aldeg-1-15_aldeg-1-11#te	1,1,te_aldecas1,206,184
+te_aldecas1,46,197,0	warp	aldeg-1-16_aldeg-1-12#te	1,1,te_aldecas1,232,182
+te_aldecas1,31,197,0	warp	aldeg-1-17_aldeg-1-14#te	1,1,te_aldecas1,175,175
+te_aldecas1,39,222,0	warp	aldeg-1-18_aldeg-1-5#te	1,1,te_aldecas1,70,108
+
+// te_aldecas2
+te_aldecas2,88,159,0	warp	aldeg-2-1_aldeg-2#te	1,1,te_alde_gld,95,249
+te_aldecas2,84,208,0	warp	aldeg-2-2_aldeg-2-10#te	1,1,te_aldecas2,105,84
+te_aldecas2,50,185,0	warp	aldeg-2-3_aldeg-2-12#te	1,1,te_aldecas2,192,192
+te_aldecas2,33,174,0	warp	aldeg-2-4_aldeg-2-8#te	1,1,te_aldecas2,126,61
+te_aldecas2,22,194,0	warp	aldeg-2-5_aldeg-2-6#te	1,1,te_aldecas2,88,13
+te_aldecas2,88,9,0	warp	aldeg-2-6_aldeg-2-5#te	1,1,te_aldecas2,22,190
+te_aldecas2,45,39,0	warp	aldeg-2-7_aldeg-2-2#te	1,1,te_aldecas2,79,208
+te_aldecas2,130,61,0	warp	aldeg-2-8_aldeg-2-4#te	1,1,te_aldecas2,33,179
+te_aldecas2,121,88,0	warp	aldeg-2-9_aldeg-2-11#te	1,1,te_aldecas2,177,135
+te_aldecas2,105,88,0	warp	aldeg-2-10_aldeg-2-2#te	1,1,te_aldecas2,79,208
+te_aldecas2,177,131,0	warp	aldeg-2-11_aldeg-2-9#te	1,1,te_aldecas2,121,84
+te_aldecas2,192,196,0	warp	aldeg-2-12_aldeg-2-3#te	1,1,te_aldecas2,50,180
+te_aldecas2,206,196,0	warp	aldeg-2-13_aldeg-2-14#te	1,1,te_aldecas2,197,13
+te_aldecas2,197,9,0	warp	aldeg-2-14_aldeg-2-13#te	1,1,te_aldecas2,206,192
+
+// te_aldecas3
+te_aldecas3,114,290,0	warp	aldeg-3-1_aldeg-3#te	1,1,te_alde_gld,142,85
+te_aldecas3,92,217,0	warp	aldeg-3-2_aldeg-3-6#te	1,1,te_aldecas3,127,90
+te_aldecas3,87,247,0	warp	aldeg-3-3_aldeg-3-7#te	1,1,te_aldecas3,54,90
+te_aldecas3,44,222,0	warp	aldeg-3-4_aldeg-3-13#te	1,1,te_aldecas3,213,182
+te_aldecas3,91,57,0	warp	aldeg-3-5_aldeg-3-14#te	1,1,te_aldecas3,60,236
+te_aldecas3,130,90,0	warp	aldeg-3-6_aldeg-3-2#te	1,1,te_aldecas3,96,215
+te_aldecas3,51,90,0	warp	aldeg-3-7_aldeg-3-3#te	1,1,te_aldecas3,87,251
+te_aldecas3,93,124,0	warp	aldeg-3-8_aldeg-3-3#te	1,1,te_aldecas3,87,251
+te_aldecas3,79,130,0	warp	aldeg-3-9_aldeg-3-10#te	1,1,te_aldecas3,201,149
+te_aldecas3,201,145,0	warp	aldeg-3-10_aldeg-3-9#te	1,1,te_aldecas3,79,126
+te_aldecas3,199,190,0	warp	aldeg-3-11_aldeg-3-12#te	1,1,te_aldecas3,195,51
+te_aldecas3,195,54,0	warp	aldeg-3-12_aldeg-3-11#te	1,1,te_aldecas3,199,186
+te_aldecas3,214,186,0	warp	aldeg-3-13_aldeg-3-4#te	1,1,te_aldecas3,49,222
+te_aldecas3,60,241,0	warp	aldeg-3-14_aldeg-3-5#te	1,1,te_aldecas3,91,61
+
+// te_aldecas4
+te_aldecas4,145,17,0	warp	aldeg-4-1_aldeg-4#te	1,1,te_alde_gld,239,242
+te_aldecas4,197,40,0	warp	aldeg-4-2_aldeg-4-9#te	1,1,te_aldecas4,26,88
+te_aldecas4,175,54,0	warp	aldeg-4-3_aldeg-4-8#te	1,1,te_aldecas4,74,88
+te_aldecas4,185,87,0	warp	aldeg-4-4_aldeg-4-14#te	1,1,te_aldecas4,111,210
+te_aldecas4,171,100,0	warp	aldeg-4-5_aldeg-4-13#te	1,1,te_aldecas4,152,210
+te_aldecas4,196,86,0	warp	aldeg-4-6_aldeg-4-7#te	1,1,te_aldecas4,49,57
+te_aldecas4,49,53,0	warp	aldeg-4-7_aldeg-4-6#te	1,1,te_aldecas4,196,82
+te_aldecas4,78,88,0	warp	aldeg-4-8_aldeg-4-3#te	1,1,te_aldecas4,174,58
+te_aldecas4,22,88,0	warp	aldeg-4-9_aldeg-4-2#te	1,1,te_aldecas4,192,41
+te_aldecas4,50,132,0	warp	aldeg-4-10_aldeg-4-8#te	1,1,te_aldecas4,74,88
+te_aldecas4,21,123,0	warp	aldeg-4-11_aldeg-4-12#te	1,1,te_aldecas4,125,168
+te_aldecas4,121,168,0	warp	aldeg-4-12_aldeg-4-11#te	1,1,te_aldecas4,25,123
+te_aldecas4,156,210,0	warp	aldeg-4-13_aldeg-4-5#te	1,1,te_aldecas4,169,97
+te_aldecas4,108,210,0	warp	aldeg-4-14_aldeg-4-4#te	1,1,te_aldecas4,186,92
+
+// aldeg-4-15
+te_aldecas4,132,231,0	script	aldeg-4-15_aldeg-4-#te	WARPNPC,1,1,{
+OnTouch:
+	.@aldeg4 = rand(1,5);
+	if (.@aldeg4 == 1)
+		warp "te_aldecas4",152,210;
+	else if (.@aldeg4 == 2)
+		warp "te_aldecas4",111,210;
+	else if (.@aldeg4 == 3)
+		warp "te_aldecas4",129,212;
+	else if (.@aldeg4 == 4)
+		warp "te_aldecas4",129,212;
+	else
+		warp "te_aldecas4",14,196;
+	end;
+}
+
+te_aldecas4,132,209,0	warp	aldeg-4-16_aldeg-4-17#te	1,1,te_aldecas4,14,196
+te_aldecas4,17,196,0	warp	aldeg-4-17_aldeg-4-15#te	1,1,te_aldecas4,132,228
+
+// te_aldecas5
+te_aldecas5,216,107,0	warp	aldeg-5-1_aldeg-5#te	1,1,te_alde_gld,264,90
+te_aldecas5,194,71,0	warp	aldeg-5-3_aldeg-5-13#te	1,1,te_aldecas5,129,194
+te_aldecas5,164,86,0	warp	aldeg-5-4_aldeg-5-10#te	1,1,te_aldecas5,66,189
+te_aldecas5,150,67,0	warp	aldeg-5-5_aldeg-5-9#te	1,1,te_aldecas5,9,187
+te_aldecas5,188,49,0	warp	aldeg-5-6_aldeg-5-14#te	1,1,te_aldecas5,165,228
+te_aldecas5,195,42,0	warp	aldeg-5-7_aldeg-5-8#te	1,1,te_aldecas5,19,227
+prt_gld,159,298,0	warp	prtg01_NorthField#te	1,1,prt_fild01,199,30
+
+te_aldecas5,15,227,0	warp	aldeg-5-8_aldeg-5-7#te	1,1,te_aldecas5,195,46
+te_aldecas5,5,187,0	warp	aldeg-5-9_aldeg-5-5#te	1,1,te_aldecas5,151,62
+te_aldecas5,70,189,0	warp	aldeg-5-10_aldeg-5-4#te	1,1,te_aldecas5,166,81
+te_aldecas5,13,175,0	warp	aldeg-5-11_aldeg-5-12#te	1,1,te_aldecas5,162,194
+te_aldecas5,166,194,0	warp	aldeg-5-12_aldeg-5-11#te	1,1,te_aldecas5,13,179
+te_aldecas5,125,194,0	warp	aldeg-5-13_aldeg-5-3#te	1,1,te_aldecas5,199,70
+te_aldecas5,165,232,0	warp	aldeg-5-14_aldeg-5-6#te	1,1,te_aldecas5,193,49
+te_aldecas5,156,231,0	warp	aldeg-5-15_aldeg-5-16#te	1,1,te_aldecas5,18,88
+te_aldecas5,14,88,0	warp	aldeg-5-16_aldeg-5-15#te	1,1,te_aldecas5,156,227
+
+//------------------------------------------------------------//
+// Dungeons
+//------------------------------------------------------------//
+// prontera
+teg_dun01,238,274,0	warp	teg_dun01a_prtg#te	1,1,te_prt_gld,252,247
+teg_dun01,42,30,0	warp	teg_dun01b_prtg#te	1,1,te_prt_gld,63,66
+
+// aldebaran
+teg_dun02,20,160,0	warp	teg_dun02a_aldega#te	1,1,te_alde_gld,229,185
+teg_dun02,180,112,0	warp	teg_dun02b_aldegb#te	1,1,te_alde_gld,242,121

+ 73 - 23
src/map/atcommand.c

@@ -3475,78 +3475,120 @@ ACMD_FUNC(breakguild)
 	return 0;
 }
 
-/*==========================================
- *
- *------------------------------------------*/
+/**
+ * Start WoE:FE
+ */
 ACMD_FUNC(agitstart)
 {
 	nullpo_retr(-1, sd);
-	if (agit_flag == 1) {
+
+	if (agit_flag) {
 		clif_displaymessage(fd, msg_txt(sd,73)); // War of Emperium is currently in progress.
 		return -1;
 	}
 
-	agit_flag = 1;
+	agit_flag = true;
 	guild_agit_start();
 	clif_displaymessage(fd, msg_txt(sd,72)); // War of Emperium has been initiated.
 
 	return 0;
 }
 
-/*==========================================
- *
- *------------------------------------------*/
+/**
+ * Start WoE:SE
+ */
 ACMD_FUNC(agitstart2)
 {
 	nullpo_retr(-1, sd);
-	if (agit2_flag == 1) {
+
+	if (agit2_flag) {
 		clif_displaymessage(fd, msg_txt(sd,404)); // "War of Emperium SE is currently in progress."
 		return -1;
 	}
 
-	agit2_flag = 1;
+	agit2_flag = true;
 	guild_agit2_start();
 	clif_displaymessage(fd, msg_txt(sd,403)); // "War of Emperium SE has been initiated."
 
 	return 0;
 }
 
-/*==========================================
- *
- *------------------------------------------*/
+/**
+ * Start WoE:TE
+ */
+ACMD_FUNC(agitstart3)
+{
+	nullpo_retr(-1, sd);
+
+	if (agit3_flag) {
+		clif_displaymessage(fd, msg_txt(sd,750)); // "War of Emperium TE is currently in progress."
+		return -1;
+	}
+
+	agit3_flag = true;
+	guild_agit3_start();
+	clif_displaymessage(fd, msg_txt(sd,749)); // "War of Emperium TE has been initiated."
+
+	return 0;
+}
+
+/**
+ * End WoE:FE
+ */
 ACMD_FUNC(agitend)
 {
 	nullpo_retr(-1, sd);
-	if (agit_flag == 0) {
+
+	if (!agit_flag) {
 		clif_displaymessage(fd, msg_txt(sd,75)); // War of Emperium is currently not in progress.
 		return -1;
 	}
 
-	agit_flag = 0;
+	agit_flag = false;
 	guild_agit_end();
 	clif_displaymessage(fd, msg_txt(sd,74)); // War of Emperium has been ended.
 
 	return 0;
 }
 
-/*==========================================
- *
- *------------------------------------------*/
+/**
+ * End WoE:SE
+ */
 ACMD_FUNC(agitend2)
 {
 	nullpo_retr(-1, sd);
-	if (agit2_flag == 0) {
+
+	if (!agit2_flag) {
 		clif_displaymessage(fd, msg_txt(sd,406)); // "War of Emperium SE is currently not in progress."
 		return -1;
 	}
 
-	agit2_flag = 0;
+	agit2_flag = false;
 	guild_agit2_end();
 	clif_displaymessage(fd, msg_txt(sd,405)); // "War of Emperium SE has been ended."
 
 	return 0;
 }
 
+/**
+ * End WoE:TE
+ */
+ACMD_FUNC(agitend3)
+{
+	nullpo_retr(-1, sd);
+
+	if (!agit3_flag) {
+		clif_displaymessage(fd, msg_txt(sd,752));// War of Emperium TE is currently not in progress.
+		return -1;
+	}
+
+	agit3_flag = false;
+	guild_agit3_end();
+	clif_displaymessage(fd, msg_txt(sd,751));// War of Emperium TE has been ended.
+
+	return 0;
+}
+
 /*==========================================
  * @mapexit - shuts down the map server
  *------------------------------------------*/
@@ -4056,6 +4098,10 @@ ACMD_FUNC(mapinfo) {
 		strcat(atcmd_output, " GvG Dungeon |");
 	if (map[m_id].flag.gvg_castle)
 		strcat(atcmd_output, " GvG Castle |");
+	if (map[m_id].flag.gvg_te)
+		strcat(atcmd_output, " GvG TE |");
+	if (map[m_id].flag.gvg_te_castle)
+		strcat(atcmd_output, " GvG TE Castle |");
 	if (map[m_id].flag.gvg_noparty)
 		strcat(atcmd_output, " NoParty |");
 	clif_displaymessage(fd, atcmd_output);
@@ -8037,7 +8083,8 @@ ACMD_FUNC(mapflag) {
 		checkflag(nodrop);				checkflag(novending);			checkflag(loadevent);			checkflag(nochat);
 		checkflag(partylock);			checkflag(guildlock);			checkflag(reset);				checkflag(chmautojoin);
 		checkflag(nousecart);			checkflag(noitemconsumption);	checkflag(nosumstarmiracle);	checkflag(nomineeffect);
-		checkflag(nolockon);			checkflag(notomb);				checkflag(nocostume);
+		checkflag(nolockon);			checkflag(notomb);				checkflag(nocostume);			checkflag(gvg_te);
+		checkflag(gvg_te_castle);
 #ifdef ADJUST_SKILL_DAMAGE
 		checkflag(skill_damage);
 #endif
@@ -8061,7 +8108,8 @@ ACMD_FUNC(mapflag) {
 	setflag(nodrop);			setflag(novending);			setflag(loadevent);				setflag(nochat);
 	setflag(partylock);			setflag(guildlock);			setflag(reset);					setflag(chmautojoin);
 	setflag(nousecart);			setflag(noitemconsumption);	setflag(nosumstarmiracle);		setflag(nomineeffect);
-	setflag(nolockon);			setflag(notomb);			setflag(nocostume);
+	setflag(nolockon);			setflag(notomb);			setflag(nocostume);				setflag(gvg_te);
+	setflag(gvg_te_castle);
 #ifdef ADJUST_SKILL_DAMAGE
 	setflag(skill_damage);
 #endif
@@ -8077,7 +8125,7 @@ ACMD_FUNC(mapflag) {
 	clif_displaymessage(sd->fd,"fog, fireworks, sakura, leaves, nogo, nobaseexp, nojobexp, nomobloot, nomvploot,");
 	clif_displaymessage(sd->fd,"nightenabled, restricted, nodrop, novending, loadevent, nochat, partylock, guildlock,");
 	clif_displaymessage(sd->fd,"reset, chmautojoin, nousecart, noitemconsumption, nosumstarmiracle, nolockon, notomb,");
-	clif_displaymessage(sd->fd,"nocostume");
+	clif_displaymessage(sd->fd,"nocostume, gvg_te, gvg_te_castle");
 #ifdef ADJUST_SKILL_DAMAGE
 	clif_displaymessage(sd->fd,"skill_damage");
 #endif
@@ -10127,6 +10175,8 @@ void atcommand_basecommands(void) {
 		ACMD_DEF(clonestat),
 		ACMD_DEF(bodystyle),
 		ACMD_DEF(adopt),
+		ACMD_DEF(agitstart3),
+		ACMD_DEF(agitend3),
 	};
 	AtCommandInfo* atcommand;
 	int i;

+ 2 - 2
src/map/battle.c

@@ -7649,7 +7649,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 		{
 			struct mob_data *md = BL_CAST(BL_MOB, t_bl);
 
-			if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+			if( !map_flag_gvg(m) && md->guardian_data && md->guardian_data->guild_id )
 				return 0; // Disable guardians/emperiums owned by Guilds on non-woe times.
 			break;
 		}
@@ -7717,7 +7717,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 		case BL_MOB:
 		{
 			struct mob_data *md = BL_CAST(BL_MOB, s_bl);
-			if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
+			if( !map_flag_gvg(m) && md->guardian_data && md->guardian_data->guild_id )
 				return 0; // Disable guardians/emperium owned by Guilds on non-woe times.
 
 			if( !md->special_state.ai )

+ 1 - 1
src/map/clif.c

@@ -13271,7 +13271,7 @@ void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd){
 	if( !emblem_len || !sd->state.gmaster_flag )
 		return;
 
-	if(!(battle_config.emblem_woe_change) && (agit_flag || agit2_flag) ){
+	if(!(battle_config.emblem_woe_change) && is_agit_start() ){
 		clif_colormes(sd->fd,color_table[COLOR_RED],msg_txt(sd,385)); //"You not allowed to change emblem during woe"
 		return;
 	}

+ 47 - 23
src/map/guild.c

@@ -605,7 +605,7 @@ int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
 
 	if(tsd->status.guild_id>0 ||
 		tsd->guild_invite>0 ||
-		((agit_flag || agit2_flag) && map[tsd->bl.m].flag.gvg_castle))
+		map_flag_gvg(tsd->bl.m))
 	{	//Can't invite people inside castles. [Skotlex]
 		clif_guild_inviteack(sd,0);
 		return 0;
@@ -774,7 +774,7 @@ int guild_leave(struct map_session_data* sd, int guild_id, uint32 account_id, ui
 
 	if(sd->status.account_id!=account_id ||
 		sd->status.char_id!=char_id || sd->status.guild_id!=guild_id ||
-		((agit_flag || agit2_flag) && map[sd->bl.m].flag.gvg_castle))
+		map_flag_gvg(sd->bl.m))
 		return 0;
 
 	guild_trade_bound_cancel(sd);
@@ -806,7 +806,7 @@ int guild_expulsion(struct map_session_data* sd, int guild_id, uint32 account_id
 	//Can't leave inside guild castles.
 	if ((tsd = map_id2sd(account_id)) &&
 		tsd->status.char_id == char_id &&
-		((agit_flag || agit2_flag) && map[tsd->bl.m].flag.gvg_castle))
+		map_flag_gvg(tsd->bl.m))
 		return 0;
 
 	// find the member and perform expulsion
@@ -1350,7 +1350,7 @@ int guild_skillupack(int guild_id,uint16 skill_id,uint32 account_id) {
 void guild_guildaura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
 	struct skill_unit_group* group = NULL;
 	sc_type type = status_skill2sc(skill_id);
-	if( !(battle_config.guild_aura&((agit_flag || agit2_flag)?2:1)) &&
+	if( !(battle_config.guild_aura&(is_agit_start()?2:1)) &&
 			!(battle_config.guild_aura&(map_flag_gvg2(sd->bl.m)?8:4)) )
 		return;
 	if( !skill_lv )
@@ -1418,7 +1418,7 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
 	struct guild *g[2];
 	int i;
 
-	if(agit_flag || agit2_flag) {	// Disable alliance creation during woe [Valaris]
+	if(is_agit_start()) {	// Disable alliance creation during woe [Valaris]
 		clif_displaymessage(sd->fd,msg_txt(sd,676)); //"Alliances cannot be made during Guild Wars!"
 		return 0;
 	}	// end addition [Valaris]
@@ -1534,7 +1534,7 @@ int guild_reply_reqalliance(struct map_session_data *sd,uint32 account_id,int fl
 int guild_delalliance(struct map_session_data *sd,int guild_id,int flag) {
 	nullpo_ret(sd);
 
-	if(agit_flag || agit2_flag)	{	// Disable alliance breaking during woe [Valaris]
+	if(is_agit_start()) {	// Disable alliance breaking during woe [Valaris]
 		clif_displaymessage(sd->fd,msg_txt(sd,677)); //"Alliances cannot be broken during Guild Wars!"
 		return 0;
 	}	// end addition [Valaris]
@@ -1571,7 +1571,7 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd) {
 				clif_guild_oppositionack(sd,2);
 				return 0;
 			}
-			if(agit_flag || agit2_flag) // Prevent the changing of alliances to oppositions during WoE.
+			if(is_agit_start()) // Prevent the changing of alliances to oppositions during WoE.
 				return 0;
 			//Change alliance to opposition.
 			intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
@@ -2032,6 +2032,7 @@ int guild_castledataloadack(int len, struct guild_castle *gc) {
 	if( ev < 0 ) { //No castles owned, invoke OnAgitInit as it is.
 		npc_event_doall("OnAgitInit");
 		npc_event_doall("OnAgitInit2");
+		npc_event_doall("OnAgitInit3");
 	} else // load received castles into memory, one by one
 	for( i = 0; i < n; i++, gc++ ) {
 		struct guild_castle *c = guild_castle_search(gc->castle_id);
@@ -2049,6 +2050,7 @@ int guild_castledataloadack(int len, struct guild_castle *gc) {
 			else { // last owned one
 				guild_npc_request_info(c->guild_id, "::OnAgitInit");
 				guild_npc_request_info(c->guild_id, "::OnAgitInit2");
+				guild_npc_request_info(c->guild_id, "::OnAgitInit3");
 			}
 		}
 	}
@@ -2056,38 +2058,60 @@ int guild_castledataloadack(int len, struct guild_castle *gc) {
 	return 0;
 }
 
-/*====================================================
- * Start normal woe and triggers all npc OnAgitStart
- *---------------------------------------------------*/
-void guild_agit_start(void) {	// Run All NPC_Event[OnAgitStart]
+/**
+ * Start WoE:FE and triggers all npc OnAgitStart
+ */
+void guild_agit_start(void)
+{
 	int c = npc_event_doall("OnAgitStart");
 	ShowStatus("NPC_Event:[OnAgitStart] Run (%d) Events by @AgitStart.\n",c);
 }
 
-/*====================================================
- * End normal woe and triggers all npc OnAgitEnd
- *---------------------------------------------------*/
-void guild_agit_end(void) {	// Run All NPC_Event[OnAgitEnd]
+/**
+ * End WoE:FE and triggers all npc OnAgitEnd
+ */
+void guild_agit_end(void)
+{
 	int c = npc_event_doall("OnAgitEnd");
 	ShowStatus("NPC_Event:[OnAgitEnd] Run (%d) Events by @AgitEnd.\n",c);
 }
 
-/*====================================================
- * Start woe2 and triggers all npc OnAgitStart2
- *---------------------------------------------------*/
-void guild_agit2_start(void) {	// Run All NPC_Event[OnAgitStart2]
+/**
+ * Start WoE:SE and triggers all npc OnAgitStart2
+ */
+void guild_agit2_start(void)
+{
 	int c = npc_event_doall("OnAgitStart2");
 	ShowStatus("NPC_Event:[OnAgitStart2] Run (%d) Events by @AgitStart2.\n",c);
 }
 
-/*====================================================
- * End woe2 and triggers all npc OnAgitEnd2
- *---------------------------------------------------*/
-void guild_agit2_end(void) {	// Run All NPC_Event[OnAgitEnd2]
+/**
+ * End WoE:SE and triggers all npc OnAgitEnd2
+ */
+void guild_agit2_end(void)
+{
 	int c = npc_event_doall("OnAgitEnd2");
 	ShowStatus("NPC_Event:[OnAgitEnd2] Run (%d) Events by @AgitEnd2.\n",c);
 }
 
+/**
+ * Start WoE:TE and triggers all npc OnAgitStart3
+ */
+void guild_agit3_start(void)
+{
+	int c = npc_event_doall("OnAgitStart3");
+	ShowStatus("NPC_Event:[OnAgitStart3] Run (%d) Events by @AgitStart3.\n",c);
+}
+
+/**
+ * End WoE:TE and triggers all npc OnAgitEnd3
+ */
+void guild_agit3_end(void)
+{
+	int c = npc_event_doall("OnAgitEnd3");
+	ShowStatus("NPC_Event:[OnAgitEnd3] Run (%d) Events by @AgitEnd3.\n",c);
+}
+
 // How many castles does this guild have?
 int guild_checkcastles(struct guild *g) {
 	int nb_cas = 0;

+ 4 - 0
src/map/guild.h

@@ -100,6 +100,10 @@ void guild_agit_end(void);
 
 void guild_agit2_start(void);
 void guild_agit2_end(void);
+
+void guild_agit3_start(void);
+void guild_agit3_end(void);
+
 /* guild flag cachin */
 void guild_flag_add(struct npc_data *nd);
 void guild_flag_remove(struct npc_data *nd);

+ 3 - 3
src/map/itemdb.c

@@ -1520,11 +1520,11 @@ static int itemdb_read_sqldb(void) {
 bool itemdb_isNoEquip(struct item_data *id, uint16 m) {
 	if (!id->flag.no_equip)
 		return false;
-	/* on restricted maps the item is consumed but the effect is not used */
-	if ((!map_flag_vs(m) && id->flag.no_equip&1) || // Normal
+	if ((!map_flag_vs2(m) && id->flag.no_equip&1) || // Normal
 		(map[m].flag.pvp && id->flag.no_equip&2) || // PVP
-		(map_flag_gvg(m) && id->flag.no_equip&4) || // GVG
+		(map_flag_gvg2_no_te(m) && id->flag.no_equip&4) || // GVG
 		(map[m].flag.battleground && id->flag.no_equip&8) || // Battleground
+		(map_flag_gvg2_te(m) && id->flag.no_equip&16) || // WOE:TE
 		(map[m].flag.restricted && id->flag.no_equip&(8*map[m].zone)) // Zone restriction
 		)
 		return true;

+ 1 - 1
src/map/log.c

@@ -444,7 +444,7 @@ void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_accid,
 		return;
 	}
 
-	if( log_config.log_chat_woe_disable && ( agit_flag || agit2_flag ) )
+	if( log_config.log_chat_woe_disable && is_agit_start() )
 	{// no chat logging during woe
 		return;
 	}

+ 3 - 2
src/map/map.c

@@ -111,8 +111,9 @@ int map_port=0;
 int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
 int minsave_interval = 100;
 unsigned char save_settings = CHARSAVE_ALL;
-int agit_flag = 0;
-int agit2_flag = 0;
+bool agit_flag = false;
+bool agit2_flag = false;
+bool agit3_flag = false;
 int night_flag = 0; // 0=day, 1=night [Yor]
 
 #ifdef ADJUST_SKILL_DAMAGE

+ 23 - 10
src/map/map.h

@@ -216,14 +216,21 @@ enum e_mapid {
 
 #define DEFAULT_AUTOSAVE_INTERVAL 5*60*1000
 
-//Specifies maps where players may hit each other
-#define map_flag_vs(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle) || map[m].flag.battleground)
-//Specifies maps that have special GvG/WoE restrictions
-#define map_flag_gvg(m) (map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle))
-//Specifies if the map is tagged as GvG/WoE (regardless of agit_flag status)
-#define map_flag_gvg2(m) (map[m].flag.gvg || map[m].flag.gvg_castle)
-// No Kill Steal Protection
-#define map_flag_ks(m) (map[m].flag.town || map[m].flag.pvp || map[m].flag.gvg || map[m].flag.battleground)
+/// Specifies maps where players may hit each other
+#define map_flag_vs(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle) || map[m].flag.gvg_te || (agit3_flag && map[m].flag.gvg_te_castle) || map[m].flag.battleground)
+/// Versus map: PVP, BG, GVG, GVG Dungeons, and GVG Castles (regardless of agit_flag status)
+#define map_flag_vs2(m) (map[m].flag.pvp || map[m].flag.gvg_dungeon || map[m].flag.gvg || map[m].flag.gvg_castle || map[m].flag.gvg_te || map[m].flag.gvg_te_castle || map[m].flag.battleground)
+/// Specifies maps that have special GvG/WoE restrictions
+#define map_flag_gvg(m) (map[m].flag.gvg || ((agit_flag || agit2_flag) && map[m].flag.gvg_castle) || map[m].flag.gvg_te || (agit3_flag && map[m].flag.gvg_te_castle))
+/// Specifies if the map is tagged as GvG/WoE (regardless of agit_flag status)
+#define map_flag_gvg2(m) (map[m].flag.gvg || map[m].flag.gvg_te || map[m].flag.gvg_castle || map[m].flag.gvg_te_castle)
+/// No Kill Steal Protection
+#define map_flag_ks(m) (map[m].flag.town || map[m].flag.pvp || map[m].flag.gvg || map[m].flag.gvg_te || map[m].flag.battleground)
+
+/// WOE:TE Maps (regardless of agit_flag status) [Cydh]
+#define map_flag_gvg2_te(m) (map[m].flag.gvg_te || map[m].flag.gvg_te_castle)
+/// Check if map is GVG maps exclusion for item, skill, and status restriction check (regardless of agit_flag status) [Cydh]
+#define map_flag_gvg2_no_te(m) (map[m].flag.gvg || map[m].flag.gvg_castle)
 
 //This stackable implementation does not means a BL can be more than one type at a time, but it's
 //meant to make it easier to check for multiple types at a time on invocations such as map_foreach* calls [Skotlex]
@@ -663,6 +670,8 @@ struct map_data {
 		unsigned nolockon : 1;
 		unsigned notomb : 1;
 		unsigned nocostume : 1; // Disable costume sprites [Cydh]
+		unsigned gvg_te : 1; // GVG WOE:TE. This was added as purpose to change 'gvg' for GVG TE, so item_noequp, skill_nocast exlude GVG TE maps from 'gvg' (flag &4)
+		unsigned gvg_te_castle : 1; // GVG WOE:TE Castle
 #ifdef ADJUST_SKILL_DAMAGE
 		unsigned skill_damage : 1;
 #endif
@@ -728,11 +737,15 @@ extern int map_num;
 extern int autosave_interval;
 extern int minsave_interval;
 extern unsigned char save_settings;
-extern int agit_flag;
-extern int agit2_flag;
 extern int night_flag; // 0=day, 1=night [Yor]
 extern int enable_spy; //Determines if @spy commands are active.
 
+// Agit Flags
+extern bool agit_flag;
+extern bool agit2_flag;
+extern bool agit3_flag;
+#define is_agit_start() (agit_flag || agit2_flag || agit3_flag)
+
 extern char motd_txt[];
 extern char help_txt[];
 extern char help2_txt[];

+ 16 - 1
src/map/mob.c

@@ -3586,6 +3586,21 @@ int mob_is_clone(int mob_id)
 	return mob_id;
 }
 
+/**
+ * Previously, using skill_nocast with flag 16
+ * @param skill_id
+ * @return True:If disabled, False:If enabled
+ * @!TODO : Move this hardcodes!
+ **/
+static bool mob_clone_disabled_skills(uint16 skill_id) {
+	switch (skill_id) {
+		case PR_TURNUNDEAD:
+		case PR_MAGNUS:
+			return true;
+	}
+	return false;
+}
+
 //Flag values:
 //&1: Set special ai (fight mobs, not players)
 //If mode is not passed, a default aggressive mode is used.
@@ -3650,7 +3665,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
 		uint16 sk_idx = 0;
 		if (!skill_id || !(sk_idx = skill_get_index(skill_id)) || sd->status.skill[sk_idx].lv < 1 ||
 			(skill_get_inf2(skill_id)&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) ||
-			skill_get_nocast(skill_id)&16
+			mob_clone_disabled_skills(skill_id)
 		)
 			continue;
 		//Normal aggressive mob, disable skills that cannot help them fight

+ 19 - 0
src/map/npc.c

@@ -3964,6 +3964,24 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con
 		map[m].flag.gvg_castle=state;
 		if (state) map[m].flag.pvp=0;
 	}
+	else if (!strcmpi(w3,"gvg_te")) {
+		map[m].flag.gvg_te = state;
+		if( state && map[m].flag.pvp ) {
+			map[m].flag.pvp = 0;
+			ShowWarning("npc_parse_mapflag: You can't set PvP and GvG flags for the same map! Removing PvP flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer));
+		}
+		if( state && map[m].flag.battleground ) {
+			map[m].flag.battleground = 0;
+			ShowWarning("npc_parse_mapflag: You can't set GvG and BattleGround flags for the same map! Removing BattleGround flag from %s (file '%s', line '%d').\n", map[m].name, filepath, strline(buffer,start-buffer));
+		}
+	}
+	else if (!strcmpi(w3,"gvg_te_castle")) {
+		map[m].flag.gvg_te_castle = state;
+		if (state) {
+			map[m].flag.gvg_castle = 0;
+			map[m].flag.pvp = 0;
+		}
+	}
 	else if (!strcmpi(w3,"battleground")) {
 		if( state ) {
 			if( sscanf(w4, "%11d", &state) == 1 )
@@ -4498,6 +4516,7 @@ int npc_reload(void) {
 	/* refresh guild castle flags on both woe setups */
 	npc_event_doall("OnAgitInit");
 	npc_event_doall("OnAgitInit2");
+	npc_event_doall("OnAgitInit3");
 
 	//Execute the OnInit event for freshly loaded npcs. [Skotlex]
 	ShowStatus("Event '"CL_WHITE"OnInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n",npc_event_doall("OnInit"));

+ 3 - 2
src/map/pc.c

@@ -12177,10 +12177,11 @@ bool pc_job_can_entermap(enum e_job jobid, int m, int group_lv) {
 	if (!job_info[idx].noenter_map.zone || group_lv > job_info[idx].noenter_map.group_lv)
 		return true;
 
-	if ((!map_flag_vs(m) && job_info[idx].noenter_map.zone&1) || // Normal
+	if ((!map_flag_vs2(m) && job_info[idx].noenter_map.zone&1) || // Normal
 		(map[m].flag.pvp && job_info[idx].noenter_map.zone&2) || // PVP
-		(map_flag_gvg2(m) && job_info[idx].noenter_map.zone&4) || // GVG
+		(map_flag_gvg2_no_te(m) && job_info[idx].noenter_map.zone&4) || // GVG
 		(map[m].flag.battleground && job_info[idx].noenter_map.zone&8) || // Battleground
+		(map_flag_gvg2_te(m) && job_info[idx].noenter_map.zone&16) || // WOE:TE
 		(map[m].flag.restricted && job_info[idx].noenter_map.zone&(8*map[m].zone)) // Zone restriction
 		)
 		return false;

+ 210 - 17
src/map/script.c

@@ -363,6 +363,8 @@ enum {
 	MF_NOTOMB,
 	MF_SKILL_DAMAGE,	//60
 	MF_NOCOSTUME,
+	MF_GVG_TE_CASTLE,
+	MF_GVG_TE,
 };
 
 const char* script_op2name(int op)
@@ -11847,6 +11849,8 @@ BUILDIN_FUNC(getmapflag)
 			case MF_NOLOCKON:			script_pushint(st,map[m].flag.nolockon); break;
 			case MF_NOTOMB:				script_pushint(st,map[m].flag.notomb); break;
 			case MF_NOCOSTUME:			script_pushint(st,map[m].flag.nocostume); break;
+			case MF_GVG_TE_CASTLE:		script_pushint(st,map[m].flag.gvg_te_castle); break;
+			case MF_GVG_TE:				script_pushint(st,map[m].flag.gvg_te); break;
 #ifdef ADJUST_SKILL_DAMAGE
 			case MF_SKILL_DAMAGE:
 				{
@@ -11971,6 +11975,17 @@ BUILDIN_FUNC(setmapflag)
 			case MF_NOLOCKON:			map[m].flag.nolockon = 1 ; break;
 			case MF_NOTOMB:				map[m].flag.notomb = 1; break;
 			case MF_NOCOSTUME:			map[m].flag.nocostume = 1; break;
+			case MF_GVG_TE_CASTLE:		map[m].flag.gvg_te_castle = 1; break;
+			case MF_GVG_TE:
+				{
+					struct block_list bl;
+					map[m].flag.gvg_te = 1;
+					clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+					bl.type = BL_NUL;
+					bl.m = m;
+					clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+				}
+				break;
 #ifdef ADJUST_SKILL_DAMAGE
 			case MF_SKILL_DAMAGE:
 				{
@@ -12083,6 +12098,17 @@ BUILDIN_FUNC(removemapflag)
 			case MF_NOLOCKON:			map[m].flag.nolockon = 0 ; break;
 			case MF_NOTOMB:				map[m].flag.notomb = 0; break;
 			case MF_NOCOSTUME:			map[m].flag.nocostume = 0; break;
+			case MF_GVG_TE_CASTLE:		map[m].flag.gvg_te_castle = 0; break;
+			case MF_GVG_TE:
+				{
+					struct block_list bl;
+					bl.type = BL_NUL;
+					bl.m = m;
+					map[m].flag.gvg_te = 0;
+					clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+					clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+				}
+				break;
 #ifdef ADJUST_SKILL_DAMAGE
 			case MF_SKILL_DAMAGE:
 				{
@@ -12206,6 +12232,43 @@ BUILDIN_FUNC(gvgoff)
 	}
 	return SCRIPT_CMD_SUCCESS;
 }
+
+BUILDIN_FUNC(gvgon3)
+{
+	int16 m;
+	const char *str;
+	struct block_list bl;
+
+	str = script_getstr(st,2);
+	m = map_mapname2mapid(str);
+	if (m >= 0 && !map[m].flag.gvg_te) {
+		map[m].flag.gvg_te = 1;
+		clif_map_property_mapall(m, MAPPROPERTY_AGITZONE);
+		bl.type = BL_NUL;
+		bl.m = m;
+		clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+	}
+	return SCRIPT_CMD_SUCCESS;
+}
+
+BUILDIN_FUNC(gvgoff3)
+{
+	int16 m;
+	const char *str;
+
+	str = script_getstr(st,2);
+	m = map_mapname2mapid(str);
+	if (m >= 0 && map[m].flag.gvg_te) {
+		struct block_list bl;
+		map[m].flag.gvg_te = 0;
+		clif_map_property_mapall(m, MAPPROPERTY_NOTHING);
+		bl.type = BL_NUL;
+		bl.m = m;
+		clif_maptypeproperty2(&bl,ALL_SAMEMAP);
+	}
+	return SCRIPT_CMD_SUCCESS;
+}
+
 /*==========================================
  *	Shows an emoticon on top of the player/npc
  *	emotion emotion#, <target: 0 - NPC, 1 - PC>, <NPC/PC name>
@@ -12297,53 +12360,119 @@ BUILDIN_FUNC(maprespawnguildid)
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/// Siege commands
+
+/**
+ * Start WoE:FE
+ * agitstart();
+ */
 BUILDIN_FUNC(agitstart)
 {
-	if(agit_flag==1) return SCRIPT_CMD_SUCCESS;      // Agit already Start.
-	agit_flag=1;
+	if (agit_flag)
+		return SCRIPT_CMD_SUCCESS;// Agit already Started.
+	agit_flag = true;
 	guild_agit_start();
+
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * End WoE:FE
+ * agitend();
+ */
 BUILDIN_FUNC(agitend)
 {
-	if(agit_flag==0) return SCRIPT_CMD_SUCCESS;      // Agit already End.
-	agit_flag=0;
+	if (!agit_flag)
+		return SCRIPT_CMD_SUCCESS;// Agit already Ended.
+	agit_flag = false;
 	guild_agit_end();
+
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * Start WoE:SE
+ * agitstart2();
+ */
 BUILDIN_FUNC(agitstart2)
 {
-	if(agit2_flag==1) return SCRIPT_CMD_SUCCESS;      // Agit2 already Start.
-	agit2_flag=1;
+	if (agit2_flag)
+		return SCRIPT_CMD_SUCCESS;// Agit2 already Started.
+	agit2_flag = true;
 	guild_agit2_start();
+
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * End WoE:SE
+ * agitend();
+ */
 BUILDIN_FUNC(agitend2)
 {
-	if(agit2_flag==0) return SCRIPT_CMD_SUCCESS;      // Agit2 already End.
-	agit2_flag=0;
+	if (!agit2_flag)
+		return SCRIPT_CMD_SUCCESS;// Agit2 already Ended.
+	agit2_flag = false;
 	guild_agit2_end();
+
 	return SCRIPT_CMD_SUCCESS;
 }
 
-/*==========================================
- * Returns whether woe is on or off.	// choice script
- *------------------------------------------*/
+/**
+ * Start WoE:TE
+ * agitstart3();
+ */
+BUILDIN_FUNC(agitstart3)
+{
+	if (agit3_flag)
+		return SCRIPT_CMD_SUCCESS;// AgitTE already Started.
+	agit3_flag = true;
+	guild_agit3_start();
+
+	return SCRIPT_CMD_SUCCESS;
+}
+
+/**
+ * End WoE:TE
+ * agitend3();
+ */
+BUILDIN_FUNC(agitend3)
+{
+	if (!agit3_flag)
+		return SCRIPT_CMD_SUCCESS;// AgitTE already Ended.
+	agit3_flag = false;
+	guild_agit3_end();
+
+	return SCRIPT_CMD_SUCCESS;
+}
+
+/**
+ * Returns whether WoE:FE is on or off.
+ * agitcheck();
+ */
 BUILDIN_FUNC(agitcheck)
 {
-	script_pushint(st,agit_flag);
+	script_pushint(st, agit_flag);
 	return SCRIPT_CMD_SUCCESS;
 }
 
-/*==========================================
- * Returns whether woese is on or off.	// choice script
- *------------------------------------------*/
+/**
+ * Returns whether WoE:SE is on or off.
+ * agitcheck2();
+ */
 BUILDIN_FUNC(agitcheck2)
 {
-	script_pushint(st,agit2_flag);
+	script_pushint(st, agit2_flag);
+	return SCRIPT_CMD_SUCCESS;
+}
+
+/**
+ * Returns whether WoE:TE is on or off.
+ * agitcheck3();
+ */
+BUILDIN_FUNC(agitcheck3)
+{
+	script_pushint(st, agit3_flag);
 	return SCRIPT_CMD_SUCCESS;
 }
 
@@ -18678,7 +18807,7 @@ BUILDIN_FUNC(waitingroom2bg)
 		script_pushint(st,0);
 		return SCRIPT_CMD_SUCCESS;
 	}
-	
+
 	for (i = 0; i < cd->users; i++) { // Only add those who are in the chat room
 		struct map_session_data *sd;
 		if( (sd = cd->usersd[i]) != NULL && bg_team_join(bg_id, sd) ){
@@ -21839,6 +21968,62 @@ BUILDIN_FUNC(jobcanentermap) {
 	return SCRIPT_CMD_SUCCESS;
 }
 
+/**
+ * Return alliance information between the two guilds.
+ * getguildalliance(<guild id1>,<guild id2>);
+ * Return values:
+ *	-2 - Guild ID1 does not exist
+ *	-1 - Guild ID2 does not exist
+ *	 0 - Both guilds have no relation OR guild ID aren't given
+ *	 1 - Both guilds are allies
+ *	 2 - Both guilds are antagonists
+ */
+BUILDIN_FUNC(getguildalliance)
+{
+	struct guild *guild_data1, *guild_data2;
+	int guild_id1, guild_id2, i = 0;
+
+	guild_id1 = script_getnum(st,2);
+	guild_id2 = script_getnum(st,3);
+
+	if (guild_id1 < 1 || guild_id2 < 1) {
+		script_pushint(st, 0);
+		return SCRIPT_CMD_SUCCESS;
+	}
+
+	if (guild_id1 == guild_id2) {
+		script_pushint(st, 1);
+		return SCRIPT_CMD_SUCCESS;
+	}
+
+	guild_data1 = guild_search(guild_id1);
+	guild_data2 = guild_search(guild_id2);
+
+	if (guild_data1 == NULL) {
+		ShowWarning("buildin_getguildalliance: Requesting non-existent GuildID1 '%d'.\n", guild_id1);
+		script_pushint(st, -2);
+		return SCRIPT_CMD_FAILURE;
+	}
+	if (guild_data2 == NULL) {
+		ShowWarning("buildin_getguildalliance: Requesting non-existent GuildID2 '%d'.\n", guild_id2);
+		script_pushint(st, -1);
+		return SCRIPT_CMD_FAILURE;
+	}
+
+	ARR_FIND(0, MAX_GUILDALLIANCE, i, guild_data1->alliance[i].guild_id == guild_id2);
+	if (i == MAX_GUILDALLIANCE) {
+		script_pushint(st, 0);
+		return SCRIPT_CMD_SUCCESS;
+	}
+
+	if (guild_data1->alliance[i].opposition)
+		script_pushint(st, 2);
+	else
+		script_pushint(st, 1);
+
+	return SCRIPT_CMD_SUCCESS;
+}
+
 #include "../custom/script.inc"
 
 // declarations that were supposed to be exported from npc_chat.c
@@ -22416,6 +22601,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(setquestinfo_job,"ii*"),
 	BUILDIN_DEF(opendressroom,"i?"),
 	BUILDIN_DEF(navigateto,"s???????"),
+	BUILDIN_DEF(getguildalliance,"ii"),
 	BUILDIN_DEF(adopt,"vv"),
 	BUILDIN_DEF(getexp2,"ii?"),
 	BUILDIN_DEF(recalculatestat,""),
@@ -22426,6 +22612,13 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(needed_status_point,"ii?"),
 	BUILDIN_DEF(jobcanentermap,"s?"),
 
+	// WoE TE
+	BUILDIN_DEF(agitstart3,""),
+	BUILDIN_DEF(agitend3,""),
+	BUILDIN_DEF(agitcheck3,""),
+	BUILDIN_DEF(gvgon3,"s"),
+	BUILDIN_DEF(gvgoff3,"s"),
+
 #include "../custom/script_def.inc"
 
 	{NULL,NULL,NULL},

+ 3 - 0
src/map/script_constants.h

@@ -20,6 +20,7 @@
 	export_constant(MAX_PARTY);
 	export_constant(MAX_GUILD);
 	export_constant(MAX_GUILDLEVEL);
+	export_constant(MAX_GUARDIANS);
 	export_constant(MAX_GUILD_STORAGE);
 	export_constant(MAX_BG_MEMBERS);
 	export_constant(MAX_CHAT_USERS);
@@ -405,6 +406,8 @@
 	export_constant(MF_NOTOMB);
 	export_constant(MF_SKILL_DAMAGE);
 	export_constant(MF_NOCOSTUME);
+	export_constant(MF_GVG_TE_CASTLE);
+	export_constant(MF_GVG_TE);
 
 	/* setcell types */
 	export_constant(CELL_WALKABLE);

+ 14 - 8
src/map/skill.c

@@ -610,7 +610,10 @@ static int8 skill_isCopyable(struct map_session_data *sd, uint16 skill_idx) {
 bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
 {
 	int16 idx,m;
+	uint32 skill_nocast = 0;
+
 	nullpo_retr(1,sd);
+
 	m = sd->bl.m;
 	idx = skill_get_index(skill_id);
 
@@ -647,12 +650,15 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
 	 */
 	if( sd->skillitem == skill_id && !sd->skillitem_keep_requirement )
 		return false;
+
+	skill_nocast = skill_get_nocast(skill_id);
 	// Check skill restrictions [Celest]
-	if( (!map_flag_vs(m) && skill_get_nocast (skill_id) & 1) ||
-		(map[m].flag.pvp && skill_get_nocast (skill_id) & 2) ||
-		(map_flag_gvg(m) && skill_get_nocast (skill_id) & 4) ||
-		(map[m].flag.battleground && skill_get_nocast (skill_id) & 8) ||
-		(map[m].flag.restricted && map[m].zone && skill_get_nocast (skill_id) & (8*map[m].zone)) ){
+	if( (!map_flag_vs2(m) && skill_nocast&1) ||
+		(map[m].flag.pvp && skill_nocast&2) ||
+		(map_flag_gvg2_no_te(m) && skill_nocast&4) ||
+		(map[m].flag.battleground && skill_nocast&8) ||
+		(map_flag_gvg2_te(m) && skill_nocast&16) || // WOE:TE
+		(map[m].flag.restricted && map[m].zone && skill_nocast&(8*map[m].zone)) ){
 			clif_msg(sd, SKILL_CANT_USE_AREA); // This skill cannot be used within this area
 			return true;
 	}
@@ -725,9 +731,9 @@ bool skill_isNotOk(uint16 skill_id, struct map_session_data *sd)
 		case GD_EMERGENCYCALL:
 		case GD_ITEMEMERGENCYCALL:
 			if (
-				!(battle_config.emergency_call&((agit_flag || agit2_flag)?2:1)) ||
-				!(battle_config.emergency_call&(map[m].flag.gvg || map[m].flag.gvg_castle?8:4)) ||
-				(battle_config.emergency_call&16 && map[m].flag.nowarpto && !map[m].flag.gvg_castle)
+				!(battle_config.emergency_call&((is_agit_start())?2:1)) ||
+				!(battle_config.emergency_call&(map_flag_gvg2(m)?8:4)) ||
+				(battle_config.emergency_call&16 && map[m].flag.nowarpto && !(map[m].flag.gvg_castle || map[m].flag.gvg_te_castle))
 			)	{
 				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
 				return true;

+ 9 - 6
src/map/status.c

@@ -91,8 +91,8 @@ static int status_get_spbonus(struct block_list *bl, enum e_status_bonus type);
 static unsigned int status_calc_maxhpsp_pc(struct map_session_data* sd, unsigned int stat, bool isHP);
 static int status_get_sc_interval(enum sc_type type);
 
-static bool status_change_isDisabledOnMap_(sc_type type, bool mapIsVS, bool mapIsPVP, bool mapIsGVG, bool mapIsBG, unsigned int mapZone);
-#define status_change_isDisabledOnMap(type, m) ( status_change_isDisabledOnMap_((type), map_flag_vs((m)), map[(m)].flag.pvp, map_flag_gvg((m)), map[(m)].flag.battleground, map[(m)].zone << 3) )
+static bool status_change_isDisabledOnMap_(sc_type type, bool mapIsVS, bool mapIsPVP, bool mapIsGVG, bool mapIsBG, unsigned int mapZone, bool mapIsTE);
+#define status_change_isDisabledOnMap(type, m) ( status_change_isDisabledOnMap_((type), map_flag_vs2((m)), map[(m)].flag.pvp, map_flag_gvg2_no_te((m)), map[(m)].flag.battleground, map[(m)].zone << 3, map_flag_gvg2_te((m))) )
 
 /**
  * Returns the status change associated with a skill.
@@ -13619,9 +13619,10 @@ int status_get_refine_chance(enum refine_type wlv, int refine)
  * @param mapIsGVG: If the map is a map_flag_gvg type
  * @param mapIsBG: If the map is a Battleground type
  * @param mapZone: Map Zone type
+ * @param mapIsTE: If the map us WOE TE
  * @return True - SC disabled on map; False - SC not disabled on map/Invalid SC
  */
-static bool status_change_isDisabledOnMap_(sc_type type, bool mapIsVS, bool mapIsPVP, bool mapIsGVG, bool mapIsBG, unsigned int mapZone)
+static bool status_change_isDisabledOnMap_(sc_type type, bool mapIsVS, bool mapIsPVP, bool mapIsGVG, bool mapIsBG, unsigned int mapZone, bool mapIsTE)
 {
 	if (type <= SC_NONE || type >= SC_MAX)
 		return false;
@@ -13630,6 +13631,7 @@ static bool status_change_isDisabledOnMap_(sc_type type, bool mapIsVS, bool mapI
 		(mapIsPVP && SCDisabled[type]&2) ||
 		(mapIsGVG && SCDisabled[type]&4) ||
 		(mapIsBG && SCDisabled[type]&8) ||
+		(mapIsTE && SCDisabled[type]&16) ||
 		(SCDisabled[type]&(mapZone)))
 	{
 		return true;
@@ -13649,17 +13651,18 @@ void status_change_clear_onChangeMap(struct block_list *bl, struct status_change
 
 	if (sc && sc->count) {
 		unsigned short i;
-		bool mapIsVS = map_flag_vs(bl->m);
+		bool mapIsVS = map_flag_vs2(bl->m);
 		bool mapIsPVP = map[bl->m].flag.pvp;
-		bool mapIsGVG = map_flag_gvg(bl->m);
+		bool mapIsGVG = map_flag_gvg2_no_te(bl->m);
 		bool mapIsBG = map[bl->m].flag.battleground;
+		bool mapIsTE = map_flag_gvg2_te(bl->m);
 		unsigned int mapZone = map[bl->m].zone << 3;
 
 		for (i = 0; i < SC_MAX; i++) {
 			if (!sc->data[i] || !SCDisabled[i])
 				continue;
 
-			if (status_change_isDisabledOnMap_((sc_type)i, mapIsVS, mapIsPVP, mapIsGVG, mapIsBG, mapZone))
+			if (status_change_isDisabledOnMap_((sc_type)i, mapIsVS, mapIsPVP, mapIsGVG, mapIsBG, mapZone, mapIsTE))
 				status_change_end(bl, (sc_type)i, INVALID_TIMER);
 		}
 	}