浏览代码

Merge branch 'master' into hotfix/issue1950

aleos89 7 年之前
父节点
当前提交
fad4a81c6d
共有 100 个文件被更改,包括 3429 次插入1006 次删除
  1. 1 1
      3rdparty/yaml-cpp/src/parse.cpp
  2. 1 1
      Makefile.in
  3. 3 0
      README.md
  4. 10 0
      conf/battle/items.conf
  5. 0 0
      conf/import-tmpl/inter_server.conf
  6. 17 0
      conf/import-tmpl/inter_server.yml
  7. 1 1
      conf/inter_athena.conf
  8. 0 26
      conf/inter_server.conf
  9. 34 0
      conf/inter_server.yml
  10. 118 0
      conf/readme.md
  11. 0 22
      conf/readme.txt
  12. 1 1
      configure
  13. 1 0
      configure.in
  14. 10 0
      db/const.txt
  15. 2 0
      db/import-tmpl/achievement_db.yml
  16. 0 32
      db/import-tmpl/refine_db.txt
  17. 20 0
      db/import-tmpl/refine_db.yml
  18. 9 9
      db/pre-re/item_db.txt
  19. 0 10
      db/pre-re/item_misc.txt
  20. 0 41
      db/pre-re/refine_db.txt
  21. 235 0
      db/pre-re/refine_db.yml
  22. 1 1
      db/pre-re/skill_require_db.txt
  23. 1 0
      db/re/instance_db.txt
  24. 119 97
      db/re/item_db.txt
  25. 0 11
      db/re/item_misc.txt
  26. 1 1
      db/re/item_trade.txt
  27. 52 13
      db/re/mob_db.txt
  28. 4 4
      db/re/mob_drop.txt
  29. 48 0
      db/re/mob_skill_db.txt
  30. 4 0
      db/re/quest_db.txt
  31. 0 41
      db/re/refine_db.txt
  32. 584 0
      db/re/refine_db.yml
  33. 2 2
      db/re/skill_db.txt
  34. 1 1
      db/re/skill_require_db.txt
  35. 106 0
      db/readme.md
  36. 2 2
      doc/item_group.txt
  37. 51 14
      doc/script_commands.txt
  38. 2 7
      npc/custom/resetnpc.txt
  39. 2 1
      npc/jobs/2-1/assassin.txt
  40. 5 22
      npc/merchants/advanced_refiner.txt
  41. 81 111
      npc/merchants/refine.txt
  42. 3 3
      npc/quests/quests_moscovia.txt
  43. 10 4
      npc/re/custom/lasagna/lasagna_npcs.txt
  44. 991 0
      npc/re/instances/GhostPalace.txt
  45. 8 8
      npc/re/instances/HorrorToyFactory.txt
  46. 7 19
      npc/re/merchants/advanced_refiner.txt
  47. 3 8
      npc/re/merchants/blessed_refiner.txt
  48. 12 29
      npc/re/merchants/hd_refiner.txt
  49. 43 52
      npc/re/merchants/refine.txt
  50. 143 0
      npc/re/merchants/shadow_refiner.txt
  51. 2 2
      npc/re/other/achievements.txt
  52. 1 1
      npc/re/quests/quests_eclage.txt
  53. 2 0
      npc/re/scripts_athena.conf
  54. 9 0
      rAthena.sln
  55. 9 9
      sql-files/item_db.sql
  56. 119 97
      sql-files/item_db_re.sql
  57. 14 14
      sql-files/main.sql
  58. 52 13
      sql-files/mob_db_re.sql
  59. 21 0
      sql-files/upgrades/upgrade_20170830.sql
  60. 15 8
      src/char/Makefile.in
  61. 6 2
      src/char/char-server.vcxproj
  62. 2 2
      src/char/char-server.vcxproj.filters
  63. 17 13
      src/char/char.cpp
  64. 5 5
      src/char/int_achievement.c
  65. 7 0
      src/char/int_achievement.h
  66. 8 0
      src/char/int_auction.h
  67. 12 3
      src/char/int_clan.h
  68. 3 3
      src/char/int_elemental.c
  69. 2 2
      src/char/int_homun.c
  70. 2 2
      src/char/int_mercenary.c
  71. 8 0
      src/char/int_quest.h
  72. 17 40
      src/char/int_storage.cpp
  73. 2 0
      src/char/int_storage.h
  74. 83 61
      src/char/inter.cpp
  75. 11 8
      src/char/inter.h
  76. 2 4
      src/common/Makefile.in
  77. 3 5
      src/common/core.cpp
  78. 1 0
      src/common/ers.h
  79. 9 2
      src/common/malloc.c
  80. 2 1
      src/common/malloc.h
  81. 1 1
      src/common/mmo.h
  82. 3 5
      src/common/sql.h
  83. 4 4
      src/common/strlib.h
  84. 48 3
      src/common/yamlwrapper.cpp
  85. 9 0
      src/common/yamlwrapper.h
  86. 0 2
      src/login/Makefile.in
  87. 0 2
      src/map/Makefile.in
  88. 7 5
      src/map/achievement.c
  89. 1 3
      src/map/achievement.h
  90. 2 1
      src/map/atcommand.c
  91. 5 3
      src/map/battle.c
  92. 4 0
      src/map/battle.h
  93. 1 1
      src/map/channel.h
  94. 2 2
      src/map/chat.c
  95. 68 67
      src/map/clif.cpp
  96. 4 0
      src/map/clif_obfuscation.h
  97. 12 9
      src/map/clif_packetdb.h
  98. 62 0
      src/map/clif_shuffle.h
  99. 1 1
      src/map/elemental.c
  100. 0 5
      src/map/intif.c

+ 1 - 1
3rdparty/yaml-cpp/src/parse.cpp

@@ -31,7 +31,7 @@ Node Load(std::istream& input) {
 
 Node LoadFile(const std::string& filename) {
   std::ifstream fin(filename.c_str());
-  if (!fin) {
+  if (!fin || fin.bad()) {
     throw BadFile();
   }
   return Load(fin);

+ 1 - 1
Makefile.in

@@ -7,7 +7,7 @@ ifeq ($(HAVE_MYSQL),yes)
 	SERVER_DEPENDS=common login char map import
 	COMMON_DEPENDS=mt19937ar libconfig yaml-cpp
 	LOGIN_DEPENDS=mt19937ar libconfig common
-	CHAR_DEPENDS=mt19937ar libconfig common
+	CHAR_DEPENDS=mt19937ar libconfig common yaml-cpp
 	MAP_DEPENDS=mt19937ar libconfig common yaml-cpp
 else
 	ALL_DEPENDS=needs_mysql

+ 3 - 0
README.md

@@ -91,6 +91,9 @@ relevant to your Operation System, please refer to the Wiki (links at the end of
 	* Configure and compile:
 
 				./configure && make clean && make server
+	* Configure and compile (for Centos 64 bit with Maria DB):
+
+				./configure --enable-64bit --with-MYSQL_LIBS=/usr/lib64/libmysqlclient.so && make clean && make server
 	* When you're ready, start the servers:
 
 				./athena-start start

+ 10 - 0
conf/battle/items.conf

@@ -105,3 +105,13 @@ item_flooritem_check: yes
 // 3 - Party
 // 4 - Character
 default_bind_on_equip: 4
+
+// Allow selling of bound items as Itemshop currency?
+// no = Bound items are unable to be sold at Itemshops
+// yes = Bound items are able to be sold at Itemshops
+allow_bound_sell: no
+
+// Turn on event refine chance (see db/{pre-}re/refine_db.yml)
+// no = normal refine chances in effect (official/default value)
+// yes = event refine chances in effect
+event_refine_chance: no

+ 0 - 0
conf/import-tmpl/inter_server.conf


+ 17 - 0
conf/import-tmpl/inter_server.yml

@@ -0,0 +1,17 @@
+# Config for Storages
+#
+# To access the premium storage, use script command 'openstorage2'.
+# If premium storages are added, copy the structure of the storage table and match the table name in this config.
+# The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE.
+#
+# Structure:
+#	- ID: <storage_id>          // (int) Storage ID will be used for script command 'openstorage2'.
+#	  Name: "<storage name>"    // (string) Storage name will be sent to the client to display on the title bar.
+#	  Table: "<storage_table>"  // (string) Name of table where storage is saved. The table stucture is the same as the default storage table.
+#	  Max: <max_amount>         // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined.
+###############################################################################################################################################
+#Storages:
+#   - ID: 1
+#     Name: "VIP Storage"
+#     Table: "vip_storage"
+#     Max: 300

+ 1 - 1
conf/inter_athena.conf

@@ -153,6 +153,6 @@ roulette_table: db_roulette
 // Use SQL item_db, mob_db and mob_skill_db for the map server? (yes/no)
 use_sql_db: no
 
-inter_server_conf: conf/inter_server.conf
+inter_server_conf: inter_server.yml
 
 import: conf/import/inter_conf.txt

+ 0 - 26
conf/inter_server.conf

@@ -1,26 +0,0 @@
-/**
- * Config for Storages
- *
- * To access the premium storage, use script command 'openstorage2'.
- * If premium storages are added, copy the structure of the storage table and match the table name in this config.
- * The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE.
- *
- * Structure:
-{
-	id: <storage_id>          // (int) Storage ID will be used for script command 'openstorage2'.
-	name: "<storage name>"    // (string) Storage name will be sent to the client to display on the title bar.
-	table: "<storage_table>"  // (string) Name of table where storage is saved. The table stucture is the same as the default storage table.
-	max: <max_amount>         // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined.
-},					          // Use comma to add more storages
- **/
-
-storages: (
-{
-	// Default Storage
-	// DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU ARE DOING
-	id: 0
-	name: "Storage"
-	table: "storage"
-	//max: 600
-}
-)

+ 34 - 0
conf/inter_server.yml

@@ -0,0 +1,34 @@
+# This file is a part of rAthena.
+#   Copyright(C) 2017 rAthena Development Team
+#   https://rathena.org - https://github.com/rathena
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+###########################################################################
+# Config for Storages
+#
+# To access the premium storage, use script command 'openstorage2'.
+# If premium storages are added, copy the structure of the storage table and match the table name in this config.
+# The 'max' of premium storages are not adjusted by 'vip_storage_increase' config nor MIN_STORAGE.
+#
+# Structure:
+#	- ID: <storage_id>          // (int) Storage ID will be used for script command 'openstorage2'.
+#	  Name: "<storage name>"    // (string) Storage name will be sent to the client to display on the title bar.
+#	  Table: "<storage_table>"  // (string) Name of table where storage is saved. The table stucture is the same as the default storage table.
+#	  Max: <max_amount>         // (int) *optional* Maximum number of items in storage. MAX_STORAGE will be used if no value is defined.
+
+Storages:
+    - ID: 0
+      Name: "Storage"
+      Table: "storage"

+ 118 - 0
conf/readme.md

@@ -0,0 +1,118 @@
+# Import Directories
+
+## What is the import directory for?
+
+The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files.
+
+By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena.
+
+## How does this work?
+
+Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding".
+
+For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/conf/import/` directory correctly. (for `/db/import/` examples, see [/db/readme.md](/db/readme.md))
+
+### Login Server
+---
+We want to use MD5 passwords and disable `_m/f` account creation methods.
+
+#### /conf/import/login_conf.txt
+
+	new_account: no
+	use_MD5_passwords: yes
+
+
+### Char Server
+---
+We want to change the server name to "Odin".
+
+#### /conf/import/char_conf.txt
+
+	server_name: Odin
+
+
+### Map Server
+---
+We want to hide all error messages and add a few custom maps.
+
+#### /conf/import/map_conf.txt
+
+	//Makes server output more silent by omitting certain types of messages:
+	//16: Hide Error and SQL Error messages.
+	console_silent: 16
+	map: 1@toy
+	map: 1@valley
+	map: shops
+
+
+### Inter Server
+---
+We want to use MySQL tables instead of .txt files.
+
+#### /conf/import/inter_conf.txt
+
+	use_sql_db: yes
+
+
+### Logging Settings
+---
+We want to log all items and all chat messages.
+
+#### /conf/import/log_conf.txt
+
+	log_filter: 1
+	// Log CHAT (Global, Whisper, Party, Guild, Main chat, Clan) (Note 3)
+	// log_chat: 63 = logs everything
+	log_chat: 63
+
+
+### Battle Configs
+---
+We want to change the way various mechanics work. For anything that would be configured in the `/conf/battle/` directory, it will go into `import/battle_conf.txt`. To help you find which configs came from where, it's generally a good idea to comment out the name of the file that specific collection of configs came from.
+
+#### /conf/import/battle_conf.txt
+
+	// guild.conf
+	guild_exp_limit: 90
+
+	// items.conf
+	vending_over_max: no
+	vending_tax: 100
+	weapon_produce_rate: 200
+	potion_produce_rate: 200
+	produce_item_name_input: 0x03
+
+	// misc.conf
+	duel_time_interval: 2
+	at_mapflag: yes
+	at_monsterignore: yes
+	cashshop_show_points: yes
+	hide_fav_sell: yes
+	// Whether or not mail box status is displayed upon login.
+	// Default: 0
+	// 0 = No
+	// 1 = Yes
+	// 2 = Yes, when there are unread mails
+	mail_show_status: 2
+
+	// monster.conf
+	show_mob_info: 3
+
+	// party.conf
+	party_hp_mode: 1
+	display_party_name: yes
+
+	// pet.conf
+	pet_rename: yes
+
+	// player.conf
+	max_aspd: 196
+	max_third_aspd: 196
+	max_extended_aspd: 196
+	vip_disp_rate: no
+
+	// status.conf
+	debuff_on_logout: 3
+
+
+We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system.

+ 0 - 22
conf/readme.txt

@@ -1,22 +0,0 @@
-What is the import folder for?
--------------------------------------------------------------------------------
-
-The folder provides a way for you to change your config settings without having
-to update the files every time you update your server. You store your changes,
-and the rest is updated with rAthena.
-
-How does this work?
--------------------------------------------------------------------------------
-
-Place only the settings you have changed in the import files.
-For example, if you want to change a value in /battle/exp.conf:
-
-	// Rate at which exp. is given. (Note 2)
-	base_exp_rate: 700
-
-You could instead copy the setting into /import/battle_conf.txt,
-and you'll eliminate any problems updating in the future.
-
-Neat, isn't it?
-
-- Semi-guide by Ajarn / Euphy

+ 1 - 1
configure

@@ -4951,7 +4951,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 CFLAGS="$CFLAGS -pipe -ffast-math -Wall"
 CPPFLAGS="$CPPFLAGS -I../common"
-
+CXXFLAGS="$CXXFLAGS -std=c++11"
 
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5

+ 1 - 0
configure.in

@@ -440,6 +440,7 @@ AC_LANG([C++])
 
 CFLAGS="$CFLAGS -pipe -ffast-math -Wall"
 CPPFLAGS="$CPPFLAGS -I../common"
+CXXFLAGS="$CXXFLAGS -std=c++11"
 
 
 AC_C_BIGENDIAN(

+ 10 - 0
db/const.txt

@@ -2298,6 +2298,16 @@ JP_NPC01	10236
 4_PCCOUNT	10253
 4_LAVAGOLEM	10254
 
+JP_NPC02	10261
+JP_NPC03	10262
+JP_NPC04	10263
+JP_NPC05	10264
+JP_NPC06	10265
+JP_NPC07	10266
+JP_NPC08	10267
+JP_NPC09	10268
+JP_NPC10	10269
+
 SWORDCLAN	1
 ARCWANDCLAN	2
 GOLDENMACECLAN	3

+ 2 - 0
db/import-tmpl/achievement_db.yml

@@ -76,3 +76,5 @@
 ###########################################################################
 # Score - Achievement points that are given on completion.
 ###########################################################################
+
+Achievements:

+ 0 - 32
db/import-tmpl/refine_db.txt

@@ -1,32 +0,0 @@
-// Refine Database [Renewal]
-//
-// Structure of Database:
-// Type,Stats per level,Random bonus start level,Random bonus value,Chance+1:Bonus+1,Chance+2:Bonus+2,Chance+3:Bonus+3,...
-//
-// For armors, values of 100 add 1 armor defense.
-// For weapons, values of 100 add 1 ATK&MATK.
-//
-// Type:
-//	0 - Armors
-//	1 - Level 1 weapons
-//	2 - Level 2 weapons
-//	3 - Level 3 weapons
-//	4 - Level 4 weapons
-//
-// Stats per level:
-// This value is applied for every upgrade level.
-//
-// Random bonus start level:
-// This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
-//
-// Random bonus value:
-// A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past
-// Random bonus start level. This is only applied for weapons, and not displayed client-side.
-//
-// Chance:
-// 100 = 100%
-//
-// Notes:
-// Changing the number of upgrade levels requires modifying MAX_REFINE in src/map/status.h.
-// For Renewal Armors, there may or may not be another bonus, according to iRO wiki: Every upgrade gives floor[( 3 + current upgrade ) / 4] equipment DEF)
-

+ 20 - 0
db/import-tmpl/refine_db.yml

@@ -0,0 +1,20 @@
+# This file is a part of rAthena++.
+#   Copyright(C) 2017 rAthena Development Team
+#   https://rathena.org - https://github.com/rathena
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+###########################################################################
+# Custom Refine Database
+###########################################################################

+ 9 - 9
db/pre-re/item_db.txt

@@ -5169,15 +5169,15 @@
 12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VENOMBLEED,15000,0,10,0; },{},{}
 
 // Rune Knight's Rune Stones
-12725,Runstone_Nosiege,Nauthiz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_REFRESH",1; },{},{}
-12726,Runstone_Rhydo,Raido Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_CRUSHSTRIKE",1; },{},{}
-12727,Runstone_Verkana,Berkana Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_MILLENNIUMSHIELD",1; },{},{}
-12728,Runstone_Isia,Isa Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_VITALITYACTIVATION",1; },{},{}
-12729,Runstone_Asir,Othila Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_FIGHTINGSPIRIT",1; },{},{}
-12730,Runstone_Urj,Uruz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_ABUNDANCE",1; },{},{}
-12731,Runstone_Turisus,Thurisaz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_GIANTGROWTH",1; },{},{}
-12732,Runstone_Pertz,Wyrd Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_STORMBLAST",1; },{},{}
-12733,Runstone_Hagalas,Hagalaz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_STONEHARDSKIN",1; },{},{}
+12725,Runstone_Nosiege,Nauthiz Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_REFRESH",1; },{},{}
+12726,Runstone_Rhydo,Raido Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_CRUSHSTRIKE",1; },{},{}
+12727,Runstone_Verkana,Berkana Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_MILLENNIUMSHIELD",1; },{},{}
+12728,Runstone_Isia,Isa Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_VITALITYACTIVATION",1; },{},{}
+12729,Runstone_Asir,Othila Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_FIGHTINGSPIRIT",1; },{},{}
+12730,Runstone_Urj,Uruz Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_ABUNDANCE",1; },{},{}
+12731,Runstone_Turisus,Thurisaz Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_GIANTGROWTH",1; },{},{}
+12732,Runstone_Pertz,Wyrd Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STORMBLAST",1; },{},{}
+12733,Runstone_Hagalas,Hagalaz Rune,2,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STONEHARDSKIN",1; },{},{}
 
 // Rune Knight Rune Ores
 12734,Runstone_Quality,Luxurious Rune,0,2,,100,,,,,0x00000080,8,2,,,,,,{ makerune 5; },{},{}

+ 0 - 10
db/pre-re/item_misc.txt

@@ -559,16 +559,6 @@ IG_Xmas_Gift,12354,24	// Buche_De_Noel
 IG_Xmas_Gift,12702,36	// Old_Bleu_Box
 IG_Xmas_Gift,14546,6	// Fire_Cracker_Love
 IG_Xmas_Gift,14550,6	// Fire_Cracker_Xmas
-// Runes
-IG_Rune,12725,1 // Runstone_Nosiege
-IG_Rune,12726,1 // Runstone_Rhydo
-IG_Rune,12727,1 // Runstone_Verkana
-IG_Rune,12728,1 // Runstone_Isia
-IG_Rune,12729,1 // Runstone_Asir
-IG_Rune,12730,1 // Runstone_Urj
-IG_Rune,12731,1 // Runstone_Turisus
-IG_Rune,12732,1 // Runstone_Pertz
-IG_Rune,12733,1 // Runstone_Hagalas
 // Elemental Points
 IG_Element,6360,1 // Scarlet_Pts
 IG_Element,6361,1 // Indigo_Pts

+ 0 - 41
db/pre-re/refine_db.txt

@@ -1,41 +0,0 @@
-// Refine Database [Pre-Renewal]
-//
-// Structure of Database:
-// Type,Stats per level,Random bonus start level,Random bonus value,Chance+1:Bonus+1,Chance+2:Bonus+2,Chance+3:Bonus+3,...
-//
-// For armors, values of 100 add 1 armor defense.
-// For weapons, values of 100 add 1 ATK.
-//
-// Type:
-//	0 - Armors
-//	1 - Level 1 weapons
-//	2 - Level 2 weapons
-//	3 - Level 3 weapons
-//	4 - Level 4 weapons
-//
-// Stats per level:
-// This value is applied for every upgrade level.
-//
-// Random bonus start level:
-// This value specifies the start point for those levels that give a random bonus value.
-//
-// Random bonus value:
-// A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past
-// Random bonus start level (usually the first unsafe upgrade). This is only applied for weapons, and not displayed client-side.
-//
-// Chance:
-// 100 = 100%
-//
-// Notes:
-// Changing the number of upgrade levels requires modifying MAX_REFINE in src/map/status.h.
-
-// Armors
-0,70,0,0,100:0,100:0,100:0,100:0,60:0,40:0,40:0,20:0,20:0,10:0
-// Level 1 weapons
-1,200,8,300,100:0,100:0,100:0,100:0,100:0,100:0,100:0,60:0,40:0,20:0
-// Level 2 weapons
-2,300,7,500,100:0,100:0,100:0,100:0,100:0,100:0,60:0,40:0,20:0,20:0
-// Level 3 weapons
-3,500,6,800,100:0,100:0,100:0,100:0,100:0,60:0,50:0,20:0,20:0,20:0
-// Level 4 weapons
-4,700,5,1300,100:0,100:0,100:0,100:0,60:0,40:0,40:0,20:0,20:0,10:0

+ 235 - 0
db/pre-re/refine_db.yml

@@ -0,0 +1,235 @@
+# This file is a part of rAthena++.
+#   Copyright(C) 2017 rAthena Development Team
+#   https://rathena.org - https://github.com/rathena
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+###########################################################################
+# Pre-Renewal Refine Database
+###########################################################################
+Armor:
+  StatsPerLevel: 66
+  RandomBonusStartLevel: 0
+  RandomBonusValue: 0
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 2000
+      Material: 985
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7619
+  Rates:
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35
+WeaponLv1:
+  StatsPerLevel: 200
+  RandomBonusStartLevel: 8
+  RandomBonusValue: 300
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 50
+      Material: 1010
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+  Rates:
+    - Level: 8
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 9
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 85
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 55
+WeaponLv2:
+  StatsPerLevel: 300
+  RandomBonusStartLevel: 7
+  RandomBonusValue: 500
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 200
+      Material: 1011
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+  Rates:
+    - Level: 7
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 8
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 85
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 45
+WeaponLv3:
+  StatsPerLevel: 500
+  RandomBonusStartLevel: 6
+  RandomBonusValue: 800
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 5000
+      Material: 984
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+  Rates:
+    - Level: 6
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 7
+      NormalChance: 50
+      EnrichedChance: 80
+      EventNormalChance: 50
+      EventEnrichedChance: 90
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 70
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 45
+WeaponLv4:
+  StatsPerLevel: 700
+  RandomBonusStartLevel: 5
+  RandomBonusValue: 1300
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 20000
+      Material: 984
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+  Rates:
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35
+Shadow:
+  StatsPerLevel: 0
+  RandomBonusStartLevel: 0
+  RandomBonusValue: 0
+  Rates:
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35

+ 1 - 1
db/pre-re/skill_require_db.txt

@@ -580,7 +580,7 @@
 
 2025,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0								//GC_CREATENEWPOISON
 2026,0,0,10,0,0,0,99,0,0,none,0,0,6128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0							//GC_ANTIDOTE
-2027,0,0,20:24:28:32:36,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_POISONINGWEAPON
+2027,0,0,20:24:28:32:36,0,0,0,1:16,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0				//GC_POISONINGWEAPON
 2028,0,0,40:36:32:28:24,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_WEAPONBLOCKING
 2029,0,0,5:8:11:14:17,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_COUNTERSLASH
 2030,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0								//GC_WEAPONCRUSH

+ 1 - 0
db/re/instance_db.txt

@@ -22,3 +22,4 @@
 15,Geffen Magic Tournament,7200,300,1@gef,119,209,1@gef_in,1@ge_st
 16,Horror Toy Factory,3600,300,1@xm_d,111,22
 17,Faceworm's Nest,3600,300,1@face,112,374
+18,Ghost Palace,3600,300,1@spa,42,196

+ 119 - 97
db/re/item_db.txt

@@ -1380,11 +1380,11 @@
 2175,Esprit_Shield,Spirit Shield,4,20,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,3,{},{},{}
 2176,Dark_Book,Black Book,4,20,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,5,{ bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30)); },{},{}
 2177,Shield_Of_Death,Shield Of Death,4,20,,2000,,150,,1,0xFFFFFFFF,63,2,32,,90,1,3,{ bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10; },{},{}
-2178,TE_Woe_Buckler,TE Woe Buckler,4,0,,0,,15,,0,0xFFFFFFFF,63,2,32,1,40,1,2,{ bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15; },{},{}
-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; },{},{}
+2178,TE_Woe_Buckler,TE Woe Buckler,4,0,,0,,15,,0,0xFFFFFFFF,63,2,32,,40,1,2,{ bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15; },{},{}
+2179,TE_Woe_Shield,TE Woe Shield,4,0,,0,,25,,0,0x000444A2,63,2,32,,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,,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_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; },{},{}
+2182,Hervor_Alvitr,Hervor Alvitr,4,0,,3000,,150,,0,0x000FDF80,56,2,32,,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; },{},{}
@@ -1392,7 +1392,7 @@
 2188,Svalinn_J,Svalinn,4,10,,500,,80,,1,0xFFFFFFFF,63,2,32,,65,1,3,{ .@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5; },{},{}
 2189,Mad_Bunny,Mad Bunny Shield,4,10,,100,,40,,1,0xFFFFFFFF,63,2,32,,30,1,6,{ bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1; },{},{}
 2190,Ancient_Shield_Of_Aeon,Ancient Shield Of Aeon,4,0,,200,,5,,0,0x000FDF80,63,2,32,,130,1,2,{ bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5; },{},{}
-2195,Lian_Shield,Lian Shield,4,0,,1300,,50,,1,0xFFFFFFFF,63,2,32,1,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{}
+2195,Lian_Shield,Lian Shield,4,0,,1300,,50,,1,0xFFFFFFFF,63,2,32,,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{}
 2196,White_Gold_Shield,White Gold Shield,4,0,,1800,,140,,1,0xFFFFFFFF,63,2,32,,,1,,{ autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */ },{},{}
 2198,Lapine_Shield,Lapine Shield,4,0,,1000,,25,,1,0xFFFFFFFF,63,2,32,,100,1,,{ bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; } },{},{}
 // GM Shield
@@ -1698,9 +1698,9 @@
 2493,Goibne's_Combat_Boots_,Goibne's Greaves,4,30000,,700,,13,,1,0xFFFFFFFE,63,2,64,,54,1,0,{ bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5; },{},{}
 2494,Chrystal_Pumps_,Crystal Pumps,4,20,,100,,5,,1,0xFFFFFFFE,63,0,64,,0,1,0,{ bonus bMdef,10; bonus bLuk,5; },{},{}
 2495,Egir_Shoes,Egir Shoes,4,200000,,300,,13,,1,0xFFFFFFFF,63,2,64,,110,1,0,{ if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,BaseLevel*5; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,JobLevel*2; },{},{}
-2496,TE_Woe_Shoes,TE Woe Shoes,4,0,,0,,5,,0,0xFFFFFFFF,63,2,64,0,40,1,,{ bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
-2497,TE_Woe_Boots,TE Woe Boots,4,0,,0,,10,,0,0x000444A2,63,2,64,0,40,1,,{ bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
-2498,TE_Woe_Magic_Sandal,TE Woe Magic Sandal,4,0,,0,,5,,0,0x00818315,63,2,64,1,40,1,,{ bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
+2496,TE_Woe_Shoes,TE Woe Shoes,4,0,,0,,5,,0,0xFFFFFFFF,63,2,64,,40,1,,{ bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
+2497,TE_Woe_Boots,TE Woe Boots,4,0,,0,,10,,0,0x000444A2,63,2,64,,40,1,,{ bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
+2498,TE_Woe_Magic_Sandal,TE Woe Magic Sandal,4,0,,0,,5,,0,0x00818315,63,2,64,,40,1,,{ bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
 2499,Temporal_Boots,Temporal Boots,4,400,,600,,20,,0,0xFFFFFFFF,63,2,64,,10,1,,{ .@r = getrefine(); bonus bMaxHP,300; bonus bMaxSP,30; bonus bMaxHP,100*(.@r/3); bonus bMaxSP,10*(.@r/3); },{},{}
 //===================================================================
 // Garments
@@ -2137,15 +2137,15 @@
 2941,Gunslinger_Manual,Gunslinger Manual,4,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1; },{},{}
 2942,Taekwon_Manual,Taekwon Manual,4,0,,100,,0,,0,0x00000001,63,2,136,,0,0,0,{ bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5; },{},{}
 2943,Critical_Ring_,Critical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,,0,,{ bonus bCritical,5;},{},{}
-2944,TE_Ring_Of_Protection,TE Ring Of Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5; },{},{}
-2945,TE_Ring_Of_Rage,TE Ring Of Rage,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; },{},{}
-2946,TE_Ring_Of_Defiance,TE Ring Of Defiance,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,40,0,,{ bonus bMdef,5; bonus2 bSubRace,RC_Player,5; },{},{}
+2944,TE_Ring_Of_Protection,TE Ring Of Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5; },{},{}
+2945,TE_Ring_Of_Rage,TE Ring Of Rage,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; },{},{}
+2946,TE_Ring_Of_Defiance,TE Ring Of Defiance,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,40,0,,{ bonus bMdef,5; bonus2 bSubRace,RC_Player,5; },{},{}
 2948,Demon_Wing,Demon Wing,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,70,,,{ bonus bFlee,5; },{},{}
 2949,Silversmith_Bracelet,Silversmith Bracelet,4,10,,100,,3,,1,0xFFFFFFFF,63,2,136,,60,,,{ bonus bAllStats,1; bonus bMdef,3; skill "SA_SPELLBREAKER",5; },{},{}
-2950,Rune_Ring,Rune Ring,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus2 bExpAddClass,Class_Normal,10; },{},{}
-2951,Kvasir_Ring_Blue,Kvasir Ring Blue,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxSP,30; skill "ECL_SNOWFLIP",1; },{},{}
-2952,Kvasir_Ring_Red,Kvasir Ring Red,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxSP,30; skill "ECL_PEONYMAMY",1; },{},{}
-2953,Kvasir_Ring_Green,Kvasir Ring Green,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,1,1,0,,{ bonus bMaxHP,100; skill "ECL_SADAGUI",1; },{},{}
+2950,Rune_Ring,Rune Ring,4,0,,0,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bExpAddClass,Class_Normal,10; },{},{}
+2951,Kvasir_Ring_Blue,Kvasir Ring Blue,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxSP,30; skill "ECL_SNOWFLIP",1; },{},{}
+2952,Kvasir_Ring_Red,Kvasir Ring Red,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxSP,30; skill "ECL_PEONYMAMY",1; },{},{}
+2953,Kvasir_Ring_Green,Kvasir Ring Green,4,0,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxHP,100; skill "ECL_SADAGUI",1; },{},{}
 2954,Kvasir_Ring_Brown,Kvasir Ring Brown,4,10,,100,,,,0,0xFFFFFFFF,63,2,136,,1,,,{ bonus bMaxHP,100; },{},{}
 2956,Safety_Ring_,Advanced Safety Ring,4,75000,,100,,10,,1,0xFFFFFFFE,63,2,136,,50,0,0,{ bonus bMdef,5; bonus bAllStats,1; },{},{}
 2957,Good_Ring_Of_Flame_Lord,Advanced Ring Of Flame Lord,4,20,,100,,0,,0,0x7CCFDF80,63,2,136,,85,0,0,{ bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20; },{},{}
@@ -2178,7 +2178,7 @@
 2995,Supplement_Part_Dex,Supplement Part Dex,4,25000,,100,,0,,1,0x00000400,56,2,136,,100,0,0,{ bonus bUseSPrate,-10; bonus bDelayrate,-10; bonus bVariableCastrate,-10; bonus2 bSkillVariableCast,"NC_AXEBOOMERANG",-2000; },{},{}
 2996,Reinforced_Parts_Gun_Barrel,Reinforced Parts - Gun Barrel,4,10,,500,,,,1,0xFFFFFFFF,63,2,136,,100,,,{ bonus2 bAddClass,Class_All,4; bonus bHit,10; bonus2 bSkillAtk,"NC_BOOSTKNUCKLE",25; },{},{}
 2997,RWC_Gold_Brooch,RWC Gold Brooch,4,10,,200,,0,,1,0xFFFFFFFF,63,2,136,,0,0,,{ bonus bBaseAtk,25; bonus bMatk,20; },{},{}
-2998,Shining_Trapezohedron,Shining Trapezohedron,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,1,90,1,,{ bonus2 bSubEle,Ele_Holy,10; },{},{}
+2998,Shining_Trapezohedron,Shining Trapezohedron,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,90,1,,{ bonus2 bSubEle,Ele_Holy,10; },{},{}
 2999,RWC_Brooch,RWC Brooch,4,10,,200,,0,,0,0xFFFFFFFF,63,2,136,,0,0,,{ bonus bMaxHP,300; bonus bMaxSP,30; },{},{}
 //===================================================================
 // Cards
@@ -3118,6 +3118,12 @@
 4948,Skill_Delay1,After Skill Delay Lv1,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-2; },{},{}
 4949,Skill_Delay2,After Skill Delay Lv2,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-4; },{},{}
 4950,Skill_Delay3,After Skill Delay Lv3,6,10,,,,,,,,,,,,,,,{ bonus bDelayrate,-6; },{},{}
+4994,Rune_of_Strength_Lv_1,Rune of Strength Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,5; } if (.@r>=10) { bonus bAtkRate,5; } },{},{}
+4995,Rune_of_Strength_Lv_2,Rune of Strength Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,6; } if (.@r>=11) { bonus bStr,1; bonus bAtkRate,7; } },{},{}
+4996,Rune_of_Strength_Lv_3,Rune of Strength_Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bStr,7; } if (.@r>=12) { bonus bStr,1; bonus bAtkRate,8; } if (.@r>=13) { bonus bStr,1; bonus bAtkRate,2; } },{},{}
+4997,Rune_of_Agility_Lv_1,Rune of Agility Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,5; } if (.@r>=10) { bonus bFlee2,5; } },{},{}
+4998,Rune_of_Agility_Lv_2,Rune of Agility Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,6; } if (.@r>=11) { bonus bAgi,1; bonus bFlee2,7; } },{},{}
+4999,Rune_of_Agility_Lv_3,Rune of Agility Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bAgi,7; } if (.@r>=12) { bonus bAgi,1; bonus bFlee2,5; } if (.@r>=13) { bonus bAgi,1; bonus bFlee2,5; } },{},{}
 //===================================================================
 // More Headgears
 //===================================================================
@@ -4000,23 +4006,23 @@
 5894,RCC2013_3RD_CROWN,RCC2013 3RD CROWN,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1108,{ bonus bAllStats,3; skill "AL_TELEPORT",1; },{ sc_start SC_SPEEDUP0,-1,25; },{ sc_end SC_SPEEDUP0; }
 5895,RCC2013_ANV_Hat,RCC2013 ANV Hat,4,20,,2500,,7,,1,0xFFFFFFFF,63,2,256,,1,0,1109,{ bonus bAllStats,1; bonus2 bAddClass,Class_All,2; bonus bMatkRate,2; },{},{}
 5906,Oni_Horns_,Oni Horns,4,0,,20,,10,,1,0x00001000,63,2,256,,100,1,1127,{ bonus2 bSkillAtk,"GC_COUNTERSLASH",(10*getskilllv("GC_WEAPONBLOCKING")); .@r = getrefine(); if(.@r > 6){ bonus bAtk,20; bonus bHit,5; } if(.@r > 9){ bonus3 bAutoSpell,"GC_CROSSIMPACT",1,10; } },{},{}
-5914,C_Flutter_Butterfly,C Flutter Butterfly,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,1,1,0,1378,{ hateffect HAT_EF_FLUTTER_BUTTERFLY,true; },{},{ hateffect HAT_EF_FLUTTER_BUTTERFLY,false; }
-5917,Yellow_Scarf,Yellow Scarf,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,0,90,0,1170,{ bonus bLongAtkDef,3; },{},{}
+5914,C_Flutter_Butterfly,C Flutter Butterfly,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1378,{ hateffect HAT_EF_FLUTTER_BUTTERFLY,true; },{},{ hateffect HAT_EF_FLUTTER_BUTTERFLY,false; }
+5917,Yellow_Scarf,Yellow Scarf,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,,90,0,1170,{ bonus bLongAtkDef,3; },{},{}
 5918,Gambler_Seal,Gambler Seal,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,,,0,1202,{ bonus bCritical,3; bonus bCritAtkRate,3; bonus2 bSubSkill,"RA_ARROWSTORM",10; bonus2 bSubSkill,"SR_GATEOFHELL",10; .@dex = readparam(bDex); .@luk = readparam(bLuk); bonus bCritAtkRate,-(.@dex/10)*2; bonus bCritical,.@luk/10; bonus bBaseAtk,(.@luk/10)*2; bonus bMatk,(.@luk/10)*2; if (.@luk > 120) { bonus bCritical,10; bonus bCritAtkRate,10; bonus2 bSubSkill,"RA_ARROWSTORM",30; bonus2 bSubSkill,"SR_GATEOFHELL",30; } else if (.@luk > 108) { bonus bCritical,5; bonus bCritAtkRate,10; } },{},{}
-5919,Camellia_Hair_Pin,Camellia Hair Pin,4,0,,1000,,,,1,0xFFFFFFFF,63,2,256,0,50,1,1203,{ bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/ },{},{}
+5919,Camellia_Hair_Pin,Camellia Hair Pin,4,0,,1000,,,,1,0xFFFFFFFF,63,2,256,,50,1,1203,{ bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/ },{},{}
 5920,Medical_Boots,Medical Boots,4,0,,300,,10,,0,0xFFFFFFFF,63,2,64,,10,1,,{ .@r = getrefine(); bonus bHealPower,10+((.@r/2) * 2); bonus2 bSkillUseSP,"AB_CHEAL",(.@r * 5); },{},{}
-5943,Owlviscount_Silk_Hat,Owl Viscount Silk Hat,4,0,,500,,15,,1,0xFFFFFFFF,63,2,256,0,70,1,1323,{ bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }"; },{},{}
-5966,KarduiEar,KarduiEar,4,0,,300,,,,0,0xFFFFFFFF,63,2,512,0,70,0,1357,{ .@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; } },{},{}
-5967,Flying Galapago,Flying Galapago,4,0,,500,,,,0,0xFFFFFFFF,63,2,1,0,110,0,1358,{ bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40; },{},{}
-5968,DVAngelNurseCap,DVAngelNurseCap,4,0,,500,,10,,1,0xFFFFFFFF,63,2,256,0,50,1,1359,{ if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0)); },{},{}
-5969,QueenAnzRevenge,QueenAnzRevenge,4,0,,400,,7,,1,0xFFFFFFFF,63,2,256,0,100,1,1360,{ bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1; },{},{}
-5971,Moon_Eyepatch,Moon Eyepatch,4,0,,100,,,,1,0xFFFFFFFF,63,2,512,0,10,0,1370,{ bonus2 bSubEle,Ele_Water,5; },{},{}
-5972,Chatty_Parrot,Chatty Parrot,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,0,80,0,1116,{ bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30; },{},{}
-5973,Ancient_Elven_Ear_J,Ancient Elven Ear J,4,0,,200,,,,0,0xFFFFFFFF,63,2,512,0,70,0,665,{ bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2; },{},{}
-5978,Syringe_Toy,Toy Syringe,4,0,,100,,3,,0,0xFFFFFFFF,63,2,1,1,70,0,842,{ bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150; },{},{}
-5979,C_Angel_Fluttering,C Angel Fluttering,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,0,1,0,1380,{ hateffect HAT_EF_ANGEL_FLUTTERING,true; },{},{ hateffect HAT_EF_ANGEL_FLUTTERING,false; }
-5980,C_Classical_Fhat,C Classical Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,0,1,0,1381,{},{},{}
-5985,Noble_Mask,Noble Mask,4,0,,200,,,,0,0xFFFFFFFF,63,2,256,0,30,0,1409,{ bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; } },{},{}
+5943,Owlviscount_Silk_Hat,Owl Viscount Silk Hat,4,0,,500,,15,,1,0xFFFFFFFF,63,2,256,,70,1,1323,{ bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }"; },{},{}
+5966,KarduiEar,KarduiEar,4,0,,300,,,,0,0xFFFFFFFF,63,2,512,,70,0,1357,{ .@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; } },{},{}
+5967,Flying Galapago,Flying Galapago,4,0,,500,,,,0,0xFFFFFFFF,63,2,1,,110,0,1358,{ bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40; },{},{}
+5968,DVAngelNurseCap,DVAngelNurseCap,4,0,,500,,10,,1,0xFFFFFFFF,63,2,256,,50,1,1359,{ if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0)); },{},{}
+5969,QueenAnzRevenge,QueenAnzRevenge,4,0,,400,,7,,1,0xFFFFFFFF,63,2,256,,100,1,1360,{ bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1; },{},{}
+5971,Moon_Eyepatch,Moon Eyepatch,4,0,,100,,,,1,0xFFFFFFFF,63,2,512,,10,0,1370,{ bonus2 bSubEle,Ele_Water,5; },{},{}
+5972,Chatty_Parrot,Chatty Parrot,4,0,,100,,,,0,0xFFFFFFFF,63,2,1,,80,0,1116,{ bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30; },{},{}
+5973,Ancient_Elven_Ear_J,Ancient Elven Ear J,4,0,,200,,,,0,0xFFFFFFFF,63,2,512,,70,0,665,{ bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2; },{},{}
+5978,Syringe_Toy,Toy Syringe,4,0,,100,,3,,0,0xFFFFFFFF,63,2,1,,70,0,842,{ bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150; },{},{}
+5979,C_Angel_Fluttering,C Angel Fluttering,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1380,{ hateffect HAT_EF_ANGEL_FLUTTERING,true; },{},{ hateffect HAT_EF_ANGEL_FLUTTERING,false; }
+5980,C_Classical_Fhat,C Classical Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,0,1381,{},{},{}
+5985,Noble_Mask,Noble Mask,4,0,,200,,,,0,0xFFFFFFFF,63,2,256,,30,0,1409,{ bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; } },{},{}
 //===================================================================
 // More Etc Items
 //===================================================================
@@ -4839,7 +4845,8 @@
 6915,Captured_Soul,Captured Soul,3,10,,0,,,,,,,,,,,,,{},{},{}
 6916,Piece_Of_Soul_Monkey,Piece Of Soul Monkey,3,10,,0,,,,,,,,,,,,,{},{},{}
 6917,Piece_Of_Soul_Chicken,Piece Of Soul Chicken,3,10,,0,,,,,,,,,,,,,{},{},{}
-6919,Honor_Proof,Honor Proof,3,10,,10,,,,,,,,,,,,,{},{},{}
+6919,Honor_Proof,Honor Token,3,10,,10,,,,,,,,,,,,,{},{},{}
+6920,Rune_Magic_Powder,Rune Magic Powder,3,10,,10,,,,,,,,,,,,,{},{},{}
 6921,Dehumidifiers,Dehumidifiers,3,10,,10,,,,,,,,,,,,,{},{},{}
 6922,Sandpaper,Sandpaper,3,10,,10,,,,,,,,,,,,,{},{},{}
 6923,Bright_Fire_Lights,Bright Fire Lights,3,10,,10,,,,,,,,,,,,,{},{},{}
@@ -6850,26 +6857,26 @@
 //===================================================================
 // Guillotine Cross Poisons
 //===================================================================
-12717,Poison_Paralysis,Paralyze,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_PARALYSE,300000,0,10,2; },{},{}
-12718,Poison_Leech,Leech End,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_LEECHESEND,300000,0,10,2; },{},{}
-12719,Poison_Oblivion,Oblivion Curse,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_OBLIVIONCURSE,300000,0,10,2; },{},{}
-12720,Poison_Disheart,Disheart,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_DEATHHURT,300000,0,10,2; },{},{}
-12721,Poison_Numb,Toxin,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_TOXIN,300000,0,10,2; },{},{}
-12722,Poison_Fever,Pyrexia,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_PYREXIA,300000,0,10,2; },{},{}
-12723,Poison_Laughing,Magic Mushroom,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_MAGICMUSHROOM,300000,0,10,2; },{},{}
-12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_VENOMBLEED,15000,0,10,2; },{},{}
+12717,Poison_Paralysis,Paralyze,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12718,Poison_Leech,Leech End,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12719,Poison_Oblivion,Oblivion Curse,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12720,Poison_Disheart,Disheart,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12721,Poison_Numb,Toxin,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12722,Poison_Fever,Pyrexia,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12723,Poison_Laughing,Magic Mushroom,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
+12724,Poison_Fatigue,Venom Bleed,2,2,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{}
 //===================================================================
 // Rune Knight's Rune Stones
 //===================================================================
-12725,Runstone_Nosiege,Nauthiz Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_REFRESH",1; },{},{}
-12726,Runstone_Rhydo,Raido Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_CRUSHSTRIKE",1; },{},{}
-12727,Runstone_Verkana,Berkana Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_MILLENNIUMSHIELD",1; },{},{}
-12728,Runstone_Isia,Isa Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_VITALITYACTIVATION",1; },{},{}
-12729,Runstone_Asir,Othila Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_FIGHTINGSPIRIT",1; },{},{}
-12730,Runstone_Urj,Uruz Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_ABUNDANCE",1; },{},{}
-12731,Runstone_Turisus,Thurisaz Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_GIANTGROWTH",1; },{},{}
-12732,Runstone_Pertz,Wyrd Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_STORMBLAST",1; },{},{}
-12733,Runstone_Hagalas,Hagalaz Rune,11,100,,100,,,,,0xFFFFFFFF,56,2,,,,,,{ itemskill "RK_STONEHARDSKIN",1; },{},{}
+12725,Runstone_Nosiege,Nauthiz Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_REFRESH",1; },{},{}
+12726,Runstone_Rhydo,Raido Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_CRUSHSTRIKE",1; },{},{}
+12727,Runstone_Verkana,Berkana Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_MILLENNIUMSHIELD",1; },{},{}
+12728,Runstone_Isia,Isa Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_VITALITYACTIVATION",1; },{},{}
+12729,Runstone_Asir,Othila Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_FIGHTINGSPIRIT",1; },{},{}
+12730,Runstone_Urj,Uruz Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_ABUNDANCE",1; },{},{}
+12731,Runstone_Turisus,Thurisaz Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_GIANTGROWTH",1; },{},{}
+12732,Runstone_Pertz,Wyrd Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STORMBLAST",1; },{},{}
+12733,Runstone_Hagalas,Hagalaz Rune,2,100,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STONEHARDSKIN",1; },{},{}
 //===================================================================
 // Rune Knight Rune Ores
 //===================================================================
@@ -8598,11 +8605,11 @@
 15059,2011Love_Daddy,2011Love Daddy,4,20,,100,0,80,0,1,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{}
 15060,Sky_Blue_Smock,Sky Blue Smock,4,20,,300,0,1,0,1,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{}
 15061,Egir_Armor,Egir Armor,4,200000,,2600,,55,,1,0xFFFFFFFF,63,2,16,,110,1,0,{ bonus bAllStats,1; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000; },{},{}
-15062,TE_Woe_Coat,TE Woe Coat,4,0,,0,,15,,0,0xFFFFFFFF,63,2,16,0,40,1,,{ bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
-15063,TE_Woe_Chain_Mail,TE Woe Chain Mail,4,0,,0,,25,,0,0x000444A2,63,2,16,0,40,1,,{ bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25; },{},{}
-15064,TE_Woe_Mage_Coat,TE Woe Mage Coat,4,0,,0,,5,,0,0x00818315,63,2,16,0,40,1,,{ bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
+15062,TE_Woe_Coat,TE Woe Coat,4,0,,0,,15,,0,0xFFFFFFFF,63,2,16,,40,1,,{ bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
+15063,TE_Woe_Chain_Mail,TE Woe Chain Mail,4,0,,0,,25,,0,0x000444A2,63,2,16,,40,1,,{ bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25; },{},{}
+15064,TE_Woe_Mage_Coat,TE Woe Mage Coat,4,0,,0,,5,,0,0x00818315,63,2,16,,40,1,,{ bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
 15066,Engraved_Plate_Armor,Engraved Plate Armor,4,100000,,3000,,120,,1,0x00004082,63,2,16,,150,1,,{ bonus bMdef,25; },{},{}
-15067,Rune_Suit,Rune Suit,4,0,,0,,,,0,0xFFFFFFFF,63,2,16,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
+15067,Rune_Suit,Rune Suit,4,0,,0,,,,0,0xFFFFFFFF,63,2,16,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
 15068,Im_Angel's_Protection,Advanced Angelic Protection,4,10000,,600,,40,,1,0x00000001,63,2,16,,99,1,0,{ bonus bMdef,30; },{},{}
 15069,Suit_Of_Sid,Suit Of Sid,4,20,,1000,,30,,0,0xFFFFFFFF,63,2,16,,0,1,0,{},{},{}
 15070,Clothes_of_Happiness,Clothes of Happiness,4,10,,1000,,5,,1,0xFFFFFFFF,63,2,16,,1,1,,{ bonus bMdef,5; bonus bLuk,getrefine(); },{},{}
@@ -9503,7 +9510,7 @@
 18562,Bone_Hat,Bone Hat,4,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,10,1,732,{ bonus bMdef,3; },{},{}
 18563,Heart_Wing_Hairband,Heart Wing Hairband,4,20,,300,,0,,1,0xFFFFFFFF,63,2,256,,50,1,733,{ bonus bUseSPrate,-10; bonus bDelayrate,-5; .@r = getrefine()/3; if(.@r>0){ bonus bUseSPrate,.@r*3; bonus bDelayrate,.@r*3; } },{},{}
 18564,Love_Piece,Love Piece,4,20,,200,,0,,0,0xFFFFFFFF,63,2,1,,50,0,734,{ bonus bNoCastCancel,1; bonus bUseSPrate,15; },{},{}
-18565,Leprechaun_Hat,Leprechaun Hat,4,20,,300,,8,,1,0xFFFFFFFF,63,2,256,,40,0,735,{ bonus bStr,1; bonus bInt,1; bonus bMdef,4; if(getrefine()>6){ bonus2 bAddMonsterDropItem,12135,50; } },{},{}
+18565,Leprechaun_Hat,St Patrick's Hat,4,20,,300,,8,,1,0xFFFFFFFF,63,2,256,,40,1,735,{ bonus bStr,1; bonus bInt,1; bonus bMdef,4; if(getrefine()>6){ bonus2 bAddMonsterDropItem,12135,50; } },{},{}
 18566,Nut_Donut_In_Mouth,Nut Donut In Mouth,4,20,,0,,1,,0,0xFFFFFFFF,63,2,1,,0,0,736,{ bonus bBaseAtk,5; bonus bMatk,5; },{},{}
 18567,Stretched_Nose,Stretched Nose,4,20,,100,,0,,0,0xFFFFFFFF,63,2,1,,0,0,737,{},{},{}
 18568,Humming_Bird,Humming Bird,4,20,,100,,3,,0,0xFFFFFFFF,63,2,256,,10,0,702,{ bonus bMdef,6; },{},{}
@@ -9659,10 +9666,10 @@
 18728,Egir_Helm,Egir Helm,4,200000,,800,,10,,1,0xFFFFFFFF,63,2,256,,110,1,870,{ bonus bMdef,5; bonus bUnbreakableHelm,1; },{},{}
 18729,MVP_Basketball,MVP Basketball,4,20,,150,,6,,1,0xFFFFFFFF,63,2,256,,1,1,871,{ bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; bonus2 bAddItemHealRate,522,30; .@r = getrefine(); bonus bVariableCastrate,(.@r>=12)?(-5):((.@r>=10)?(-4):(-3)); },{},{}
 18730,Cryptura_Academy_Hat,Cryptura Academy Hat,4,0,,200,,2,,1,0xFFFFFFFF,63,2,256,,0,1,872,{ bonus bMaxHP,15; bonus bMaxSP,5; },{},{}
-18732,TE_Woe_Cap,TE Woe Cap,4,0,,0,,5,,0,0xFFFFFFFF,63,2,256,0,40,1,14,{ bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
-18733,TE_Woe_Bone_Helm,TE Woe Bone Helm,4,0,,0,,10,,0,0x000444A2,63,2,256,0,40,1,103,{ bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{}
-18734,TE_Woe_Magic_Eyes,TE Woe Magic Eyes,4,0,,0,,5,,0,0x00818315,63,2,256,0,40,1,209,{ bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{}
-18736,Censor_Bar_,Censor Bar,4,0,,100,,,,0,0xFFFFFFFF,63,2,512,0,1,0,229,{},{},{}
+18732,TE_Woe_Cap,TE Woe Cap,4,0,,0,,5,,0,0xFFFFFFFF,63,2,256,,40,1,14,{ bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
+18733,TE_Woe_Bone_Helm,TE Woe Bone Helm,4,0,,0,,10,,0,0x000444A2,63,2,256,,40,1,103,{ bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{}
+18734,TE_Woe_Magic_Eyes,TE Woe Magic Eyes,4,0,,0,,5,,0,0x00818315,63,2,256,,40,1,209,{ bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25; },{},{}
+18736,Censor_Bar_,Censor Bar,4,0,,100,,,,0,0xFFFFFFFF,63,2,512,,1,0,229,{},{},{}
 18737,Fortier_Mask,Fortier Masque,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,10,0,876,{ bonus bUnbreakableHelm,1; bonus2 bMagicAtkEle,Ele_Fire,4; },{},{}
 18739,Carnation_Hairband,Carnation Hairband,4,20,,100,,0,,0,0xFFFFFFFF,63,2,256,,0,1,878,{ bonus bLuk,1; },{},{}
 18740,Hair_Of_The_Strong,RMSC2012 Special Costume,4,20,,0,,0,,0,0xFFFFFFFF,63,2,1024,,0,0,879,{},{},{}
@@ -9679,7 +9686,7 @@
 18752,Cursed_Book,Cursed Book,4,20,,300,,3,,1,0xFFFFFFFE,63,2,256,,99,1,890,{ .@r = getrefine(); bonus2 bHPLossRate,.@r,5000; bonus2 bHPDrainRate,40,4+(.@r/2); bonus2 bSPDrainRate,10,1+(.@r/3); },{},{}
 18753,Tw_Rice_Ball,Tw Rice Ball,4,20,,100,,6,,0,0xFFFFFFFF,63,2,256,,0,0,892,{ bonus bLuk,1; bonus2 bAddMonsterDropItem,564,100; },{},{}
 18754,Blood_Sucker,Blood Sucker,4,20,,300,,0,,0,0xFFFFFFFF,63,2,1,,40,0,893,{ bonus bUnbreakableHelm,1; bonus2 bHPDrainRate,30,5; bonus bHPrecovRate,-100; bonus bSPrecovRate,-100; },{},{}
-18755,Feather_Beret_,Feather Beret,4,0,,600,,1,,1,0xFFFFFFFF,63,2,256,0,1,1,224,{ bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; },{},{}
+18755,Feather_Beret_,Feather Beret,4,0,,600,,1,,1,0xFFFFFFFF,63,2,256,,1,1,224,{ bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; },{},{}
 18756,Black_Shiba_Inu_Hat,Black Shiba Inu Hat,4,20,,400,,6,,1,0xFFFFFFFF,63,2,256,,50,1,894,{ bonus bBaseAtk,30; bonus2 bAddRace,RC_Brute,10; },{},{}
 18758,Hat_Of_Scrat,Hat Of Scrat,4,20,,200,,3,,1,0xFFFFFFFF,63,2,256,,0,1,896,{},{},{}
 18759,Stretched_Nose_M,Wood Goblin's Nose,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,50,0,737,{ bonus bUnbreakableHelm,1; bonus2 bAddMonsterDropItem,1032,400; bonus2 bAddMonsterDropItem,1033,100; bonus3 bAddMonsterDropItem,576,RC_Plant,40; },{},{}
@@ -9759,7 +9766,7 @@
 18863,Exorcist_Robe,Exorcist Robe,4,10,,1700,,57,,1,0xFFFFFFFF,63,2,16,,60,1,,{ bonus bMdef,5; .@r = getrefine(); if (.@r >= 3) { bonus2 bAddRace,RC_Undead,.@r/3*5; } if (BaseClass==Job_Acolyte) bonus2 bAddRace,RC_Undead,10; },{},{}
 18864,Earth_Goddess_Flower,Earth Goddess Flower,4,10,,250,,6,,0,0xFFFFFFFF,63,2,256,,1,1,864,{ bonus2 bAddEle,Ele_Earth,15; skill "WZ_EARTHSPIKE",5; },{},{}
 18865,Sword_Master_Crown,Sword Master Crown,4,10,,1000,,30,,1,0xFFFFFFFF,63,2,256,,50,1,981,{ .@i = BaseLevel; bonus bBaseAtk,(.@i>150)?(15):((.@i>100)?(10):((.@i>50)?(5):(0))); if(getskilllv("SM_SWORD")==10) bonus bHit,10; if(getskilllv("SM_TWOHAND")==10) bonus bUseSPrate,-5; if(getskilllv("AM_AXEMASTERY")==10) bonus bVariableCastrate,-5; if(getskilllv("AS_KATAR")==10) bonus bCritAtkRate,20; if(getskilllv("PR_MACEMASTERY")==10) bonus bAspdRate,10; },{},{}
-18867,Vajra,Vajra,4,0,,300,,,,0,0xFFFFFFFF,63,2,1,0,48,0,983,{ bonus bDex,1; bonus bLongAtkRate,2; },{},{}
+18867,Vajra,Vajra,4,0,,300,,,,0,0xFFFFFFFF,63,2,1,,48,0,983,{ bonus bDex,1; bonus bLongAtkRate,2; },{},{}
 18868,Assassin_Skull_Mask,Assassin Skull Mask,4,10,,500,,2,,0,0xFFFFFFFF,63,2,513,,70,,984,{ bonus bCritical,5; },{},{}
 18870,Very_Sweet_Candy_Bar,Very Sweet Candy Bar,4,10,,10,,,,0,0xFFFFFFFF,63,2,1,,1,1,446,{ bonus bAllStats,2; bonus bBaseAtk,10; bonus bMatk,10; bonus2 bExpAddClass,Class_All,2; },{},{}
 18871,Very_Sweet_Candy,Very Sweet Candy,4,10,,10,,,,0,0xFFFFFFFF,63,2,1,,1,1,446,{ bonus bAllStats,1; bonus bBaseAtk,5; bonus bMatk,5; },{},{}
@@ -9828,7 +9835,7 @@
 19020,Survive_Circlet,Survive Circlet,4,0,,500,,10,,0,0xFFFFFFFF,63,2,256,,,1,1220,{ .@r = getrefine(); bonus bInt,(3 + (.@r/2)+ (BaseLevel > 130 ? .@r : 0)); bonus bMatkRate,4; },{},{}
 19021,Gigant_Helm,Gigant Helm,4,0,,500,,10,,0,0xFFFFFFFF,63,2,256,,,1,1221,{ bonus bStr,3+((BaseLevel > 130) ? getrefine() : 0); bonus2 bAddClass,Class_All,4; },{},{}
 19022,Floating_Stone_Of_Intelligence,Floating Stone Of Intelligence,4,,,,,,,,0xFFFFFFFF,63,2,256,,,,1230,{},{ sc_start SC_FSTONE,-1,0; },{ sc_end SC_FSTONE; } // jRO Item
-19024,Protect_Feathers,Protect Feathers,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,0,70,0,1232,{ bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; } },{},{}
+19024,Protect_Feathers,Protect Feathers,4,0,,500,,,,0,0xFFFFFFFF,63,2,512,,70,0,1232,{ bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; } },{},{}
 19026,Aegir_Helm,Aegir Helm,4,10,,800,,10,,1,0xFFFFFFFF,63,2,256,,40,1,870,{ bonus bVit,3; },{},{}
 19030,Pretty_Rabbit_Hood,Pretty Rabbit Hood,4,10,,100,,20,,1,0xFFFFFFFF,63,2,769,,1,1,1085,{ bonus bMaxHP,(15*BaseLevel); },{},{}
 19031,Fallen_Angel_Blessing,Fallen Angel Blessing,4,0,,200,,1,,0,0xFFFFFFFF,63,2,512,,,1,1250,{ bonus2 bAddRace,RC_Angel,5; bonus2 bSubRace,RC_Angel,5; },{},{}
@@ -9840,7 +9847,7 @@
 19051,Warrior_Moon_Cat,Warrior Moon Cat,4,20,,100,,5,,1,0xFFFFFFFF,63,2,256,,1,1,1308,{ /*Enables use of Level 1 Monster's Cry*/ bonus bAllStats,3; bonus2 bHPDrainRate,40,5; bonus2 bSPDrainRate,10,2; },{},{}
 19052,Sigruns_Wing,Rental Sigrun's Wing,4,10,,0,,2,,0,0xFFFFFFFF,63,2,512,,1,0,568,{ if (Class == Job_Swordman || Class == Job_Thief || Class == Job_Merchant || Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) bonus bAspd,1; else if (Class == Job_Mage || Class == Job_Acolyte || Class == Job_Ninja || Class == Job_Soul_Linker) { bonus bMatk,5; bonus bHealPower,2; } else if (Class == Job_Archer || Class == Job_Gunslinger) bonus bLongAtkRate,2; else if (Class == Job_Novice || Class == Job_SuperNovice) { bonus bMaxHP,120; bonus bMaxSP,60; } },{},{}
 19053,Fighter_Moon_Cat,Fighter Moon Cat,4,20,,100,,5,,1,0xFFFFFFFF,63,2,256,,1,1,1308,{ /*Enables use of Level 1 Monster's Cry*/ .@r = getrefine(); bonus bAllStats,3; bonus2 bAddEff,Eff_Stun,500+(.@r*100); },{},{}
-19082,Bio_Protector,Bio Protector,4,0,,500,,3,,0,0xFFFFFFFF,63,2,512,1,50,1,1366,{ bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5; },{},{}
+19082,Bio_Protector,Bio Protector,4,0,,500,,3,,0,0xFFFFFFFF,63,2,512,,50,1,1366,{ bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5; },{},{}
 19083,Mask_of_Hero,Mask of Hero,4,20,,200,,0,,0,0xFFFFFFFF,63,2,512,,70,0,1367,{ bonus bVit,10; bonus bMdef,10; bonus bShortWeaponDamageReturn,1; },{},{}
 19084,Parfaille_Vigilante_Hat,Parfaille Vigilante Hat,4,0,,100,,2,,0,0x80000000,63,2,256,,20,1,1368,{ bonus bLuk,1; bonus3 bAutoSpell,"AL_BLESSING",3,100; },{},{}
 19085,Sigrun's_Wings_,Sigrun's Wings,4,20,,100,,2,,1,0xFFFFFFFF,63,2,512,,1,0,568,{ if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief||(BaseJob==Job_Taekwon&&Class!=Job_Soul_Linker)) { bonus bAspd,1; bonus bAgi,-2; } else if(BaseClass==Job_Mage||BaseClass==Job_Acolyte||Class==Job_Ninja||Class==Job_Soul_Linker){ bonus bMatk,3; bonus bHealPower,2; } else if(BaseClass==Job_Archer||BaseClass==Job_Gunslinger) bonus bLongAtkRate,1; else if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) { bonus bMaxHP,60; bonus bMaxSP,30; } },{},{}
@@ -9854,9 +9861,9 @@
 19093,Spinning_Eyes_,Geek Glasses,4,20000,,100,,1,,1,0xFFFFFFFF,63,2,512,,0,0,27,{ bonus2 bResEff,Eff_Blind,800; },{},{}
 19094,Mr_Smile_,Mr. Smile,4,60,,100,,1,,1,0xFFFFFFFF,63,2,513,,0,0,65,{},{},{}
 19095,Happy_Balloon,Happy Balloon,4,0,,10,,0,,0,0xFFFFFFFF,63,2,1,,1,0,1289,{ bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5; },{},{}
-19109,Valhalla_Idol,Valhalla Idol,4,0,,300,,2,,0,0xFFFFFFFF,63,2,512,0,70,0,1423,{ bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50; },{},{}
-19111,Laser_Of_Eagle,Laser of Eagle,4,0,,400,,5,,1,0xFFFFFFFF,63,2,256,0,100,1,1424,{ bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/ },{},{}
-19116,Red_Baby_Dragon,Red Baby Dragon,4,0,,700,,,1,1,0xFFFFFFFF,63,2,256,0,90,1,1463,{ .@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } },{},{}
+19109,Valhalla_Idol,Valhalla Idol,4,0,,300,,2,,0,0xFFFFFFFF,63,2,512,,70,0,1423,{ bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50; },{},{}
+19111,Laser_Of_Eagle,Laser of Eagle,4,0,,400,,5,,1,0xFFFFFFFF,63,2,256,,100,1,1424,{ bonus bDex,2; bonus bLongAtkRate,10; bonus5 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG,1; /*TODO: Chance to transform become Shechil while attacking.*/ },{},{}
+19116,Red_Baby_Dragon,Red Baby Dragon,4,0,,700,,,1,1,0xFFFFFFFF,63,2,256,,90,1,1463,{ .@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } },{},{}
 19117,Poring_Sunglasses,Poring Sunglasses,4,0,,10,,0,,0,0xFFFFFFFF,63,2,512,,1,0,954,{ bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5; },{},{}
 19118,Poring_Sunglasses_,Poring Sunglasses,4,0,,10,,0,,1,0xFFFFFFFF,63,2,512,,1,0,954,{ bonus2 bDropAddRace,RC_All,4; bonus2 bExpAddRace,RC_All,4; },{},{}
 19126,Shadow_Booster_,Magical Booster,4,10,,300,,,,1,0xFFFFFFFF,63,2,512,,1,1,873,{ bonus bAspd,1; bonus bDelayrate,-1; },{},{}
@@ -10389,7 +10396,7 @@
 20096,C_Blue_Ribbon,Costume Blue Ribbon,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,441,{},{},{}
 20097,C_White_Ribbon,Costume White Ribbon,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,442,{},{},{}
 20098,C_Vampire_Hairband,Costume Vampire Hairband,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1238,{},{},{}
-20099,C_Ljosalfar,Flying Ljosalfar,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1239,{},{ sc_start SC_LJOSALFAR,-1,0; },{ sc_end SC_LJOSALFAR; }
+20099,C_Ljosalfar,Flying Ljosalfar,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1239,{},{ sc_start SC_LJOSALFAR,-1,0; },{ sc_end SC_LJOSALFAR; }
 20100,C_Volume_Fhat,Costume Volume Fhat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1240,{},{},{}
 20101,C_Bragi_Wing_Ears,Costume Bragi Wing Ears,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1241,{},{},{}
 20102,C_Horse_King_J,Costume Horse King J,4,0,,0,,,,0,0xFFFFFFFF,63,2,7168,,1,1,1189,{},{},{}
@@ -10405,9 +10412,9 @@
 20112,C_Aqua_Ten_Gallon_Hat,Costume Aqua Ten Gallon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1256,{},{},{}
 20113,C_Star_Reading_Hat,Costume Star Reading Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1253,{},{},{}
 20114,C_Funeral_Hat,Costume Funeral Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,77,{},{},{}
-20115,C_Under_Rim_Glasses,Under Rim Glasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1255,{},{},{}
-20116,C_Mermaid_Headphone,Mermaid Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1254,{},{},{}
-20117,C_Raspberry_Mousse_Hat,Raspberry Mousse Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1257,{},{},{}
+20115,C_Under_Rim_Glasses,Under Rim Glasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1255,{},{},{}
+20116,C_Mermaid_Headphone,Mermaid Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1254,{},{},{}
+20117,C_Raspberry_Mousse_Hat,Raspberry Mousse Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1257,{},{},{}
 20118,C_Cake_Hat,Costume Cake Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,109,{},{},{}
 20119,C_Beanie,Costume Beanie,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,160,{},{},{}
 20120,C_Aerial,Costume Aerial,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,97,{},{},{}
@@ -10508,9 +10515,9 @@
 20215,C_Black_Devil_Mask,Costume Black Devil Mask,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,760,{},{},{}
 20216,C_Rideword_Hat,Costume Rideword Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,890,{},{},{}
 20217,C_Arabian_Veil,Costume Arabian Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1300,{},{},{}
-20218,C_Spell_Circuit,Costume Spell Circuit,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1301,{},{},{}
+20218,C_Spell_Circuit,Costume Spell Circuit,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1301,{},{},{}
 20219,C_Angel_Marcher_Hat,Costume Angel Marcher Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1302,{},{},{}
-20220,C_Dark_Night_Veil,Costume Dark Night Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,3072,1,1,1,1303,{},{},{}
+20220,C_Dark_Night_Veil,Costume Dark Night Veil,4,0,,0,,,,0,0xFFFFFFFF,63,2,3072,,1,1,1303,{},{},{}
 20221,C_Eyes_Of_Ifrit,C Eyes Of Ifrit,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,886,{},{},{}
 20222,C_Blue_Pigtail_Santa_Hat,Costume Blue Pigtail Santa Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,,1,395,{},{},{}
 20223,C_Romantic_Leaf,Costume Romantic Leaf,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,57,{},{},{}
@@ -10594,8 +10601,8 @@
 20312,C_Barons_Evil_Eye,Costume Baron's Evil Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,989,{},{},{}
 20313,C_CD_in_Mouth,Costume CD in Mouth,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,815,{},{},{}
 20314,C_New_Wave_Sunglasses,Costume New Wave Sunglasses,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,856,{},{},{}
-20315,C_Analyze_Eye,Costume Analyze Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,1,1,1,1351,{},{},{}
-20316,C_Seraph_Wing_Helm,Costume Seraph Wing Helm,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1352,{},{},{}
+20315,C_Analyze_Eye,Costume Analyze Eye,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1351,{},{},{}
+20316,C_Seraph_Wing_Helm,Costume Seraph Wing Helm,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1352,{},{},{}
 20317,C_Nekomimi_Cyber_Headphone,Costume Nekomimi Cyber Headphone,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1353,{},{},{}
 20318,C_Charleston_Antenna,Costume Charleston Antenna,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1354,{},{},{}
 20319,C_Crimson_Booster,Costume Crimson Booster,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1355,{},{},{}
@@ -10603,8 +10610,8 @@
 20321,C_Pterios_Fins,Costume Pterios Fins,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1009,{},{},{}
 20322,C_Seal_Hat,Costume Seal Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,540,{},{},{}
 20323,C_Sparkling_Sound,Costume Sparkling Sound,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1074,{},{},{}
-20324,C_Pigeon_Hat,Costume Pigeon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,1,1,1,1362,{},{},{}
-20325,C_Little_Aquarium,Costume Little Aquarium,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,1,1,1,1363,{},{},{}
+20324,C_Pigeon_Hat,Costume Pigeon Hat,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1362,{},{},{}
+20325,C_Little_Aquarium,Costume Little Aquarium,4,0,,0,,,,0,0xFFFFFFFF,63,2,2048,,1,1,1363,{},{},{}
 20326,C_Sailor_Collar,Costume Sailor Collar,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1364,{},{},{}
 20327,C_Marine_Cap,Costume Marine Cap,4,0,,0,,,,0,0xFFFFFFFF,63,2,1024,,1,1,1365,{},{},{}
 20328,C_Mackerel_Pike,Costume Mackerel Pike,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,1,1081,{},{},{}
@@ -10746,12 +10753,12 @@
 20510,C_SwordWing,Costume Sword Wing,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,19,{},{},{}
 20600,Fantastic_Aura,Fantastic Aura,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,0,{ /*TODO: View ID*/ bonus bUnbreakableHelm,1; },{},{}
 20700,Egir_Manteau,Egir Manteau,4,200000,,300,,10,,1,0xFFFFFFFF,63,2,4,,110,1,0,{ bonus bUnbreakableGarment,1; .@r = getrefine(); if (.@r > 10) .@r = 10; if (BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte) { bonus bFlee2,5+(.@r*2); } else if (BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief) { bonus bShortWeaponDamageReturn,5+(.@r*2); } },{},{}
-20702,TE_Woe_Muffler,TE Woe Muffler,4,0,,0,,5,,0,0xFFFFFFFF,63,2,4,1,40,1,,{ bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
-20703,TE_Woe_Manteau,TE Woe Manteau,4,0,,0,,10,,0,0x000444A2,63,2,4,1,40,1,,{ bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
-20704,TE_Woe_Magic_Manteau,TE Woe Magic Manteau,4,0,,0,,5,,0,0x00818315,63,2,4,1,40,1,,{ bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
+20702,TE_Woe_Muffler,TE Woe Muffler,4,0,,0,,5,,0,0xFFFFFFFF,63,2,4,,40,1,,{ bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25; },{},{}
+20703,TE_Woe_Manteau,TE Woe Manteau,4,0,,0,,10,,0,0x000444A2,63,2,4,,40,1,,{ bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
+20704,TE_Woe_Magic_Manteau,TE Woe Magic Manteau,4,0,,0,,5,,0,0x00818315,63,2,4,,40,1,,{ bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25; },{},{}
 20706,Amistr_Bag,Amistr Bag,4,10,,500,,18,,0,0xFFFFFFFF,63,2,4,,1,,4,{ bonus bAllStats,1; bonus2 bSubEle,Ele_All,5; },{},{}
 20707,Kirin_Wing,Kirin Wing,4,20,,0,,18,,0,0xFFFFFFFF,63,2,4,,0,1,6,{ bonus bAllStats,1; bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubRace,RC_Player,5; },{},{}
-20709,Mana_Manteau,Mana Manteau,4,0,,0,,,,0,0xFFFFFFFF,63,2,4,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
+20709,Mana_Manteau,Mana Manteau,4,0,,0,,,,0,0xFFFFFFFF,63,2,4,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
 20710,Impr_Angel's_Warmth,Advanced Angelic Cardigan,4,10000,,400,,6,,1,0x00000001,63,2,4,,99,1,0,{ bonus bHPrecovRate,50; },{},{}
 20711,Manteau_Of_Diego,Manteau Of Diego,4,20,,600,,15,,1,0xFFFFFFFF,63,2,4,,0,1,0,{ bonus bInt,1; bonus bDex,1; bonus bMdef,3; },{},{}
 20717,Gigant_Snake_Skin,Gigant Snake Skin,4,10,,400,,38,,0,0xFFFFFFFF,63,2,4,,1,1,0,{ bonus bMdef,10; },{},{}
@@ -10769,7 +10776,7 @@
 20746,C_Rudra_Wings,Costume Rudra Wings,4,10,,0,,,,0,0xFFFFFFFF,63,2,8192,,1,0,8,{},{},{}
 20748,Cloak_Of_Casualties,Cloak Of Casualties,4,10,,600,,20,,0,0xFFFFFFFF,63,2,4,,120,1,,{ .@r = getrefine(); bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r; },{},{}
 20749,Cloak_Of_Casualties_,Cloak Of Casualties,4,10,,600,,30,,1,0xFFFFFFFF,63,2,4,,170,1,,{ .@r = getrefine(); bonus bMaxHPrate,.@r/2; bonus bMaxSPrate,.@r/2; bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r; },{},{}
-20753,Lian_Robe,Lian Robe,4,0,,700,,20,1,1,0xFFFFFFFF,63,2,4,0,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{}
+20753,Lian_Robe,Lian Robe,4,0,,700,,20,1,1,0xFFFFFFFF,63,2,4,,65,1,,{ bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5; },{},{}
 20756,Aegir_Cloak,Aegir Cloak,4,10,,300,,10,,1,0xFFFFFFFF,63,2,4,,40,1,,{ bonus bUnbreakableGarment,1; bonus bMaxHP,500; bonus bMaxSP,50; },{},{}
 20761,C_Happiness_Wings,Costume Happiness Wings,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,9,{},{},{}
 20762,C_Great_Devil_Wings,Costume Great Devil Wings,4,0,,0,,0,,0,0xFFFFFFFF,63,2,8192,,1,0,10,{},{},{}
@@ -10779,12 +10786,12 @@
 20780,Unity_STR_Manteau,Unity STR Manteau,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bMaxHPrate,2*(.@r/2); } },{},{}
 20781,Unity_AGI_Manteau,Unity AGI Manteau,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bFlee,3*(.@r/2); } },{},{}
 20782,Unity_INT_Muffler,Unity INT Muffler,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bUseSPrate,-(.@r/2); } },{},{}
-20783,Hero_Cape,Hero Cape,4,0,,100,,,,1,0xFFFFFFFF,63,2,4,1,10,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; } },{},{}
+20783,Hero_Cape,Hero Cape,4,0,,100,,,,1,0xFFFFFFFF,63,2,4,,10,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; } },{},{}
 20787,Unity_Exquisite_Muffler,Unity Exquisite Muffler,4,32000,,300,,20,,1,0xFFFFFFFF,63,2,4,,1,1,0,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bCritical,2*(.@r/2); } },{},{}
 20788,Private_Doram_Manteau,Private Doram Manteau,4,20,,300,,20,,1,0x80000000,7,2,4,,100,1,,{ bonus bFlee,5; bonus2 bSubEle,Ele_Neutral,2; bonus bFlee2,getrefine()/3; },{},{}
 20789,Luxury_Doram_Manteau,Luxury Doram Manteau,4,20,,400,,25,,1,0x80000000,7,2,4,,140,1,,{ bonus bFlee,7; bonus2 bSubEle,Ele_Neutral,3; .@r = getrefine()/3; bonus bFlee2,.@r; bonus bLuk,.@r; },{},{}
 20790,Elegant_Doram_Manteau,Elegant Doram Manteau,4,20,,500,,30,,1,0x80000000,7,2,4,,175,1,,{ bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine()/2; bonus bFlee2,.@r; bonus bInt,.@r; bonus bDex,.@r; bonus bLuk,.@r; },{},{}
-20797,Etran_Shirt,Etran Shirt,4,0,,150,,,,1,0xFFFFFFFF,63,2,4,1,1,1,,{ bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1; },{},{}
+20797,Etran_Shirt,Etran Shirt,4,0,,150,,,,1,0xFFFFFFFF,63,2,4,,1,1,,{ bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1; },{},{}
 20798,C_Grim_Reaper_Protection,Costume Grim Reaper Protection,4,0,,0,,,,0,0xFFFFFFFF,63,2,4096,,1,0,1450,{},{},{}
 20815,SeraphimRobe,Seraphim Robe,4,0,,300,,18,,1,0xFFFFFFFF,63,2,4,,1,1,,{ bonus bMaxHPrate,10; bonus2 bMagicAtkEle,Ele_Neutral,5; .@r = getrefine(); if (.@r > 6) { bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Holy,20; bonus bMatkRate,10; } if (.@r > 8) { bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus bVariableCastrate,-5; } if (getskilllv("CR_TRUST") > 0) { bonus2 bSubEle,Ele_Holy,.@r*3; } },{},{}
 20819,Oxygen_Bottle,Oxygen Bottle,4,0,,500,,0,,1,0xFFFFFFFF,63,2,4,,40,0,0,{ bonus bFlee,12+getrefine(); bonus bHit,getrefine(); },{},{}
@@ -10830,7 +10837,7 @@
 22009,Temporal_INT_Boots_,Temporal Boots Of Intelligence,4,20,,600,,20,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMdef,5; bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMatk,10*(.@r/3); if(readparam(bInt)>=120) bonus bMatk,60; },{},{}
 22010,Temporal_AGI_Boots_,Temporal Boots Of Agility,4,20,,600,,25,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bAspdRate,3*(.@r/3); if(readparam(bAgi)>=120) bonus bAspd,1; },{},{}
 22011,Temporal_LUK_Boots_,Temporal Boots Of Luck,4,20,,600,,20,,1,0xFFFFFFFF,56,2,64,,99,1,,{ .@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMdef,5; bonus bCritAtkRate,2*(.@r/3); if(readparam(bLuk)>=120) bonus bCritAtkRate,30; },{},{}
-22012,Mana_Boots,Mana Boots,4,0,,0,,,,0,0xFFFFFFFF,63,2,64,0,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
+22012,Mana_Boots,Mana Boots,4,0,,0,,,,0,0xFFFFFFFF,63,2,64,,1,1,,{ bonus2 bExpAddRace,RC_All,10; },{},{}
 22014,Enhanced_Variant_Shoes,Enhanced Variant Shoes,4,20,,500,,13,,1,0x7CCFDF80,63,2,64,,85,1,0,{ bonus bMaxHPrate,12; bonus bMaxSPrate,12; .@r = getrefine(); bonus bDef,.@r; bonus bMdef,.@r; },{},{}
 22015,Impr_Angel's_Arrival,Advanced Angel's Reincarnation,4,10000,,300,,8,,1,0x00000001,63,2,64,,99,1,0,{ bonus bMaxHP,500; bonus bMaxSP,100; },{},{}
 22018,Shoes_Of_Wise_Man,Shoes Of Wise Man,4,10,,300,,15,,1,0xFFFFFFFF,63,2,64,,50,1,,{ .@r = getrefine(); if(.@r>5){ bonus bInt,.@r-5; bonus bMaxHPrate,-(.@r-5); } },{},{}
@@ -10848,8 +10855,8 @@
 22059,Aegir_Shoes,Aegir Shoes,4,10,,300,,13,,1,0xFFFFFFFF,63,2,64,,40,1,,{ bonus bUnbreakableShoes,1; bonus bMaxHP,500; bonus bMaxSP,50; },{},{}
 22064,Thorny_Shoes,Thorny Shoes,4,0,,1000,,25,,1,0xFFFFFFFF,63,2,64,,,1,,{ bonus bShortWeaponDamageReturn,getrefine()/2; },{},{}
 22067,Shoe_of_Witch,Shoe of Witch,4,10,,400,,10,,0,0xFFFFFFFE,63,2,64,,1,1,,{ skill "ALL_CATCRY",1; },{},{}
-22069,Lian_Shoes,Lian Shoes,4,0,,250,,12,,1,0xFFFFFFFF,63,2,64,1,90,1,,{ bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r; },{},{}
-22072,Hikingboots,Hikingboots,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,0,100,1,,{ .@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25; },{},{}
+22069,Lian_Shoes,Lian Shoes,4,0,,250,,12,,1,0xFFFFFFFF,63,2,64,,90,1,,{ bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r; },{},{}
+22072,Hikingboots,Hikingboots,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25; },{},{}
 22075,Rift_Shoes,Rift Shoes,4,20,,250,,12,,1,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHP,(.@r >= 9 ? 1300 : .@r >= 7 ? 700 : 300); bonus bMaxSP,-50; },{},{}
 22076,Wooden_Slipper,Wooden Slipper,4,20,,50,,10,,1,0x80000000,7,2,64,,9,1,,{ bonus2 bHPRegenRate,2,10000; },{},{}
 22077,Red_Eco-Friendly_Shoes,Red Eco-Friendly Shoes,4,20,,100,,20,,1,0x80000000,7,2,64,,18,1,,{ bonus bCritical,5; bonus2 bHPRegenRate,4,10000; bonus2 bSPRegenRate,1,10000; },{},{}
@@ -10857,13 +10864,13 @@
 22079,Unity_AGI_Boots,Unity AGI Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bAgi,.@r/2; } },{},{}
 22080,Unity_DEX_Boots,Unity DEX Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bDex,.@r/2; } },{},{}
 22081,Unity_INT_Boots,Unity INT Boots,4,10,,300,,20,,1,0xFFFFFFFF,63,2,64,,1,1,,{ .@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bInt,.@r/2; } },{},{}
-22082,Polyhedron_Shoes,Polyhedron Shoes,4,0,,500,,12,,1,0xFFFFFFFF,63,2,64,0,90,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; } },{},{}
+22082,Polyhedron_Shoes,Polyhedron Shoes,4,0,,500,,12,,1,0xFFFFFFFF,63,2,64,,90,1,,{ .@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; } },{},{}
 22083,Private_Doram_Shoes,Private Doram Shoes,4,20,,500,,25,,1,0x80000000,7,2,64,,100,1,,{ bonus bMaxHP,100; bonus bMaxSP,50; .@r = getrefine()/3; bonus bHPrecovRate,.@r*10; bonus bSPrecovRate,.@r*10; },{},{}
 22084,Luxury_Doram_Shoes,Luxury Doram Shoes,4,20,,600,,30,,1,0x80000000,7,2,64,,140,1,,{ bonus bMaxHP,300; bonus bMaxSP,100; .@r = getrefine()/3; bonus bHPrecovRate,20*.@r; bonus bSPrecovRate,20*.@r; },{},{}
 22085,Elegant_Doram_Shoes,Elegant Doram Shoes,4,20,,700,,35,,1,0x80000000,7,2,64,,175,1,,{ bonus bMaxHPrate,10; bonus bMaxSPrate,5; .@r = getrefine()/2; bonus bMaxHP,100*.@r; bonus bMaxSP,20*.@r; if(.@r >= 4) bonus2 bSkillUseSP,"SU_LOPE",5; },{},{}
 22089,Crimson_Gaiter_,Crimson Gaiter,4,0,,500,,10,,1,0xFFFFFFFF,63,2,64,,50,1,,{ bonus bCritical,2; bonus bCritAtkRate,2; if(getrefine()>=7){ bonus bCritical,3; bonus bCritAtkRate,3; } },{},{}
 22101,Angel_Poring_Boots,Angel Poring Boots,4,10,,300,,15,,1,0xFFFFFFFF,63,2,64,,1,1,,{ bonus bAllStats,1; skill "AL_HEAL",1; },{},{}
-22103,Excelion_Leg,Excelion Leg,4,0,,500,,13,,0,0xFFFFFFFF,63,2,64,1,100,1,,{ .@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; },{},{}
+22103,Excelion_Leg,Excelion Leg,4,0,,500,,13,,0,0xFFFFFFFF,63,2,64,,100,1,,{ .@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; },{},{}
 22106,Giant_Boots,Giant Boots,4,0,,500,,13,,1,0xFFFFFFFF,63,2,64,,1,1,,{ bonus2 bSubRace,RC_All,1; bonus bMaxHPrate,2; bonus bMaxSPrate,2; .@r = getrefine(); if (.@r > 4) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } if (.@r > 6) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } },{},{}
 22122,Para_Team_Boots100,Awakened Eden Group Boots I,4,0,,0,,22,,0,0xFFFFFFFF,63,2,64,,100,1,,{ bonus bAllStats,1; bonus bHPrecovRate,30; bonus bSPrecovRate,14; },{},{}
 22123,Para_Team_Boots115,Awakened Eden Group Boots II,4,0,,0,,25,,0,0xFFFFFFFF,63,2,64,,115,1,,{ bonus bAllStats,1; bonus bHPrecovRate,36; bonus bSPrecovRate,18; },{},{}
@@ -11057,9 +11064,9 @@
 22844,Sealed_Dracula_Card_Album,Sealed Dracula Card Album,2,10,,10,,,,,,,,,,,,,{/*No Info*/},{},{}
 22845,Sealed_Fortune_Egg,Sealed Fortune Egg,2,10,,10,,,,0,0xFFFFFFFF,63,2,,,1,,,{ getitem callfunc("F_Rand",4488,4497,4486,4480,4485,4539,4487,4494,4538,4489,4490,4482,4503,22846),1; },{},{}
 22846,Sealed_Dracula_Card_,Sealed Dracula Card,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ bonus_script "{ bonus2 bSPDrainRate,50,5; }",300; },{},{}
-22847,Prontera_Medal,Prontera Medal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prontera",0,0; /*No coord info*/ },{},{}
+22847,Prontera_Medal,Prontera Medal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prontera",159,192; /*No coord info*/ },{},{}
 22848,Prison_Key,Prison Key,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_prison",0,0; /*No coord info*/ },{},{}
-22849,Prontera_Time_Crystal,Prontera Time Crystal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_lib_q",0,0; /*No map+coord info*/ },{},{}
+22849,Prontera_Time_Crystal,Prontera Time Crystal,2,10,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ warp "prt_q",155,27; },{},{}
 22850,January_Gift_Box_,January Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ rentitem 19052,604800; },{},{}
 22851,February_Gift_Box_,February Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem 12105,2; },{},{}
 22852,March_Gift_Box_,March Gift Box,2,10,,100,,,,,0xFFFFFFFF,63,2,,,,,,{/*2 Lucky Eggs*/},{},{}
@@ -11457,25 +11464,28 @@
 28318,RCC2013_RING_,RCC2013_RING_,4,200,,200,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus2 bAddClass,Class_All,1; },{},{}
 28310,Sarah's_Left_Earring,Sarah's Left Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,8,,145,0,,{ skill "AL_HEAL",1; },{},{}
 28311,Sarah's_Right_Earring,Sarah's Right Earring,4,10,,100,,,,0,0xFFFFFFFF,63,2,128,,145,0,,{ skill "AL_TELEPORT",1; },{},{}
-28321,Falconer_Claw,Falconer Claw,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10; },{},{}
-28322,Falconer_Glove,Falconer Glove,4,0,,100,,5,,1,0x00000800,63,2,136,0,80,0,,{ bonus bDex,1; bonus bUseSPrate,-5; },{},{}
+28321,Falconer_Claw,Falconer Claw,4,0,,100,,5,,1,0x00000800,63,2,136,,80,0,,{ bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10; },{},{}
+28322,Falconer_Glove,Falconer Glove,4,0,,100,,5,,1,0x00000800,63,2,136,,80,0,,{ bonus bDex,1; bonus bUseSPrate,-5; },{},{}
 28326,Broken_Chips_01,Broken Chips 01,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bStr,4; },{},{}
 28327,Broken_Chips_02,Broken Chips 02,4,10,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bInt,4; },{},{}
 28332,Jewerly_Ring,Jewerly Ring,4,10,,100,,,,0,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC; },{},{}
 28333,Gold_PC_Room_Ring,Gold PC Room Ring,4,10,,0,,,,1,0xFFFFFFFF,63,2,136,,1,0,,{ bonus bMaxHPrate,3; bonus bMaxSPrate,3; },{},{}
 28342,Critical_Anklet,Critical Anklet,4,0,,200,,3,,1,0xFFFFFFFF,63,2,136,,,0,,{ bonus bCritical,5; },{},{}
-28358,Cursed_Lucky_Clover,Cursed Lucky Clover,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,100,0,,{ bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5; },{},{ sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/ }
-28372,Imperial_Ring,Imperial Ring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3; },{},{}
+28354,City_Map,City Map,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{}
+28355,Shining_Holy_Water,Shining Holy Water,4,0,,100,,0,,1,0xFFFFFFFF,63,2,136,,1,0,0,{ /* todo */ },{},{}
+28356,Prontera_Badge,Prontera Badge,4,0,,100,,0,,0,0xFFFFFFFF,63,2,136,,1,0,0,{ /*warp "prontera",159,192;  15 mins cooldown */ },{},{}
+28358,Cursed_Lucky_Clover,Cursed Lucky Clover,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,100,0,,{ bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5; },{},{ sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/ }
+28372,Imperial_Ring,Imperial Ring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3; },{},{}
 28374,Foxtail_Ring,Foxtail Ring,4,20,,100,,0,,0,0x80000000,7,2,136,,1,0,,{ bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl; },{},{}
-28377,Magical_Ring,Magical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,20,0,,{ bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; } },{},{}
+28377,Magical_Ring,Magical Ring,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,20,0,,{ bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; } },{},{}
 28380,Fresh_Grass_Necklace,Fresh Grass Necklace,4,20,,100,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bFlee2,5; bonus2 bSkillCooldown,"SU_SCAROFTAROU",-5000; },{},{}
 28381,Cute_Grass_Necklace,Cute Grass Necklace,4,20,,10,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bHealPower,5; bonus2 bSkillCooldown,"SU_TUNAPARTY",-7000; },{},{}
 28382,Charm_Grass_Necklace,Charm Grass Necklace,4,20,,10,,0,,1,0x80000000,7,2,136,,100,0,,{ bonus bMdef,5; bonus2 bVariableCastrate,"SU_CN_METEOR",-1000; },{},{}
-28386,Fallen_Monk_Rosary,Fallen Monk Rosary,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,0,20,0,,{ bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30; },{},{}
+28386,Fallen_Monk_Rosary,Fallen Monk Rosary,4,0,,100,,,,1,0xFFFFFFFF,63,2,136,,20,0,,{ bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30; },{},{}
 28391,S_Thief_Earring,Thief Shadow Earring,12,0,,0,,,,0,0xFFFFFFFF,63,2,1048576,,1,1,,{ .@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bFlee,30+(.@r*10); }",200,5000,"TF_THROWSTONE","{ specialeffect2 EF_ENHANCE; }"; },{},{}
 28392,S_Archer_Earring,Archer Shadow Earring,12,0,,0,,,,0,0xFFFFFFFF,63,2,1048576,,1,1,,{ .@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bHit,30+(.@r*10); }",200,5000,"AC_DOUBLE","{ specialeffect2 EF_ENHANCE; }"; },{},{}
-28410,Sapphire_Wrist,Sapphire Wrist,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{}
-28411,Emerald_Earring,Emerald Earring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,0,50,0,,{ bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{}
+28410,Sapphire_Wrist,Sapphire Wrist,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{}
+28411,Emerald_Earring,Emerald Earring,4,0,,500,,3,,1,0xFFFFFFFF,63,2,136,,50,0,,{ bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20; },{},{}
 28413,Lesser_Mackerel_Talisman,Lesser Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,100,,,{ bonus bVit,1; },{},{}
 28414,Intermediate_Mackerel_Talisman,Intermediate Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,140,,,{ bonus bVit,2; },{},{}
 28415,Greater_Mackerel_Talisman,Greater Mackerel Talisman,4,0,,100,,1,,1,0x80000000,63,2,136,,175,,,{ bonus bVit,3; },{},{}
@@ -11559,6 +11569,18 @@
 //===================================================================
 // Enchantment stones
 //===================================================================
+29000,Rune_of_Intellect_Lv_1,Rune of Intellect Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,5; } if (.@r>=10) { bonus bMatkRate,5; } },{},{}
+29001,Rune_of_Intellect_Lv_2,Rune of Intellect Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,6; } if (.@r>=11) { bonus bInt,1; bonus bMatkRate,7; } },{},{}
+29002,Rune_of_Intellect_Lv_3,Rune of Intellect Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bInt,7; } if (.@r>=12) { bonus bInt,1; bonus bMatkRate,8; } if (.@r>=13) { bonus bInt,1; bonus bMatkRate,2; } },{},{}
+29003,Rune_of_Dexterity_Lv_1,Rune of Dexterity Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,5; } if (.@r>=10) { bonus bLongAtkRate,5; } },{},{}
+29004,Rune_of_Dexterity_Lv_2,Rune of Dexterity Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,6; } if (.@r>=11) { bonus bDex,1; bonus bLongAtkRate,7; } },{},{}
+29005,Rune_of_Dexterity_Lv_3,Rune of Dexterity Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bDex,7; } if (.@r>=12) { bonus bDex,1; bonus bLongAtkRate,8; } if (.@r>=13) { bonus bDex,1; bonus bLongAtkRate,2; } },{},{}
+29006,Rune_of_Luck_Lv_1,Rune of Luck Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,5; } if (.@r>=10) { bonus bCritAtkRate,5; } },{},{}
+29007,Rune_of_Luck_Lv_2,Rune of Luck Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,6; } if (.@r>=11) { bonus bLuk,1; bonus bCritAtkRate,7; } },{},{}
+29008,Rune_of_Luck_Lv_3,Rune of Luck Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bLuk,7; } if (.@r>=12) { bonus bLuk,1; bonus bCritAtkRate,8; } if (.@r>=13) { bonus bLuk,1; bonus bCritAtkRate,6; } },{},{}
+29009,Rune_of_Vitality_Lv_1,Rune of Vitality Lv 1,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,5; } if (.@r>=10) { bonus bMaxHPrate,5; } },{},{}
+29010,Rune_of_Vitality_Lv_2,Rune of Vitality Lv 2,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,6; } if (.@r>=11) { bonus bVit,1; bonus bMaxHPrate,7; } },{},{}
+29011,Rune_of_Vitality_Lv_3,Rune of Vitality Lv 3,6,20,,,,,,,,,,,,,,,{ .@r = getrefine(); if (.@r>=7) { bonus bVit,7; } if (.@r>=12) { bonus bVit,1; bonus bMaxHPrate,8; } if (.@r>=13) { bonus bVit,1; bonus bMaxHPrate,2; } },{},{}
 29061,Ambition1Lv,Ambition1Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,3; bonus bHit,3; },{},{}
 29062,Ambition2Lv,Ambition2Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,6; bonus bHit,6; },{},{}
 29063,Ambition3Lv,Ambition3Lv,6,10,,0,,,,,,,,,,,,,{ bonus2 bAddClass,Class_All,9; bonus bHit,9; },{},{}

+ 0 - 11
db/re/item_misc.txt

@@ -1285,17 +1285,6 @@ IG_God_Material_Box,7089,5 //Indication_Of_Tempest
 IG_God_Material_Box,7090,5 //Slilince_Wave
 IG_God_Material_Box,7091,5 //Rough_Billows
 IG_God_Material_Box,7092,5 //Air_Stream
-// Runes
-IG_Rune,12725,1 // Runstone_Nosiege
-IG_Rune,12726,1 // Runstone_Rhydo
-IG_Rune,12727,1 // Runstone_Verkana
-IG_Rune,12728,1 // Runstone_Isia
-IG_Rune,12729,1 // Runstone_Asir
-IG_Rune,12730,1 // Runstone_Urj
-IG_Rune,12731,1 // Runstone_Turisus
-IG_Rune,12732,1 // Runstone_Pertz
-IG_Rune,12733,1 // Runstone_Hagalas
-IG_Rune,22540,1 // Runstone_Luxanima
 // Elemental Points
 IG_Element,6360,1 // Scarlet_Pts
 IG_Element,6361,1 // Indigo_Pts

+ 1 - 1
db/re/item_trade.txt

@@ -914,7 +914,7 @@
 6916,499,100	// Piece_Of_Soul_Monkey
 6917,499,100	// Piece_Of_Soul_Chicken
 6919,499,100	// Honor_Proof
-//6920,467,100	//
+6920,499,100	// Rune_Magic_Powder
 6923,499,100	// Bright_Fire_Lights
 6925,499,100	// Letter_Of_Prisoner
 6926,499,100	// Rune-Midgard_History_Book

+ 52 - 13
db/re/mob_db.txt

@@ -2102,20 +2102,20 @@
 //2945,J_MUMMY
 //2946,J_ANUBIS
 //2947,J_EGGYRA
-//2948,CURSED_SOLDIER
-//2949,CURSED_SENTINEL
-//2950,BROKEN_MIND
-//2951,FLOATING_WORD
-//2952,LIKE_LOVE
-//2953,CURSED_MEMORY
-//2954,COLORLESS_VOW
-//2955,OLD_FRIENDSHIP
-//2956,SWEET_SLAUGHTER
-//2957,FORGOTTEN_NAME
-//2958,FATAL_DAYS
-//2959,TORTUROUS_REDEEMER
+2948,CURSED_SOLDIER,Cursed Soldier,Cursed Soldier,110,18574,1,1907,1851,9,1258,1791,85,35,81,50,64,56,178,23,10,12,1,1,69,0x3885,150,1960,576,420,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2949,CURSED_SENTINEL,Cursed Sentinel,Cursed Sentinel,110,14099,1,1634,1346,2,1347,1906,84,41,120,65,66,41,107,26,10,12,2,7,67,0x3885,175,914,1344,384,0,0,0,0,0,0,0,6672,1000,934,2500,1097,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2950,BROKEN_MIND,Broken Mind,Broken Mind,110,13520,1,1545,1557,1,1259,1799,67,27,69,37,36,10,64,5,10,12,1,6,67,0x2003885,200,920,720,200,0,0,0,0,0,0,0,6672,1000,6086,2500,683,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2951,FLOATING_WORD,Floating Word,Floating Word,110,11276,1,1166,1034,1,1080,1509,93,40,111,90,60,70,139,65,10,12,0,6,68,0x2003885,150,972,648,432,0,0,0,0,0,0,0,6672,1000,938,3000,947,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2952,LIKE_LOVE,Like Love,Like Love,110,14008,1,1505,1667,2,1182,1183,64,51,62,27,25,55,102,20,10,12,1,6,64,0x2003885,150,1056,1056,336,0,0,0,0,0,0,0,6672,1000,929,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2953,CURSED_MEMORY,Cursed Memory,Cursed Memory,110,18045,1,1802,1623,1,1310,1867,89,28,87,39,58,5,82,10,10,12,1,1,69,0x3885,350,1768,500,192,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2954,COLORLESS_VOW,Colorless Vow,Colorless Vow,110,19194,0,1939,1881,1,1478,2121,95,41,84,35,60,20,85,15,10,12,1,1,69,0x3885,350,0,500,0,0,0,0,0,0,0,0,6672,1000,958,3500,1063,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2955,OLD_FRIENDSHIP,Old Friendship,Old Friendship,110,12614,0,1306,1328,0,1147,1638,78,5,56,12,19,11,30,10,10,12,1,1,49,0x3885,250,2460,912,0,0,0,0,0,0,0,0,6672,1000,932,3500,1098,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2956,SWEET_SLAUGHTER,Sweet Slaughter,Sweet Slaughter,110,13986,0,1960,1587,0,1216,1709,125,10,121,48,40,31,125,32,10,12,2,1,29,0x3885,350,1538,1000,396,0,0,0,0,0,0,0,6672,1000,929,2000,682,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2957,FORGOTTEN_NAME,Forgotten Name,Forgotten Name,120,19546,1,1505,1485,2,1093,1520,111,38,121,29,51,43,100,3,10,12,1,1,49,0x3885,155,1169,1152,480,0,0,0,0,0,0,0,6672,1500,682,5000,683,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2958,FATAL_DAYS,Fatal Days,Fatal Days,120,24240,1,2052,2026,2,1025,1428,72,15,100,71,63,85,115,37,10,12,1,6,67,0x2003885,190,720,384,480,0,0,0,0,0,0,0,6672,1500,1050,2500,1038,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2959,TORTUROUS_REDEEMER,Torturous Redeemer,Torturous Redeemer,120,103342,0,10590,8378,0,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,0,0,0,0,0,0,0,6672,10000,6672,10000,923,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 //2960,MM_FLAMECROSS
-//2961,E_TORTUROUS_REDEEMER
+2961,E_TORTUROUS_REDEEMER,Torturous Redeemer,Torturous Redeemer,120,103342,1,10590,8378,1,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,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
 //2962,E_DEVILING
 //2963,WOODIE
 //2964,EXP_1000
@@ -3061,3 +3061,42 @@
 //3901,MD_ORK_HERO
 //3902,MD_ORC_LORD
 //3903,MD_ORC_FLOWER
+
+//3910,E_EMPEL_1
+//3911,E_GIBBET
+//3912,E_LOLI_RURI
+//3913,E_DULLAHAN
+//3914,E_BLOODY_MURDERER
+//3915,E_EMPEL_1B
+//3916,JP_E_MONSTER_74
+//3917,JP_E_MONSTER_75
+//3918,JP_E_MONSTER_76
+//3919,JP_E_MONSTER_77
+//3920,JP_E_MONSTER_78
+//3921,JP_E_MONSTER_79
+//3922,JP_E_MONSTER_80
+//3923,JP_E_MONSTER_81
+//3924,JP_E_MONSTER_82
+//3925,JP_E_MONSTER_83
+//3926,JP_E_MONSTER_84
+//3927,JP_E_MONSTER_85
+//3928,JP_E_MONSTER_86
+//3929,JP_E_MONSTER_87
+//3930,JP_E_MONSTER_88
+//3931,JP_E_MONSTER_89
+//3932,JP_E_MONSTER_90
+//3933,JP_E_MONSTER_91
+//3934,JP_E_MONSTER_92
+//3935,JP_E_MONSTER_93
+//3936,JP_E_MONSTER_94
+//3937,JP_E_MONSTER_95
+//3938,JP_E_MONSTER_96
+//3939,JP_E_MONSTER_97
+//3940,JP_E_MONSTER_98
+//3941,JP_E_MONSTER_99
+//3942,JP_E_MONSTER_100
+//3943,JP_E_MONSTER_101
+//3944,JP_E_MONSTER_102
+//3945,JP_E_MONSTER_103
+//3946,JP_E_MONSTER_104
+//3947,JP_E_MONSTER_105

+ 4 - 4
db/re/mob_drop.txt

@@ -46,11 +46,11 @@
 2700,28705,250,RDMOPTG_Crimson_Weapon // C2_PORCELLIO
 2745,13127,250,RDMOPTG_None // C2_MOLE
 2746,1939,250,RDMOPTG_Crimson_Weapon // C3_MIYABI_NINGYO
-1102,2009,50,RDMOPTG_None // BATHORY
+1102,1680,50,RDMOPTG_None // BATHORY
 1155,16040,50,RDMOPTG_Crimson_Weapon // PETIT
 2714,16040,250,RDMOPTG_Crimson_Weapon // C1_PETIT
 2715,16040,250,RDMOPTG_Crimson_Weapon // C2_PETIT
-2885,2009,250,RDMOPTG_None // C4_BATHORY
+2885,1680,250,RDMOPTG_None // C4_BATHORY
 2199,28705,50,RDMOPTG_Crimson_Weapon // SIORAVA
 1143,16040,50,RDMOPTG_Crimson_Weapon // MARIONETTE
 1413,1995,50,RDMOPTG_Crimson_Weapon // WILD_GINSENG
@@ -106,9 +106,9 @@
 1653,28705,50,RDMOPTG_Crimson_Weapon // WHIKEBAIN
 1655,1839,50,RDMOPTG_Crimson_Weapon // EREND
 1655,16040,50,RDMOPTG_Crimson_Weapon // EREND
-1657,2009,50,RDMOPTG_None // RAWREL
+1657,1680,50,RDMOPTG_None // RAWREL
 1829,21015,50,RDMOPTG_Crimson_Weapon // SWORD_GUARDIAN
-2692,2009,250,RDMOPTG_None // C3_RAWREL
+2692,1680,250,RDMOPTG_None // C3_RAWREL
 1654,13454,50,RDMOPTG_Crimson_Weapon // ARMAIA
 1654,28106,50,RDMOPTG_Crimson_Weapon // ARMAIA
 1656,1939,50,RDMOPTG_Crimson_Weapon // KAVAC

+ 48 - 0
db/re/mob_skill_db.txt

@@ -10916,6 +10916,54 @@
 2923,Owl Marquees@NPC_EMOTION,idle,197,1,2000,0,5000,yes,self,always,0,6,0x3695,,,,,
 2923,Owl Marquees@NPC_SUMMONSLAVE,idle,196,2,10000,2000,60000,no,self,slavele,0,2922,,,,,,
 
+// Ghost Palace Memorial
+2948,Cursed Soldier@NPC_BLINDATTACK,attack,177,5,500,0,5000,no,target,always,0,,,,,,,
+2948,Cursed Soldier@AC_DOUBLE,attack,46,5,500,0,5000,no,target,always,0,,,,,,,
+2948,Cursed Soldier@NPC_MAGICALATTACK,attack,192,1,500,800,5000,yes,target,always,0,,,,,,,
+2948,Cursed Soldier@AC_SHOWER,attack,47,3,500,0,5000,no,target,always,0,,,,,,,
+2949,Cursed Sentinel@AS_SONICBLOW,attack,136,7,500,800,5000,yes,target,always,0,,,,,,29,
+2949,Cursed Sentinel@NPC_CURSEATTACK,attack,181,5,500,800,5000,yes,target,always,0,,,,,,29,
+2950,Broken Mind@NPC_BLINDATTACK,attack,177,3,1500,0,5000,no,target,always,0,,,,,,1,
+2950,Broken Mind@NPC_BLINDATTACK,chase,177,3,1500,0,5000,no,target,always,0,,,,,,1,
+2950,Broken Mind@NPC_BLOODDRAIN,attack,199,1,500,0,5000,no,target,always,0,,,,,,26,
+2950,Broken Mind@NPC_CURSEATTACK,attack,181,3,500,800,5000,yes,target,always,0,,,,,,0,
+2950,Broken Mind@NPC_CURSEATTACK,chase,181,3,500,800,5000,yes,target,always,0,,,,,,0,
+2950,Broken Mind@CR_REFLECTSHIELD,attack,252,2,500,0,300000,yes,self,always,0,,,,,,7,
+2950,Broken Mind@NPC_PETRIFYATTACK,attack,180,3,500,500,5000,yes,target,always,0,,,,,,2,
+2950,Broken Mind@NPC_PETRIFYATTACK,chase,180,3,500,500,5000,yes,target,always,0,,,,,,2,
+2951,Floating Word@NPC_BLOODDRAIN,attack,199,1,500,0,5000,no,target,always,0,,,,,,2,
+2951,Floating Word@NPC_EMOTION,idle,197,1,2000,0,5000,no,self,always,0,29,,,,,,
+2951,Floating Word@MG_FIREBALL,chase,17,5,1500,500,5000,yes,target,always,0,,,,,,,
+2951,Floating Word@MO_BODYRELOCATION,chase,264,1,2000,500,5000,yes,target,always,0,,,,,,,
+2952,Like Love@HT_SHOCKWAVE,idle,118,5,500,0,300000,no,around2,always,0,,,,,,29,
+2952,Like Love@MG_LIGHTNINGBOLT,attack,20,5,500,1500,5000,no,target,always,0,,,,,,6,
+2952,Like Love@MG_LIGHTNINGBOLT,chase,20,5,500,1500,5000,no,target,always,0,,,,,,6,
+2952,Like Love@NPC_EMOTION,idle,197,1,2000,0,5000,no,self,always,0,29,,,,,,
+2952,Like Love@NPC_MAGICALATTACK,attack,192,1,500,1000,5000,yes,target,always,0,,,,,,9,
+2952,Like Love@NPC_UNDEADATTACK,attack,347,2,2000,0,5000,no,target,always,0,,,,,,,
+2952,Like Love@WZ_JUPITEL,attack,84,3,500,1500,5000,no,target,always,0,,,,,,6,
+2952,Like Love@WZ_JUPITEL,chase,84,3,500,1500,5000,no,target,always,0,,,,,,6,
+2953,Cursed Memory@NPC_POISON,attack,176,3,500,800,5000,yes,target,always,0,,,,,,,
+2953,Cursed Memory@NPC_POISONATTACK,attack,188,3,500,800,5000,yes,target,always,0,,,,,,,
+2953,Cursed Memory@NPC_UNDEADATTACK,attack,347,2,500,500,5000,yes,target,always,0,,,,,,,
+2954,Colorless Vow@NPC_CRITICALSLASH,attack,170,1,500,500,5000,yes,target,always,0,,,,,,,
+2954,Colorless Vow@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,no,target,always,0,,,,,,,
+2955,Old Friendship@NPC_POISON,attack,176,3,500,800,5000,yes,target,always,0,,,,,,,
+2955,Old Friendship@NPC_POISON,angry,176,3,500,800,5000,yes,target,always,0,,,,,,,
+2956,Sweet Slaughter@AS_GRIMTOOTH,chase,137,5,2000,0,5000,no,target,always,0,,,,,,,
+2956,Sweet Slaughter@BS_MAXIMIZE,attack,114,5,500,1000,5000,yes,self,always,0,,,,,,,
+2956,Sweet Slaughter@BS_MAXIMIZE,chase,114,5,500,1000,5000,yes,self,always,0,,,,,,,
+2956,Sweet Slaughter@NPC_SPLASHATTACK,attack,174,1,2000,0,5000,no,target,always,0,,,,,,9,
+2956,Sweet Slaughter@NPC_STUNATTACK,attack,179,3,500,1500,5000,yes,target,always,0,,,,,,,
+2957,Forgotten Name@NPC_CRITICALSLASH,attack,170,1,1000,500,5000,yes,target,always,0,,,,,,,
+2957,Forgotten Name@NPC_DARKNESSATTACK,attack,190,3,500,500,5000,yes,target,always,0,,,,,,6,
+2958,Fatal Days@MG_SOULSTRIKE,chase,13,5,2000,0,3000,no,target,always,0,,,,,,,
+2958,Fatal Days@AS_GRIMTOOTH,attack,137,5,10000,0,700,no,target,always,0,,,,,,,
+2959,Torturous Redeemer@SM_MAGNUM,attack,7,5,500,0,10000,no,self,always,0,,,,,,,
+2959,Torturous Redeemer@NPC_FIREATTACK,attack,186,3,1000,1000,200000,yes,target,always,0,,,,,,,
+2959,Torturous Redeemer@WZ_FIREPILLAR,attack,80,5,500,0,10000,no,around2,always,0,,,,,,,
+2959,Torturous Redeemer@SM_BASH,attack,5,5,500,0,5000,no,target,always,0,,,,,,,
+
 // Horror Toy Factory
 2987,Decorated Evil Tree@AS_GRIMTOOTH,chase,137,5,2000,0,5000,yes,target,always,0,,,,,,,
 2987,Decorated Evil Tree@NPC_CURSEATTACK,attack,181,3,1000,0,5000,yes,target,always,0,,,,,,6,

+ 4 - 0
db/re/quest_db.txt

@@ -136,6 +136,10 @@
 1239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shop guide"
 1240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Shop guide"
 
+// Ghost Palace memorial
+1261,82800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cursed Swordman"
+1263,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Cursed Swordman"
+
 2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith"
 2001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith"
 2002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Job Change to Blacksmith"

+ 0 - 41
db/re/refine_db.txt

@@ -1,41 +0,0 @@
-// Refine Database [Renewal]
-//
-// Structure of Database:
-// Type,Stats per level,Random bonus start level,Random bonus value,Chance+1:Bonus+1,Chance+2:Bonus+2,Chance+3:Bonus+3,...
-//
-// For armors, values of 100 add 1 armor defense.
-// For weapons, values of 100 add 1 ATK&MATK.
-//
-// Type:
-//	0 - Armors
-//	1 - Level 1 weapons
-//	2 - Level 2 weapons
-//	3 - Level 3 weapons
-//	4 - Level 4 weapons
-//
-// Stats per level:
-// This value is applied for every upgrade level.
-//
-// Random bonus start level:
-// This value specifies the start point for those levels that give a random bonus value (usually the first unsafe upgrade).
-//
-// Random bonus value:
-// A random number between 0 and (Random bonus start level - Upgrade level + 1) * this value is applied for all upgrades past
-// Random bonus start level. This is only applied for weapons, and not displayed client-side.
-//
-// Chance:
-// 100 = 100%
-//
-// Notes:
-// Changing the number of upgrade levels requires modifying MAX_REFINE in src/map/status.h.
-// For Renewal Armors, there may or may not be another bonus, according to iRO wiki: Every upgrade gives floor[( 3 + current upgrade ) / 4] equipment DEF)
-
-0,0,0,0,100:100,100:100,100:100,100:100,60:200,40:200,40:200,20:200,20:300,9:300,8:300,8:300,8:400,8:400,7:400,7:400,7:500,7:500,5:500,5:500
-// Level 1 weapons
-1,200,8,300,100:0,100:0,100:0,100:0,100:0,100:0,100:0,60:0,40:0,19:0,18:0,18:0,18:0,18:0,18:0,17:300,17:300,17:300,15:300,15:300
-// Level 2 weapons
-2,300,7,500,100:0,100:0,100:0,100:0,100:0,100:0,60:0,40:0,20:0,19:0,18:0,18:0,18:0,18:0,18:0,17:600,17:600,17:600,15:600,15:600
-// Level 3 weapons
-3,500,6,800,100:0,100:0,100:0,100:0,100:0,60:0,50:0,20:0,20:0,19:0,18:0,18:0,18:0,18:0,18:0,17:900,17:900,17:900,15:900,15:900
-// Level 4 weapons
-4,700,5,1400,100:0,100:0,100:0,100:0,60:0,40:0,40:0,20:0,20:0,9:0,8:0,8:0,8:0,8:0,7:0,7:1200,7:1200,7:1200,5:1200,5:1200

+ 584 - 0
db/re/refine_db.yml

@@ -0,0 +1,584 @@
+# This file is a part of rAthena++.
+#   Copyright(C) 2017 rAthena Development Team
+#   https://rathena.org - https://github.com/rathena
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+###########################################################################
+# Renewal Refine Database
+###########################################################################
+Armor:
+  StatsPerLevel: 0
+  RandomBonusStartLevel: 0
+  RandomBonusValue: 0
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 2000
+      Material: 985
+    - Type: REFINE_COST_OVER10
+      Price: 100000
+      Material: 6223
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6241
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7619
+    - Type: REFINE_COST_OVER10_HD
+      Price: 100000
+      Material: 6225
+  Rates:
+    - Level: 1
+      Bonus: 100
+    - Level: 2
+      Bonus: 100
+    - Level: 3
+      Bonus: 100
+    - Level: 4
+      Bonus: 100
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+      Bonus: 200
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+      Bonus: 200
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+      Bonus: 200
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+      Bonus: 200
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+      Bonus: 300
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35
+      Bonus: 300
+    - Level: 11
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 300
+    - Level: 12
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 300
+    - Level: 13
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 16
+      EventEnrichedChance: 16
+      Bonus: 400
+    - Level: 14
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 16
+      EventEnrichedChance: 16
+      Bonus: 400
+    - Level: 15
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 400
+    - Level: 16
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 400
+    - Level: 17
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 14
+      EventEnrichedChance: 14
+      Bonus: 500
+    - Level: 18
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 14
+      EventEnrichedChance: 14
+      Bonus: 500
+    - Level: 19
+      NormalChance: 5
+      EnrichedChance: 5
+      EventNormalChance: 10
+      EventEnrichedChance: 10
+      Bonus: 500
+    - Level: 20
+      NormalChance: 5
+      EnrichedChance: 5
+      EventNormalChance: 10
+      EventEnrichedChance: 10
+      Bonus: 500
+WeaponLv1:
+  StatsPerLevel: 200
+  RandomBonusStartLevel: 8
+  RandomBonusValue: 300
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 50
+      Material: 1010
+    - Type: REFINE_COST_OVER10
+      Price: 100000
+      Material: 6224
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6240
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+    - Type: REFINE_COST_OVER10_HD
+      Price: 100000
+      Material: 6226
+  Rates:
+    - Level: 8
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 9
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 85
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 55
+    - Level: 11
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 12
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 13
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 14
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 15
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+    - Level: 16
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+      Bonus: 300
+    - Level: 17
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 300
+    - Level: 18
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 300
+    - Level: 19
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 300
+    - Level: 20
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 300
+WeaponLv2:
+  StatsPerLevel: 300
+  RandomBonusStartLevel: 7
+  RandomBonusValue: 500
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 200
+      Material: 1011
+    - Type: REFINE_COST_OVER10
+      Price: 100000
+      Material: 6224
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6240
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+    - Type: REFINE_COST_OVER10_HD
+      Price: 100000
+      Material: 6226
+  Rates:
+    - Level: 7
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 8
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 85
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 45
+    - Level: 11
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 12
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 13
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 14
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 15
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+    - Level: 16
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+      Bonus: 600
+    - Level: 17
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 600
+    - Level: 18
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 600
+    - Level: 19
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 600
+    - Level: 20
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 600
+WeaponLv3:
+  StatsPerLevel: 500
+  RandomBonusStartLevel: 6
+  RandomBonusValue: 800
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 5000
+      Material: 984
+    - Type: REFINE_COST_OVER10
+      Price: 100000
+      Material: 6224
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6240
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+    - Type: REFINE_COST_OVER10_HD
+      Price: 100000
+      Material: 6226
+  Rates:
+    - Level: 6
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 7
+      NormalChance: 50
+      EnrichedChance: 80
+      EventNormalChance: 50
+      EventEnrichedChance: 90
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 70
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 10
+      NormalChance: 19
+      EnrichedChance: 30
+      EventNormalChance: 19
+      EventEnrichedChance: 45
+    - Level: 11
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 12
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 40
+      EventEnrichedChance: 40
+    - Level: 13
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 14
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 35
+      EventEnrichedChance: 35
+    - Level: 15
+      NormalChance: 18
+      EnrichedChance: 18
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+    - Level: 16
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 30
+      EventEnrichedChance: 30
+      Bonus: 900
+    - Level: 17
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 900
+    - Level: 18
+      NormalChance: 17
+      EnrichedChance: 17
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+      Bonus: 900
+    - Level: 19
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 900
+    - Level: 20
+      NormalChance: 15
+      EnrichedChance: 15
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 900
+WeaponLv4:
+  StatsPerLevel: 700
+  RandomBonusStartLevel: 5
+  RandomBonusValue: 1400
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 20000
+      Material: 984
+    - Type: REFINE_COST_OVER10
+      Price: 100000
+      Material: 6224
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6240
+    - Type: REFINE_COST_ENRICHED
+      Price: 2000
+      Material: 7620
+    - Type: REFINE_COST_OVER10_HD
+      Price: 100000
+      Material: 6226
+  Rates:
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 60
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35
+    - Level: 11
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+    - Level: 12
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 20
+      EventEnrichedChance: 20
+    - Level: 13
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 16
+      EventEnrichedChance: 16
+    - Level: 14
+      NormalChance: 8
+      EnrichedChance: 8
+      EventNormalChance: 16
+      EventEnrichedChance: 16
+    - Level: 15
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+    - Level: 16
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 15
+      EventEnrichedChance: 15
+      Bonus: 1200
+    - Level: 17
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 14
+      EventEnrichedChance: 14
+      Bonus: 1200
+    - Level: 18
+      NormalChance: 7
+      EnrichedChance: 7
+      EventNormalChance: 14
+      EventEnrichedChance: 14
+      Bonus: 1200
+    - Level: 19
+      NormalChance: 5
+      EnrichedChance: 5
+      EventNormalChance: 10
+      EventEnrichedChance: 10
+      Bonus: 1200
+    - Level: 20
+      NormalChance: 5
+      EnrichedChance: 5
+      EventNormalChance: 10
+      EventEnrichedChance: 10
+      Bonus: 1200
+Shadow:
+  StatsPerLevel: 0
+  RandomBonusStartLevel: 0
+  RandomBonusValue: 0
+  Costs:
+    - Type: REFINE_COST_NORMAL
+      Price: 20000
+      Material: 985
+    - Type: REFINE_COST_HD
+      Price: 20000
+      Material: 6241
+    - Type: REFINE_COST_ENRICHED
+      Price: 20000
+      Material: 7619
+  Rates:
+    - Level: 5
+      NormalChance: 60
+      EnrichedChance: 90
+      EventNormalChance: 60
+      EventEnrichedChance: 95
+    - Level: 6
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 7
+      NormalChance: 40
+      EnrichedChance: 70
+      EventNormalChance: 40
+      EventEnrichedChance: 80
+    - Level: 8
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 9
+      NormalChance: 20
+      EnrichedChance: 40
+      EventNormalChance: 20
+      EventEnrichedChance: 50
+    - Level: 10
+      NormalChance: 9
+      EnrichedChance: 20
+      EventNormalChance: 9
+      EventEnrichedChance: 35

+ 2 - 2
db/re/skill_db.txt

@@ -1368,8 +1368,8 @@
 5026,9,6,1,2:3:1:4:8,0,0,5,1,yes,0,0,0,magic,0,0x0,		SU_SV_STEMSPEAR,Silvervine Stem Spear
 5027,9,6,1,0,0x3,0,5,1,yes,0,0,1,none,0,0x0,		SU_CN_POWDERING,Catnip Powdering
 5028,9,8,2,0,0,1:1:2:2:3,5,-5,yes,0,0,0,magic,0,0x0,		SU_CN_METEOR,Catnip Meteor
-5029,9,6,1,0,0x1,0,5,1,yes,0,0,1,none,0,0x0,		SU_SV_ROOTTWIST,Silvervine Root Twist
-5030,0,6,1,5,0x70,0,5,1,no,0,0,1,misc,0,0x0,	SU_SV_ROOTTWIST_ATK,Silver Vine Root Twist Attack
+5029,9,6,1,0,0x1,0,5,1,yes,0,0,0,none,0,0x0,		SU_SV_ROOTTWIST,Silvervine Root Twist
+5030,0,6,1,5,0x70,0,5,1,no,0,0,0,misc,0,0x0,	SU_SV_ROOTTWIST_ATK,Silver Vine Root Twist Attack
 5031,0,0,0,0,0,0,1,0,no,0,0,0,none,0,0x0,		SU_POWEROFLIFE,Power of Life
 5032,9,6,1,-1,0,0,5,1,yes,0,0,0,weapon,0,0x0,	SU_SCAROFTAROU,Scar of Tarou
 5033,9,8,1,-1,0,0,5,-5,yes,0,0,0,weapon,0,0x0,	SU_PICKYPECK,Picky Peck

+ 1 - 1
db/re/skill_require_db.txt

@@ -579,7 +579,7 @@
 
 2025,0,0,10,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0								//GC_CREATENEWPOISON
 2026,0,0,10,0,0,0,99,0,0,none,0,0,6128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0							//GC_ANTIDOTE
-2027,0,0,20:24:28:32:36,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_POISONINGWEAPON
+2027,0,0,20:24:28:32:36,0,0,0,1:16,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0				//GC_POISONINGWEAPON
 2028,0,0,40:36:32:28:24,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_WEAPONBLOCKING
 2029,0,0,5:8:11:14:17,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0					//GC_COUNTERSLASH
 2030,0,0,20,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0								//GC_WEAPONCRUSH

+ 106 - 0
db/readme.md

@@ -0,0 +1,106 @@
+# Import Directories
+
+## What is the import directory for?
+
+The `import/` directory provides a way for you to change your config settings without the need to even touch the main `/conf/` and `/db/` files.
+
+By placing your custom entries into the `import/` directory within these two locations, your core files will not need to have any conflicts resolved when you update your server. You store your changes, and the rest is updated with rAthena.
+
+## How does this work?
+
+Think of "import" as in "override". Place only the settings you have changed in the import files, or settings you are "overriding".
+
+For example, when setting up a server there are always a few config settings that users would like to change in order for rAthena to suit their needs. The following example will show you how to use the `/db/import/` directory correctly. (for `/conf/import/` examples, see [/conf/readme.md](/conf/readme.md))
+
+### Achievements
+---
+We want to add our own custom achievement that can be given to a player via an NPC Script and another that we can give to our GMs.
+
+#### /db/import/achievement_db.yml
+
+
+    Achievements:
+      - ID: 280000
+        Group: "AG_GOAL_ACHIEVE"
+        Name: "Emperio"
+        Reward:
+          TitleID: 1035
+        Score: 50
+      - ID: 280001
+        Group: "AG_GOAL_ACHIEVE"
+        Name: "Staff"
+        Reward:
+          TitleID: 1036
+        Score: 50
+
+
+### Instances
+---
+We want to add our own customized Housing Instance.
+
+#### /db/import/instance_db.txt
+
+    // ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,Map3,...,Map255
+    35,Home,3600,900,1@home,24,6,2@home,3@home
+
+
+### Mob Alias
+---
+We want to give a custom mob a Novice player sprite.
+
+#### /db/import/mob_avail.txt
+
+    // Structure of Database:
+    // MobID,SpriteID{,Equipment}
+    3850,0
+
+
+### Custom Maps
+---
+We want to add our own custom maps. For this we need to add our map names to `import/map_index.txt` and then to the `import/map_cache.dat` file for the Map Server to load.
+
+#### /db/import/map_index.txt
+
+    1@home	1250
+    2@home
+    3@home
+    ev_has
+    shops
+    prt_pvp
+
+
+### Item Trade Restrictions
+---
+We want to ensure that specific items cannot be traded, sold, dropped, placed in storage, etc.
+
+#### /db/import/item_trade.txt
+
+    // Legend for 'TradeMask' field (bitmask):
+    // 1   - item can't be dropped
+    // 2   - item can't be traded (nor vended)
+    // 4   - wedded partner can override restriction 2
+    // 8   - item can't be sold to npcs
+    // 16  - item can't be placed in the cart
+    // 32  - item can't be placed in the storage
+    // 64  - item can't be placed in the guild storage
+    // 128 - item can't be attached to mail
+    // 256 - item can't be auctioned
+    // Full outright value = 511
+    34000,511,100	// Old Green Box
+    34001,511,100	// House Keys
+    34002,511,100	// Reputation Journal
+
+
+### Custom Quests
+---
+We want to add our own custom quests to the quest_db.
+
+#### /db/import/quest_db.txt
+
+    // Quest ID,Time Limit,Target1,Val1,Target2,Val2,Target3,Val3,MobID1,NameID1,Rate1,MobID2,NameID2,Rate2,MobID3,NameID3,Rate3,Quest Title
+    89001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest"
+    89002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Reputation Quest"
+
+
+
+We cannot stress enough how helpful this system is for everyone. The majority of git conflicts will simply go away if users make use of the `import/` system.

+ 2 - 2
doc/item_group.txt

@@ -3,7 +3,7 @@
 //===== By: ==================================================
 //= rAthena Dev Team
 //===== Last Updated: ========================================
-//= 20131223
+//= 20170915
 //===== Description: =========================================
 //= Explanation of the item_group.txt file and structure.
 //============================================================
@@ -38,7 +38,7 @@ The table below explains which fields are accessed in each.
 
 ---------------------------------------
 
-GroupID: See the "Item Group ID" section in 'db/const.txt'.
+GroupID: See the "Item Group ID" section in 'src/map/itemdb.h' and the "item groups" section in 'src/map/script_constants.h'.
          Supports IG_* constants.
 
 ---------------------------------------

+ 51 - 14
doc/script_commands.txt

@@ -565,8 +565,7 @@ setting it will make the character own this number of Zeny.
 If you try to set Zeny to a negative number, the script will be terminated with an error.
 
 Some source-end constants can also be accessed in scripts. This list is located in
-'src/map/script.c' in the 'script_hardcoded_constants' function, which contains
-constants such as server defines and status options:
+'src/map/script_constants.h', which contains constants such as server defines and status options:
 
 	PACKETVER, MAX_LEVEL, MAX_STORAGE, MAX_INVENTORY, MAX_CART, MAX_ZENY, MAX_PARTY,
 	MAX_GUILD, MAX_GUILDLEVEL, MAX_GUILD_STORAGE, MAX_BG_MEMBERS, MAX_CHAT_USERS,
@@ -2720,14 +2719,17 @@ Examples:
 
 ---------------------------------------
 
-*getequippercentrefinery(<equipment slot>{,<char_id>})
+*getequippercentrefinery(<equipment slot>{,<enriched>,<char_id>})
 
 This function calculates and returns the percent value chance to successfully
 refine the item found in the specified equipment slot of the invoking character
 by +1. There is no actual formula, the success rate for a given weapon level of
-a certain refine level is found in the db/refine_db.txt file. For a list of
+a certain refine level is found in the db/(pre-)re/refine_db.yml file. For a list of
 equipment slots see 'getequipid'.
 
+If enriched parameter is set to true, chance to successfully refine the item with
+enriched material is returned instead.
+
 These values can be displayed for the player to see, or used to calculate the
 random change of a refine succeeding or failing and then going through with it
 (which is what the official NPC refinery scripts use it for)
@@ -2738,6 +2740,28 @@ random change of a refine succeeding or failing and then going through with it
 
 ---------------------------------------
 
+*getequiprefinecost(<equipment slot>,<type>,<information>{,<char id>})
+
+This function returns refine cost for equipment in <equipment slot> based on
+passed arguments <type> and <information>.
+
+Valid cost types are:
+
+REFINE_COST_NORMAL     - For normal refining
+REFINE_COST_OVER10     - For refining over +10
+REFINE_COST_HD         - For refining with HD ores
+REFINE_COST_ENRICHED   - For refining with enriched ores
+REFINE_COST_OVER10_HD  - For refining over +10 with HD ores
+
+This function will return required cost for refining based on <information> argument.
+
+Valid information types are:
+
+REFINE_ZENY_COST       - Zeny
+REFINE_MATERIAL_ID     - Material Item ID
+
+---------------------------------------
+
 *getareadropitem("<map name>",<x1>,<y1>,<x2>,<y2>,<item>)
 
 This function will count all the items with the specified ID number lying on the
@@ -3019,10 +3043,10 @@ It will only return numbers. If another type is supplied -1 will be returned.
 
 ---------------------------------------
 
-*gettimestr(<format string>,<max length>)
+*gettimestr(<"time format">,<max length>{,<time_tick>})
 
 This function will return a string containing time data as specified by the
-format string.
+time format.
 
 This uses the C function 'strfmtime', which obeys special format characters. For
 a full description see, for example, the description of 'strfmtime' at
@@ -3034,7 +3058,11 @@ The example given in rAthena sample scripts works like this:
 
   mes gettimestr("%Y-%m/%d %H:%M:%S",21);
 
-This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
+The example above will print the current date and time like 'YYYY-MM/DD HH:MM:SS'.
+The following example will print the date and time when the player's VIP status
+expires by the given <time_tick>:
+
+  mes gettimestr("%Y-%m/%d %H:%M:%S",21,vip_status(VIP_STATUS_EXPIRE));
 
 ---------------------------------------
 
@@ -5158,7 +5186,7 @@ window, to avoid any disruption when both windows overlap.
 *openstorage2 <storage_id>,<mode>{,<account_id>};
 
 Just like the 'openstorage' command, except this command can open additional storages
-by the specified <storage_id>. For <storage_id>, please read the conf/inter_server.conf
+by the specified <storage_id>. For <storage_id>, please read the conf/inter_server.yml
 for storage groups.
 
 Values for <mode> are:
@@ -5312,10 +5340,11 @@ Used in reset NPC's (duh!)
 
 ---------------------------------------
 
-*sc_start 	<effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}};
-*sc_start2 	<effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>{,<GID>}};
-*sc_start4 	<effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>{,<GID>}};
-*sc_end 	<effect type>{,<GID>};
+*sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}};
+*sc_start2 <effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>{,<GID>}};
+*sc_start4 <effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>{,<GID>}};
+*sc_end <effect type>{,<GID>};
+*sc_end_class {<char_id>};
 
 These commands will bestow a status effect on a character.
 
@@ -5353,6 +5382,9 @@ and theirs val1, val2, val3, and val4 usage in source.
 'sc_end' will remove a specified status effect. If SC_ALL (-1) is given, it will
 perform a complete removal of all statuses (although permanent ones will re-apply).
 
+'sc_end_class' works like 'sc_end' but will remove all status effects from any learned
+skill on the invoking character.
+
 Examples:
 	// This will poison the invoking character for 10 minutes at 50% chance.
 	sc_start SC_POISON,600000,0,5000;
@@ -7352,12 +7384,17 @@ Examples:
 *unitattack <GID>,<Target ID>{,<action type>};
 *unitattack <GID>,"<Target Name>"{,<action type>};
 
-This command will make a <GID> attack the specified target. It returns 1 upon
-success and 0 for all failures.
+This command will make a <GID> attack the specified target. It returns true upon
+success and false for all failures.
 
 If <GID> is a player and a non-zero <action type> is given, the unit will perform a
 continuous attack instead of a single attack.
 
+Note:
+Using unitattack with <GID> 0 means that it will use the currently attached unit.
+For players any attack requests will fail, because talking to an NPC prevents attacking a monster.
+Therefore you need to detach the player from the NPC before using this command.
+
 ---------------------------------------
 
 *unitkill <GID>;

+ 2 - 7
npc/custom/resetnpc.txt

@@ -1,11 +1,5 @@
 //===== rAthena Script =======================================
 //= Reset NPC
-//===== By: ==================================================
-//= rAthena Dev Team
-//===== Current Version: =====================================
-//= 1.4
-//===== Compatible With: =====================================
-//= rAthena Project
 //===== Description: =========================================
 //= Resets skills, stats, or both.
 //===== Additional Comments: =================================
@@ -15,6 +9,7 @@
 //= 1.3 All statuses removed upon skill reset. [Euphy]
 //= 1.4 Compressed Script, Added limit use option [Stolao]
 //=	Changed set -> setarray, Improved text with F_InsertPlural
+//= 1.5 Added sc_end_class to reset related status changes [sader1992]
 //============================================================
 prontera,150,193,4	script	Reset Girl	124,{
 	//	 		Skills,	Stats,	Both,	Limit
@@ -44,7 +39,7 @@ prontera,150,193,4	script	Reset Girl	124,{
 	}
 	set Zeny, Zeny-.@Reset[.@i-1];
 	if(.@i&1){
-		sc_end SC_ALL;// TODO make a sc_end current classes sc only
+		sc_end_class;
 		ResetSkill;
 	}
 	if(.@i&2) ResetStatus;

+ 2 - 1
npc/jobs/2-1/assassin.txt

@@ -1606,7 +1606,8 @@ OnTouch_:
 	if (ASSIN_Q == 5 || ASSIN_Q == 6) {
 		warp "in_moc_16",181,183;
 		set ASSIN_Q,ASSIN_Q+1;
-		changequest 8005,8006;
+		if (!isbegin_quest(8006))
+			changequest 8005,8006;
 	}
 	else {
 		mapannounce "in_moc_16",strcharinfo(0)+" has entered 'Guildmaster's room.'",bc_map;

+ 5 - 22
npc/merchants/advanced_refiner.txt

@@ -1,22 +1,11 @@
 //===== rAthena Script =======================================
 //= Advanced Refiner
-//===== By: ==================================================
-//= L0ne_W0lf
-//===== Current Version: =====================================
-//= 1.6
-//===== Compatible With: =====================================
-//= rAthena Project
 //===== Description: =========================================
 //= [Official Conversion]
 //= Refiner that uses Enriched ores to increase upgrade success.
-//= After a conversation with Doddler, it's been established that
-//= the advanced refiner works similar the the "Bubble Gum" item.
-//= The success percentage is not "increased" however, if it fails
-//= You get a second try. This tries twice at the same time,
-//= effectively giving you a re-roll on your attempt.
 //= - Dialog is only partly official to iRO.
 //= - Uses the iRO position for this NPC.
-//===== Additional Comments: =================================
+//===== Changelog: ===========================================
 //= 1.0 First Version. [L0ne_W0lf]
 //= 1.1 Fixed a weird carriage return. o_o [L0ne_W0lf]
 //= 1.2 Optimizing refine method [Zephyrus]
@@ -26,6 +15,7 @@
 //= 1.4b Fixed coordinates. [Euphy]
 //= 1.5 Some official script updates. [Euphy]
 //= 1.6 Added VIP features. [Euphy]
+//= 1.7 Removed re-roll behavior. [Secret]
 //============================================================
 
 payon,157,146,6	script	Suhnbi#cash	85,{
@@ -65,19 +55,12 @@ payon,157,146,6	script	Suhnbi#cash	85,{
 		close;
 	}
 
-	// Make sure you have the neccessary items and Zeny to refine your items
-	// Determines chance of failure and verifies that you want to continue.
-	switch(getequipweaponlv(.@part)) {
-		case 1: callsub S_RefineValidate,1,7620,50,.@part; break;
-		case 2: callsub S_RefineValidate,2,7620,200,.@part; break;
-		case 3: callsub S_RefineValidate,3,7620,5000,.@part; break;
-		case 4: callsub S_RefineValidate,4,7620,20000,.@part; break;
-		default: callsub S_RefineValidate,0,7619,2000,.@part; break;
-	}
+	.@price = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);
 
 	mes "[Suhnbi]";
 	mes "Clang! Clang! Clang!";
-	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+	if (getequippercentrefinery(.@part, true) > rand(100)) {
 		successrefitem .@part;
 		next;
 		emotion e_no1;

+ 81 - 111
npc/merchants/refine.txt

@@ -38,7 +38,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 986,1; // Anvil
-			set Zeny, Zeny-30000;
+			Zeny = Zeny-30000;
 			mes "[Christopher Guillenrow]";
 			mes "This is the cheapest one, but efficient enough to forge most items. Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
 			close;
@@ -49,7 +49,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 987,1; // Oridecon_Anvil
-			set Zeny, Zeny-120000;
+			Zeny = Zeny-120000;
 			mes "[Christopher Guillenrow]";
 			mes "Aye, friend ye have an eye for the anvil. This must be the proper anvil for a Blacksmith, eh? Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
 			close;
@@ -60,7 +60,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 988,1; // Golden_Anvil
-			set Zeny, Zeny-300000;
+			Zeny = Zeny-300000;
 			mes "[Christopher Guillenrow]";
 			mes "This one is the best among all me stuffs in me workshop! With this, ye can rule the Blacksmith world! Thank ye fer shopping at me workshop.  Feel free to come anytime, whenever ye need.";
 			close;
@@ -101,7 +101,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 					break;
 				}
 			}
-			set .@sell,.@input * 150;
+			.@sell = .@input * 150;
 			if (Zeny < .@sell) {
 				mes "[Christopher Guillenrow]";
 				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
@@ -113,7 +113,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 612,.@input; // Portable_Furnace
-			set Zeny, Zeny-.@sell;
+			Zeny = Zeny-.@sell;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
 			close;
@@ -124,7 +124,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 613,1; // Iron_Hammer
-			set Zeny, Zeny-1000;
+			Zeny = Zeny-1000;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
 			close;
@@ -135,7 +135,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 614,1; // Golden_Hammer
-			set Zeny, Zeny-3000;
+			Zeny = Zeny-3000;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
 			close;
@@ -146,7 +146,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 615,1; // Oridecon_Hammer
-			set Zeny, Zeny-5000;
+			Zeny = Zeny-5000;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
 			close;
@@ -182,7 +182,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 					break;
 				}
 			}
-			set .@sell,.@input * 200;
+			.@sell = .@input * 200;
 			if (Zeny < .@sell) {
 				mes "[Christopher Guillenrow]";
 				mes "Ye don't have enough money. Ye know I can't sell this at a lower price... You know how the wifey nags about Zeny.";
@@ -194,7 +194,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 1010,.@input; // Phracon
-			set Zeny, Zeny-.@sell;
+			Zeny = Zeny-.@sell;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need.";
 			close;
@@ -220,7 +220,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 					break;
 				}
 			}
-			set .@sell,.@input * 1000;
+			.@sell = .@input * 1000;
 			if (Zeny < .@sell) {
 				mes "[Christopher Guillenrow]";
 				mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye.";
@@ -232,7 +232,7 @@ geffen_in,110,172,0	script	Christopher#1	63,{
 				close;
 			}
 			getitem 1011,.@input; // Emveretarcon
-			set Zeny, Zeny-.@sell;
+			Zeny = Zeny-.@sell;
 			mes "[Christopher Guillenrow]";
 			mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need, whenever ye want.";
 			close;
@@ -314,7 +314,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 				close;
 			}
 			getitem 986,1; //Anvil
-			set Zeny, Zeny-30000;
+			Zeny = Zeny-30000;
 			mes "[Paul Spanner]";
 			mes "It is the cheapest anvil which has the most basic ability.";
 			mes "Thank you for using my shop. If you need anything, just let me know.";
@@ -326,7 +326,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 				close;
 			}
 			getitem 987,1; //Oridecon_Anvil
-			set Zeny, Zeny-120000;
+			Zeny = Zeny-120000;
 			mes "[Paul Spanner]";
 			mes "Ah, you have an eye for anvil. A Blacksmith needs an anvil at least as good as this.";
 			mes "Thank you for using my shop. If you need anything, just let me know.";
@@ -338,7 +338,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 				close;
 			}
 			getitem 988,1; //Golden_Anvil
-			set Zeny, Zeny-300000;
+			Zeny = Zeny-300000;
 			mes "[Paul Spanner]";
 			mes "I can tell your ambition to become a good Blacksmith just by looking at you to choose this Golden Anvil!";
 			mes "This anvil will surely aid you in creating the best weapons.";
@@ -360,27 +360,27 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 		next;
 		switch(select("Mini Furnace - 150z.:Iron Hammer - 1,000z.:Golden Hammer - 3,000z.:Oridecon Hammer - 5,000z.:Cancel.")) {
 		case 1:
-			set .@item,612;
-			set .@item_cost,150;
-			set .@item_weight,200;
+			.@item = 612;
+			.@item_cost = 150;
+			.@item_weight = 200;
 			mes "[Paul Spanner]";
 			mes "You definately need this furnce to process ores!";
 			next;
 			break;
 		case 2:
-			set .@item,613;
-			set .@item_cost,1000;
-			set .@item_weight,200;
+			.@item = 613;
+			.@item_cost = 1000;
+			.@item_weight = 200;
 			break;
 		case 3:
-			set .@item,614;
-			set .@item_cost,3000;
-			set .@item_weight,300;
+			.@item = 614;
+			.@item_cost = 3000;
+			.@item_weight = 300;
 			break;
 		case 4:
-			set .@item,615;
-			set .@item_cost,5000;
-			set .@item_weight,400;
+			.@item = 615;
+			.@item_cost = 5000;
+			.@item_weight = 400;
 			break;
 		case 5:
 			mes "[Paul Spanner]";
@@ -406,7 +406,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 				break;
 			}
 		}
-		set .@sell,.@input * .@item_cost;
+		.@sell = .@input * .@item_cost;
 		if (Zeny < .@sell) {
 			mes "[Paul Spanner]";
 			mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
@@ -417,7 +417,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 			mes "Hey, you look pale. Why don't you go lighten your weight first.";
 			close;
 		}
-		set Zeny, Zeny-.@sell;
+		Zeny = Zeny-.@sell;
 		getitem .@item,.@input;
 		mes "[Paul Spanner]";
 		mes "Thank you for using my shop. If you need anything, just let me know.";
@@ -429,12 +429,12 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 		next;
 		switch(select("Phracon - 200z.:Emveretarcon - 1,000z.:Quit.")) {
 		case 1:
-			set .@item,1010;
-			set .@item_price,200;
+			.@item = 1010;
+			.@item_price = 200;
 			break;
 		case 2:
-			set .@item,1011;
-			set .@item_price,1000;
+			.@item = 1011;
+			.@item_price = 1000;
 			break;
 		case 3:
 			mes "[Paul Spanner]";
@@ -460,7 +460,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 				break;
 			}
 		}
-		set .@sell,.@input * .@item_price;
+		.@sell = .@input * .@item_price;
 		if (Zeny < .@sell) {
 			mes "[Paul Spanner]";
 			mes "You don't have enough money. Sorry, I cannot sell them at a loss.";
@@ -472,7 +472,7 @@ ein_in01,38,29,0	script	Paul Spanner	63,{
 			close;
 		}
 		getitem .@item,.@input;
-		set Zeny, Zeny-.@sell;
+		Zeny = Zeny-.@sell;
 		mes "[Paul Spanner]";
 		mes "Thank you for using my shop. If you need anything, just let me know.";
 		close;
@@ -562,7 +562,7 @@ lhz_in02,282,20,7	script	Fulerr	869,{
 function	script	refinemain	{
 	disable_items;
 	.@npc_name$ = getarg(0);
-	set .@features,getarg(1);
+	.@features = getarg(1);
 	mes "["+ .@npc_name$ +"]";
 	mes "I'm the Armsmith.";
 	mes "I can refine all kinds of weapons, armor and equipment, so let me";
@@ -570,19 +570,19 @@ function	script	refinemain	{
 	next;
 
 	setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
-	for(set .@i,1; .@i<getarraysize(.@indices); set .@i,.@i+1) {
+	for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) {
 		if(getequipisequiped(.@indices[.@i])) {
-			set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
-			set .@equipped,1;
+			.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
+			.@equipped = 1;
 		}
-		set .@menu$, .@menu$ + ":";
+		.@menu$ = .@menu$ + ":";
 	}
 	if (.@equipped == 0) {
 		mes "["+ .@npc_name$ +"]";
 		mes "I don't think I can refine any items you have...";
 		close;
 	}
-	set .@part, .@indices[select(.@menu$)];
+	.@part = .@indices[select(.@menu$)];
 
 	if(!getequipisequiped(.@part)) { //custom check
 		mes "["+ .@npc_name$ +"]";
@@ -607,50 +607,20 @@ function	script	refinemain	{
 		mes "refined as it gets!";
 		close;
 	}
-	set .@refineitemid, getequipid(.@part); // save id of the item
-	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
-	switch(getequipweaponlv(.@part)){
-	case 0: 	//Refine Armor
-		set .@price,2000;
-		set .@material,985; //Elunium
-		set .@safe,4;
-		break;
-	case 1: 	//Refine Level 1 Weapon
-		set .@price,50;
-		set .@material,1010; //Phracon
-		set .@safe,7;
-		break;
-	case 2: 	//Refine Level 2 Weapon
-		set .@price,200;
-		set .@material,1011; //Emveretarcon
-		set .@safe,6;
-		break;
-	case 3: 	//Refine Level 3 Weapon
-		set .@price,5000;
-		set .@material,984; //Oridecon
-		set .@safe,5;
-		break;
-	case 4: 	//Refine Level 4 Weapon
-		set .@price,20000;
-		set .@material,984; //Oridecon
-		set .@safe,4;
-		break;
-	case 5: 	//Refine other stuff?
-		set .@price,2000;
-		set .@material,985; //Elunium
-		set .@safe,4;
-		break;
-	}
+	.@refineitemid = getequipid(.@part); // save id of the item
+	.@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
+	.@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
 
 	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
 	if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
 		switch(getequipweaponlv(.@part)) {
-			case 0: set .@price, .@price * 10; break;
-			case 1: set .@price, .@price * 40; break;
-			case 2: set .@price, .@price * 50; break;
-			case 3: set .@price, .@price * 2; break;
-			case 4: set .@price, .@price * 2; break;
-			case 5: set .@price, .@price * 10; break;
+			case 0: .@price = .@price * 10; break;
+			case 1: .@price = .@price * 40; break;
+			case 2: .@price = .@price * 50; break;
+			case 3: .@price = .@price * 2; break;
+			case 4: .@price = .@price * 2; break;
+			case 5: .@price = .@price * 10; break;
 		}
 	}
 
@@ -705,7 +675,7 @@ function	script	refinemain	{
 			mes "here all day if you need me.";
 			close;
 		}
-		set Zeny, Zeny-.@price;
+		Zeny = Zeny-.@price;
 		delitem .@material,1;
 
 		// anti-hack
@@ -723,7 +693,7 @@ function	script	refinemain	{
 			failedrefitem .@part;
 			mes "["+ .@npc_name$ +"]";
 			emotion (!rand(5))?e_cash:e_omg;
-			set .@lose,rand(1,3);
+			.@lose = rand(1,3);
 			if (.@lose == 1) {
 				mes "OH! MY GOD!";
 				mes "Damn it! Not again!";
@@ -744,7 +714,7 @@ function	script	refinemain	{
 		mes "["+getarg(0)+"]";
 		successrefitem .@part;
 		emotion e_heh;
-		set .@win,rand(1,3);
+		.@win = rand(1,3);
 		if (.@win == 1) {
 			mes "Perfect!";
 			mes "Heh heh!";
@@ -771,12 +741,12 @@ function	script	refinemain	{
 		mes "["+ .@npc_name$ +"]";
 		mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
 		next;
-		set .@menu2,select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
+		.@menu2 = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
 	} else
-		set .@menu2,2;
+		.@menu2 = 2;
 	switch(.@menu2){
 	case 1: 
-		set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
+		.@refinecnt = .@safe - getequiprefinerycnt(.@part);
 		break;
 	case 2:
 		next;
@@ -784,14 +754,14 @@ function	script	refinemain	{
 		mes "How many times would you like me to refine your item?";
 		next;
 		input .@refinecnt;
-		set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
+		.@refinecheck = .@refinecnt + getequiprefinerycnt(.@part);
 		if (.@refinecnt < 1 || .@refinecheck > 10) {
 			mes "["+ .@npc_name$ +"]";
 			mes "I can't refine this item that many times.";
 			close;
 		}
 		if(.@refinecheck > .@safe) {
-			set .@refinecheck,.@refinecheck - .@safe;
+			.@refinecheck = .@refinecheck - .@safe;
 			mes "["+ .@npc_name$ +"]";
 			mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
 			next;
@@ -808,7 +778,7 @@ function	script	refinemain	{
 		mes "You said so... So be it.";
 		close;
 	}
-	set .@fullprice,.@price * .@refinecnt;
+	.@fullprice = .@price * .@refinecnt;
 	mes "["+ .@npc_name$ +"]";
 	mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
 	next;
@@ -822,7 +792,7 @@ function	script	refinemain	{
 		mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
 		close;
 	}
-	set Zeny, Zeny - .@fullprice;
+	Zeny = Zeny - .@fullprice;
 	delitem .@material,.@refinecnt;
 	while(.@refinecnt){
 		if (getequipisequiped(.@part) == 0) {
@@ -843,17 +813,17 @@ function	script	refinemain	{
 			emotion e_omg;
 			mes "["+ .@npc_name$ +"]";
 			mes "WAHHHH!!! I'm so sorry... I warned you this could happen...";
-			set .@refinecnt,.@refinecnt - 1;
+			.@refinecnt = .@refinecnt - 1;
 			if(.@refinecnt == 0) close;
 			mes "Here's the unused Zeny and materials back...";
 			getitem .@material,.@refinecnt;
-			set .@fullprice,.@refinecnt * .@price;
-			set Zeny, Zeny + .@fullprice;
+			.@fullprice = .@refinecnt * .@price;
+			Zeny = Zeny + .@fullprice;
 			close;
 		}
 		successrefitem .@part;
 		emotion e_no1;
-		set .@refinecnt,.@refinecnt - 1;
+		.@refinecnt = .@refinecnt - 1;
 		next;
 	}
 	mes "["+ .@npc_name$ +"]";
@@ -913,12 +883,12 @@ function	script	phramain	{
 	next;
 	switch(select("Phracon - 200 Zeny:Emveretarcon - 1000 Zeny:Ask about other Metals")) {
 	case 1:
-		set .@material,1010;
-		set .@price,200;
+		.@material = 1010;
+		.@price = 200;
 		break;
 	case 2:
-		set .@material,1011;
-		set .@price,1000;
+		.@material = 1011;
+		.@price = 1000;
 		break;
 	case 3:
 		mes "["+ .@npc_name$ +"]";
@@ -951,7 +921,7 @@ function	script	phramain	{
 			break;
 		}
 	}
-	set .@sell,.@input * .@price;
+	.@sell = .@input * .@price;
 	if (Zeny < .@sell) {
 		mes "["+ .@npc_name$ +"]";
 		mes "Err...";
@@ -967,7 +937,7 @@ function	script	phramain	{
 		close;
 	}
 	getitem .@material,.@input;
-	set Zeny, Zeny-.@sell;
+	Zeny = Zeny-.@sell;
 	mes "["+ .@npc_name$ +"]";
 	mes "Here you are!";
 	mes "Thank you for";
@@ -1151,7 +1121,7 @@ sch_gld,340,80,7	script	Repairman#sch_gld	86,{
 // Equipment Repair Function
 //============================================================
 function	script	repairmain	{
-	set .@repairprice,5000;
+	.@repairprice = 5000;
 	.@npc_name$ = getarg(0);
 	mes "["+ .@npc_name$ +"]";
 	mes "Hey there!";
@@ -1162,14 +1132,14 @@ function	script	repairmain	{
 	next;
 	switch(select("Actually, I do have some items...:None at the moment.")) {
 	case 1:
-		set .@checkitem,1;
+		.@checkitem = 1;
 		while (1) {
 			if (getbrokenid(.@checkitem) == 0) {
 				break;
 			}
-			set .@checkitem,.@checkitem+1;
+			.@checkitem = .@checkitem+1;
 		}
-		set .@checkitem,.@checkitem-1;
+		.@checkitem = .@checkitem-1;
 		if (!.@checkitem) {
 			mes "["+ .@npc_name$ +"]";
 			mes "Oh wow, this is incredible!";
@@ -1186,7 +1156,7 @@ function	script	repairmain	{
 		mes "" + .@checkitem + " are damaged.";
 		mes "Would you like to repair?";
 		next;
-		set .@totalcost,.@repairprice*.@checkitem;
+		.@totalcost = .@repairprice*.@checkitem;
 		mes "["+ .@npc_name$ +"]";
 		mes "Each repair costs " + .@repairprice + " Zeny. So to repair all your damaged items would cost " + .@totalcost + " Zeny! Would you like to repair the items?";
 		next;
@@ -1198,19 +1168,19 @@ function	script	repairmain	{
 				mes "Check your wallet before you receive the repair bill! I can't repair anything because you don't have enough Zeny.";
 				close;
 			}
-			set .@checkitem2,1;
+			.@checkitem2 = 1;
 			while (1) {
 				if (getbrokenid(.@checkitem2) == 0) {
 					break;
 				}
-				set .@checkitem2,.@checkitem2+1;
+				.@checkitem2 = .@checkitem2+1;
 			}
-			set .@checkitem2,.@checkitem2-1;
+			.@checkitem2 = .@checkitem2-1;
 			if (.@checkitem == .@checkitem2) {
-				set Zeny, Zeny-.@totalcost;
+				Zeny = Zeny-.@totalcost;
 				while (.@checkitem) {
 					repair(.@checkitem);
-					set .@checkitem,.@checkitem-1;
+					.@checkitem = .@checkitem-1;
 				}
 				mes "["+ .@npc_name$ +"]";
 				mes "Okay! All done. Now, try to be a little more careful. Items have lives too you know.";

+ 3 - 3
npc/quests/quests_moscovia.txt

@@ -9075,7 +9075,7 @@ OnTouch_:
 		}
 	}
 	emotion e_what,1;
-	close;
+	end;
 }
 
 mosk_que,45,131,0	script	Stone Furnace#rus28	HIDDEN_NPC,{
@@ -9124,7 +9124,7 @@ mosk_que,45,131,0	script	Stone Furnace#rus28	HIDDEN_NPC,{
 		}
 	}
 	emotion e_what,1;
-	close;
+	end;
 
 OnMyMobDead:
 	stopnpctimer;
@@ -9173,7 +9173,7 @@ mosk_que,56,202,0	script	Occult Apple Tree#rus29	HIDDEN_NPC,{
 		}
 	}
 	emotion e_what,1;
-	close;
+	end;
 }
 
 mosk_que,47,217,0	warp	Escape#rus30	3,3,mosk_fild02,237,266

+ 10 - 4
npc/re/custom/lasagna/lasagna_npcs.txt

@@ -1628,12 +1628,18 @@ lasagna,208,188,3	script	Cat Paw Service#lasagna	4_M_MERCAT1,4,4,{
 		savepoint "lasagna",193,183,1,1;
 		close;
 	case 2:
-		if (getskilllv("SU_BASIC_SKILL") < 1) {
+		if (!callfunc("F_CanOpenStorage")) {
 			mes "[Cat Paw Commerce Group]";
 			mes "I'm sorry, but...";
-			mes "You should learn some basic skills first if you want to use the warehouse.";
-			mes "Go and learn the skills until you reach the level to use the warehouse.";
-			mes "I believe it should be ^4d4dffbasic level 6^000000 for humans.";
+			if (Class == Job_Summoner) {
+				mes "You should learn the new basic skill first.";
+				mes "Go and learn the skill if you want to use the warehouse.";
+			}
+			else {
+				mes "You should learn some basic skills first if you want to use the warehouse.";
+				mes "Go and learn the skills until you reach the level to use the warehouse.";
+				mes "I believe it should be ^4d4dffbasic level 6^000000 for humans.";
+			}
 			close;
 		}
 		if (countitem(7059) > 0)// Free Ticket for Kafra Storage

+ 991 - 0
npc/re/instances/GhostPalace.txt

@@ -0,0 +1,991 @@
+//===== rAthena Script =======================================
+//= Ghost Palace
+//===== Description: =========================================
+//= [Walkthrough Conversion]
+//= Ghost Palace Instance
+//===== Changelogs: ==========================================
+//= 1.0 First version. [Capuche]
+//============================================================
+
+dali02,43,129,5	script	Unpleasant Royal Guard#	4_M_SAKRAYROYAL,{
+	if (BaseLevel < 120) {
+		mes "[Unpleasant Royal Guard]";
+		mes "Althought I need help with a task, you are not strong enough to assist me, noob~!";
+		next;
+		mes "[Unpleasant Royal Guard]";
+		mes "Come back later when you have done some training and are at least level 120!";
+		close;
+	}
+	.@party_id = getcharid(1);
+	if (getcharid(0) != getpartyleader(.@party_id,2) || .@party_id < 1) {
+		mes "[Unpleasant Royal Guard]";
+		mes "I can only open the secret passage for party leaders. Please have your party leader talk to me.";
+		close;
+	}
+	switch( checkquest(1261,PLAYTIME) ) {
+	case -1:
+		break;
+	case 0:
+	case 1:
+		mes "[Unpleasant Royal Guard]";
+		mes "Have you found the princess yet?! Is she safe?";
+		close;
+	case 2:
+		mes "[Unpleasant Royal Guard]";
+		mes "The monsters around the secret passage have disappeared. Now is our chance to save the princess!";
+		erasequest 1261;// Cursed Swordman
+		close;
+	}
+	mes "[Unpleasant Royal Guard]";
+	mes "I need help, even from the likes of you.";
+	next;
+	mes "[Unpleasant Royal Guard]";
+	mes "In the middle of battle the princess disappeared while I was guarding the palace.";
+	next;
+	mes "[Unpleasant Royal Guard]";
+	mes "You run ahead and I will catch up. We must save her.";
+	next;
+	if (select( "I will help.", "This is not a good time." ) == 2) {
+		mes "[Unpleasant Royal Guard]";
+		mes "Even now all the royal guards are fighting and dying from the monsters.";
+		next;
+		mes "[Unpleasant Royal Guard]";
+		mes "We must, no matter how much fear grips our hearts, save the princess!";
+		close;
+	}
+	instance_create("Ghost Palace");
+	mes "[Unpleasant Royal Guard]";
+	mes "Thank you..";
+	mes "I will open the secret passage to the ^0000ffGhost Palace^000000.";
+	mes "Please be ready!";
+	close;
+}
+
+dali02,40,134,5	script	Interdimensional Device#dk	PORTAL,{
+	if (BaseLevel < 120) {
+		mes "[Unpleasant Royal Guard]";
+		mes "Althought I need help with a task, you are not strong enough to assist me, noob~!";
+		next;
+		mes "[Unpleasant Royal Guard]";
+		mes "Come back later when you have done some training and are at least level 120!";
+		close;
+	}
+	mes "[Unpleasant Royal Guard]";
+	mes "I can see the secret passage into the palace. Are you ready to save the princess?!";
+	next;
+	if (select( "Enter", "Stop" ) == 2) {
+		mes "[Unpleasant Royal Guard]";
+		mes "Even now all the royal guards are fighting and dying from the monsters.";
+		next;
+		mes "[Unpleasant Royal Guard]";
+		mes "We must, no matter how much fear grips our hearts, save the princess!";
+		close;
+	}
+	switch( checkquest(1261,PLAYTIME) ) {
+	case -1:
+		break;
+	case 0:
+	case 1:
+		mes "[Unpleasant Royal Guard]";
+		mes "The monsters that attacked the palace are wandering around the secret entrance. It would be very bad if they spotted us... Please wait.";
+		next;
+		mes "When the time limit for the entrance is up";
+		mes "let's try to re-enter.";
+		close;
+	case 2:
+		mes "^0000ffThe time limit for entering to the Curse of the Swordsman is finished. Please try to talk to the Unpleasent Royal Guard again..^000000";
+		erasequest 1261;// Cursed Swordman
+		close;
+	}
+	.@party_id = getcharid(1);
+	if (getcharid(0) != getpartyleader(.@party_id,2) || .@party_id < 1) {
+		mes "[Unpleasant Royal Guard]";
+		mes "I can only open the secret passage for party leaders. Please have your party leader talk to me.";
+		close;
+	}
+
+	.@md_name$ = "Ghost Palace";
+	switch( instance_enter(.@md_name$) ) {
+	case IE_OTHER:
+		mes "An unknown error occurred.";
+		close;
+	case IE_NOINSTANCE:
+		mes "^ff0000Inside the devices you see a dark hole. If you wish to enter you must to talk to the Unpleasent Royal Guard first.^000000";
+		close;
+	case IE_NOMEMBER:
+		mes "Only registered members can enter the " + .@md_name$ + " instance.";
+		close;
+	case IE_OK:
+		mapannounce "dali", "" + strcharinfo(0) + " of the party, " + getpartyname(.@party_id) + ", is entering the Ghost Palace.", bc_map, 0x00ff99;
+		// warp "1@spa",42,196;
+		setquest 1261;// Cursed Swordman
+		end;
+	}
+}
+
+// 1st floor
+1@spa,41,204,5	script	King#dk	4_M_RUSKING,{
+	mes "[King]";
+	mes "You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else.";
+	npctalk "King: You are hereby appointed as the personal guard to Princess Tiara. I trust your loyalty above all else.";
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "I will protect the princess with my life.";
+	npctalk "Lurid Royal Guard: I will protect the princess with my life.", instance_npcname("Lurid Royal Guard#dk");
+	next;
+	mes "[King]";
+	mes "The marriage arrangements are going as planned. The prince is here to meet with the princess.";
+	npctalk "King: The marriage arrangements are going as planned. The prince is here to meet with the princess.";
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "...Yes, your majesty.";
+	npctalk "Lurid Royal Guard: ...Yes, your majesty.", instance_npcname("Lurid Royal Guard#dk");
+	next;
+	mes "[King]";
+	mes "My gods, there are monsters in the castle! Get rid of them now!";
+	npctalk "King: My gods, there are monsters in the castle! Get rid of them now!";
+	close2;
+	donpcevent instance_npcname("#gp_control_1") + "::OnStart";
+	end;
+
+OnInstanceInit:
+	// 1: enabled potential double spawn (official), 0: disabled
+	'bool_double_spawn = 1;
+
+	'map_spa$ = instance_mapname("1@spa");
+
+	// warps
+	disablenpc instance_npcname("The second floor of Palace");
+	disablenpc instance_npcname("3rd floor in the palace");
+	disablenpc instance_npcname("4th floor in the palace");
+	disablenpc instance_npcname("5th floor of Palace");
+	disablenpc instance_npcname("Way out of Palace");
+
+	// first floor
+	disablenpc instance_npcname("#gp_control_1");
+
+	// second floor
+	disablenpc instance_npcname("Lurid Royal Guard#dk1");
+	disablenpc instance_npcname("Princess Tiara#dk");
+	disablenpc instance_npcname("#gp_control_2");
+
+	// 3rd floor
+	disablenpc instance_npcname("King#dk1");
+	disablenpc instance_npcname("Lurid Royal Guard#dk2");
+	disablenpc instance_npcname("Captain of the Guard#dk");
+	disablenpc instance_npcname("Soldier#dk1");
+	disablenpc instance_npcname("Soldier#dk2");
+	disablenpc instance_npcname("Soldier#dk3");
+	disablenpc instance_npcname("Lurid Royal Guard#dk3");
+	disablenpc instance_npcname("Thanatos Magic Trace#dk1");
+	disablenpc instance_npcname("#gp_control_3");
+
+	// 4th floor
+	disablenpc instance_npcname("#gp_control_4");
+	disablenpc instance_npcname("#gp_control_5");
+	disablenpc instance_npcname("Thanatos Magic Trace#dk2");
+	disablenpc instance_npcname("Visiting Prince#dk");
+	disablenpc instance_npcname("Lurid Royal Guard#dk4");
+	disablenpc instance_npcname("King's Corpse#dk");
+	disablenpc instance_npcname("Captain's Corpse#dk");
+	disablenpc instance_npcname("Soldier's Corpse#dk");
+	disablenpc instance_npcname("Soldier's Corpse#dk1");
+	disablenpc instance_npcname("Soldier's Corpse#dk2");
+	disablenpc instance_npcname("Soldier's Corpse#dk3");
+	disablenpc instance_npcname("Soldier's Corpse#dk4");
+
+	// 5th floor
+	disablenpc instance_npcname("#gp_control_6");
+	disablenpc instance_npcname("Princess Tiara#dk1");
+	disablenpc instance_npcname("Lurid Royal Guard#dk5");
+	disablenpc instance_npcname("King#dk11");
+	disablenpc instance_npcname("Sakray#dk");
+	disablenpc instance_npcname("Thanatos Magic Trace#dk3");
+	disablenpc instance_npcname("#tb");
+	disablenpc instance_npcname("#sv");
+	disablenpc instance_npcname("#tv");
+	end;
+}
+
+1@spa,42,201,1	script	Lurid Royal Guard#dk	4_M_SAKRAYROYAL,{ end; }
+
+1@spa,1,1,1	script	#gp_control_1	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_1");
+	disablenpc instance_npcname("King#dk");
+	disablenpc instance_npcname("Lurid Royal Guard#dk");
+	initnpctimer;
+	end;
+OnTimer2000:
+	.@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead1";
+	monster 'map_spa$,50,194,"Cursed Soldier",2948,1, .@label$;		// CURSED_SOLDIER
+	monster 'map_spa$,34,208,"Cursed Soldier",2948,1, .@label$;		// CURSED_SOLDIER
+	monster 'map_spa$,32,194,"Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	monster 'map_spa$,52,209,"Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	stopnpctimer;
+	end;
+OnMyMobDead1:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead1") < (1 + 'bool_double_spawn)) {
+		deltimer instance_npcname("#gp_control_1") + "::OnSpawn1";	// stop double spawn if timer is running
+		addtimer 2000, instance_npcname("#gp_control_1") + "::OnSpawn1";
+	}
+	end;
+OnSpawn1:
+	.@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead2";
+	monster 'map_spa$,37,182,"Cursed Soldier",2948,1, .@label$;		// CURSED_SOLDIER
+	monster 'map_spa$,46,182,"Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	end;
+OnMyMobDead2:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead2") < 1) {
+		deltimer instance_npcname("#gp_control_1") + "::OnSpawn1";	// stop double spawn if timer is running
+		deltimer instance_npcname("#gp_control_1") + "::OnSpawn2";
+		addtimer 2000, instance_npcname("#gp_control_1") + "::OnSpawn2";
+	}
+	end;
+OnSpawn2:
+	.@label$ = instance_npcname("#gp_control_1") + "::OnMyMobDead3";
+	monster 'map_spa$,30,200,"Cursed Soldier",2948,1, .@label$;		// CURSED_SOLDIER
+	monster 'map_spa$,51,200,"Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	monster 'map_spa$,53,199,"Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	end;
+OnMyMobDead3:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead3") < 1) {
+		mapannounce 'map_spa$, "The passage on the 2nd floor in the palace of ghost is open .", bc_map,0xFFFF00;
+		enablenpc instance_npcname("The second floor of Palace");
+		enablenpc instance_npcname("Lurid Royal Guard#dk1");
+		enablenpc instance_npcname("Princess Tiara#dk");
+	}
+	end;
+}
+
+// 2nd floor
+1@spa,132,122,7	script	Lurid Royal Guard#dk1	4_M_SAKRAYROYAL,{
+	.@tiara$ = instance_npcname("Princess Tiara#dk");
+	cutin "npc-tiara.bmp",3;
+	mes "[Lurid Royal Guard]";
+	mes "Your highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him...";
+	npctalk "Lurid Royal Guard: Your highness, the King has invited a prince from a neighboring country to be your betrothed. Be ready to meet him...";
+	next;
+	mes "[Princess Tiara]";
+	mes "If...If a marriage is arranged what should I do?";
+	npctalk "Princess Tiara: If...If a marriage is arranged what should I do?", .@tiara$;
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "The only thing I can do is protect you from physical harm.";
+	npctalk "Lurid Royal Guard: The only thing I can do is protect you from physical harm.";
+	next;
+	mes "[Princess Tiara]";
+	mes "Then, what can I do?";
+	npctalk "Princess Tiara: Then, what can I do?", .@tiara$;
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "You must decide that for yourself your highness...";
+	npctalk "Lurid Royal Guard: You must decide that for yourself your highness...";
+	next;
+	mes "[Princess Tiara]";
+	mes "Would it be easier for you if I were married and sent off to another country?";
+	npctalk "Princess Tiara: Would it be easier for you if I were married and sent off to another country?", .@tiara$;
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "I will always stand by you and protect you forever.";
+	npctalk "Lurid Royal Guard: I will always stand by you and protect you forever.";
+	cutin "npc-tiara.bmp",255;
+	next;
+	mes "[Princess Tiara]";
+	mes "Monsters have gotten inside the castle? Please, protect me!";
+	npctalk "Princess Tiara: Monsters have gotten inside the castle? Please, protect me!", .@tiara$;
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "Stay behind me. Let's go!";
+	npctalk "Lurid Royal Guard: Stay behind me. Let's go!";
+	close2;
+	donpcevent instance_npcname("#gp_control_2") + "::OnStart";
+	end;
+}
+
+1@spa,135,125,3	duplicate(Lurid Royal Guard#dk)	Princess Tiara#dk	4_F_MAYSEL
+
+1@spa,1,1,1	script	#gp_control_2	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_2");
+	disablenpc instance_npcname("Lurid Royal Guard#dk1");
+	disablenpc instance_npcname("Princess Tiara#dk");
+	disablenpc instance_npcname("The second floor of Palace");
+
+	killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead1";
+	killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead2";
+	killmonster 'map_spa$, instance_npcname("#gp_control_1") + "::OnMyMobDead3";
+	disablenpc instance_npcname("#gp_control_1");
+	initnpctimer;
+	end;
+OnTimer2000:
+	.@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead1";
+	monster 'map_spa$,135,116,"Broken Promise",2950,1, .@label$;	// BROKEN_MIND
+	monster 'map_spa$,110,120,"Broken Promise",2950,1, .@label$;	// BROKEN_MIND
+	monster 'map_spa$,122,112,"Floating Sorrow",2951,1, .@label$;	// FLOATING_WORD
+	monster 'map_spa$,121,129,"Unfulfilled Love",2952,1, .@label$;	// LIKE_LOVE
+	stopnpctimer;
+	end;
+OnMyMobDead1:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead1") < 1) {
+		sleep 2000;
+		.@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead2";
+		monster 'map_spa$,120,103,"Broken Promise",2950,1, .@label$;	// BROKEN_MIND
+		monster 'map_spa$,115,137,"Floating Sorrow",2951,1, .@label$;	// FLOATING_WORD
+		monster 'map_spa$,103,130,"Unfulfilled Love",2952,1, .@label$;	// LIKE_LOVE
+	}
+	end;
+OnMyMobDead2:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead2") < 1) {
+		sleep 2000;
+		.@label$ = instance_npcname("#gp_control_2") + "::OnMyMobDead3";
+		monster 'map_spa$,98,119,"Floating Sorrow",2951,1, .@label$;	// FLOATING_WORD
+		monster 'map_spa$,98,120,"Floating Sorrow",2951,1, .@label$;	// FLOATING_WORD
+		monster 'map_spa$,103,109,"Unfulfilled Love",2952,1, .@label$;	// LIKE_LOVE
+	}
+	end;
+OnMyMobDead3:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_2") + "::OnMyMobDead3") < 1) {
+		mapannounce 'map_spa$, "The passage on the 3rd floor of the palace is open.", bc_map,0xFFFF00;
+		enablenpc instance_npcname("3rd floor in the palace");
+		enablenpc instance_npcname("King#dk1");
+		enablenpc instance_npcname("Lurid Royal Guard#dk2");
+		enablenpc instance_npcname("Captain of the Guard#dk");
+		enablenpc instance_npcname("Soldier#dk1");
+		enablenpc instance_npcname("Soldier#dk2");
+		enablenpc instance_npcname("Soldier#dk3");
+		disablenpc instance_npcname("#gp_control_2");
+	}
+	end;
+}
+
+// 3rd floor
+1@spa,32,54,1	script	King#dk1	4_M_RUSKING,{
+	mes "[King]";
+	mes "It was you who brought the monsters here! You want to get rid of me and have the princess for yourself?";
+	npctalk "King: It was you who brought the monsters here! You want to get rid of me and have the princess for yourself?";
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "It is a trap your majesty! You must trust me!";
+	npctalk "Lurid Royal Guard: It is a trap your majesty! You must trust me!", instance_npcname("Lurid Royal Guard#dk2");
+	next;
+	mes "[King]";
+	mes "Shut up! You've betrayed me! I trusted you... you must pay for your disgrace.";
+	npctalk "King: Shut up! You've betrayed me! I trusted you... you must pay for your disgrace.";
+	next;
+	mes "[King]";
+	mes "You will suffer for the rest of your life.";
+	npctalk "King: You will suffer for the rest of your life.";
+	close2;
+	disablenpc instance_npcname("3rd floor in the palace");
+	disablenpc instance_npcname("King#dk1");
+	disablenpc instance_npcname("Captain of the Guard#dk");
+	disablenpc instance_npcname("Soldier#dk1");
+	disablenpc instance_npcname("Soldier#dk2");
+	disablenpc instance_npcname("Soldier#dk3");
+	disablenpc instance_npcname("Lurid Royal Guard#dk2");
+	donpcevent instance_npcname("Thanatos Magic Trace#dk1") + "::OnStart";
+	end;
+}
+
+1@spa,35,56,5	script	Thanatos Magic Trace#dk1	4_TRACE,{
+	end;
+OnStart:
+	enablenpc instance_npcname("Thanatos Magic Trace#dk1");
+	enablenpc instance_npcname("Lurid Royal Guard#dk3");
+	initnpctimer;
+	end;
+OnTimer5000:
+	npctalk "Ominous Voice: Oh, faithful royal guard, you are trapped.";
+	end;
+OnTimer8000:
+	npctalk "Ominous Voice: The conspiracy in the palace has your princess in grave danger...";
+	end;
+OnTimer12000:
+	npctalk "Lurid Royal Guard: Who are you? Show yourself!", instance_npcname("Lurid Royal Guard#dk3");
+	end;
+OnTimer15000:
+	npctalk "Ominous Voice: Ah... so you do you hear me?";
+	end;
+OnTimer20000:
+	npctalk "Lurid Royal Guard: ...?", instance_npcname("Lurid Royal Guard#dk3");
+	end;
+OnTimer23000:
+	npctalk "Ominous Voice: I can give you unlimited power. If you make a pact with me.";
+	end;
+OnTimer28000:
+	npctalk "Lurid Royal Guard: I..I...", instance_npcname("Lurid Royal Guard#dk3");
+	end;
+OnTimer33000:
+	npctalk "Thanatos Magic Trace: Kukuku... What do you want boy?";
+	end;
+OnTimer34000:
+	stopnpctimer;
+	disablenpc instance_npcname("Thanatos Magic Trace#dk1");
+	disablenpc instance_npcname("Lurid Royal Guard#dk3");
+	donpcevent instance_npcname("#gp_control_3") + "::OnStart";
+	end;
+}
+
+1@spa,28,52,7	duplicate(Lurid Royal Guard#dk)	Captain of the Guard#dk	4_M_KY_KNT
+1@spa,25,53,7	duplicate(Lurid Royal Guard#dk)	Soldier#dk1	4_M_CRU_SOLD
+1@spa,34,53,1	duplicate(Lurid Royal Guard#dk)	Soldier#dk2	4_M_CRU_SOLD
+1@spa,30,52,7	duplicate(Lurid Royal Guard#dk)	Soldier#dk3	4_M_KY_SOLD
+1@spa,30,58,5	duplicate(Lurid Royal Guard#dk)	Lurid Royal Guard#dk2	4_M_SAKRAY_TIED
+1@spa,31,57,5	duplicate(Lurid Royal Guard#dk)	Lurid Royal Guard#dk3	4_M_SAKRAY_TIED
+
+1@spa,1,1,1	script	#gp_control_3	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_3");
+	initnpctimer;
+	end;
+OnTimer2000:
+	.@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead1";
+	monster 'map_spa$,31,57, "Regretful Memory",2953,1, .@label$; 	// CURSED_MEMORY
+	monster 'map_spa$,59,24, "Regretful Memory",2953,1, .@label$; 	// CURSED_MEMORY
+	monster 'map_spa$,23,40, "Wasted Friendship",2955,1, .@label$; 	// OLD_FRIENDSHIP
+	monster 'map_spa$,54,45, "Tarnished Oath",2954,1, .@label$; 	// COLORLESS_VOW
+	monster 'map_spa$,26,20, "Tarnished Oath",2954,1, .@label$; 	// COLORLESS_VOW
+	stopnpctimer;
+	end;
+OnMyMobDead1:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead1") < 1)
+		addtimer 2000, instance_npcname("#gp_control_3") + "::OnSpawn1";
+	end;
+OnSpawn1:
+	.@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead2";
+	monster 'map_spa$,30,52, "Tarnished Oath",2954,1, .@label$; 	// COLORLESS_VOW
+	monster 'map_spa$,58,58, "Wasted Friendship",2955,1, .@label$; 	// OLD_FRIENDSHIP
+	monster 'map_spa$,54,24, "Regretful Memory",2953,1, .@label$; 	// CURSED_MEMORY
+	end;
+OnMyMobDead2:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead2") < (1 + 'bool_double_spawn)) {
+		deltimer instance_npcname("#gp_control_3") + "::OnAnnounce";
+		addtimer 500, instance_npcname("#gp_control_3") + "::OnAnnounce";
+	}
+	end;
+OnAnnounce:
+	mapannounce 'map_spa$, "The passage on the 4th floor of the palace is open.", bc_map,0xFFFF00;
+	enablenpc instance_npcname("4th floor in the palace");
+	deltimer instance_npcname("#gp_control_3") + "::OnSpawn2";	// stop double spawn if timer is running
+	addtimer 2000, instance_npcname("#gp_control_3") + "::OnSpawn2";
+	end;
+OnSpawn2:
+	donpcevent instance_npcname("#gp_control_4") + "::OnStart";
+	// 35 mobs
+	.@label$ = instance_npcname("#gp_control_3") + "::OnMyMobDead3";
+	monster 'map_spa$,67,46, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,62,48, "Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,57,46, "Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,51,48, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "Faithful royal guard...";
+	monster 'map_spa$,56,55, "Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,62,56, "Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,66,58, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You put your princess in grave danger...";
+	monster 'map_spa$,66,64, "Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Faithful royal guard...";
+	monster 'map_spa$,62,65, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,57,67, "Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,49,66, "Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,44,66, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,45,20, "Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,38,20, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,32,20, "Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,51,22, "Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,26,34,"Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,21,37,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Faithful royal guard...";
+	monster 'map_spa$,18,39,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,21,45,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,23,49,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,25,54,"Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,29,54,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "You put your princess in grave danger...";
+	monster 'map_spa$,56,39,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,61,36,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Faithful royal guard...";
+	monster 'map_spa$,66,38,"Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away quickly!";
+	monster 'map_spa$,42,54,"Wasted Friendship",2955,1, .@label$;	// OLD_FRIENDSHIP
+	unittalk $@mobid[0], "Run away!";
+	monster 'map_spa$,35,54,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,43,60,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "Faithful royal guard...";
+	monster 'map_spa$,30,25,"Tarnished Oath",2954,1, .@label$;		// COLORLESS_VOW
+	unittalk $@mobid[0], "You put your princess in grave danger...";
+	monster 'map_spa$,30,31,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	unittalk $@mobid[0], "You are trapped...";
+	monster 'map_spa$,65,64, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	monster 'map_spa$,65,67, "Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	monster 'map_spa$,18,43,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	monster 'map_spa$,21,43,"Regretful Memory",2953,1, .@label$;	// CURSED_MEMORY
+	end;
+OnMyMobDead3:
+	end;
+}
+
+// 4th floor
+1@spa,1,1,1	script	#gp_control_4	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_4");
+	.@label$ = instance_npcname("#gp_control_4") + "::OnMyMobDead1";
+	monster 'map_spa$,215,194, "Sweet Slaughter",2956,1, .@label$;		// SWEET_SLAUGHTER
+	monster 'map_spa$,194,178, "Sweet Slaughter",2956,1, .@label$;		// SWEET_SLAUGHTER
+	monster 'map_spa$,191,211, "Sweet Slaughter",2956,1, .@label$;		// SWEET_SLAUGHTER
+	monster 'map_spa$,185,203, "Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	monster 'map_spa$,209,218, "Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	end;
+OnMyMobDead1:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead1") < (1 + 'bool_double_spawn)) {
+		deltimer instance_npcname("#gp_control_4") + "::OnSpawn1";
+		addtimer 2000, instance_npcname("#gp_control_4") + "::OnSpawn1";
+	}
+	end;
+OnSpawn1:
+	.@label$ = instance_npcname("#gp_control_4") + "::OnMyMobDead2";
+	monster 'map_spa$,189,192, "Cursed Gatekeeper",2949,1, .@label$;	// CURSED_SENTINEL
+	monster 'map_spa$,211,209, "Sweet Slaughter",2956,1, .@label$;		// SWEET_SLAUGHTER
+	end;
+OnMyMobDead2:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead2") < 1) {
+		enablenpc instance_npcname("Thanatos Magic Trace#dk2");
+		enablenpc instance_npcname("Visiting Prince#dk");
+		enablenpc instance_npcname("Lurid Royal Guard#dk4");
+		enablenpc instance_npcname("King's Corpse#dk");
+		enablenpc instance_npcname("Captain's Corpse#dk");
+		enablenpc instance_npcname("Soldier's Corpse#dk");
+		enablenpc instance_npcname("Soldier's Corpse#dk1");
+		enablenpc instance_npcname("Soldier's Corpse#dk2");
+		enablenpc instance_npcname("Soldier's Corpse#dk3");
+		enablenpc instance_npcname("Soldier's Corpse#dk4");
+	}
+	end;
+}
+
+1@spa,199,214,1	script	Lurid Royal Guard#dk4	4_M_SAKRAYROYAL,{
+	.@prince$ = instance_npcname("Visiting Prince#dk");
+	mes "[Lurid Royal Guard]";
+	mes "Where is Princess Tiara?";
+	npctalk "Lurid Royal Guard: Where is Princess Tiara?";
+	next;
+	mes "[Visiting Prince]";
+	mes "You are too late... but you brought what I was looking for. Thanks for your help.";
+	npctalk "Visiting Prince: You are too late... but you brought what I was looking for. Thanks for your help.", .@prince$;
+	next;
+	mes "[Visiting Prince]";
+	mes "Cursed Thanatos Magic Trace! Are you ready to have a new master?";
+	npctalk "Visiting Prince: Cursed Thanatos Magic Trace! Are you ready to have a new master?", .@prince$;
+	next;
+	cutin "tartanos.bmp",3;
+	mes "[Thanatos Magic Trace]";
+	mes "How dare you!";
+	npctalk "Thanatos Magic Trace: How dare you!", instance_npcname("Thanatos Magic Trace#dk2");
+	next;
+	mes "[Visiting Prince]";
+	mes "aah, aah !!!";
+	npctalk "Visiting Prince: Aah, aah!!!", .@prince$;
+	donpcevent instance_npcname("#gp_control_5") + "::OnStart";
+	close2;
+	cutin "",255;
+	end;
+}
+1@spa,201,214,1	duplicate(Lurid Royal Guard#dk)	Thanatos Magic Trace#dk2	CLEAR_NPC
+1@spa,197,218,5	duplicate(Lurid Royal Guard#dk)	Visiting Prince#dk	4_M_KNIGHT_SILVER
+1@spa,194,214,5	duplicate(Lurid Royal Guard#dk)	King's Corpse#dk	4_M_TRISTAN
+1@spa,211,194,3	duplicate(Lurid Royal Guard#dk)	Captain's Corpse#dk	4_M_LIEMAN
+1@spa,201,198,1	duplicate(Lurid Royal Guard#dk)	Soldier's Corpse#dk	4_M_DIEMAN
+1@spa,197,190,1	duplicate(Lurid Royal Guard#dk)	Soldier's Corpse#dk1	4_M_DIEMAN
+1@spa,191,207,7	duplicate(Lurid Royal Guard#dk)	Soldier's Corpse#dk2	4_M_DIEMAN
+1@spa,206,209,7	duplicate(Lurid Royal Guard#dk)	Soldier's Corpse#dk3	4_M_DIEMAN
+1@spa,189,195,1	duplicate(Lurid Royal Guard#dk)	Soldier's Corpse#dk4	4_M_DIEMAN
+
+1@spa,1,1,1	script	#gp_control_5	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_5");
+	disablenpc instance_npcname("Thanatos Magic Trace#dk2");
+	disablenpc instance_npcname("Visiting Prince#dk");
+	disablenpc instance_npcname("Lurid Royal Guard#dk4");
+	disablenpc instance_npcname("King's Corpse#dk");
+	disablenpc instance_npcname("Captain's Corpse#dk");
+	disablenpc instance_npcname("Soldier's Corpse#dk");
+	disablenpc instance_npcname("Soldier's Corpse#dk1");
+	disablenpc instance_npcname("Soldier's Corpse#dk2");
+	disablenpc instance_npcname("Soldier's Corpse#dk3");
+	disablenpc instance_npcname("Soldier's Corpse#dk4");
+	sleep 1000;
+	.@label$ = instance_npcname("#gp_control_5") + "::OnMyMobDead";
+	monster 'map_spa$,198,218, "Torturous Redeemer",2959,1, .@label$;	// TORTUROUS_REDEEMER
+	monster 'map_spa$,198,182, "Sweet Slaughter",2956,1, .@label$;		// SWEET_SLAUGHTER
+	end;
+OnMyMobDead:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_5") + "::OnMyMobDead") < 1) {
+		deltimer instance_npcname("#gp_control_4") + "::OnSpawn1";	// stop double spawn if timer is running
+		mapannounce 'map_spa$, "The passage on the 5th floor of the palace is open.", bc_map,0xFFFF00;
+		disablenpc instance_npcname("4th floor in the palace");
+		enablenpc instance_npcname("5th floor of Palace");
+		enablenpc instance_npcname("Princess Tiara#dk1");
+		enablenpc instance_npcname("Lurid Royal Guard#dk5");
+
+		killmonster 'map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead2";
+		killmonster 'map_spa$, instance_npcname("#gp_control_3") + "::OnMyMobDead3";
+		disablenpc instance_npcname("#gp_control_3");
+	}
+	end;
+}
+
+// 5th floor
+1@spa,216,43,3	script	Princess Tiara#dk1	4_F_MAYSEL,{
+	.@guard$ = instance_npcname("Lurid Royal Guard#dk5");
+	mes "[Princess Tiara]";
+	mes "You kept your promise.";
+	npctalk "Princess Tiara: You kept your promise.";
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "princess!";
+	npctalk "Lurid Royal Guard: Princess!", .@guard$;
+	next;
+	cutin "npc-tiara.bmp",3;
+	mes "[Princess Tiara]";
+	mes "Thank you... now I can rest beside you...";
+	npctalk "Princess Tiara: Thank you... now I can rest beside you...";
+	next;
+	mes "[Lurid Royal Guard]";
+	mes "No..No!!!!!";
+	npctalk "Lurid Royal Guard: No..No!!!!!", .@guard$;
+	next;
+	mes "[The voice of Princess Tiara]";
+	mes "I want to be with you forever in peace...forever...";
+	npctalk "Princess Tiara: I want to be with you forever in peace...forever...";
+	next;
+	cutin "b-tiara.BMP",3;
+	mes "[Lurid Royal Guard]";
+	mes "no.....Ahh ahh ahh!!!!~!";
+	npctalk "Lurid Royal Guard: no.....Ahh ahh ahh!!!!~!", .@guard$;
+	next;
+	mes "[The voice of Princess Tiara]";
+	mes "I love you...";
+	npctalk "Princess Tiara: I love you...";
+	cutin "",255;
+	close2;
+	donpcevent instance_npcname("#gp_control_6") + "::OnStart";
+	end;
+}
+
+1@spa,213,42,7	duplicate(Lurid Royal Guard#dk)	Lurid Royal Guard#dk5	4_M_SAKRAYROYAL
+
+1@spa,1,1,1	script	#gp_control_6	HIDDEN_WARP_NPC,{
+	end;
+OnStart:
+	enablenpc instance_npcname("#gp_control_6");
+	disablenpc instance_npcname("Princess Tiara#dk1");
+	disablenpc instance_npcname("Lurid Royal Guard#dk5");
+
+	killmonster 'map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead1";
+	killmonster 'map_spa$, instance_npcname("#gp_control_4") + "::OnMyMobDead2";
+	killmonster 'map_spa$, instance_npcname("#gp_control_5") + "::OnMyMobDead";
+	disablenpc instance_npcname("#gp_control_4");
+	disablenpc instance_npcname("#gp_control_5");
+	disablenpc instance_npcname("5th floor of Palace");
+	sleep 2000;
+	.@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead1";
+	monster 'map_spa$,217,52, "Forgotten Name" ,2957,1, .@label$;	// FORGOTTEN_NAME
+	unittalk $@mobid[0], "Wake up! look at us... We are monsters?";
+	monster 'map_spa$,190,21, "Tarnished Oath" ,2954,1, .@label$;	// COLORLESS_VOW
+	unittalk $@mobid[0], "Sakray killed the King and tried to kill us!";
+	monster 'map_spa$,198,49, "Tarnished Oath" ,2954,1, .@label$;	// COLORLESS_VOW
+	unittalk $@mobid[0], "What is this..??";
+	monster 'map_spa$,212,28, "Fatal Days" ,2958,1, .@label$;		// FATAL_DAYS
+	unittalk $@mobid[0], "Sakray killed a princess!";
+	end;
+OnMyMobDead1:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead1") < 1) {
+		sleep 2000;
+		.@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead2";
+		monster 'map_spa$,217,43, "Forgotten Name" ,2957,1, .@label$;	// FORGOTTEN_NAME
+		unittalk $@mobid[0], "Wake up! look at us... We are monsters?";
+		monster 'map_spa$,193,24, "Forgotten Name" ,2957,1, .@label$;	// FORGOTTEN_NAME
+		unittalk $@mobid[0], "Sakray..?? why.....Sakray!";
+		monster 'map_spa$,216,59, "Tarnished Oath" ,2954,1, .@label$;	// COLORLESS_VOW
+		unittalk $@mobid[0], "Sakray killed the King and tried to kill us!";
+		monster 'map_spa$,197,57, "Fatal Days" ,2958,1, .@label$;		// FATAL_DAYS
+		unittalk $@mobid[0], "Sakray killed a princess!";
+	}
+	end;
+OnMyMobDead2:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead2") < 1) {
+		sleep 2000;
+		.@label$ = instance_npcname("#gp_control_6") + "::OnMyMobDead3";
+		monster 'map_spa$,193,39, "Forgotten Name" ,2957,1, .@label$;	// FORGOTTEN_NAME
+		unittalk $@mobid[0], "Wake up! look at us... We are monsters?";
+		monster 'map_spa$,212,34, "Forgotten Name" ,2957,1, .@label$;	// FORGOTTEN_NAME
+		unittalk $@mobid[0], "Sakray..?? why.....Sakray!";
+		monster 'map_spa$,201,64, "Tarnished Oath" ,2954,1, .@label$;	// COLORLESS_VOW
+		unittalk $@mobid[0], "Sakray killed the King and tried to kill us!";
+		monster 'map_spa$,175,44, "Fatal Days" ,2958,1, .@label$;		// FATAL_DAYS
+		unittalk $@mobid[0], "Sakray killed a princess!";
+	}
+	end;
+OnMyMobDead3:
+	if (mobcount('map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead3") < 1) {
+		sleep 2000;
+		monster 'map_spa$,200,45, "Torturous Redeemer" ,2961,1, instance_npcname("#gp_control_6") + "::OnMyMobDead4";	// E_TORTUROUS_REDEEMER
+		unittalk $@mobid[0], "Thanatos Magic Trace! I will destroy you if I can't have you... Oh no! How could this be?";
+		sleep 5000;
+		killmonster 'map_spa$, instance_npcname("#gp_control_6") + "::OnMyMobDead4";
+		enablenpc instance_npcname("Sakray#dk");
+		enablenpc instance_npcname("Thanatos Magic Trace#dk3");
+		disablenpc instance_npcname("#gp_control_6");
+	}
+	end;
+OnMyMobDead4:
+	end;
+}
+
+1@spa,196,44,5	script	Sakray#dk	4_M_SAKRAY,{
+	mes "[Lurid Royal Guard]";
+	mes "Are you satisfied..? Thanatos Magic Trace?";
+	npctalk "Lurid Royal Guard: Are you satisfied..? Thanatos Magic Trace?";
+	next;
+	mes "[Thanatos Magic Trace]";
+	mes "I need more blood..Sakray, offer me his blood.";
+	npctalk "Thanatos Magic Trace: I need more blood..Sakray, offer me his blood.", instance_npcname("Thanatos Magic Trace#dk3");
+	next;
+	mes "[Sakray]";
+	mes "Okay, that is good. A traveller. Did you see?";
+	npctalk "Sakray: Okay, that is good. A traveller. Did you see?";
+	next;
+	mes "[" + strcharinfo(0) + "]";
+	mes "Sakray, what do you want? Sympathy? Or is it a trap?";
+	unittalk getcharid(3), "" + strcharinfo(0) + " : Sakray, what do you want? Sympathy? Or is it a trap?";
+	next;
+	mes "[Sakray]";
+	mes "No... I do not need to make any effort to catch a novice.";
+	npctalk "Sakray: No... I do not need to make any effort to catch a novice.";
+	next;
+	mes "[" + strcharinfo(0) + "]";
+	mes "If so... then why...?";
+	unittalk getcharid(3), "" + strcharinfo(0) + " : If so... then why...?";
+	next;
+	cutin "cry-b.bmp",2;
+	mes "[Sakray]";
+	mes "I wanted to get rid of a piece of humanity inside of me through you.";
+	npctalk "Sakray: I wanted to get rid of a piece of humanity inside of me through you.";
+	next;
+	mes "[Sakray]";
+	mes "I am quite satisfied with the result.";
+	npctalk "Sakray: I am quite satisfied with the result.";
+	next;
+	mes "[Thanatos Magic Trace]";
+	mes "Sakray, offer the blood to me now!";
+	npctalk "Thanatos Magic Trace: Sakray, offer the blood to me now!", instance_npcname("Thanatos Magic Trace#dk3");
+	next;
+	mes "[Sakray]";
+	mes "If you were me, what would you do?";
+	npctalk "Sakray: If you were me, what would you do?";
+	next;
+	mes "[Sakray]";
+	mes "Can you set yourself free from this curse?";
+	npctalk "Sakray: Can you set yourself free from this curse?";
+	next;
+	mes "[" + strcharinfo(0) + "]";
+	mes "...";
+	unittalk getcharid(3), "" + strcharinfo(0) + " : ...";
+	next;
+	mes "[Sakray]";
+	mes "Heh heh... I will keep watching you until the day comes when you are old enough.";
+	npctalk "Sakray: Heh heh... I will keep watching you until the day comes when you are old enough.";
+	next;
+	mes "[Sakray]";
+	mes "I am willing to hunt you later for Thanatos.";
+	npctalk "Sakray: I am willing to hunt you later for Thanatos.";
+	cutin "",255;
+	next;
+	mes "[Sakray]";
+	mes "Farewell then.";
+	npctalk "Sakray: Farewell then.";
+	close2;
+	donpcevent instance_npcname("#tb") + "::OnStart";
+	end;
+}
+
+1@spa,196,46,1	script	#tb	CLEAR_NPC,{
+	end;
+OnStart:
+	disablenpc instance_npcname("Sakray#dk");
+	disablenpc instance_npcname("Thanatos Magic Trace#dk3");
+	enablenpc instance_npcname("#tb");
+	enablenpc instance_npcname("#sv");
+	enablenpc instance_npcname("#tv");
+	initnpctimer;
+	end;
+OnTimer3000:
+	npctalk "Voice of Princess Tiara : What can I do for you?";
+	end;
+OnTimer8000:
+	npctalk "Voice of Sakray : I will always stand by you. Please rest beside me.", instance_npcname("#sv");
+	end;
+OnTimer13000:
+	npctalk "Thanatos Magic Trace: Sakray, do not forget the covenant of blood between us.", instance_npcname("#tv");
+	end;
+OnTimer17000:
+	npctalk "Thanatos Magic Trace: Your soul is mine until you find the blood that satisfies me...", instance_npcname("#tv");
+	end;
+OnTimer22000:
+	npctalk "Voice of Sakray : Rest in the shadow with me.", instance_npcname("#sv");
+	end;
+OnTimer25000:
+	npctalk "Voice of Sakray : In the dark forever...", instance_npcname("#sv");
+	end;
+OnTimer28500:
+	disablenpc instance_npcname("#tb");
+	disablenpc instance_npcname("#sv");
+	disablenpc instance_npcname("#tv");
+	mapannounce 'map_spa$, "It is time to leave the Ghost Palace.", bc_map,0xFFFF00;
+	enablenpc instance_npcname("Way out of Palace");
+	enablenpc instance_npcname("King#dk11");
+	end;
+}
+
+1@spa,195,41,1	duplicate(Lurid Royal Guard#dk)	Thanatos Magic Trace#dk3	CLEAR_NPC
+1@spa,198,43,1	duplicate(Lurid Royal Guard#dk)	#sv	CLEAR_NPC
+1@spa,196,41,1	duplicate(Lurid Royal Guard#dk)	#tv	CLEAR_NPC
+
+1@spa,204,29,1	script	King#dk11	4_M_RUSKING,{
+	disable_items;
+	mes "[King]";
+	mes "Hey there, are you alive?";
+	mes "I did not expect to meet someone who is still alive.";
+	next;
+	mes "[King]";
+	mes "Do you possibly have the ^006400Gray Shard^000000?";
+	mes "Can you give it to me?";
+	mes "The memories of the faithful royal guard";
+	mes "and the memories of everyone he loved";
+	mes "are contained inside of these shards.";
+	next;
+	mes "[King]";
+	mes "Will you give the ^006400Gray Shard^000000 to me?";
+	mes "The guilt is eating my soul.";
+	mes "My soul is stuck within the Ghost Palace.";
+	next;
+	mes "[King]";
+	mes "I am collecting Sakray's abandoned memories from these shards.";
+	next;
+	mes "[King]";
+	mes "If you give any ^006400Gray Shard^000000s to me, I can make equipment for you.";
+	next;
+	mes "[King]";
+	mes "The cursed knight...";
+	mes "Please help me save the soul of Sakray.";
+	next;
+	setarray .@item_name$[0],
+		"Thanatos Sword", "Thanatos Great Sword", "Thanatos Spear", "Thanatos Long Spear", "Thanatos Staff",
+		"Thanatos Two-handed Staff", "Thanatos Bow", "Thanatos Dagger", "Thanatos Katar", "Thanatos Knuckle",
+		"Thanatos Hammer", "Thanatos Axe", "Thanatos Violin", "Thanatos Whip",
+		"Gray Shield", "Gray Armor", "Gray Robe", "Gray Cloak", "Gray Shoes", "Gray Helmet";
+	setarray .@items_list[0],13441,21009,1438,1496,1669,2023,18119,13093,28000,1836,16028,28100,1933,1988,2187,15090,15091,20721,22033,18820;
+
+	for ( .@i = 0; .@i < 20; .@i++ )
+		.@menu$ += .@item_name$[.@i] + ":";
+	.@menu$ += "Cancel";
+
+	while(true) {
+		.@s = select(.@menu$) - 1;
+		if (.@s == 20) {
+			mes "[King]";
+			mes "Someday, Sakray will";
+			mes "get out of this curse for sure.";
+			mes "I believe";
+			mes "^006400Gray Shard^000000s are the only method";
+			mes "to save him....";
+			close;
+		}
+		.@cost = ( .@s > 13 ? 100 : 200 );
+		mes "[King]";
+		mes "To make a ^FF0000" + .@item_name$[.@s] + "^000000";
+		mes "I need " + .@cost + " ^006400Gray Shard^000000.";
+		next;
+		if (select( "Cancel", "Hand over " + .@cost + " Gray Shard." ) == 1) {
+			mes "[King]";
+			mes "Someday, Sakray will";
+			mes "get out of this curse for sure.";
+			next;
+			continue;
+		}
+		if (countitem(6672) < .@cost) {
+			mes "[King]";
+			mes "You do not have enough ^006400Gray Shard^000000";
+			mes "to make a ^FF0000" + .@item_name$[.@s] + "^000000.";
+			mes "I need " + .@cost + " ^006400Gray Shard^000000.";
+			next;
+			continue;
+		}
+		mes "[King]";
+		mes "I will make a ^FF0000" + .@item_name$[.@s] + "^000000";
+		mes "with " + .@cost + " ^006400Gray Shard^000000.";
+		next;
+		mes "You see a light through the folded hands of the king and it gradually takes on a shape.";
+		next;
+		mes "[King]";
+		mes "All right, it is done.";
+		mes "Take this ^FF0000" + .@item_name$[.@s] + "^000000";
+		mes "to confront Sakray and Thanatos.";
+		next;
+		mes "[King]";
+		mes "The power requires a sacrifice.";
+		mes "Please be careful...";
+		delitem 6672,.@cost;// Gray Shard
+		getitem .@items_list[.@s],1;
+		close;
+	}
+}
+
+1@spa,210,28,0	script	Way out of Palace	WARPNPC,2,2,{
+	end;
+OnTouch_:
+	mes "It is time to leave the Ghost Palace.";
+	mes "Everything is now complete";
+	mes "and will vanish..";
+	close2;
+	if (isbegin_quest(1263) == 2)
+		getitem 6672,1;// Gray Shard
+	else {
+		setquest 1263;// Cursed Swordman
+		completequest 1263;
+		getexp 900000,500000;
+		getitem 6672,2;// Gray Shard
+	}
+	warp "dali02",46,129;
+	end;
+}
+
+1@spa,41,217,0	warp	The second floor of Palace	2,2,1@spa,114,120
+1@spa,117,137,0	warp	3rd floor in the palace	2,2,1@spa,60,43
+1@spa,54,28,0	warp	4th floor in the palace	2,2,1@spa,218,186
+1@spa,178,186,0	warp	5th floor of Palace	2,2,1@spa,186,57

+ 8 - 8
npc/re/instances/HorrorToyFactory.txt

@@ -1324,7 +1324,7 @@ OnStart:
 		.@mon_num++;
 		if (.@mon_num > 20)
 			break;
-		sleep2 200;
+		sleep 200;
 	}
 	sleep 6000;
 	killmonster 'xm_d_map$, .@event$;
@@ -1455,19 +1455,19 @@ OnInstanceInit:
 OnStart:
 	sleep 1000;
 	npctalk "Catherine Jet Johnson: Unfortunately, I am failed to persuade Kimi.";
-	sleep2 3000;
+	sleep 3000;
 	npctalk "Catherine Jet Johnson: What was the voice of phantom? Why it torments Kimi so harshly...";
-	sleep2 4000;
+	sleep 4000;
 	npctalk "Catherine Jet Johnson: I guess that the curse of my face was form the unidentified voice.";
-	sleep2 4000;
+	sleep 4000;
 	npctalk "Catherine Jet Johnson: Anyway, even Kimi, saying hates everyone, has collected her recollections here a lot.";
-	sleep2 6000;
+	sleep 6000;
 	npctalk "Catherine Jet Johnson: I will put this thing safely even if her soul will return and she won't be disappointed.";
-	sleep2 5000;
+	sleep 5000;
 	npctalk "Catherine Jet Johnson: Thanks to you, everything that I have wondered is completely resolved. Please call me again if you are going to send her to Heaven next time.";
-	sleep2 5000;
+	sleep 5000;
 	npctalk "Catherine Jet Johnson: I will open the exit way out. I will go outside first, so just follow me.";
-	sleep2 3000;
+	sleep 3000;
 	disablenpc instance_npcname("Catherine Jet Johnson#6");
 	enablenpc instance_npcname("#exwp1");
 	end;

+ 7 - 19
npc/re/merchants/advanced_refiner.txt

@@ -1,21 +1,12 @@
 //===== rAthena Script =======================================
 //= Advanced Refiner
-//===== By: ==================================================
-//= Euphy
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
 //===== Description: =========================================
 //= [Official Conversion]
 //= Refiner that uses Enriched ores to increase upgrade success.
-//= After a conversation with Doddler, it's been established that
-//= the advanced refiner works similar the the "Bubble Gum" item.
-//= The success percentage is not "increased" however, if it fails
-//= You get a second try. This tries twice at the same time,
-//= effectively giving you a re-roll on your attempt.
-//===== Additional Comments: =================================
+//===== Changelog: ===========================================
 //= 1.0 Added Malangdo Refiner "Holink". [Euphy]
+//= 1.1 Removed re-roll behavior. [Secret]
+//= 1.2 Added db-based material ID [Secret]
 //============================================================
 
 // Main NPC :: mal_jerun
@@ -79,35 +70,32 @@ malangdo,221,174,6	script	Holink#mal_cash	559,{
 		close;
 	}
 	mes "[Holink]";
+	// TODO: Price is different to Suhnbi of Payon. Intended? [Secret]
+	.@material = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);
 	switch(getequipweaponlv(.@part)) {
 	default:
 	case 0: // Armor
 		set .@price,15000;
-		set .@material,7619; //Enriched_Elunium
 		set .@type$,"armor";
 		mes "You have chosen an armor, meow~";
 		break;
 	case 1: // Level 1 Weapon
 		set .@price,500;
-		set .@material,7620; //Enriched_Oridecon
 		set .@type$,"weapon";
 		mes "A level 1 weapon...?";
 		break;
 	case 2: // Level 2 Weapon
 		set .@price,2000;
-		set .@material,7620; //Enriched_Oridecon
 		set .@type$,"weapon";
 		mes "Meow, a level 2 weapon...?";
 		break;
 	case 3: // Level 3 Weapon
 		set .@price,20000;
-		set .@material,7620; //Enriched_Oridecon
 		set .@type$,"weapon";
 		mes "Meow Meow~~ A level 3 weapon~~";
 		break;
 	case 4: // Level 4 Weapon
 		set .@price,50000;
-		set .@material,7620; //Enriched_Oridecon
 		set .@type$,"weapon";
 		mes "Me-Meow!... A level 4 weapon...!";
 		mes "I've only seen it twice while";
@@ -123,7 +111,7 @@ malangdo,221,174,6	script	Holink#mal_cash	559,{
 		mes "You don't belive in refine master Holink, meow?~";
 		close;
 	}
-	if (getequippercentrefinery(.@part) < 100) {
+	if (getequippercentrefinery(.@part, true) < 100) {
 		mes "[Holink]";
 		mes "Meow!!";
 		if (.@type$ == "armor")
@@ -160,7 +148,7 @@ malangdo,221,174,6	script	Holink#mal_cash	559,{
 	}
 	delitem .@material,1;
 	set Zeny, Zeny-.@price;
-	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+	if (getequippercentrefinery(.@part, true) > rand(100)) {
 		successrefitem .@part;
 		mes "[Holink]";
 		mes "Me~ Me~ Meow! Fun fun refining~";

+ 3 - 8
npc/re/merchants/blessed_refiner.txt

@@ -1,11 +1,5 @@
 //===== rAthena Script ======================================= 
 //= Blessed Refiner
-//===== By: ==================================================
-//= Euphy
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
 //===== Description: =========================================
 //= [Official Conversion]
 //= Refiners that use Blessed ores to refine equipment.
@@ -13,8 +7,9 @@
 //= rate is identical to that for Enriched ores.
 //= - "Blacksmith Dister" only refines from +6~12.
 //= NOTE: This NPC is currently disabled on official servers.
-//===== Additional Comments: =================================
+//===== Changelog: ===========================================
 //= 1.0 First version. [Euphy]
+//= 1.1 Removed re-roll behavior. [Secret]
 //============================================================
 
 // Main NPC :: new_smelting612
@@ -141,7 +136,7 @@
 	set Zeny, Zeny-.@price;
 	mes "[Blacksmith Dister]";
 	mes "Tac! Tac! Tac!";
-	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+	if (getequippercentrefinery(.@part, true) > rand(100)) {
 		specialeffect EF_BLESSING;
 		successrefitem .@part;
 		next;

+ 12 - 29
npc/re/merchants/hd_refiner.txt

@@ -1,11 +1,5 @@
 //===== rAthena Script ======================================= 
 //= HD Refiners
-//===== By: ==================================================
-//= Euphy
-//===== Current Version: =====================================
-//= 1.0
-//===== Compatible With: =====================================
-//= rAthena Project
 //===== Description: =========================================
 //= [Official Conversion]
 //= Refiners that use HD ores to refine equipment. Upon
@@ -14,8 +8,9 @@
 //= to that for Enriched ores.
 //= - "Blacksmith Mighty Hammer" only refines from +7~9.
 //= - "Basta" only refines from +10 and up.
-//===== Additional Comments: =================================
+//===== Changelog: ===========================================
 //= 1.0 First version. [Euphy]
+//= 1.1 Removed re-roll behavior. [Secret]
 //============================================================
 
 // Blacksmith Mighty Hammer (+7~9) :: cash_smelting79
@@ -78,20 +73,10 @@
 		mes "I only handle items with refine levels from +7 to +9.";
 		close;
 	}
-	switch(getequipweaponlv(.@part)) {
-	default:
-	case 0:
-		set .@price,20000;
-		set .@material,6241; //HD_Elunium
-		break;
-	case 1:
-	case 2:
-	case 3:
-	case 4:
-		set .@price,20000;
-		set .@material,6240; //HD_Oridecon
-		break;
-	}
+	
+	.@price = getequiprefinecost(.@part, REFINE_COST_HD, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_HD, REFINE_MATERIAL_ID);
+	
 	mes "[Blacksmith Mighty Hammer]";
 	mes "In order to refine the gear you selected you need ^ff9999"+getitemname(.@material)+"^000000 and 20,000 zeny as a fee.";
 	mes "Do you have them ready?";
@@ -122,7 +107,7 @@
 	set Zeny, Zeny-.@price;
 	mes "[Blacksmith Mighty Hammer]";
 	mes "Tac! Tac! Tac!";
-	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+	if (getequippercentrefinery(.@part, true) > rand(100)) {
 		successrefitem .@part;
 		next;
 		emotion e_no1;
@@ -215,25 +200,23 @@ lhz_in02,280,19,3	duplicate(MightyHammer)	Mighty Hammer#lhz	826
 		mes "This weapon is perfect, no need to refine it anymore~";
 		close;
 	}
+	.@price = getequiprefinecost(.@part, REFINE_COST_OVER10_HD, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_OVER10_HD, REFINE_MATERIAL_ID);
 	switch(getequipweaponlv(.@part)) {
 	default:
 	case 0:
-		set .@price,100000;
-		set .@material,6225; //HD_Carnium
 		set .@type$,"armor";
 		break;
 	case 1:
 	case 2:
 	case 3:
 	case 4:
-		set .@price,100000;
-		set .@material,6226; //HD_Bradium
 		set .@type$,"weapon";
 		break;
 	}
 	mes "[Basta]";
 	mes "Hmm... is this the one you want to refine?";
-	mes "To refine this equipment, I need 1 ^ff9999"+getitemname(.@material)+"^000000 and 100,000 zeny as a fee.";
+	mes "To refine this equipment, I need 1 ^ff9999"+getitemname(.@material)+"^000000 and " + callfunc("F_InsertComma",.@price) + " zeny as a fee.";
 	mes "Do you really want to refine this?";
 	next;
 	if(select("Yes:No") == 2) {
@@ -241,7 +224,7 @@ lhz_in02,280,19,3	duplicate(MightyHammer)	Mighty Hammer#lhz	826
 		mes "Okay. If that's what you want...";
 		close;
 	}
-	if (getequippercentrefinery(.@part) < 100) {
+	if (getequippercentrefinery(.@part, true) < 100) {
 		mes "[Basta]";
 		mes "This "+.@type$+" has already been refined pretty high.";
 		mes "If you try to refine it more, the refine level could decrease.";
@@ -271,7 +254,7 @@ lhz_in02,280,19,3	duplicate(MightyHammer)	Mighty Hammer#lhz	826
 	delitem .@material,1;
 	set Zeny, Zeny-.@price;
 	mes "Pow! Pow! Pow! Pow!";
-	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
+	if (getequippercentrefinery(.@part, true) > rand(100)) {
 		successrefitem .@part;
 		next;
 		emotion e_no1;

+ 43 - 52
npc/re/merchants/refine.txt

@@ -58,19 +58,19 @@ function	script	refinenew	{
 	next;
 
 	setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
-	for(set .@i,1; .@i<=10; set .@i,.@i+1) {
+	for(.@i = 1; .@i<=10; ++.@i) {
 		if (getequipisequiped(.@indices[.@i])) {
-			set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
-			set .@equipped,1;
+			.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
+			.@equipped = 1;
 		}
-		set .@menu$, .@menu$ + ":";
+		.@menu$ = .@menu$ + ":";
 	}
 	if (.@equipped == 0) {
 		mes "["+ .@npc_name$ +"]";
 		mes "I don't think I can refine any items you have...";
 		close;
 	}
-	set .@part, .@indices[ select(.@menu$) ];
+	.@part = .@indices[ select(.@menu$) ];
 
 	if (!getequipisequiped(.@part)) { //custom check
 		mes "["+ .@npc_name$ +"]";
@@ -98,27 +98,24 @@ function	script	refinenew	{
 		mes "refined as it gets!";
 		close;
 	}
-	set .@refineitemid, getequipid(.@part); // save id of the item
-	set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
+	.@refineitemid = getequipid(.@part); // save id of the item
+	.@refinerycnt = getequiprefinerycnt(.@part); //save refinery count
+	.@price = getequiprefinecost(.@part, REFINE_COST_OVER10, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_OVER10, REFINE_MATERIAL_ID);
+	.@safe = 10;
+
 	if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
-		set .@type$,"weapon";
-		set .@material,6224; //Bradium
-		set .@price,100000;
-		set .@safe,10;
-		mes "["+ .@npc_name$ +"]";
-		mes "Hmm a weapon, is that ok?";
-		mes "If you want to refine this weapon,";
-		mes "I will need 1 ^003366Bradium^000000 and 100,000 zeny.";
+		.@article$ = "a";
+		.@type$ = "weapon";
 	} else {
-		set .@type$,"armor";
-		set .@material,6223; //Carnium
-		set .@price,100000;
-		set .@safe,10;
-		mes "["+ .@npc_name$ +"]";
-		mes "Hmm an armor, is that ok?";
-		mes "If you want to refine this armor,";
-		mes "I will need 1 ^003366Carnium^000000 and 100,000 zeny.";
+		.@article$ = "an";
+		.@type$ = "armor";
 	}
+	
+	mes "["+ .@npc_name$ +"]";
+	mes "Hmm " + .@article$ + " " + .@type$ + ", is that ok?";
+	mes "If you want to refine this armor,";
+	mes "I will need 1 ^003366" + getitemname(.@material) + "^000000 and " + callfunc("F_InsertComma",.@price) + " zeny.";
 	mes "Are you sure you want to continue?";
 	next;
 	if(select("Yes:No") == 2){
@@ -154,7 +151,7 @@ function	script	refinenew	{
 			mes "Please come back when you have them.";
 			close;
 		}
-		set Zeny,Zeny - .@price;
+		Zeny = Zeny - .@price;
 		delitem .@material,1;
 
 		// anti-hack
@@ -216,26 +213,26 @@ function	script	refinenew	{
 		mes "["+ .@npc_name$ +"]";
 		mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
 		next;
-		set .@menu2,select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
+		.@menu2 = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
 	} else
-		set .@menu2,2;
+		.@menu2 = 2;
 	switch(.@menu2){
 	case 1: 
-		set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
+		.@refinecnt = .@safe - getequiprefinerycnt(.@part);
 		break;
 	case 2:
 		mes "["+ .@npc_name$ +"]";
 		mes "How many times would you like me to refine your item?";
 		next;
 		input .@refinecnt;
-		set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
+		.@refinecheck = .@refinecnt + getequiprefinerycnt(.@part);
 		if (.@refinecnt < 1 || .@refinecheck > 20) {
 			mes "["+ .@npc_name$ +"]";
 			mes "I can't refine this item that many times.";
 			close;
 		}
 		if (.@refinecheck > .@safe) {
-			set .@refinecheck,.@refinecheck - .@safe;
+			.@refinecheck = .@refinecheck - .@safe;
 			mes "["+ .@npc_name$ +"]";
 			mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
 			next;
@@ -251,7 +248,7 @@ function	script	refinenew	{
 		mes "You said so... So be it.";
 		close;
 	}
-	set .@fullprice,.@price * .@refinecnt;
+	.@fullprice = .@price * .@refinecnt;
 	mes "["+ .@npc_name$ +"]";
 	mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?";
 	next;
@@ -266,7 +263,7 @@ function	script	refinenew	{
 		mes "Please come back when you have them.";
 		close;
 	}
-	set Zeny,Zeny - .@fullprice;
+	Zeny = Zeny - .@fullprice;
 	delitem .@material,.@refinecnt;
 	while(.@refinecnt){
 		if (getequipisequiped(.@part) == 0) {
@@ -284,7 +281,7 @@ function	script	refinenew	{
 		if (getequippercentrefinery(.@part) > rand(100)) {
 			mes "Clang! Clang! Clang! Clang!";
 			successrefitem .@part;
-			set .@refinecnt,.@refinecnt - 1;
+			.@refinecnt = .@refinecnt - 1;
 			next;
 		} else {
 			if (rand(100) < 80) {
@@ -362,7 +359,7 @@ function	script	refinenew	{
 	}
 	if (countitem(.@i[0]) >= .@i[1] && Zeny >= 50000) {
 		delitem .@i[0],.@i[1];
-		set Zeny, Zeny - 50000;
+		Zeny = Zeny - 50000;
 		getitem .@i[2],1;
 		mes "[Austri]";
 		if (.@i[0] == 6090) {
@@ -396,9 +393,9 @@ malangdo,224,172,6	script	Clink#mal_normal	544,{
 	mes "Yes!!! You!! You want to refine?";
 	next;
 	setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
-	for(set .@i,1; .@i<=10; set .@i,.@i+1)
-		set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
-	set .@part, .@indices[ select(.@menu$) ];
+	for(.@i = 1; .@i<=10; set .@i,.@i+1)
+		.@menu$ = .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Empty]" ) +":";
+	.@part = .@indices[ select(.@menu$) ];
 	if (!getequipisequiped(.@part)) {
 		mes "[Clink]";
 		switch(.@part) {
@@ -441,38 +438,32 @@ malangdo,224,172,6	script	Clink#mal_normal	544,{
 		mes "Perfect refining. Did I do this for you?";
 		close;
 	}
+	
+	.@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST);
+	.@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
+	
 	mes "[Clink]";
 	switch(getequipweaponlv(.@part)) {
 	default:
 	case 0: // Armor
-		set .@price,2000;
-		set .@material,985; //Elunium
-		set .@type$,"armor";
+		.@type$ = "armor";
 		mes "Hmm, an armor refine? Someone like you?";
 		break;
 	case 1: // Level 1 Weapon
-		set .@price,50;
-		set .@material,1010; //Phracon
-		set .@type$,"weapon";
+		.@type$ = "weapon";
 		mes "A level 1 weapon?";
 		mes "Urr... Annoying... Okay, let's try...";
 		break;
 	case 2: // Level 2 Weapon
-		set .@price,200;
-		set .@material,1011; //Emveretarcon
-		set .@type$,"weapon";
+		.@type$ = "weapon";
 		mes "A level 2 weapon?";
 		break;
 	case 3: // Level 3 Weapon
-		set .@price,20000;
-		set .@material,984; //Oridecon
-		set .@type$,"weapon";
+		.@type$ = "weapon";
 		mes "Woot!! A level 3 weapon? Impressive~";
 		break;
 	case 4: // Level 4 Weapon
-		set .@price,50000;
-		set .@material,984; //Oridecon
-		set .@type$,"weapon";
+		.@type$ = "weapon";
 		mes "Wow!... A level 4 weapon~!!";
 		break;
 	}
@@ -510,7 +501,7 @@ malangdo,224,172,6	script	Clink#mal_normal	544,{
 		close;
 	}
 	delitem .@material,1;
-	set Zeny, Zeny-.@price;
+	Zeny = Zeny-.@price;
 	if (getequippercentrefinery(.@part) <= rand(100)) {
 		failedrefitem .@part;
 		mes "[Clink]";

+ 143 - 0
npc/re/merchants/shadow_refiner.txt

@@ -0,0 +1,143 @@
+//===== rAthena Script =======================================
+//= Shadow Blacksmith
+//===== Description: =========================================
+//= [Official Conversion]
+//= Shadow equipments refining NPC.
+//===== Changelog: ===========================================
+//= 1.0 First version [Aleos]
+//= 1.1 Removed re-roll behavior and fetch materials from db 
+//=     [Secret]
+//============================================================
+-	script	::ShadowBlacksmith	-1,{
+	.@zeny_cost = 200000; // Zeny cost is 200,000 according to official script [Secret]
+	disable_items;
+	mes "[Shadow Blacksmith]";
+	mes "Do you want to refine a shadow item? Pick yer poison!";
+	next;
+	setarray .@indices[1], EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON, EQI_SHADOW_SHIELD, EQI_SHADOW_SHOES, EQI_SHADOW_ACC_R, EQI_SHADOW_ACC_L;
+	for(.@i = 1; .@i <= EQI_SHADOW_ACC_L; .@i++)
+		.@menu$ = .@menu$ + (getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Not equipped]") +":";
+	.@menu$ = .@menu$ + "Refine info";
+	.@part = .@indices[select(.@menu$)];
+
+	if (.@part == EQI_SHADOW_ACC_L + 1) { // Refine info
+		mes "[Shadow Blacksmith]";
+		mes "When a shadow item is refined, it gains extra bonuses very much like normal items.";
+		next;
+		mes "[Shadow Blacksmith]";
+		mes "Weapon: ATK, MATK + 1 increase for each +1 refine success.";
+		mes "Etc: HP + 10 increase for each +1 refine success.";
+		next;
+		mes "[Shadow Blacksmith]";
+		mes "All types of Oridecon and Elunium can be used to refine shadow items. Each attempt will also cost 20,000 zeny.";
+		next;
+		mes "[Shadow Blacksmith]";
+		mes "HD ores can be used for gear that is at least refine level +7 and will prevent breaking as long as you stay talking to me.";
+		close;
+	}
+	while(1) {
+		mes "[Shadow Blacksmith]";
+		mes "I require " + callfunc("F_InsertComma", .@zeny_cost) + " zeny as a fee for EACH refine attempt.";
+		mes "Choose your Ore and start refining.";
+		next;
+		.@isNormalEqp = 0;
+		if (.@part != EQI_SHADOW_WEAPON)
+			.@isNormalEqp = 1;
+		
+		.@material[0] = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
+		.@material[1] = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);
+		.@material[2] = getequiprefinecost(.@part, REFINE_COST_HD, REFINE_MATERIAL_ID);
+		
+		if (countitem(.@material[0]))
+			.@mate$[0] = getitemname(.@material[0]);
+		else {
+			.@mate$[0] = "^8C8C8C"+ getitemname(.@material[0]) +"^000000";
+			.@miss[0] = 1;
+		}
+		if (countitem(.@material[1]))
+			.@mate$[1] = getitemname(.@material[1]);
+		else {
+			.@mate$[1] = "^8C8C8C"+ getitemname(.@material[1]) +"^000000";
+			.@miss[1] = 1;
+		}
+		if (getequiprefinerycnt(.@part) > 6 && countitem(.@material[2]))
+			.@mate$[2] = getitemname(.@material[2]);
+		else {
+			.@mate$[2] = "^8C8C8C"+ getitemname(.@material[2]) +"^000000";
+			.@miss[2] = 1;
+		}
+
+		.@option = select(.@mate$[0],.@mate$[1],.@mate$[2],"Cancel");
+		if (.@option == 4) {
+			mes "[Shadow Blacksmith]";
+			mes "You've cancelled refining.";
+			close;
+		}
+		else if (.@option == 3) { // HD
+			if (getequiprefinerycnt(.@part) < 7) {
+				mes "[Shadow Blacksmith]";
+				mes "HD Ore can only used for +7 or higher refine level items.";
+				close;
+			}
+			.@hoihoi = 1;
+		}
+		.@choose = .@material[.@option-1];
+		if (!countitem(.@choose)) {
+			mes "[Shadow Blacksmith]";
+			mes "You do not have enough "+ getitemname(.@choose) +" / "+ getitemname(.@choose) +".";
+			close;
+		}
+		if (Zeny < .@zeny_cost) {
+			mes "[Shadow Blacksmith]";
+			mes "You do not have enough zeny.";
+			close;
+		}
+		if (getequiprefinerycnt(.@part) > 9) {
+			mes "[Shadow Blacksmith]";
+			mes "Shadow Equipment can be refined to the maximum of 10...";
+			close;
+		}
+		if (!getequipisenableref(.@part)) {
+			mes "[Shadow Blacksmith]";
+			mes "This item cannot be refined.";
+			close;
+		}
+		if (getequippercentrefinery(.@part) < 100) {
+			mes "[Shadow Blacksmith]";
+			mes "The safety refine level for Shadow Equipment is +4.";
+			if (!.@hoihoi)
+				mes "Shadow equipment may be destroyed in subsequent refinements. Want to get started?";
+			else
+				mes "The next refinement, if it fails, will degrade the refinement. Do you want to refine?";
+			next;
+			if (select("Proceed","Cancel") == 2) {
+				mes "[Shadow Blacksmith]";
+				mes "Heh, I knew it!";
+				close;
+			}
+		}
+
+		mes "[Shadow Blacksmith]";
+		mes "Well then.. here goes nothing!";
+		next;
+		delitem .@choose,1;
+		Zeny -= .@zeny_cost;
+		if (getequippercentrefinery(.@part, .@option > 1) > rand(100)) {
+			successrefitem .@part;
+			mes "[Shadow Blacksmith]";
+			mes "It worked! It worked!";
+			next;
+		} else {
+			if (.@hoihoi)
+				downrefitem .@part;
+			else
+				failedrefitem .@part;
+			mes "[Shadow Blacksmith]";
+			mes "Oh Odin No!";
+			close;
+		}
+	}
+}
+
+//moc_paraup,45,185,5	duplicate(ShadowBlacksmith)	Shadow Blacksmith#eden1	4_F_JOB_BLACKSMITH // Commented out until it's added to the map index
+prt_in,59,54,3	duplicate(ShadowBlacksmith)	Shadow Blacksmith#itemmall	4_F_JOB_BLACKSMITH

+ 2 - 2
npc/re/other/achievements.txt

@@ -75,7 +75,7 @@ gef_dun02,222,163,0	duplicate(ach_treasure#core)	#gefd_ach1::120123	HIDDEN_WARP_
 gl_cas02,53,151,0	duplicate(ach_treasure#core)	#gl_ach1::120124	HIDDEN_WARP_NPC,5,5
 gl_sew04,288,6,0	duplicate(ach_treasure#core)	#gl_ach2::120125	HIDDEN_WARP_NPC,5,5
 gl_knt02,126,235,0	duplicate(ach_treasure#core)	#gl_ach3::120126	HIDDEN_WARP_NPC,5,5
-gl_prison1,125,159,0	duplicate(ach_treasure#core)	#gl_ach4:120127	HIDDEN_WARP_NPC,5,5
+gl_prison1,125,159,0	duplicate(ach_treasure#core)	#gl_ach4::120127	HIDDEN_WARP_NPC,5,5
 
 // Gonryun Dungeon
 gon_dun03,167,232,0	duplicate(ach_treasure#core)	#gon_ach1::120128	HIDDEN_WARP_NPC,5,5
@@ -247,7 +247,7 @@ prt_fild06,296,303,0	duplicate(ach_treasure#core)	#prt_ach6::120006	HIDDEN_WARP_
 prt_fild07,45,104,0	duplicate(ach_treasure#core)	#prt_ach7::120007	HIDDEN_WARP_NPC,5,5
 prt_fild08,203,223,0	duplicate(ach_treasure#core)	#prt_ach8::120008	HIDDEN_WARP_NPC,5,5
 prt_fild09,37,354,0	duplicate(ach_treasure#core)	#prt_ach9::120009	HIDDEN_WARP_NPC,5,5
-prt_fild10,177,206,0	duplicate(ach_treasure#core)	#prt_ach10::12010	HIDDEN_WARP_NPC,5,5
+prt_fild10,177,206,0	duplicate(ach_treasure#core)	#prt_ach10::120010	HIDDEN_WARP_NPC,5,5
 
 // Rachel
 ra_fild01,138,166,0	duplicate(ach_treasure#core)	#ra_ach1::120078	HIDDEN_WARP_NPC,5,5

+ 1 - 1
npc/re/quests/quests_eclage.txt

@@ -2107,8 +2107,8 @@ ecl_fild01,97,315,4	script	Traveler#ep14_2	4_M_JOB_HUNTER,{
 		next;
 		mes "[Traveler]";
 		mes "If you are thinking about selling it, you should just give up.";
-		next;
 		mes "I have no wishes to sell it no matter how much you beg.";
+		next;
 		mes "[Traveler]";
 		mes "This feather..";
 	}

+ 2 - 0
npc/re/scripts_athena.conf

@@ -55,6 +55,7 @@ npc: npc/re/instances/BakonawaLake.txt
 npc: npc/re/instances/BangungotHospital.txt
 npc: npc/re/instances/BuwayaCave.txt
 npc: npc/re/instances/FacewormsNest.txt
+npc: npc/re/instances/GhostPalace.txt
 npc: npc/re/instances/HazyForest.txt
 npc: npc/re/instances/HorrorToyFactory.txt
 npc: npc/re/instances/MalangdoCulvert.txt
@@ -97,6 +98,7 @@ npc: npc/re/merchants/shops.txt
 //npc: npc/re/merchants/enchan_upg.txt
 //npc: npc/re/merchants/cash_trader-idRO.txt
 npc: npc/re/merchants/te_merchant.txt
+npc: npc/re/merchants/shadow_refiner.txt
 
 // --------------------------- Others ---------------------------
 npc: npc/re/other/achievements.txt

+ 9 - 0
rAthena.sln

@@ -43,6 +43,7 @@ EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "src\char\char-server.vcxproj", "{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}"
 	ProjectSection(ProjectDependencies) = postProject
 		{F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559} = {F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}
+		{61D6A599-6BED-4154-A9FC-40553BD972E0} = {61D6A599-6BED-4154-A9FC-40553BD972E0}
 	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "src\map\map-server.vcxproj", "{B4114A9C-EEA4-433C-A830-56119A984F24}"
@@ -76,6 +77,7 @@ Global
 		{F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|Win32.ActiveCfg = Release|Win32
 		{F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|Win32.Build.0 = Release|Win32
 		{F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|x64.ActiveCfg = Release|x64
+		{F8FD7B1E-8E1C-4CC3-9CD1-2E28F77B6559}.Release|x64.Build.0 = Release|x64
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|Win32.ActiveCfg = Debug|Win32
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|Win32.Build.0 = Debug|Win32
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Debug|x64.ActiveCfg = Debug|x64
@@ -83,6 +85,7 @@ Global
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|Win32.ActiveCfg = Release|Win32
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|Win32.Build.0 = Release|Win32
 		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|x64.ActiveCfg = Release|x64
+		{F6CC5F60-BD13-41B1-81D3-822A45EC0DBD}.Release|x64.Build.0 = Release|x64
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|Win32.ActiveCfg = Debug|Win32
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|Win32.Build.0 = Debug|Win32
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Debug|x64.ActiveCfg = Debug|x64
@@ -90,6 +93,7 @@ Global
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|Win32.ActiveCfg = Release|Win32
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|Win32.Build.0 = Release|Win32
 		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|x64.ActiveCfg = Release|x64
+		{7AE31676-6137-4FB3-AE9C-AD47D8A861CF}.Release|x64.Build.0 = Release|x64
 		{864805EA-FD39-453D-9248-C581951BA058}.Debug|Win32.ActiveCfg = Debug|Win32
 		{864805EA-FD39-453D-9248-C581951BA058}.Debug|Win32.Build.0 = Debug|Win32
 		{864805EA-FD39-453D-9248-C581951BA058}.Debug|x64.ActiveCfg = Debug|x64
@@ -97,6 +101,7 @@ Global
 		{864805EA-FD39-453D-9248-C581951BA058}.Release|Win32.ActiveCfg = Release|Win32
 		{864805EA-FD39-453D-9248-C581951BA058}.Release|Win32.Build.0 = Release|Win32
 		{864805EA-FD39-453D-9248-C581951BA058}.Release|x64.ActiveCfg = Release|x64
+		{864805EA-FD39-453D-9248-C581951BA058}.Release|x64.Build.0 = Release|x64
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|Win32.ActiveCfg = Debug|Win32
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|Win32.Build.0 = Debug|Win32
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Debug|x64.ActiveCfg = Debug|x64
@@ -104,6 +109,7 @@ Global
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|Win32.ActiveCfg = Release|Win32
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|Win32.Build.0 = Release|Win32
 		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|x64.ActiveCfg = Release|x64
+		{FED3A941-0AF7-49FE-85CF-E1DFDC0EBB23}.Release|x64.Build.0 = Release|x64
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|Win32.ActiveCfg = Debug|Win32
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|Win32.Build.0 = Debug|Win32
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Debug|x64.ActiveCfg = Debug|x64
@@ -111,6 +117,7 @@ Global
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Release|Win32.ActiveCfg = Release|Win32
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Release|Win32.Build.0 = Release|Win32
 		{B4114A9C-EEA4-433C-A830-56119A984F24}.Release|x64.ActiveCfg = Release|x64
+		{B4114A9C-EEA4-433C-A830-56119A984F24}.Release|x64.Build.0 = Release|x64
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|Win32.ActiveCfg = Debug|Win32
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|Win32.Build.0 = Debug|Win32
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Debug|x64.ActiveCfg = Debug|x64
@@ -118,6 +125,7 @@ Global
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Release|Win32.ActiveCfg = Release|Win32
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Release|Win32.Build.0 = Release|Win32
 		{352B45B3-FE88-4431-9D89-48CF811446DB}.Release|x64.ActiveCfg = Release|x64
+		{352B45B3-FE88-4431-9D89-48CF811446DB}.Release|x64.Build.0 = Release|x64
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|Win32.ActiveCfg = Debug|Win32
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|Win32.Build.0 = Debug|Win32
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Debug|x64.ActiveCfg = Debug|x64
@@ -125,6 +133,7 @@ Global
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|Win32.ActiveCfg = Release|Win32
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|Win32.Build.0 = Release|Win32
 		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|x64.ActiveCfg = Release|x64
+		{FC4C071B-2C26-4B03-948A-335C94A88B5E}.Release|x64.Build.0 = Release|x64
 		{61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|Win32.ActiveCfg = Debug|Win32
 		{61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|Win32.Build.0 = Debug|Win32
 		{61D6A599-6BED-4154-A9FC-40553BD972E0}.Debug|x64.ActiveCfg = Debug|x64

+ 9 - 9
sql-files/item_db.sql

@@ -5201,15 +5201,15 @@ REPLACE INTO `item_db` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL
 REPLACE INTO `item_db` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_VENOMBLEED,15000,0,10,0;',NULL,NULL);
 
 # Rune Knight's Rune Stones
-REPLACE INTO `item_db` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_REFRESH",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12726,'Runstone_Rhydo','Raido Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_CRUSHSTRIKE",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12727,'Runstone_Verkana','Berkana Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_MILLENNIUMSHIELD",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12728,'Runstone_Isia','Isa Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_VITALITYACTIVATION",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12729,'Runstone_Asir','Othila Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_FIGHTINGSPIRIT",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12730,'Runstone_Urj','Uruz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_ABUNDANCE",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12731,'Runstone_Turisus','Thurisaz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_GIANTGROWTH",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12732,'Runstone_Pertz','Wyrd Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_STORMBLAST",1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12733,'Runstone_Hagalas','Hagalaz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_STONEHARDSKIN",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_REFRESH",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12726,'Runstone_Rhydo','Raido Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_CRUSHSTRIKE",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12727,'Runstone_Verkana','Berkana Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_MILLENNIUMSHIELD",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12728,'Runstone_Isia','Isa Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_VITALITYACTIVATION",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12729,'Runstone_Asir','Othila Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_FIGHTINGSPIRIT",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12730,'Runstone_Urj','Uruz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_ABUNDANCE",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12731,'Runstone_Turisus','Thurisaz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_GIANTGROWTH",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12732,'Runstone_Pertz','Wyrd Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STORMBLAST",1;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12733,'Runstone_Hagalas','Hagalaz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STONEHARDSKIN",1;',NULL,NULL);
 
 # Rune Knight Rune Ores
 REPLACE INTO `item_db` VALUES (12734,'Runstone_Quality','Luxurious Rune',0,2,NULL,100,NULL,NULL,NULL,NULL,0x00000080,8,2,NULL,NULL,NULL,NULL,NULL,'makerune 5;',NULL,NULL);

+ 119 - 97
sql-files/item_db_re.sql

@@ -1412,11 +1412,11 @@ REPLACE INTO `item_db_re` VALUES (2174,'Lumiere_Shield','Lumiere Shield',4,20,NU
 REPLACE INTO `item_db_re` VALUES (2175,'Esprit_Shield','Spirit Shield',4,20,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2176,'Dark_Book','Black Book',4,20,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,5,'bonus bMdef,5; .@r = getrefine(); bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,(.@r<=6)?(10):((.@r<=8)?(20):(30));',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2177,'Shield_Of_Death','Shield Of Death',4,20,NULL,2000,NULL,150,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,3,'bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bSubClass,Class_Normal,-10;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2178,'TE_Woe_Buckler','TE Woe Buckler',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,32,1,'40',1,2,'bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2179,'TE_Woe_Shield','TE Woe Shield',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,32,1,'40',1,3,'bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2180,'TE_Woe_Magic_Guard','TE Woe Magic Guard',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,32,1,'40',1,1,'bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2178,'TE_Woe_Buckler','TE Woe Buckler',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,32,NULL,'40',1,2,'bonus bMdef,15; bonus bMaxHP,100; bonus bMaxSP,100; bonus2 bSubRace,RC_Player,15;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2179,'TE_Woe_Shield','TE Woe Shield',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,32,NULL,'40',1,3,'bonus bMdef,5; bonus bMaxHP,200; bonus2 bSubRace,RC_Player,20;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2180,'TE_Woe_Magic_Guard','TE Woe Magic Guard',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,32,NULL,'40',1,1,'bonus bMdef,25; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2181,'Hervor','Hervor',4,10,NULL,1500,NULL,100,NULL,0,0xFFFFFFFF,63,2,32,NULL,'1',NULL,2,'bonus bMdef,5; bonus2 bSubRace,RC_All,30; bonus bUnbreakableArmor,1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2182,'Hervor_Alvitr','Hervor Alvitr',4,0,NULL,3000,NULL,150,NULL,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;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2182,'Hervor_Alvitr','Hervor Alvitr',4,0,NULL,3000,NULL,150,NULL,0,0x000FDF80,56,2,32,NULL,'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;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2183,'Impr_Angel\'s_Safeguard','Advanced Angelic Guard',4,10000,NULL,400,NULL,30,NULL,1,0x00000001,63,2,32,NULL,'99',1,1,'bonus2 bSubRace,RC_Demon,5; bonus2 bSubEle,Ele_All,5; bonus2 bSubEle,Ele_Neutral,-5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2185,'Magic_Reflect','Magic Reflect',4,10,NULL,1000,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'99',1,3,'bonus bMdef,10; bonus bMagicDamageReturn,3+((getrefine()>=9) ? 3 : 0);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2186,'Great_Encyclopedia_Revision','Great Encyclopedia Revision',4,10,NULL,200,'0:5',50,NULL,1,0x00810100,63,2,32,NULL,'99',1,4,'bonus bInt,3; bonus bDex,2; .@r = getrefine(); bonus bCritical,3+((.@r >= 7) ? 2 : 0); if(.@r >= 9) bonus bMatk,5;',NULL,NULL);
@@ -1424,7 +1424,7 @@ REPLACE INTO `item_db_re` VALUES (2187,'Shield_of_Gray','Shield of Gray',4,10,NU
 REPLACE INTO `item_db_re` VALUES (2188,'Svalinn_J','Svalinn',4,10,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,3,'.@r = getrefine(); bonus bMaxHP,9+.@r/3; bonus2 bAddEle,Ele_Water,4+.@r/3*5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2189,'Mad_Bunny','Mad Bunny Shield',4,10,NULL,100,NULL,40,NULL,1,0xFFFFFFFF,63,2,32,NULL,'30',1,6,'bonus2 bSubEle,Ele_All,5; bonus bMdef,6; bonus bDex,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2190,'Ancient_Shield_Of_Aeon','Ancient Shield Of Aeon',4,0,NULL,200,NULL,5,NULL,0,0x000FDF80,63,2,32,NULL,'130',1,2,'bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2195,'Lian_Shield','Lian Shield',4,0,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,1,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2195,'Lian_Shield','Lian Shield',4,0,NULL,1300,NULL,50,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2196,'White_Gold_Shield','White Gold Shield',4,0,NULL,1800,NULL,140,NULL,1,0xFFFFFFFF,63,2,32,NULL,NULL,1,NULL,'autobonus2 "{ bonus bMagicDamageReturn,20; }",100,2000,BF_MAGIC; /* Confirm: Success rate? */',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2198,'Lapine_Shield','Lapine Shield',4,0,NULL,1000,NULL,25,NULL,1,0xFFFFFFFF,63,2,32,NULL,'100',1,NULL,'bonus bMdef,10; if (getrefine() > 7) { bonus bMatk,20; }',NULL,NULL);
 # GM Shield
@@ -1730,9 +1730,9 @@ REPLACE INTO `item_db_re` VALUES (2492,'Bayani_Bangungot_Boots','Bayani Bangungo
 REPLACE INTO `item_db_re` VALUES (2493,'Goibne\'s_Combat_Boots_','Goibne\'s Greaves',4,30000,NULL,700,NULL,13,NULL,1,0xFFFFFFFE,63,2,64,NULL,'54',1,0,'bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2494,'Chrystal_Pumps_','Crystal Pumps',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFE,63,0,64,NULL,'0',1,0,'bonus bMdef,10; bonus bLuk,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2495,'Egir_Shoes','Egir Shoes',4,200000,NULL,300,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'110',1,0,'if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,BaseLevel*5; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,JobLevel*2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2496,'TE_Woe_Shoes','TE Woe Shoes',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,0,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2497,'TE_Woe_Boots','TE Woe Boots',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,64,0,'40',1,NULL,'bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2498,'TE_Woe_Magic_Sandal','TE Woe Magic Sandal',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,64,1,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2496,'TE_Woe_Shoes','TE Woe Shoes',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2497,'TE_Woe_Boots','TE Woe Boots',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,64,NULL,'40',1,NULL,'bonus bMaxHP,200; bonus bMaxSP,100; bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2498,'TE_Woe_Magic_Sandal','TE Woe Magic Sandal',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,64,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,100; bonus bMaxSP,200; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2499,'Temporal_Boots','Temporal Boots',4,400,NULL,600,NULL,20,NULL,0,0xFFFFFFFF,63,2,64,NULL,'10',1,NULL,'.@r = getrefine(); bonus bMaxHP,300; bonus bMaxSP,30; bonus bMaxHP,100*(.@r/3); bonus bMaxSP,10*(.@r/3);',NULL,NULL);
 #===================================================================
 # Garments
@@ -2169,15 +2169,15 @@ REPLACE INTO `item_db_re` VALUES (2940,'Ninja_Manual','Ninja Manual',4,0,NULL,10
 REPLACE INTO `item_db_re` VALUES (2941,'Gunslinger_Manual','Gunslinger Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2942,'Taekwon_Manual','Taekwon Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2943,'Critical_Ring_','Critical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,NULL,0,NULL,'bonus bCritical,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2944,'TE_Ring_Of_Protection','TE Ring Of Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2945,'TE_Ring_Of_Rage','TE Ring Of Rage',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2946,'TE_Ring_Of_Defiance','TE Ring Of Defiance',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'40',0,NULL,'bonus bMdef,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2944,'TE_Ring_Of_Protection','TE Ring Of Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus bMaxHP,100; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2945,'TE_Ring_Of_Rage','TE Ring Of Rage',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2946,'TE_Ring_Of_Defiance','TE Ring Of Defiance',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'40',0,NULL,'bonus bMdef,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2948,'Demon_Wing','Demon Wing',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'70',NULL,NULL,'bonus bFlee,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2949,'Silversmith_Bracelet','Silversmith Bracelet',4,10,NULL,100,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'60',NULL,NULL,'bonus bAllStats,1; bonus bMdef,3; skill "SA_SPELLBREAKER",5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2950,'Rune_Ring','Rune Ring',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus2 bExpAddClass,Class_Normal,10;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2951,'Kvasir_Ring_Blue','Kvasir Ring Blue',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_SNOWFLIP",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2952,'Kvasir_Ring_Red','Kvasir Ring Red',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_PEONYMAMY",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2953,'Kvasir_Ring_Green','Kvasir Ring Green',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,1,'1',0,NULL,'bonus bMaxHP,100; skill "ECL_SADAGUI",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2950,'Rune_Ring','Rune Ring',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bExpAddClass,Class_Normal,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2951,'Kvasir_Ring_Blue','Kvasir Ring Blue',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_SNOWFLIP",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2952,'Kvasir_Ring_Red','Kvasir Ring Red',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxSP,30; skill "ECL_PEONYMAMY",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2953,'Kvasir_Ring_Green','Kvasir Ring Green',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxHP,100; skill "ECL_SADAGUI",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2954,'Kvasir_Ring_Brown','Kvasir Ring Brown',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',NULL,NULL,'bonus bMaxHP,100;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2956,'Safety_Ring_','Advanced Safety Ring',4,75000,NULL,100,NULL,10,NULL,1,0xFFFFFFFE,63,2,136,NULL,'50',0,0,'bonus bMdef,5; bonus bAllStats,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2957,'Good_Ring_Of_Flame_Lord','Advanced Ring Of Flame Lord',4,20,NULL,100,NULL,0,NULL,0,0x7CCFDF80,63,2,136,NULL,'85',0,0,'bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20;',NULL,NULL);
@@ -2210,7 +2210,7 @@ REPLACE INTO `item_db_re` VALUES (2992,'Pendant_of_Maelstrom','Pendant of Maelst
 REPLACE INTO `item_db_re` VALUES (2995,'Supplement_Part_Dex','Supplement Part Dex',4,25000,NULL,100,NULL,0,NULL,1,0x00000400,56,2,136,NULL,'100',0,0,'bonus bUseSPrate,-10; bonus bDelayrate,-10; bonus bVariableCastrate,-10; bonus2 bSkillVariableCast,"NC_AXEBOOMERANG",-2000;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2996,'Reinforced_Parts_Gun_Barrel','Reinforced Parts - Gun Barrel',4,10,NULL,500,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',NULL,NULL,'bonus2 bAddClass,Class_All,4; bonus bHit,10; bonus2 bSkillAtk,"NC_BOOSTKNUCKLE",25;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2997,'RWC_Gold_Brooch','RWC Gold Brooch',4,10,NULL,200,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'0',0,NULL,'bonus bBaseAtk,25; bonus bMatk,20;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2998,'Shining_Trapezohedron','Shining Trapezohedron',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,1,'90',1,NULL,'bonus2 bSubEle,Ele_Holy,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2998,'Shining_Trapezohedron','Shining Trapezohedron',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'90',1,NULL,'bonus2 bSubEle,Ele_Holy,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2999,'RWC_Brooch','RWC Brooch',4,10,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'0',0,NULL,'bonus bMaxHP,300; bonus bMaxSP,30;',NULL,NULL);
 #===================================================================
 # Cards
@@ -3150,6 +3150,12 @@ REPLACE INTO `item_db_re` VALUES (4947,'Thrift3','Economy Lv3',6,10,NULL,0,NULL,
 REPLACE INTO `item_db_re` VALUES (4948,'Skill_Delay1','After Skill Delay Lv1',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (4949,'Skill_Delay2','After Skill Delay Lv2',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (4950,'Skill_Delay3','After Skill Delay Lv3',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus bDelayrate,-6;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4994,'Rune_of_Strength_Lv_1','Rune of Strength Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,5; } if (.@r>=10) { bonus bAtkRate,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4995,'Rune_of_Strength_Lv_2','Rune of Strength Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,6; } if (.@r>=11) { bonus bStr,1; bonus bAtkRate,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4996,'Rune_of_Strength_Lv_3','Rune of Strength_Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bStr,7; } if (.@r>=12) { bonus bStr,1; bonus bAtkRate,8; } if (.@r>=13) { bonus bStr,1; bonus bAtkRate,2; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4997,'Rune_of_Agility_Lv_1','Rune of Agility Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,5; } if (.@r>=10) { bonus bFlee2,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4998,'Rune_of_Agility_Lv_2','Rune of Agility Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,6; } if (.@r>=11) { bonus bAgi,1; bonus bFlee2,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (4999,'Rune_of_Agility_Lv_3','Rune of Agility Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bAgi,7; } if (.@r>=12) { bonus bAgi,1; bonus bFlee2,5; } if (.@r>=13) { bonus bAgi,1; bonus bFlee2,5; }',NULL,NULL);
 #===================================================================
 # More Headgears
 #===================================================================
@@ -4032,23 +4038,23 @@ REPLACE INTO `item_db_re` VALUES (5893,'RCC2013_2ND_CROWN','RCC2013 2ND CROWN',4
 REPLACE INTO `item_db_re` VALUES (5894,'RCC2013_3RD_CROWN','RCC2013 3RD CROWN',4,20,NULL,2500,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',0,1108,'bonus bAllStats,3; skill "AL_TELEPORT",1;','sc_start SC_SPEEDUP0,-1,25;','sc_end SC_SPEEDUP0;');
 REPLACE INTO `item_db_re` VALUES (5895,'RCC2013_ANV_Hat','RCC2013 ANV Hat',4,20,NULL,2500,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',0,1109,'bonus bAllStats,1; bonus2 bAddClass,Class_All,2; bonus bMatkRate,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (5906,'Oni_Horns_','Oni Horns',4,0,NULL,20,NULL,10,NULL,1,0x00001000,63,2,256,NULL,'100',1,1127,'bonus2 bSkillAtk,"GC_COUNTERSLASH",(10*getskilllv("GC_WEAPONBLOCKING")); .@r = getrefine(); if(.@r > 6){ bonus bAtk,20; bonus bHit,5; } if(.@r > 9){ bonus3 bAutoSpell,"GC_CROSSIMPACT",1,10; }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5914,'C_Flutter_Butterfly','C Flutter Butterfly',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,1,'1',0,1378,'hateffect HAT_EF_FLUTTER_BUTTERFLY,true;',NULL,'hateffect HAT_EF_FLUTTER_BUTTERFLY,false;');
-REPLACE INTO `item_db_re` VALUES (5917,'Yellow_Scarf','Yellow Scarf',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'90',0,1170,'bonus bLongAtkDef,3;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5914,'C_Flutter_Butterfly','C Flutter Butterfly',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1378,'hateffect HAT_EF_FLUTTER_BUTTERFLY,true;',NULL,'hateffect HAT_EF_FLUTTER_BUTTERFLY,false;');
+REPLACE INTO `item_db_re` VALUES (5917,'Yellow_Scarf','Yellow Scarf',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'90',0,1170,'bonus bLongAtkDef,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (5918,'Gambler_Seal','Gambler Seal',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,NULL,0,1202,'bonus bCritical,3; bonus bCritAtkRate,3; bonus2 bSubSkill,"RA_ARROWSTORM",10; bonus2 bSubSkill,"SR_GATEOFHELL",10; .@dex = readparam(bDex); .@luk = readparam(bLuk); bonus bCritAtkRate,-(.@dex/10)*2; bonus bCritical,.@luk/10; bonus bBaseAtk,(.@luk/10)*2; bonus bMatk,(.@luk/10)*2; if (.@luk > 120) { bonus bCritical,10; bonus bCritAtkRate,10; bonus2 bSubSkill,"RA_ARROWSTORM",30; bonus2 bSubSkill,"SR_GATEOFHELL",30; } else if (.@luk > 108) { bonus bCritical,5; bonus bCritAtkRate,10; }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5919,'Camellia_Hair_Pin','Camellia Hair Pin',4,0,NULL,1000,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,256,0,'50',1,1203,'bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5919,'Camellia_Hair_Pin','Camellia Hair Pin',4,0,NULL,1000,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,1203,'bonus bMdef,20; bonus3 bAutoSpell,"AL_PNEUMA",1,30+getrefine()*5; /* CONFIRM The Rate*/',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (5920,'Medical_Boots','Medical Boots',4,0,NULL,300,NULL,10,NULL,0,0xFFFFFFFF,63,2,64,NULL,'10',1,NULL,'.@r = getrefine(); bonus bHealPower,10+((.@r/2) * 2); bonus2 bSkillUseSP,"AB_CHEAL",(.@r * 5);',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5943,'Owlviscount_Silk_Hat','Owl Viscount Silk Hat',4,0,NULL,500,NULL,15,NULL,1,0xFFFFFFFF,63,2,256,0,'70',1,1323,'bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }";',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5966,'KarduiEar','KarduiEar',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1357,'.@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5967,'Flying Galapago','Flying Galapago',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'110',0,1358,'bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5968,'DVAngelNurseCap','DVAngelNurseCap',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,0,'50',1,1359,'if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0));',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5969,'QueenAnzRevenge','QueenAnzRevenge',4,0,NULL,400,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,0,'100',1,1360,'bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5971,'Moon_Eyepatch','Moon Eyepatch',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,0,'10',0,1370,'bonus2 bSubEle,Ele_Water,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5972,'Chatty_Parrot','Chatty Parrot',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'80',0,1116,'bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5973,'Ancient_Elven_Ear_J','Ancient Elven Ear J',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,665,'bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5978,'Syringe_Toy','Toy Syringe',4,0,NULL,100,NULL,3,NULL,0,0xFFFFFFFF,63,2,1,1,'70',0,842,'bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5979,'C_Angel_Fluttering','C Angel Fluttering',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,0,'1',0,1380,'hateffect HAT_EF_ANGEL_FLUTTERING,true;',NULL,'hateffect HAT_EF_ANGEL_FLUTTERING,false;');
-REPLACE INTO `item_db_re` VALUES (5980,'C_Classical_Fhat','C Classical Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,0,'1',0,1381,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (5985,'Noble_Mask','Noble Mask',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,256,0,'30',0,1409,'bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5943,'Owlviscount_Silk_Hat','Owl Viscount Silk Hat',4,0,NULL,500,NULL,15,NULL,1,0xFFFFFFFF,63,2,256,NULL,'70',1,1323,'bonus bInt,1; bonus bAspdRate,10; .@r = getrefine(); bonus bMatk,7*.@r; autobonus "{ .@r = getrefine(); bonus bAspdRate,(.@r >= 9 ? 40 : ((.@r >= 7) ? 10 : ((.@r >= 5) ? 5 : 1))); }",.@r*20,30000,BF_MAGIC,"{ specialeffect2 EF_SPELLBREAKER }";',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5966,'KarduiEar','KarduiEar',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1357,'.@dex = readparam(bDex); bonus bMatk,(.@dex > 10) ? .@dex/10*2 : 0; if (.@dex > 107) { bonus bVariableCastrate,-10; bonus bMatk,60; } if (.@dex > 119) { bonus bVariableCastrate,-5; bonus bMatk,100; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5967,'Flying Galapago','Flying Galapago',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'110',0,1358,'bonus bAgi,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*40;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5968,'DVAngelNurseCap','DVAngelNurseCap',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,1359,'if (BaseClass == Job_Acolyte) bonus bHealPower,3; bonus bNoCastCancel,1; .@r = getrefine(); bonus bHealPower,(.@r > 8) ? 12 : ((.@r > 6) ? 9 : ((.@r > 4) ? 6 : 0));',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5969,'QueenAnzRevenge','QueenAnzRevenge',4,0,NULL,400,NULL,7,NULL,1,0xFFFFFFFF,63,2,256,NULL,'100',1,1360,'bonus bStr,5; .@r = getrefine(); bonus2 bAddClass,Class_All,7+(.@r > 8 ? 4 : (.@r > 6 ? 3 : (.@r > 4 ? 2 : 0))); bonus bNoSizeFix,1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5971,'Moon_Eyepatch','Moon Eyepatch',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,NULL,'10',0,1370,'bonus2 bSubEle,Ele_Water,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5972,'Chatty_Parrot','Chatty Parrot',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'80',0,1116,'bonus bMatkRate,BaseLevel/50; bonus bVariableCast,-readparam(bInt)/30;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5973,'Ancient_Elven_Ear_J','Ancient Elven Ear J',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,665,'bonus bLuk,10; bonus bMdef,10; bonus bFlee2,2;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5978,'Syringe_Toy','Toy Syringe',4,0,NULL,100,NULL,3,NULL,0,0xFFFFFFFF,63,2,1,NULL,'70',0,842,'bonus bMdef,3; bonus2 bAddItemHealRate,545,150; bonus2 bAddItemHealRate,546,150; bonus2 bAddItemHealRate,547,150;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5979,'C_Angel_Fluttering','C Angel Fluttering',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1380,'hateffect HAT_EF_ANGEL_FLUTTERING,true;',NULL,'hateffect HAT_EF_ANGEL_FLUTTERING,false;');
+REPLACE INTO `item_db_re` VALUES (5980,'C_Classical_Fhat','C Classical Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',0,1381,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (5985,'Noble_Mask','Noble Mask',4,0,NULL,200,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,256,NULL,'30',0,1409,'bonus2 bSkillAtk,"PA_SACRIFICE",BaseLevel*2; bonus2 bSkillVariableCast,"PA_PRESSURE",-2000; bonus2 bSkillVariableCast,"CR_DEVOTION",-2000; if (BaseLevel > 149) { bonus bMaxHPrate,3; bonus bAspdRate,3; } else if (BaseLevel > 99) { bonus bMaxHPrate,2; bonus bAspdRate,2; } else { bonus bMaxHPrate,1; bonus bAspdRate,1; }',NULL,NULL);
 #===================================================================
 # More Etc Items
 #===================================================================
@@ -4871,7 +4877,8 @@ REPLACE INTO `item_db_re` VALUES (6914,'Black_Horn','Black Horn',3,10,NULL,0,NUL
 REPLACE INTO `item_db_re` VALUES (6915,'Captured_Soul','Captured Soul',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6916,'Piece_Of_Soul_Monkey','Piece Of Soul Monkey',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6917,'Piece_Of_Soul_Chicken','Piece Of Soul Chicken',3,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (6919,'Honor_Proof','Honor Proof',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (6919,'Honor_Proof','Honor Token',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (6920,'Rune_Magic_Powder','Rune Magic Powder',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6921,'Dehumidifiers','Dehumidifiers',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6922,'Sandpaper','Sandpaper',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6923,'Bright_Fire_Lights','Bright Fire Lights',3,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -6882,26 +6889,26 @@ REPLACE INTO `item_db_re` VALUES (12716,'Indian_Rice_Cake','Indian Rice Cake',2,
 #===================================================================
 # Guillotine Cross Poisons
 #===================================================================
-REPLACE INTO `item_db_re` VALUES (12717,'Poison_Paralysis','Paralyze',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PARALYSE,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12718,'Poison_Leech','Leech End',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_LEECHESEND,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12719,'Poison_Oblivion','Oblivion Curse',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_OBLIVIONCURSE,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12720,'Poison_Disheart','Disheart',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEATHHURT,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12721,'Poison_Numb','Toxin',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_TOXIN,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12722,'Poison_Fever','Pyrexia',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PYREXIA,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MAGICMUSHROOM,300000,0,10,2;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_VENOMBLEED,15000,0,10,2;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12717,'Poison_Paralysis','Paralyze',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12718,'Poison_Leech','Leech End',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12719,'Poison_Oblivion','Oblivion Curse',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12720,'Poison_Disheart','Disheart',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12721,'Poison_Numb','Toxin',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12722,'Poison_Fever','Pyrexia',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12723,'Poison_Laughing','Magic Mushroom',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12724,'Poison_Fatigue','Venom Bleed',2,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 #===================================================================
 # Rune Knight's Rune Stones
 #===================================================================
-REPLACE INTO `item_db_re` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_REFRESH",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12726,'Runstone_Rhydo','Raido Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_CRUSHSTRIKE",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12727,'Runstone_Verkana','Berkana Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_MILLENNIUMSHIELD",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12728,'Runstone_Isia','Isa Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_VITALITYACTIVATION",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12729,'Runstone_Asir','Othila Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_FIGHTINGSPIRIT",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12730,'Runstone_Urj','Uruz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_ABUNDANCE",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12731,'Runstone_Turisus','Thurisaz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_GIANTGROWTH",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12732,'Runstone_Pertz','Wyrd Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_STORMBLAST",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12733,'Runstone_Hagalas','Hagalaz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,56,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_STONEHARDSKIN",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_REFRESH",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12726,'Runstone_Rhydo','Raido Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_CRUSHSTRIKE",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12727,'Runstone_Verkana','Berkana Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_MILLENNIUMSHIELD",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12728,'Runstone_Isia','Isa Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_VITALITYACTIVATION",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12729,'Runstone_Asir','Othila Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_FIGHTINGSPIRIT",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12730,'Runstone_Urj','Uruz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_ABUNDANCE",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12731,'Runstone_Turisus','Thurisaz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_GIANTGROWTH",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12732,'Runstone_Pertz','Wyrd Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STORMBLAST",1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12733,'Runstone_Hagalas','Hagalaz Rune',2,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) unitskilluseid getcharid(3),"RK_STONEHARDSKIN",1;',NULL,NULL);
 #===================================================================
 # Rune Knight Rune Ores
 #===================================================================
@@ -8630,11 +8637,11 @@ REPLACE INTO `item_db_re` VALUES (15058,'Rider_Suit','Rider Suit',4,20,NULL,1000
 REPLACE INTO `item_db_re` VALUES (15059,'2011Love_Daddy','2011Love Daddy',4,20,NULL,100,'0',80,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15060,'Sky_Blue_Smock','Sky Blue Smock',4,20,NULL,300,'0',1,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15061,'Egir_Armor','Egir Armor',4,200000,NULL,2600,NULL,55,NULL,1,0xFFFFFFFF,63,2,16,NULL,'110',1,0,'bonus bAllStats,1; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (15062,'TE_Woe_Coat','TE Woe Coat',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,16,0,'40',1,NULL,'bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (15063,'TE_Woe_Chain_Mail','TE Woe Chain Mail',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,16,0,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (15064,'TE_Woe_Mage_Coat','TE Woe Mage Coat',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,16,0,'40',1,NULL,'bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (15062,'TE_Woe_Coat','TE Woe Coat',4,0,NULL,0,NULL,15,NULL,0,0xFFFFFFFF,63,2,16,NULL,'40',1,NULL,'bonus bMdef,15; bonus bMaxHP,250; bonus bMaxSP,250; bonus2 bSubRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (15063,'TE_Woe_Chain_Mail','TE Woe Chain Mail',4,0,NULL,0,NULL,25,NULL,0,0x000444A2,63,2,16,NULL,'40',1,NULL,'bonus bMdef,5; bonus bMaxHP,450; bonus bMaxSP,50; bonus2 bSubRace,RC_Player,15; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (15064,'TE_Woe_Mage_Coat','TE Woe Mage Coat',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,16,NULL,'40',1,NULL,'bonus bMdef,25; bonus bMaxHP,200; bonus bMaxSP,200; bonus2 bSubRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15066,'Engraved_Plate_Armor','Engraved Plate Armor',4,100000,NULL,3000,NULL,120,NULL,1,0x00004082,63,2,16,NULL,'150',1,NULL,'bonus bMdef,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (15067,'Rune_Suit','Rune Suit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,16,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (15067,'Rune_Suit','Rune Suit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,16,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15068,'Im_Angel\'s_Protection','Advanced Angelic Protection',4,10000,NULL,600,NULL,40,NULL,1,0x00000001,63,2,16,NULL,'99',1,0,'bonus bMdef,30;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15069,'Suit_Of_Sid','Suit Of Sid',4,20,NULL,1000,NULL,30,NULL,0,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15070,'Clothes_of_Happiness','Clothes of Happiness',4,10,NULL,1000,NULL,5,NULL,1,0xFFFFFFFF,63,2,16,NULL,'1',1,NULL,'bonus bMdef,5; bonus bLuk,getrefine();',NULL,NULL);
@@ -9535,7 +9542,7 @@ REPLACE INTO `item_db_re` VALUES (18561,'B_Feather_Beret','B Feather Beret',4,20
 REPLACE INTO `item_db_re` VALUES (18562,'Bone_Hat','Bone Hat',4,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'10',1,732,'bonus bMdef,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18563,'Heart_Wing_Hairband','Heart Wing Hairband',4,20,NULL,300,NULL,0,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,733,'bonus bUseSPrate,-10; bonus bDelayrate,-5; .@r = getrefine()/3; if(.@r>0){ bonus bUseSPrate,.@r*3; bonus bDelayrate,.@r*3; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18564,'Love_Piece','Love Piece',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'50',0,734,'bonus bNoCastCancel,1; bonus bUseSPrate,15;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18565,'Leprechaun_Hat','Leprechaun Hat',4,20,NULL,300,NULL,8,NULL,1,0xFFFFFFFF,63,2,256,NULL,'40',0,735,'bonus bStr,1; bonus bInt,1; bonus bMdef,4; if(getrefine()>6){ bonus2 bAddMonsterDropItem,12135,50; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18565,'Leprechaun_Hat','St Patrick\'s Hat',4,20,NULL,300,NULL,8,NULL,1,0xFFFFFFFF,63,2,256,NULL,'40',1,735,'bonus bStr,1; bonus bInt,1; bonus bMdef,4; if(getrefine()>6){ bonus2 bAddMonsterDropItem,12135,50; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18566,'Nut_Donut_In_Mouth','Nut Donut In Mouth',4,20,NULL,0,NULL,1,NULL,0,0xFFFFFFFF,63,2,1,NULL,'0',0,736,'bonus bBaseAtk,5; bonus bMatk,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18567,'Stretched_Nose','Stretched Nose',4,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'0',0,737,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18568,'Humming_Bird','Humming Bird',4,20,NULL,100,NULL,3,NULL,0,0xFFFFFFFF,63,2,256,NULL,'10',0,702,'bonus bMdef,6;',NULL,NULL);
@@ -9691,10 +9698,10 @@ REPLACE INTO `item_db_re` VALUES (18727,'Sedora_Hat','Sedora Hat',4,20,NULL,300,
 REPLACE INTO `item_db_re` VALUES (18728,'Egir_Helm','Egir Helm',4,200000,NULL,800,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'110',1,870,'bonus bMdef,5; bonus bUnbreakableHelm,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18729,'MVP_Basketball','MVP Basketball',4,20,NULL,150,NULL,6,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,871,'bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10; bonus2 bAddItemHealRate,522,30; .@r = getrefine(); bonus bVariableCastrate,(.@r>=12)?(-5):((.@r>=10)?(-4):(-3));',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18730,'Cryptura_Academy_Hat','Cryptura Academy Hat',4,0,NULL,200,NULL,2,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,872,'bonus bMaxHP,15; bonus bMaxSP,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18732,'TE_Woe_Cap','TE Woe Cap',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,256,0,'40',1,14,'bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18733,'TE_Woe_Bone_Helm','TE Woe Bone Helm',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,256,0,'40',1,103,'bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18734,'TE_Woe_Magic_Eyes','TE Woe Magic Eyes',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,256,0,'40',1,209,'bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18736,'Censor_Bar_','Censor Bar',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'1',0,229,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18732,'TE_Woe_Cap','TE Woe Cap',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,256,NULL,'40',1,14,'bonus bMdef,5; bonus bBaseAtk,5; bonus bMatk,5; bonus2 bAddRace,RC_Player,10; bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18733,'TE_Woe_Bone_Helm','TE Woe Bone Helm',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,256,NULL,'40',1,103,'bonus bBaseAtk,10; bonus2 bAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18734,'TE_Woe_Magic_Eyes','TE Woe Magic Eyes',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,256,NULL,'40',1,209,'bonus bMdef,5; bonus bMatk,10; bonus2 bMagicAddRace,RC_Player,20; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18736,'Censor_Bar_','Censor Bar',4,0,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,229,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18737,'Fortier_Mask','Fortier Masque',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'10',0,876,'bonus bUnbreakableHelm,1; bonus2 bMagicAtkEle,Ele_Fire,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18739,'Carnation_Hairband','Carnation Hairband',4,20,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',1,878,'bonus bLuk,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18740,'Hair_Of_The_Strong','RMSC2012 Special Costume',4,20,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'0',0,879,NULL,NULL,NULL);
@@ -9711,7 +9718,7 @@ REPLACE INTO `item_db_re` VALUES (18750,'Poker_Card_In_Mouth','Poker Card In Mou
 REPLACE INTO `item_db_re` VALUES (18752,'Cursed_Book','Cursed Book',4,20,NULL,300,NULL,3,NULL,1,0xFFFFFFFE,63,2,256,NULL,'99',1,890,'.@r = getrefine(); bonus2 bHPLossRate,.@r,5000; bonus2 bHPDrainRate,40,4+(.@r/2); bonus2 bSPDrainRate,10,1+(.@r/3);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18753,'Tw_Rice_Ball','Tw Rice Ball',4,20,NULL,100,NULL,6,NULL,0,0xFFFFFFFF,63,2,256,NULL,'0',0,892,'bonus bLuk,1; bonus2 bAddMonsterDropItem,564,100;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18754,'Blood_Sucker','Blood Sucker',4,20,NULL,300,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'40',0,893,'bonus bUnbreakableHelm,1; bonus2 bHPDrainRate,30,5; bonus bHPrecovRate,-100; bonus bSPrecovRate,-100;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18755,'Feather_Beret_','Feather Beret',4,0,NULL,600,NULL,1,NULL,1,0xFFFFFFFF,63,2,256,0,'1',1,224,'bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18755,'Feather_Beret_','Feather Beret',4,0,NULL,600,NULL,1,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,224,'bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Player,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu Hat',4,20,NULL,400,NULL,6,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,894,'bonus bBaseAtk,30; bonus2 bAddRace,RC_Brute,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',4,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,1; bonus2 bAddMonsterDropItem,1032,400; bonus2 bAddMonsterDropItem,1033,100; bonus3 bAddMonsterDropItem,576,RC_Plant,40;',NULL,NULL);
@@ -9791,7 +9798,7 @@ REPLACE INTO `item_db_re` VALUES (18861,'Zaha_Doll_J_Hat','Zaha Doll J Hat',4,10
 REPLACE INTO `item_db_re` VALUES (18863,'Exorcist_Robe','Exorcist Robe',4,10,NULL,1700,NULL,57,NULL,1,0xFFFFFFFF,63,2,16,NULL,'60',1,NULL,'bonus bMdef,5; .@r = getrefine(); if (.@r >= 3) { bonus2 bAddRace,RC_Undead,.@r/3*5; } if (BaseClass==Job_Acolyte) bonus2 bAddRace,RC_Undead,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18864,'Earth_Goddess_Flower','Earth Goddess Flower',4,10,NULL,250,NULL,6,NULL,0,0xFFFFFFFF,63,2,256,NULL,'1',1,864,'bonus2 bAddEle,Ele_Earth,15; skill "WZ_EARTHSPIKE",5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18865,'Sword_Master_Crown','Sword Master Crown',4,10,NULL,1000,NULL,30,NULL,1,0xFFFFFFFF,63,2,256,NULL,'50',1,981,'.@i = BaseLevel; bonus bBaseAtk,(.@i>150)?(15):((.@i>100)?(10):((.@i>50)?(5):(0))); if(getskilllv("SM_SWORD")==10) bonus bHit,10; if(getskilllv("SM_TWOHAND")==10) bonus bUseSPrate,-5; if(getskilllv("AM_AXEMASTERY")==10) bonus bVariableCastrate,-5; if(getskilllv("AS_KATAR")==10) bonus bCritAtkRate,20; if(getskilllv("PR_MACEMASTERY")==10) bonus bAspdRate,10;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18867,'Vajra','Vajra',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,0,'48',0,983,'bonus bDex,1; bonus bLongAtkRate,2;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18867,'Vajra','Vajra',4,0,NULL,300,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'48',0,983,'bonus bDex,1; bonus bLongAtkRate,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18868,'Assassin_Skull_Mask','Assassin Skull Mask',4,10,NULL,500,NULL,2,NULL,0,0xFFFFFFFF,63,2,513,NULL,'70',NULL,984,'bonus bCritical,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18870,'Very_Sweet_Candy_Bar','Very Sweet Candy Bar',4,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',1,446,'bonus bAllStats,2; bonus bBaseAtk,10; bonus bMatk,10; bonus2 bExpAddClass,Class_All,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18871,'Very_Sweet_Candy','Very Sweet Candy',4,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',1,446,'bonus bAllStats,1; bonus bBaseAtk,5; bonus bMatk,5;',NULL,NULL);
@@ -9860,7 +9867,7 @@ REPLACE INTO `item_db_re` VALUES (19019,'Elemental_Crown','Elemental Crown',4,0,
 REPLACE INTO `item_db_re` VALUES (19020,'Survive_Circlet','Survive Circlet',4,0,NULL,500,NULL,10,NULL,0,0xFFFFFFFF,63,2,256,NULL,NULL,1,1220,'.@r = getrefine(); bonus bInt,(3 + (.@r/2)+ (BaseLevel > 130 ? .@r : 0)); bonus bMatkRate,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19021,'Gigant_Helm','Gigant Helm',4,0,NULL,500,NULL,10,NULL,0,0xFFFFFFFF,63,2,256,NULL,NULL,1,1221,'bonus bStr,3+((BaseLevel > 130) ? getrefine() : 0); bonus2 bAddClass,Class_All,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19022,'Floating_Stone_Of_Intelligence','Floating Stone Of Intelligence',4,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,NULL,NULL,1230,NULL,'sc_start SC_FSTONE,-1,0;','sc_end SC_FSTONE;');
-REPLACE INTO `item_db_re` VALUES (19024,'Protect_Feathers','Protect Feathers',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1232,'bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (19024,'Protect_Feathers','Protect Feathers',4,0,NULL,500,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1232,'bonus2 bSubRace,RC_DemiHuman,2; bonus2 bSubRace,RC_Player,2; bonus bAspdRate,-5; .@vit = readparam(bVit); if (.@vit >= 108) { bonus2 bSubRace,RC_DemiHuman,3; bonus2 bSubRace,RC_Player,3; bonus bAspdRate,-5; } if (.@vit >= 120) { bonus bMaxHPRate,3; bonus bMdef,3; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19026,'Aegir_Helm','Aegir Helm',4,10,NULL,800,NULL,10,NULL,1,0xFFFFFFFF,63,2,256,NULL,'40',1,870,'bonus bVit,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19030,'Pretty_Rabbit_Hood','Pretty Rabbit Hood',4,10,NULL,100,NULL,20,NULL,1,0xFFFFFFFF,63,2,769,NULL,'1',1,1085,'bonus bMaxHP,(15*BaseLevel);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19031,'Fallen_Angel_Blessing','Fallen Angel Blessing',4,0,NULL,200,NULL,1,NULL,0,0xFFFFFFFF,63,2,512,NULL,NULL,1,1250,'bonus2 bAddRace,RC_Angel,5; bonus2 bSubRace,RC_Angel,5;',NULL,NULL);
@@ -9872,7 +9879,7 @@ REPLACE INTO `item_db_re` VALUES (19048,'Elemental_Clothe','Elemental Clothes',4
 REPLACE INTO `item_db_re` VALUES (19051,'Warrior_Moon_Cat','Warrior Moon Cat',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,1308,'/*Enables use of Level 1 Monster\'s Cry*/ bonus bAllStats,3; bonus2 bHPDrainRate,40,5; bonus2 bSPDrainRate,10,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19052,'Sigruns_Wing','Rental Sigrun\'s Wing',4,10,NULL,0,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,568,'if (Class == Job_Swordman || Class == Job_Thief || Class == Job_Merchant || Class == Job_Taekwon || Class == Job_Star_Gladiator || Class == Job_Star_Gladiator2) bonus bAspd,1; else if (Class == Job_Mage || Class == Job_Acolyte || Class == Job_Ninja || Class == Job_Soul_Linker) { bonus bMatk,5; bonus bHealPower,2; } else if (Class == Job_Archer || Class == Job_Gunslinger) bonus bLongAtkRate,2; else if (Class == Job_Novice || Class == Job_SuperNovice) { bonus bMaxHP,120; bonus bMaxSP,60; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19053,'Fighter_Moon_Cat','Fighter Moon Cat',4,20,NULL,100,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'1',1,1308,'/*Enables use of Level 1 Monster\'s Cry*/ .@r = getrefine(); bonus bAllStats,3; bonus2 bAddEff,Eff_Stun,500+(.@r*100);',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (19082,'Bio_Protector','Bio Protector',4,0,NULL,500,NULL,3,NULL,0,0xFFFFFFFF,63,2,512,1,'50',1,1366,'bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (19082,'Bio_Protector','Bio Protector',4,0,NULL,500,NULL,3,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',1,1366,'bonus bHit,10; bonus bVariableCastrate,-5; bonus bPerfectHitRate,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19083,'Mask_of_Hero','Mask of Hero',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1367,'bonus bVit,10; bonus bMdef,10; bonus bShortWeaponDamageReturn,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19084,'Parfaille_Vigilante_Hat','Parfaille Vigilante Hat',4,0,NULL,100,NULL,2,NULL,0,0x80000000,63,2,256,NULL,'20',1,1368,'bonus bLuk,1; bonus3 bAutoSpell,"AL_BLESSING",3,100;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19085,'Sigrun\'s_Wings_','Sigrun\'s Wings',4,20,NULL,100,NULL,2,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',0,568,'if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief||(BaseJob==Job_Taekwon&&Class!=Job_Soul_Linker)) { bonus bAspd,1; bonus bAgi,-2; } else if(BaseClass==Job_Mage||BaseClass==Job_Acolyte||Class==Job_Ninja||Class==Job_Soul_Linker){ bonus bMatk,3; bonus bHealPower,2; } else if(BaseClass==Job_Archer||BaseClass==Job_Gunslinger) bonus bLongAtkRate,1; else if(BaseJob==Job_Novice||BaseJob==Job_SuperNovice) { bonus bMaxHP,60; bonus bMaxSP,30; }',NULL,NULL);
@@ -9886,9 +9893,9 @@ REPLACE INTO `item_db_re` VALUES (19092,'Machoman_Glasses_','Machoman\'s Glasses
 REPLACE INTO `item_db_re` VALUES (19093,'Spinning_Eyes_','Geek Glasses',4,20000,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,512,NULL,'0',0,27,'bonus2 bResEff,Eff_Blind,800;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19094,'Mr_Smile_','Mr. Smile',4,60,NULL,100,NULL,1,NULL,1,0xFFFFFFFF,63,2,513,NULL,'0',0,65,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19095,'Happy_Balloon','Happy Balloon',4,0,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,1,NULL,'1',0,1289,'bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (19109,'Valhalla_Idol','Valhalla Idol',4,0,NULL,300,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,0,'70',0,1423,'bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (19111,'Laser_Of_Eagle','Laser of Eagle',4,0,NULL,400,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,0,'100',1,1424,'bonus bDex,2; bonus bLongAtkRate,10; bonus4 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG; /*TODO: Chance to transform become Shechil while attacking.*/',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (19116,'Red_Baby_Dragon','Red Baby Dragon',4,0,NULL,700,NULL,NULL,1,1,0xFFFFFFFF,63,2,256,0,'90',1,1463,'.@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (19109,'Valhalla_Idol','Valhalla Idol',4,0,NULL,300,NULL,2,NULL,0,0xFFFFFFFF,63,2,512,NULL,'70',0,1423,'bonus bMaxSP,50; bonus3 bAutoSpell,"MG_SAFETYWALL",10,50;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (19111,'Laser_Of_Eagle','Laser of Eagle',4,0,NULL,400,NULL,5,NULL,1,0xFFFFFFFF,63,2,256,NULL,'100',1,1424,'bonus bDex,2; bonus bLongAtkRate,10; bonus5 bAutoSpell,"PR_LEXAETERNA",1,50,BF_LONG,1; /*TODO: Chance to transform become Shechil while attacking.*/',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (19116,'Red_Baby_Dragon','Red Baby Dragon',4,0,NULL,700,NULL,NULL,1,1,0xFFFFFFFF,63,2,256,NULL,'90',1,1463,'.@r=getrefine(); bonus bMaxHPrate,5; bonus bMaxSPrate,5; bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; if (.@r>=6) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; } if (.@r>=8) { bonus2 bSkillAtk,"RK_DRAGONBREATH",15; bonus2 bSkillAtk,"RK_DRAGONBREATH_WATER",15; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19117,'Poring_Sunglasses','Poring Sunglasses',4,0,NULL,10,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'1',0,954,'bonus2 bDropAddRace,RC_All,5; bonus2 bExpAddRace,RC_All,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19118,'Poring_Sunglasses_','Poring Sunglasses',4,0,NULL,10,NULL,0,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',0,954,'bonus2 bDropAddRace,RC_All,4; bonus2 bExpAddRace,RC_All,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (19126,'Shadow_Booster_','Magical Booster',4,10,NULL,300,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,512,NULL,'1',1,873,'bonus bAspd,1; bonus bDelayrate,-1;',NULL,NULL);
@@ -10421,7 +10428,7 @@ REPLACE INTO `item_db_re` VALUES (20095,'C_Red_Ribbon','Costume Red Ribbon',4,0,
 REPLACE INTO `item_db_re` VALUES (20096,'C_Blue_Ribbon','Costume Blue Ribbon',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,441,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20097,'C_White_Ribbon','Costume White Ribbon',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,442,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20098,'C_Vampire_Hairband','Costume Vampire Hairband',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1238,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20099,'C_Ljosalfar','Flying Ljosalfar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1239,NULL,'sc_start SC_LJOSALFAR,-1,0;','sc_end SC_LJOSALFAR;');
+REPLACE INTO `item_db_re` VALUES (20099,'C_Ljosalfar','Flying Ljosalfar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1239,NULL,'sc_start SC_LJOSALFAR,-1,0;','sc_end SC_LJOSALFAR;');
 REPLACE INTO `item_db_re` VALUES (20100,'C_Volume_Fhat','Costume Volume Fhat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1240,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20101,'C_Bragi_Wing_Ears','Costume Bragi Wing Ears',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1241,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20102,'C_Horse_King_J','Costume Horse King J',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,7168,NULL,'1',1,1189,NULL,NULL,NULL);
@@ -10437,9 +10444,9 @@ REPLACE INTO `item_db_re` VALUES (20111,'C_Coiledup_Snake_Hat2','Costume Coiledu
 REPLACE INTO `item_db_re` VALUES (20112,'C_Aqua_Ten_Gallon_Hat','Costume Aqua Ten Gallon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1256,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20113,'C_Star_Reading_Hat','Costume Star Reading Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1253,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20114,'C_Funeral_Hat','Costume Funeral Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,77,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20115,'C_Under_Rim_Glasses','Under Rim Glasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1255,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20116,'C_Mermaid_Headphone','Mermaid Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1254,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20117,'C_Raspberry_Mousse_Hat','Raspberry Mousse Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1257,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20115,'C_Under_Rim_Glasses','Under Rim Glasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1255,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20116,'C_Mermaid_Headphone','Mermaid Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1254,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20117,'C_Raspberry_Mousse_Hat','Raspberry Mousse Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1257,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20118,'C_Cake_Hat','Costume Cake Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,109,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20119,'C_Beanie','Costume Beanie',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,160,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20120,'C_Aerial','Costume Aerial',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,97,NULL,NULL,NULL);
@@ -10540,9 +10547,9 @@ REPLACE INTO `item_db_re` VALUES (20214,'C_Evil_Marcher_Hat_J','Costume Evil Mar
 REPLACE INTO `item_db_re` VALUES (20215,'C_Black_Devil_Mask','Costume Black Devil Mask',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,760,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20216,'C_Rideword_Hat','Costume Rideword Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,890,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20217,'C_Arabian_Veil','Costume Arabian Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1300,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20218,'C_Spell_Circuit','Costume Spell Circuit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1301,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20218,'C_Spell_Circuit','Costume Spell Circuit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1301,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20219,'C_Angel_Marcher_Hat','Costume Angel Marcher Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1302,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20220,'C_Dark_Night_Veil','Costume Dark Night Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,3072,1,'1',1,1303,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20220,'C_Dark_Night_Veil','Costume Dark Night Veil',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,3072,NULL,'1',1,1303,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20221,'C_Eyes_Of_Ifrit','C Eyes Of Ifrit',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,886,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20222,'C_Blue_Pigtail_Santa_Hat','Costume Blue Pigtail Santa Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,NULL,1,395,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20223,'C_Romantic_Leaf','Costume Romantic Leaf',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,57,NULL,NULL,NULL);
@@ -10626,8 +10633,8 @@ REPLACE INTO `item_db_re` VALUES (20311,'C_Magical_Booster','Costume Magical Boo
 REPLACE INTO `item_db_re` VALUES (20312,'C_Barons_Evil_Eye','Costume Baron\'s Evil Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,989,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20313,'C_CD_in_Mouth','Costume CD in Mouth',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,815,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20314,'C_New_Wave_Sunglasses','Costume New Wave Sunglasses',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,856,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20315,'C_Analyze_Eye','Costume Analyze Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,1,'1',1,1351,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20316,'C_Seraph_Wing_Helm','Costume Seraph Wing Helm',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1352,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20315,'C_Analyze_Eye','Costume Analyze Eye',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1351,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20316,'C_Seraph_Wing_Helm','Costume Seraph Wing Helm',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1352,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20317,'C_Nekomimi_Cyber_Headphone','Costume Nekomimi Cyber Headphone',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1353,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20318,'C_Charleston_Antenna','Costume Charleston Antenna',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1354,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20319,'C_Crimson_Booster','Costume Crimson Booster',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1355,NULL,NULL,NULL);
@@ -10635,8 +10642,8 @@ REPLACE INTO `item_db_re` VALUES (20320,'C_Red_Bandana','Costume Red Bandana',4,
 REPLACE INTO `item_db_re` VALUES (20321,'C_Pterios_Fins','Costume Pterios Fins',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1009,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20322,'C_Seal_Hat','Costume Seal Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,540,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20323,'C_Sparkling_Sound','Costume Sparkling Sound',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1074,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20324,'C_Pigeon_Hat','Costume Pigeon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,1,'1',1,1362,NULL,NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20325,'C_Little_Aquarium','Costume Little Aquarium',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,1,'1',1,1363,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20324,'C_Pigeon_Hat','Costume Pigeon Hat',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1362,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20325,'C_Little_Aquarium','Costume Little Aquarium',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,2048,NULL,'1',1,1363,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20326,'C_Sailor_Collar','Costume Sailor Collar',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1364,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20327,'C_Marine_Cap','Costume Marine Cap',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1024,NULL,'1',1,1365,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20328,'C_Mackerel_Pike','Costume Mackerel Pike',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',1,1081,NULL,NULL,NULL);
@@ -10778,12 +10785,12 @@ REPLACE INTO `item_db_re` VALUES (20509,'C_Wings_of_Uriel','Costume Wings of Uri
 REPLACE INTO `item_db_re` VALUES (20510,'C_SwordWing','Costume Sword Wing',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,19,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20600,'Fantastic_Aura','Fantastic Aura',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,0,'/*TODO: View ID*/ bonus bUnbreakableHelm,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20700,'Egir_Manteau','Egir Manteau',4,200000,NULL,300,NULL,10,NULL,1,0xFFFFFFFF,63,2,4,NULL,'110',1,0,'bonus bUnbreakableGarment,1; .@r = getrefine(); if (.@r > 10) .@r = 10; if (BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte) { bonus bFlee2,5+(.@r*2); } else if (BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief) { bonus bShortWeaponDamageReturn,5+(.@r*2); }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20702,'TE_Woe_Muffler','TE Woe Muffler',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,4,1,'40',1,NULL,'bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20703,'TE_Woe_Manteau','TE Woe Manteau',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,4,1,'40',1,NULL,'bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20704,'TE_Woe_Magic_Manteau','TE Woe Magic Manteau',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,4,1,'40',1,NULL,'bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20702,'TE_Woe_Muffler','TE Woe Muffler',4,0,NULL,0,NULL,5,NULL,0,0xFFFFFFFF,63,2,4,NULL,'40',1,NULL,'bonus bMdef,5; bonus2 bAddRace,RC_Player,5; bonus2 bMagicAddRace,RC_Player,5; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20703,'TE_Woe_Manteau','TE Woe Manteau',4,0,NULL,0,NULL,10,NULL,0,0x000444A2,63,2,4,NULL,'40',1,NULL,'bonus2 bAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20704,'TE_Woe_Magic_Manteau','TE Woe Magic Manteau',4,0,NULL,0,NULL,5,NULL,0,0x00818315,63,2,4,NULL,'40',1,NULL,'bonus2 bMagicAddRace,RC_Player,10; bonus2 bResEff,Eff_Freeze,25;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20706,'Amistr_Bag','Amistr Bag',4,10,NULL,500,NULL,18,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',NULL,4,'bonus bAllStats,1; bonus2 bSubEle,Ele_All,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20707,'Kirin_Wing','Kirin Wing',4,20,NULL,0,NULL,18,NULL,0,0xFFFFFFFF,63,2,4,NULL,'0',1,6,'bonus bAllStats,1; bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20709,'Mana_Manteau','Mana Manteau',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20709,'Mana_Manteau','Mana Manteau',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20710,'Impr_Angel\'s_Warmth','Advanced Angelic Cardigan',4,10000,NULL,400,NULL,6,NULL,1,0x00000001,63,2,4,NULL,'99',1,0,'bonus bHPrecovRate,50;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20711,'Manteau_Of_Diego','Manteau Of Diego',4,20,NULL,600,NULL,15,NULL,1,0xFFFFFFFF,63,2,4,NULL,'0',1,0,'bonus bInt,1; bonus bDex,1; bonus bMdef,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20717,'Gigant_Snake_Skin','Gigant Snake Skin',4,10,NULL,400,NULL,38,NULL,0,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'bonus bMdef,10;',NULL,NULL);
@@ -10801,7 +10808,7 @@ REPLACE INTO `item_db_re` VALUES (20744,'Tarlock\'s_Cloak','Tarlock\'s Cloak',4,
 REPLACE INTO `item_db_re` VALUES (20746,'C_Rudra_Wings','Costume Rudra Wings',4,10,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,8,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20748,'Cloak_Of_Casualties','Cloak Of Casualties',4,10,NULL,600,NULL,20,NULL,0,0xFFFFFFFF,63,2,4,NULL,'120',1,NULL,'.@r = getrefine(); bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20749,'Cloak_Of_Casualties_','Cloak Of Casualties',4,10,NULL,600,NULL,30,NULL,1,0xFFFFFFFF,63,2,4,NULL,'170',1,NULL,'.@r = getrefine(); bonus bMaxHPrate,.@r/2; bonus bMaxSPrate,.@r/2; bonus bAgi,5; bonus bFlee,10; if(readparam(bStr)>=90) bonus bBaseAtk,10+(.@r*2); if(readparam(bInt)>=90) bonus bMatk,20+(.@r*3); if(readparam(bVit)>=90) bonus2 bSubEle,Ele_Neutral,3+((.@r>=8)?3:0)+((.@r>=10)?4:0); if(readparam(bAgi)>=90){ bonus bAspdRate,3+(.@r/2); bonus bAspd,((.@r>=10)?1:0); } if(readparam(bDex)>=90) bonus bLongAtkRate,3+(.@r/2); if(readparam(bLuk)>=90) bonus bCriticalRate,5+.@r;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20753,'Lian_Robe','Lian Robe',4,0,NULL,700,NULL,20,1,1,0xFFFFFFFF,63,2,4,0,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20753,'Lian_Robe','Lian Robe',4,0,NULL,700,NULL,20,1,1,0xFFFFFFFF,63,2,4,NULL,'65',1,NULL,'bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubRace,RC_Formless,-5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20756,'Aegir_Cloak','Aegir Cloak',4,10,NULL,300,NULL,10,NULL,1,0xFFFFFFFF,63,2,4,NULL,'40',1,NULL,'bonus bUnbreakableGarment,1; bonus bMaxHP,500; bonus bMaxSP,50;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20761,'C_Happiness_Wings','Costume Happiness Wings',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,9,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20762,'C_Great_Devil_Wings','Costume Great Devil Wings',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,8192,NULL,'1',0,10,NULL,NULL,NULL);
@@ -10811,12 +10818,12 @@ REPLACE INTO `item_db_re` VALUES (20779,'Rift_Manteau','Rift Manteau',4,20,NULL,
 REPLACE INTO `item_db_re` VALUES (20780,'Unity_STR_Manteau','Unity STR Manteau',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bMaxHPrate,2*(.@r/2); }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20781,'Unity_AGI_Manteau','Unity AGI Manteau',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bFlee,3*(.@r/2); }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20782,'Unity_INT_Muffler','Unity INT Muffler',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bUseSPrate,-(.@r/2); }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20783,'Hero_Cape','Hero Cape',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,1,'10',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20783,'Hero_Cape','Hero Cape',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,NULL,'10',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,1+(.@r/3); bonus bFlee,1+(.@r/3); if (.@r > 9) { bonus2 bSubEle,Ele_Neutral,20; bonus bFlee,20; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20787,'Unity_Exquisite_Muffler','Unity Exquisite Muffler',4,32000,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,0,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bCritical,2*(.@r/2); }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20788,'Private_Doram_Manteau','Private Doram Manteau',4,20,NULL,300,NULL,20,NULL,1,0x80000000,7,2,4,NULL,'100',1,NULL,'bonus bFlee,5; bonus2 bSubEle,Ele_Neutral,2; bonus bFlee2,getrefine()/3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20789,'Luxury_Doram_Manteau','Luxury Doram Manteau',4,20,NULL,400,NULL,25,NULL,1,0x80000000,7,2,4,NULL,'140',1,NULL,'bonus bFlee,7; bonus2 bSubEle,Ele_Neutral,3; .@r = getrefine()/3; bonus bFlee2,.@r; bonus bLuk,.@r;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20790,'Elegant_Doram_Manteau','Elegant Doram Manteau',4,20,NULL,500,NULL,30,NULL,1,0x80000000,7,2,4,NULL,'175',1,NULL,'bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine()/2; bonus bFlee2,.@r; bonus bInt,.@r; bonus bDex,.@r; bonus bLuk,.@r;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (20797,'Etran_Shirt','Etran Shirt',4,0,NULL,150,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,1,'1',1,NULL,'bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20797,'Etran_Shirt','Etran Shirt',4,0,NULL,150,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus bMdef,10; bonus bMaxHPrate,2; .@r = getrefine(); if (.@r >= 6) bonus bMaxHPrate,4; if (.@r >= 7) bonus bMaxHPrate,6; if (.@r >= 8) bonus bMaxHPrate,8; if (.@r >= 9) bonus bNoKnockback,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20798,'C_Grim_Reaper_Protection','Costume Grim Reaper Protection',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,4096,NULL,'1',0,1450,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20815,'SeraphimRobe','Seraphim Robe',4,0,NULL,300,NULL,18,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,NULL,'bonus bMaxHPrate,10; bonus2 bMagicAtkEle,Ele_Neutral,5; .@r = getrefine(); if (.@r > 6) { bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Holy,20; bonus bMatkRate,10; } if (.@r > 8) { bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus bVariableCastrate,-5; } if (getskilllv("CR_TRUST") > 0) { bonus2 bSubEle,Ele_Holy,.@r*3; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20819,'Oxygen_Bottle','Oxygen Bottle',4,0,NULL,500,NULL,0,NULL,1,0xFFFFFFFF,63,2,4,NULL,'40',0,0,'bonus bFlee,12+getrefine(); bonus bHit,getrefine();',NULL,NULL);
@@ -10862,7 +10869,7 @@ REPLACE INTO `item_db_re` VALUES (22008,'Temporal_DEX_Boots_','Temporal Boots Of
 REPLACE INTO `item_db_re` VALUES (22009,'Temporal_INT_Boots_','Temporal Boots Of Intelligence',4,20,NULL,600,NULL,20,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMdef,5; bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMatk,10*(.@r/3); if(readparam(bInt)>=120) bonus bMatk,60;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22010,'Temporal_AGI_Boots_','Temporal Boots Of Agility',4,20,NULL,600,NULL,25,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bAspdRate,3*(.@r/3); if(readparam(bAgi)>=120) bonus bAspd,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22011,'Temporal_LUK_Boots_','Temporal Boots Of Luck',4,20,NULL,600,NULL,20,NULL,1,0xFFFFFFFF,56,2,64,NULL,'99',1,NULL,'.@r = getrefine(); bonus bMaxHP,300+(100*(.@r/3)); bonus bMaxSP,30+(10*(.@r/3)); bonus bMdef,5; bonus bCritAtkRate,2*(.@r/3); if(readparam(bLuk)>=120) bonus bCritAtkRate,30;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22012,'Mana_Boots','Mana Boots',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,64,0,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22012,'Mana_Boots','Mana Boots',4,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus2 bExpAddRace,RC_All,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22014,'Enhanced_Variant_Shoes','Enhanced Variant Shoes',4,20,NULL,500,NULL,13,NULL,1,0x7CCFDF80,63,2,64,NULL,'85',1,0,'bonus bMaxHPrate,12; bonus bMaxSPrate,12; .@r = getrefine(); bonus bDef,.@r; bonus bMdef,.@r;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22015,'Impr_Angel\'s_Arrival','Advanced Angel\'s Reincarnation',4,10000,NULL,300,NULL,8,NULL,1,0x00000001,63,2,64,NULL,'99',1,0,'bonus bMaxHP,500; bonus bMaxSP,100;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22018,'Shoes_Of_Wise_Man','Shoes Of Wise Man',4,10,NULL,300,NULL,15,NULL,1,0xFFFFFFFF,63,2,64,NULL,'50',1,NULL,'.@r = getrefine(); if(.@r>5){ bonus bInt,.@r-5; bonus bMaxHPrate,-(.@r-5); }',NULL,NULL);
@@ -10880,8 +10887,8 @@ REPLACE INTO `item_db_re` VALUES (22047,'Tarlock\'s_Boots','Tarlock\'s Boots',4,
 REPLACE INTO `item_db_re` VALUES (22059,'Aegir_Shoes','Aegir Shoes',4,10,NULL,300,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'40',1,NULL,'bonus bUnbreakableShoes,1; bonus bMaxHP,500; bonus bMaxSP,50;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22064,'Thorny_Shoes','Thorny Shoes',4,0,NULL,1000,NULL,25,NULL,1,0xFFFFFFFF,63,2,64,NULL,NULL,1,NULL,'bonus bShortWeaponDamageReturn,getrefine()/2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22067,'Shoe_of_Witch','Shoe of Witch',4,10,NULL,400,NULL,10,NULL,0,0xFFFFFFFE,63,2,64,NULL,'1',1,NULL,'skill "ALL_CATCRY",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22069,'Lian_Shoes','Lian Shoes',4,0,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,1,'90',1,NULL,'bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22072,'Hikingboots','Hikingboots',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,0,'100',1,NULL,'.@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22069,'Lian_Shoes','Lian Shoes',4,0,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'90',1,NULL,'bonus bMdef,3; bonus2 bSubEle,Ele_Neutral,5; .@r = getrefine(); bonus bMaxHPrate,.@r; bonus bMaxSPrate,.@r;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22072,'Hikingboots','Hikingboots',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHPRate,4+(.@r/3); bonus bMaxSPRate,4+(.@r/3); if (.@r > 9) bonus bSpeedRate,25;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22075,'Rift_Shoes','Rift Shoes',4,20,NULL,250,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,(.@r >= 9 ? 1300 : .@r >= 7 ? 700 : 300); bonus bMaxSP,-50;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22076,'Wooden_Slipper','Wooden Slipper',4,20,NULL,50,NULL,10,NULL,1,0x80000000,7,2,64,NULL,'9',1,NULL,'bonus2 bHPRegenRate,2,10000;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22077,'Red_Eco-Friendly_Shoes','Red Eco-Friendly Shoes',4,20,NULL,100,NULL,20,NULL,1,0x80000000,7,2,64,NULL,'18',1,NULL,'bonus bCritical,5; bonus2 bHPRegenRate,4,10000; bonus2 bSPRegenRate,1,10000;',NULL,NULL);
@@ -10889,13 +10896,13 @@ REPLACE INTO `item_db_re` VALUES (22078,'Unity_STR_Boots','Unity STR Boots',4,10
 REPLACE INTO `item_db_re` VALUES (22079,'Unity_AGI_Boots','Unity AGI Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bAgi,.@r/2; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22080,'Unity_DEX_Boots','Unity DEX Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bDex,.@r/2; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22081,'Unity_INT_Boots','Unity INT Boots',4,10,NULL,300,NULL,20,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'.@r = getrefine(); if(BaseLevel<100) { bonus2 bExpAddRace,RC_All,4; bonus bInt,.@r/2; }',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22082,'Polyhedron_Shoes','Polyhedron Shoes',4,0,NULL,500,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,0,'90',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22082,'Polyhedron_Shoes','Polyhedron Shoes',4,0,NULL,500,NULL,12,NULL,1,0xFFFFFFFF,63,2,64,NULL,'90',1,NULL,'.@r = getrefine(); bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Wind,5; if (.@r > 4) { .@b = (.@r > 6) ? 10 : 5; bonus2 bAddEle,Ele_Neutral,.@b; bonus2 bAddEle,Ele_Fire,.@b; bonus2 bAddEle,Ele_Water,.@b; bonus2 bAddEle,Ele_Wind,.@b; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22083,'Private_Doram_Shoes','Private Doram Shoes',4,20,NULL,500,NULL,25,NULL,1,0x80000000,7,2,64,NULL,'100',1,NULL,'bonus bMaxHP,100; bonus bMaxSP,50; .@r = getrefine()/3; bonus bHPrecovRate,.@r*10; bonus bSPrecovRate,.@r*10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22084,'Luxury_Doram_Shoes','Luxury Doram Shoes',4,20,NULL,600,NULL,30,NULL,1,0x80000000,7,2,64,NULL,'140',1,NULL,'bonus bMaxHP,300; bonus bMaxSP,100; .@r = getrefine()/3; bonus bHPrecovRate,20*.@r; bonus bSPrecovRate,20*.@r;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22085,'Elegant_Doram_Shoes','Elegant Doram Shoes',4,20,NULL,700,NULL,35,NULL,1,0x80000000,7,2,64,NULL,'175',1,NULL,'bonus bMaxHPrate,10; bonus bMaxSPrate,5; .@r = getrefine()/2; bonus bMaxHP,100*.@r; bonus bMaxSP,20*.@r; if(.@r >= 4) bonus2 bSkillUseSP,"SU_LOPE",5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22089,'Crimson_Gaiter_','Crimson Gaiter',4,0,NULL,500,NULL,10,NULL,1,0xFFFFFFFF,63,2,64,NULL,'50',1,NULL,'bonus bCritical,2; bonus bCritAtkRate,2; if(getrefine()>=7){ bonus bCritical,3; bonus bCritAtkRate,3; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22101,'Angel_Poring_Boots','Angel Poring Boots',4,10,NULL,300,NULL,15,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus bAllStats,1; skill "AL_HEAL",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22103,'Excelion_Leg','Excelion Leg',4,0,NULL,500,NULL,13,NULL,0,0xFFFFFFFF,63,2,64,1,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22103,'Excelion_Leg','Excelion Leg',4,0,NULL,500,NULL,13,NULL,0,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'.@r = getrefine(); bonus bMaxHP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3; bonus bMaxSP,5+((BaseLevel > 129) ? 4 : 0)+(.@r/3)*3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22106,'Giant_Boots','Giant Boots',4,0,NULL,500,NULL,13,NULL,1,0xFFFFFFFF,63,2,64,NULL,'1',1,NULL,'bonus2 bSubRace,RC_All,1; bonus bMaxHPrate,2; bonus bMaxSPrate,2; .@r = getrefine(); if (.@r > 4) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; } if (.@r > 6) { bonus bDefRate,2; bonus bMaxHPrate,4; bonus bMaxSPrate,4; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22122,'Para_Team_Boots100','Awakened Eden Group Boots I',4,0,NULL,0,NULL,22,NULL,0,0xFFFFFFFF,63,2,64,NULL,'100',1,NULL,'bonus bAllStats,1; bonus bHPrecovRate,30; bonus bSPrecovRate,14;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22123,'Para_Team_Boots115','Awakened Eden Group Boots II',4,0,NULL,0,NULL,25,NULL,0,0xFFFFFFFF,63,2,64,NULL,'115',1,NULL,'bonus bAllStats,1; bonus bHPrecovRate,36; bonus bSPrecovRate,18;',NULL,NULL);
@@ -11089,9 +11096,9 @@ REPLACE INTO `item_db_re` VALUES (22843,'Superstar_Snack','Superstar Snack',2,10
 REPLACE INTO `item_db_re` VALUES (22844,'Sealed_Dracula_Card_Album','Sealed Dracula Card Album',2,10,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'/*No Info*/',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22845,'Sealed_Fortune_Egg','Sealed Fortune Egg',2,10,NULL,10,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,NULL,NULL,'1',NULL,NULL,'getitem callfunc("F_Rand",4488,4497,4486,4480,4485,4539,4487,4494,4538,4489,4490,4482,4503,22846),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22846,'Sealed_Dracula_Card_','Sealed Dracula Card',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'bonus_script "{ bonus2 bSPDrainRate,50,5; }",300;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22847,'Prontera_Medal','Prontera Medal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prontera",0,0; /*No coord info*/',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22847,'Prontera_Medal','Prontera Medal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prontera",159,192; /*No coord info*/',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22848,'Prison_Key','Prison Key',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_prison",0,0; /*No coord info*/',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (22849,'Prontera_Time_Crystal','Prontera Time Crystal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_lib_q",0,0; /*No map+coord info*/',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22849,'Prontera_Time_Crystal','Prontera Time Crystal',2,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'warp "prt_q",155,27;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22850,'January_Gift_Box_','January Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'rentitem 19052,604800;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22851,'February_Gift_Box_','February Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'getitem 12105,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22852,'March_Gift_Box_','March Gift Box',2,10,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'/*2 Lucky Eggs*/',NULL,NULL);
@@ -11489,25 +11496,28 @@ REPLACE INTO `item_db_re` VALUES (28317,'RCC2013_RING','RCC2013_RING',4,200,NULL
 REPLACE INTO `item_db_re` VALUES (28318,'RCC2013_RING_','RCC2013_RING_',4,200,NULL,200,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus2 bAddClass,Class_All,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28310,'Sarah\'s_Left_Earring','Sarah\'s Left Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,8,NULL,'145',0,NULL,'skill "AL_HEAL",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28311,'Sarah\'s_Right_Earring','Sarah\'s Right Earring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,128,NULL,'145',0,NULL,'skill "AL_TELEPORT",1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28321,'Falconer_Claw','Falconer Claw',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28322,'Falconer_Glove','Falconer Glove',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,0,'80',0,NULL,'bonus bDex,1; bonus bUseSPrate,-5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28321,'Falconer_Claw','Falconer Claw',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,NULL,'80',0,NULL,'bonus bDex,1; bonus2 bSkillAtk,"HT_BLITZBEAT",getskilllv("HT_STEELCROW")*10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28322,'Falconer_Glove','Falconer Glove',4,0,NULL,100,NULL,5,NULL,1,0x00000800,63,2,136,NULL,'80',0,NULL,'bonus bDex,1; bonus bUseSPrate,-5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28326,'Broken_Chips_01','Broken Chips 01',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bStr,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28327,'Broken_Chips_02','Broken Chips 02',4,10,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bInt,4;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28332,'Jewerly_Ring','Jewerly Ring',4,10,NULL,100,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bLuk,20; autobonus "{ bonus bAspd,2; }",50,2000,BF_WEAPON|BF_MAGIC;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28333,'Gold_PC_Room_Ring','Gold PC Room Ring',4,10,NULL,0,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,NULL,'bonus bMaxHPrate,3; bonus bMaxSPrate,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28342,'Critical_Anklet','Critical Anklet',4,0,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,NULL,0,NULL,'bonus bCritical,5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28358,'Cursed_Lucky_Clover','Cursed Lucky Clover',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'100',0,NULL,'bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5;',NULL,'sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/');
-REPLACE INTO `item_db_re` VALUES (28372,'Imperial_Ring','Imperial Ring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28354,'City_Map','City Map',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28355,'Shining_Holy_Water','Shining Holy Water',4,0,NULL,100,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/* todo */',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28356,'Prontera_Badge','Prontera Badge',4,0,NULL,100,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'1',0,0,'/*warp "prontera",159,192;  15 mins cooldown */',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28358,'Cursed_Lucky_Clover','Cursed Lucky Clover',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'100',0,NULL,'bonus bLuk,2; bonus bFlee,3; bonus2 bAddEff2,Eff_Curse,5;',NULL,'sc_end SC_CLOAKING; /*FIXME: Because the combo has Cloaking skill*/');
+REPLACE INTO `item_db_re` VALUES (28372,'Imperial_Ring','Imperial Ring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bStr,1; bonus bInt,1; bonus bMaxHPRate,3; bonus bMaxSPRate,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28374,'Foxtail_Ring','Foxtail Ring',4,20,NULL,100,NULL,0,NULL,0,0x80000000,7,2,136,NULL,'1',0,NULL,'bonus2 bExpAddRace,RC_All,5; .@lvl = min(BaseLevel/5,10); bonus bAtk,2*.@lvl; bonus bMatk,2*.@lvl; bonus bMaxHP,10*.@lvl; bonus bMaxSP,5*.@lvl;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28377,'Magical_Ring','Magical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'20',0,NULL,'bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28377,'Magical_Ring','Magical Ring',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'20',0,NULL,'bonus2 bMagicAddEle,Ele_Fire,5; bonus2 bMagicAddEle,Ele_Water,5; bonus2 bMagicAddEle,Ele_Earth,5; bonus2 bMagicAddEle,Ele_Wind,5; if (BaseLevel > 4) { bonus2 bSkillAtk,"MG_FIREBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_COLDBOLT",BaseLevel/5; bonus2 bSkillAtk,"MG_LIGHTNINGBOLT",BaseLevel/5; bonus2 bSkillAtk,"WZ_EARTHSPIKE",BaseLevel/5; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28380,'Fresh_Grass_Necklace','Fresh Grass Necklace',4,20,NULL,100,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bFlee2,5; bonus2 bSkillCooldown,"SU_SCAROFTAROU",-5000;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28381,'Cute_Grass_Necklace','Cute Grass Necklace',4,20,NULL,10,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bHealPower,5; bonus2 bSkillCooldown,"SU_TUNAPARTY",-7000;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28382,'Charm_Grass_Necklace','Charm Grass Necklace',4,20,NULL,10,NULL,0,NULL,1,0x80000000,7,2,136,NULL,'100',0,NULL,'bonus bMdef,5; bonus2 bVariableCastrate,"SU_CN_METEOR",-1000;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28386,'Fallen_Monk_Rosary','Fallen Monk Rosary',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,0,'20',0,NULL,'bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28386,'Fallen_Monk_Rosary','Fallen Monk Rosary',4,0,NULL,100,NULL,NULL,NULL,1,0xFFFFFFFF,63,2,136,NULL,'20',0,NULL,'bonus bAspdRate,5; bonus bCritical,5; bonus2 bSkillUseSP,"CH_SOULCOLLECT",-5; if (BaseLevel > 14) bonus2 bSkillAtk,"SR_DRAGONCOMBO",BaseLevel/15; if (BaseLevel > 19) bonus2 bSkillAtk,"SR_KNUCKLEARROW",BaseLevel/20; if (BaseLevel > 29) bonus2 bSkillAtk,"SR_SKYNETBLOW",BaseLevel/30;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28391,'S_Thief_Earring','Thief Shadow Earring',12,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1048576,NULL,'1',1,NULL,'.@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bFlee,30+(.@r*10); }",200,5000,"TF_THROWSTONE","{ specialeffect2 EF_ENHANCE; }";',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28392,'S_Archer_Earring','Archer Shadow Earring',12,0,NULL,0,NULL,NULL,NULL,0,0xFFFFFFFF,63,2,1048576,NULL,'1',1,NULL,'.@r = getrefine(); autobonus3 "{ bonus bBaseAtk,30+(.@r*10); bonus bHit,30+(.@r*10); }",200,5000,"AC_DOUBLE","{ specialeffect2 EF_ENHANCE; }";',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28410,'Sapphire_Wrist','Sapphire Wrist',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (28411,'Emerald_Earring','Emerald Earring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,0,'50',0,NULL,'bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28410,'Sapphire_Wrist','Sapphire Wrist',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bDex,5; bonus bLuk,5; bonus bInt,5; bonus2 bSkillAtk,"GN_SPORE_EXPLOSION",BaseLevel/5; bonus2 bVariableCastrate,"CR_ACIDDEMONSTRATION",-(BaseLevel/4); .@n = getskilllv("CR_SLIMPITCHER"); bonus bDex,.@n/2; bonus bLuk,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (28411,'Emerald_Earring','Emerald Earring',4,0,NULL,500,NULL,3,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,NULL,'bonus bDex,5; bonus bAgi,5; bonus bInt,5; bonus2 bSkillAtk,"CG_ARROWVULCAN",BaseLevel; bonus2 bSkillAtk,"BA_MUSICALSTRIKE",BaseLevel; bonus2 bSkillAtk,"DC_THROWARROW",BaseLevel; bonus2 bSkillAtk,"WM_METALICSOUND",2*(BaseLevel/5); .@n = getskilllv("WM_METALICSOUND"); bonus2 bVariableCastrate,"WM_METALICSOUND",.@n/2; bonus bDex,.@n/2; bonus bAgi,.@n/2; bonus bInt,.@n/2; bonus bMatk,(.@n/2)*20;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28413,'Lesser_Mackerel_Talisman','Lesser Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'100',NULL,NULL,'bonus bVit,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28414,'Intermediate_Mackerel_Talisman','Intermediate Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'140',NULL,NULL,'bonus bVit,2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (28415,'Greater_Mackerel_Talisman','Greater Mackerel Talisman',4,0,NULL,100,NULL,1,NULL,1,0x80000000,63,2,136,NULL,'175',NULL,NULL,'bonus bVit,3;',NULL,NULL);
@@ -11591,6 +11601,18 @@ REPLACE INTO `item_db_re` VALUES (28920,'Diamond_Shield','Diamond Shield',4,20,N
 #===================================================================
 # Enchantment stones
 #===================================================================
+REPLACE INTO `item_db_re` VALUES (29000,'Rune_of_Intellect_Lv_1','Rune of Intellect Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,5; } if (.@r>=10) { bonus bMatkRate,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29001,'Rune_of_Intellect_Lv_2','Rune of Intellect Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,6; } if (.@r>=11) { bonus bInt,1; bonus bMatkRate,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29002,'Rune_of_Intellect_Lv_3','Rune of Intellect Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bInt,7; } if (.@r>=12) { bonus bInt,1; bonus bMatkRate,8; } if (.@r>=13) { bonus bInt,1; bonus bMatkRate,2; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29003,'Rune_of_Dexterity_Lv_1','Rune of Dexterity Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,5; } if (.@r>=10) { bonus bLongAtkRate,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29004,'Rune_of_Dexterity_Lv_2','Rune of Dexterity Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,6; } if (.@r>=11) { bonus bDex,1; bonus bLongAtkRate,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29005,'Rune_of_Dexterity_Lv_3','Rune of Dexterity Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bDex,7; } if (.@r>=12) { bonus bDex,1; bonus bLongAtkRate,8; } if (.@r>=13) { bonus bDex,1; bonus bLongAtkRate,2; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29006,'Rune_of_Luck_Lv_1','Rune of Luck Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,5; } if (.@r>=10) { bonus bCritAtkRate,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29007,'Rune_of_Luck_Lv_2','Rune of Luck Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,6; } if (.@r>=11) { bonus bLuk,1; bonus bCritAtkRate,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29008,'Rune_of_Luck_Lv_3','Rune of Luck Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bLuk,7; } if (.@r>=12) { bonus bLuk,1; bonus bCritAtkRate,8; } if (.@r>=13) { bonus bLuk,1; bonus bCritAtkRate,6; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29009,'Rune_of_Vitality_Lv_1','Rune of Vitality Lv 1',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,5; } if (.@r>=10) { bonus bMaxHPrate,5; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29010,'Rune_of_Vitality_Lv_2','Rune of Vitality Lv 2',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,6; } if (.@r>=11) { bonus bVit,1; bonus bMaxHPrate,7; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (29011,'Rune_of_Vitality_Lv_3','Rune of Vitality Lv 3',6,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'.@r = getrefine(); if (.@r>=7) { bonus bVit,7; } if (.@r>=12) { bonus bVit,1; bonus bMaxHPrate,8; } if (.@r>=13) { bonus bVit,1; bonus bMaxHPrate,2; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (29061,'Ambition1Lv','Ambition1Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,3; bonus bHit,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (29062,'Ambition2Lv','Ambition2Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,6; bonus bHit,6;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (29063,'Ambition3Lv','Ambition3Lv',6,10,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'bonus2 bAddClass,Class_All,9; bonus bHit,9;',NULL,NULL);

+ 14 - 14
sql-files/main.sql

@@ -208,10 +208,10 @@ CREATE TABLE IF NOT EXISTS `char` (
   `int` smallint(4) unsigned NOT NULL default '0',
   `dex` smallint(4) unsigned NOT NULL default '0',
   `luk` smallint(4) unsigned NOT NULL default '0',
-  `max_hp` mediumint(8) unsigned NOT NULL default '0',
-  `hp` mediumint(8) unsigned NOT NULL default '0',
-  `max_sp` mediumint(6) unsigned NOT NULL default '0',
-  `sp` mediumint(6) unsigned NOT NULL default '0',
+  `max_hp` int(11) unsigned NOT NULL default '0',
+  `hp` int(11) unsigned NOT NULL default '0',
+  `max_sp` int(11) unsigned NOT NULL default '0',
+  `sp` int(11) unsigned NOT NULL default '0',
   `status_point` int(11) unsigned NOT NULL default '0',
   `skill_point` int(11) unsigned NOT NULL default '0',
   `option` int(11) NOT NULL default '0',
@@ -363,10 +363,10 @@ CREATE TABLE IF NOT EXISTS `elemental` (
   `char_id` int(11) NOT NULL,
   `class` mediumint(9) unsigned NOT NULL default '0',
   `mode` int(11) unsigned NOT NULL default '1',
-  `hp` int(12) NOT NULL default '1',
-  `sp` int(12) NOT NULL default '1',
-  `max_hp` mediumint(8) unsigned NOT NULL default '0',
-  `max_sp` mediumint(6) unsigned NOT NULL default '0',
+  `hp` int(11) unsigned NOT NULL default '0',
+  `sp` int(11) unsigned NOT NULL default '0',
+  `max_hp` int(11) unsigned NOT NULL default '0',
+  `max_sp` int(11) unsigned NOT NULL default '0',
   `atk1` MEDIUMINT(6) unsigned NOT NULL default '0',
   `atk2` MEDIUMINT(6) unsigned NOT NULL default '0',
   `matk` MEDIUMINT(6) unsigned NOT NULL default '0',
@@ -600,10 +600,10 @@ CREATE TABLE IF NOT EXISTS `homunculus` (
   `int` smallint(4) unsigned NOT NULL default '0',
   `dex` smallint(4) unsigned NOT NULL default '0',
   `luk` smallint(4) unsigned NOT NULL default '0',
-  `hp` int(12) NOT NULL default '1',
-  `max_hp` int(12) NOT NULL default '1',
-  `sp` int(12) NOT NULL default '1',
-  `max_sp` int(12) NOT NULL default '1',
+  `hp` int(11) unsigned NOT NULL default '0',
+  `max_hp` int(11) unsigned NOT NULL default '0',
+  `sp` int(11) NOT NULL default '0',
+  `max_sp` int(11) NOT NULL default '0',
   `skill_point` smallint(4) unsigned NOT NULL default '0',
   `alive` tinyint(2) NOT NULL default '1',
   `rename_flag` tinyint(2) NOT NULL default '0',
@@ -828,8 +828,8 @@ CREATE TABLE IF NOT EXISTS `mercenary` (
   `mer_id` int(11) unsigned NOT NULL auto_increment,
   `char_id` int(11) NOT NULL,
   `class` mediumint(9) unsigned NOT NULL default '0',
-  `hp` int(12) NOT NULL default '1',
-  `sp` int(12) NOT NULL default '1',
+  `hp` int(11) unsigned NOT NULL default '0',
+  `sp` int(11) unsigned NOT NULL default '0',
   `kill_counter` int(11) NOT NULL,
   `life_time` int(11) NOT NULL default '0',
   PRIMARY KEY  (`mer_id`)

+ 52 - 13
sql-files/mob_db_re.sql

@@ -2168,20 +2168,20 @@ REPLACE INTO `mob_db_re` VALUES (2936,'E_GHOSTRING','Ghostring','Ghostring',1,10
 #2945,J_MUMMY
 #2946,J_ANUBIS
 #2947,J_EGGYRA
-#2948,CURSED_SOLDIER
-#2949,CURSED_SENTINEL
-#2950,BROKEN_MIND
-#2951,FLOATING_WORD
-#2952,LIKE_LOVE
-#2953,CURSED_MEMORY
-#2954,COLORLESS_VOW
-#2955,OLD_FRIENDSHIP
-#2956,SWEET_SLAUGHTER
-#2957,FORGOTTEN_NAME
-#2958,FATAL_DAYS
-#2959,TORTUROUS_REDEEMER
+REPLACE INTO `mob_db_re` VALUES (2948,'CURSED_SOLDIER','Cursed Soldier','Cursed Soldier',110,18574,1,1907,1851,9,1258,1791,85,35,81,50,64,56,178,23,10,12,1,1,69,0x3885,150,1960,576,420,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2949,'CURSED_SENTINEL','Cursed Sentinel','Cursed Sentinel',110,14099,1,1634,1346,2,1347,1906,84,41,120,65,66,41,107,26,10,12,2,7,67,0x3885,175,914,1344,384,0,0,0,0,0,0,0,6672,1000,934,2500,1097,1500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2950,'BROKEN_MIND','Broken Mind','Broken Mind',110,13520,1,1545,1557,1,1259,1799,67,27,69,37,36,10,64,5,10,12,1,6,67,0x2003885,200,920,720,200,0,0,0,0,0,0,0,6672,1000,6086,2500,683,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2951,'FLOATING_WORD','Floating Word','Floating Word',110,11276,1,1166,1034,1,1080,1509,93,40,111,90,60,70,139,65,10,12,0,6,68,0x2003885,150,972,648,432,0,0,0,0,0,0,0,6672,1000,938,3000,947,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2952,'LIKE_LOVE','Like Love','Like Love',110,14008,1,1505,1667,2,1182,1183,64,51,62,27,25,55,102,20,10,12,1,6,64,0x2003885,150,1056,1056,336,0,0,0,0,0,0,0,6672,1000,929,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2953,'CURSED_MEMORY','Cursed Memory','Cursed Memory',110,18045,1,1802,1623,1,1310,1867,89,28,87,39,58,5,82,10,10,12,1,1,69,0x3885,350,1768,500,192,0,0,0,0,0,0,0,6672,1000,957,3000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2954,'COLORLESS_VOW','Colorless Vow','Colorless Vow',110,19194,0,1939,1881,1,1478,2121,95,41,84,35,60,20,85,15,10,12,1,1,69,0x3885,350,0,500,0,0,0,0,0,0,0,0,6672,1000,958,3500,1063,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2955,'OLD_FRIENDSHIP','Old Friendship','Old Friendship',110,12614,0,1306,1328,0,1147,1638,78,5,56,12,19,11,30,10,10,12,1,1,49,0x3885,250,2460,912,0,0,0,0,0,0,0,0,6672,1000,932,3500,1098,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2956,'SWEET_SLAUGHTER','Sweet Slaughter','Sweet Slaughter',110,13986,0,1960,1587,0,1216,1709,125,10,121,48,40,31,125,32,10,12,2,1,29,0x3885,350,1538,1000,396,0,0,0,0,0,0,0,6672,1000,929,2000,682,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2957,'FORGOTTEN_NAME','Forgotten Name','Forgotten Name',120,19546,1,1505,1485,2,1093,1520,111,38,121,29,51,43,100,3,10,12,1,1,49,0x3885,155,1169,1152,480,0,0,0,0,0,0,0,6672,1500,682,5000,683,5000,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2958,'FATAL_DAYS','Fatal Days','Fatal Days',120,24240,1,2052,2026,2,1025,1428,72,15,100,71,63,85,115,37,10,12,1,6,67,0x2003885,190,720,384,480,0,0,0,0,0,0,0,6672,1500,1050,2500,1038,2500,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+REPLACE INTO `mob_db_re` VALUES (2959,'TORTUROUS_REDEEMER','Torturous Redeemer','Torturous Redeemer',120,103342,0,10590,8378,0,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,0,0,0,0,0,0,0,6672,10000,6672,10000,923,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
 #2960,MM_FLAMECROSS
-#2961,E_TORTUROUS_REDEEMER
+REPLACE INTO `mob_db_re` VALUES (2961,'E_TORTUROUS_REDEEMER','Torturous Redeemer','Torturous Redeemer',120,103342,1,10590,8378,1,1253,1753,144,28,133,69,72,55,165,44,10,12,1,7,62,0x3885,200,672,420,360,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);
 #2962,E_DEVILING
 #2963,WOODIE
 #2964,EXP_1000
@@ -3128,3 +3128,42 @@ REPLACE INTO `mob_db_re` VALUES (3508,'DR_EGGRING_G','Eggring','Eggring',20,220,
 #3902,MD_ORC_LORD
 #3903,MD_ORC_FLOWER
 
+#3910,E_EMPEL_1
+#3911,E_GIBBET
+#3912,E_LOLI_RURI
+#3913,E_DULLAHAN
+#3914,E_BLOODY_MURDERER
+#3915,E_EMPEL_1B
+#3916,JP_E_MONSTER_74
+#3917,JP_E_MONSTER_75
+#3918,JP_E_MONSTER_76
+#3919,JP_E_MONSTER_77
+#3920,JP_E_MONSTER_78
+#3921,JP_E_MONSTER_79
+#3922,JP_E_MONSTER_80
+#3923,JP_E_MONSTER_81
+#3924,JP_E_MONSTER_82
+#3925,JP_E_MONSTER_83
+#3926,JP_E_MONSTER_84
+#3927,JP_E_MONSTER_85
+#3928,JP_E_MONSTER_86
+#3929,JP_E_MONSTER_87
+#3930,JP_E_MONSTER_88
+#3931,JP_E_MONSTER_89
+#3932,JP_E_MONSTER_90
+#3933,JP_E_MONSTER_91
+#3934,JP_E_MONSTER_92
+#3935,JP_E_MONSTER_93
+#3936,JP_E_MONSTER_94
+#3937,JP_E_MONSTER_95
+#3938,JP_E_MONSTER_96
+#3939,JP_E_MONSTER_97
+#3940,JP_E_MONSTER_98
+#3941,JP_E_MONSTER_99
+#3942,JP_E_MONSTER_100
+#3943,JP_E_MONSTER_101
+#3944,JP_E_MONSTER_102
+#3945,JP_E_MONSTER_103
+#3946,JP_E_MONSTER_104
+#3947,JP_E_MONSTER_105
+

+ 21 - 0
sql-files/upgrades/upgrade_20170830.sql

@@ -0,0 +1,21 @@
+ALTER TABLE `char`
+	MODIFY `max_hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `max_sp` int(11) unsigned NOT NULL default '0',
+	MODIFY `sp` int(11) unsigned NOT NULL default '0';
+
+ALTER TABLE `elemental`
+	MODIFY `hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `sp` int(11) unsigned NOT NULL default '0',
+	MODIFY `max_hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `max_sp` int(11) unsigned NOT NULL default '0';
+
+ALTER TABLE `homunculus`
+	MODIFY `hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `max_hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `sp` int(11) unsigned NOT NULL default '0',
+	MODIFY `max_sp` int(11) unsigned NOT NULL default '0';
+
+ALTER TABLE `mercenary`
+	MODIFY `hp` int(11) unsigned NOT NULL default '0',
+	MODIFY `sp` int(11) unsigned NOT NULL default '0';

+ 15 - 8
src/char/Makefile.in

@@ -18,6 +18,12 @@ CHAR_OBJ = $(shell ls *.c | sed -e "s/\.c/\.o/g") $(shell ls *.cpp | sed -e "s/\
 CHAR_DIR_OBJ = $(CHAR_OBJ:%=obj/%)
 CHAR_H = $(shell ls ../char/*.h)
 
+YAML_CPP_OBJ = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.cpp" | sed -e "s/\.cpp/\.o/g" )
+YAML_CPP_DIR_OBJ = $(YAML_CPP_OBJ:%=obj/%)
+YAML_CPP_AR = ../../3rdparty/yaml-cpp/obj/yaml-cpp.a
+YAML_CPP_H = $(shell find ../../3rdparty/yaml-cpp/ -type f -name "*.h")
+YAML_CPP_INCLUDE = -I../../3rdparty/yaml-cpp/include
+
 HAVE_MYSQL=@HAVE_MYSQL@
 ifeq ($(HAVE_MYSQL),yes)	
 	SERVER_DEPENDS=char-server
@@ -26,8 +32,6 @@ else
 endif
 ALL_DEPENDS=server
 
-CXXFLAGS=-std=c++11
-
 @SET_MAKE@
 
 #####################################################################
@@ -51,9 +55,9 @@ help:
 #####################################################################
 
 
-char-server: obj $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR)
+char-server: obj $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(YAML_CPP_AR)
 	@echo "	LD	@OCHR@@EXEEXT@"
-	@@CXX@ @LDFLAGS@ -o ../../@OCHR@@EXEEXT@ $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+	@@CXX@ @LDFLAGS@ -o ../../@OCHR@@EXEEXT@ $(CHAR_DIR_OBJ) $(LIBCONFIG_AR) $(COMMON_AR) $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(YAML_CPP_AR) @LIBS@ @MYSQL_LIBS@
 
 needs_mysql:
 	@echo "MySQL not found or disabled by the configure script"
@@ -63,13 +67,13 @@ obj:
 	@echo "	MKDIR	obj"
 	@-mkdir obj
 
-obj/%.o: %.c $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H)
+obj/%.o: %.c $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 	@echo "	CC	$<"
-	@@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+	@@CC@ @CFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
 	
-obj/%.o: %.cpp $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H)
+obj/%.o: %.cpp $(CHAR_H) $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 	@echo "	CXX	$<"
-	@@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+	@@CXX@ @CXXFLAGS@ $(COMMON_INCLUDE) $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
 
 # missing object files
 $(COMMON_AR):
@@ -80,3 +84,6 @@ $(MT19937AR_OBJ):
 
 $(LIBCONFIG_AR):
 	@$(MAKE) -C ../../3rdparty/libconfig
+	
+$(YAML_CPP_AR):
+	@$(MAKE) -C ../../3rdparty/yaml-cpp

+ 6 - 2
src/char/char-server.vcxproj

@@ -94,6 +94,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -109,6 +110,7 @@
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -126,6 +128,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -145,6 +148,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>$(DefineConstants);WIN32;FD_SETSIZE=4096;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;LIBCONFIG_STATIC;YY_USE_CONST;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <AdditionalIncludeDirectories>$(SolutionDir)3rdparty\yaml-cpp\include\</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
@@ -182,7 +186,7 @@
     <ClCompile Include="char_cnslif.c" />
     <ClCompile Include="char_logif.c" />
     <ClCompile Include="char_mapif.c" />
-    <ClCompile Include="inter.c" />
+    <ClCompile Include="inter.cpp" />
     <ClCompile Include="int_achievement.c" />
     <ClCompile Include="int_auction.c" />
     <ClCompile Include="int_clan.c" />
@@ -194,7 +198,7 @@
     <ClCompile Include="int_party.c" />
     <ClCompile Include="int_pet.c" />
     <ClCompile Include="int_quest.c" />
-    <ClCompile Include="int_storage.c" />
+    <ClCompile Include="int_storage.cpp" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
src/char/char-server.vcxproj.filters

@@ -112,10 +112,10 @@
     <ClCompile Include="int_quest.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="int_storage.c">
+    <ClCompile Include="int_storage.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="inter.c">
+    <ClCompile Include="inter.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="int_clan.c">

+ 17 - 13
src/char/char.cpp

@@ -306,7 +306,7 @@ int char_mmo_char_tosql(uint32 char_id, struct mmo_charstatus* p){
 	{	//Save status
 		if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `base_level`='%d', `job_level`='%d',"
 			"`base_exp`='%u', `job_exp`='%u', `zeny`='%d',"
-			"`max_hp`='%d',`hp`='%d',`max_sp`='%d',`sp`='%d',`status_point`='%d',`skill_point`='%d',"
+			"`max_hp`='%u',`hp`='%u',`max_sp`='%u',`sp`='%u',`status_point`='%d',`skill_point`='%d',"
 			"`str`='%d',`agi`='%d',`vit`='%d',`int`='%d',`dex`='%d',`luk`='%d',"
 			"`option`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',`homun_id`='%d',`elemental_id`='%d',"
 			"`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
@@ -936,10 +936,10 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf) {
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 12, SQLDT_SHORT,  &p.int_, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 13, SQLDT_SHORT,  &p.dex, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 14, SQLDT_SHORT,  &p.luk, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 15, SQLDT_INT,    &p.max_hp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 16, SQLDT_INT,    &p.hp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 17, SQLDT_INT,    &p.max_sp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 18, SQLDT_INT,    &p.sp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 15, SQLDT_UINT,   &p.max_hp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 16, SQLDT_UINT,   &p.hp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 17, SQLDT_UINT,   &p.max_sp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 18, SQLDT_UINT,   &p.sp, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 19, SQLDT_UINT,   &p.status_point, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 20, SQLDT_UINT,   &p.skill_point, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 21, SQLDT_UINT,   &p.option, 0, NULL, NULL)
@@ -1049,10 +1049,10 @@ int char_mmo_char_fromsql(uint32 char_id, struct mmo_charstatus* p, bool load_ev
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 13, SQLDT_SHORT,  &p->int_, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 14, SQLDT_SHORT,  &p->dex, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 15, SQLDT_SHORT,  &p->luk, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 16, SQLDT_INT,    &p->max_hp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 17, SQLDT_INT,    &p->hp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 18, SQLDT_INT,    &p->max_sp, 0, NULL, NULL)
-	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 19, SQLDT_INT,    &p->sp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 16, SQLDT_UINT,   &p->max_hp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 17, SQLDT_UINT,   &p->hp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 18, SQLDT_UINT,   &p->max_sp, 0, NULL, NULL)
+	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 19, SQLDT_UINT,   &p->sp, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 20, SQLDT_UINT,   &p->status_point, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 21, SQLDT_UINT,   &p->skill_point, 0, NULL, NULL)
 	||	SQL_ERROR == SqlStmt_BindColumn(stmt, 22, SQLDT_UINT,   &p->option, 0, NULL, NULL)
@@ -1428,12 +1428,16 @@ int char_make_new_char_sql(struct char_session_data* sd, char* name_, int str, i
 		return -2; // invalid input
 #endif
 
-
 	// check the number of already existing chars in this account
 	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d'", schema_config.char_db, sd->account_id) )
 		Sql_ShowDebug(sql_handle);
+#ifdef VIP_ENABLE
+	if( Sql_NumRows(sql_handle) >= MAX_CHARS )
+		return -2; // character account limit exceeded
+#else
 	if( Sql_NumRows(sql_handle) >= sd->char_slots )
 		return -2; // character account limit exceeded
+#endif
 
 	// check char slot
 	if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' LIMIT 1", schema_config.char_db, sd->account_id, slot) )
@@ -1467,21 +1471,21 @@ int char_make_new_char_sql(struct char_session_data* sd, char* name_, int str, i
 #if PACKETVER >= 20151001
 	if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
 		"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`, `sex`) VALUES ("
-		"'%d', '%d', '%s', '%d', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c')",
+		"'%d', '%d', '%s', '%d', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d', '%c')",
 		schema_config.char_db, sd->account_id , slot, esc_name, start_job, charserv_config.start_zeny, 48, str, agi, vit, int_, dex, luk,
 		(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ),  (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
 		mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y, mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y, sex) )
 #elif PACKETVER >= 20120307
 	if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `status_point`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
 		"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
-		"'%d', '%d', '%s', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+		"'%d', '%d', '%s', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
 		schema_config.char_db, sd->account_id , slot, esc_name, charserv_config.start_zeny, 48, str, agi, vit, int_, dex, luk,
 		(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ),  (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
 		mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y, mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y) )
 #else
 	if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
 		"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
-		"'%d', '%d', '%s', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
+		"'%d', '%d', '%s', '%d',  '%d', '%d', '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
 		schema_config.char_db, sd->account_id , slot, esc_name, charserv_config.start_zeny, str, agi, vit, int_, dex, luk,
 		(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ),  (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
 		mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y, mapindex_id2name(tmp_start_point[start_point_idx].map), tmp_start_point[start_point_idx].x, tmp_start_point[start_point_idx].y) )

+ 5 - 5
src/char/int_achievement.c

@@ -78,7 +78,7 @@ struct achievement *mapif_achievements_fromsql(uint32 char_id, int *count)
 	}
 
 	SqlStmt_Free(stmt);
-	StringBuf_Clear(&buf);
+	StringBuf_Destroy(&buf);
 
 	ShowInfo("achievement load complete from DB - id: %d (total: %d)\n", char_id, *count);
 
@@ -134,11 +134,11 @@ bool mapif_achievement_add(uint32 char_id, struct achievement ad)
 
 	if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) {
 		Sql_ShowDebug(sql_handle);
-		StringBuf_Clear(&buf);
+		StringBuf_Destroy(&buf);
 		return false;
 	}
 
-	StringBuf_Clear(&buf);
+	StringBuf_Destroy(&buf);
 
 	return true;
 }
@@ -172,11 +172,11 @@ bool mapif_achievement_update(uint32 char_id, struct achievement ad)
 
 	if (SQL_ERROR == Sql_QueryStr(sql_handle, StringBuf_Value(&buf))) {
 		Sql_ShowDebug(sql_handle);
-		StringBuf_Clear(&buf);
+		StringBuf_Destroy(&buf);
 		return false;
 	}
 
-	StringBuf_Clear(&buf);
+	StringBuf_Destroy(&buf);
 
 	return true;
 }

+ 7 - 0
src/char/int_achievement.h

@@ -4,6 +4,13 @@
 #ifndef _INT_ACHIEVEMENT_SQL_H_
 #define _INT_ACHIEVEMENT_SQL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int inter_achievement_parse_frommap(int fd);
 
+#ifdef __cplusplus
+}
+#endif
 #endif /* _INT_ACHIEVEMENT_SQL_H_ */

+ 8 - 0
src/char/int_auction.h

@@ -4,9 +4,17 @@
 #ifndef _INT_AUCTION_SQL_H_
 #define _INT_AUCTION_SQL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int inter_auction_parse_frommap(int fd);
 
 int inter_auction_sql_init(void);
 void inter_auction_sql_final(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _INT_AUCTION_SQL_H_ */

+ 12 - 3
src/char/int_clan.h

@@ -4,7 +4,16 @@
 #ifndef _INT_CLAN_H_
 #define _INT_CLAN_H_
 
-	int inter_clan_parse_frommap( int fd );
-	int inter_clan_init(void);
-	void inter_clan_final(void);
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int inter_clan_parse_frommap( int fd );
+int inter_clan_init(void);
+void inter_clan_final(void);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _INT_CLAN_H_ */

+ 3 - 3
src/char/int_elemental.c

@@ -17,7 +17,7 @@ bool mapif_elemental_save(struct s_elemental* ele) {
 	if( ele->elemental_id == 0 ) { // Create new DB entry
 		if( SQL_ERROR == Sql_Query(sql_handle,
 								   "INSERT INTO `%s` (`char_id`,`class`,`mode`,`hp`,`sp`,`max_hp`,`max_sp`,`atk1`,`atk2`,`matk`,`aspd`,`def`,`mdef`,`flee`,`hit`,`life_time`)"
-								   "VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%u')",
+								   "VALUES ('%d','%d','%d','%u','%u','%u','%u','%d','%d','%d','%d','%d','%d','%d','%d','%u')",
 								   schema_config.elemental_db, ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->atk, ele->atk2, ele->matk, ele->amotion, ele->def, ele->mdef, ele->flee, ele->hit, ele->life_time) )
 		{
 			Sql_ShowDebug(sql_handle);
@@ -26,8 +26,8 @@ bool mapif_elemental_save(struct s_elemental* ele) {
 		else
 			ele->elemental_id = (int)Sql_LastInsertId(sql_handle);
 	} else if( SQL_ERROR == Sql_Query(sql_handle,
-									"UPDATE `%s` SET `char_id` = '%d', `class` = '%d', `mode` = '%d', `hp` = '%d', `sp` = '%d',"
-									"`max_hp` = '%d', `max_sp` = '%d', `atk1` = '%d', `atk2` = '%d', `matk` = '%d', `aspd` = '%d', `def` = '%d',"
+									"UPDATE `%s` SET `char_id` = '%d', `class` = '%d', `mode` = '%d', `hp` = '%u', `sp` = '%u',"
+									"`max_hp` = '%u', `max_sp` = '%u', `atk1` = '%d', `atk2` = '%d', `matk` = '%d', `aspd` = '%d', `def` = '%d',"
 									"`mdef` = '%d', `flee` = '%d', `hit` = '%d', `life_time` = '%u' WHERE `ele_id` = '%d'", schema_config.elemental_db,
 									ele->char_id, ele->class_, ele->mode, ele->hp, ele->sp, ele->max_hp, ele->max_sp, ele->atk, ele->atk2,
 									ele->matk, ele->amotion, ele->def, ele->mdef, ele->flee, ele->hit, ele->life_time, ele->elemental_id) )

+ 2 - 2
src/char/int_homun.c

@@ -91,7 +91,7 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
 	{// new homunculus
 		if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` "
 			"(`char_id`, `class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) "
-			"VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+			"VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%u', '%u', '%u', '%u', '%d', '%d', '%d')",
 			schema_config.homunculus_db, hd->char_id, hd->class_, hd->prev_class, esc_name, hd->level, hd->exp, hd->intimacy, hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
 			hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize) )
 		{
@@ -105,7 +105,7 @@ bool mapif_homunculus_save(struct s_homunculus* hd)
 	}
 	else
 	{
-		if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'",
+		if( SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%u',`max_hp`='%u',`sp`='%u',`max_sp`='%u',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'",
 			schema_config.homunculus_db, hd->char_id, hd->class_, hd->prev_class, esc_name, hd->level, hd->exp, hd->intimacy, hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
 			hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->hom_id) )
 		{

+ 2 - 2
src/char/int_mercenary.c

@@ -69,7 +69,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
 	if( merc->mercenary_id == 0 )
 	{ // Create new DB entry
 		if( SQL_ERROR == Sql_Query(sql_handle,
-			"INSERT INTO `%s` (`char_id`,`class`,`hp`,`sp`,`kill_counter`,`life_time`) VALUES ('%d','%d','%d','%d','%u','%u')",
+			"INSERT INTO `%s` (`char_id`,`class`,`hp`,`sp`,`kill_counter`,`life_time`) VALUES ('%d','%d','%u','%u','%u','%u')",
 			schema_config.mercenary_db, merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->life_time) )
 		{
 			Sql_ShowDebug(sql_handle);
@@ -79,7 +79,7 @@ bool mapif_mercenary_save(struct s_mercenary* merc)
 			merc->mercenary_id = (int)Sql_LastInsertId(sql_handle);
 	}
 	else if( SQL_ERROR == Sql_Query(sql_handle,
-		"UPDATE `%s` SET `char_id` = '%d', `class` = '%d', `hp` = '%d', `sp` = '%d', `kill_counter` = '%u', `life_time` = '%u' WHERE `mer_id` = '%d'",
+		"UPDATE `%s` SET `char_id` = '%d', `class` = '%d', `hp` = '%u', `sp` = '%u', `kill_counter` = '%u', `life_time` = '%u' WHERE `mer_id` = '%d'",
 		schema_config.mercenary_db, merc->char_id, merc->class_, merc->hp, merc->sp, merc->kill_count, merc->life_time, merc->mercenary_id) )
 	{ // Update DB entry
 		Sql_ShowDebug(sql_handle);

+ 8 - 0
src/char/int_quest.h

@@ -4,7 +4,15 @@
 #ifndef _QUEST_H_
 #define _QUEST_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int inter_quest_parse_frommap(int fd);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 

+ 17 - 40
src/char/int_storage.c → src/char/int_storage.cpp

@@ -1,6 +1,10 @@
 // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
 // For more information, see LICENCE in the main folder
 
+#pragma warning(disable:4800)
+
+#include "int_storage.h"
+
 #include "../common/malloc.h"
 #include "../common/mmo.h"
 #include "../common/showmsg.h"
@@ -12,23 +16,13 @@
 
 #include <stdlib.h>
 
-
-#define STORAGE_MEMINC	16
-
 /**
- * Check if sotrage ID is valid
+ * Check if storage ID is valid
  * @param id Storage ID
  * @return True:Valid, False:Invalid
  **/
 bool inter_premiumStorage_exists(uint8 id) {
-	if (interserv_config.storages && interserv_config.storage_count) {
-		int i;
-		for (i = 0; i < interserv_config.storage_count; i++) {
-			if (interserv_config.storages[i].id == id)
-				return true;
-		}
-	}
-	return false;
+	return interserv_config.storages.find(id) != interserv_config.storages.end();
 }
 
 /**
@@ -37,13 +31,8 @@ bool inter_premiumStorage_exists(uint8 id) {
  * @return Max amount
  **/
 int inter_premiumStorage_getMax(uint8 id) {
-	if (interserv_config.storages && interserv_config.storage_count) {
-		int i;
-		for (i = 0; i < interserv_config.storage_count; i++) {
-			if (&interserv_config.storages[i] && interserv_config.storages[i].id == id)
-				return interserv_config.storages[i].max_num;
-		}
-	}
+	if (inter_premiumStorage_exists(id))
+		return interserv_config.storages[id]->max_num;
 	return MAX_STORAGE;
 }
 
@@ -53,13 +42,8 @@ int inter_premiumStorage_getMax(uint8 id) {
  * @return Table name
  **/
 const char *inter_premiumStorage_getTableName(uint8 id) {
-	if (interserv_config.storages && interserv_config.storage_count) {
-		int i;
-		for (i = 0; i < interserv_config.storage_count; i++) {
-			if (&interserv_config.storages[i] && interserv_config.storages[i].id == id)
-				return interserv_config.storages[i].table;
-		}
-	}
+	if (inter_premiumStorage_exists(id))
+		return interserv_config.storages[id]->table;
 	return schema_config.storage_db;
 }
 
@@ -69,13 +53,8 @@ const char *inter_premiumStorage_getTableName(uint8 id) {
 * @return printable name
 **/
 const char *inter_premiumStorage_getPrintableName(uint8 id) {
-	if (interserv_config.storages && interserv_config.storage_count) {
-		int i;
-		for (i = 0; i < interserv_config.storage_count; i++) {
-			if (&interserv_config.storages[i] && interserv_config.storages[i].id == id)
-				return interserv_config.storages[i].name;
-		}
-	}
+	if (inter_premiumStorage_exists(id))
+		return interserv_config.storages[id]->name;
 	return "Storage";
 }
 
@@ -170,20 +149,18 @@ bool guild_storage_fromsql(int guild_id, struct s_storage* p)
 }
 
 static void inter_storage_checkDB(void) {
-	int i = 0;
 	// Checking storage tables
-	for (i = 0; i < interserv_config.storage_count; i++) {
-		if (!&interserv_config.storages[i] || !interserv_config.storages[i].name || !interserv_config.storages[i].table || *interserv_config.storages[i].table == '\0')
-			continue;
+	for (auto storage_table : interserv_config.storages) {
 		if (SQL_ERROR == Sql_Query(sql_handle, "SELECT  `id`,`account_id`,`nameid`,`amount`,`equip`,`identify`,`refine`,"
 			"`attribute`,`card0`,`card1`,`card2`,`card3`,`option_id0`,`option_val0`,`option_parm0`,`option_id1`,`option_val1`,`option_parm1`,"
 			"`option_id2`,`option_val2`,`option_parm2`,`option_id3`,`option_val3`,`option_parm3`,`option_id4`,`option_val4`,`option_parm4`,"
 			"`expire_time`,`bound`,`unique_id`"
-			" FROM `%s` LIMIT 1;", interserv_config.storages[i].table) ){
+			" FROM `%s` LIMIT 1;", storage_table.second->table)) {
 			Sql_ShowDebug(sql_handle);
+		}else{
+			Sql_FreeResult(sql_handle);
 		}
 	}
-	Sql_FreeResult(sql_handle);
 }
 
 //---------------------------------------------------------
@@ -381,7 +358,7 @@ bool mapif_parse_itembound_retrieve(int fd)
 		memcpy(&items[count++], &item, sizeof(struct item));
 	Sql_FreeResult(sql_handle);
 
-	ShowInfo("Found '"CL_WHITE"%d"CL_RESET"' guild bound item(s) from CID = "CL_WHITE"%d"CL_RESET", AID = %d, Guild ID = "CL_WHITE"%d"CL_RESET".\n", count, char_id, account_id, guild_id);
+	ShowInfo("Found '" CL_WHITE "%d" CL_RESET "' guild bound item(s) from CID = " CL_WHITE "%d" CL_RESET ", AID = %d, Guild ID = " CL_WHITE "%d" CL_RESET ".\n", count, char_id, account_id, guild_id);
 	if (!count) { //No items found - No need to continue
 		StringBuf_Destroy(&buf);
 		SqlStmt_Free(stmt);

+ 2 - 0
src/char/int_storage.h

@@ -4,6 +4,8 @@
 #ifndef _INT_STORAGE_SQL_H_
 #define _INT_STORAGE_SQL_H_
 
+#include "../common/cbasetypes.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif

+ 83 - 61
src/char/inter.c → src/char/inter.cpp

@@ -2,6 +2,7 @@
 // For more information, see LICENCE in the main folder
 
 #include "../common/mmo.h"
+#include "../common/cbasetypes.h"
 #include "../common/malloc.h"
 #include "../common/strlib.h"
 #include "../common/showmsg.h"
@@ -24,6 +25,10 @@
 #include "int_clan.h"
 #include "int_achievement.h"
 
+#include <yaml-cpp/yaml.h>
+
+#include <string>
+#include <vector>
 #include <stdlib.h>
 
 #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool]
@@ -345,7 +350,7 @@ void geoip_readdb(void){
 	geoip_cache = (unsigned char *) aMalloc(sizeof(unsigned char) * bufa.st_size);
 	if(fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) { ShowError("geoip_cache reading didn't read all elements \n"); }
 	fclose(db);
-	ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
+	ShowStatus("Finished Reading " CL_GREEN "GeoIP" CL_RESET " Database.\n");
 }
 /* [Dekamaster/Nightroad] */
 /* WHY NOT A DBMAP: There are millions of entries in GeoIP and it has its own algorithm to go quickly through them, a DBMap wouldn't be efficient */
@@ -804,7 +809,7 @@ static int inter_config_read(const char* cfgName)
 		else if(!strcmpi(w1,"log_inter"))
 			charserv_config.log_inter = atoi(w2);
 		else if(!strcmpi(w1,"inter_server_conf"))
-			strcpy(interserv_config.cfgFile, w2);
+			interserv_config.cfgFile = w2;
 		else if(!strcmpi(w1,"import"))
 			inter_config_read(w2);
 	}
@@ -833,85 +838,102 @@ int inter_log(char* fmt, ...)
 	return 0;
 }
 
+static void yaml_invalid_warning(const char* fmt, YAML::Node &node, std::string &file) {
+	YAML::Emitter out;
+	out << node;
+	ShowWarning(fmt, file.c_str());
+	ShowMessage("%s\n", out.c_str());
+}
+
 /**
  * Read inter config file
  **/
 static void inter_config_readConf(void) {
-	int count = 0;
-	config_setting_t *config = NULL;
+	std::vector<std::string> directories = { "conf/", "conf/import/" };
+	static const std::string file_name(interserv_config.cfgFile);
 
-	if (conf_read_file(&interserv_config.cfg, interserv_config.cfgFile))
-		return;
+	for (auto directory : directories) {
+		std::string current_file = directory + file_name;
+		YAML::Node config;
+		int count = 0;
 
-	// Read storages
-	config = config_lookup(&interserv_config.cfg, "storages");
-	if (config && (count = config_setting_length(config))) {
-		int i;
-		for (i = 0; i < count; i++) {
-			int id, max_num;
-			const char *name, *tablename;
-			struct s_storage_table table;
-			config_setting_t *entry = config_setting_get_elem(config, i);
-
-			if (!config_setting_lookup_int(entry, "id", &id)) {
-				ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"id\" in member %d", i);
-				continue;
-			}
+		try {
+			config = YAML::LoadFile(current_file);
+		}
+		catch (std::exception &e) {
+			ShowError("Cannot read storage definition file '" CL_WHITE "%s" CL_RESET "' (Caused by : " CL_WHITE "%s" CL_RESET ").\n", current_file.c_str(), e.what());
+			return;
+		}
 
-			if (!config_setting_lookup_string(entry, "name", &name)) {
-				ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"name\" in member %d", i);
-				continue;
-			}
+		if (config["Storages"]) {
+			for (auto node : config["Storages"]) {
+				unsigned int id;
 
-			if (!config_setting_lookup_string(entry, "table", &tablename)) {
-				ShowConfigWarning(entry, "inter_config_readConf: Cannot find storage \"table\" in member %d", i);
-				continue;
-			}
+				if (!node["ID"]) {
+					yaml_invalid_warning("inter_config_readConf: Storage definition with no ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file);
+					continue;
+				}
 
-			if (!config_setting_lookup_int(entry, "max", &max_num))
-				max_num = MAX_STORAGE;
-			else if (max_num > MAX_STORAGE) {
-				ShowConfigWarning(entry, "Storage \"%s\" has \"max\" %d, max is MAX_STORAGE (%d)!\n", name, max_num, MAX_STORAGE);
-				max_num = MAX_STORAGE;
-			}
+				try {
+					id = node["ID"].as<unsigned int>();
+				}
+				catch (std::exception) {
+					yaml_invalid_warning("inter_config_readConf: Storage definition with invalid ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file);
+					continue;
+				}
 
-			memset(&table, 0, sizeof(struct s_storage_table));
+				if( id > UINT8_MAX ){
+					yaml_invalid_warning("inter_config_readConf: Storage definition with invalid ID field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file);
+					continue;
+				}
+
+				bool existing = inter_premiumStorage_exists(id);
+				auto storage_table = existing ? interserv_config.storages[id] : std::make_shared<s_storage_table>();
+
+				if (!existing && (!node["Name"] || !node["Table"])) {
+					yaml_invalid_warning("inter_config_readConf: Invalid storage definition in '" CL_WHITE "%s" CL_RESET "'.\n", node, current_file);
+					continue;
+				}
+				
+				if (node["Name"])
+					safestrncpy(storage_table->name, node["Name"].as<std::string>().c_str(), NAME_LENGTH);
+				if(node["Table"])
+					safestrncpy(storage_table->table, node["Table"].as<std::string>().c_str(), DB_NAME_LEN);
+				if (node["Max"]) {
+					try {
+						storage_table->max_num = node["Max"].as<uint16>();
+					}
+					catch (std::exception) {
+						yaml_invalid_warning("inter_config_readConf: Storage definition with invalid Max field in '" CL_WHITE "%s" CL_RESET "', skipping.\n", node, current_file);
+						continue;
+					}
+				}
+				else if (!existing)
+					storage_table->max_num = MAX_STORAGE;
+
+				if (!existing) {
+					storage_table->id = (uint8)id;
+					interserv_config.storages[id] = storage_table;
+				}
 
-			RECREATE(interserv_config.storages, struct s_storage_table, interserv_config.storage_count+1);
-			interserv_config.storages[interserv_config.storage_count].id = id;
-			safestrncpy(interserv_config.storages[interserv_config.storage_count].name, name, NAME_LENGTH);
-			safestrncpy(interserv_config.storages[interserv_config.storage_count].table, tablename, DB_NAME_LEN);
-			interserv_config.storages[interserv_config.storage_count].max_num = max_num;
-			interserv_config.storage_count++;
+				count++;
+			}
 		}
+		ShowStatus("Done reading '" CL_WHITE "%d" CL_RESET "' storage information in '" CL_WHITE "%s" CL_RESET "'\n", count, current_file.c_str());
 	}
-
-	ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' storage informations in '"CL_WHITE"%s"CL_RESET"'\n", interserv_config.storage_count, interserv_config.cfgFile);
 }
 
 void inter_config_finalConf(void) {
 
-	if (interserv_config.storages)
-		aFree(interserv_config.storages);
-	interserv_config.storages = NULL;
-	interserv_config.storage_count = 0;
-
-	config_destroy(&interserv_config.cfg);
 }
 
 static void inter_config_defaults(void) {
-	interserv_config.storage_count = 0;
-	interserv_config.storages = NULL;
-
-	safestrncpy(interserv_config.cfgFile, "conf/inter_server.conf", sizeof(interserv_config.cfgFile));
+	interserv_config.cfgFile = "inter_server.yml";
 }
 
 // initialize
 int inter_init_sql(const char *file)
 {
-	//int i;
-
-
 	inter_config_defaults();
 	inter_config_read(file);
 
@@ -977,15 +999,15 @@ void inter_final(void)
  * @param fd
  **/
 void inter_Storage_sendInfo(int fd) {
-	int size = sizeof(struct s_storage_table), len = 4 + interserv_config.storage_count * size, i = 0;
+	int size = sizeof(struct s_storage_table), len = 4 + interserv_config.storages.size() * size, offset;
 	// Send storage table information
 	WFIFOHEAD(fd, len);
 	WFIFOW(fd, 0) = 0x388c;
 	WFIFOW(fd, 2) = len;
-	for (i = 0; i < interserv_config.storage_count; i++) {
-		if (!&interserv_config.storages[i] || !interserv_config.storages[i].name)
-			continue;
-		memcpy(WFIFOP(fd, 4 + size*i), &interserv_config.storages[i], size);
+	offset = 4;
+	for (auto storage : interserv_config.storages) {
+		memcpy(WFIFOP(fd, offset), storage.second.get(), size);
+		offset += size;
 	}
 	WFIFOSET(fd, len);
 }

+ 11 - 8
src/char/inter.h

@@ -4,20 +4,23 @@
 #ifndef _INTER_SQL_H_
 #define _INTER_SQL_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
+#include "../common/cbasetypes.h"
 #include "../common/conf.h"
 #include "../common/mmo.h"
 #include "../common/sql.h"
 
+#ifdef __cplusplus // C codes can't see this
+#include <memory>
+#include <string>
+#include <unordered_map>
+
+extern "C" {
+
 struct Inter_Config {
-	char cfgFile[128];				  ///< Inter-Config file
-	config_t cfg;					  ///< Config
-	struct s_storage_table *storages; ///< Storage name & table information
-	uint8 storage_count;			  ///< Number of available storage
+	std::string cfgFile; ///< Inter-Config file
+	std::unordered_map< uint8, std::shared_ptr<s_storage_table> > storages; ///< Storage name & table information
 };
+#endif
 
 extern struct Inter_Config interserv_config;
 

+ 2 - 4
src/common/Makefile.in

@@ -29,8 +29,6 @@ else
 endif
 ALL_DEPENDS=server
 
-CXXFLAG =-std=c++11
-
 @SET_MAKE@
 
 #####################################################################
@@ -73,7 +71,7 @@ obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 
 obj/%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 	@echo "	CXX	$<"
-	@@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+	@@CXX@ @CXXFLAGS@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
 
 obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 	@echo "	CC	$<"
@@ -81,7 +79,7 @@ obj/mini%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 
 obj/mini%.o: %.cpp $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) $(YAML_CPP_H)
 	@echo "	CXX	$<"
-	@@CXX@ $(CXXFLAG) @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+	@@CXX@ @CXXFLAGS@ @CFLAGS_AR@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) $(YAML_CPP_INCLUDE) @MYSQL_CFLAGS@ -DMINICORE @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
 
 # missing object files
 $(MT19937AR_OBJ):

+ 3 - 5
src/common/core.cpp

@@ -148,12 +148,10 @@ void signals_init (void) {
 }
 #endif
 
+const char* get_svn_revision(void) {
 #ifdef SVNVERSION
-const char *get_svn_revision(void) {
-		return EXPAND_AND_QUOTE(SVNVERSION);
-	}
+	return EXPAND_AND_QUOTE(SVNVERSION);
 #else// not SVNVERSION
-const char* get_svn_revision(void) {
 	static char svn_version_buffer[16] = "";
 	FILE *fp;
 
@@ -244,8 +242,8 @@ const char* get_svn_revision(void) {
 	// fallback
 	svn_version_buffer[0] = UNKNOWN_VERSION;
 	return svn_version_buffer;
-}
 #endif
+}
 
 // Grabs the hash from the last time the user updated their working copy (last pull)
 const char *get_git_hash (void) {

+ 1 - 0
src/common/ers.h

@@ -84,6 +84,7 @@ enum ERSOptions {
 
 	/* Compound, is used to determine whether it should be looking for a cache of matching options */
 	ERS_CACHE_OPTIONS   = ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK,
+	ERS_CLEAN_OPTIONS   = ERS_OPT_CLEAN|ERS_OPT_CLEAR,
 };
 
 /**

+ 9 - 2
src/common/malloc.c

@@ -529,6 +529,7 @@ static void memmgr_log (char *buf)
 {
 	if( !log_fp )
 	{
+		const char* version;
 		time_t raw;
 		struct tm* t;
 
@@ -537,8 +538,14 @@ static void memmgr_log (char *buf)
 
 		time(&raw);
 		t = localtime(&raw);
-		fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Revision %s).\n",
-			(t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, get_svn_revision());
+
+		if( ( version = get_git_hash() ) && version[0] != UNKNOWN_VERSION ){
+			fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Git Hash %s).\n", (t->tm_year+1900), (t->tm_mon+1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, version );
+		}else if( ( version = get_svn_revision() ) && version[0] != UNKNOWN_VERSION ){
+			fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (SVN Revision %s).\n", (t->tm_year + 1900), (t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, version );
+		}else{
+			fprintf(log_fp, "\nMemory manager: Memory leaks found at %d/%02d/%02d %02dh%02dm%02ds (Unknown version).\n", (t->tm_year + 1900), (t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec );
+		}
 	}
 	fprintf(log_fp, "%s", buf);
 	return;

+ 2 - 1
src/common/malloc.h

@@ -4,10 +4,11 @@
 #ifndef _MALLOC_H_
 #define _MALLOC_H_
 
+#include "cbasetypes.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-#include "cbasetypes.h"
 
 #define ALC_MARK __FILE__, __LINE__, __func__
 

+ 1 - 1
src/common/mmo.h

@@ -517,7 +517,7 @@ struct mail_message {
 	char dest_name[NAME_LENGTH];    //receiver nickname
 	char title[MAIL_TITLE_LENGTH];
 	char body[MAIL_BODY_LENGTH];
-	int type; // enum mail_inbox_type
+	enum mail_inbox_type type;
 	time_t scheduled_deletion;
 
 	mail_status status;

+ 3 - 5
src/common/sql.h

@@ -4,14 +4,12 @@
 #ifndef _COMMON_SQL_H_
 #define _COMMON_SQL_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "cbasetypes.h"
 #include <stdarg.h>// va_list
 
-
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 // Return codes
 #define SQL_ERROR -1

+ 4 - 4
src/common/strlib.h

@@ -4,10 +4,6 @@
 #ifndef _STRLIB_H_
 #define _STRLIB_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "cbasetypes.h"
 #include <stdarg.h>
 
@@ -21,6 +17,10 @@ extern "C" {
 #undef __USED_GNU
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 char* jstrescape (char* pt);
 char* jstrescapecpy (char* pt, const char* spt);
 int jmemescapecpy (char* pt, const char* spt, int size);

+ 48 - 3
src/common/yamlwrapper.cpp

@@ -28,7 +28,12 @@
 extern "C" {
 
 yamlwrapper::yamlwrapper(YAML::Node node) {
-	this->root = node;
+	try {
+		this->root = node;
+	}
+	catch (std::exception) {
+		//ignore
+	}
 }
 
 yamliterator::yamliterator(YAML::Node sequence_) {
@@ -45,11 +50,11 @@ yamlwrapper* yaml_load_file(const char* file_name) {
 
 	try {
 		node = YAML::LoadFile(file_name);
-		if (!node.IsDefined())
-			return NULL;
 	} catch (YAML::ParserException &e) {
 		ShowError("YAML Exception Caught: %s\n", e.what());
 		return NULL;
+	} catch (YAML::BadFile) {
+		return NULL;
 	}
 
 	return new yamlwrapper(node);
@@ -111,6 +116,22 @@ int64 yaml_get_int64(yamlwrapper* wrapper, const char* key) {
 	return yaml_get_value<int64>(wrapper, key);
 }
 
+int yaml_get_uint(yamlwrapper* wrapper, const char* key) {
+	return yaml_get_value<unsigned int>(wrapper, key);
+}
+
+int16 yaml_get_uint16(yamlwrapper* wrapper, const char* key) {
+	return yaml_get_value<uint16>(wrapper, key);
+}
+
+int32 yaml_get_uint32(yamlwrapper* wrapper, const char* key) {
+	return yaml_get_value<uint32>(wrapper, key);
+}
+
+int64 yaml_get_uint64(yamlwrapper* wrapper, const char* key) {
+	return yaml_get_value<uint64>(wrapper, key);
+}
+
 bool yaml_get_boolean(yamlwrapper* wrapper, const char* key) {
 	return yaml_get_value<bool>(wrapper, key);
 }
@@ -155,6 +176,22 @@ int64 yaml_as_int64(yamlwrapper* wrapper) {
 	return yaml_as_value<int64>(wrapper);
 }
 
+int yaml_as_uint(yamlwrapper* wrapper) {
+	return yaml_as_value<unsigned int>(wrapper);
+}
+
+int16 yaml_as_uint16(yamlwrapper* wrapper) {
+	return yaml_as_value<uint16>(wrapper);
+}
+
+int32 yaml_as_uint32(yamlwrapper* wrapper) {
+	return yaml_as_value<uint32>(wrapper);
+}
+
+int64 yaml_as_uint64(yamlwrapper* wrapper) {
+	return yaml_as_value<uint64>(wrapper);
+}
+
 bool yaml_as_boolean(yamlwrapper* wrapper) {
 	return yaml_as_value<bool>(wrapper);
 }
@@ -169,6 +206,14 @@ yamlwrapper* yaml_get_subnode(yamlwrapper* wrapper, const char* key) {
 	return new yamlwrapper(yaml_get_node(wrapper->root, std::string(key)));
 }
 
+char* yaml_verify_nodes(yamlwrapper* wrapper, int amount, char** nodes) {
+	for (int i = 0; i < amount; i++) {
+		if (!yaml_node_is_defined(wrapper, nodes[i]))
+			return nodes[i];
+	}
+	return NULL;
+}
+
 yamliterator* yaml_get_iterator(yamlwrapper* wrapper) {
 	return new yamliterator(wrapper->root);
 }

+ 9 - 0
src/common/yamlwrapper.h

@@ -64,15 +64,24 @@ int yaml_get_int(yamlwrapper* wrapper, const char* key);
 int16 yaml_get_int16(yamlwrapper* wrapper, const char* key);
 int32 yaml_get_int32(yamlwrapper* wrapper, const char* key);
 int64 yaml_get_int64(yamlwrapper* wrapper, const char* key);
+int yaml_get_uint(yamlwrapper* wrapper, const char* key);
+int16 yaml_get_uint16(yamlwrapper* wrapper, const char* key);
+int32 yaml_get_uint32(yamlwrapper* wrapper, const char* key);
+int64 yaml_get_uint64(yamlwrapper* wrapper, const char* key);
 bool yaml_get_boolean(yamlwrapper* wrapper, const char* key);
 char* yaml_as_c_string(yamlwrapper* wrapper);
 int yaml_as_int(yamlwrapper* wrapper);
 int16 yaml_as_int16(yamlwrapper* wrapper);
 int32 yaml_as_int32(yamlwrapper* wrapper);
 int64 yaml_as_int64(yamlwrapper* wrapper);
+int yaml_as_uint(yamlwrapper* wrapper);
+int16 yaml_as_uint16(yamlwrapper* wrapper);
+int32 yaml_as_uint32(yamlwrapper* wrapper);
+int64 yaml_as_uint64(yamlwrapper* wrapper);
 bool yaml_as_boolean(yamlwrapper* wrapper);
 bool yaml_node_is_defined(yamlwrapper* wrapper, const char* key);
 yamlwrapper* yaml_get_subnode(yamlwrapper* wrapper, const char* key);
+char* yaml_verify_nodes(yamlwrapper* wrapper, int amount, char** nodes);
 yamliterator* yaml_get_iterator(yamlwrapper* wrapper);
 
 bool yaml_iterator_is_valid(yamliterator* it);

+ 0 - 2
src/login/Makefile.in

@@ -23,8 +23,6 @@ else
 endif
 ALL_DEPENDS=server
 
-CXXFLAGS=-std=c++11
-
 @SET_MAKE@
 
 #####################################################################

+ 0 - 2
src/map/Makefile.in

@@ -37,8 +37,6 @@ else
 	PCRE_CFLAGS=
 endif
 
-CXXFLAGS=-std=c++11
-
 @SET_MAKE@
 
 #####################################################################

+ 7 - 5
src/map/achievement.c

@@ -32,6 +32,7 @@ static int         av_error_report;
 static DBMap *achievement_db = NULL; // int achievement_id -> struct achievement_db *
 static DBMap *achievementmobs_db = NULL; // Avoids checking achievements on every mob killed
 static void achievement_db_free_sub(struct achievement_db *achievement, bool free);
+struct achievement_db achievement_dummy;
 
 /**
  * Searches an achievement by ID
@@ -134,9 +135,9 @@ bool achievement_remove(struct map_session_data *sd, int achievement_id)
 	if (i != sd->achievement_data.count - 1)
 		memmove(&sd->achievement_data.achievements[i], &sd->achievement_data.achievements[i + 1], sizeof(struct achievement) * (sd->achievement_data.count - 1 - i));
 
-	aFree(&sd->achievement_data.achievements[sd->achievement_data.count-1]);
 	sd->achievement_data.count--;
 	if( sd->achievement_data.count == 0 ){
+		aFree(sd->achievement_data.achievements);
 		sd->achievement_data.achievements = NULL;
 	}else{
 		RECREATE(sd->achievement_data.achievements, struct achievement, sd->achievement_data.count);
@@ -212,7 +213,7 @@ static int achievement_check_groups(DBKey key, DBData *data, va_list ap)
 		return 0;
 
 	ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id);
-	if (i == sd->achievement_data.count) { // Achievment isn't in player's log
+	if (i == sd->achievement_data.count) { // Achievement isn't in player's log
 		if (achievement_check_dependent(sd, ad->achievement_id) == true) {
 			achievement_add(sd, ad->achievement_id);
 			achievement_update_achievement(sd, ad->achievement_id, true);
@@ -496,8 +497,9 @@ int *achievement_level(struct map_session_data *sd, bool flag)
 	if (flag == true && old_level != sd->achievement_data.level) {
 		int achievement_id = 240000 + sd->achievement_data.level;
 
-		achievement_add(sd, achievement_id);
-		achievement_update_achievement(sd, achievement_id, true);
+		if( achievement_add(sd, achievement_id) ){
+			achievement_update_achievement(sd, achievement_id, true);
+		}
 	}
 
 	return info;
@@ -533,7 +535,7 @@ static int achievement_update_objectives(DBKey key, DBData *data, va_list ap)
 	memset(objective_count, 0, sizeof(objective_count)); // Current objectives count
 
 	ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == ad->achievement_id);
-	if (i == sd->achievement_data.count) { // Achievment isn't in player's log
+	if (i == sd->achievement_data.count) { // Achievement isn't in player's log
 		if (achievement_check_dependent(sd, ad->achievement_id) == false) // Check to see if dependents are complete before adding to player's log
 			return 0;
 		isNew = true;

+ 1 - 3
src/map/achievement.h

@@ -99,10 +99,8 @@ struct achievement_db {
 
 struct map_session_data;
 struct block_list;
-struct config_setting_t;
-enum _sp;
 
-struct achievement_db achievement_dummy;	///< Dummy entry for invalid achievement lookups
+extern struct achievement_db achievement_dummy;	///< Dummy entry for invalid achievement lookups
 
 struct achievement_db *achievement_search(int achievement_id);
 bool achievement_mobexists(int mob_id);

+ 2 - 1
src/map/atcommand.c

@@ -1763,7 +1763,8 @@ ACMD_FUNC(bodystyle)
 		|| (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC || (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD
 		|| (sd->class_&MAPID_THIRDMASK) == MAPID_ARCH_BISHOP || (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER
 		|| (sd->class_&MAPID_THIRDMASK) == MAPID_WARLOCK || (sd->class_&MAPID_THIRDMASK) == MAPID_SHADOW_CHASER
-	        || (sd->class_&MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER || (sd->class_&MAPID_THIRDMASK) == MAPID_SORCERER)) {
+	    || (sd->class_&MAPID_THIRDMASK) == MAPID_MINSTRELWANDERER || (sd->class_&MAPID_THIRDMASK) == MAPID_SORCERER
+		|| (sd->class_&MAPID_THIRDMASK) == MAPID_SURA)) {
 		clif_displaymessage(fd, msg_txt(sd,740));	// This job has no alternate body styles.
 		return -1;
 	}

+ 5 - 3
src/map/battle.c

@@ -2185,16 +2185,16 @@ static int battle_skill_damage(struct block_list *src, struct block_list *target
 
 /**
  * Calculates Minstrel/Wanderer bonus for Chorus skills.
- * @param sd Player who has Chorus skill active
+ * @param sd: Player who has Chorus skill active
  * @return Bonus value based on party count
  */
-static int battle_calc_chorusbonus(struct map_session_data *sd) {
+int battle_calc_chorusbonus(struct map_session_data *sd) {
 	int members = 0;
 
 	if (!sd || !sd->status.party_id)
 		return 0;
 
-	members = party_foreachsamemap(party_sub_count_class, sd, MAPID_THIRDMASK, MAPID_MINSTRELWANDERER);
+	members = party_foreachsamemap(party_sub_count_class, sd, 0, MAPID_THIRDMASK, MAPID_MINSTRELWANDERER);
 
 	if (members < 3)
 		return 0; // Bonus remains 0 unless 3 or more Minstrels/Wanderers are in the party.
@@ -8429,6 +8429,8 @@ static const struct _battle_data {
 	{ "guild_leaderchange_woe",				&battle_config.guild_leaderchange_woe,			0,		0,		1,				},
 	{ "guild_alliance_onlygm",              &battle_config.guild_alliance_onlygm,           0,      0,      1, },
 	{ "feature.achievement",                &battle_config.feature_achievement,             1,      0,      1,              },
+	{ "allow_bound_sell",                   &battle_config.allow_bound_sell,                1,      0,      1,              },
+	{ "event_refine_chance",                &battle_config.event_refine_chance,             0,      0,      1,              },
 
 #include "../custom/battle_config_init.inc"
 };

+ 4 - 0
src/map/battle.h

@@ -106,6 +106,8 @@ int64 battle_calc_bg_damage(struct block_list *src,struct block_list *bl,int64 d
 void battle_damage(struct block_list *src, struct block_list *target, int64 damage, int delay, uint16 skill_lv, uint16 skill_id, enum damage_lv dmg_lv, unsigned short attack_type, bool additional_effects, unsigned int tick, bool spdamage);
 int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects, bool spdamage);
 
+int battle_calc_chorusbonus(struct map_session_data *sd);
+
 // Summary normal attack treatment (basic attack)
 enum damage_lv battle_weapon_attack( struct block_list *bl,struct block_list *target,unsigned int tick,int flag);
 
@@ -629,6 +631,8 @@ extern struct Battle_Config
 	int guild_leaderchange_woe;
 	int guild_alliance_onlygm;
 	int feature_achievement;
+	int allow_bound_sell;
+	int event_refine_chance;
 
 #include "../custom/battle_config_struct.inc"
 } battle_config;

+ 1 - 1
src/map/channel.h

@@ -52,7 +52,7 @@ struct Channel {
 	unsigned short *groups;		  ///< List of group id, only these groups can join the channel
 };
 
-struct chan_banentry {
+extern struct chan_banentry {
 	uint32 char_id;
 	char char_name[NAME_LENGTH];
 } chan_banentry;

+ 2 - 2
src/map/chat.c

@@ -168,11 +168,11 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
 	clif_addchat(cd, sd); //Reports To the person who already in the chat
 	clif_dispchat(cd, 0); //Reported number of changes to the people around
 
-	chat_triggerevent(cd); //Event
-
 	if (cd->owner->type == BL_PC)
 		achievement_update_objective(map_id2sd(cd->owner->id), AG_CHAT_COUNT, 1, cd->users);
 
+	chat_triggerevent(cd); //Event
+
 	return 0;
 }
 

+ 68 - 67
src/map/clif.c → src/map/clif.cpp

@@ -53,6 +53,10 @@
 #include <stdarg.h>
 #include <time.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* for clif_clearunit_delayed */
 static struct eri *delay_clearunit_ers;
 
@@ -213,7 +217,7 @@ int clif_setip(const char* ip) {
 	}
 
 	safestrncpy(map_ip_str, ip, sizeof(map_ip_str));
-	ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(map_ip, ip_str));
+	ShowInfo("Map Server IP Address : '" CL_WHITE "%s" CL_RESET "' -> '" CL_WHITE "%s" CL_RESET "'.\n", ip, ip2str(map_ip, ip_str));
 	return 1;
 }
 
@@ -222,7 +226,7 @@ void clif_setbindip(const char* ip)
 	bind_ip = host2ip(ip);
 	if (bind_ip) {
 		char ip_str[16];
-		ShowInfo("Map Server Bind IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(bind_ip, ip_str));
+		ShowInfo("Map Server Bind IP Address : '" CL_WHITE "%s" CL_RESET "' -> '" CL_WHITE "%s" CL_RESET "'.\n", ip, ip2str(bind_ip, ip_str));
 	} else {
 		ShowWarning("Failed to Resolve Map Server Address! (%s)\n", ip);
 	}
@@ -1962,18 +1966,9 @@ void clif_selllist(struct map_session_data *sd)
 	{
 		if( sd->inventory.u.items_inventory[i].nameid > 0 && sd->inventory_data[i] )
 		{
-			if( !itemdb_cansell(&sd->inventory.u.items_inventory[i], pc_get_group_level(sd)) )
+			if( !pc_can_sell_item(sd, &sd->inventory.u.items_inventory[i]))
 				continue;
 
-			if( battle_config.hide_fav_sell && sd->inventory.u.items_inventory[i].favorite )
-				continue; //Cannot sell favs [Jey]
-
-			if( sd->inventory.u.items_inventory[i].expire_time || (sd->inventory.u.items_inventory[i].bound && !pc_can_give_bounded_items(sd)) )
-				continue; // Cannot Sell Rental Items or Account Bounded Items
-
-			if( sd->inventory.u.items_inventory[i].bound && !pc_can_give_bounded_items(sd))
-				continue; // Don't allow sale of bound items
-
 			val=sd->inventory_data[i]->value_sell;
 			if( val < 0 )
 				continue;
@@ -2458,7 +2453,7 @@ static void clif_addcards(unsigned char* buf, struct item* item)
 /// Fills in part of the item buffers that calls for variable bonuses data. [Napster]
 /// A maximum of 5 random options can be supported.
 void clif_add_random_options(unsigned char* buf, struct item *it) {
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 	int i;
 
 	for (i = 0; i < MAX_ITEM_RDM_OPT; i++) {
@@ -2493,7 +2488,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char
 	header = 0x29a;
 #elif PACKETVER < 20120925
 	header = 0x2d4;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	header = 0x990;
 #elif PACKETVER < 20160921
 	header = 0xa0c;
@@ -2533,7 +2528,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char
 #endif
 #if PACKETVER >= 20071002
 		WFIFOW(fd,offs+27) = 0;  //  HireExpireDate
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WFIFOP(fd,offs+31), &sd->inventory.u.items_inventory[n]);
 #if PACKETVER >= 20160921
 		WFIFOB(fd,offs+54) = 0; // Favorite
@@ -2573,7 +2568,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, unsigned char
 		/* Yellow color only for non-stackable item */
 		WFIFOW(fd,offs+27)=(sd->inventory.u.items_inventory[n].bound && !itemdb_isstackable(sd->inventory.u.items_inventory[n].nameid)) ? BOUND_DISPYELLOW : sd->inventory_data[n]->flag.bindOnEquip ? BOUND_ONEQUIP : 0;
 #endif
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WFIFOP(fd,31), &sd->inventory.u.items_inventory[n]);
 #if PACKETVER >= 20160921
 		WFIFOB(fd,offs+54) = sd->inventory.u.items_inventory[n].favorite;
@@ -2650,7 +2645,7 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *it, struc
 		WBUFL(buf,n+22) = it->expire_time;
 		WBUFW(buf,n+26) = it->bound ? BOUND_DISPYELLOW : id->flag.bindOnEquip ? BOUND_ONEQUIP : 0; //bindOnEquipType
 		WBUFW(buf,n+28) = (id->equip&EQP_VISIBLE) ? id->look : 0;
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		//V6_ITEM_Option
 		WBUFB(buf,n+30) = 0;	// nRandomOptionCnt
 		clif_add_random_options(WBUFP(buf, n+31), it);// optionData
@@ -2731,7 +2726,7 @@ void clif_inventorylist(struct map_session_data *sd) {
 	const int se = 26;
 #elif PACKETVER < 20120925
 	const int se = 28;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int se = 31;
 #else
 	const int se = 57;
@@ -2779,7 +2774,7 @@ void clif_inventorylist(struct map_session_data *sd) {
 		WBUFW(bufe,0)=0xa4;
 #elif PACKETVER < 20120925
 		WBUFW(bufe,0)=0x2d0;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 		WBUFW(bufe,0)=0x992;
 #else
 		WBUFW(bufe,0)=0xa0d;
@@ -2811,7 +2806,7 @@ void clif_equiplist(struct map_session_data *sd)
 	const int cmd = 26;
 #elif PACKETVER < 20120925
 	const int cmd = 28;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int cmd = 31;
 #else
 	const int cmd = 57;
@@ -2835,7 +2830,7 @@ void clif_equiplist(struct map_session_data *sd)
 		WBUFW(buf,0)=0xa4;
 #elif PACKETVER < 20120925
 		WBUFW(buf,0)=0x2d0;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 		WBUFW(buf,0)=0x992;
 #else
 		WBUFW(buf,0)=0xa0d;
@@ -2881,7 +2876,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
 	const int se = 28;
 	const int sidxe = 4;
 	const int cmde = 0x2d1;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int se = 31;
 	const int sidxe = 4+24;
 	const int cmde = 0x996;
@@ -2969,7 +2964,7 @@ void clif_cartlist(struct map_session_data *sd)
 	const int cmd = 26;
 #elif PACKETVER < 20120925
 	const int cmd = 28;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int cmd = 31;
 #else
 	const int cmd = 57;
@@ -3012,7 +3007,7 @@ void clif_cartlist(struct map_session_data *sd)
 	WBUFW(bufe,0)=0x122;
 #elif PACKETVER < 20120925
 	WBUFW(bufe,0)=0x2d2;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	WBUFW(bufe,0)=0x994;
 #else
 	WBUFW(bufe,0)=0xa0f;
@@ -4308,7 +4303,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd
 	unsigned char *buf;
 #if PACKETVER < 20100223
 	const int cmd = 0xe9;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int cmd = 0x80f;
 #else
 	const int cmd = 0xa09;
@@ -4338,7 +4333,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd
 		WBUFW(buf,13)= 0; //card (4w)
 		WBUFW(buf,15)= 0; //card (4w)
 		WBUFW(buf,17)= 0; //card (4w)
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WBUFP(buf, 19), &sd->inventory.u.items_inventory[index]);
 #endif
 	}
@@ -4364,7 +4359,7 @@ void clif_tradeadditem(struct map_session_data* sd, struct map_session_data* tsd
 		WBUFB(buf,9) = sd->inventory.u.items_inventory[index].attribute; // attribute
 		WBUFB(buf,10)= sd->inventory.u.items_inventory[index].refine; //refine
 		clif_addcards(WBUFP(buf, 11), &sd->inventory.u.items_inventory[index]);
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WBUFP(buf, 19), &sd->inventory.u.items_inventory[index]);
 #endif
 	}
@@ -4481,7 +4476,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde
 {
 #if PACKETVER < 5
 	const int cmd = 0xf4;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int cmd = 0x1c4;
 #else
 	const int cmd = 0xa0a;
@@ -4507,7 +4502,7 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde
 	WFIFOB(fd,11+offset) = i->attribute; // attribute
 	WFIFOB(fd,12+offset) = i->refine; //refine
 	clif_addcards(WFIFOP(fd,13+offset), i);
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 	clif_add_random_options(WFIFOP(fd,21+offset), i);
 #endif
 	WFIFOSET(fd,packet_len(cmd));
@@ -6764,7 +6759,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
 {
 #if PACKETVER < 5
 	const int cmd = 0x124;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
 	const int cmd = 0x1c5;
 #else
 	const int cmd = 0xa0b;
@@ -6796,7 +6791,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail)
 	WBUFB(buf,11+offset)=sd->cart.u.items_cart[n].attribute;
 	WBUFB(buf,12+offset)=sd->cart.u.items_cart[n].refine;
 	clif_addcards(WBUFP(buf,13+offset), &sd->cart.u.items_cart[n]);
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 	clif_add_random_options(WBUFP(buf,21+offset), &sd->cart.u.items_cart[n]);
 #endif
 	WFIFOSET(fd,packet_len(cmd));
@@ -7126,7 +7121,7 @@ void clif_vendinglist(struct map_session_data* sd, int id, struct s_vending* ven
 	const int offset = 12;
 #endif
 
-#if PACKETVER < 20150226
+#if PACKETVER < 20150225
 	const int item_length = 22;
 #elif PACKETVER < 20160921
 	const int item_length = 47;
@@ -7162,7 +7157,7 @@ void clif_vendinglist(struct map_session_data* sd, int id, struct s_vending* ven
 		WFIFOB(fd,offset+12+i*item_length) = vsd->cart.u.items_cart[index].attribute;
 		WFIFOB(fd,offset+13+i*item_length) = vsd->cart.u.items_cart[index].refine;
 		clif_addcards(WFIFOP(fd,offset+14+i*item_length), &vsd->cart.u.items_cart[index]);
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WFIFOP(fd,offset+22+i*item_length), &vsd->cart.u.items_cart[index]);
 #if PACKETVER >= 20160921
 		WFIFOL(fd,offset+47+i*item_length) = pc_equippoint_sub(sd,data);
@@ -7224,7 +7219,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven
 	int i,fd;
 	int count;
 
-#if PACKETVER < 20150226
+#if PACKETVER < 20150225
 	const int item_length = 22;
 #else
 	const int item_length = 47;
@@ -7251,7 +7246,7 @@ void clif_openvending(struct map_session_data* sd, int id, struct s_vending* ven
 		WFIFOB(fd,20+i*item_length) = sd->cart.u.items_cart[index].attribute;
 		WFIFOB(fd,21+i*item_length) = sd->cart.u.items_cart[index].refine;
 		clif_addcards(WFIFOP(fd,22+i*item_length), &sd->cart.u.items_cart[index]);
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 		clif_add_random_options(WFIFOP(fd,30+i*item_length), &sd->cart.u.items_cart[index]);
 #endif
 	}
@@ -7374,16 +7369,18 @@ void clif_party_member_info(struct party_data *p, struct map_session_data *sd)
 /// 0a44 <packet len>.W <party name>.24B { <account id>.L <nick>.24B <map name>.16B <role>.B <state>.B <class>.W <base level>.W }* <item pickup rule>.B <item share rule>.B <unknown>.L
 void clif_party_info(struct party_data* p, struct map_session_data *sd)
 {
-	unsigned char buf[2+2+NAME_LENGTH+(4+NAME_LENGTH+MAP_NAME_LENGTH_EXT+1+1)*MAX_PARTY];
 	struct map_session_data* party_sd = NULL;
 	int i, c;
 #if PACKETVER < 20170502
+	const int M_SIZE = 46; // 4+NAME_LENGTH+MAP_NAME_LENGTH_EXT+1+1
+	unsigned char buf[2+2+NAME_LENGTH+46*MAX_PARTY];
 	int cmd = 0xfb;
-	int size = 46;
 #else
+	const int M_SIZE = 50; // 4+NAME_LENGTH+MAP_NAME_LENGTH_EXT+1+1+4
+	unsigned char buf[2+2+NAME_LENGTH+50*MAX_PARTY+6];
 	int cmd = 0xa44;
-	int size = 50;
 #endif
+	const int PRE_SIZE = 28; // cmd, actual cmd_size, party_name
 
 	nullpo_retv(p);
 
@@ -7396,24 +7393,24 @@ void clif_party_info(struct party_data* p, struct map_session_data *sd)
 
 		if(party_sd == NULL) party_sd = p->data[i].sd;
 
-		WBUFL(buf,28+c*size) = m->account_id;
-		safestrncpy(WBUFCP(buf,28+c*size+4), m->name, NAME_LENGTH);
-		mapindex_getmapname_ext(mapindex_id2name(m->map), WBUFCP(buf,28+c*size+28));
-		WBUFB(buf,28+c*size+44) = (m->leader) ? 0 : 1;
-		WBUFB(buf,28+c*size+45) = (m->online) ? 0 : 1;
+		WBUFL(buf,PRE_SIZE+c*M_SIZE) = m->account_id;
+		safestrncpy(WBUFCP(buf,PRE_SIZE+c*M_SIZE+4), m->name, NAME_LENGTH);
+		mapindex_getmapname_ext(mapindex_id2name(m->map), WBUFCP(buf,PRE_SIZE+c*M_SIZE+PRE_SIZE));
+		WBUFB(buf,PRE_SIZE+c*M_SIZE+44) = (m->leader) ? 0 : 1;
+		WBUFB(buf,PRE_SIZE+c*M_SIZE+45) = (m->online) ? 0 : 1;
 #if PACKETVER >= 20170502
-		WBUFW(buf,28+c*size+46) = m->class_;
-		WBUFW(buf,28+c*size+48) = m->lv;
+		WBUFW(buf,PRE_SIZE+c*M_SIZE+46) = m->class_;
+		WBUFW(buf,PRE_SIZE+c*M_SIZE+48) = m->lv;
 #endif
 		c++;
 	}
 #if PACKETVER < 20170502
-	WBUFW(buf,2) = 28+c*size;
+	WBUFW(buf,2) = PRE_SIZE+c*M_SIZE;
 #else
-	WBUFB(buf,28+c*size) = (p->party.item & 1) ? 1 : 0;
-	WBUFB(buf,28+c*size+1) = (p->party.item & 2) ? 1 : 0;
-	WBUFL(buf,28+c*size+2) = 0; // unknown
-	WBUFW(buf,2) = 28+c*size+6;
+	WBUFB(buf,PRE_SIZE+c*M_SIZE) = (p->party.item & 1) ? 1 : 0;
+	WBUFB(buf,PRE_SIZE+c*M_SIZE+1) = (p->party.item & 2) ? 1 : 0;
+	WBUFL(buf,PRE_SIZE+c*M_SIZE+2) = 0; // unknown
+	WBUFW(buf,2) = PRE_SIZE+c*M_SIZE+6;
 #endif
 
 	if(sd) { // send only to self
@@ -9771,7 +9768,7 @@ void clif_equipcheckbox(struct map_session_data* sd)
 /// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20101124)
 /// 0859 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.28B* (ZC_EQUIPWIN_MICROSCOPE2, PACKETVER >= 20110111)
 /// 0997 <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.31B* (ZC_EQUIPWIN_MICROSCOPE_V5, PACKETVER >= 20120925)
-/// 0a2d <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.57B* (ZC_EQUIPWIN_MICROSCOPE_V6, PACKETVER >= 20150226)
+/// 0a2d <packet len>.W <name>.24B <class>.W <hairstyle>.W <bottom-viewid>.W <mid-viewid>.W <up-viewid>.W <robe>.W <haircolor>.W <cloth-dye>.W <gender>.B {equip item}.57B* (ZC_EQUIPWIN_MICROSCOPE_V6, PACKETVER >= 20150225)
 void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* tsd)
 {
 	uint8* buf;
@@ -9780,7 +9777,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
 	const int s = 26;
 #elif PACKETVER < 20120925
 	const int s = 28;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
  	const int s = 31;
 #else
 	const int s = 57;
@@ -9796,7 +9793,7 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
 	WBUFW(buf, 0) = 0x2d7;
 #elif PACKETVER < 20120925
 	WBUFW(buf, 0) = 0x859;
-#elif PACKETVER < 20150226
+#elif PACKETVER < 20150225
  	WBUFW(buf, 0) = 0x997;
 #else
 	WBUFW(buf, 0) = 0xa2d;
@@ -9882,7 +9879,7 @@ void clif_msg_skill(struct map_session_data* sd, uint16 skill_id, int msg_id)
 /// Formats: false - <packet id>.w <packet len>.w (<name> : <message>).?B 00
 ///          true - <packet id>.w <packet len>.w <name>.24B <message>.?B 00
 static bool clif_process_message(struct map_session_data* sd, bool whisperFormat, char* out_name, char* out_message, char* out_full_message ){
-	char* seperator = " : ";
+	const char* seperator = " : ";
 	int fd;
 	struct s_packet_db* info;
 	uint16 packetLength, inputLength;
@@ -13213,7 +13210,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd){
 		bool flag;
 
 		len -= 85;
-		flag = (bool)RFIFOB(fd,info->pos[2]);
+		flag = RFIFOB(fd,info->pos[2]) != 0;
 		if (!flag) {
 			sd->state.prevend = 0;
 			sd->state.workinprogress = WIP_DISABLE_NONE;
@@ -15229,7 +15226,7 @@ void clif_parse_Mail_refreshinbox(int fd, struct map_session_data *sd){
 	}
 
 	if( sd->mail.changed || ( cmd == 0x9ef || cmd == 0xac1 ) ){
-		intif_Mail_requestinbox(sd->status.char_id, 1, openType);
+		intif_Mail_requestinbox(sd->status.char_id, 1, (enum mail_inbox_type)openType);
 		return;
 	}
 
@@ -15541,7 +15538,7 @@ void clif_parse_Mail_getattach( int fd, struct map_session_data *sd ){
 		memset(msg->item, 0, MAIL_MAX_ITEM*sizeof(struct item));
 	}
 
-	intif_mail_getattach(sd,msg,attachment);
+	intif_mail_getattach(sd,msg, (enum mail_attachment_type)attachment);
 	clif_Mail_read(sd, mail_id);
 }
 
@@ -16457,7 +16454,7 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd)
 void clif_parse_EquipTick(int fd, struct map_session_data* sd)
 {
 	//int type = RFIFOL(fd,packet_db[cmd].pos[0]);
-	bool flag = (bool)RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[1]);
+	bool flag = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[1]) != 0;
 	sd->status.show_equip = flag;
 	clif_equiptickack(sd, flag);
 }
@@ -17781,7 +17778,7 @@ static void clif_parse_SearchStoreInfo(int fd, struct map_session_data* sd)
 ///     1 = "next" label to retrieve more results
 void clif_search_store_info_ack(struct map_session_data* sd)
 {
-#if PACKETVER >= 20150226
+#if PACKETVER >= 20150225
 	const unsigned int blocksize = MESSAGE_SIZE+26+5*MAX_ITEM_RDM_OPT;
 #else
 	const unsigned int blocksize = MESSAGE_SIZE+26;
@@ -20029,11 +20026,11 @@ static int clif_parse(int fd)
 				//Disassociate character from the socket connection.
 				session[fd]->session_data = NULL;
 				sd->fd = 0;
-				ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged off (using @autotrade).\n", sd->status.name);
+				ShowInfo("Character '" CL_WHITE "%s" CL_RESET "' logged off (using @autotrade).\n", sd->status.name);
 			} else
 			if (sd->state.active) {
 				// Player logout display [Valaris]
-				ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged off.\n", sd->status.name);
+				ShowInfo("Character '" CL_WHITE "%s" CL_RESET "' logged off.\n", sd->status.name);
 				clif_quitsave(fd, sd);
 			} else {
 				//Unusual logout (during log on/off/map-changer procedure)
@@ -20041,7 +20038,7 @@ static int clif_parse(int fd)
 				map_quit(sd);
 			}
 		} else {
-			ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip2str(session[fd]->client_addr, NULL));
+			ShowInfo("Closed connection from '" CL_WHITE "%s" CL_RESET "'.\n", ip2str(session[fd]->client_addr, NULL));
 		}
 		do_close(fd);
 		return 0;
@@ -20180,12 +20177,12 @@ void packetdb_readdb(){
 #include "clif_packetdb.h"
 #include "clif_shuffle.h"
 
-	ShowStatus("Using packet version: "CL_WHITE"%d"CL_RESET".\n", PACKETVER);
+	ShowStatus("Using packet version: " CL_WHITE "%d" CL_RESET ".\n", PACKETVER);
 
 #ifdef PACKET_OBFUSCATION
-	ShowStatus("Packet Obfuscation: "CL_GREEN"Enabled"CL_RESET". Keys: "CL_WHITE"0x%08X, 0x%08X, 0x%08X"CL_RESET"\n", clif_cryptKey[0], clif_cryptKey[1], clif_cryptKey[2]);
+	ShowStatus("Packet Obfuscation: " CL_GREEN "Enabled" CL_RESET ". Keys: " CL_WHITE "0x%08X, 0x%08X, 0x%08X" CL_RESET "\n", clif_cryptKey[0], clif_cryptKey[1], clif_cryptKey[2]);
 #else
-	ShowStatus("Packet Obfuscation: "CL_RED"Disabled"CL_RESET".\n");
+	ShowStatus("Packet Obfuscation: " CL_RED "Disabled" CL_RESET ".\n");
 #endif
 }
 
@@ -20214,16 +20211,20 @@ void do_init_clif(void) {
 
 	set_defaultparse(clif_parse);
 	if( make_listen_bind(bind_ip,map_port) == -1 ) {
-		ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",map_port);
+		ShowFatalError("Failed to bind to port '" CL_WHITE "%d" CL_RESET "'\n",map_port);
 		exit(EXIT_FAILURE);
 	}
 
 	add_timer_func_list(clif_clearunit_delayed_sub, "clif_clearunit_delayed_sub");
 	add_timer_func_list(clif_delayquit, "clif_delayquit");
 
-	delay_clearunit_ers = ers_new(sizeof(struct block_list),"clif.c::delay_clearunit_ers",ERS_OPT_CLEAR);
+	delay_clearunit_ers = ers_new(sizeof(struct block_list),"clif.cpp::delay_clearunit_ers",ERS_OPT_CLEAR);
 }
 
 void do_final_clif(void) {
 	ers_destroy(delay_clearunit_ers);
 }
+
+#ifdef __cplusplus
+}
+#endif

+ 4 - 0
src/map/clif_obfuscation.h

@@ -341,6 +341,10 @@
 		packet_keys(0x50564ACD,0x79CA4E15,0x405F4894);
 	#elif PACKETVER == 20170614 // 2017-06-14bRagexeRE
 		packet_keys(0x5ED10A48,0x667F4301,0x2E5D761F);
+	#elif PACKETVER == 20170621 // 2017-06-21aRagexeRE
+		packet_keys(0x155F34EC,0x2D943FA9,0x3D9170EB);
+	#elif PACKETVER == 20170628 // 2017-06-28bRagexeRE
+		packet_keys(0x04691C86,0x43C210E2,0x2FE277E2);
 	#elif PACKETVER > 20110817
 		#error Unsupported packet version.
 	#endif

+ 12 - 9
src/map/clif_packetdb.h

@@ -2225,6 +2225,18 @@
 	//packet(0x09F8,-1); // ZC_ALL_QUEST_LIST3
 #endif
 
+// 2015-02-25aRagexeRE
+#if PACKETVER >= 20150225
+	packet(0x0A09,45); // ZC_ADD_EXCHANGE_ITEM3
+	packet(0x0A0A,47); // ZC_ADD_ITEM_TO_STORE3
+	packet(0x0A0B,47); // ZC_ADD_ITEM_TO_CART3
+	packet(0x0A0C,56); // ZC_ITEM_PICKUP_ACK_V6
+	packet(0x0A0D,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6
+	packet(0x0A0F,-1); // ZC_CART_ITEMLIST_EQUIP_V6
+	packet(0x0A10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6
+	packet(0x0A2D,-1); // ZC_EQUIPWIN_MICROSCOPE_V6
+#endif
+
 // 2015-05-13aRagexe
 #if PACKETVER >= 20150513
 	// New Packets
@@ -2256,15 +2268,6 @@
 	parseable_packet(0x0A13,26,clif_parse_Mail_Receiver_Check,2); // CZ_CHECK_RECEIVE_CHARACTER_NAME
 	packet(0x0A14,10); // ZC_CHECK_RECEIVE_CHARACTER_NAME
 	packet(0x0A32,2); // ZC_OPEN_RODEX_THROUGH_NPC_ONLY
-	// New EquipPackets Support
-	packet(0x0A09,45); // ZC_ADD_EXCHANGE_ITEM3
-	packet(0x0A0A,47); // ZC_ADD_ITEM_TO_STORE3
-	packet(0x0A0B,47); // ZC_ADD_ITEM_TO_CART3
-	packet(0x0A0C,56); // ZC_ITEM_PICKUP_ACK_V6
-	packet(0x0A0D,-1); // ZC_INVENTORY_ITEMLIST_EQUIP_V6
-	packet(0x0A0F,-1); // ZC_CART_ITEMLIST_EQUIP_V6
-	packet(0x0A10,-1); // ZC_STORE_ITEMLIST_EQUIP_V6
-	packet(0x0A2D,-1); // ZC_EQUIPWIN_MICROSCOPE_V6
 	// OneClick Itemidentify
 	parseable_packet(0x0A35,4,clif_parse_Oneclick_Itemidentify,2); // CZ_REQ_ONECLICK_ITEMIDENTIFY
 	// Achievement System

+ 62 - 0
src/map/clif_shuffle.h

@@ -3537,6 +3537,68 @@
 	parseable_packet(0x0944,19,clif_parse_WantToConnection,2,6,10,14,18);
 	//parseable_packet(0x0957,8,NULL,0); // CZ_JOIN_BATTLE_FIELD
 	parseable_packet(0x0963,12,clif_parse_SearchStoreInfoListItemClick,2,6,10);
+// 2017-06-21aRagexeRE
+#elif PACKETVER == 20170621
+	parseable_packet(0x0202,12,clif_parse_SearchStoreInfoListItemClick,2,6,10);
+	parseable_packet(0x035F,6,clif_parse_TickSend,2);
+	parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2);
+	parseable_packet(0x0361,6,clif_parse_TakeItem,2);
+	parseable_packet(0x0365,-1,clif_parse_ItemListWindowSelected,2,4,8,12);
+	parseable_packet(0x0366,18,clif_parse_PartyBookingRegisterReq,2,4);
+	parseable_packet(0x0368,6,clif_parse_SolveCharName,2);
+	parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6);
+	parseable_packet(0x0437,5,clif_parse_WalkToXY,2);
+	parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8);
+	parseable_packet(0x07E4,26,clif_parse_FriendsListAdd,2);
+	parseable_packet(0x0802,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10);
+	parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12);
+	parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89);
+	parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0);
+	parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15);
+	parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0);
+	parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6);
+	parseable_packet(0x085D,5,clif_parse_ChangeDir,2,4);
+	parseable_packet(0x087D,6,clif_parse_DropItem,2,4);
+	parseable_packet(0x0885,26,clif_parse_PartyInvite2,2);
+	parseable_packet(0x0889,8,clif_parse_MoveFromKafra,2,4);
+	parseable_packet(0x08A8,5,clif_parse_HomMenu,2,4);
+	//parseable_packet(0x0956,8,NULL,0); // CZ_JOIN_BATTLE_FIELD
+	parseable_packet(0x0957,36,clif_parse_StoragePassword,0);
+	//parseable_packet(0x095B,4,NULL,0); // CZ_GANGSI_RANK
+	parseable_packet(0x095C,8,clif_parse_MoveToKafra,2,4);
+	parseable_packet(0x0961,19,clif_parse_WantToConnection,2,6,10,14,18);
+	parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2);
+// 2017-06-28bRagexeRE
+#elif PACKETVER == 20170628
+	parseable_packet(0x0202,5,clif_parse_ChangeDir,2,4);
+	parseable_packet(0x022D,19,clif_parse_WantToConnection,2,6,10,14,18);
+	parseable_packet(0x023B,26,clif_parse_FriendsListAdd,2);
+	parseable_packet(0x0281,-1,clif_parse_ItemListWindowSelected,2,4,8,12);
+	parseable_packet(0x035F,6,clif_parse_TickSend,2);
+	parseable_packet(0x0360,6,clif_parse_ReqClickBuyingStore,2);
+	parseable_packet(0x0361,5,clif_parse_HomMenu,2,4);
+	parseable_packet(0x0362,6,clif_parse_DropItem,2,4);
+	//parseable_packet(0x0363,8,NULL,0); // CZ_JOIN_BATTLE_FIELD
+	parseable_packet(0x0364,8,clif_parse_MoveFromKafra,2,4);
+	parseable_packet(0x0365,18,clif_parse_PartyBookingRegisterReq,2,4);
+	parseable_packet(0x0366,90,clif_parse_UseSkillToPosMoreInfo,2,4,6,8,10);
+	parseable_packet(0x0368,6,clif_parse_SolveCharName,2);
+	parseable_packet(0x0369,7,clif_parse_ActionRequest,2,6);
+	//parseable_packet(0x0436,4,NULL,0); // CZ_GANGSI_RANK
+	parseable_packet(0x0437,5,clif_parse_WalkToXY,2);
+	parseable_packet(0x0438,10,clif_parse_UseSkillToPos,2,4,6,8);
+	parseable_packet(0x07E4,6,clif_parse_TakeItem,2);
+	parseable_packet(0x07EC,8,clif_parse_MoveToKafra,2,4);
+	parseable_packet(0x0802,26,clif_parse_PartyInvite2,2);
+	parseable_packet(0x0811,-1,clif_parse_ReqTradeBuyingStore,2,4,8,12);
+	parseable_packet(0x0815,-1,clif_parse_ReqOpenBuyingStore,2,4,8,9,89);
+	parseable_packet(0x0817,2,clif_parse_ReqCloseBuyingStore,0);
+	parseable_packet(0x0819,-1,clif_parse_SearchStoreInfo,2,4,5,9,13,14,15);
+	parseable_packet(0x0835,2,clif_parse_SearchStoreInfoNextPage,0);
+	parseable_packet(0x0838,12,clif_parse_SearchStoreInfoListItemClick,2,6,10);
+	parseable_packet(0x083C,10,clif_parse_UseSkillToId,2,4,6);
+	parseable_packet(0x0863,36,clif_parse_StoragePassword,0);
+	parseable_packet(0x096A,6,clif_parse_GetCharNameRequest,2);
 #endif
 
 #endif /* _CLIF_SHUFFLE_H_ */

+ 1 - 1
src/map/elemental.c

@@ -81,7 +81,7 @@ int elemental_create(struct map_session_data *sd, int class_, unsigned int lifet
 	//Caster's MDEF + (Caster's INT / (5 - Elemental Summon Skill Level)
 	ele.mdef = sd->battle_status.mdef + sd->battle_status.int_ / (5-i);
 	//Caster's FLEE + (Caster's Base Level / (5 - Elemental Summon Skill Level)
-	ele.flee = sd->status.base_level / (5-i);
+	ele.flee = sd->battle_status.flee + sd->status.base_level / (5-i);
 
 	//per individual bonuses
 	switch(db->class_){

+ 0 - 5
src/map/intif.c

@@ -3509,11 +3509,6 @@ void intif_parse_StorageInfo_recv(int fd) {
 	storage_db = NULL;
 
 	for (i = 0; i < count; i++) {
-		char name[NAME_LENGTH + 1];
-
-		safestrncpy(name, RFIFOCP(fd, 5 + size * i), NAME_LENGTH);
-		if (name[0] == '\0')
-			continue;
 		RECREATE(storage_db, struct s_storage_table, storage_count+1);
 		memcpy(&storage_db[storage_count], RFIFOP(fd, 4 + size * i), size);
 		storage_count++;

部分文件因为文件数量过多而无法显示