summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Renewal.txt2
-rw-r--r--conf/Changelog.txt4
-rw-r--r--conf/battle/client.conf9
-rw-r--r--conf/battle/homunc.conf2
-rw-r--r--conf/battle/party.conf1
-rw-r--r--conf/char_athena.conf2
-rw-r--r--conf/charhelp.txt46
-rw-r--r--conf/log_athena.conf2
-rw-r--r--conf/packet_athena.conf7
-rw-r--r--conf/script_athena.conf6
-rw-r--r--db/Changelog.txt22
-rw-r--r--db/const.txt14
-rw-r--r--db/item_db.txt1686
-rw-r--r--db/item_delay.txt1
-rw-r--r--db/item_misc.txt128
-rw-r--r--db/mercenary_skill_db.txt23
-rw-r--r--db/mob_branch.txt2
-rw-r--r--db/mob_db.txt16
-rw-r--r--db/packet_db.txt12
-rw-r--r--db/pet_db.txt9
-rw-r--r--db/pet_db2.txt60
-rw-r--r--db/skill_tree.txt6
-rw-r--r--doc/item_bonus.txt53
-rw-r--r--doc/item_db.txt2
-rw-r--r--doc/mob_db_mode_list.txt1
-rw-r--r--doc/sample/npc_dynamic_shop.txt9
-rw-r--r--doc/script_commands.txt862
-rw-r--r--eAthena-10.sln139
-rw-r--r--npc/Changelog.txt9
-rw-r--r--npc/cities/lighthalzen.txt8
-rw-r--r--npc/cities/morocc.txt5
-rw-r--r--npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt2
-rw-r--r--npc/events/christmas_2008.txt2
-rw-r--r--npc/guild/agit_template.txt2
-rw-r--r--npc/instances/EndlessTower.txt43
-rw-r--r--npc/instances/OrcsMemory.txt54
-rw-r--r--npc/instances/SealedShrine.txt566
-rw-r--r--npc/kafras/functions_kafras.txt2
-rw-r--r--npc/merchants/enchan_arm.txt5
-rw-r--r--sql-files/main.sql3
-rw-r--r--sql-files/upgrade_svn14507.sql1
-rw-r--r--sql-files/upgrade_svn14579.sql1
-rw-r--r--src/char/char.c404
-rw-r--r--src/char/char.h1
-rw-r--r--src/char/int_guild.c8
-rw-r--r--src/char/int_party.c1
-rw-r--r--src/char/int_storage.c28
-rw-r--r--src/char/inter.c2
-rw-r--r--src/char_sql/char.c347
-rw-r--r--src/char_sql/int_guild.c8
-rw-r--r--src/char_sql/int_storage.c4
-rw-r--r--src/char_sql/inter.c2
-rw-r--r--src/common/lock.c9
-rw-r--r--src/common/mmo.h16
-rw-r--r--src/common/socket.c13
-rw-r--r--src/common/strlib.c20
-rw-r--r--src/common/utils.c9
-rw-r--r--src/common/utils.h1
-rw-r--r--src/ladmin/ladmin.c3
-rw-r--r--src/login/login.c2
-rw-r--r--src/map/atcommand.c203
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/battle.h9
-rw-r--r--src/map/battleground.c4
-rw-r--r--src/map/chrif.c38
-rw-r--r--src/map/clif.c692
-rw-r--r--src/map/clif.h121
-rw-r--r--src/map/guild.c4
-rw-r--r--src/map/homunculus.c50
-rw-r--r--src/map/instance.c6
-rw-r--r--src/map/intif.c11
-rw-r--r--src/map/itemdb.c43
-rw-r--r--src/map/itemdb.h7
-rw-r--r--src/map/log.c6
-rw-r--r--src/map/map.c31
-rw-r--r--src/map/map.h3
-rw-r--r--src/map/mapreg_sql.c4
-rw-r--r--src/map/mercenary.c6
-rw-r--r--src/map/mob.c430
-rw-r--r--src/map/mob.h7
-rw-r--r--src/map/npc.c237
-rw-r--r--src/map/party.c97
-rw-r--r--src/map/party.h8
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c378
-rw-r--r--src/map/pc.h20
-rw-r--r--src/map/pet.c8
-rw-r--r--src/map/script.c1384
-rw-r--r--src/map/script.h7
-rw-r--r--src/map/skill.c69
-rw-r--r--src/map/skill.h3
-rw-r--r--src/map/status.c331
-rw-r--r--src/map/storage.c63
-rw-r--r--src/map/unit.c83
-rw-r--r--src/map/unit.h9
-rw-r--r--src/map/vending.c2
-rw-r--r--src/plugins/sig.c9
-rw-r--r--src/tool/adduser.c6
-rw-r--r--src/txt-converter/Makefile.in2
-rw-r--r--vcproj-10/char-server_sql.vcxproj187
-rw-r--r--vcproj-10/char-server_txt.vcxproj177
-rw-r--r--vcproj-10/ladmin.vcxproj149
-rw-r--r--vcproj-10/login-server_sql.vcxproj178
-rw-r--r--vcproj-10/login-server_txt.vcxproj168
-rw-r--r--vcproj-10/map-server_sql.vcxproj231
-rw-r--r--vcproj-10/map-server_txt.vcxproj228
-rw-r--r--vcproj-10/mapcache.vcxproj132
-rw-r--r--vcproj-10/txt-converter-char.vcxproj201
-rw-r--r--vcproj-10/txt-converter-login.vcxproj159
-rw-r--r--vcproj-8/txt-converter-login.vcproj8
-rw-r--r--vcproj-9/txt-converter-login.vcproj8
111 files changed, 6901 insertions, 4031 deletions
diff --git a/Changelog-Renewal.txt b/Changelog-Renewal.txt
index 5b17814e7..ed353115c 100644
--- a/Changelog-Renewal.txt
+++ b/Changelog-Renewal.txt
@@ -1,5 +1,7 @@
Date Added
+2010/12/26
+ * Merged changes from trunk (r14496:14630). [Ai4rei]
2010/11/23
* Added script command pushpc, which is required by newer scripts. [Ai4rei]
- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code.
diff --git a/conf/Changelog.txt b/conf/Changelog.txt
index 297c04ed2..4cbff02fe 100644
--- a/conf/Changelog.txt
+++ b/conf/Changelog.txt
@@ -1,5 +1,9 @@
Date Added
+2010/12/12
+ * Rev. 14587 Corrected wording of the setting homunculus_autoloot (since r12203). [Ai4rei]
+2010/12/10
+ * Rev. 14572 Applied update to charhelp.txt provided by EvilPuncker to match current charcommand behavior (bugreport:4632, follow up to r13403). [Ai4rei]
2010/11/21
* Changed party_share_level from 10 to 15 as per kRO maintenance from 2010/04/14. [Ai4rei]
2010/10/10
diff --git a/conf/battle/client.conf b/conf/battle/client.conf
index a2db1a6c3..143505a36 100644
--- a/conf/battle/client.conf
+++ b/conf/battle/client.conf
@@ -119,3 +119,12 @@ display_hallucination: yes
// Set this to 1 if your client supports status change timers and you want to use them
// Clients from 2009 onward support this
display_status_timers: yes
+
+// Randomizes the dice emoticon server-side, to prevent clients from forging
+// packets for the desired number. (Note 1)
+client_reshuffle_dice: no
+
+// Sorts the character and guild storage before it is sent to the client.
+// Official servers do not sort storage. (Note 1)
+// NOTE: Enabling this option degrades performance.
+client_sort_storage: no
diff --git a/conf/battle/homunc.conf b/conf/battle/homunc.conf
index d9d501f4f..4b8205f9d 100644
--- a/conf/battle/homunc.conf
+++ b/conf/battle/homunc.conf
@@ -44,7 +44,7 @@ hvan_explosion_intimate: 45000
// Show stat growth to the owner when an Homunculus levels up
homunculus_show_growth: no
-// If a monster is killed only by homunculus, can autoloot works?
+// Does autoloot work, when a monster is killed by homunculus only?
homunculus_autoloot: yes
// Should homunculii Vaporize when Master dies?
diff --git a/conf/battle/party.conf b/conf/battle/party.conf
index 2bb0dbb0c..f0b2c8de2 100644
--- a/conf/battle/party.conf
+++ b/conf/battle/party.conf
@@ -38,6 +38,7 @@ show_party_share_picker: yes
// 1: IT_HEALING, 2: IT_UNKNOWN, 4: IT_USABLE, 8: IT_ETC,
// 16: IT_WEAPON, 32: IT_ARMOR, 64: IT_CARD, 128: IT_PETEGG,
// 256: IT_PETARMOR, 512: IT_UNKNOWN2, 1024: IT_AMMO, 2048: IT_DELAYCONSUME
+// 262144: IT_CASH
show_picker.item_type: 112
// Method of distribution when item party share is enabled in a party:
diff --git a/conf/char_athena.conf b/conf/char_athena.conf
index d92f2a47a..af0da9976 100644
--- a/conf/char_athena.conf
+++ b/conf/char_athena.conf
@@ -156,7 +156,7 @@ char_name_option: 1
// Note: Don't add spaces unless you mean to add 'space' to the list.
char_name_letters: abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
-// How many Characters are allowed per Account ? (0 = disabled) [SQL Only!]
+// How many Characters are allowed per Account ? (0 = disabled)
chars_per_account: 0
// Restrict character deletion by BaseLevel
diff --git a/conf/charhelp.txt b/conf/charhelp.txt
index fe877b5e3..e3acddbb4 100644
--- a/conf/charhelp.txt
+++ b/conf/charhelp.txt
@@ -1,28 +1,28 @@
40:--- CHARACTER CMD ---
- 40:#statsall - Displays stats of all characters.
+ 40:#statsall <char name> - Set all stats of a player to maximum.
40:#itemlist <char name> - Displays all items of a player.
40:#storagelist <char name> - Displays all items of a player's storage.
40:#stats <char name> - Displays a characters stats.
- 60:#option <param1> <param2> <param3> <charname> - Like @option command but only to target character.
- 50:#mountpeco <charname> - Give/remove to a player a peco (Class is required, but not skill).
- 50:#petrename <charname> - Re-enable pet rename to a player.
- 60:#save <map> <x> <y> <charname> - Changes the target players respawn point.
- 60:#baselvl <#> <nickname> - Change a characters base level.
- 60:#jlvl <#> <nickname> - Change a characters job level.
- 60:#job/#jobchange <job ID> <char name> - Changes target characters job.
- 60:#zeny <amount> <name> - Give/take a players Zeny
- 60:#cash <amount> <name> - Give/take a player cash points
- 60:#points <amount> <name> - Give/take a player Kafra points
- 60:#stpoint <amount> <name> - Give/take a players stat points
- 60:#skpoint <amount> <name> - give/take a players skill points
- 60:#skreset <charname> - Reset skills of a character.
- 60:#streset <charname> - Reset stats of a character.
- 60:#reset <charname> - Reset stats AND skills of a character.
- 60:#questskill <#> <charname> - Gives to a player the specified quest skill.
- 60:#lostskill <#> <charname> - Takes away the specified quest skill from the player.
- 60:#delitem <item_name_or_ID> <quantity> <player> - Remove items from a character
- 50:#model <hair type> <hair color> <clothes color> <name> - Changes a player's model
- 60:#disguise <monster_name_or_monster_ID> <char name> - Changes disguise of a player
+ 60:#option <char name> <param1> <param2> <param3> - Like @option command but only to target character.
+ 50:#mountpeco <char name> - Give/remove to a player a peco (Class is required, but not skill).
+ 50:#petrename <char name> - Re-enable pet rename to a player.
+ 60:#save <char name> <map> <x> <y> - Changes the target players respawn point.
+ 60:#baselvl/#blvl <char name> <#> - Change a characters base level.
+ 60:#joblvl/#jlvl <char name> <#> - Change a characters job level.
+ 60:#job/#jobchange <char name> <job ID> - Changes target characters job.
+ 60:#zeny <char name> <amount> - Give/take a players Zeny
+ 60:#cash <char name> <amount> - Give/take a player cash points
+ 60:#points <char name> <amount> - Give/take a player Kafra points
+ 60:#stpoint <char name> <amount> - Give/take a players stat points
+ 60:#skpoint <char name> <amount> - give/take a players skill points
+ 60:#skreset <char name> - Reset skills of a character.
+ 60:#streset <char name> - Reset stats of a character.
+ 60:#reset <char name> - Reset stats AND skills of a character.
+ 60:#questskill <char name> <#> - Gives to a player the specified quest skill.
+ 60:#lostskill <char name> <#> - Takes away the specified quest skill from the player.
+ 60:#delitem <char name> <item_name_or_ID> <quantity> - Remove items from a character
+ 50:#model <char name> <hair type> <hair color> <clothes color> - Changes a player's model
+ 60:#disguise <char name> <monster_name_or_monster_ID> - Changes disguise of a player
60:#undisguise <char name> - Cancels disguise of a player
- 60:#changesex <name> - Changes sex of a player (all characters of the account)
- 60:#warp/#rura+ <mapname> <x> <y> <char name> - Warps character to location of choice
+ 60:#changesex <char name> - Changes sex of a player (all characters of the account)
+ 60:#warp/#rura+ <char name> <mapname> <x> <y> - Warps character to location of choice
diff --git a/conf/log_athena.conf b/conf/log_athena.conf
index b75f1b363..2f8effd18 100644
--- a/conf/log_athena.conf
+++ b/conf/log_athena.conf
@@ -30,7 +30,7 @@ sql_logs: 0
// Advanced Filter Bits by item type: ||
// 0002 - Healing items (0)
// 0004 - Etc Items(3) + Arrows (10)
-// 0008 - Usable Items(2) + Lures,Scrolls(11)
+// 0008 - Usable Items(2) + Lures,Scrolls(11) + Usable Cash Items(18)
// 0016 - Weapon(4)
// 0032 - Shields,Armor,Headgears,Accessories,etc(5)
// 0064 - Cards(6)
diff --git a/conf/packet_athena.conf b/conf/packet_athena.conf
index 76203bedb..84711139a 100644
--- a/conf/packet_athena.conf
+++ b/conf/packet_athena.conf
@@ -8,6 +8,13 @@ debug: no
// How long can a socket stall before closing the connection (in seconds)
stall_time: 60
+// Maximum allowed size for clients packets in bytes (default: 20480).
+// NOTE: To reduce the size of reported packets, lower the values of defines, which
+// have been customized, such as MAX_STORAGE, MAX_GUILD_STORAGE or MAX_CART.
+// NOTE: Do not modify this setting, unless the client has been modified to support
+// larger packets. The client will crash, when it receives larger packets.
+socket_max_client_packet: 20480
+
//----- IP Rules Settings -----
// If IP's are checked when connecting.
diff --git a/conf/script_athena.conf b/conf/script_athena.conf
index f45af4bad..8264c0efe 100644
--- a/conf/script_athena.conf
+++ b/conf/script_athena.conf
@@ -32,4 +32,10 @@ check_gotocount: 2048
//input_max_value: 2147483647
input_max_value: 10000000
+// Specifies whether or not each built-in function's arguments are checked for
+// correct type. When a function is given an argument different from what it
+// expects, a warning is thrown before the function is ran anyway.
+// Default: yes
+warn_func_mismatch_argtypes: yes
+
import: conf/import/script_conf.txt
diff --git a/db/Changelog.txt b/db/Changelog.txt
index 396454465..2e974a3da 100644
--- a/db/Changelog.txt
+++ b/db/Changelog.txt
@@ -8,8 +8,30 @@
1475 Equestrian's Spear: NEED INFO.
13005 Angelic Wing Dagger: NEED INFO.
=======================
+2010/12/16
+ * Rev. 14596 Added missing pet db documentation for fields 'attack_rate', 'defence_attack_rate', 'change_target_rate', 'pet_script' and 'loyal_script' based on the one provided by frenzmu06 (bugreport:4636, follow up to r13752). [Ai4rei]
+2010/12/13
+ * Rev. 14590 Added pet_db2.txt to make it apparent, that pet db has support for customs as well. [Ai4rei]
+ - Fixed typo 'HungeyDelay' into 'HungryDelay' in pet database description (bugreport:4636, since r13752).
+2010/12/05
+ * Rev. 14559 Updated some items to use bonus bAddItemHealRate, and healpower2. [L0ne_W0lf]
2010/12/04
* Rev. 14557 Added 3rd class stat bonuses (source: kRO website, February 2010). [Ai4rei]
+2010/12/02
+ * Rev. 14555 Corrected incorrect bonuses relating to bAddMonsterDropItem/Group. (burgerport:4569) [L0ne_W0lf]
+ * Updated the IG_Ore, IG_Food, IG_Recovery and IG_Jewel item groups to official items/rates.
+ - As a result bAddMonsterDropItemGroup now uses the highest rate in group as it's base rate.
+2010/12/02
+ * Rev. 14552 Updated some more cash shop boxes to use rentitem instead of getitem. [L0ne_W0lf]
+ * Added mercenary skills for Mimic, Disguise, Alice, Doppelganger, and Egnigem.
+ * Rev. 14549 Updated the item types for several of the cash item boxes to 18. [L0ne_W0lf]
+ * Fixed the Exorcism_Bible bonus, missing {}'s for who knows how long. (bugreport:4342)
+ * Updated Brasilis monsters stats again, care of Playtester.
+2010/11/30
+ * Rev. 14529 Fixed a mistake (excess dummy name) in dead branch list fallback value (since r32). [Ai4rei]
+ * Rev. 14524 Updated comments for skill Berserk in skill_tree.txt, among others because they would cause errors the way they are read now. [Ai4rei]
+2010/11/26
+ * Rev. 14507 Added killerrid and killedrid param constants to const.txt [ultramage]
2010/11/21
* Rev. 14480 Added enumeration RC2_* to const.txt for mob data 'race2' (bugreport:4561). [Ai4rei]
- Fixed bSubRace2 being documented as bSPSubRace2 (since r1257).
diff --git a/db/const.txt b/db/const.txt
index 697ad37bd..3cc224d9a 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -316,6 +316,8 @@ Sp 7 1
MaxSp 8 1
BaseJob 119 1
BaseClass 120 1
+killerrid 121 1
+killedrid 122 1
bMaxHP 6
bMaxSP 8
@@ -1891,3 +1893,15 @@ DIR_SOUTH 4
DIR_SOUTHEAST 5
DIR_EAST 6
DIR_NORTHEAST 7
+
+IT_HEALING 0
+IT_USABLE 2
+IT_ETC 3
+IT_WEAPON 4
+IT_ARMOR 5
+IT_CARD 6
+IT_PETEGG 7
+IT_PETARMOR 8
+IT_AMMO 10
+IT_DELAYCONSUME 11
+IT_CASH 18
diff --git a/db/item_db.txt b/db/item_db.txt
index ea77722ae..312a29ec1 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -492,8 +492,8 @@
1139,Tale_Fing_,Tirfing,4,20,,1000,200,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Dark; bonus2 bHPLossRate,35,10000; },{},{}
1140,Byeorrun_Gum,Byeollungum,4,20,,900,150,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus2 bSubRace,RC_NonBoss,-10; bonus2 bAddRace,RC_Boss,50; bonus bAllStats,2; },{},{}
1141,Immaterial_Sword,Immaterial Sword,4,20,,900,140,,1,0,0x000654E2,7,2,2,4,40,1,2,{ bonus bAtkEle,Ele_Ghost; bonus2 bSPVanishRate,30,30; bonus bSPDrainValue,-1; bonus bUnbreakableWeapon,0; },{},{}
-1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Jewel,5; },{},{}
-1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Ore,5; },{},{}
+1142,Jewel_Sword,Jeweled Sword,4,20,,2200,104,,1,0,0x000654E2,7,2,2,3,68,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Jewel,100; },{},{}
+1143,Gaia_Sword,Gaia Sword,4,20,,2500,140,,1,0,0x000654E2,7,2,2,3,74,1,2,{ bonus2 bAddMonsterDropItemGroup,IG_Ore,30; },{},{}
1144,Sasimi,Sashimi,4,20,,1400,75,,1,0,0x000654E2,7,2,2,3,48,1,2,{ bonus bAtkEle,Ele_Wind; bonus3 bAddMonsterDropItem,544,RC_Fish,4000; },{},{}
1145,Holy_Avenger,Holy Avenger,4,450000,,1350,125,,1,0,0x00004000,7,2,2,3,75,1,2,{ bonus bAtkEle,Ele_Holy; bonus bVit,2; },{},{}
1146,Town_Sword,Town Sword,4,42000,,800,100,,1,1,0x00000001,7,2,2,3,30,1,2,{},{},{}
@@ -1100,7 +1100,7 @@
2126,Guyak_Shield,Guyak Shield,5,20,,700,,3,,0,0xFFFFFFFE,7,2,32,,75,1,1,{ bonus bMDef,3; },{},{}
2127,Secular_Mission,Secular Mission,5,20,,0,,10,,0,0xFFFFFFFF,7,2,32,1,1,0,1,{ bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25; },{},{}
2128,Herald_Of_GOD_,Sacred Mission,5,128000,,1600,,5,,1,0x00004000,7,2,32,,83,1,3,{ bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0; },{},{}
-2129,Exorcism_Bible,Exorcism Bible,5,20,,600,,5,,0,0x00008100,7,2,32,,50,1,1,{ bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1; if(isequipped(1631)) bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; },{},{}
+2129,Exorcism_Bible,Exorcism Bible,5,20,,600,,5,,0,0x00008100,7,2,32,,50,1,1,{ bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1; if(isequipped(1631)) { bonus2 bSkillAtk,"PR_MAGNUS",20; bonus3 bAutoSpellWhenHit,"PR_TURNUNDEAD",1,20; } },{},{}
2130,Cross_Shield,Cross Shield,5,20,,2000,,6,,1,0x00004000,7,2,32,,80,1,1,{ bonus bStr,1; bonus2 bSkillAtk,"PA_SHIELDCHAIN",30; bonus2 bSkillAtk,"CR_SHIELDBOOMERANG",30; bonus bUseSPrate,10; },{},{}
2131,Magic_Study_Vol1,Magic Bible Vol1,5,20,,1000,,2,,1,0x00010204,2,2,32,,70,1,1,{ bonus bMDef,3; bonus bInt,2; bonus2 bAddEffWhenHit,Eff_Stun,1000; },{},{}
2132,Shelter_Resistance,Shell Of Resistance,5,0,,0,,9,,0,0xFFFFFFFF,2,2,32,,0,0,1,{ bonus2 bSubEle,Ele_Neutral,20; bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Holy,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20; bonus bShortWeaponDamageReturn,1; },{},{}
@@ -1299,7 +1299,7 @@
2373,Holy_Robe_,Holy Robe,5,20,,1700,,7,,1,0x00008110,7,2,16,,60,1,0,{ bonus bMdef,5; bonus2 bSubRace,RC_Demon,15; bonus2 bSubEle,Ele_Dark,10; },{},{}
2374,Diabolus_Robe,Diabolus Robe,5,20,,300,,6,,1,0x00098B1C,2,2,16,,55,1,0,{ bonus bMaxSP,150; bonus bMdef,5; bonus bHealPower,6; bonus bDelayRate,-10; if (isequipped(2729)) { bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3; } },{},{}
2375,Diabolus_Armor,Diabolus Armor,5,20,,600,,7,,1,0x000654E2,2,2,16,,55,1,0,{ bonus bStr,2; bonus bDex,1; bonus bMaxHP,150; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; if (isequipped(2729)) { bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3; } },{},{}
-2376,Assaulter_Plate,Assaulter Plate,5,0,,0,,7,,1,0x006444A2,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538,2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bVit,3; bonus bMaxHPRate,12; bonus2 bSkillHeal2,"AL_HEAL",10; bonus2 bAddItemHealRate,IG_Recovery,10; autobonus2 "{ bonus2 bHPRegenRate,600,1000; }",5,10000,BF_WEAPON,"{ specialeffect2 EF_HEAL; }"; }; },{},{}
+2376,Assaulter_Plate,Assaulter Plate,5,0,,0,,7,,1,0x006444A2,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538,2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bVit,3; bonus bMaxHPRate,12; bonus bHealpower2,10; bonus bAddItemHealRate,10; autobonus2 "{ bonus2 bHPRegenRate,600,1000; }",5,10000,BF_WEAPON,"{ specialeffect2 EF_HEAL; }"; }; },{},{}
2377,Elite_Engineer_Armor,Elite Engineer Armor,5,0,,0,,7,,1,0x00040420,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538,2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bStr,3; bonus bMaxHPRate,12; bonus2 bSkillAtk,"MC_MAMMONITE",20; bonus2 bSkillHeal,"AM_POTIONPITCHER",10; bonus2 bSkillHeal2,"AM_POTIONPITCHER",10; bonus2 bSkillHeal2,"AL_HEAL",10; bonus bUnbreakableArmor,0; }; },{},{}
2378,Assassin_Robe,Assassin Robe,5,0,,0,,7,,1,0x02021040,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2538,2435)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bAgi,3; bonus bMaxHPRate,12; bonus bCritical,5; bonus bAspdRate,5; autobonus "{ bonus2 bHPRegenRate,300,1000; }",10,10000,BF_WEAPON,"{ specialeffect2 EF_HEAL; }"; }; },{},{}
2379,Warlock_Battle_Robe,Warlock's Battle Robe,5,0,,0,,3,,1,0x00810204,7,2,16,,80,1,0,{ bonus bMaxHP,150; bonus bMdef,2; bonus2 bSubRace,RC_DemiHuman,2; if (isequipped(2539,2436)) { bonus2 bSubRace,RC_NonDemiHuman,-300; bonus bInt,3; bonus bMaxHPRate,12; bonus2 bResEff,Eff_Stun,2000; autobonus2 "{ bonus bDefEle,Ele_Ghost; }",30,10000,BF_WEAPON,"{ specialeffect2 EF_ENERGYCOAT; }"; }; },{},{}
@@ -1310,7 +1310,7 @@
2384,Spritual_Tunic,Spiritual Tunic,5,20,,0,,10,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bMaxHP,800; bonus2 bResEff,Eff_Freeze,10000; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Holy,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20; },{},{}
2385,Recuperative_Armor,Recuperative Armor,5,20,,0,,12,,0,0xFFFFFFFF,7,2,16,,0,0,0,{ bonus bNoRegen,1; bonus bNoRegen,2; bonus bHPGainValue,60; bonus bSPGainValue,6; bonus bMagicHPGainValue,60; bonus bMagicSPGainValue,6; },{},{ heal 0,-100; }
2386,Chameleon_Armor,Chameleon Armor,5,20,,1700,,5,,0,0x000FDF80,2,2,16,,70,1,0,{ bonus bMaxHP,(BaseLevel*7); bonus bMaxSP,(BaseLevel/2); autobonus2 "{ bonus bNoMagicDamage,100; }",10,2000,BF_MAGIC,"{ specialeffect2 EF_ENERGYCOAT; }"; if( BaseClass == Job_Mage || BaseClass == Job_Archer || BaseClass == Job_Acolyte ) bonus bMdef,5; else if( BaseClass == Job_Swordman || BaseClass == Job_Merchant || BaseClass == Job_Thief ) bonus bDef,3; },{},{}
-2387,Sprint_Mail,Sprint Mail,5,20,,1000,,3,,1,0x000FDF80,2,2,16,,70,1,0,{ bonus bVit,1; bonus bHPrecovRate,5; bonus2 bAddItemHealRate,IG_Recovery,3; bonus2 bSkillHeal,"AL_HEAL",3; if( isequipped(2440,2744) ) { bonus bMaxHPrate,7; bonus bMaxSPrate,7; bonus bCastrate,-3; bonus bDelayrate,-15; } },{},{}
+2387,Sprint_Mail,Sprint Mail,5,20,,1000,,3,,1,0x000FDF80,2,2,16,,70,1,0,{ bonus bVit,1; bonus bHPrecovRate,5; bonus bAddItemHealRate,3; bonus2 bSkillHeal,"AL_HEAL",3; if( isequipped(2440,2744) ) { bonus bMaxHPrate,7; bonus bMaxSPrate,7; bonus bCastrate,-3; bonus bDelayrate,-15; } },{},{}
2388,Kandura,Kandura,5,20,,300,,4,,1,0x00001000,2,2,16,,70,1,0,{ bonus bAgi,1; bonus bFlee,5; bonus bAspdRate,2; },{},{}
2389,Armor_Of_Naga,Armor of Naga,5,20,,1000,,5,,1,0x00CFDF80,2,2,16,,70,1,0,{ bonus bMdef,2; autobonus "{ bonus bBaseAtk,20; }",10,10000,BF_WEAPON,"{ specialeffect2 EF_ENHANCE; }"; },{},{}
2390,Improved_Tights,Improved Tights,5,20,,400,,6,,1,0x00080808,2,2,16,,75,1,0,{ bonus bMdef,2; bonus bFlee2,3; },{},{}
@@ -1374,7 +1374,7 @@
2447,Military_Boots,Army Boots,5,0,,1000,,5,,0,0xFFFFFFFE,7,2,64,,0,1,0,{},{},{}
2448,Air_Boss,Air Boss,5,0,,500,,2,,0,0xFFFFFFFF,7,2,64,,0,1,0,{ bonus bAgi,1; },{},{}
2449,Variant_Shoes_M,Variant Shoes,5,10000,,500,,3,,0,0xFFFFFFFE,2,2,64,,85,1,0,{ bonus bMaxHPRate,20-getrefine(); bonus bMaxSPRate,20-getrefine(); bonus bDef,getrefine()/2; },{},{}
-2450,Vital_Tree_Shoes,Vital Tree Shoes,5,0,,500,,4,,0,0xFFFFFFFE,7,2,64,,60,1,0,{ bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus2 bSkillHeal,"AL_HEAL",5; bonus2 bAddItemHealRate,IG_Recovery,5; bonus bMdef,3; bonus bVit,2; },{},{}
+2450,Vital_Tree_Shoes,Vital Tree Shoes,5,0,,500,,4,,0,0xFFFFFFFE,7,2,64,,60,1,0,{ bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealpower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2; },{},{}
//2451,Freya_Spirit_Sandals1,Freya Spirit Sandals,
//2452,Freya_Spirit_Sandals2,Freya Spirit Sandals,
//2453,Freya_Spirit_Sandals3,Freya Spirit Sandals,
@@ -1833,7 +1833,7 @@
4149,Gargoyle_Card,Gargoyle Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12028,RC_Insect,100; },{},{}
4150,Goat_Card,Goat Card,6,20,,10,,,,,,,,16,,,,,{ if(getrefine()<6) { bonus bDef,2; bonus bMdef,5; } },{},{}
4151,Gajomart_Card,Gajomart Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Plant,-20; bonus2 bExpAddRace,RC_Plant,10; },{},{}
-4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItemGroup,IG_Juice,RC_Insect,900; },{},{}
+4152,Galapago_Card,Galapago Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Juice,50; bonus3 bAddMonsterDropItem,531,RC_Insect,300; bonus3 bAddMonsterDropItem,532,RC_Insect,300; bonus3 bAddMonsterDropItem,533,RC_Insect,300; },{},{}
4153,Crab_Card,Crab Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,5; bonus2 bAddDamageClass,1266,30; if(isequipped(4247,4273)) { bonus3 bAddMonsterDropItem,544,RC_Fish,3000; bonus2 bAddEle,Ele_Water,30; } },{},{}
4154,Rice_Cake_Boy_Card,Dumpling Child Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Candy,50; bonus3 bAddMonsterDropItem,529,RC_DemiHuman,300; bonus3 bAddMonsterDropItem,530,RC_DemiHuman,100; },{},{}
4155,Goblin_Leader_Card,Goblin Leader Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace2,1,30; },{},{}
@@ -1896,11 +1896,11 @@
4212,Bon_Gun_Card,Bongun Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"SM_BASH",1,20; bonus2 bAddSkillBlow,"SM_BASH",5; bonus2 bAddDefClass,1026,-100; },{},{}
4213,Brilight_Card,Brilight Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Silence,600; },{},{}
4214,Bloody_Murderer_Card,Bloody Murderer Card,6,20,,10,,,,,,,,2,,,,,{ bonus bCritAtkRate,10; bonus2 bCriticalAddRace,RC_Insect,7; },{},{}
-4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Food,500; },{},{}
+4215,Blazzer_Card,Blazer Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Food,600; },{},{}
4216,Sasquatch_Card,Sasquatch Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,600; },{},{}
4217,Live_Peach_Tree_Card,Enchanted Peach Tree Card,6,20,,10,,,,,,,,32,,,,,{ bonus3 bAutoSpell,"AL_HEAL",1+9*(getskilllv("AL_HEAL")==10),20; if(isequipped(4280,4185,4293,4312)) { bonus bVit,10; bonus bCastrate,-10; bonus bUseSPRate,-10; if(BaseClass == Job_Acolyte) { bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5; bonus2 bSubRace,RC_Undead,30; bonus2 bSubRace,RC_Demon,30; } } },{},{}
4218,Succubus_Card,Succubus Card,6,20,,10,,,,,,,,16,,,,,{ bonus bMaxHP,1000; if (isequipped(4269)) { bonus bVit,1; bonus bHPrecovRate,10; } else { bonus bVit,-3; bonus bHPrecovRate,-20; } },{},{}
-4219,Sageworm_Card,Sage Worm Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Gemstone,90; },{},{}
+4219,Sageworm_Card,Sage Worm Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItem,715,30; bonus2 bAddMonsterDropItem,716,30; bonus2 bAddMonsterDropItem,717,30; },{},{}
4220,Solider_Card,Solider Card,6,20,,10,,,,,,,,16,,,,,{ bonus bDef,2; bonus bMdef,2; },{},{}
4221,Skeleton_General_Card,Skeleton General Card,6,20,,10,,,,,,,,64,,,,,{ bonus2 bSubRace,RC_Insect,-20; bonus2 bExpAddRace,RC_Insect,10; },{},{}
4222,Skel_Prisoner_Card,Skeleton Prisoner Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Sleep,300+600*(isequipped(4025)); },{},{}
@@ -1908,7 +1908,7 @@
4224,Stem_Worm_Card,Stem Worm Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12032,RC_Brute,100; },{},{}
4225,Stone_Shooter_Card,Stone Shooter Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,10; bonus bHit,10; },{},{}
4226,Sting_Card,Sting Card,6,20,,10,,,,,,,,32,,,,,{ bonus bDef,2; if(getrefine()>8) bonus bMdef,5; },{},{}
-4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItemGroup,IG_Meat,RC_Brute,400; },{},{}
+4227,Spring_Rabbit_Card,Spring Rabbit Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Meat,50; bonus3 bAddMonsterDropItem,517,RC_Brute,200; bonus3 bAddMonsterDropItem,528,RC_Brute,200; },{},{}
4228,Sleeper_Card,Sleeper Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAddMonsterDropItem,12031,RC_Fish,100; },{},{}
4229,C_Tower_Manager_Card,Tower Keeper Card,6,20,,10,,,,,,,,769,,,,,{ bonus bInt,1; bonus bCastrate,-5; if(isequipped(4244,4299,4313)) { bonus bDef,3; bonus bMdef,3; } },{},{}
4230,Shinobi_Card,Shinobi Card,6,20,,10,,,,,,,,136,,,,,{ bonus bAgi,1; bonus3 bAutoSpellWhenHit,"AS_CLOAKING",5,100; },{},{}
@@ -1963,7 +1963,7 @@
4279,Deleter_Card,Earth Deleter Card,6,20,,10,,,,,,,,16,,,,,{ bonus bSPrecovRate,-100; bonus bSPGainValue,10; },{},{ heal 0,-100; }
4280,Geographer_Card,Geographer Card,6,20,,10,,,,,,,,16,,,,,{ bonus3 bAutoSpellWhenHit,"AL_BLESSING",2+8*(getskilllv("AL_BLESSING")==10),30; },{},{}
4281,Zipper_Bear_Card,Zipper Bear Card,6,20,,10,,,,,,,,2,,,,,{ bonus bBaseAtk,30; bonus2 bSPDrainValue,-1,0; if(BaseClass == Job_Merchant) bonus bUnbreakableWeapon,0; },{},{}
-4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Recovery,500; },{},{}
+4282,Tengu_Card,Tengu Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddMonsterDropItemGroup,IG_Recovery,600; },{},{}
4283,Greatest_General_Card,Greatest General Card,6,20,,10,,,,,,,,136,,,,,{ bonus3 bAutoSpell,"MO_CALLSPIRITS",5,2+18*(BaseClass == Job_Acolyte); },{},{}
4284,Chepet_Card,Chepet Card,6,20,,10,,,,,,,,2,,,,,{ bonus4 bAutoSpell,"AL_HEAL",5,50,1; },{},{}
4285,Choco_Card,Choco Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee2,5; bonus bFlee,10; },{},{}
@@ -2007,7 +2007,7 @@
4323,Garm_Baby_Card,Hatii Babe Card,6,20,,10,,,,,,,,2,,,,,{ bonus3 bAutoSpell,"MG_FROSTDIVER",3,50+250*isequipped(4324); },{},{}
4324,Garm_Card,Hatii Card,6,20,,10,,,,,,,,16,,,,,{ bonus2 bAddEffWhenHit,Eff_Freeze,5000; },{},{}
4325,Harpy_Card,Harpy Card,6,20,,10,,,,,,,,4,,,,,{ bonus2 bSubEle,Ele_Neutral,15; bonus2 bSkillAtk,"MG_NAPALMBEAT",5; if(isequipped(4191,4208,4258,4309,4327)) { bonus bMaxHP,500; bonus bDef,5; bonus bMDef,5; bonus2 bSkillAtk,14,10; bonus2 bSkillAtk,19,10; bonus2 bSkillAtk,20,10; if(BaseClass == Job_Mage) { bonus bMatkRate,3; bonus bCastrate,-15; } } },{},{}
-4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItemGroup,IG_Fish,RC_Fish,600; },{},{}
+4326,See_Otter_Card,Sea-Otter Card,6,20,,10,,,,,,,,136,,,,,{ bonus2 bAddItemHealRate,IG_Fish,50; bonus3 bAddMonsterDropItem,551,RC_Fish,300; bonus3 bAddMonsterDropItem,544,RC_Fish,300; },{},{}
4327,Blood_Butterfly_Card,Bloody Butterfly Card,6,20,,10,,,,,,,,136,,,,,{ bonus bCastrate,30; bonus bNoCastCancel,0; bonus2 bSkillAtk,18,5; },{},{}
4328,Hyegun_Card,Yao Jun Card,6,20,,10,,,,,,,,4,,,,,{ bonus bFlee,15; bonus bCritical,1; if(isequipped(4090,4212)) bonus bAllStats,1; },{},{}
4329,Phendark_Card,Phendark Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bSPGainRace,RC_DemiHuman,5; },{},{ heal 0,-5; }
@@ -2695,7 +2695,7 @@
5487,J_Poringcake_Hat,Poring Cake Hat,5,,,500,,1,,0,0xFFFFFFFF,7,2,256,,0,1,417,{ bonus bLuk,2; },{},{}
5488,J_Twin_Santahat,Twin Santa Hat,5,,,100,,1,,0,0xFFFFFFFF,7,2,256,,0,1,390,{ bonus bLuk,1; bonus bMdef,1; },{},{}
//5489,Love_Daddy,Love Daddy Hat,5,,,100,,0,,0,0xFFFFFFFF,7,2,256,,0,1,484,{ bonus bDex,2; },{},{}
-//5490,Anubis_Helm,Anubis Helm,5,,,0,,3,,0,0xFFFFFFFF,7,2,256,,70,1,485,{ bonus2 bSubRace,RC_Boss,10; bonus2 bSkillHeal2,"AL_HEAL",10; bonus2 bAddItemHealRate,IG_Recovery,10; },{},{}
+//5490,Anubis_Helm,Anubis Helm,5,,,0,,3,,0,0xFFFFFFFF,7,2,256,,70,1,485,{ bonus2 bSubRace,RC_Boss,10; bonus bHealpower2,10; bonus bAddItemHealRate,10; },{},{}
//5491,Hat_Of_Outlaw,Bandit Hat,5,,,800,,3,,1,0xFFFFFFFF,7,2,256,,0,1,486,{ bonus bStr,2; bonus2 bSubEle,Ele_Fire,10; },{},{}
5492,Boy's_Cap_I,Student Cap,5,0,,0,,5,,0,0xFFFFFFFE,7,2,256,,0,1,102,{ bonus2 bAddRace,RC_DemiHuman,5; },{},{}
5493,Ulle_Cap_I,Ulle's Cap,5,0,,0,,3,,0,0xFFFFFFFE,7,2,256,,0,1,254,{ bonus bDex,2; bonus bAgi,1; if(isequipped(2353) && readparam(bDex)>=70) bonus bUseSPrate,-10; },{},{}
@@ -4875,106 +4875,106 @@
12744,Chocotate_Box,Chocolate Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
//12745,Vivid Notation,
//12746,Curious Snowball,
-12900,Battle_Manual_Box,Battle Manual Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; },{},{}
-12901,Insurance_Package,Insurance Package,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,10; },{},{}
-12902,Bubble_Gum_Box,Bubble Gum Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,10; },{},{}
-12903,Str_Dish_Box,Steamed Tongue Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,10; },{},{}
-12904,Agi_Dish_Box,Steamed Scorpion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,10; },{},{}
-12905,Int_Dish_Box,Dragon Breath Cocktail Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; },{},{}
-12906,Dex_Dish_Box,Hwergelmir's Tonic Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,10; },{},{}
-12907,Luk_Dish_Box,Nine Tail Dish Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,10; },{},{}
-12908,Vit_Dish_Box,Stew Of Immortality Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,10; },{},{}
-12909,Kafra_Card_Box,Kafra Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,10; },{},{}
-12910,Giant_Fly_Wing_Box,Giant Fly Wing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,10; },{},{}
-12911,Neuralizer_Box,Neuralizer Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12213,10; },{},{}
-12912,Convex_Mirror_Box,Convex Mirror Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,10; },{},{}
-12913,Blessing_10_Scroll_Box,Blessing 10 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
-12914,Inc_Agi_10_Scroll_Box,Increase AGI 10 scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
-12915,Aspersio_5_Scroll_Box,Aspersio 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,10; },{},{}
-12916,Assumptio_5_Scroll_Box,Assumptio 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,10; },{},{}
-12917,Wind_Walk_10_Scroll_Box,Wind Walk 10 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
-12918,Adrenaline_Scroll_Box,Adrenaline 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
-12919,Megaphone_Box,Megaphone Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,10; },{},{}
-12920,Enriched_Elunium_Box,Enriched Elunium Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,10; },{},{}
-12921,Enriched_Oridecon_Box,Enriched Oridecon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,10; },{},{}
-12922,Token_Of_Siegfried_Box,Token of Siegfried Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,10; },{},{}
-12923,Pet_Egg_Scroll_Box1,December Lucky Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12925,1; },{},{}
-12924,Pet_Egg_Scroll_Box2,Pet Egg Box 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12926,1; },{},{}
-12925,Pet_Egg_Scroll1,Kafra Item Mall Prize Package,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12926,Pet_Egg_Scroll2,December Lucky Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12927,J_Aspersio_5_Scroll_Box,Aspersio Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12928,10; },{},{}
+12900,Battle_Manual_Box,Battle Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; },{},{}
+12901,Insurance_Package,Insurance Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,10; },{},{}
+12902,Bubble_Gum_Box,Bubble Gum Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,10; },{},{}
+12903,Str_Dish_Box,Steamed Tongue Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,10; },{},{}
+12904,Agi_Dish_Box,Steamed Scorpion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,10; },{},{}
+12905,Int_Dish_Box,Dragon Breath Cocktail Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; },{},{}
+12906,Dex_Dish_Box,Hwergelmir's Tonic Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,10; },{},{}
+12907,Luk_Dish_Box,Nine Tail Dish Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,10; },{},{}
+12908,Vit_Dish_Box,Stew Of Immortality Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,10; },{},{}
+12909,Kafra_Card_Box,Kafra Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,10; },{},{}
+12910,Giant_Fly_Wing_Box,Giant Fly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,10; },{},{}
+12911,Neuralizer_Box,Neuralizer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12213,1; },{},{}
+12912,Convex_Mirror_Box,Convex Mirror Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,10; },{},{}
+12913,Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
+12914,Inc_Agi_10_Scroll_Box,Increase AGI 10 scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
+12915,Aspersio_5_Scroll_Box,Aspersio 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,10; },{},{}
+12916,Assumptio_5_Scroll_Box,Assumptio 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,10; },{},{}
+12917,Wind_Walk_10_Scroll_Box,Wind Walk 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
+12918,Adrenaline_Scroll_Box,Adrenaline 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
+12919,Megaphone_Box,Megaphone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,10; },{},{}
+12920,Enriched_Elunium_Box,Enriched Elunium Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,10; },{},{}
+12921,Enriched_Oridecon_Box,Enriched Oridecon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,10; },{},{}
+12922,Token_Of_Siegfried_Box,Token of Siegfried Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,10; },{},{}
+12923,Pet_Egg_Scroll_Box1,December Lucky Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12925,1; },{},{}
+12924,Pet_Egg_Scroll_Box2,Pet Egg Box 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12926,1; },{},{}
+12925,Pet_Egg_Scroll1,Kafra Item Mall Prize Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12926,Pet_Egg_Scroll2,December Lucky Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12927,J_Aspersio_5_Scroll_Box,Aspersio Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12928,10; },{},{}
12928,J_Aspersio_5_Scroll,Sacred Scroll,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "PR_ASPERSIO",5; },{},{}
-12929,Pet_Egg_Scroll_Box3,Pet Egg Box 3,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12932,1; },{},{}
-12930,Pet_Egg_Scroll_Box4,Pet Egg Box 4,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12933,1; },{},{}
-12931,Pet_Egg_Scroll_Box5,Pet Egg Box 5,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12934,1; },{},{}
-12932,Pet_Egg_Scroll3,Episode 13.2 Key Package,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12933,Pet_Egg_Scroll4,Summer Hat Pack,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12934,Pet_Egg_Scroll5,Pet Egg Scroll5,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12935,Infiltrator_Box,Infiltrator Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
-12936,Muramasa_Box,Muramasa Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
-12937,Excalibur_Box,Excalibur Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
-12938,Combat_Knife_Box,Combat Knife Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
-12939,Counter_Dagger_Box,Dagger of Counter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
-12940,Kaiser_Knuckle_Box,Kaiser Knuckle Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
-12941,Pole_Axe_Box,Poll Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1419,604800; },{},{}
-12942,Mighty_Staff_Box,Mighty Staff Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
-12943,Right_Epsilon_Box,Light Epsilon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
-12944,Balistar_Box,Ballista Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
-12945,Diary_Of_Great_Sage_Box,Sage's Diary Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
-12946,Asura_Box,Asura Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
-12947,Apple_Of_Archer_Box,Apple of Archer Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
-12948,Bunny_Band_Box,Bunny Band Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
-12949,Sahkkat_Box,Sakkat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
-12950,Lord_Circlet_Box,Grand Circlet Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
-12951,Elven_Ears_Box,Elven Ears Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,604800; },{},{}
-12952,Steel_Flower_Box,Steel Flower Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
-12953,Critical_Ring_Box,Critical Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
-12954,Earring_Box,Earring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
-12955,Ring_Box,Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
-12956,Necklace_Box,Necklace Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
-12957,Glove_Box,Glove Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
-12958,Brooch_Box,Brooch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
-12959,Rosary_Box,Rosary Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
-12960,Safety_Ring_Box,Safety Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
-12961,Vesper_Core01_Box,Vesper Core 01 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
-12962,Vesper_Core02_Box,Vesper Core 02 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
-12963,Vesper_Core03_Box,Vesper Core 03 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
-12964,Vesper_Core04_Box,Vesper Core 04 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
-12965,Emergency_Box1,Emergency Level 1 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12968,1; },{},{}
-12966,Emergency_Box2,Emergency Level 2 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12969,2; },{},{}
-12967,Emergency_Box3,Emergency Level 3 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12970,3; },{},{}
+12929,Pet_Egg_Scroll_Box3,Pet Egg Box 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12932,1; },{},{}
+12930,Pet_Egg_Scroll_Box4,Pet Egg Box 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12933,1; },{},{}
+12931,Pet_Egg_Scroll_Box5,Pet Egg Box 5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12934,1; },{},{}
+12932,Pet_Egg_Scroll3,Episode 13.2 Key Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12933,Pet_Egg_Scroll4,Summer Hat Pack,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12934,Pet_Egg_Scroll5,Pet Egg Scroll5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+12935,Infiltrator_Box,Infiltrator Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
+12936,Muramasa_Box,Muramasa Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
+12937,Excalibur_Box,Excalibur Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
+12938,Combat_Knife_Box,Combat Knife Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
+12939,Counter_Dagger_Box,Dagger of Counter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
+12940,Kaiser_Knuckle_Box,Kaiser Knuckle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
+12941,Pole_Axe_Box,Poll Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1419,604800; },{},{}
+12942,Mighty_Staff_Box,Mighty Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
+12943,Right_Epsilon_Box,Light Epsilon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
+12944,Balistar_Box,Ballista Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
+12945,Diary_Of_Great_Sage_Box,Sage's Diary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
+12946,Asura_Box,Asura Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
+12947,Apple_Of_Archer_Box,Apple of Archer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
+12948,Bunny_Band_Box,Bunny Band Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
+12949,Sahkkat_Box,Sakkat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
+12950,Lord_Circlet_Box,Grand Circlet Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
+12951,Elven_Ears_Box,Elven Ears Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,604800; },{},{}
+12952,Steel_Flower_Box,Steel Flower Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
+12953,Critical_Ring_Box,Critical Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
+12954,Earring_Box,Earring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
+12955,Ring_Box,Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
+12956,Necklace_Box,Necklace Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
+12957,Glove_Box,Glove Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
+12958,Brooch_Box,Brooch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
+12959,Rosary_Box,Rosary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
+12960,Safety_Ring_Box,Safety Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
+12961,Vesper_Core01_Box,Vesper Core 01 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
+12962,Vesper_Core02_Box,Vesper Core 02 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
+12963,Vesper_Core03_Box,Vesper Core 03 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
+12964,Vesper_Core04_Box,Vesper Core 04 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
+12965,Emergency_Box1,Emergency Level 1 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12968,1; },{},{}
+12966,Emergency_Box2,Emergency Level 2 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12969,1; },{},{}
+12967,Emergency_Box3,Emergency Level 3 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12970,1; },{},{}
12968,Emergency_Scroll1,Emergency Level 1 Scroll,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "GD_EMERGENCYCALL",1; },{},{}
12969,Emergency_Scroll2,Emergency Level 2 Scroll,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "GD_EMERGENCYCALL",1; },{},{}
12970,Emergency_Scroll3,Emergency Level 3 Scroll,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "GD_EMERGENCYCALL",1; },{},{}
-12971,Teleport_Box1,Teleport Scroll Box 1,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12977,10; },{},{}
-12972,Teleport_Box2,Teleport Scroll Box 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12978,10; },{},{}
-12973,Teleport_Box3,Teleport Scroll Box 3,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12979,10; },{},{}
-12974,Teleport_Box4,Teleport Scroll Box 4,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12980,10; },{},{}
-12975,Teleport_Box5,Teleport Scroll Box 5,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12981,10; },{},{}
-12976,Teleport_Box6,Teleport Scroll Box 6,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12982,10; },{},{}
+12971,Teleport_Box1,Teleport Scroll Box 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12977,10; },{},{}
+12972,Teleport_Box2,Teleport Scroll Box 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12978,10; },{},{}
+12973,Teleport_Box3,Teleport Scroll Box 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12979,10; },{},{}
+12974,Teleport_Box4,Teleport Scroll Box 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12980,10; },{},{}
+12975,Teleport_Box5,Teleport Scroll Box 5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12981,10; },{},{}
+12976,Teleport_Box6,Teleport Scroll Box 6,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12982,10; },{},{}
12977,Teleport_Scroll1,Teleport Scroll 1,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",1; },{},{}
12978,Teleport_Scroll2,Teleport Scroll 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",2; },{},{}
12979,Teleport_Scroll3,Teleport Scroll 3,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",3; },{},{}
12980,Teleport_Scroll4,Teleport Scroll 4,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",4; },{},{}
12981,Teleport_Scroll5,Teleport Scroll 5,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",5; },{},{}
12982,Teleport_Scroll6,Teleport Scroll 6,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_CashTele",6; },{},{}
-12983,Pet_Egg_Scroll_Box6,Pet Egg Scroll Box 6,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12989,1; },{},{}
-12984,Pet_Egg_Scroll_Box7,Pet Egg Scroll Box 7,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12990,1; },{},{}
-12985,Pet_Egg_Scroll_Box8,Pet Egg Scroll Box 8,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12991,1; },{},{}
-12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12992,1; },{},{}
-12987,Pet_Egg_Scroll_Box10,Pet Egg Scroll Box 10,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12993,1; },{},{}
-12988,Pet_Egg_Scroll_Box11,Pet Egg Scroll Box 11,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12994,1; },{},{}
+12983,Pet_Egg_Scroll_Box6,Pet Egg Scroll Box 6,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12989,1; },{},{}
+12984,Pet_Egg_Scroll_Box7,Pet Egg Scroll Box 7,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12990,1; },{},{}
+12985,Pet_Egg_Scroll_Box8,Pet Egg Scroll Box 8,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12991,1; },{},{}
+12986,Pet_Egg_Scroll_Box9,Adventurer Pack Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12992,1; },{},{}
+12987,Pet_Egg_Scroll_Box10,Pet Egg Scroll Box 10,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12993,1; },{},{}
+12988,Pet_Egg_Scroll_Box11,Pet Egg Scroll Box 11,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12994,1; },{},{}
12989,Pet_Egg_Scroll6,Pet Egg Scroll 6,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12990,Pet_Egg_Scroll7,Pet Egg Scroll 7,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12991,Pet_Egg_Scroll8,Party Hard Pack,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12992,Pet_Egg_Scroll9,Adventurer Pack,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12993,Pet_Egg_Scroll10,Pet Egg Scroll 10,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12994,Pet_Egg_Scroll11,Pet Egg Scroll 11,11,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-12995,White_Herb_Box,White Herb Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 509,15; },{},{}
-12996,Blue_Herb_Box,Blue Herb Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 510,15; },{},{}
-12997,Elunium_Box,Elunium Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 985,5; },{},{}
-12998,Oridecon_Box,Oridecon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,5; },{},{}
-12999,Branch_Of_Dead_Tree_Box,Dead Branch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,3; },{},{}
+12995,White_Herb_Box,White Herb Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 509,15; },{},{}
+12996,Blue_Herb_Box,Blue Herb Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 510,15; },{},{}
+12997,Elunium_Box,Elunium Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 985,5; },{},{}
+12998,Oridecon_Box,Oridecon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,5; },{},{}
+12999,Branch_Of_Dead_Tree_Box,Dead Branch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,3; },{},{}
// More Weapons
//===================================================================
// Daggers and Ninja Weapons
@@ -5165,64 +5165,64 @@
//13426,Cutlas_C
//13427,Solar_Sword_C
// More Cash Shop Items
-13500,Insurance60_Package,Life Insurrance Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14500,10; },{},{}
-13501,Assorted_Scroll_Box,Experience Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13502,Drooping_Kitty_Box,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,604800; },{},{}
-13503,Magestic_Goat_Box,Baphomet Horns Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,604800; },{},{}
-13504,Deviruchi_Cap_Box,Refined Deviruchi Hat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,604800; },{},{}
-13505,Executioner_Box,Executioner Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1174,604800; },{},{}
-13506,Brood_Axe_Box,Refined Bloody Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1373,604800; },{},{}
-13507,Tomahawk_Box,Tomahawk Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1374,604800; },{},{}
-13508,Bow_Of_Rudra_Box,Rudra Bow Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1729,604800; },{},{}
-13509,Cutlas_Box,Cutlas Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13402,604800; },{},{}
-13510,Solar_Sword_Box,Solar Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13403,604800; },{},{}
-13511,Sword_Breaker_Box,Refined Swordbreaker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13024,604800; },{},{}
-13512,Mail_Breaker_Box,Refined Mailbreaker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13025,604800; },{},{}
-13513,Moonlight_Sword_Box,Moonlight Dagger Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13026,604800; },{},{}
-13514,Spanner_Box,Wrench Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1534,604800; },{},{}
-13515,Grape_Box,Grape Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 514,10; },{},{}
-13516,Royal_Jelly_Box,Royal Jelly Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 526,5; },{},{}
-13517,Yggdrasilberry_Box,Yggdrasil Berry Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 607,3; },{},{}
-13518,Weapon_Card_Scroll_Box,Weapon Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13558,1; },{},{}
-13519,Armor_Card_Scroll_Box,Armor Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13559,1; },{},{}
-13520,Helmet_Card_Scroll_Box,Helmet Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13560,1; },{},{}
-13521,Garment_Card_Scroll_Box,Garment Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13561,1; },{},{}
-13522,Shield_Card_Scroll_Box,Shield Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13562,1; },{},{}
-13523,Shoes_Card_Scroll_Box,Shoes Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13563,1; },{},{}
-13524,Accy_Card_Scroll_Box,Accessory Card Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13564,1; },{},{}
-13525,Zeny_Scroll_Box,Zeny Pet Egg Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14508,1; },{},{}
-13526,Pet_Egg_Scroll_Box1_,Pet Egg Scroll Box 12,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12925,30; },{},{}
-13527,Pet_Egg_Scroll_Box2_,Pet Egg Scroll Box 13,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12926,30; },{},{}
-13528,Pet_Egg_Scroll_Box3_,Pet Egg Scroll Box 14,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12932,30; },{},{}
-13529,Pet_Egg_Scroll_Box4_,Pet Egg Scroll Box 15,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12933,30; },{},{}
-13530,Pet_Egg_Scroll_Box5_,Pet Egg Scroll Box 16,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12934,30; },{},{}
-13531,Light_Red_Pot_Box,Light Red Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 598,50; },{},{}
-13532,Light_Orange_Pot_Box,Light Orange Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 599,50; },{},{}
-13533,Light_Yellow_Pot_Box,Light Yellow Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11500,50; },{},{}
-13534,Light_White_Pot_Box,Light White Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11501,50; },{},{}
-13535,Light_Center_Pot_Box,Light Concentration Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14509,20; },{},{}
-13536,Light_Awakening_Pot_Box,Light Awakening Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14510,20; },{},{}
-13537,Light_Berserk_Pot_Box,Light Berserk Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14511,20; },{},{}
-13538,Meteor_10_Scroll_Box,Meteor Storm Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14512,10; },{},{}
-13539,Storm_10_Scroll_Box,Storm Gust Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14513,10; },{},{}
-13540,Vermilion_10_Scroll_Box,Lord of Vermilion Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14514,10; },{},{}
-13541,Lex_Aeterna_Scroll_Box,Lex Aeterna Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14515,10; },{},{}
-13542,Magnificat_5_Scroll_Box,Magnificat Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14516,10; },{},{}
-13543,CP_Helm_Scroll_Box,Chemical Protection Helm Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14517,10; },{},{}
-13544,CP_Shield_Scroll_Box,Chemical Protection Shield Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14518,10; },{},{}
-13545,CP_Armor_Scroll_Box,Chemical Protection Armor Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14519,10; },{},{}
-13546,CP_Weapon_Scroll_Box,Chemical Protection Weapon Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14520,10; },{},{}
-13547,Repair_Scroll_Box,Repair Weapon Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,10; },{},{}
-13548,Big_Bun_Box,Big Bun Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,10; },{},{}
-13549,Pill__Box,Pill Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,10; },{},{}
-13550,Superb_Fish_Slice_Box,Fish Slice Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14524,10; },{},{}
-13551,Chewy_Ricecake_Box,Chewy Ricecake Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14525,10; },{},{}
-13552,Oriental_Pastry_Box,Pastry Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14526,10; },{},{}
-13553,Dun_Tele_Scroll1_Box,Dungeon Teleport Scroll 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,10; },{},{}
-13554,Weapon_Card_Scroll_Box2,Weapon Card Pet Egg Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13565,1; },{},{}
-13555,Weapon_Card_Scroll_Box3,Weapon Card Pet Egg Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13566,1; },{},{}
-13556,Armor_Card_Scroll_Box2,Armor Card Pet Egg Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13567,1; },{},{}
-13557,Accy_Card_Scroll_Box2,Accessory Card Pet Egg Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13568,1; },{},{}
+13500,Insurance60_Package,Life Insurrance Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14500,10; },{},{}
+13501,Assorted_Scroll_Box,Experience Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13502,Drooping_Kitty_Box,Refined Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,604800; },{},{}
+13503,Magestic_Goat_Box,Baphomet Horns Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,604800; },{},{}
+13504,Deviruchi_Cap_Box,Refined Deviruchi Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,604800; },{},{}
+13505,Executioner_Box,Executioner Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1174,604800; },{},{}
+13506,Brood_Axe_Box,Refined Bloody Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1373,604800; },{},{}
+13507,Tomahawk_Box,Tomahawk Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1374,604800; },{},{}
+13508,Bow_Of_Rudra_Box,Rudra Bow Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1729,604800; },{},{}
+13509,Cutlas_Box,Cutlas Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13402,604800; },{},{}
+13510,Solar_Sword_Box,Solar Sword Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13403,604800; },{},{}
+13511,Sword_Breaker_Box,Refined Swordbreaker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13024,604800; },{},{}
+13512,Mail_Breaker_Box,Refined Mailbreaker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13025,604800; },{},{}
+13513,Moonlight_Sword_Box,Moonlight Dagger Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13026,604800; },{},{}
+13514,Spanner_Box,Wrench Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1534,604800; },{},{}
+13515,Grape_Box,Grape Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 514,10; },{},{}
+13516,Royal_Jelly_Box,Royal Jelly Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 526,5; },{},{}
+13517,Yggdrasilberry_Box,Yggdrasil Berry Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 607,3; },{},{}
+13518,Weapon_Card_Scroll_Box,Weapon Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13558,1; },{},{}
+13519,Armor_Card_Scroll_Box,Armor Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13559,1; },{},{}
+13520,Helmet_Card_Scroll_Box,Helmet Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13560,1; },{},{}
+13521,Garment_Card_Scroll_Box,Garment Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13561,1; },{},{}
+13522,Shield_Card_Scroll_Box,Shield Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13562,1; },{},{}
+13523,Shoes_Card_Scroll_Box,Shoes Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13563,1; },{},{}
+13524,Accy_Card_Scroll_Box,Accessory Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13564,1; },{},{}
+13525,Zeny_Scroll_Box,Zeny Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14508,1; },{},{}
+13526,Pet_Egg_Scroll_Box1_,Pet Egg Scroll Box 12,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12925,30; },{},{}
+13527,Pet_Egg_Scroll_Box2_,Pet Egg Scroll Box 13,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12926,30; },{},{}
+13528,Pet_Egg_Scroll_Box3_,Pet Egg Scroll Box 14,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12932,30; },{},{}
+13529,Pet_Egg_Scroll_Box4_,Pet Egg Scroll Box 15,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12933,30; },{},{}
+13530,Pet_Egg_Scroll_Box5_,Pet Egg Scroll Box 16,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12934,30; },{},{}
+13531,Light_Red_Pot_Box,Light Red Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 598,50; },{},{}
+13532,Light_Orange_Pot_Box,Light Orange Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 599,50; },{},{}
+13533,Light_Yellow_Pot_Box,Light Yellow Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11500,50; },{},{}
+13534,Light_White_Pot_Box,Light White Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11501,50; },{},{}
+13535,Light_Center_Pot_Box,Light Concentration Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14509,20; },{},{}
+13536,Light_Awakening_Pot_Box,Light Awakening Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14510,20; },{},{}
+13537,Light_Berserk_Pot_Box,Light Berserk Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14511,20; },{},{}
+13538,Meteor_10_Scroll_Box,Meteor Storm Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14512,1; },{},{}
+13539,Storm_10_Scroll_Box,Storm Gust Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14513,1; },{},{}
+13540,Vermilion_10_Scroll_Box,Lord of Vermilion Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14514,1; },{},{}
+13541,Lex_Aeterna_Scroll_Box,Lex Aeterna Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14515,1; },{},{}
+13542,Magnificat_5_Scroll_Box,Magnificat Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14516,1; },{},{}
+13543,CP_Helm_Scroll_Box,Chemical Protection Helm Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14517,10; getitem 7139,10; },{},{}
+13544,CP_Shield_Scroll_Box,Chemical Protection Shield Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14518,10; getitem 7139,10; },{},{}
+13545,CP_Armor_Scroll_Box,Chemical Protection Armor Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14519,10; getitem 7139,10; },{},{}
+13546,CP_Weapon_Scroll_Box,Chemical Protection Weapon Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14520,10; getitem 7139,10; },{},{}
+13547,Repair_Scroll_Box,Repair Weapon Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14587,5; getitem 1002,5; getitem 998,5; getitem 756,5; getitem 999,5; },{},{}
+13548,Big_Bun_Box,Big Bun Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,10; },{},{}
+13549,Pill__Box,Pill Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,10; },{},{}
+13550,Superb_Fish_Slice_Box,Fish Slice Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14524,10; },{},{}
+13551,Chewy_Ricecake_Box,Chewy Ricecake Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14525,10; },{},{}
+13552,Oriental_Pastry_Box,Pastry Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14526,10; },{},{}
+13553,Dun_Tele_Scroll1_Box,Dungeon Teleport Scroll 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,5; },{},{}
+13554,Weapon_Card_Scroll_Box2,Weapon Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13565,1; },{},{}
+13555,Weapon_Card_Scroll_Box3,Weapon Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13566,1; },{},{}
+13556,Armor_Card_Scroll_Box2,Armor Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13567,1; },{},{}
+13557,Accy_Card_Scroll_Box2,Accessory Card Pet Egg Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13568,1; },{},{}
13558,Weapon_Card_Scroll,Weapon Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13559,Armor_Card_Scroll,Armor Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13560,Helmet_Card_Scroll,Helmet Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -5234,138 +5234,138 @@
13566,Weapon_Card_Scroll3,Weapon Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13567,Armor_Card_Scroll2,Armor Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13568,Accy_Card_Scroll2,Accessory Card Pet Egg Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13569,PVP_Tele_Scroll_Box,PVP Teleport Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14528,1; },{},{}
-13570,Giant_Fly_Wing_Box50,Giant Fly Wing 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,50; },{},{}
-13571,Giant_Fly_Wing_Box100,Giant Fly Wing 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,100; },{},{}
-13572,Dex_Dish_Box30,Hwergelmir's Tonic 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,30; },{},{}
-13573,Dex_Dish_Box50,Hwergelmir's Tonic 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,50; },{},{}
-13574,Luk_Dish_Box30,Nine Tail Dish 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,30; },{},{}
-13575,Luk_Dish_Box50,Nine Tail Dish 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,50; },{},{}
-13576,Inc_Agi_10_Box30,Increase Agility Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,30; },{},{}
-13577,Inc_Agi_10_Box50,Increase Agility Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,50; },{},{}
-13578,Vit_Dish_Box30,Stew of Immortality 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,30; },{},{}
-13579,Vit_Dish_Box50,Stew of Immortality 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,50; },{},{}
-13580,Insurance_Package30,Life Insurrance 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,30; },{},{}
-13581,Insurance_Package50,Life Insurrance 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,50; },{},{}
-13582,Convex_Mirror_Box5,Convex Mirror 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,5; },{},{}
-13583,Convex_Mirror_Box30,Convex Mirror 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,30; },{},{}
-13584,Blessing10_Box30,Blessing Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,30; },{},{}
-13585,Blessing10_Box50,Blessing Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
-13586,Adrenaline10_Box30,Adrenaline Rush Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,30; },{},{}
-13587,Adrenaline10_Box50,Adrenaline Rush Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,50; },{},{}
-13588,Assumptio_5_Box30,Assumptio Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,30; },{},{}
-13589,Assumptio_5_Box50,Assumptio Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,50; },{},{}
-13590,Aspersio_5_Box30,Aspersio Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,30; },{},{}
-13591,Aspersio_5_Box50,Aspersio Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,50; },{},{}
-13592,Agi_Dish_Box30,Steamed Scorpion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,30; },{},{}
-13593,Agi_Dish_Box50,Steamed Scorpion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,50; },{},{}
-13594,Wind_Walk10_Box30,Wind Walk Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,30; },{},{}
-13595,Wind_Walk10_Box50,Wind Walk Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,50; },{},{}
-13596,Int_Dish_Box30,Dragon Breath Cocktail 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,30; },{},{}
-13597,Int_Dish_Box50,Dragon Breath Cocktail 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,50; },{},{}
-13598,Battle_Manual_Box1,Field Manual Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,1; },{},{}
-13599,Battle_Manual_Box5,Field Manual 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; },{},{}
-13600,Siegfried_Box5,Token of Siegfried 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,5; },{},{}
-13601,Siegfried_Box20,Token of Siegfried 20 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,20; },{},{}
-13602,Kafra_Card_Box30,Kafra Card 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,30; },{},{}
-13603,Kafra_Card_Box50,Kafra Card 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,50; },{},{}
-13604,Str_Dish_Box30,Steamed Tongue 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,30; },{},{}
-13605,Str_Dish_Box50,Steamed Tongue 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,50; },{},{}
-13606,Bubble_Gum_Box1,Bubble Gum Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,1; },{},{}
-13607,Bubble_Gum_Box5,Bubble Gum 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,5; },{},{}
-13608,Megaphone_Box1,Megaphone Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,1; },{},{}
-13609,Megaphone_Box5,Megaphone 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,5; },{},{}
-13610,Enriched_Elunium_Box5,Enriched Elunium 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,5; },{},{}
-13611,Enriched_Oridecon_Box5,Enriched Oridecon 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,5; },{},{}
-13612,Handcuff_Box,Arrest Handcuffs Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2706,1; },{},{}
-13613,Super_Pet_Egg_Box1,Super Pet Egg Box 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13617,1; },{},{}
-13614,Super_Pet_Egg_Box2,Super Pet Egg Box 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13618,1; },{},{}
-13615,Super_Pet_Egg_Box3,Super Pet Egg Box 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13619,1; },{},{}
-13616,Super_Pet_Egg_Box4,Super Pet Egg Box 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13620,1; },{},{}
+13569,PVP_Tele_Scroll_Box,PVP Teleport Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14528,10; },{},{}
+13570,Giant_Fly_Wing_Box50,Giant Fly Wing 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,50; },{},{}
+13571,Giant_Fly_Wing_Box100,Giant Fly Wing 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,100; },{},{}
+13572,Dex_Dish_Box30,Hwergelmir's Tonic 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,30; },{},{}
+13573,Dex_Dish_Box50,Hwergelmir's Tonic 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,50; },{},{}
+13574,Luk_Dish_Box30,Nine Tail Dish 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,30; },{},{}
+13575,Luk_Dish_Box50,Nine Tail Dish 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,50; },{},{}
+13576,Inc_Agi_10_Box30,Increase Agility Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,30; },{},{}
+13577,Inc_Agi_10_Box50,Increase Agility Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,50; },{},{}
+13578,Vit_Dish_Box30,Stew of Immortality 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,30; },{},{}
+13579,Vit_Dish_Box50,Stew of Immortality 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,50; },{},{}
+13580,Insurance_Package30,Life Insurrance 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,30; },{},{}
+13581,Insurance_Package50,Life Insurrance 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,50; },{},{}
+13582,Convex_Mirror_Box5,Convex Mirror 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,5; },{},{}
+13583,Convex_Mirror_Box30,Convex Mirror 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,30; },{},{}
+13584,Blessing10_Box30,Blessing Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,30; },{},{}
+13585,Blessing10_Box50,Blessing Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
+13586,Adrenaline10_Box30,Adrenaline Rush Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,30; },{},{}
+13587,Adrenaline10_Box50,Adrenaline Rush Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,50; },{},{}
+13588,Assumptio_5_Box30,Assumptio Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,30; },{},{}
+13589,Assumptio_5_Box50,Assumptio Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,50; },{},{}
+13590,Aspersio_5_Box30,Aspersio Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,30; },{},{}
+13591,Aspersio_5_Box50,Aspersio Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,50; },{},{}
+13592,Agi_Dish_Box30,Steamed Scorpion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,30; },{},{}
+13593,Agi_Dish_Box50,Steamed Scorpion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,50; },{},{}
+13594,Wind_Walk10_Box30,Wind Walk Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,30; },{},{}
+13595,Wind_Walk10_Box50,Wind Walk Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,50; },{},{}
+13596,Int_Dish_Box30,Dragon Breath Cocktail 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,30; },{},{}
+13597,Int_Dish_Box50,Dragon Breath Cocktail 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,50; },{},{}
+13598,Battle_Manual_Box1,Field Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,1; },{},{}
+13599,Battle_Manual_Box5,Field Manual 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; },{},{}
+13600,Siegfried_Box5,Token of Siegfried 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,5; },{},{}
+13601,Siegfried_Box20,Token of Siegfried 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,20; },{},{}
+13602,Kafra_Card_Box30,Kafra Card 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,30; },{},{}
+13603,Kafra_Card_Box50,Kafra Card 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,50; },{},{}
+13604,Str_Dish_Box30,Steamed Tongue 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,30; },{},{}
+13605,Str_Dish_Box50,Steamed Tongue 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,50; },{},{}
+13606,Bubble_Gum_Box1,Bubble Gum Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,1; },{},{}
+13607,Bubble_Gum_Box5,Bubble Gum 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,5; },{},{}
+13608,Megaphone_Box1,Megaphone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,1; },{},{}
+13609,Megaphone_Box5,Megaphone 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,5; },{},{}
+13610,Enriched_Elunium_Box5,Enriched Elunium 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,5; },{},{}
+13611,Enriched_Oridecon_Box5,Enriched Oridecon 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,5; },{},{}
+13612,Handcuff_Box,Arrest Handcuffs Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2706,1; },{},{}
+13613,Super_Pet_Egg_Box1,Super Pet Egg Box 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13617,1; },{},{}
+13614,Super_Pet_Egg_Box2,Super Pet Egg Box 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13618,1; },{},{}
+13615,Super_Pet_Egg_Box3,Super Pet Egg Box 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13619,1; },{},{}
+13616,Super_Pet_Egg_Box4,Super Pet Egg Box 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13620,1; },{},{}
13617,Super_Pet_Egg1,Super Pet Egg 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13618,Super_Pet_Egg2,Super Pet Egg 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13619,Super_Pet_Egg3,Super Pet Egg 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13620,Super_Pet_Egg4,Super Pet Egg 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13621,Greed_Box30,Greed Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,30; },{},{}
-13622,Greed_Box50,Greed Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,50; },{},{}
-13623,Greed_Box100,Greed Scroll 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,100; },{},{}
-13624,Flee_30_Scroll_Box,Evasion Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14530,10; },{},{}
-13625,Accuracy_30_Scroll_Box,Concentration Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14531,10; },{},{}
-13626,Super_Card_Pet_Egg_Box1,Super Card Pet Egg Box 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13630,1; },{},{}
-13627,Super_Card_Pet_Egg_Box2,Super Card Pet Egg Box 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13631,1; },{},{}
-13628,Super_Card_Pet_Egg_Box3,Super Card Pet Egg Box 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13632,1; },{},{}
-13629,Super_Card_Pet_Egg_Box4,Super Card Pet Egg Box 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13633,1; },{},{}
+13621,Greed_Box30,Greed Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,30; },{},{}
+13622,Greed_Box50,Greed Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,50; },{},{}
+13623,Greed_Box100,Greed Scroll 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14529,100; },{},{}
+13624,Flee_30_Scroll_Box,Evasion Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14530,1; },{},{}
+13625,Accuracy_30_Scroll_Box,Concentration Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14531,1; },{},{}
+13626,Super_Card_Pet_Egg_Box1,Super Card Pet Egg Box 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13630,1; },{},{}
+13627,Super_Card_Pet_Egg_Box2,Super Card Pet Egg Box 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13631,1; },{},{}
+13628,Super_Card_Pet_Egg_Box3,Super Card Pet Egg Box 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13632,1; },{},{}
+13629,Super_Card_Pet_Egg_Box4,Super Card Pet Egg Box 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13633,1; },{},{}
13630,Super_Card_Pet_Egg1,Super Card Pet Egg 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13631,Super_Card_Pet_Egg2,Super Card Pet Egg 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13632,Super_Card_Pet_Egg3,Super Card Pet Egg 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13633,Super_Card_Pet_Egg4,Super Card Pet Egg 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13634,Vigorgra_Package1,1 Hour Package Vol. 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-13635,Vigorgra_Package2,1 Hour Package Vol. 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-13636,Vigorgra_Package3,1 Hour Package Vol. 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12253,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-13637,Vigorgra_Package4,1 Hour Package Vol. 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-13638,Vigorgra_Package5,1 Hour Package Vol. 5,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12250,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-13639,Vigorgra_Package6,1 Hour Package Vol. 6,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12217,20; getitem 12211,1; getitem 7621,1; },{},{}
-13640,Vigorgra_Package7,2 Hour Package Vol. 1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-13641,Vigorgra_Package8,2 Hour Package Vol. 2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-13642,Vigorgra_Package9,2 Hour Package Vol. 3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12253,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-13643,Vigorgra_Package10,2 Hour Package Vol. 4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-13644,Vigorgra_Package11,2 Hour Package Vol. 5,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12250,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-13645,Vigorgra_Package12,2 Hour Package Vol. 6,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12217,40; getitem 12211,2; getitem 7621,2; },{},{}
-13646,Infiltrator_Box1,Refined Infiltrator Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
-13647,Muramasa_Box1,Refined Muramasa Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
-13648,Excalibur_Box1,Refined Excalibur Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
-13649,Combat_Knife_Box1,Refined Combat Knife Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
-13650,Counter_Dagger_Box1,Refined Dagger of Counter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
-13651,Kaiser_Knuckle_Box1,Refined Kaiser Knuckle Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
-13652,Pole_Axe_Box1,Refined Pole Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1419,604800; },{},{}
-13653,Mighty_Staff_Box1,Refined Mighty Staff Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
-13654,Right_Epsilon_Box1,Refined Light Epsilon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
-13655,Balistar_Box1,Refined Ballista Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
-13656,Diary_Of_Sage_Box1,Refined Sage's Diary Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
-13657,Asura_Box1,Refined Ashura Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
-13658,Apple_Of_Archer_Box1,Refined Apple of Archer Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
-13659,Bunny_Band_Box1,Refined Bunny Band Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
-13660,Sahkkat_Box1,Refined Sakkat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
-13661,Lord_Circlet_Box1,Refined Grand Circlet Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
-13662,Elven_Ears_Box1,Refined Elven Ears Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,1209600; },{},{}
-13663,Steel_Flower_Box1,Refined Romantic Flower Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
-13664,Critical_Ring_Box1,Refined Critical Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
-13665,Earring_Box1,Refined Earring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
-13666,Ring_Box1,Refined Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
-13667,Necklace_Box1,Refined Necklace Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
-13668,Glove_Box1,Refined Glove Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
-13669,Brooch_Box1,Refined Brooch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
-13670,Rosary_Box1,Refined Rosary Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
-13671,Safety_Ring_Box1,Refined Safety Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
-13672,Vesper_Core01_Box1,Refined Vesper Core 01 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
-13673,Vesper_Core02_Box1,Refined Vesper Core 02 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
-13674,Vesper_Core03_Box1,Refined Vesper Core 03 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
-13675,Vesper_Core04_Box1,Refined Vesper Core 04 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
-13676,Drooping_Kitty_Box1,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,1209600; },{},{}
-13677,Magestic_Goat_Box1,Refined Majestic Goat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,1209600; },{},{}
-13678,Deviruchi_Cap_Box1,Refined Deviruchi Hat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,1209600; },{},{}
-13679,Executioner_Box1,Refined Executioner Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1174,604800; },{},{}
-13680,Brood_Axe_Box1,Refined Bloody Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1373,604800; },{},{}
-13681,Tomahawk_Box1,Refined Tomahawk Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1374,604800; },{},{}
-13682,Bow_Of_Rudra_Box1,Refined Rudra Bow Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1729,604800; },{},{}
-13683,Cutlas_Box1,Refined Cutlus Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13402,604800; },{},{}
-13684,Solar_Sword_Box1,Refined Solar Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13403,604800; },{},{}
-13685,Sword_Breaker_Box1,Refined Swordbreaker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13024,604800; },{},{}
-13686,Mail_Breaker_Box1,Refined Mailbreaker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13025,604800; },{},{}
-13687,Moonlight_Sword_Box1,Refined Moonlight Dagger Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13026,604800; },{},{}
-13688,Spanner_Box1,Refined Wrench Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1534,604800; },{},{}
-13689,Bok_Choy_Box,Bok Choy Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7766,10; },{},{}
-13690,Chung_E_Cake_Box,Green Maiden Cake Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7767,10; },{},{}
-//13691,Freyja_Overcoat_Box,Freya's Clothes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2369,1; },{},{}
-//13692,Freyja_Boots_Box,Freya's Boots Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2428,1;},{},{}
-//13693,Freyja_Cape_Box,Freya's Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2533,1; },{},{}
-//13694,Freyja_Crown_Box,Freya's Crown Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5306,1; },{},{}
-13695,Battle_Manual25_Box,Field Manual 25% Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14532,25; },{},{}
-13696,Battle_Manual100_Box,Field Manual 100% Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14533,100; },{},{}
-13697,J_Blessing10_Box,Blessing Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
-13698,J_Inc_Agi10_Box,Increase Agility Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
-13699,J_Wind_Walk10_Box,Wind Walk Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
-13700,J_Adrenaline10_Box,Adrenaline Rush Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
+13634,Vigorgra_Package1,1 Hour Package Vol. 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+13635,Vigorgra_Package2,1 Hour Package Vol. 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+13636,Vigorgra_Package3,1 Hour Package Vol. 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12253,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+13637,Vigorgra_Package4,1 Hour Package Vol. 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+13638,Vigorgra_Package5,1 Hour Package Vol. 5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12250,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+13639,Vigorgra_Package6,1 Hour Package Vol. 6,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12217,20; getitem 12211,1; getitem 7621,1; },{},{}
+13640,Vigorgra_Package7,2 Hour Package Vol. 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+13641,Vigorgra_Package8,2 Hour Package Vol. 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+13642,Vigorgra_Package9,2 Hour Package Vol. 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12253,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+13643,Vigorgra_Package10,2 Hour Package Vol. 4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+13644,Vigorgra_Package11,2 Hour Package Vol. 5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12250,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+13645,Vigorgra_Package12,2 Hour Package Vol. 6,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12217,40; getitem 12211,2; getitem 7621,2; },{},{}
+13646,Infiltrator_Box1,Refined Infiltrator Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
+13647,Muramasa_Box1,Refined Muramasa Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
+13648,Excalibur_Box1,Refined Excalibur Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
+13649,Combat_Knife_Box1,Refined Combat Knife Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
+13650,Counter_Dagger_Box1,Refined Dagger of Counter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
+13651,Kaiser_Knuckle_Box1,Refined Kaiser Knuckle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
+13652,Pole_Axe_Box1,Refined Pole Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1419,604800; },{},{}
+13653,Mighty_Staff_Box1,Refined Mighty Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
+13654,Right_Epsilon_Box1,Refined Light Epsilon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
+13655,Balistar_Box1,Refined Ballista Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
+13656,Diary_Of_Sage_Box1,Refined Sage's Diary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
+13657,Asura_Box1,Refined Ashura Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
+13658,Apple_Of_Archer_Box1,Refined Apple of Archer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
+13659,Bunny_Band_Box1,Refined Bunny Band Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
+13660,Sahkkat_Box1,Refined Sakkat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
+13661,Lord_Circlet_Box1,Refined Grand Circlet Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
+13662,Elven_Ears_Box1,Refined Elven Ears Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,1209600; },{},{}
+13663,Steel_Flower_Box1,Refined Romantic Flower Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
+13664,Critical_Ring_Box1,Refined Critical Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
+13665,Earring_Box1,Refined Earring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
+13666,Ring_Box1,Refined Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
+13667,Necklace_Box1,Refined Necklace Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
+13668,Glove_Box1,Refined Glove Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
+13669,Brooch_Box1,Refined Brooch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
+13670,Rosary_Box1,Refined Rosary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
+13671,Safety_Ring_Box1,Refined Safety Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
+13672,Vesper_Core01_Box1,Refined Vesper Core 01 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
+13673,Vesper_Core02_Box1,Refined Vesper Core 02 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
+13674,Vesper_Core03_Box1,Refined Vesper Core 03 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
+13675,Vesper_Core04_Box1,Refined Vesper Core 04 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
+13676,Drooping_Kitty_Box1,Refined Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5279,1209600; },{},{}
+13677,Magestic_Goat_Box1,Refined Majestic Goat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5280,1209600; },{},{}
+13678,Deviruchi_Cap_Box1,Refined Deviruchi Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5281,1209600; },{},{}
+13679,Executioner_Box1,Refined Executioner Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1174,604800; },{},{}
+13680,Brood_Axe_Box1,Refined Bloody Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1373,604800; },{},{}
+13681,Tomahawk_Box1,Refined Tomahawk Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1374,604800; },{},{}
+13682,Bow_Of_Rudra_Box1,Refined Rudra Bow Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1729,604800; },{},{}
+13683,Cutlas_Box1,Refined Cutlus Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13402,604800; },{},{}
+13684,Solar_Sword_Box1,Refined Solar Sword Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13403,604800; },{},{}
+13685,Sword_Breaker_Box1,Refined Swordbreaker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13024,604800; },{},{}
+13686,Mail_Breaker_Box1,Refined Mailbreaker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13025,604800; },{},{}
+13687,Moonlight_Sword_Box1,Refined Moonlight Dagger Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13026,604800; },{},{}
+13688,Spanner_Box1,Refined Wrench Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1534,604800; },{},{}
+13689,Bok_Choy_Box,Bok Choy Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7766,100; },{},{}
+13690,Chung_E_Cake_Box,Green Maiden Cake Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7767,100; },{},{}
+//13691,Freyja_Overcoat_Box,Freya's Clothes Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2369,1,604800; },{},{}
+//13692,Freyja_Boots_Box,Freya's Boots Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2428,1,604800;},{},{}
+//13693,Freyja_Cape_Box,Freya's Manteau Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2533,1,604800; },{},{}
+//13694,Freyja_Crown_Box,Freya's Crown Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5306,1,604800; },{},{}
+13695,Battle_Manual25_Box,Field Manual 25% Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14532,10; },{},{}
+13696,Battle_Manual100_Box,Field Manual 100% Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14533,10; },{},{}
+13697,J_Blessing10_Box,Blessing Scroll 10 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
+13698,J_Inc_Agi10_Box,Increase Agility Scroll 10 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
+13699,J_Wind_Walk10_Box,Wind Walk Scroll 10 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
+13700,J_Adrenaline10_Box,Adrenaline Rush Scroll 10 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
13701,Pet_Egg_Scroll12,Pet Egg Scroll 12,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13702,Pet_Egg_Scroll13,Pet Egg Scroll 13,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13703,Pet_Egg_Scroll14,Pet Egg Scroll 14,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -5375,121 +5375,121 @@
13707,Super_Pet_Egg8,Super Pet Egg 8,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13708,Pet_Egg_Scroll_E,Pet Egg Scroll E,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13709,BRO_Package_1,BRO Package Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13710,Max_Weight_Up_Box,Gym Pass Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7776,1; },{},{}
-13711,Small_Life_Potion_Box,Small Life Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,10; },{},{}
-13712,Small_Life_Potion_Box30,Small Life Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,30; },{},{}
-13713,Small_Life_Potion_Box50,Small Life Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,50; },{},{}
-13714,Med_Life_Potion_Box,Medium Life Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,10; },{},{}
-13715,Med_Life_Potion_Box30,Medium Life Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,30; },{},{}
-13716,Med_Life_Potion_Box50,Medium Life Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,50; },{},{}
-13717,Abrasive_Box5,Abrasive 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,5; },{},{}
-13718,Abrasive_Box10,Abrasive 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,10; },{},{}
-13719,Regeneration_Box5,Regeneration Potion 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,5; },{},{}
-13720,Regeneration_Box10,Regeneration 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,10; },{},{}
-13721,Dun_Tele_Scroll_Box10,Dungeon Teleport Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,10; },{},{}
-13722,Pecopeco_Hairband_Box,Peco Peco Hairband Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5286,1; },{},{}
-13723,Red_Glasses_Box,Red Glasses Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5288,1; },{},{}
-13724,Whisper_Mask_Box,Whisper Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5294,1; },{},{}
-13725,Ramen_Hat_Box,Ramen Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5293,1; },{},{}
-13726,Gold_Box_,Golden Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7777,1; },{},{}
-13727,Silver_Box_,Silver Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7778,1; },{},{}
-13728,Gold_Key1_Box,Golden Key 1 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7779,1; },{},{}
-13729,Gold_Key5_Box,Golden Key 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7779,5; },{},{}
-13730,Silver_Key1_Box,Silver Key 1 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7780,1; },{},{}
-13731,Silver_Key5_Box,Silver Key 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7780,5; },{},{}
+13710,Max_Weight_Up_Box,Gym Pass Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7776,1; },{},{}
+13711,Small_Life_Potion_Box,Small Life Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,10; },{},{}
+13712,Small_Life_Potion_Box30,Small Life Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,30; },{},{}
+13713,Small_Life_Potion_Box50,Small Life Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,50; },{},{}
+13714,Med_Life_Potion_Box,Medium Life Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,10; },{},{}
+13715,Med_Life_Potion_Box30,Medium Life Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,30; },{},{}
+13716,Med_Life_Potion_Box50,Medium Life Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,50; },{},{}
+13717,Abrasive_Box5,Abrasive 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,5; },{},{}
+13718,Abrasive_Box10,Abrasive 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,10; },{},{}
+13719,Regeneration_Box5,Regeneration Potion 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,5; },{},{}
+13720,Regeneration_Box10,Regeneration 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,10; },{},{}
+13721,Dun_Tele_Scroll_Box10,Dungeon Teleport Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,10; },{},{}
+13722,Pecopeco_Hairband_Box,Peco Peco Hairband Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5286,1; },{},{}
+13723,Red_Glasses_Box,Red Glasses Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5288,1; },{},{}
+13724,Whisper_Mask_Box,Whisper Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5294,1; },{},{}
+13725,Ramen_Hat_Box,Ramen Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5293,1; },{},{}
+13726,Gold_Box_,Golden Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7777,1; },{},{}
+13727,Silver_Box_,Silver Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7778,1; },{},{}
+13728,Gold_Key1_Box,Golden Key 1 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7779,1; },{},{}
+13729,Gold_Key5_Box,Golden Key 5 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7779,5; },{},{}
+13730,Silver_Key1_Box,Silver Key 1 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7780,1; },{},{}
+13731,Silver_Key5_Box,Silver Key 5 Box,18,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7780,5; },{},{}
//
//
-13734,Pecopeco_Hairband_Box1,Peco Peco Hairband Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5286,1; },{},{}
-13735,Red_Glasses_Box1,Red Glasses Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5288,1; },{},{}
-13736,Whisper_Mask_Box1,Whisper Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5294,1; },{},{}
-13737,Ramen_Hat_Box1,Ramen Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5293,1; },{},{}
-13738,Glass_Of_Illusion_Box5,Glass of Illusion 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,5; },{},{}
-13739,Glass_Of_Illusion_Box10,Glass of Illusion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,10; },{},{}
-13740,Shadow_Armor_S_Box5,Shadow Armor Scroll 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,5; },{},{}
-13741,Shadow_Armor_S_Box10,Shadow Armor Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,10; },{},{}
-13742,Shadow_Armor_S_Box30,Shadow Armor Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,30; },{},{}
-13743,Holy_Armor_S_Box5,Holy Armor Scroll 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,5; },{},{}
-13744,Holy_Armor_S_Box10,Holy Armor Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,10; },{},{}
-13745,Holy_Armor_S_Box30,Holy Armor Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,30; },{},{}
-13746,S_Def_Potion_Box10,Small Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,10; },{},{}
-13747,S_Def_Potion_Box30,Small Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,30; },{},{}
-13748,S_Def_Potion_Box50,Small Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,50; },{},{}
-13749,B_Def_Potion_Box10,Big Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,10; },{},{}
-13750,B_Def_Potion_Box30,Big Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,30; },{},{}
-13751,B_Def_Potion_Box50,Big Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,50; },{},{}
-13752,S_Mdef_Potion_Box10,Small Magic Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,10; },{},{}
-13753,S_Mdef_Potion_Box30,Small Magic Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,30; },{},{}
-13754,S_Mdef_Potion_Box50,Small Magic Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,50; },{},{}
-13755,B_Mdef_Potion_Box10,Big Magic Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,10; },{},{}
-13756,B_Mdef_Potion_Box30,Big Magic Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,30; },{},{}
-13757,B_Mdef_Potion_Box50,Big Magic Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,50; },{},{}
-13758,Battle_Manual_X3_Box,Field Manual 300% Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14545,20; },{},{}
-13759,In_Blue_Herb_Box,Blue Herb Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 510,50; },{},{}
-13760,Honey_Box,Honey Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 518,100; },{},{}
-13761,Empty_Bottle_Box,Empty Bottle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 713,500; },{},{}
-13762,In_Royal_Jelly_Box,Royal Jelly Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 526,70; },{},{}
-13763,5_Anniversary_Coin_Box,Coin Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2709,1; },{},{}
-13764,Battle_Manual_Box_TW,Beginner's Field Manual 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7803,5; },{},{}
-13765,Certificate_TW_Box,Certificate Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7804,1; },{},{}
-13766,Nagan_Box,Refined Nagan Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,604800; },{},{}
-13767,Skewer_Box,Refined Brocca Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,604800; },{},{}
-13768,Survival_Rod_Box,Refined Survivor's Rod Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,604800; },{},{}
-13769,Quadrille_Box,Refined Quadrille Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,604800; },{},{}
-13770,Great_Axe_Box,Refined Great Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,604800; },{},{}
-13771,Bloody_Roar_Box,Refined Bloody Roar Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,604800; },{},{}
-13772,Hardback_Box,Refined Hardcover Book Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,604800; },{},{}
-13773,Fire_Brand_Box,Refined Fireblend Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,604800; },{},{}
-13774,Immaterial_Sword_Box,Refined Immaterial Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,604800; },{},{}
-13775,Unholy_Touch_Box,Refined Unholy Touch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,604800; },{},{}
-13776,Cloak_Of_Survival_Box,Refined Survivor's Manteau Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,1209600; },{},{}
-13777,Masquerade_Box,Refined Masquerade Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,1209600; },{},{}
-13778,Orc_Hero_Helm_Box,Refined Helmet of Orc Hero Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,1209600; },{},{}
-13779,Evil_Wing_Ears_Box,Refined Wing of Diablo Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,1209600; },{},{}
-13780,Dark_Blindfold_Box,Refined Dark Blinder Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,1209600; },{},{}
-13781,kRO_Drooping_Kitty_Box,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,1209600; },{},{}
-13782,Corsair_Box,Refined Corsair Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{}
-13783,Bloody_Iron_Ball_Box,Refined Bloodied Shackle Ball Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{}
-13784,Spiritual_Ring_Box,Refined Spiritual Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{}
-13785,Nagan_Box1,Refined Nagan Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,86400; },{},{}
-13786,Skewer_Box1,Refined Brocca Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,86400; },{},{}
-13787,Survival_Rod_Box1,Refined Survivor's Rod Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,86400; },{},{}
-13788,Quadrille_Box1,Refined Quadrille Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,86400; },{},{}
-13789,Great_Axe_Box1,Refined Great Axe Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,86400; },{},{}
-13790,Bloody_Roar_Box1,Refined Bloody Roar Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,86400; },{},{}
-13791,Hardback_Box1,Refined Hardcover Book Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,86400; },{},{}
-13792,Fire_Brand_Box1,Refined Fireblend Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,86400; },{},{}
-13793,Immaterial_Sword_Box1,Refined Immaterial Sword Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,86400; },{},{}
-13794,Unholy_Touch_Box1,Refined Unholy Touch Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,86400; },{},{}
-13795,Cloak_Of_Survival_Box1,Refined Survivor's Manteau Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,86400; },{},{}
-13796,Masquerade_Box1,Refined Masquerade Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,86400; },{},{}
-13797,Orc_Hero_Helm_Box1,Refined Helmet of Orc Hero Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,86400; },{},{}
-13798,Evil_Wing_Ears_Box1,Refined Wing of Diablo Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,86400; },{},{}
-13799,Dark_Blindfold_Box1,Refined Dark Blinder Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,86400; },{},{}
-13800,kRO_Drooping_Kitty_Box1,Refined Drooping Cat Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,86400; },{},{}
-13801,Corsair_Box1,Refined Corsair Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,86400; },{},{}
-13802,Bloody_Iron_Ball_Box1,Refined Bloodied Shackle Ball Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,86400; },{},{}
-13803,Spiritual_Ring_Box1,Refined Spiritual Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,86400; },{},{}
-13804,Fire_Cracker_Love_Box,I Love You Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14546,10; },{},{}
-13805,Fire_Cracker_Wday_Box,Whiteday Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14547,10; },{},{}
-13806,Fire_Cracker_Vday_Box,Valentine's Day Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14548,10; },{},{}
-13807,Fire_Cracker_Bday_Box,Birthday Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14549,10; },{},{}
-13808,Fire_Cracker_Xmas_Box,Xmas Firecracker Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14550,10; },{},{}
-13809,Blue_Gemstone_Box,Blue Gemstone Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 717,100; },{},{}
-13810,Blue_Potion_Box,Blue Potion Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 505,25; },{},{}
-13811,Food_Box_Lv1,Food Box Vol 1,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14551,1; getitem 14554,1; getitem 14557,1; getitem 14560,1; getitem 14563,1; getitem 14566,1; },{},{}
-13812,Food_Box_Lv2,Food Box Vol 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14552,1; getitem 14555,1; getitem 14558,1; getitem 14561,1; getitem 14564,1; getitem 14567,1; },{},{}
-13813,Food_Box_Lv3,Food Box Vol 3,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14553,1; getitem 14556,1; getitem 14559,1; getitem 14562,1; getitem 14565,1; getitem 14568,1; },{},{}
-13814,Indonesia_Box,Healing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13815,Knife_Goblin_Box,Knife Goblin Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14569,10; },{},{}
-13816,Flail_Goblin_Box,Flail Goblin Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14570,10; },{},{}
-13817,Hammer_Goblin_Box,Hammer Goblin Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14571,10; },{},{}
-13818,Red_Deleter_Box,Red Deleter Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14572,10; },{},{}
-13819,Diabolic_Box,Diabolic Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14573,10; },{},{}
-13820,Wanderer_Box,Wanderer Taming Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14574,10; },{},{}
-13821,Green_Apple_Box,Green Apple Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7821,10; },{},{}
-13822,Whole_Barbecue_Box,Barbeque Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7822,10; },{},{}
-13823,Meat_Veg_Skewer_Box,Meat Skewer Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7823,10; },{},{}
-13824,Spirit_Liquor_Box,Spirit Liquor Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7824,10; },{},{}
+13734,Pecopeco_Hairband_Box1,Peco Peco Hairband Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5286,1; },{},{}
+13735,Red_Glasses_Box1,Red Glasses Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5288,1; },{},{}
+13736,Whisper_Mask_Box1,Whisper Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5294,1; },{},{}
+13737,Ramen_Hat_Box1,Ramen Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5293,1; },{},{}
+13738,Glass_Of_Illusion_Box5,Glass of Illusion 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,5; },{},{}
+13739,Glass_Of_Illusion_Box10,Glass of Illusion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,10; },{},{}
+13740,Shadow_Armor_S_Box5,Shadow Armor Scroll 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,5; },{},{}
+13741,Shadow_Armor_S_Box10,Shadow Armor Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,10; },{},{}
+13742,Shadow_Armor_S_Box30,Shadow Armor Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,30; },{},{}
+13743,Holy_Armor_S_Box5,Holy Armor Scroll 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,5; },{},{}
+13744,Holy_Armor_S_Box10,Holy Armor Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,10; },{},{}
+13745,Holy_Armor_S_Box30,Holy Armor Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,30; },{},{}
+13746,S_Def_Potion_Box10,Small Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,10; },{},{}
+13747,S_Def_Potion_Box30,Small Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,30; },{},{}
+13748,S_Def_Potion_Box50,Small Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,50; },{},{}
+13749,B_Def_Potion_Box10,Big Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,10; },{},{}
+13750,B_Def_Potion_Box30,Big Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,30; },{},{}
+13751,B_Def_Potion_Box50,Big Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,50; },{},{}
+13752,S_Mdef_Potion_Box10,Small Magic Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,10; },{},{}
+13753,S_Mdef_Potion_Box30,Small Magic Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,30; },{},{}
+13754,S_Mdef_Potion_Box50,Small Magic Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,50; },{},{}
+13755,B_Mdef_Potion_Box10,Big Magic Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,10; },{},{}
+13756,B_Mdef_Potion_Box30,Big Magic Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,30; },{},{}
+13757,B_Mdef_Potion_Box50,Big Magic Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,50; },{},{}
+13758,Battle_Manual_X3_Box,Field Manual 300% Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14545,20; },{},{}
+13759,In_Blue_Herb_Box,Blue Herb Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 510,50; },{},{}
+13760,Honey_Box,Honey Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 518,100; },{},{}
+13761,Empty_Bottle_Box,Empty Bottle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 713,500; },{},{}
+13762,In_Royal_Jelly_Box,Royal Jelly Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 526,70; },{},{}
+13763,5_Anniversary_Coin_Box,Coin Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2709,1; },{},{}
+13764,Battle_Manual_Box_TW,Beginner's Field Manual 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7803,5; },{},{}
+13765,Certificate_TW_Box,Certificate Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7804,1; },{},{}
+13766,Nagan_Box,Refined Nagan Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,604800; },{},{}
+13767,Skewer_Box,Refined Brocca Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,604800; },{},{}
+13768,Survival_Rod_Box,Refined Survivor's Rod Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,604800; },{},{}
+13769,Quadrille_Box,Refined Quadrille Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,604800; },{},{}
+13770,Great_Axe_Box,Refined Great Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,604800; },{},{}
+13771,Bloody_Roar_Box,Refined Bloody Roar Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,604800; },{},{}
+13772,Hardback_Box,Refined Hardcover Book Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,604800; },{},{}
+13773,Fire_Brand_Box,Refined Fireblend Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,604800; },{},{}
+13774,Immaterial_Sword_Box,Refined Immaterial Sword Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,604800; },{},{}
+13775,Unholy_Touch_Box,Refined Unholy Touch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,604800; },{},{}
+13776,Cloak_Of_Survival_Box,Refined Survivor's Manteau Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,1209600; },{},{}
+13777,Masquerade_Box,Refined Masquerade Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,1209600; },{},{}
+13778,Orc_Hero_Helm_Box,Refined Helmet of Orc Hero Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,1209600; },{},{}
+13779,Evil_Wing_Ears_Box,Refined Wing of Diablo Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,1209600; },{},{}
+13780,Dark_Blindfold_Box,Refined Dark Blinder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,1209600; },{},{}
+13781,kRO_Drooping_Kitty_Box,Refined Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,1209600; },{},{}
+13782,Corsair_Box,Refined Corsair Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{}
+13783,Bloody_Iron_Ball_Box,Refined Bloodied Shackle Ball Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{}
+13784,Spiritual_Ring_Box,Refined Spiritual Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{}
+13785,Nagan_Box1,Refined Nagan Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,86400; },{},{}
+13786,Skewer_Box1,Refined Brocca Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,86400; },{},{}
+13787,Survival_Rod_Box1,Refined Survivor's Rod Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,86400; },{},{}
+13788,Quadrille_Box1,Refined Quadrille Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,86400; },{},{}
+13789,Great_Axe_Box1,Refined Great Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,86400; },{},{}
+13790,Bloody_Roar_Box1,Refined Bloody Roar Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,86400; },{},{}
+13791,Hardback_Box1,Refined Hardcover Book Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,86400; },{},{}
+13792,Fire_Brand_Box1,Refined Fireblend Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,86400; },{},{}
+13793,Immaterial_Sword_Box1,Refined Immaterial Sword Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,86400; },{},{}
+13794,Unholy_Touch_Box1,Refined Unholy Touch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,86400; },{},{}
+13795,Cloak_Of_Survival_Box1,Refined Survivor's Manteau Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,86400; },{},{}
+13796,Masquerade_Box1,Refined Masquerade Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,86400; },{},{}
+13797,Orc_Hero_Helm_Box1,Refined Helmet of Orc Hero Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,86400; },{},{}
+13798,Evil_Wing_Ears_Box1,Refined Wing of Diablo Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,86400; },{},{}
+13799,Dark_Blindfold_Box1,Refined Dark Blinder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,86400; },{},{}
+13800,kRO_Drooping_Kitty_Box1,Refined Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,86400; },{},{}
+13801,Corsair_Box1,Refined Corsair Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,86400; },{},{}
+13802,Bloody_Iron_Ball_Box1,Refined Bloodied Shackle Ball Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,86400; },{},{}
+13803,Spiritual_Ring_Box1,Refined Spiritual Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,86400; },{},{}
+13804,Fire_Cracker_Love_Box,I Love You Firecracker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14546,10; },{},{}
+13805,Fire_Cracker_Wday_Box,Whiteday Firecracker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14547,10; },{},{}
+13806,Fire_Cracker_Vday_Box,Valentine's Day Firecracker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14548,10; },{},{}
+13807,Fire_Cracker_Bday_Box,Birthday Firecracker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14549,10; },{},{}
+13808,Fire_Cracker_Xmas_Box,Xmas Firecracker Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14550,10; },{},{}
+13809,Blue_Gemstone_Box,Blue Gemstone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 717,100; },{},{}
+13810,Blue_Potion_Box,Blue Potion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11502,25; },{},{}
+13811,Food_Box_Lv1,Food Box Vol 1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14551,1; getitem 14554,1; getitem 14557,1; getitem 14560,1; getitem 14563,1; getitem 14566,1; },{},{}
+13812,Food_Box_Lv2,Food Box Vol 2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14552,1; getitem 14555,1; getitem 14558,1; getitem 14561,1; getitem 14564,1; getitem 14567,1; },{},{}
+13813,Food_Box_Lv3,Food Box Vol 3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14553,1; getitem 14556,1; getitem 14559,1; getitem 14562,1; getitem 14565,1; getitem 14568,1; },{},{}
+13814,Indonesia_Box,Healing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13815,Knife_Goblin_Box,Knife Goblin Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14569,10; },{},{}
+13816,Flail_Goblin_Box,Flail Goblin Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14570,10; },{},{}
+13817,Hammer_Goblin_Box,Hammer Goblin Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14571,10; },{},{}
+13818,Red_Deleter_Box,Red Deleter Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14572,10; },{},{}
+13819,Diabolic_Box,Diabolic Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14573,10; },{},{}
+13820,Wanderer_Box,Wanderer Taming Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14574,10; },{},{}
+13821,Green_Apple_Box,Green Apple Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7821,10; },{},{}
+13822,Whole_Barbecue_Box,Barbeque Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7822,10; },{},{}
+13823,Meat_Veg_Skewer_Box,Meat Skewer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7823,10; },{},{}
+13824,Spirit_Liquor_Box,Spirit Liquor Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7824,10; },{},{}
13825,Green_Box_,Old Green Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
13826,Power_Box1,Power Box 1,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 682,1; getitem 12123,1; getitem 12122,1; },{},{}
13827,Power_Box2,Power Box 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 683,1; getitem 12123,1; getitem 12122,1; },{},{}
@@ -5499,463 +5499,463 @@
13831,Stat_Boost2,Stat Boost 2,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,60000,5; sc_start SC_INCLUK,60000,5; sc_start SC_INCDEX,60000,5; },{},{}
13832,Stat_Boost3,Stat Boost 3,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCAGI,60000,5; sc_start SC_INCVIT,60000,5; sc_start SC_INCDEX,60000,5; },{},{}
13833,Stat_Boost4,Stat Boost 4,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCINT,60000,5; sc_start SC_INCVIT,60000,5; sc_start SC_INCDEX,60000,5; },{},{}
-13834,Dun_Tele_Scroll2_Box5,Dungeon Teleport Scroll II 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,5; },{},{}
-13835,Dun_Tele_Scroll2_Box10,Dungeon Teleport Scroll II 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,10; },{},{}
-13836,Mbl_Str_Dish_Box,Steamed Tongue Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,1; },{},{}
-13837,Mbl_Agi_Dish_Box,Steamed Desert Scorpions Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12251,1; },{},{}
-13838,Mbl_Int_Dish_Box,Dragon Breath Cocktail Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,1; },{},{}
-13839,Mbl_Dex_Dish_Box,Hwergelmir's Tonic Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12253,1; },{},{}
-13840,Mbl_Luk_Dish_Box,Cooked Nine Tail Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12254,1; },{},{}
-13841,Mbl_Vit_Dish_Box,Immortal Stew Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12255,1; },{},{}
-13842,Mbl_Kafra_Card_Box,Payment Statement for Kafra Employee Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12249,1; },{},{}
-13843,Mbl_Battle_Manual_Box,Field Manual Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14532,1; },{},{}
-13844,Heroic_Stone_Box,Heroic Stone Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7825,1; },{},{}
-13845,Mysterious_Travel_Sack1,Mystery Travel Sack A,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13846,Mysterious_Travel_Sack2,Mystery Travel Sack B,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13847,Mysterious_Travel_Sack3,Mystery Travel Sack C,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13848,Mysterious_Travel_Sack4,Mystery Travel Sack D,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13849,WOB_Box_Rune5,Yellow Butterfly Wing 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,5; },{},{}
-13850,WOB_Box_Rune10,Yellow Butterfly Wing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,10; },{},{}
-13851,WOB_Box_Schawaltz5,Green Butterfly Wing 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,5; },{},{}
-13852,WOB_Box_Schawaltz10,Green Butterfly Wing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,10; },{},{}
-13853,WOB_Box_Rachel5,Red Butterfly Wing 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,5; },{},{}
-13854,WOB_Box_Rachel10,Red Butterfly Wing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,10; },{},{}
-13855,WOB_Box_Local5,Blue Butterfly Wing 5 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,5; },{},{}
-13856,WOB_Box_Local10,Blue Butterfly Wing Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,10; },{},{}
-13857,Spark_Candy_Box5,Candy 5 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13858,Spark_Candy_Box10,Candy 10 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13859,Directive_A_Envelope,Directive Envelope A,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2734,1; },{},{}
-13860,Directive_B_Envelope,Directive Envelope B,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2735,1; },{},{}
-13861,Mini_Battle_Manual_Box,Small Field Manual Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13862,Trial_Box,Trial Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13863,Repair_Scroll_Box10,Repair Weapon Scroll 10 Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,10; },{},{}
-//13864,Hockey_Mask_Box,Hockey Mask Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5314,1; },{},{}
-//13865,Observer_Box,Observer Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5315,1; },{},{}
-13866,Flying_Angel_Box,Flying Angel Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5210,1; },{},{}
-13867,Neko_Mimi_Box,Neko Mimi Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5099,1; },{},{}
-13868,MFH_Box,Moonlight Flower Hat Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5214,1; },{},{}
-13869,Chick_Hat_Box,Baby Chick Hat Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5283,1; },{},{}
-13870,New_Style_Box,Beauty Gift Certificate Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7622,1; },{},{}
-13871,Magician_Card_Box,Mage Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4327,1; getitem 4309,1; getitem 4325,1; getitem 4208,1; getitem 4258,1; getitem 4191,1; },{},{}
-13872,Acolyte_Card_Box,Acolyte Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4185,1; getitem 4312,1; getitem 4217,1; getitem 4280,1; getitem 4293,1; },{},{}
-13873,Archer_Card_Box,Archer Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4297,1; getitem 4234,1; getitem 4199,1; getitem 4178,1; getitem 4252,1; },{},{}
-13874,Swordman_Card_Box,Swordman Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4319,1; getitem 4331,1; getitem 4220,1; getitem 4311,1; getitem 4246,1; },{},{}
-13875,Thief_Card_Box,Thief Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4230,1; getitem 4210,1; getitem 4257,1; getitem 4172,1; getitem 4272,1; },{},{}
-13876,Merchant_Card_Box,Merchant Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4206,1; getitem 4281,1; getitem 4186,1; getitem 4233,1; getitem 4321,1; },{},{}
-13877,Clock_Tower_Card_Box,Clock Tower Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4244,1; getitem 4299,1; getitem 4313,1; getitem 4229,1; },{},{}
-13878,Geffenia_Card_Box,Geffenia Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4218,1; getitem 4269,1; },{},{}
-13879,Owl_Card_Box,Owl Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4237,1; getitem 4238,1; },{},{}
-13880,Ghost_Card_Box,Ghost Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4193,1; getitem 4294,1; },{},{}
-13881,Nightmare_Card_Box,Nightmare Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4127,1; getitem 4166,1; },{},{}
-13882,Curse_Card_Box,Curse Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4076,4; },{},{}
-13883,Sleep_Card_Box,Sleep Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4024,4; },{},{}
-13884,Freeze_Card_Box,Freeze Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4055,4; },{},{}
-13885,Stun_Card_Box,Stun Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4017,4; },{},{}
-13886,Silence_Card_Box,Silence Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4057,4; },{},{}
-13887,Blind_Card_Box,Blind Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4020,4; },{},{}
-13888,Chaos_Card_Box,Chaos Card Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4104,4; },{},{}
-13889,Elunium_Box_,Elunium Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 985,10; },{},{}
-13890,Oridecon_Box_,Oridecon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,10; },{},{}
-13891,Fire_Converter_Box,Fire Converter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12114,10; },{},{}
-13892,Water_Converter_Box,Water Converter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12115,10; },{},{}
-13893,Wind_Converter_Box,Wind Converter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12117,10; },{},{}
-13894,Earth_Converter_Box,Earth Converter Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12116,10; },{},{}
-13895,Starter_Pack,Starter Pack,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13896,Mimic_Summon_Box5,Mimic Summoning 5 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13897,Disguise_Summon_Box5,Disguise Summoning 5 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13898,Alice_Summon_Box5,Alice Summoning 5 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13899,Mimic_Summon_Box10,Mimic Summoning 10 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13900,Disguise_Summon_Box10,Disguise Summoning 10 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13901,Alice_Summon_Box10,Alice Summoning 10 Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13902,Fish_Head_Hat_Box,Fish Head Hat Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5380,1; },{},{}
-13903,Santa_Poring_Hat_Box,Santa Poring Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5381,1; },{},{}
-13904,Bell_Ribbon_Box,Bell Ribbon Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5382,1; },{},{}
-13905,Hard_Core_Set_Box,XM Hardcore Set Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; getitem 12209,10; getitem 12210,10; },{},{}
-13906,Kitty_Set_Box,XM Kitty Set Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5230,1; getitem 5231,1; getitem 5232,1; getitem 5233,1; getitem 5234,1; },{},{}
-13907,Soft_Core_Set_Box,XM Softcore Set Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; getitem 12209,5; getitem 12210,5; },{},{}
-13908,Deviruchi_Set_Box,XM Deviruchi Set Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5227,1; getitem 5228,1; getitem 5229,1; },{},{}
-13909,MVP_Hunt_Box,MVP Hunting Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,1; getitem 12210,1; getitem 12221,1; getitem 12214,3; },{},{}
-13910,Brewing_Box,XM Brewing Set Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; getitem 12205,10; getitem 12206,10; },{},{}
+13834,Dun_Tele_Scroll2_Box5,Dungeon Teleport Scroll II 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,5; },{},{}
+13835,Dun_Tele_Scroll2_Box10,Dungeon Teleport Scroll II 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,10; },{},{}
+13836,Mbl_Str_Dish_Box,Steamed Tongue Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,1; },{},{}
+13837,Mbl_Agi_Dish_Box,Steamed Desert Scorpions Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12251,1; },{},{}
+13838,Mbl_Int_Dish_Box,Dragon Breath Cocktail Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,1; },{},{}
+13839,Mbl_Dex_Dish_Box,Hwergelmir's Tonic Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12253,1; },{},{}
+13840,Mbl_Luk_Dish_Box,Cooked Nine Tail Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12254,1; },{},{}
+13841,Mbl_Vit_Dish_Box,Immortal Stew Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12255,1; },{},{}
+13842,Mbl_Kafra_Card_Box,Payment Statement for Kafra Employee Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12249,1; },{},{}
+13843,Mbl_Battle_Manual_Box,Field Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14532,1; },{},{}
+13844,Heroic_Stone_Box,Heroic Stone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7825,1; },{},{}
+13845,Mysterious_Travel_Sack1,Mystery Travel Sack A,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13846,Mysterious_Travel_Sack2,Mystery Travel Sack B,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13847,Mysterious_Travel_Sack3,Mystery Travel Sack C,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13848,Mysterious_Travel_Sack4,Mystery Travel Sack D,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13849,WOB_Box_Rune5,Yellow Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,5; },{},{}
+13850,WOB_Box_Rune10,Yellow Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,10; },{},{}
+13851,WOB_Box_Schawaltz5,Green Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,5; },{},{}
+13852,WOB_Box_Schawaltz10,Green Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,10; },{},{}
+13853,WOB_Box_Rachel5,Red Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,5; },{},{}
+13854,WOB_Box_Rachel10,Red Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,10; },{},{}
+13855,WOB_Box_Local5,Blue Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,5; },{},{}
+13856,WOB_Box_Local10,Blue Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,10; },{},{}
+13857,Spark_Candy_Box5,Candy 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14586,5; },{},{}
+13858,Spark_Candy_Box10,Candy 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14586,10; },{},{}
+13859,Directive_A_Envelope,Directive Envelope A,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2734,1; },{},{}
+13860,Directive_B_Envelope,Directive Envelope B,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2735,1; },{},{}
+13861,Mini_Battle_Manual_Box,Small Field Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,4; },{},{}
+13862,Trial_Box,Trial Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,2; getitem 12215,15; getitem 12216,15; },{},{}
+13863,Repair_Scroll_Box10,Repair Weapon Scroll 10 Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,10; getitem 1002,10; getitem 998,10; getitem 756,10; getitem 999,10; },{},{}
+//13864,Hockey_Mask_Box,Hockey Mask Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5314,604800; },{},{}
+//13865,Observer_Box,Observer Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5315,604800; },{},{}
+13866,Flying_Angel_Box,Flying Angel Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5210,1; },{},{}
+13867,Neko_Mimi_Box,Neko Mimi Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5099,1; },{},{}
+13868,MFH_Box,Moonlight Flower Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5214,1; },{},{}
+13869,Chick_Hat_Box,Baby Chick Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5283,1; },{},{}
+13870,New_Style_Box,Beauty Gift Certificate Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7622,1; },{},{}
+13871,Magician_Card_Box,Mage Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4327,1; getitem 4309,1; getitem 4325,1; getitem 4208,1; getitem 4258,1; getitem 4191,1; },{},{}
+13872,Acolyte_Card_Box,Acolyte Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4185,1; getitem 4312,1; getitem 4217,1; getitem 4280,1; getitem 4293,1; },{},{}
+13873,Archer_Card_Box,Archer Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4297,1; getitem 4234,1; getitem 4199,1; getitem 4178,1; getitem 4252,1; },{},{}
+13874,Swordman_Card_Box,Swordman Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4319,1; getitem 4331,1; getitem 4220,1; getitem 4311,1; getitem 4246,1; },{},{}
+13875,Thief_Card_Box,Thief Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4230,1; getitem 4210,1; getitem 4257,1; getitem 4172,1; getitem 4272,1; },{},{}
+13876,Merchant_Card_Box,Merchant Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4206,1; getitem 4281,1; getitem 4186,1; getitem 4233,1; getitem 4321,1; },{},{}
+13877,Clock_Tower_Card_Box,Clock Tower Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4244,1; getitem 4299,1; getitem 4313,1; getitem 4229,1; },{},{}
+13878,Geffenia_Card_Box,Geffenia Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4218,1; getitem 4269,1; },{},{}
+13879,Owl_Card_Box,Owl Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4237,1; getitem 4238,1; },{},{}
+13880,Ghost_Card_Box,Ghost Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4193,1; getitem 4294,1; },{},{}
+13881,Nightmare_Card_Box,Nightmare Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4127,1; getitem 4166,1; },{},{}
+13882,Curse_Card_Box,Curse Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4076,4; },{},{}
+13883,Sleep_Card_Box,Sleep Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4024,4; },{},{}
+13884,Freeze_Card_Box,Freeze Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4055,4; },{},{}
+13885,Stun_Card_Box,Stun Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4017,4; },{},{}
+13886,Silence_Card_Box,Silence Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4057,4; },{},{}
+13887,Blind_Card_Box,Blind Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4020,4; },{},{}
+13888,Chaos_Card_Box,Chaos Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4104,4; },{},{}
+13889,Elunium_Box_,Elunium Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 985,10; },{},{}
+13890,Oridecon_Box_,Oridecon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,10; },{},{}
+13891,Fire_Converter_Box,Fire Converter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12114,10; },{},{}
+13892,Water_Converter_Box,Water Converter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12115,10; },{},{}
+13893,Wind_Converter_Box,Wind Converter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12117,10; },{},{}
+13894,Earth_Converter_Box,Earth Converter Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12116,10; },{},{}
+13895,Starter_Pack,Starter Pack,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7229,2; getitem 569,300; getitem 504,20; getitem 505,20; getitem 7060,30; getitem 2403,1; getitem 5039,1; getitem 2503,1; getitem 2307,1; getitem 616,1; getitem 603,1; getitem 617,1; getitem 610,5; getitem 604,5; },{},{}
+13896,Mimic_Scroll_Box5,Mimic Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,5; },{},{}
+13897,Disguise_Croll_Box5,Disguise Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,5; },{},{}
+13898,Alice_Scroll_Box5,Alice Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,5; },{},{}
+13899,Mimic_Scroll_Box10,Mimic Summoning 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,10; },{},{}
+13900,Disguise_Croll_Box10,Disguise Summoning 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,10; },{},{}
+13901,Alice_Scroll_Box10,Alice Summoning 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,10; },{},{}
+13902,Fish_Head_Hat_Box,Fish Head Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5380,1; },{},{}
+13903,Santa_Poring_Hat_Box,Santa Poring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5381,1; },{},{}
+13904,Bell_Ribbon_Box,Bell Ribbon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5382,1; },{},{}
+13905,Hard_Core_Set_Box,XM Hardcore Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; getitem 12209,10; getitem 12210,10; },{},{}
+13906,Kitty_Set_Box,XM Kitty Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5230,1; getitem 5231,1; getitem 5232,1; getitem 5233,1; getitem 5234,1; },{},{}
+13907,Soft_Core_Set_Box,XM Softcore Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; getitem 12209,5; getitem 12210,5; },{},{}
+13908,Deviruchi_Set_Box,XM Deviruchi Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5227,1; getitem 5228,1; getitem 5229,1; },{},{}
+13909,MVP_Hunt_Box,MVP Hunting Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,1; getitem 12210,1; getitem 12221,1; getitem 12214,3; },{},{}
+13910,Brewing_Box,XM Brewing Set Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; getitem 12205,10; getitem 12206,10; },{},{}
13911,Christmas_Pet_Scroll,Christmas Pet Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13912,Pty_Blessing_Box,Party Blessing 10 Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14588,10; },{},{}
-13913,Pty_Inc_Agi_Box,Party Increase Agi 10 Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14589,10; },{},{}
-13914,Pty_Assumptio_Box,Party Assumptio 5 Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14590,10; },{},{}
-13915,Love_Angel_Box,Love Angel Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12287,604800; },{},{}
-13916,Squirrel_Box,Squirrel Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12288,604800; },{},{}
-13917,Gogo_Box,Gogo Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12289,604800; },{},{}
-//13918,Drooping_W_Kitty_Box,Koneko Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5372,1; },{},{}
-//13919,L_Magestic_Goat_Box,Baphomet Horns Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5374,1; },{},{}
-//13920,Satanic_Chain_P_Box,Flying Evil Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5376,1; },{},{}
-//13921,Antique_Pipe_Box,Gentleman's Pipe Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5377,1; },{},{}
-//13922,Rabbit_Ear_Hat_Box,Bunny Top Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5378,1; },{},{}
-//13923,Darkness_Helm_Box,Dark Randgris Helm Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5373,1; },{},{}
-//13924,L_Orc_Hero_Helm_Box,Orc Hero Headdress Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5375,1; },{},{}
+13912,Pty_Blessing_Box,Party Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14588,10; },{},{}
+13913,Pty_Inc_Agi_Box,Party Increase Agi 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14589,10; },{},{}
+13914,Pty_Assumptio_Box,Party Assumptio 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14590,10; },{},{}
+13915,Love_Angel_Box,Love Angel Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12287,604800; },{},{}
+13916,Squirrel_Box,Squirrel Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12288,604800; },{},{}
+13917,Gogo_Box,Gogo Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12289,604800; },{},{}
+//13918,Drooping_W_Kitty_Box,Koneko Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5372,1; },{},{}
+//13919,L_Magestic_Goat_Box,Baphomet Horns Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5374,1; },{},{}
+//13920,Satanic_Chain_P_Box,Flying Evil Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5376,1; },{},{}
+//13921,Antique_Pipe_Box,Gentleman's Pipe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5377,1; },{},{}
+//13922,Rabbit_Ear_Hat_Box,Bunny Top Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5378,1; },{},{}
+//13923,Darkness_Helm_Box,Dark Randgris Helm Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5373,1; },{},{}
+//13924,L_Orc_Hero_Helm_Box,Orc Hero Headdress Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5375,1; },{},{}
//13925,Year_Of_Mouse_Scroll,... GoodLuck Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13926,Crusader_Card_Box,Crusader Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4371,1; getitem 4311,1; getitem 4319,1; getitem 4331,1; },{},{}
-13927,Alchemist_Card_Box,Alchemist Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4281,1; getitem 4233,1; getitem 4343,1; getitem 4186,1; getitem 4036,1; },{},{}
-13928,Rogue_Card_Box,Bard Dancer Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4039,1; getitem 4210,1; getitem 4257,1; getitem 4230,1; getitem 4348,1; },{},{}
-13929,Bard_Dancer_Card_Box,Rogue Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4297,1; getitem 4234,1; getitem 4178,1; getitem 4381,1; getitem 4252,1; },{},{}
-13930,Sage_Card_Box,Sage card box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4382,1; getitem 4258,1; getitem 4325,1; getitem 4208,1; getitem 4327,1; },{},{}
-13931,Monk_Card_Box,Monk Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4312,1; getitem 4332,1; getitem 4185,1; getitem 4293,1; },{},{}
-13932,Sylph_Box,Sylph Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4345,4; },{},{}
-13933,Undine_Box,Undine Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4350,4; },{},{}
-13934,Salamander_Box,Salamander Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4380,4; },{},{}
-13935,Soul_Box,Soul Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4388,4; },{},{}
-13936,Noum_Bpx,Gnome Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4335,4; },{},{}
-13937,Robo_Eye_Box,Robo Eye Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5325,1; },{},{}
-13938,Twin_Ribbon_Box,Maiden's Twin Ribbon Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5187,1; },{},{}
-//13939,Diadem_Box,Diadem Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5313,1; },{},{}
-13940,Siege_Tele_Scroll_Box,WoE Teleport Scroll 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14591,10; },{},{}
-13941,TW_Valentine_Scroll,Taiwan Valentine Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13942,Love_Angel_Box_1m,Love Angel Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14009,1; },{},{}
-13943,Squirrel_Box_1m,Squirrel Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14010,1; },{},{}
-13944,Gogo_Box_1m,Gogo Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14011,1; },{},{}
-13945,BRO_SM_Package,Brazil Swordsman Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2317,1; getitem 2106,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 2229,1; getitem 2266,1; },{},{}
-13946,BRO_MG_Package,Brazil Magician Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2322,1; getitem 2102,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4077,1; getitem 2607,2; getitem 5027,1; },{},{}
-13947,BRO_AC_Package,Brazil Acolyte Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2326,1; getitem 2104,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4100,1; getitem 2607,2; getitem 2217,1; },{},{}
-13948,BRO_AR_Package,Brazil Archer package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2317,1; getitem 1716,1; getitem 2406,1; getitem 2504,1; getitem 4064,1; getitem 4102,1; getitem 2607,2; getitem 2285,1; },{},{}
-13949,BRO_MC_Package,Brazil Merchant Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2315,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 5021,1; },{},{}
-13950,BRO_TF_Package,Brazil Thief Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2336,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4097,1; getitem 4102,1; getitem 2607,2; getitem 2274,1; },{},{}
-13951,Wasteland_Outlaw_Box,Western Outlaw Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13107,1; },{},{}
-13952,Lever_Action_Rifle_Box,Lever Action Rifle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13170,1; },{},{}
-13953,All_In_One_Ring_Box,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{}
-13954,Spiritual_Tunic_Box,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{}
-13955,Recuperative_Armor_Box,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{}
-13956,Shelter_Resistance_Box,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{}
-13957,Sylphid_Manteau_Box,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{}
-13958,Refresh_Shoes_Box,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{}
-13959,Toast_Box,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5391,604800; },{},{}
-13960,Name_Change_Coupon_Box,Identification Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13961,Mojji_Box,Mochi Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13962,Deprotai_Doll_Hat_Box,Defolty Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5340,1; },{},{}
-13963,Claris_Doll_Hat_Box,Glaris Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5341,1; },{},{}
-13964,Sorin_Doll_Hat_Box,Sorin Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5342,1; },{},{}
-13965,Tayelin_Doll_Hat_Box,Tailring Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5343,1; },{},{}
-13966,Binit_Doll_Hat_Box,Vinit Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5344,1; },{},{}
-13967,Debril_Doll_Hat_Box,W Doll Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5345,1; },{},{}
-//13968,Bubblegum_Lower_Box,Bubble Gum Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-//13969,Lucky_Clip_Box,Lucky Clip Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2742,1; },{},{}
-13970,Iron_10_Box,Iron Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 998,10; },{},{}
-13971,Steel_10_Box,Steel Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 999,10; },{},{}
-13972,Coal_10_Box,Coal Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1003,10; },{},{}
-13973,Poison_Bottle_30_Box,Poison Bottle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,30; },{},{}
+13926,Crusader_Card_Box,Crusader Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4371,1; getitem 4311,1; getitem 4319,1; getitem 4331,1; },{},{}
+13927,Alchemist_Card_Box,Alchemist Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4281,1; getitem 4233,1; getitem 4343,1; getitem 4186,1; getitem 4036,1; },{},{}
+13928,Rogue_Card_Box,Bard Dancer Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4039,1; getitem 4210,1; getitem 4257,1; getitem 4230,1; getitem 4348,1; },{},{}
+13929,Bard_Dancer_Card_Box,Rogue Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4297,1; getitem 4234,1; getitem 4178,1; getitem 4381,1; getitem 4252,1; },{},{}
+13930,Sage_Card_Box,Sage card box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4382,1; getitem 4258,1; getitem 4325,1; getitem 4208,1; getitem 4327,1; },{},{}
+13931,Monk_Card_Box,Monk Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4312,1; getitem 4332,1; getitem 4185,1; getitem 4293,1; },{},{}
+13932,Sylph_Box,Sylph Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4345,4; },{},{}
+13933,Undine_Box,Undine Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4350,4; },{},{}
+13934,Salamander_Box,Salamander Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4380,4; },{},{}
+13935,Soul_Box,Soul Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4388,4; },{},{}
+13936,Noum_Bpx,Gnome Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 4335,4; },{},{}
+13937,Robo_Eye_Box,Robo Eye Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5325,1; },{},{}
+13938,Twin_Ribbon_Box,Maiden's Twin Ribbon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5187,1; },{},{}
+//13939,Diadem_Box,Diadem Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5313,1; },{},{}
+13940,Siege_Tele_Scroll_Box,WoE Teleport Scroll 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14591,100; },{},{}
+13941,TW_Valentine_Scroll,Taiwan Valentine Scroll,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+13942,Love_Angel_Box_1m,Love Angel Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14009,1; },{},{}
+13943,Squirrel_Box_1m,Squirrel Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14010,1; },{},{}
+13944,Gogo_Box_1m,Gogo Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14011,1; },{},{}
+13945,BRO_SM_Package,Brazil Swordsman Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2317,1; getitem 2106,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 2229,1; getitem 2266,1; },{},{}
+13946,BRO_MG_Package,Brazil Magician Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2322,1; getitem 2102,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4077,1; getitem 2607,2; getitem 5027,1; },{},{}
+13947,BRO_AC_Package,Brazil Acolyte Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2326,1; getitem 2104,1; getitem 2104,1; getitem 2504,1; getitem 4003,1; getitem 4100,1; getitem 2607,2; getitem 2217,1; },{},{}
+13948,BRO_AR_Package,Brazil Archer package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2317,1; getitem 1716,1; getitem 2406,1; getitem 2504,1; getitem 4064,1; getitem 4102,1; getitem 2607,2; getitem 2285,1; },{},{}
+13949,BRO_MC_Package,Brazil Merchant Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2315,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4003,1; getitem 4133,1; getitem 2607,2; getitem 5021,1; },{},{}
+13950,BRO_TF_Package,Brazil Thief Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2336,1; getitem 2104,1; getitem 2406,1; getitem 2506,1; getitem 4097,1; getitem 4102,1; getitem 2607,2; getitem 2274,1; },{},{}
+13951,Wasteland_Outlaw_Box,Western Outlaw Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13107,604800; },{},{}
+13952,Lever_Action_Rifle_Box,Lever Action Rifle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13170,604800; },{},{}
+13953,All_In_One_Ring_Box,All In One Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{}
+13954,Spiritual_Tunic_Box,Spiritual Tunic Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{}
+13955,Recuperative_Armor_Box,Recuvative Armor Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{}
+13956,Shelter_Resistance_Box,Shell Of Resistance Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{}
+13957,Sylphid_Manteau_Box,Silf Manteau Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{}
+13958,Refresh_Shoes_Box,Refresh Shoes Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{}
+13959,Toast_Box,Crunch Toast Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5391,604800; },{},{}
+13960,Name_Change_Coupon_Box,Identification Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7623,1; },{},{}
+13961,Mojji_Box,Mochi Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 554,5; },{},{}
+13962,Deprotai_Doll_Hat_Box,Defolty Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5340,1; },{},{}
+13963,Claris_Doll_Hat_Box,Glaris Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5341,1; },{},{}
+13964,Sorin_Doll_Hat_Box,Sorin Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5342,1; },{},{}
+13965,Tayelin_Doll_Hat_Box,Tailring Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5343,1; },{},{}
+13966,Binit_Doll_Hat_Box,Vinit Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5344,1; },{},{}
+13967,Debril_Doll_Hat_Box,W Doll Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5345,1; },{},{}
+//13968,Bubblegum_Lower_Box,Bubble Gum Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5394,86400;},{},{}
+//13969,Lucky_Clip_Box,Lucky Clip Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2742,86400; },{},{}
+13970,Iron_10_Box,Iron Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 998,10; },{},{}
+13971,Steel_10_Box,Steel Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 999,10; },{},{}
+13972,Coal_10_Box,Coal Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1003,10; },{},{}
+13973,Poison_Bottle_30_Box,Poison Bottle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,30; },{},{}
13974,TW_Scroll01,Fisherman Scroll,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-13975,Picture_Diary_Box,Diary Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12304,604800; },{},{}
-13976,Mini_Heart_Box,Mini Heart Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12305,604800; },{},{}
-13977,Newcomer_Box,Freshman Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12306,604800; },{},{}
-13978,Kid_Box,Kid Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12307,604800; },{},{}
-13979,Magic_Castle_Box,Magic Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12308,604800; },{},{}
-13980,Bulging_Head_Box,JJangu Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12309,604800; },{},{}
-13981,Picture_Diary_Box_1m,Diary Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12304,1; },{},{}
-13982,Mini_Heart_Box_1m,Mini Heart Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12305,1; },{},{}
-13983,Newcomer_Box_1m,Freshman Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12306,1; },{},{}
-13984,Kid_Box_1m,Kid Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12307,1; },{},{}
-13985,Magic_Castle_Box_1m,Magic Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12308,1; },{},{}
-13986,Bulging_Head_Box_1m,JJangu Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12309,1; },{},{}
-13987,Ori_Stone_5_Box,Rough Oridecon 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 756,5; },{},{}
-13988,Ori_Stone_50_Box,Rough Oridecon 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 756,50; },{},{}
-13989,Acidbomb_10_Box,Acid Bomb 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7135,10; getitem 7136,10; },{},{}
-13990,Job_Manual50_Box,JOB Battle Manual Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14592,10; },{},{}
-13991,Tiger_Mask_Box,Tiger Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5098,1; },{},{}
-13992,Cat_Hat_Box,Pussy Cat Bell Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5051,1; },{},{}
-13993,Alice_Doll_Box,Alice Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5137,1; },{},{}
-13994,Speed_Up_Potion_Box5,Speed Potion 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12016,5; },{},{}
-13995,Speed_Up_Potion_Box10,Speed Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12016,10; },{},{}
-13996,Big_Bun_Box100,Big Bun 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,100; },{},{}
-13997,Big_Bun_Box500,Big Bun 500 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,500; },{},{}
-13998,Giant_Fly_Wing_Box500,Giant Fly Wing 500 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,500; },{},{}
-13999,Pill__Box100,Pill 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,100; },{},{}
-14000,Pill__Box500,Pill 500 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,500; },{},{}
-14001,Basic_Siege_Supply_Box,Recruit Siege Supply Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,25; getitem 11504,10; },{},{}
-14002,Adv_Siege_Supply_Box,Veteran Siege Supply Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,50; getitem 11504,20; },{},{}
-14003,Elite_Siege_Supply_Box,Elite Siege Supply Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,100; getitem 11504,50; },{},{}
-14004,Poison_Bottle_10_Box,Poison Bottle 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,10; },{},{}
-14005,Poison_Bottle_5_Box,Poison Bottle 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,5; },{},{}
-14006,F_Drooping_W_Kitty_Box,Evolved Drooping Cat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5219,1; },{},{}
-14007,F_Rabbit_Ear_Hat_Box,Evolved Rabbits Headband Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5218,1; },{},{}
-14008,F_L_Orc_Hero_Helm_Box,Evolved Helmet Of Orc Hero Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5224,1; },{},{}
-14009,F_Love_Angel_Box,Love Angel Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12287,604800; },{},{}
-14010,F_Squirrel_Box,Squillroll Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12288,604800; },{},{}
-14011,F_Gogo_Box,Gogo Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12289,604800; },{},{}
-14012,F_Love_Angel_Box_1m,Love Angel Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13915,1; },{},{}
-14013,F_Squirrel_Box_1m,Squillroll Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13916,1; },{},{}
-14014,F_Gogo_Box_1m,Gogo Magic Powder Box 30 Days,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13917,1; },{},{}
-14015,F_Wasteland_Outlaw_Box,Western Outlaw Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13107,1; },{},{}
-14016,F_Lever_Action_Rifle_Bo,Lever Action Rifle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 13170,1; },{},{}
-14017,F_All_In_One_Ring_Box,All In One Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{}
-14018,F_Spritual_Tunic_Box,Spiritual Tunic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{}
-14019,F_Recuperative_Box,Recuvative Armor Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{}
-14020,F_Shelter_Resist_Box,Shell Of Resistance Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{}
-14021,F_Sylphid_Manteau_Box,Silf Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{}
-14022,F_Refresh_Shoes_Box,Refresh Shoes Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{}
-14023,F_Toast_Box,Crunch Toast Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5107,604800; },{},{}
-14024,F_Robo_Eye_Box,Robo Eye Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5325,1; },{},{}
-14025,F_Twin_Ribbon_Box,Maiden's Twin Ribbon Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5187,1; },{},{}
-//14026,F_Diadem_Box,Diadem Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5313,1; },{},{}
-14027,F_Fish_Head_Hat_Box,Fish Head Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5380,1; },{},{}
-14028,F_Santa_Poring_Hat_Box,SantaPoring Cap Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5381,1; },{},{}
-14029,F_Bell_Ribbon_Box,Bell Ribbon Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5382,1; },{},{}
-14030,F_Mimic_Scroll_Box5,Mimic Summoning 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,5; },{},{}
-14031,F_Disguise_Scroll_Box5,Disguise Summoning 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,5; },{},{}
-14032,F_Alice_Scroll_Box5,Alice Summoning 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,5; },{},{}
-14033,F_Mimic_Scroll_Box10,Mimic Summoning 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,10; },{},{}
-14034,F_Disguise_Scroll_Box10,Disguise Summoning 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,10; },{},{}
-14035,F_Alice_Scroll_Box10,Alice Summoning 10 Box),2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,10; },{},{}
-14036,F_New_Style_Coupon_Box,New Style Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7622,1; },{},{}
-14037,F_Repair_Scroll_Box,Repair Weapon Scroll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,1; },{},{}
-14038,F_Repair_Scroll_Box10,Repair Weapon Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,10; },{},{}
-//14039,F_Hockey_Mask_Box,Hockey Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5314,1; },{},{}
-//14040,F_Observer_Box,Observer Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5315,1; },{},{}
-14041,F_WOB_Rune_Box5,Yellow Butterfly Wing 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,5; },{},{}
-14042,F_WOB_Rune_Box10,Yellow Butterfly Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,10; },{},{}
-14043,F_WOB_Schwaltz_Box5,Green Butterfly Wing 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,5; },{},{}
-14044,F_WOB_Schwaltz_Box10,Green Butterfly Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,10; },{},{}
-14045,F_WOB_Rachel_Box5,Red Butterfly Wing 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,5; },{},{}
-14046,F_WOB_Rachel_Box10,Red Butterfly Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,10; },{},{}
-14047,F_WOB_Local_Box5,Blue Butterfly Wing 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,5; },{},{}
-14048,F_WOB_Local_Box10,Blue Butterfly Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,10; },{},{}
-14049,F_Spark_Candy_Box5,Candy 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 529,5; },{},{}
-14050,F_Spark_Candy_Box10,Candy 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 529,10; },{},{}
-14051,F_Dun_Tel_Scroll2_Box5,Dungeon Teleport Scroll II 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,5; },{},{}
-14052,F_Dun_Tel_Scroll2_Box10,Dungeon Teleport Scroll II 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,10; },{},{}
-14053,F_Little_Angel_Doll_Box,Little Angel Doll Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5324,1; },{},{}
-14054,F_Triple_Poring_Hat_Box,Poring 3 Hats Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5255,1; },{},{}
-14055,F_Nagan_Box,Refined Nagan Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,604800; },{},{}
-14056,F_Skewer_Box,Refined Brocca Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,604800; },{},{}
-14057,F_Survival_Rod_Box,Refined Survivor's Rod Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,604800; },{},{}
-14058,F_Quadrille_Box,Refined Quadrille Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,604800; },{},{}
-14059,F_Great_Axe_Box,Refined Great Axe Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,604800; },{},{}
-14060,F_Bloody_Roar_Box,Refined Bloody Roar Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,604800; },{},{}
-14061,F_Hardback_Box,Refined Hardcover Book Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,604800; },{},{}
-14062,F_Fire_Brand_Box,Refined Fireblend Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,604800; },{},{}
-14063,F_Immaterial_Sword_Box,Refined Immaterial Sword Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,604800; },{},{}
-14064,F_Unholy_Touch_Box,Refined Unholy Touch Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,604800; },{},{}
-14065,F_Clack_Of_Servival_Box,Refined Survivor's Manteau Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,1209600; },{},{}
-14066,F_Masquerade_Box,Refined Masquerade Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,1209600; },{},{}
-14067,F_Orc_Hero_Helm_Box,Refined Helmet of Orc Hero Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,1209600; },{},{}
-14068,F_Ear_Of_Devil_Wing_Box,Refined Wing of Diablo Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,1209600; },{},{}
-14069,F_Dark_Blindfold_Box,Refined Dark Blinder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,1209600; },{},{}
-14070,F_K_Drooping_Kitty_Box,Refined Drooping Cat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,1209600; },{},{}
-14071,F_Corsair_Box,Refined Corsair Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{}
-14072,F_Bloody_Iron_Ball_Box,Refined Bloodied Shackle Ball Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{}
-14073,F_Spiritual_Ring_Box,Refined Spiritual Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{}
-14074,F_G_O_I_Box5,Wine Glass of Illusion 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,5; },{},{}
-14075,F_G_O_I_Box10,Glass Of Illusion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,10; },{},{}
-14076,F_Shadow_Armor_S_Box5,Scroll of Shadow Armor 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,5; },{},{}
-14077,F_Shadow_Armor_S_Box10,Scroll of Shadow Armor 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,10; },{},{}
-14078,F_Shadow_Armor_S_Box30,Scroll of Shadow Armor 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,30; },{},{}
-14079,F_Holy_Armor_S_Box5,Scroll of Holy Armor 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,5; },{},{}
-14080,F_Holy_Armor_S_Box10,Scroll of Holy Armor 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,10; },{},{}
-14081,F_Holy_Armor_S_Box30,Scroll of Holy Armor 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,30; },{},{}
-14082,FS_Def_Potion_Box10,Small Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,10; },{},{}
-14083,FS_Def_Potion_Box30,Small Physical Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,30; },{},{}
-14084,FS_Def_Potion_Box50,Small Physical Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,50; },{},{}
-14085,FB_Def_Potion_Box10,Big Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,10; },{},{}
-14086,FB_Def_Potion_Box30,Large Physical Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,30; },{},{}
-14087,FB_Def_Potion_Box50,Large Physical Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,50; },{},{}
-14088,FS_Mdef_Potion_Box10,Small Magic Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,10; },{},{}
-14089,FS_Mdef_Potion_Box30,Small Magical Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,30; },{},{}
-14090,FS_Mdef_Potion_Box50,Small Magical Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,50; },{},{}
-14091,FB_Mdef_Potion_Box10,Big Magic Defense Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,10; },{},{}
-14092,FB_Mdef_Potion_Box30,Large Magical Defense Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,30; },{},{}
-14093,FB_Mdef_Potion_Box50,Large Magical Defense Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,50; },{},{}
-14094,F_Flying_Angel_Box,Flying Angel Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5210,1; },{},{}
-14095,F_Cat_Hat_Box,Neko Mimi Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5099,1; },{},{}
-14096,F_M_F_H_Box,Moonlight Flower Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5214,1; },{},{}
-14097,F_Chick_Hat_Box,Baby Chick Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5283,1; },{},{}
-14098,F_Pecopeco_Hairband_Box,Peco Peco Hairband Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5286,1; },{},{}
-14099,F_Red_Glasses_Box,Red Glasses Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5288,1; },{},{}
-14100,F_Whisper_Mask_Box,Whisper Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5294,1; },{},{}
-14101,F_Ramen_Hat_Box,Ramen Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5293,1; },{},{}
-14102,F_Dun_Tele_Scroll1_Box,Dungeon Teleport Scroll 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,1; },{},{}
-14103,F_Max_Weight_Up_Box,Gym Membership Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7776,1; },{},{}
-14104,F_S_Life_Potion_Box,Small Life Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,10; },{},{}
-14105,F_S_Life_Potion_Box30,Small Life Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,30; },{},{}
-14106,F_S_Life_Potion_Box50,Small Life Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,50; },{},{}
-14107,F_M_Life_Potion_Box,Medium Life Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,10; },{},{}
-14108,F_M_Life_Potion_Box30,Large Life Potion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,30; },{},{}
-14109,F_M_Life_Potion_Box50,Large Life Potion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,50; },{},{}
-14110,F_Abrasive_Box5,Abrasive 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,5; },{},{}
-14111,F_Abrasive_Box10,Abrasive 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,10; },{},{}
-14112,F_Regeneration_Box5,Regeneration Potion 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,5; },{},{}
-14113,F_Regeneration_Box10,Regeneration Potion 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,10; },{},{}
-14114,F_Dun_Tele_Scroll_Box10,Dungeon Teleport Scroll 10 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,10; },{},{}
-14115,F_Infiltrator_Box,Refined Infiltrator Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
-14116,F_Muramasa_Box,Refined Muramasa Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
-14117,F_Excalibur_Box,Refined Excalibur Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
-14118,F_Combat_Knife_Box,Combat Knife Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
-14119,F_Counter_Dagger_Box,Counter Dagger Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
-14120,F_Kaiser_Knuckle_Box,Refined Kaiser Knuckle Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
-14121,F_Mighty_Staff_Box,Refined Mighty Staff Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
-14122,F_Right_Epsilon_Box,Light Epsilon Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
-14123,F_Balistar_Box,Refined Ballista Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
-14124,F_Diary_Of_Great_Sage,Sage's Diary Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
-14125,F_Asura_Box,Asura Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
-14126,F_Apple_Of_Archer_Box,Apple of Archer Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
-14127,F_Bunny_Band_Box,Bunny Band Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
-14128,F_Sahkkat_Box,Refined Sakkat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
-14129,F_Lord_Circlet_Box,Refined Grand Circlet Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
-14130,F_Elven_Ears_Box,Elven Ears Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,1209600; },{},{}
-14131,F_Steel_Flower_Box,Steel Flower Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
-14132,F_Critical_Ring_Box,Critical Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
-14133,F_Earring_Box,Earring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
-14134,F_Ring_Box,Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
-14135,F_Necklace_Box,Necklace Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
-14136,F_Glove_Box,Glove Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
-14137,F_Brooch_Box,Brooch Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
-14138,F_Rosary_Box,Rosary Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
-14139,F_Safety_Ring_Box,Safety Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
-14140,F_Vesper_Core_Box01,Refined Vesper Core 01 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
-14141,F_Vesper_Core_Box02,Refined Vesper Core 02 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
-14142,F_Vesper_Core_Box03,Refined Vesper Core 03 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
-14143,F_Vesper_Core_Box04,Refined Vesper Core 04 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
-14144,F_Vigorgra_Package1,Vigorgra Box1,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-14145,F_Vigorgra_Package2,Vigorgra Box2,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-14146,F_Vigorgra_Package3,Vigorgra Box3,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12253,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-14147,F_Vigorgra_Package4,Vigorgra Box4,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-14148,F_Vigorgra_Package5,Vigorgra Box5,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12250,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
-14149,F_Vigorgra_Package6,Vigorgra Box6,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12217,20; getitem 12211,1; getitem 7621,1; },{},{}
-14150,F_Vigorgra_Package7,Vigorgra Box7,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-14151,F_Vigorgra_Package8,Vigorgra Box8,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-14152,F_Vigorgra_Package9,Start your Journey Pack,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12253,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-14153,F_Vigorgra_Package10,Siege Mode Pack,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-14154,F_Vigorgra_Package11,1 Hour Survival Pack,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12250,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
-14155,F_Vigorgra_Package12,Weekend Hunting Pack,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12217,40; getitem 12211,2; getitem 7621,2; },{},{}
-14156,F_Battle_Manual_Box,Battle Manual Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; },{},{}
-14157,F_Insurance_Package,Insurance Package,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,10; },{},{}
-14158,F_Bubble_Gum_Box,Bubble Gum Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,10; },{},{}
-14159,F_Str_Dish_Box,Steamed Tongue Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,10; },{},{}
-14160,F_Agi_Dish_Box,Steamed Scorpion Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,10; },{},{}
-14161,F_Int_Dish_Box,Dragon Breath Cocktail Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; },{},{}
-14162,F_Dex_Dish_Box,Hwergelmir's Tonic Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,10; },{},{}
-14163,F_Luk_Dish_Box,Nine Tail Dish Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,10; },{},{}
-14164,F_Vit_Dish_Box,Stew Of Immortality Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,10; },{},{}
-14165,F_Kafra_Card_Box,Kafra Card Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,10; },{},{}
-14166,F_Giant_Fly_Wing_Box,Giant Fly Wing Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,10; },{},{}
-14167,F_Neuralizer_Box,Neuralizer Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12213,10; },{},{}
-14168,F_Convex_Mirror_Box,Convex Mirror Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,10; },{},{}
-14169,F_Blessing_10_Scroll_Bo,Blessing 10 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
-14170,F_Inc_Agi_10_Scroll_Box,Increase AGI 10 scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
-14171,F_Aspersio_5_Scroll_Box,Aspersio 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,10; },{},{}
-14172,F_Assumptio_5_Scroll_Bo,Assumptio 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,10; },{},{}
-14173,F_Wind_Walk_10_Scroll_B,Wind Walk 10 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
-14174,F_Adrenaline_Scroll_Box,Adrenaline 5 Scroll Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
-14175,F_Megaphone_Box,Megaphone 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,10; },{},{}
-14176,F_Enriched_Elunium_Box,Enriched Elunium Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,10; },{},{}
-14177,F_Enriched_Oridecon_Box,Enriched Oridecon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,10; },{},{}
-14178,F_Token_Of_Siegfried_Bo,Token of Siegfried Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,10; },{},{}
-14179,F_Giant_Fly_Wing_Box50,Giant Fly Wing 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,50; },{},{}
-14180,F_Giant_Fly_Wing_Box100,Giant Fly Wing 100 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,100; },{},{}
-14181,F_Dex_Dish_Box30,Hwergelmir's Tonic 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,30; },{},{}
-14182,F_Dex_Dish_Box50,Hwergelmir's Tonic 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,50; },{},{}
-14183,F_Luk_Dish_Box30,Nine Tail Dish 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,30; },{},{}
-14184,F_Luk_Dish_Box50,Nine Tail Dish 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,50; },{},{}
-14185,F_Inc_Agi_10_Box30,Increase Agility Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,30; },{},{}
-14186,F_Inc_Agi_10_Box50,Increase Agility Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,50; },{},{}
-14187,F_Vit_Dish_Box30,Stew of Immortality 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,30; },{},{}
-14188,F_Vit_Dish_Box50,Stew of Immortality 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,50; },{},{}
-14189,F_Insurance_Package30,Life Insurrance 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,30; },{},{}
-14190,F_Insurance_Package50,Life Insurrance 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,50; },{},{}
-14191,F_Convex_Mirror_Box5,Convex Mirror 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,5; },{},{}
-14192,F_Convex_Mirror_Box30,Convex Mirror 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,30; },{},{}
-14193,F_Blessing10_Box30,Blessing Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,30; },{},{}
-14194,F_Blessing10_Box50,Lv10 Blessing Scroll Box 50,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
-14195,F_Adrenaline10_Box30,Adrenaline Rush Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,30; },{},{}
-14196,F_Adrenaline10_Box50,Adrenaline Rush Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,50; },{},{}
-14197,F_Assumptio_5_Box30,Assumptio Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,30; },{},{}
-14198,F_Assumptio_5_Box50,Lv5 Assumptio Scroll Box 50,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,50; },{},{}
-14199,F_Aspersio_5_Box30,Aspersio Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,30; },{},{}
-14200,F_Aspersio_5_Box50,Aspersio Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,50; },{},{}
-14201,F_Agi_Dish_Box30,Steamed Scorpion 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,30; },{},{}
-14202,F_Agi_Dish_Box50,Steamed Scorpion 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,50; },{},{}
-14203,F_Wind_Walk10_Box30,Wind Walk Scroll 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,30; },{},{}
-14204,F_Wind_Walk10_Box50,Wind Walk Scroll 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,50; },{},{}
-14205,F_Int_Dish_Box30,Dragon Breath Cocktail 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,40; },{},{}
-14206,F_Int_Dish_Box50,Dragon Breath Cocktail 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,50; },{},{}
-14207,F_Battle_Manual_Box1,Field Manual Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,1; },{},{}
-14208,F_Battle_Manual_Box5,Battle Manual 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; },{},{}
-14209,F_Siegfried_Box5,Token of Siegfried 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,5; },{},{}
-14210,F_Siegfried_Box20,Token of Siegfried 20 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,20; },{},{}
-14211,F_Kafra_Card_Box30,Kafra Card 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,20; },{},{}
-14212,F_Kafra_Card_Box50,Kafra Card 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,50; },{},{}
-14213,F_Str_Dish_Box30,Steamed Tongue 30 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,30; },{},{}
-14214,F_Str_Dish_Box50,Steamed Tongue 50 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,50; },{},{}
-14215,F_Bubble_Gum_Box1,Bubble Gum Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,1; },{},{}
-14216,F_Bubble_Gum_Box5,Bubble Gum 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,5; },{},{}
-14217,F_Megaphone_Box1,Megaphone Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,1; },{},{}
-14218,F_Megaphone_Box5,Megaphone 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,5; },{},{}
-14219,F_Enriched_Elunium_Box5,Enriched Elunium 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,5; },{},{}
-14220,FEnriched_Oridecon_Box5,Enriched Oridecon 5 Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,5; },{},{}
-14221,MP_Scroll_Box,Mystical Amplification Scroll 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,10; },{},{}
-14222,MP_Scroll_Box30,Mystical Amplification Scroll 30 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,30; },{},{}
-14223,MP_Scroll_Box50,Mystical Amplification Scroll 50 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,50; },{},{}
-14224,Quagmire_Scroll_Box,Quagmire Scroll 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,10; },{},{}
-14225,Quagmire_Scroll_Box30,Quagmire Scroll 30 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,30; },{},{}
-14226,Quagmire_Scroll_Box50,Quagmire Scroll 50 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,50; },{},{}
-14227,Healing_Staff_Box,Healing Staff Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1638,1; },{},{}
-//14228,Praxinus_Box,Praccsinos Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2752,1; },{},{}
+13975,Picture_Diary_Box,Diary Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12304,604800; },{},{}
+13976,Mini_Heart_Box,Mini Heart Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12305,604800; },{},{}
+13977,Newcomer_Box,Freshman Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12306,604800; },{},{}
+13978,Kid_Box,Kid Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12307,604800; },{},{}
+13979,Magic_Castle_Box,Magic Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12308,604800; },{},{}
+13980,Bulging_Head_Box,JJangu Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12309,604800; },{},{}
+13981,Picture_Diary_Box_1m,Diary Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12304,2592000; },{},{}
+13982,Mini_Heart_Box_1m,Mini Heart Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12305,2592000; },{},{}
+13983,Newcomer_Box_1m,Freshman Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12306,2592000; },{},{}
+13984,Kid_Box_1m,Kid Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12307,2592000; },{},{}
+13985,Magic_Castle_Box_1m,Magic Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12308,2592000; },{},{}
+13986,Bulging_Head_Box_1m,JJangu Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12309,2592000; },{},{}
+13987,Ori_Stone_5_Box,Rough Oridecon 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 756,5; },{},{}
+13988,Ori_Stone_50_Box,Rough Oridecon 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 756,50; },{},{}
+13989,Acidbomb_10_Box,Acid Bomb 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7135,10; getitem 7136,10; },{},{}
+13990,Job_Manual50_Box,JOB Battle Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14592,10; },{},{}
+13991,Tiger_Mask_Box,Tiger Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5098,1; },{},{}
+13992,Cat_Hat_Box,Pussy Cat Bell Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5099,1; },{},{}
+13993,Alice_Doll_Box,Alice Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5137,1; },{},{}
+13994,Speed_Up_Potion_Box5,Speed Potion 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12016,5; },{},{}
+13995,Speed_Up_Potion_Box10,Speed Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12016,10; },{},{}
+13996,Big_Bun_Box100,Big Bun 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,100; },{},{}
+13997,Big_Bun_Box500,Big Bun 500 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14522,500; },{},{}
+13998,Giant_Flywing_Box500,Giant Fly Wing 500 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,500; },{},{}
+13999,Pill_Box100,Pill 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,100; },{},{}
+14000,Pill_Box500,Pill 500 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14523,500; },{},{}
+14001,Basic_Siege_Supply_Box,Recruit Siege Supply Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,25; getitem 11504,10; },{},{}
+14002,Adv_Siege_Supply_Box,Veteran Siege Supply Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,50; getitem 11504,20; },{},{}
+14003,Elite_Siege_Supply_Box,Elite Siege Supply Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 11503,100; getitem 11504,50; },{},{}
+14004,Poison_Bottle_10_Box,Poison Bottle 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,10; },{},{}
+14005,Poison_Bottle_5_Box,Poison Bottle 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 678,5; },{},{}
+14006,F_Drooping_W_Kitty_Box,Evolved Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5372,1; },{},{}
+14007,F_Rabbit_Ear_Hat_Box,Evolved Rabbits Headband Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5378,1; },{},{}
+14008,F_L_Orc_Hero_Helm_Box,Evolved Helmet Of Orc Hero Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5375,1; },{},{}
+14009,F_Love_Angel_Box,Love Angel Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12287,604800; },{},{}
+14010,F_Squirrel_Box,Squillroll Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12288,604800; },{},{}
+14011,F_Gogo_Box,Gogo Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12289,604800; },{},{}
+14012,F_Love_Angel_Box_1m,Love Angel Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13915,2592000; },{},{}
+14013,F_Squirrel_Box_1m,Squillroll Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13916,2592000; },{},{}
+14014,F_Gogo_Box_1m,Gogo Magic Powder Box 30 Days,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13917,2592000; },{},{}
+14015,F_Wasteland_Outlaw_Box,Western Outlaw Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13107,604800; },{},{}
+14016,F_Lever_Action_Rifle_Bo,Lever Action Rifle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13170,604800; },{},{}
+14017,F_All_In_One_Ring_Box,All In One Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2741,604800; },{},{}
+14018,F_Spritual_Tunic_Box,Spiritual Tunic Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2384,604800; },{},{}
+14019,F_Recuperative_Box,Recuvative Armor Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2385,604800; },{},{}
+14020,F_Shelter_Resist_Box,Shell Of Resistance Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2132,604800; },{},{}
+14021,F_Sylphid_Manteau_Box,Silf Manteau Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2543,604800; },{},{}
+14022,F_Refresh_Shoes_Box,Refresh Shoes Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2439,604800; },{},{}
+14023,F_Toast_Box,Crunch Toast Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5107,604800; },{},{}
+14024,F_Robo_Eye_Box,Robo Eye Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5325,1; },{},{}
+14025,F_Twin_Ribbon_Box,Maiden's Twin Ribbon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5187,1; },{},{}
+//14026,F_Diadem_Box,Diadem Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5313,1; },{},{}
+14027,F_Fish_Head_Hat_Box,Fish Head Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5380,1; },{},{}
+14028,F_Santa_Poring_Hat_Box,SantaPoring Cap Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5381,1; },{},{}
+14029,F_Bell_Ribbon_Box,Bell Ribbon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5382,1; },{},{}
+14030,F_Mimic_Scroll_Box5,Mimic Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,5; },{},{}
+14031,F_Disguise_Scroll_Box5,Disguise Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,5; },{},{}
+14032,F_Alice_Scroll_Box5,Alice Summoning 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,5; },{},{}
+14033,F_Mimic_Scroll_Box10,Mimic Summoning 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12276,10; },{},{}
+14034,F_Disguise_Scroll_Box10,Disguise Summoning 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12277,10; },{},{}
+14035,F_Alice_Scroll_Box10,Alice Summoning 10 Box),18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12278,10; },{},{}
+14036,F_New_Style_Coupon_Box,New Style Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7622,1; },{},{}
+14037,F_Repair_Scroll_Box,Repair Weapon Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,5; getitem 1002,5; getitem 998,5; getitem 756,5; getitem 999,5; },{},{}
+14038,F_Repair_Scroll_Box10,Repair Weapon Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14521,10; getitem 1002,10; getitem 998,10; getitem 756,10; getitem 999,10; },{},{}
+//14039,F_Hockey_Mask_Box,Hockey Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5314,604800; },{},{}
+//14040,F_Observer_Box,Observer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5315,604800; },{},{}
+14041,F_WOB_Rune_Box5,Yellow Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,5; },{},{}
+14042,F_WOB_Rune_Box10,Yellow Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14582,10; },{},{}
+14043,F_WOB_Schwaltz_Box5,Green Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,5; },{},{}
+14044,F_WOB_Schwaltz_Box10,Green Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14583,10; },{},{}
+14045,F_WOB_Rachel_Box5,Red Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,5; },{},{}
+14046,F_WOB_Rachel_Box10,Red Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14584,10; },{},{}
+14047,F_WOB_Local_Box5,Blue Butterfly Wing 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,5; },{},{}
+14048,F_WOB_Local_Box10,Blue Butterfly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14585,10; },{},{}
+14049,F_Spark_Candy_Box5,Candy 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14586,5; },{},{}
+14050,F_Spark_Candy_Box10,Candy 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14586,10; },{},{}
+14051,F_Dun_Tel_Scroll2_Box5,Dungeon Teleport Scroll II 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,5; },{},{}
+14052,F_Dun_Tel_Scroll2_Box10,Dungeon Teleport Scroll II 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14581,10; },{},{}
+14053,F_Little_Angel_Doll_Box,Little Angel Doll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5324,1; },{},{}
+14054,F_Triple_Poring_Hat_Box,Poring 3 Hats Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5255,1; },{},{}
+14055,F_Nagan_Box,Refined Nagan Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13407,604800; },{},{}
+14056,F_Skewer_Box,Refined Brocca Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1424,604800; },{},{}
+14057,F_Survival_Rod_Box,Refined Survivor's Rod Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1628,604800; },{},{}
+14058,F_Quadrille_Box,Refined Quadrille Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1537,604800; },{},{}
+14059,F_Great_Axe_Box,Refined Great Axe Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1378,604800; },{},{}
+14060,F_Bloody_Roar_Box,Refined Bloody Roar Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1273,604800; },{},{}
+14061,F_Hardback_Box,Refined Hardcover Book Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1567,604800; },{},{}
+14062,F_Fire_Brand_Box,Refined Fireblend Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13408,604800; },{},{}
+14063,F_Immaterial_Sword_Box,Refined Immaterial Sword Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13409,604800; },{},{}
+14064,F_Unholy_Touch_Box,Refined Unholy Touch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1274,604800; },{},{}
+14065,F_Clack_Of_Servival_Box,Refined Survivor's Manteau Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2535,1209600; },{},{}
+14066,F_Masquerade_Box,Refined Masquerade Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5326,1209600; },{},{}
+14067,F_Orc_Hero_Helm_Box,Refined Helmet of Orc Hero Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5327,1209600; },{},{}
+14068,F_Ear_Of_Devil_Wing_Box,Refined Wing of Diablo Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5328,1209600; },{},{}
+14069,F_Dark_Blindfold_Box,Refined Dark Blinder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5329,1209600; },{},{}
+14070,F_K_Drooping_Kitty_Box,Refined Drooping Cat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5330,1209600; },{},{}
+14071,F_Corsair_Box,Refined Corsair Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5331,1209600; },{},{}
+14072,F_Bloody_Iron_Ball_Box,Refined Bloodied Shackle Ball Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2710,604800; },{},{}
+14073,F_Spiritual_Ring_Box,Refined Spiritual Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2711,604800; },{},{}
+14074,F_G_O_I_Box5,Wine Glass of Illusion 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,5; },{},{}
+14075,F_G_O_I_Box10,Glass Of Illusion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14538,10; },{},{}
+14076,F_Shadow_Armor_S_Box5,Scroll of Shadow Armor 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,5; },{},{}
+14077,F_Shadow_Armor_S_Box10,Scroll of Shadow Armor 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,10; },{},{}
+14078,F_Shadow_Armor_S_Box30,Scroll of Shadow Armor 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14539,30; },{},{}
+14079,F_Holy_Armor_S_Box5,Scroll of Holy Armor 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,5; },{},{}
+14080,F_Holy_Armor_S_Box10,Scroll of Holy Armor 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,10; },{},{}
+14081,F_Holy_Armor_S_Box30,Scroll of Holy Armor 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14540,30; },{},{}
+14082,FS_Def_Potion_Box10,Small Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,10; },{},{}
+14083,FS_Def_Potion_Box30,Small Physical Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,30; },{},{}
+14084,FS_Def_Potion_Box50,Small Physical Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14541,50; },{},{}
+14085,FB_Def_Potion_Box10,Big Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,10; },{},{}
+14086,FB_Def_Potion_Box30,Large Physical Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,30; },{},{}
+14087,FB_Def_Potion_Box50,Large Physical Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14542,50; },{},{}
+14088,FS_Mdef_Potion_Box10,Small Magic Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,10; },{},{}
+14089,FS_Mdef_Potion_Box30,Small Magical Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,30; },{},{}
+14090,FS_Mdef_Potion_Box50,Small Magical Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14543,50; },{},{}
+14091,FB_Mdef_Potion_Box10,Big Magic Defense Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,10; },{},{}
+14092,FB_Mdef_Potion_Box30,Large Magical Defense Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,30; },{},{}
+14093,FB_Mdef_Potion_Box50,Large Magical Defense Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14544,50; },{},{}
+14094,F_Flying_Angel_Box,Flying Angel Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5210,1; },{},{}
+14095,F_Cat_Hat_Box,Neko Mimi Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5099,1; },{},{}
+14096,F_M_F_H_Box,Moonlight Flower Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5214,1; },{},{}
+14097,F_Chick_Hat_Box,Baby Chick Hat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5283,1; },{},{}
+14098,F_Pecopeco_Hairband_Box,Peco Peco Hairband Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5286,1209600; },{},{}
+14099,F_Red_Glasses_Box,Red Glasses Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5288,1209600; },{},{}
+14100,F_Whisper_Mask_Box,Whisper Mask Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5294,1209600; },{},{}
+14101,F_Ramen_Hat_Box,Ramen Hat Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5293,1209600; },{},{}
+14102,F_Dun_Tele_Scroll1_Box,Dungeon Teleport Scroll 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,5; },{},{}
+14103,F_Max_Weight_Up_Box,Gym Membership Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7776,1; },{},{}
+14104,F_S_Life_Potion_Box,Small Life Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,10; },{},{}
+14105,F_S_Life_Potion_Box30,Small Life Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,30; },{},{}
+14106,F_S_Life_Potion_Box50,Small Life Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14534,50; },{},{}
+14107,F_M_Life_Potion_Box,Medium Life Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,10; },{},{}
+14108,F_M_Life_Potion_Box30,Large Life Potion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,30; },{},{}
+14109,F_M_Life_Potion_Box50,Large Life Potion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14535,50; },{},{}
+14110,F_Abrasive_Box5,Abrasive 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,5; },{},{}
+14111,F_Abrasive_Box10,Abrasive 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14536,10; },{},{}
+14112,F_Regeneration_Box5,Regeneration Potion 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,5; },{},{}
+14113,F_Regeneration_Box10,Regeneration Potion 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14537,10; },{},{}
+14114,F_Dun_Tele_Scroll_Box10,Dungeon Teleport Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14527,10; },{},{}
+14115,F_Infiltrator_Box,Refined Infiltrator Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1267,604800; },{},{}
+14116,F_Muramasa_Box,Refined Muramasa Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1173,604800; },{},{}
+14117,F_Excalibur_Box,Refined Excalibur Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13401,604800; },{},{}
+14118,F_Combat_Knife_Box,Combat Knife Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13021,604800; },{},{}
+14119,F_Counter_Dagger_Box,Counter Dagger Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13022,604800; },{},{}
+14120,F_Kaiser_Knuckle_Box,Refined Kaiser Knuckle Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1817,604800; },{},{}
+14121,F_Mighty_Staff_Box,Refined Mighty Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1623,604800; },{},{}
+14122,F_Right_Epsilon_Box,Light Epsilon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1372,604800; },{},{}
+14123,F_Balistar_Box,Refined Ballista Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1728,604800; },{},{}
+14124,F_Diary_Of_Great_Sage,Sage's Diary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1563,604800; },{},{}
+14125,F_Asura_Box,Asura Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 13023,604800; },{},{}
+14126,F_Apple_Of_Archer_Box,Apple of Archer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5265,1209600; },{},{}
+14127,F_Bunny_Band_Box,Bunny Band Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5266,1209600; },{},{}
+14128,F_Sahkkat_Box,Refined Sakkat Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5267,1209600; },{},{}
+14129,F_Lord_Circlet_Box,Refined Grand Circlet Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5268,1209600; },{},{}
+14130,F_Elven_Ears_Box,Elven Ears Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2686,1209600; },{},{}
+14131,F_Steel_Flower_Box,Steel Flower Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2687,1209600; },{},{}
+14132,F_Critical_Ring_Box,Critical Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2688,604800; },{},{}
+14133,F_Earring_Box,Earring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2689,604800; },{},{}
+14134,F_Ring_Box,Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2690,604800; },{},{}
+14135,F_Necklace_Box,Necklace Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2691,604800; },{},{}
+14136,F_Glove_Box,Glove Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2692,604800; },{},{}
+14137,F_Brooch_Box,Brooch Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2693,604800; },{},{}
+14138,F_Rosary_Box,Rosary Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2694,604800; },{},{}
+14139,F_Safety_Ring_Box,Safety Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2695,604800; },{},{}
+14140,F_Vesper_Core_Box01,Refined Vesper Core 01 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2696,604800; },{},{}
+14141,F_Vesper_Core_Box02,Refined Vesper Core 02 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2697,604800; },{},{}
+14142,F_Vesper_Core_Box03,Refined Vesper Core 03 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2698,604800; },{},{}
+14143,F_Vesper_Core_Box04,Refined Vesper Core 04 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2699,604800; },{},{}
+14144,F_Vigorgra_Package1,Vigorgra Box1,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+14145,F_Vigorgra_Package2,Vigorgra Box2,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+14146,F_Vigorgra_Package3,Vigorgra Box3,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12253,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+14147,F_Vigorgra_Package4,Vigorgra Box4,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12255,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+14148,F_Vigorgra_Package5,Vigorgra Box5,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,2; getitem 12250,2; getitem 12208,2; getitem 12215,15; getitem 12216,15; getitem 12211,1; getitem 7621,1; },{},{}
+14149,F_Vigorgra_Package6,Vigorgra Box6,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,2; getitem 12251,2; getitem 12208,2; getitem 12215,15; getitem 12217,20; getitem 12211,1; getitem 7621,1; },{},{}
+14150,F_Vigorgra_Package7,Vigorgra Box7,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+14151,F_Vigorgra_Package8,Vigorgra Box8,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+14152,F_Vigorgra_Package9,Start your Journey Pack,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12253,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+14153,F_Vigorgra_Package10,Siege Mode Pack,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12255,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+14154,F_Vigorgra_Package11,1 Hour Survival Pack,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12252,4; getitem 12250,4; getitem 12208,4; getitem 12215,30; getitem 12216,30; getitem 12211,2; getitem 7621,2; },{},{}
+14155,F_Vigorgra_Package12,Weekend Hunting Pack,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12250,4; getitem 12251,4; getitem 12208,4; getitem 12215,30; getitem 12217,40; getitem 12211,2; getitem 7621,2; },{},{}
+14156,F_Battle_Manual_Box,Battle Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,10; },{},{}
+14157,F_Insurance_Package,Insurance Package,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,10; },{},{}
+14158,F_Bubble_Gum_Box,Bubble Gum Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,10; },{},{}
+14159,F_Str_Dish_Box,Steamed Tongue Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,10; },{},{}
+14160,F_Agi_Dish_Box,Steamed Scorpion Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,10; },{},{}
+14161,F_Int_Dish_Box,Dragon Breath Cocktail Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,10; },{},{}
+14162,F_Dex_Dish_Box,Hwergelmir's Tonic Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,10; },{},{}
+14163,F_Luk_Dish_Box,Nine Tail Dish Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,10; },{},{}
+14164,F_Vit_Dish_Box,Stew Of Immortality Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,10; },{},{}
+14165,F_Kafra_Card_Box,Kafra Card Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,10; },{},{}
+14166,F_Giant_Fly_Wing_Box,Giant Fly Wing Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,10; },{},{}
+14167,F_Neuralizer_Box,Neuralizer Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12213,1; },{},{}
+14168,F_Convex_Mirror_Box,Convex Mirror Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,10; },{},{}
+14169,F_Blessing_10_Scroll_Box,Blessing 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,10; },{},{}
+14170,F_Inc_Agi_10_Scroll_Box,Increase AGI 10 scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,10; },{},{}
+14171,F_Aspersio_5_Scroll_Box,Aspersio 5 Scroll Box,18,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,10; getitem 523,10; },{},{}
+14172,F_Assumptio_5_Scroll_Box,Assumptio 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,10; },{},{}
+14173,F_Wind_Walk_10_Scroll_Box,Wind Walk 10 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,10; },{},{}
+14174,F_Adrenaline_Scroll_Box,Adrenaline 5 Scroll Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,10; },{},{}
+14175,F_Megaphone_Box,Megaphone 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,10; },{},{}
+14176,F_Enriched_Elunium_Box,Enriched Elunium Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,10; },{},{}
+14177,F_Enriched_Oridecon_Box,Enriched Oridecon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,10; },{},{}
+14178,F_Token_Of_Siegfried_Box,Token of Siegfried Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,10; },{},{}
+14179,F_Giant_Fly_Wing_Box50,Giant Fly Wing 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,50; },{},{}
+14180,F_Giant_Fly_Wing_Box100,Giant Fly Wing 100 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12212,100; },{},{}
+14181,F_Dex_Dish_Box30,Hwergelmir's Tonic 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,30; },{},{}
+14182,F_Dex_Dish_Box50,Hwergelmir's Tonic 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,50; },{},{}
+14183,F_Luk_Dish_Box30,Nine Tail Dish 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,30; },{},{}
+14184,F_Luk_Dish_Box50,Nine Tail Dish 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,50; },{},{}
+14185,F_Inc_Agi_10_Box30,Increase Agility Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,30; },{},{}
+14186,F_Inc_Agi_10_Box50,Increase Agility Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12216,50; },{},{}
+14187,F_Vit_Dish_Box30,Stew of Immortality 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,30; },{},{}
+14188,F_Vit_Dish_Box50,Stew of Immortality 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,50; },{},{}
+14189,F_Insurance_Package30,Life Insurrance 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,30; },{},{}
+14190,F_Insurance_Package50,Life Insurrance 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12209,50; },{},{}
+14191,F_Convex_Mirror_Box5,Convex Mirror 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,5; },{},{}
+14192,F_Convex_Mirror_Box30,Convex Mirror 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12214,30; },{},{}
+14193,F_Blessing10_Box30,Blessing Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,30; },{},{}
+14194,F_Blessing10_Box50,Lv10 Blessing Scroll Box 50,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12215,50; },{},{}
+14195,F_Adrenaline10_Box30,Adrenaline Rush Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,30; },{},{}
+14196,F_Adrenaline10_Box50,Adrenaline Rush Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12220,50; },{},{}
+14197,F_Assumptio_5_Box30,Assumptio Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,30; },{},{}
+14198,F_Assumptio_5_Box50,Lv5 Assumptio Scroll Box 50,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12218,50; },{},{}
+14199,F_Aspersio_5_Box30,Aspersio Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,30; getitem 523,30; },{},{}
+14200,F_Aspersio_5_Box50,Aspersio Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12217,50; getitem 523,50; },{},{}
+14201,F_Agi_Dish_Box30,Steamed Scorpion 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,30; },{},{}
+14202,F_Agi_Dish_Box50,Steamed Scorpion 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,50; },{},{}
+14203,F_Wind_Walk10_Box30,Wind Walk Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,30; },{},{}
+14204,F_Wind_Walk10_Box50,Wind Walk Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12219,50; },{},{}
+14205,F_Int_Dish_Box30,Dragon Breath Cocktail 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,30; },{},{}
+14206,F_Int_Dish_Box50,Dragon Breath Cocktail 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,50; },{},{}
+14207,F_Battle_Manual_Box1,Field Manual Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,1; },{},{}
+14208,F_Battle_Manual_Box5,Battle Manual 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,5; },{},{}
+14209,F_Siegfried_Box5,Token of Siegfried 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,5; },{},{}
+14210,F_Siegfried_Box20,Token of Siegfried 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7621,20; },{},{}
+14211,F_Kafra_Card_Box30,Kafra Card 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,30; },{},{}
+14212,F_Kafra_Card_Box50,Kafra Card 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12211,50; },{},{}
+14213,F_Str_Dish_Box30,Steamed Tongue 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,30; },{},{}
+14214,F_Str_Dish_Box50,Steamed Tongue 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,50; },{},{}
+14215,F_Bubble_Gum_Box1,Bubble Gum Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,1; },{},{}
+14216,F_Bubble_Gum_Box5,Bubble Gum 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12210,5; },{},{}
+14217,F_Megaphone_Box1,Megaphone Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,1; },{},{}
+14218,F_Megaphone_Box5,Megaphone 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12221,5; },{},{}
+14219,F_Enriched_Elunium_Box5,Enriched Elunium 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7619,5; },{},{}
+14220,FEnriched_Oridecon_Box5,Enriched Oridecon 5 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 7620,5; },{},{}
+14221,MP_Scroll_Box,Mystical Amplification Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,10; },{},{}
+14222,MP_Scroll_Box30,Mystical Amplification Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,30; },{},{}
+14223,MP_Scroll_Box50,Mystical Amplification Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,50; },{},{}
+14224,Quagmire_Scroll_Box,Quagmire Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,10; },{},{}
+14225,Quagmire_Scroll_Box30,Quagmire Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,30; },{},{}
+14226,Quagmire_Scroll_Box50,Quagmire Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,50; },{},{}
+14227,Healing_Staff_Box,Healing Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 1638,604800; },{},{}
+//14228,Praxinus_Box,Praccsinos Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 2752,604800; },{},{}
//14229,Cherry_Blossom_Scroll,Cherry Blossom Scroll,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
//14230,Note_Headphones_Box,Note Headphones Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 5151,1; },{},{}
//14231,Novice_Breastplate_Boxes,Novice Breastplate Boxes,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14232,Yggdrasilberry_Box_,Yggdrasil Berry 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 607,10; },{},{}
-14233,Dead_Branch_Box_10,Dead Branch 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,10; },{},{}
-14234,Dead_Branch_Box_25,Dead Branch 25 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,25; },{},{}
-14235,Field_Manual_Box_2,Field Manual 2 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,2; },{},{}
-14236,Steamed_Tongue_Box_20,Steamed Tongue 20 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,20; },{},{}
-14237,Steamed_Desert_Scorpions_Box_20,Steamed Desert Scorpions Box(20),2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,20; },{},{}
-14238,Stew_Of_Immortality_Box_20,Immortal Stew 20 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,20; },{},{}
-14239,Dragon_Breath_Cocktail_Box_20,Dragon Breath Cocktail 20 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,20; },{},{}
-14240,Hwergelmir's_Tonic_Box_20,Hwergelmir's Tonic 20 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,20; },{},{}
-14241,Nine_Tail_Dish_Box_20,Nine Tail Dish 20 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,20; },{},{}
-14242,Beholder_Ring_Box,Beholder Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2753,1; },{},{}
-14243,Hallow_Ring_Box,Hallow Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2754,1; },{},{}
-14244,Clamorous_Ring_Box,Clamorous Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2755,1; },{},{}
-14245,Chemical_Ring_Box,Chemical Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2756,1; },{},{}
-14246,Insecticide_Ring_Box,Insecticide Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2757,1; },{},{}
-14247,Fisher_Ring_Box,Fisher Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2758,1; },{},{}
-14248,Decussate_Ring_Box,Decussate Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2759,1; },{},{}
-14249,Bloody_Ring_Box,Bloody Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2760,1; },{},{}
-14250,Satanic_Ring_Box,Satanic Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2761,1; },{},{}
-14251,Dragoon_Ring_Box,Dragon Ring Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2762,1; },{},{}
-14252,Beholder_Ring_Box2,Beholder Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2753,1; },{},{}
-14253,Hallow_Ring_Box2,Hallow Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2754,1; },{},{}
-14254,Clamorous_Ring_Box2,Clamorous Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2755,1; },{},{}
-14255,Chemical_Ring_Box2,Chemical Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2756,1; },{},{}
-14256,Insecticide_Ring_Box2,Insecticide Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2757,1; },{},{}
-14257,Fisher_Ring_Box2,Fisher Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2758,1; },{},{}
-14258,Decussate_Ring_Box2,Decussate Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2759,1; },{},{}
-14259,Bloody_Ring_Box2,Bloody Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2760,1; },{},{}
-14260,Satanic_Ring_Box2,Satanic Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2761,1; },{},{}
-14261,Dragoon_Ring_Box2,Dragon Ring Box II,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2762,1; },{},{}
-14262,Diary_Magic_Powder_Box,Diary Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12304,604800; },{},{}
-14263,Mini_Heart_Magic_Powder_Box,Mini Heart Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12305,604800; },{},{}
-14264,Freshman_Magic_Powder_Box,Freshman Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12306,604800; },{},{}
-14265,Kid_Magic_Powder_Box,Kid Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12307,604800; },{},{}
-14266,Magic_Magic_Powder_Box,Magic Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12308,604800; },{},{}
-14267,JJangu_Magic_Powder_Box,JJangu Magic Powder Box,2,,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12309,604800; },{},{}
-14268,Diary_Magic_Powder_Box4,Diary Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14269,Mini_Heart_Magic_Powder_Box4,Mini_Heart_Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14270,Freshman_Magic_Powder_Box4,Freshman Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14271,Kid_Magic_Powder_Box4,Kid Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14272,Magic_Magic_Powder_Box4,Magic Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14273,JJangu_Magic_Powder_Box4,JJangu Magic Powder Box,2,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
-14274,Amplification_10_Scroll_Box2,Mystical Amplification Scroll 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,10; },{},{}
-14275,Amplification_30_Scroll_Box2,Mystical Amplification Scroll 30 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,30; },{},{}
-14276,Amplification_50_Scroll_Box2,Mystical Amplification Scroll 50 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,50; },{},{}
-14277,Quagmire_10_Scroll_Box2,Quagmire Scroll 10 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,10; },{},{}
-14278,Quagmire_30_Scroll_Box2,Quagmire Scroll 30 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,30; },{},{}
-14279,Quagmire_50_Scroll_Box2,Quagmire Scroll 50 Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,50; },{},{}
-14280,Healing_Staff_Box2,Healing Staff Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1638,1; },{},{}
-//14281,Praccsinos_Box,Praccsinos_Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2752,1; },{},{}
-14282,Emperium_Box,Emperium Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 714,1; },{},{}
-14283,Marriage_Certificate_Box,Written Oath Of Marriage Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6026,1; },{},{}
-//14284,Muffler_Box,Muffler Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2548,1; },{},{}
-//14285,Balkiriah_Shield_Box,Balkiriah Shield Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2137,1; },{},{}
-//14286,Skull_Ring_Box,Skull Ring Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2763,1; },{},{}
-14287,Baricade_Repair_Kit,Barricade Repair Kit,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1019,30; getitem 999,10; getitem 1011,10; getitem 984,5; },{},{}
-14288,Guardian_Stone_Repair_Kit,Guardian Stone Repair Kit,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,1; getitem 985,1; getitem 7049,30; getitem 717,5; getitem 716,5; getitem 715,5; },{},{}
-14289,Cloth_Dye_Coupon_Box,New Clothing Dye Coupon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6046,1; },{},{}
-14290,Cloth_Dye_Coupon2_Box,Original Clothing Dye Coupon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6047,1; },{},{}
+14232,Yggdrasilberry_Box_,Yggdrasil Berry 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 607,10; },{},{}
+14233,Dead_Branch_Box_10,Dead Branch 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,10; },{},{}
+14234,Dead_Branch_Box_25,Dead Branch 25 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 604,25; },{},{}
+14235,Field_Manual_Box_2,Field Manual 2 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12208,2; },{},{}
+14236,Steamed_Tongue_Box_20,Steamed Tongue 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12202,20; },{},{}
+14237,Steamed_Desert_Scorpions_Box_20,Steamed Desert Scorpions Box(20),18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12203,20; },{},{}
+14238,Stew_Of_Immortality_Box_20,Immortal Stew 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12207,20; },{},{}
+14239,Dragon_Breath_Cocktail_Box_20,Dragon Breath Cocktail 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12204,20; },{},{}
+14240,Hwergelmir's_Tonic_Box_20,Hwergelmir's Tonic 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12205,20; },{},{}
+14241,Nine_Tail_Dish_Box_20,Nine Tail Dish 20 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 12206,20; },{},{}
+14242,Beholder_Ring_Box,Beholder Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2753,1; },{},{}
+14243,Hallow_Ring_Box,Hallow Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2754,1; },{},{}
+14244,Clamorous_Ring_Box,Clamorous Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2755,1; },{},{}
+14245,Chemical_Ring_Box,Chemical Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2756,1; },{},{}
+14246,Insecticide_Ring_Box,Insecticide Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2757,1; },{},{}
+14247,Fisher_Ring_Box,Fisher Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2758,1; },{},{}
+14248,Decussate_Ring_Box,Decussate Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2759,1; },{},{}
+14249,Bloody_Ring_Box,Bloody Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2760,1; },{},{}
+14250,Satanic_Ring_Box,Satanic Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2761,1; },{},{}
+14251,Dragoon_Ring_Box,Dragon Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2762,1; },{},{}
+14252,Beholder_Ring_Box2,Beholder Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2753,1; },{},{}
+14253,Hallow_Ring_Box2,Hallow Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2754,1; },{},{}
+14254,Clamorous_Ring_Box2,Clamorous Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2755,1; },{},{}
+14255,Chemical_Ring_Box2,Chemical Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2756,1; },{},{}
+14256,Insecticide_Ring_Box2,Insecticide Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2757,1; },{},{}
+14257,Fisher_Ring_Box2,Fisher Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2758,1; },{},{}
+14258,Decussate_Ring_Box2,Decussate Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2759,1; },{},{}
+14259,Bloody_Ring_Box2,Bloody Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2760,1; },{},{}
+14260,Satanic_Ring_Box2,Satanic Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2761,1; },{},{}
+14261,Dragoon_Ring_Box2,Dragon Ring Box II,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2762,1; },{},{}
+14262,Diary_Magic_Powder_Box,Diary Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12304,604800; },{},{}
+14263,Mini_Heart_Magic_Powder_Box,Mini Heart Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12305,604800; },{},{}
+14264,Freshman_Magic_Powder_Box,Freshman Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12306,604800; },{},{}
+14265,Kid_Magic_Powder_Box,Kid Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12307,604800; },{},{}
+14266,Magic_Magic_Powder_Box,Magic Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12308,604800; },{},{}
+14267,JJangu_Magic_Powder_Box,JJangu Magic Powder Box,18,20,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 12309,604800; },{},{}
+14268,Diary_Magic_Powder_Box4,Diary Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14269,Mini_Heart_Magic_Powder_Box4,Mini_Heart_Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14270,Freshman_Magic_Powder_Box4,Freshman Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14271,Kid_Magic_Powder_Box4,Kid Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14272,Magic_Magic_Powder_Box4,Magic Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14273,JJangu_Magic_Powder_Box4,JJangu Magic Powder Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
+14274,Amplification_10_Scroll_Box2,Mystical Amplification Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,10; },{},{}
+14275,Amplification_30_Scroll_Box2,Mystical Amplification Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,30; },{},{}
+14276,Amplification_50_Scroll_Box2,Mystical Amplification Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14593,50; },{},{}
+14277,Quagmire_10_Scroll_Box2,Quagmire Scroll 10 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,10; },{},{}
+14278,Quagmire_30_Scroll_Box2,Quagmire Scroll 30 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,30; },{},{}
+14279,Quagmire_50_Scroll_Box2,Quagmire Scroll 50 Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 14594,50; },{},{}
+14280,Healing_Staff_Box2,Healing Staff Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1638,1; },{},{}
+//14281,Praccsinos_Box,Praccsinos_Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2752,1; },{},{}
+14282,Emperium_Box,Emperium Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 714,1; },{},{}
+14283,Marriage_Certificate_Box,Written Oath Of Marriage Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6026,1; },{},{}
+//14284,Muffler_Box,Muffler Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2548,1; },{},{}
+//14285,Balkiriah_Shield_Box,Balkiriah Shield Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2137,1; },{},{}
+//14286,Skull_Ring_Box,Skull Ring Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 2763,1; },{},{}
+14287,Baricade_Repair_Kit,Barricade Repair Kit,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 1019,30; getitem 999,10; getitem 1011,10; getitem 984,5; },{},{}
+14288,Guardian_Stone_Repair_Kit,Guardian Stone Repair Kit,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 984,1; getitem 985,1; getitem 7049,30; getitem 717,5; getitem 716,5; getitem 715,5; },{},{}
+14289,Clothing_Dye_Coupon_Box,New Clothing Dye Coupon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6046,1; },{},{}
+14290,Clothing_Dye_Coupon2_Box,Original Clothing Dye Coupon Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6047,1; },{},{}
14291,Cloth_Dye_Coupon3_Box,Clothing Dye Coupon Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6046,1; },{},{}
14292,Cloth_Dye_Coupon4_Box,Clothing Dye Coupon Box II,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6047,1; },{},{}
//14293,Mercenary_Contract_Box,Mercenary Contract Box,2,,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem 6050,1; },{},{}
diff --git a/db/item_delay.txt b/db/item_delay.txt
index 716d60ebc..a0b1389bd 100644
--- a/db/item_delay.txt
+++ b/db/item_delay.txt
@@ -1,6 +1,5 @@
// Item Delay Database
// Max number of entries is defined in itemdb.h as MAX_ITEMDELAYS
-// WARNING: Adding/removing/modifying entries here and then using @reloaditemdb will cause problems/inconsistencies!
//
// Structure:
// Item ID,Delay in Milliseconds
diff --git a/db/item_misc.txt b/db/item_misc.txt
index 63ef67bed..206342698 100644
--- a/db/item_misc.txt
+++ b/db/item_misc.txt
@@ -56,43 +56,65 @@
17,12120,1 // Earth Resist Potion
17,12121,1 // Thunder Resist Potion
// Ores
-18,756,1 // Rough Oridecon
-18,757,1 // Rough Elunium
-18,998,1 // Iron
-18,999,1 // Steel
-18,1002,1 // Iron Ore
-18,1003,1 // Coal
-18,1010,1 // Phracon
-18,1011,1 // Emveretarcon
+18,1002,30 // Iron_Ore
+18,998,28 // Iron
+18,993,26 // Yellow_Live
+18,1003,24 // Coal
+18,992,22 // Wind_Of_Verdure
+18,1010,20 // Phracon
+18,991,18 // Crystal_Blue
+18,990,16 // Boody_Red
+18,999,14 // Steel
+18,1011,12 // Emveretarcon
+18,757,10 // Elunium_Stone
+18,756,9 // Oridecon_Stone
+18,997,8 // Great_Nature
+18,996,7 // Rough_Wind
+18,995,6 // Mistic_Frozen
+18,994,5 // Flame_Heart
+18,985,4 // Elunium
+18,984,3 // Oridecon
+18,969,2 // Gold
+18,714,1 // Emperium
// Food Types
-19,512,1 // Apple
-19,513,1 // Banana
-19,514,1 // Grape
-19,515,1 // Carrot
-19,516,1 // Potato
-19,517,1 // Meat
-19,528,1 // Monster Food
-19,529,1 // Candy
-19,530,1 // Candy Cane
-19,544,1 // Raw Fish
-19,551,1 // Sushi
+19,526,5 // Royal_Jelly
+19,12042,10 // Str_Dish02
+19,12057,10 // Agi_Dish02
+19,12068,10 // Vit_Dish03
+19,12062,10 // Dex_Dish02
+19,12068,10 // Luk_Dish03
+19,12047,10 // Int_Dish02
+19,531,30 // Apple_Juice
+19,532,30 // Banana_Juice
+19,533,30 // Grape_Juice
+19,534,30 // Carrot_Juice
+19,538,30 // Well_Baked_Cookie
+19,536,50 // Ice_Cream
+19,544,50 // Fish_Slice
+19,548,50 // Cheese
+19,551,50 // Shusi
+19,553,50 // Bun
+19,554,50 // Mojji
+19,535,50 // Pumpkin
+19,516,100 // Sweet_Potato
+19,513,100 // Banana
+19,512,600 // Apple
// Recovery Types
-20,501,1 // Red Potion
-20,502,1 // Orange Potion
-20,503,1 // Yellow Potion
-20,504,1 // White Potion
-20,505,1 // Blue Potion
-20,506,1 // Green Potion
-20,507,1 // Red Herb
-20,508,1 // Yellow Herb
-20,509,1 // White Herb
-20,510,1 // Blue Herb
-20,511,1 // Green Herb
-20,531,1 // Apple Juice
-20,532,1 // Banana Juice
-20,533,1 // Grape Juice
-20,534,1 // Carrot Juice
-// Minerals
+20,522,5 // Fruit_Of_Mastela
+20,521,5 // Leaflet_Of_Aloe
+20,520,10 // Leaflet_Of_Hinal
+20,545,10 // Red_Slim_Potion
+20,12118,10 // Resist_Earth
+20,508,20 // Yellow_Herb
+20,501,20 // Red_Potion
+20,511,30 // Green_Herb
+20,507,30 // Red_Herb
+20,569,50 // Novice_Potion
+20,549,50 // Nice_Sweet_Potato
+20,529,100 // Candy
+20,528,200 // Monster's_Feed
+20,550,600 // Popped_Rice
+// Minerals - Unused
21,714,1 // Emperium
21,756,1 // Rough Oridecon
21,757,1 // Rough Elunium
@@ -255,22 +277,26 @@
26,2718,1 // Lunatic Brooch
26,2719,1 // Iron Wrist
// jewels
-27,718,1 // Garnet
-27,719,1 // Amethyst
-27,720,1 // Aquamarine
-27,721,1 // Emerald
-27,722,1 // Pearl
-27,723,1 // Ruby
-27,724,1 // Cursed Ruby
-27,725,1 // Sardonyx
-27,726,1 // Sapphire
-27,727,1 // Opal
-27,728,1 // Topaz
-27,729,1 // Zircon
-27,730,1 // 1carat Diamond
-27,731,1 // 2carat Diamond
-27,732,1 // 3carat Diamond
-27,733,1 // Cracked Diamond
+27,715,100 // Yellow_Gemstone
+27,716,100 // Red_Gemstone
+27,717,100 // Blue_Gemstone
+27,718,10 // Dark_Red_Jewel
+27,719,10 // Violet_Jewel
+27,720,10 // Skyblue_Jewel
+27,721,10 // Azure_Jewel
+27,722,10 // Scarlet_Jewel
+27,723,10 // Cardinal_Jewel
+27,724,10 // Cardinal_Jewel_
+27,725,10 // Red_Jewel
+27,726,10 // Blue_Jewel
+27,727,10 // White_Jewel
+27,728,10 // Golden_Jewel
+27,729,10 // Bluish_Green_Jewel
+27,730,5 // Crystal_Jewel
+27,731,4 // Crystal_Jewel_
+27,732,3 // Crystal_Jewel__
+27,733,27 // Crystal_Jewel___
+27,746,50 // Glass_Bead
// Egg Boy
32,514,300 // Grape
32,564,522 // Rice Ball
diff --git a/db/mercenary_skill_db.txt b/db/mercenary_skill_db.txt
index 533fb5004..71462aa79 100644
--- a/db/mercenary_skill_db.txt
+++ b/db/mercenary_skill_db.txt
@@ -114,8 +114,29 @@
6046,8201,10 //MS_BASH
6046,8206,1 //MS_BERSERK
// Monster Mercenaries
-// Wild Rose
+// MIMIC
+1191,8233,1 //MER_AUTOBERSERK
+1191,8220,5 //ML_AUTOGUARD
+1191,8201,5 //MS_BASH
+// DISGUISE
+1506,8223,2 //MER_QUICKEN
+1506,8225,5 //MER_CRASH
+1506,8236,3 //MER_LEXDIVINA
+// ALICE
+1275,8232,5 //MER_PROVOKE
+1275,8202,5 //MS_MAGNUM
+1275,8217,5 //ML_BRANDISH
+1275,8226,1 //MER_REGAIN
+// M_WILD_ROSE
1965,8201,5 //MS_BASH
+// M_DOPPELGANGER
+1966,8223,5 //MER_QUICKEN
+1966,8201,5 //MS_BASH
+1966,8221,3 //ML_DEVOTION
+// M_YGNIZEM
+1967,8223,5 //MER_QUICKEN
+1967,8201,5 //MS_BASH
+1967,8221,3 //ML_DEVOTION
// M_GAMEMASTER
2000,8226,1 //MER_REGAIN
2000,8227,1 //MER_TENDER
diff --git a/db/mob_branch.txt b/db/mob_branch.txt
index 72ab91347..2f015d18b 100644
--- a/db/mob_branch.txt
+++ b/db/mob_branch.txt
@@ -3,7 +3,7 @@
// Structure of Database:
// MobID,DummyName,Rate
-0,SCORPION,Scorpion,1001
+0,Scorpion,1001
1001,Scorpion,214285
1002,Poring,1000000
1004,Hornet,357142
diff --git a/db/mob_db.txt b/db/mob_db.txt
index ffd97b473..306da7c1e 100644
--- a/db/mob_db.txt
+++ b/db/mob_db.txt
@@ -1121,13 +1121,13 @@
//2065,E_METALING,Metaling,Metaling,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2066,E_ANOPHELES,Anopheles,Anopheles,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2067,E_ANOPHELES_,Anopheles,Anopheles,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-2068,BOITATA,Boitata,Boitata,93,1283990,0,74288,77950,2,1060,2022,32,66,140,99,30,109,100,90,10,12,2,2,63,0x37B5,200,1150,1150,288,37144,10000,0,0,0,0,0,0,7444,5000,985,1000,984,1000,607,500,1377,100,1422,100,1471,100,0,0,0,0,0,0
-2069,IARA,Iara,Iara,79,5890,0,1070,890,1,171,270,0,76,69,14,41,60,69,20,10,12,1,5,61,0x91,200,672,380,288,0,0,0,0,0,0,0,0,950,9000,951,500,747,100,748,50,710,10,995,5,2334,1,0,0,0,0,0,0
-2070,PIRANHA,Piranha,Piranha,75,4522,0,899,1023,1,182,223,7,12,69,45,30,30,66,35,10,12,2,5,61,0x3885,200,768,768,384,0,0,0,0,0,0,0,0,963,9000,956,600,1053,500,1054,500,995,5,1249,5,13027,1,0,0,0,0,0,0
-2071,HEADLESS_MULE,Headless Mule,Headless Mule,80,6620,0,1011,1120,1,210,267,33,44,68,51,50,35,67,20,10,12,2,6,63,0x3985,165,1216,816,432,0,0,0,0,0,0,0,0,7120,4000,7097,1000,7122,1000,2317,5,1255,2,1269,1,2317,1,0,0,0,0,0,0
-2072,JAGUAR,Jaguar,Jaguar,71,3914,0,720,512,1,192,234,44,15,69,30,45,5,59,5,10,12,1,2,42,0x3885,150,1250,580,360,0,0,0,0,0,0,0,0,7171,3000,7172,2000,919,1000,756,40,1810,1,0,0,0,0,0,0,0,0,0,0
-2073,TOUCAN,Toucan,Toucan,70,3640,0,659,544,1,166,201,12,12,54,14,40,35,44,10,10,12,1,2,44,0x3885,155,1450,960,480,0,0,0,0,0,0,0,0,917,3000,7053,1000,2612,200,508,100,510,50,0,0,0,0,0,0,0,0,0,0
-2074,CURUPIRA,Curupira,Curupira,68,3096,0,622,450,1,140,175,42,12,32,23,38,20,45,10,10,12,1,7,22,0x118B,250,530,530,384,0,0,0,0,0,0,0,0,517,3000,7267,500,757,250,1505,100,1011,10,0,0,0,0,0,0,0,0,0,0
+2068,BOITATA,Boitata,Boitata,93,1283990,0,74288,77950,2,1060,2022,7,36,140,99,30,109,100,90,10,12,2,0,63,0x37B5,200,1150,1150,288,37144,10000,0,0,0,0,0,0,7444,5000,985,1000,984,1000,607,500,1377,100,1422,100,1471,100,0,0,0,0,0,0
+2069,IARA,Iara,Iara,79,5890,0,1070,890,1,171,270,0,39,69,14,41,60,69,20,10,12,1,5,61,0x91,200,672,380,288,0,0,0,0,0,0,0,0,950,9000,951,500,747,100,748,50,710,10,995,5,2334,1,0,0,0,0,0,0
+2070,PIRANHA,Piranha,Piranha,75,4522,0,899,1023,1,182,223,2,10,69,45,30,30,66,35,10,12,1,5,61,0x3295,200,768,768,384,0,0,0,0,0,0,0,0,963,9000,956,600,1053,500,1054,500,995,5,1249,5,13027,1,0,0,0,0,0,0
+2071,HEADLESS_MULE,Headless Mule,Headless Mule,80,6620,0,1011,1120,1,210,267,7,27,68,51,50,35,67,20,10,12,2,6,63,0x3985,165,1216,816,432,0,0,0,0,0,0,0,0,7120,4000,7097,1000,7122,1000,2317,5,1255,2,1269,1,2317,1,0,0,0,0,0,0
+2072,JAGUAR,Jaguar,Jaguar,71,3914,0,720,512,1,192,234,9,12,69,30,45,5,59,5,10,12,1,2,42,0x3885,150,1250,580,360,0,0,0,0,0,0,0,0,7171,3000,7172,2000,919,1000,756,40,1810,1,0,0,0,0,0,0,0,0,0,0
+2073,TOUCAN,Toucan,Toucan,70,3640,0,659,544,1,166,201,3,10,54,14,40,35,44,10,10,12,0,2,44,0x3885,155,1450,960,480,0,0,0,0,0,0,0,0,917,3000,7053,1000,2612,200,508,100,510,50,0,0,0,0,0,0,0,0,0,0
+2074,CURUPIRA,Curupira,Curupira,68,3096,0,622,450,1,140,175,9,10,32,23,38,20,45,10,10,12,1,6,22,0x118B,250,530,530,384,0,0,0,0,0,0,0,0,517,3000,7267,500,757,250,1505,100,1011,10,0,0,0,0,0,0,0,0,0,0
//2075,E_VADON_X,Vadon,Vadon,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2076,S_WIND_GHOST,Wind Ghost,Wind Ghost,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2077,S_SKOGUL,Skogul,Skogul,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
@@ -1135,7 +1135,7 @@
//2079,CRYSTAL_H,Crystal,Crystal,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2080,CRYSTAL_L,Crystal,Crystal,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2081,E_HYDRA,Hydra,Hydra,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-2082,G_PIRANHA,Piranha,Piranha,75,4522,0,0,0,1,182,223,7,12,69,45,30,30,66,35,10,12,1,5,61,0x3885,200,768,768,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+2082,G_PIRANHA,Piranha,Piranha,75,4522,0,0,0,1,182,223,2,10,69,45,30,30,66,35,10,12,1,5,61,0x3295,200,768,768,384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2083,HORN_SCARABA,Scaraba,Scaraba,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2084,HORN_SCARABA2,Scaraba,Scaraba,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//2085,ANTLER_SCARABA,Antler Scaraba,Antler Scaraba,1,50,0,0,0,1,7,10,0,5,1,1,1,1,6,30,10,12,1,3,21,0x120,400,1872,672,480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
diff --git a/db/packet_db.txt b/db/packet_db.txt
index a8f640419..3be46cf4b 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1452,9 +1452,9 @@ packet_ver: 25
//2009-12-22aRagexeRE
0x0802,18,bookingregreq,2:4:6 // Booking System
-//0x0803,4
+0x0803,4
0x0804,8 // Booking System
-//0x0805,-1
+0x0805,-1
0x0806,4,bookingdelreq,2 // Booking System
//0x0807,2
0x0808,4 // Booking System
@@ -1466,9 +1466,9 @@ packet_ver: 25
//2009-12-29aRagexeRE
0x0804,14,bookingsearchreq,2:4:6:8:12 // Booking System
0x0806,2,bookingdelreq,0 // Booking System
-//0x0807,4
+0x0807,4
0x0808,14,bookingupdatereq,2 // Booking System
-//0x0809,50
+0x0809,50
0x080A,18
0x080B,6 // Booking System
@@ -1581,5 +1581,9 @@ packet_ver: 25
//2010-07-14aRagexeRE
//0x841,4
+//2010-08-03aRagexeRE
+0x0842,6,recall2,2
+0x0843,6,remove2,2
+
//Add new packets here
//packet_ver: 26
diff --git a/db/pet_db.txt b/db/pet_db.txt
index ce2316c59..8c69f4acb 100644
--- a/db/pet_db.txt
+++ b/db/pet_db.txt
@@ -10,8 +10,8 @@
// 05. EggID Pet Egg ID.
// 06. EquipID Pet Accessory ID.
// 07. FoodID Pet Food ID.
-// 08. Fullness The amount Hunger is decreased every [HungeyDelay] seconds.
-// 09. HungeyDelay The amount of time it takes for hunger to decrease after feeding. (Default: 60 seconds)
+// 08. Fullness The amount Hunger is decreased every [HungryDelay] seconds.
+// 09. HungryDelay The amount of time it takes for hunger to decrease after feeding. (Default: 60 seconds)
// 10. R_Hungry Amount of Intimacy that is increased when fed.
// 11. R_Full Amount of Intimacy that is decreased when over-fed.
// 12. Intimate Amount of Intimacy the pet starts with.
@@ -20,6 +20,11 @@
// 15. Speed Pet's walk speed. (Defaul: 150)
// 16. S_Performance Special Performance. (Yes = 1, No = 0)
// 17. talk_convert_class Disables pet talk (instead of talking they emote with /!.)
+// 18. attack_rate Rate of which the pet will attack (requires at least pet_support_min_friendly intimacy).
+// 19. defence_attack_rate Rate of which the pet will retaliate when master is being attacked (requires at least pet_support_min_friendly intimacy).
+// 20. change_target_rate Rate of which the pet will change its attack target.
+// 21. pet_script Script to execute when the pet is hatched.
+// 22. loyal_script Script to execute when the pet is hatched (requires at least pet_equip_min_friendly intimacy, independent of pet_script).
//NOTE: The max value (100%) of attack_rate, defense_rate & change_target_rate is 10000.
//In theory you can use any valid script, but it is run only once upon pet
diff --git a/db/pet_db2.txt b/db/pet_db2.txt
new file mode 100644
index 000000000..b41435713
--- /dev/null
+++ b/db/pet_db2.txt
@@ -0,0 +1,60 @@
+// Pet Additional Database - Custom Pets
+//
+// Structure of Database:
+// MobID,Name,JName,LureID,EggID,EquipID,FoodID,Fullness,HungryDelay,R_Hungry,R_Full,Intimate,Die,Capture,Speed,S_Performance,talk_convert_class,attack_rate,defence_attack_rate,change_target_rate,pet_script,loyal_script
+//
+// 01. MobID Monster ID of the pet.
+// 02. Name Name of the monster as defined in the database.
+// 03. JName The display name of the monster when hatched.
+// 04. LureID Pet Tame Item ID.
+// 05. EggID Pet Egg ID.
+// 06. EquipID Pet Accessory ID.
+// 07. FoodID Pet Food ID.
+// 08. Fullness The amount Hunger is decreased every [HungryDelay] seconds.
+// 09. HungryDelay The amount of time it takes for hunger to decrease after feeding. (Default: 60 seconds)
+// 10. R_Hungry Amount of Intimacy that is increased when fed.
+// 11. R_Full Amount of Intimacy that is decreased when over-fed.
+// 12. Intimate Amount of Intimacy the pet starts with.
+// 13. Die Amount of Intimacy that is decreased when the pet owner dies.
+// 14. Capture Capture succes rate (10000 = 100%)
+// 15. Speed Pet's walk speed. (Defaul: 150)
+// 16. S_Performance Special Performance. (Yes = 1, No = 0)
+// 17. talk_convert_class Disables pet talk (instead of talking they emote with /!.)
+// 18. attack_rate Rate of which the pet will attack (requires at least pet_support_min_friendly intimacy).
+// 19. defence_attack_rate Rate of which the pet will retaliate when master is being attacked (requires at least pet_support_min_friendly intimacy).
+// 20. change_target_rate Rate of which the pet will change its attack target.
+// 21. pet_script Script to execute when the pet is hatched.
+// 22. loyal_script Script to execute when the pet is hatched (requires at least pet_equip_min_friendly intimacy, independent of pet_script).
+//NOTE: The max value (100%) of attack_rate, defense_rate & change_target_rate is 10000.
+
+//In theory you can use any valid script, but it is run only once upon pet
+//loading, so it is recommended you use the specific pet scripts:
+
+//petskillattack skillid, skilllv, rate, bonusrate
+//Skill attack that triggers while the pet is attacking. Rate is the base
+//chance of execution per attack. Bonusrate is an additional success rate when
+//intimacy reaches max.
+
+//petskillattack2 skillid, damage, hits, rate, bonusrate
+//Same as petskillattack, but the damage and number of hits is fixed
+//the damage specified is total, not per hit.
+
+//petskillsupport skillid, skilllv, delay, hp%, sp%
+//Casts a support skill when the health levels are below the specified hp% and
+//sp%. Delay is the minimum time in seconds before the skill can be cast again
+
+//petheal amount, delay, hp%, sp%
+//Similar to petskillsupport, but the skill is fixed to heal (28) and the
+//heal-amount is fixed to the value given.
+
+//petrecovery type, delay: Cures the "type" status effect after "delay" seconds
+
+//petskillbonus type, value, duration, delay
+//Gives bonus stats. Type is the stat to increase (bStr, bLuk), value is the
+//amount by which it is increased, duration signals how long the bonus lasts
+//delay is the time elapsed after the bonus ends and before it starts again.
+
+//A single pet can have petloot, petskillbonus, petskillattack (or
+//petskillattack2) and petskillsupport (or petheal) at the same time,
+//but only one of each.
+
diff --git a/db/skill_tree.txt b/db/skill_tree.txt
index 70ac495b8..d64f1fef7 100644
--- a/db/skill_tree.txt
+++ b/db/skill_tree.txt
@@ -1,4 +1,4 @@
-//JobNo,Skill-ID,MaxLV,Prerequisite Skill-ID-1,Prerequisite Skill-ID-1-Lv,PrereqSkill-ID-2,PrereqSkill-ID-2-Lv,PrereqSkill-ID-3,PrereqSkill-ID-3-Lv,PrereqSkill-ID-4,PrereqSkill-ID-4-Lv,PrereqSkill-ID-5,PrereqSkill-ID-5-Lv//CLASS_SKILLNAME#Skill Name#
+//JobNo,Skill-ID,MaxLV{,JobLV},Prerequisite Skill-ID-1,Prerequisite Skill-ID-1-Lv,PrereqSkill-ID-2,PrereqSkill-ID-2-Lv,PrereqSkill-ID-3,PrereqSkill-ID-3-Lv,PrereqSkill-ID-4,PrereqSkill-ID-4-Lv,PrereqSkill-ID-5,PrereqSkill-ID-5-Lv//CLASS_SKILLNAME#Skill Name#
//Novice
0,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
0,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
@@ -853,7 +853,7 @@
4008,356,10,3,10,6,5,60,3,0,0,0,0 //LK_PARRYING#Parrying#
4008,357,5,4,1,55,5,63,1,0,0,0,0 //LK_CONCENTRATION#Concentration#
4008,358,1,4,10,6,5,8,3,0,0,0,0 //LK_TENSIONRELAX#Relax#
-4008,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //It has an extra collumn after "MaxLevel" for Job Level 50 requeriment
+4008,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //It has an extra column after "MaxLevel" for Job Level 50 requirement
4008,397,5,55,10,56,5,58,5,63,1,0,0 //LK_SPIRALPIERCE#Spiral Pierce#
4008,398,5,55,9,63,1,0,0,0,0,0,0 //LK_HEADCRUSH#Traumatic Blow#
4008,399,10,55,9,64,3,398,3,0,0,0,0 //LK_JOINTBEAT#Vital Strike#
@@ -1084,7 +1084,7 @@
4014,356,10,3,10,6,5,60,3,0,0,0,0 //LK_PARRYING#Parrying#
4014,357,5,4,1,55,5,63,1,0,0,0,0 //LK_CONCENTRATION#Concentration#
4014,358,1,4,10,6,5,8,3,0,0,0,0 //LK_TENSIONRELAX#Relax#
-4014,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //check this, the last ",0" shouldn't be needed I think
+4014,359,1,50,0,0,0,0,0,0,0,0,0,0 //LK_BERSERK#Frenzy# //It has an extra column after "MaxLevel" for Job Level 50 requirement
4014,397,5,55,10,56,5,58,5,63,1,0,0 //LK_SPIRALPIERCE#Spiral Pierce#
4014,398,5,55,9,63,1,0,0,0,0,0,0 //LK_HEADCRUSH#Traumatic Blow#
4014,399,10,55,9,64,3,398,3,0,0,0,0 //LK_JOINTBEAT#Vital Strike#
diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt
index 78e34f2fc..3f25dc4c5 100644
--- a/doc/item_bonus.txt
+++ b/doc/item_bonus.txt
@@ -3,7 +3,7 @@
//===== By ================================================
//= Developers
//===== Version ===========================================
-//= 1.1.20090524
+//= 1.1.20101205
//=========================================================
//= 1.0 - Standardized doc file
//= 1.1.20080612 - skill command and bonuses (bAutoSpell, bSkillAtk,
@@ -13,6 +13,12 @@
//= 1.1.20090421 - added the correct bonus documentation for bSPDrainValue [Playtester]
//= 1.1.20090524 - removed outdated bMatk/bMatk1/bMatk2 doc [ultramage]
//= 1.1.20090529 - added documentation for bHealPower, bHealPower2 [Inkfish]
+//= 1.1.20101130 - added documentation for bAutoSpellOnSkill [Ai4rei]
+//= 1.1.20101205 - added documentation for bAddItemHealRate. [L0ne_W0lf]
+//= 1.1.20101207 - added documentation for bUnbreakableGarment,
+//= bUnbreakableWeapon, bUnbreakableArmor, bUnbreakableHelm,
+//= bUnbreakableShield, bUnbreakableShoes, bBreakWeaponRate and
+//= bBreakArmorRate. [Ai4rei]
//===== Description =======================================
//= List of script instructions used in item bonuses,
//= mainly bonus/bonus2/bonus3/bonus4/bonus5 arguments
@@ -76,9 +82,7 @@ bonus bIgnoreDefRace,n; Disregard DEF against enemies of race n
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
10=Boss monster, 11=Other than (normal monster) boss monster
bonus bIgnoreDefEle,n; Disregard DEF against enemies of element n
- n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
- 5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
- 10=Boss monster, 11=Other than (normal monster) boss monster
+ n: 0=Neutral, 1=Water, 2=Earth, 3=Fire, 4=Wind, 5=Poison, 6=Holy, 7=Dark, 8=Spirit, 9=Undead
bonus bIgnoreMDefRace; Disregard MDEF against enemies of race n
n: 0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
@@ -113,8 +117,8 @@ bonus bNoGemStone,n; Skills requiring Gemstones do no require them
(Hocus Pocus will still require 1 Yellow Gemstone | n is meaningless)
bonus bIntravision,n; Always see Hiding and Cloaking players/mobs (n is meaningless)
-bonus bHealPower,n; Increase heal amount of all heal skills by n% (supports skill names)
-bonus bHealPower2,n; Increase heal amount if you are healed by any skills by n% (supports skill names)
+bonus bHealPower,n; Increase heal amount of all heal skills by n%
+bonus bHealPower2,n; Increase heal amount if you are healed by any skills by n%
bonus2 bAddEff,e,x; Adds a x/10000 chance to cause effect e to the target when attacking (e.g. x=100 makes 1% chance, x=10000 makes 100% chance, etc)
e: Eff_Blind, Eff_Sleep, Eff_Poison, Eff_Freeze, Eff_Silence, Eff_Stan, Eff_Curse, Eff_Confusion, Eff_Stone, Eff_Bleeding
bonus2 bResEff,e,x; Adds a x/10000 tolerance to effect e (e.g. x=100 makes 1% tolerance, x=10000 makes 100% tolerance, etc)
@@ -159,7 +163,7 @@ bonus2 bIgnoreMdefRate,n,x; Disregard x% of the target's MDEF if the target bel
bonus2 bHPDrainRate,n,x; n/10 % probability to drain x% HP when attacking
bonus2 bSPDrainRate,n,x; n/10 % probability to drain x% SP when attacking
bonus2 bSPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy's SP (player) amount by x% when attacking
-bonus2 bAddMonsterDropItem,n,x; When killing any monsters with physical attack, the probability which drops item n +x% (the item which the monster drops unrelated ones)
+bonus2 bAddMonsterDropItem,n,x; Adds a x/100% chance for item n to be dropped, when killing any monster.
if 'x' is negative value, then it's a part of formula
chance = -x*(killed_mob_level/10)+1
bonus2 bGetZenyNum,n,x; When killing a monster, there is a x% chance of gaining 1~n zeny
@@ -167,12 +171,12 @@ bonus2 bGetZenyNum,n,x; When killing a monster, there is a x% chance of gainin
If n < 0, the max zeny to gain is -n*monster level.
bonus2 bAddGetZenyNum,n,x; Same as bGetZenyNum, but the rates and zeny to gain stack.
-bonus3 bAddMonsterDropItem,n,x,y; When killing monsters from race x with physical attack, the probability which drops item n +y% (the item which the monster drops unrelated ones)
+bonus3 bAddMonsterDropItem,n,x,y; Adds a y/100% chance for item n to be dropped, when killing any monster of race x.
0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
10=Boss monster, 11=Other than (normal monster) boss monster
- if 'x' is negative value, then it's a part of formula
- chance = -x*(killed_mob_level/10)+1
+ if 'y' is negative value, then it's a part of formula
+ chance = -y*(killed_mob_level/10)+1
bonus3 bAutoSpell,n,x,y; Auto Spell casting on attack of spell n at level x with y/10% chance. (supports skill names)
Skill is casted on target unless it is a self or support (inf = 4/16) skill.
@@ -186,15 +190,15 @@ bonus3 bAutoSpell,n,x,y; Auto Spell casting on attack of spell n at level x wit
bonus bCritAtkRate,n; Increase critical damage by +n%
bonus bNoRegen,n; Stops regeneration for n
n: 1=HP, 2=SP
-bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills
-bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills
-bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills
-bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills
+bonus bUnstripableWeapon,n; Weapon cannot be taken off via Strip skills (n is meaningless)
+bonus bUnstripableArmor,n; Armor cannot be taken off via Strip skills (n is meaningless)
+bonus bUnstripableHelm,n; Helm cannot be taken off via Strip skills (n is meaningless)
+bonus bUnstripableShield,n; Shield cannot be taken off via Strip skills (n is meaningless)
bonus bSPGainValue,n; When killing a monster by physical attack, you gain n SP
bonus bHPGainValue,n; When killing a monster by physical attack, you gain n HP
bonus bIgnoreDefMob,n; Ignore monster's DEF when attacking.
n: 0=All normal monster except Bosses, 1=All monsters
-bonus2 bCriticalAddRace,n,r; Critical + n vs. enemies of race r
+bonus2 bCriticalAddRace,r,n; Critical + n vs. enemies of race r
r:
0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
@@ -288,7 +292,7 @@ bonus2 bSPGainRace,n,x; When killing a monster of race n by physical attack ga
bonus2 bSubRace2,n,x; Damage x% reduction from enemies of race n
(Check db/mob_race2_db.txt)
-bonus2 bAddMonsterDropItemGroup,n,x; x% chance to get an item of group type n when you kill a monster
+bonus2 bAddMonsterDropItemGroup,n,x; Adds a x/100% chance to get an item of group type n when you kill a monster
(Check db/item_group_db.txt)
if 'x' is negative value, then it's a part of formula
chance = -x*(killed_mob_level/10)+1
@@ -308,7 +312,7 @@ bonus3 bAddEffWhenHit,n,x,y; x/10000 chance to cause n state to the enemy when b
ATF_SHORT: Trigger on melee attacks
ATF_LONG: Trigger in ranged attacks (default: trigger on all attacks)
-bonus3 bAddMonsterDropItemGroup,n,x,y; y% chance to get an item of group type n when you kill a
+bonus3 bAddMonsterDropItemGroup,n,x,y; Adds a y/100% chance to get an item of group type n when you kill a
monster of race x (Check db/item_group_db.txt)
0=Formless, 1=Undead, 2=Brute, 3=Plant, 4=Insect,
5=Fish, 6=Demon, 7=Demi-Human, 8=Angel, 9=Dragon,
@@ -376,3 +380,18 @@ bonus3 bSubEle,n,x,t; x% Damage reduction against element n.
i: 1=cast on enemy, not on self
2=use random skill lv in [1..y]
3=1+2 (random lv on enemy)
+bonus4 bAutoSpellOnSkill,s,x,l,n Adds a n/10% chance to autospell skill x at level l when using skill s. (supports skill names)
+ Supportive spells are casted on self, others on target of skill s.
+bonus5 bAutoSpellOnSkill,s,x,l,n,i Adds a n/10% chance to autospell skill x at level l when using skill s. (supports skill names)
+ i: Flags (bitfield)
+ &1: Forces the skill to be casted on self, rather than on the target of skill s.
+ &2: Random skill level between 1 and l is chosen.
+bonus bAddItemHealRate,x; Increases HP recovered by x% for healing items.
+bonus bUnbreakableGarment,n; Garment cannot be damaged/broken by any means (n is meaningless)
+bonus bUnbreakableWeapon,n; Weapon cannot be damaged/broken by any means (n is meaningless)
+bonus bUnbreakableArmor,n; Armor cannot be damaged/broken by any means (n is meaningless)
+bonus bUnbreakableHelm,n; Helm cannot be damaged/broken by any means (n is meaningless)
+bonus bUnbreakableShield,n; Shield cannot be damaged/broken by any means (n is meaningless)
+bonus bUnbreakableShoes,n; Shoes cannot be damaged/broken by any means (n is meaningless)
+bonus bBreakWeaponRate,n; Adds a n/100% chance to break enemy's weapon while attacking (stacks with other break chances).
+bonus bBreakArmorRate,n; Adds a n/100% chance to break enemy's armor while attacking (stacks with other break chances).
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 7f330e8c0..51bcdf8e4 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -21,6 +21,8 @@ Type:
10 Ammo (Arrows/Bullets/etc)
11 Usable with delayed consumption (item is lost from inventory
after selecting a target, for use with skills and pet lures)
+ 18 Another delayed consume that requires user confirmation before
+ using item.
Buy: Default buying price. When not specified, becomes double the sell price.
diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt
index 73f0b2e3a..9fa403f1d 100644
--- a/doc/mob_db_mode_list.txt
+++ b/doc/mob_db_mode_list.txt
@@ -104,6 +104,7 @@ Aegis/eA (description)
19: 0x3095 (aggro, change-target melee/chase, cast sensor idle)
20: 0x3295 (aggro, change-target melee/chase, cast sensor idle/chase)
21: 0x3695 (aggro, change-target melee/chase, cast sensor idle/chase, chase-change target)
+25: 0x0001 (passive, can't attack) [Pet]
26: 0xB695 (aggro, change-target melee/chase, cast sensor idle/chase, chase-change target, random target)
27: 0x8084 (aggro, immobile, random target)
diff --git a/doc/sample/npc_dynamic_shop.txt b/doc/sample/npc_dynamic_shop.txt
index 1a1f174c9..79d0c4fdb 100644
--- a/doc/sample/npc_dynamic_shop.txt
+++ b/doc/sample/npc_dynamic_shop.txt
@@ -7,21 +7,22 @@ end;
OnSellItem:
for(set @i, 0; @i < getarraysize(@sold_nameid); set @i, @i + 1){
- if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] && @sold_quantity[@i] <= 0){
+ if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] || @sold_quantity[@i] <= 0){
mes "omgh4x!";
close;
}
if(@sold_nameid[@i] == 501){
+ delitem 501, @sold_quantity[@i];
set $@rpotsleft, $@rpotsleft + @sold_quantity[@i];
set Zeny, Zeny + @sold_quantity[@i]*20;
- delitem 501, @sold_quantity[@i];
} else {
if(@sold_nameid[@i] == 502){
+ delitem 502, @sold_quantity[@i];
set $@opotsleft, $@opotsleft + @sold_quantity[@i];
set Zeny, Zeny + @sold_quantity[@i]*100;
- delitem 502, @sold_quantity[@i];
} else {
mes "Sorry, I don't need your items.";
+ close;
}
}
}
@@ -34,7 +35,7 @@ OnBuyItem:
for(set @i, 0; @i < getarraysize(@bought_nameid); set @i, @i + 1){
if(@bought_quantity[@i] <= 0){
mes "omgh4x!";
- end;
+ close;
}
if(@bought_nameid[@i] == 501){
if(@bought_quantity[@i] > $@rpotsleft){
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 29e9edee4..383a3c301 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4,7 +4,7 @@
//= A reference manual for the eAthena scripting language.
//= Commands are sorted depending on their functionality.
//===== Version ===========================================
-//= 3.28.20091119
+//= 3.34.20101217
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@@ -137,6 +137,22 @@
//= Added info on strcharinfo(3) [Skotlex]
//= 3.29.20101123
//= Added 'pushpc' command. [Ai4rei]
+//= 3.30.20101126
+//= Added 'setfont', 'mercenary_create', 'mercenary_heal',
+//= 'mercenary_sc_start', 'mercenary_get_calls', 'mercenary_set_calls',
+//= 'mercenary_get_faith' and 'mercenary_set_faith' commands. [Ai4rei]
+//= 3.31.20101130
+//= Added 'progressbar' command. [Ai4rei]
+//= 3.32.20101208
+//= Updated description for commands 'next', 'return', 'attachrid',
+//= 'detachrid', 'itemskill', 'openstorage', 'skilleffect', 'donpcevent',
+//= 'day', 'night', 'atoi', 'axtoi', 'jump_zero', 'getelementofarray',
+//= 'changebase', 'kickwaitingroomall', 'cutin' and 'charcommand'. [Ai4rei]
+//= 3.33.20101212
+//= Updated description of 'playBGM' and 'playBGMall' to reflect the actual
+//= behavior. [Ai4rei]
+//= 3.34.20101217
+//= Spellcheck. [Ai4rei]
//=========================================================
This document is a reference manual for all the scripting commands and functions
@@ -219,7 +235,7 @@ Another configuration file option of relevance is:
delnpc: <path to a filename>
-This will unload a specifiled script filename from memory, which, while
+This will unload a specified script filename from memory, which, while
seemingly useless, may sometimes be required.
Whenever '//' is encountered in a line upon reading, everything beyond this on
@@ -299,7 +315,7 @@ the database by adjoining the level after the name with a comma. eg:
Event is a script event to be executed when the mob is killed. The event must
be in the form "NPCName::OnEventName" to execute, and the event name label
-should start with "On". As with all events, if the NPC is an on-touch npc, the
+should start with "On". As with all events, if the NPC is an on-touch NPC, the
player who triggers the script must be within 'trigger' range for the event to
work.
@@ -309,21 +325,21 @@ special ai mobs (which by default attack other monsters instead of players).
You can add these, so using 10 will spawn small monsters that attack other
mobs (if you specify both 2 and 4, the small version takes priority).
-** Npc names
+** NPC names
-/!\ WARNING: this applies to warps, npcs, duplicates and shops /!\
+/!\ WARNING: this applies to warps, NPCs, duplicates and shops /!\
-Npc names are kinda special and are formatted this way:
+NPC names are kinda special and are formatted this way:
<Display name>{::<Unique name>}
-All npcs need to have a unique name that is used for identification purposes.
-When you have to identify a npc by it's name, you should use <Unique name>.
+All NPCs need to have a unique name that is used for identification purposes.
+When you have to identify a NPC by it's name, you should use <Unique name>.
If <Unique name> is not provided, use <Display name> instead.
The client has a special feature when displaying names:
if the display name contains a '#' character, it hides that part of the name.
-ex: if your npc is named 'Hunter#hunter1', it will be displayed as 'Hunter'
+ex: if your NPC is named 'Hunter#hunter1', it will be displayed as 'Hunter'
<Display name> must be at most 24 characters in length.
<Unique name> must be at most 24 characters in length.
@@ -492,15 +508,16 @@ implemented (but NEVER documented by Lance. Shame on you...).
Item and pet scripts
--------------------
-Each item in the item database has two special fields - EquipScript and
-UseScript. The first is script code run every time a character equips the item,
+Each item in the item database has three special fields - Script , OnEquip_Script
+and OnUnequip_Script. The first is script code run every time a character equips the item,
with the RID of the equipping character. Every time they unequip an item, all
temporary bonuses given by the script commands are cleared, and all the scripts
are executed once again to rebuild them. This also happens in several other
situations (like upon login) but the full list is currently unknown.
-UseScript is a piece of script code run whenever the item is used by a character
-by doubleclicking on it.
+OnEquip_Script is a piece of script code run whenever the item is used by a character
+by doubleclicking on it. OnUnequip_Script runs whenever the
+equipment is unequip by a character
Not all script commands work properly in the item scripts. Where commands and
functions are known to be meant specifically for use in item scripts, they are
@@ -519,7 +536,7 @@ Numbers
Beside the common decimal numbers, which are nothing special whatsoever (though
do not expect to use fractions, since ALL numbers are integer in this language),
the script engine also handles hexadecimal numbers, which are otherwise
-identical. Writing a number like '0x<hex digits>' will make it recognised as a
+identical. Writing a number like '0x<hex digits>' will make it recognized as a
hexadecimal value. Notice that 0x10 is equal to 16. Also notice that if you try
to 'mes 0x10' it will print '16'.
@@ -533,7 +550,7 @@ data.
Variables are divided into and uniquely identified by the combination of:
prefix - determines the scope and extent (or lifetime) of the variable
-name - an identifier consisting of '_' and alfanumeric characters
+name - an identifier consisting of '_' and alphanumeric characters
postfix - determines the type of the variable: integer or string
Scope can be:
@@ -549,8 +566,10 @@ permanent - They still exist when the server resets.
temporary - They cease to exist when the server resets.
Prefix: scope and extent
-nothing - A permanent variable attached to the character, the default
- variable type.
+nothing - A permanent variable attached to the character, the default variable
+ type. They are stored with all the account data in "save\athena.txt"
+ in TXT versions and in the SQL versions in the `global_reg_value`
+ table using type 3.
"@" - A temporary variable attached to the character.
SVN versions before 2094 revision and RC5 version will also treat
'l' as a temporary variable prefix, so beware of having variable
@@ -562,8 +581,8 @@ nothing - A permanent variable attached to the character, the default
This is important for scripts which are called with no RID
attached, that is, not triggered by a specific character object.
"." - A NPC variable.
- They exist in the NPC and dissapear when the server restarts or the
- npc is reloaded. Can be accessed from inside the NPC or by calling
+ They exist in the NPC and disappear when the server restarts or the
+ NPC is reloaded. Can be accessed from inside the NPC or by calling
'getvariableofnpc'.
".@" - A scope variable.
They are unique to the instance and scope. Each instance has it's
@@ -597,8 +616,8 @@ Examples:
$name$ - permanent global string variable
$@name - temporary global integer variable
$@name$ - temporary global string variable
- .name - npc integer variable
- .name$ - npc string variable
+ .name - NPC integer variable
+ .name$ - NPC string variable
.@name - scope integer variable
.@name$ - scope string variable
#name - permanent local account integer variable
@@ -623,7 +642,7 @@ BaseLevel - Current base level
SkillPoint - Amount of skill points remaining
Class - Current job
Upper - 1 if the character is an advanced job class.
-Zeny - Current amount of zeny
+Zeny - Current amount of Zeny
Sex - Character's gender, 0 if female, 1 if male.
Weight - The weight the character currently carries.
MaxWeight - The maximum weight the character can carry.
@@ -650,7 +669,7 @@ While these behave as variables, do not always expect to just set them - it is
not certain whether this will work for all of them. Whenever there is a command
or a function to set something, it's usually preferable to use that instead. The
notable exception is Zeny, which you can and often will address directly -
-setting it will make the character own this number of zeny.
+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.
Strings
@@ -686,11 +705,11 @@ This will make @arrayofnumbers[100] equal to 10.
Notice that index numbering always starts with 0. Arrays cannot hold more than
128 variables. (So the last one can't have a number higher than 127)
-And array indices probably can't be negative. Nobody tested what happens when
+And array indexes probably can't be negative. Nobody tested what happens when
you try to get a negatively numbered variable from an array, but it's not going
to be pretty. :)
-Arrays can naturaly store strings:
+Arrays can naturally store strings:
@menulines$[0] is the 0th element of the @menulines$ array of strings. Notice
the '$', normally denoting a string variable, before the square brackets that
@@ -747,7 +766,7 @@ common mathematical operations or conditional operators
+ - will add two numbers. If you try to add two strings, the result will be a
string glued together at the +. You can add a number to a string, and the
result will be a string. No other math operators work with strings.
-- - will subtract two numbers.
+- - will subtract two numbers.
* - will multiply two numbers.
/ - will divide two numbers. Note that this is an integer division, i.e.
7/2 is not equal 3.5, it's equal 3.
@@ -807,18 +826,18 @@ Logical bitwise operators work only on numbers, and they are the following:
The second mes command would display 4, which is the same as 16 / 2 = 8. 8 / 2 = 4.
& - And.
| - Or.
- The bitwise operator AND (&) is used to test two values against eachother,
+ The bitwise operator AND (&) is used to test two values against each other,
and results in setting bits which are active in both arguments. This can
be used for a few things, but in eAthena this operator is usually used to
- create bitmasks in scripts.
+ create bit-masks in scripts.
The bitwise operator OR (|)sets to 1 a binary position if the binary position
of one of the numbers is 1. This way a variable can hold several values we can check,
- known as bitmaks. A variable currently can hold up to 32 bitmasks (from position 0
+ known as bit-mask. A variable currently can hold up to 32 bit-masks (from position 0
to position 1). This is a cheap(skate) and easy way to avoid using arrays to store several checks
that a player can have.
- A bitmask basically is (ab)using the variables bits to set various options in
+ A bit-mask basically is (ab)using the variables bits to set various options in
one variable. With the current limit if variables it is possible to store 32
different options in one variable (by using the bits on position 0 to 31).
@@ -831,7 +850,7 @@ Logical bitwise operators work only on numbers, and they are the following:
The & (AND) operator sets bits which are active (1) in both arguments, so in the
example 1010 & 0010, only the 2^1 bit is active (1) in both. Resulting in the bit
0010, which is 2.
- - Basic example of creating and using a bit mask:
+ - Basic example of creating and using a bit-mask:
set @options,2|4|16; //(note: this is the same as 2+4+16, or 22)
if (@options & 1) mes "Option 1 is activated";
if (@options & 2) mes "Option 2 is activated";
@@ -844,7 +863,7 @@ Logical bitwise operators work only on numbers, and they are the following:
The bitwise operator XOR (eXclusive OR) sets a binary position to 0 if both
numbers have the same value in the said position. On the other hand, it
sets to 1 if they have different values in the said binary position.
- This is another way of setting and unsetting bits in bitmasks.
+ This is another way of setting and unsetting bits in bit-masks.
Example:
- First let's set the quests that are currently in progress:
@@ -860,10 +879,56 @@ Logical bitwise operators work only on numbers, and they are the following:
if( inProgress&1 && isComplete ){
// this will unset the bit for quest 1 (inProgress has that bit set to 1)
set inProgress,inProgress^1;
- mes "Quest 1 complete!! You unlocked the secrets of the Xor dinasty, use them wisely.";
+ mes "Quest 1 complete!! You unlocked the secrets of the Xor dynasty, use them wisely.";
+ close;
+ }
+
+Unary operators with only with a single number, which follows the operator, and
+are following:
+
+ - - Negation.
+ The sign of the number will be reversed. If the number was positive, it will
+ become negative and vice versa.
+
+ Example:
+ set .@myvar,10;
+ mes "Negative 10 is "+(-.@myvar);
+
+ ! - Logical Not.
+ Reverses the boolean result of an expression. True will become false and
+ false will become true.
+
+ Example:
+ if(!callfunc("F_dosomething"))
+ {
+ mes "Doing something failed.";
close;
}
+ ~ - Bitwise Not.
+ Reverses each bit in a number, also known as one's complement. Cleared bits
+ are set, and set bits are cleared.
+
+ Example:
+ - Ensure, that quest 2 is disabled, while keeping all other active, if they are.
+ set inProgress,inProgress&(~2); // same as set inProgress,inProgress&0xfffffffd
+
+Ternary operators take three expressions (numbers, strings or boolean), and are
+following:
+
+ ?: - Conditional operator
+ Very useful e.g. to replace
+
+ if(Sex) mes "..."; else mes "...";
+
+ clauses with simple
+
+ mes "Welcome, " + (Sex?"Mr.":"Mrs.") + " " + strcharinfo(0);
+
+ or to replace any other simple if-else clauses. It might be worth
+ mentioning that ?: has low priority and has to be enclosed with
+ parenthesis in most (if not all) cases.
+
Labels
------
@@ -912,12 +977,12 @@ done with @agitstart GM command or with 'AgitStart' script command. OnAgitEnd
will do likewise for the end of WoE. OnAgitInit will run when castle data is
loaded from the char-server by the map server.
-No RID will be attached while any of the abovementioned labels are triggered, so
+No RID will be attached while any of the above mentioned labels are triggered, so
no character or account-based variables will be accessible, until you attach a
RID with 'attachrid' (see below).
-The above also applies to, the last three laels, the only difference is that
-these labels are used exclusively for WoE SE, and are called independantly.
+The above also applies to, the last three labels, the only difference is that
+these labels are used exclusively for WoE SE, and are called independently.
OnTouch:
@@ -953,7 +1018,7 @@ OnPCLoadMapEvent:
This special label will trigger once a player steps in a map marked with the
'loadevent' mapflag and attach its RID. The fact that this label requires a
mapflag for it to work is because, otherwise, it'd be server-wide and trigger
-everytime a player would change maps. Imagine the server load with 1,000 players
+every time a player would change maps. Imagine the server load with 1,000 players
(oh the pain...)
Only the special labels which are not associated with any script command are
@@ -963,7 +1028,7 @@ manner, but they are described with their associated commands.
On<label name>:
These special labels are used with Mob scripts mostly, and script commands
-that requires you to point/link a command to a mob or another npc, giving a label
+that requires you to point/link a command to a mob or another NPC, giving a label
name to start from. The label name can be any of your liking, but must be
Example:
@@ -981,6 +1046,15 @@ OnThisMobDeath:
Each time you kill one, that announce will appear in blue to everyone.
+"Global" labels
+
+There's a catch with labels and doevent. If you call a label (using doevent)
+and called label is in NPC that has trigger area, that label must end with
+"Global" to work globally (i.e. if RID is outside of the trigger area, which
+usually happens since otherwise there would be no point calling the label with
+doevent, because OnTouch would do the job). For further reference look for
+npc_event in npc.c.
+
Scripting commands and functions
--------------------------------
@@ -1008,9 +1082,10 @@ From here on, we will have the commands sorted as follow:
4.- Player-related commands.
5.- Mob / NPC -related commands.
6.- Other commands.
-7.- Instance Commands.
-8.- Quest Log Commands.
+7.- Instance commands.
+8.- Quest Log commands.
9.- Battleground commands.
+10.- Mercenary commands.
=====================
|1.- Basic commands.|
@@ -1049,9 +1124,14 @@ either side solves the problem.
*next;
-This command will create a 'next' button in the message window for the invoking
-character. If no window is currently on screen, it will be created. Used to
-segment NPC talking, this command is used A LOT. See 'mes'.
+This command will display a 'next' button in the message window for the
+invoking character. Clicking on it will cause the window to clear and display
+a new one. Used to segment NPC-talking, next is often used in combination with
+'mes' and 'close'.
+
+If no window is currently on screen, one will be created, but once the invoking
+character clicks on it, a warning is thrown on the server console and the script
+will terminate.
mes "[Woman]";
mes "This would appear on the page";
@@ -1098,7 +1178,7 @@ Don't expect things to run smoothly if you don't make your scripts 'end'.
*end;
This command will stop the execution for this particular script. The two
-versions are prefectly equivalent. It is the normal way to end a script which
+versions are perfectly equivalent. It is the normal way to end a script which
does not use 'mes'.
if (BaseLevel<=10) goto L_Lvl10;
@@ -1134,7 +1214,7 @@ This command will set a variable to the value that the expression results in.
This is the only way to set a variable directly.
This is the most basic script command and is used a lot whenever you try to do
-anything more advanced than just printing text into a messagebox.
+anything more advanced than just printing text into a message box.
set @x,100;
@@ -1184,7 +1264,7 @@ Returns a reference to a NPC variable (. prefix) from the target NPC.
This can only be used to get . variables.
Example(s):
-//This will return the value of .var, note that this can't be used, since the value isn't catched.
+//This will return the value of .var, note that this can't be used, since the value isn't caught.
getvariableofnpc(.var,"TargetNPC");
//This will set the .v variable to the value of the TargetNPC's .var variable.
@@ -1418,8 +1498,8 @@ allow the player to enter text. Otherwise, only numbers will be allowed.
Normally you may not input a negative number with this command.
This is done to prevent exploits in badly written scripts, which would
-let people, for example, put negative amounts of zeny into a bank script and
-receive free zeny as a result.
+let people, for example, put negative amounts of Zeny into a bank script and
+receive free Zeny as a result.
Since trunk r12192 the command has two optional arguments and a return value.
The default value of 'min' and 'max' can be set with 'input_min_value' and
@@ -1507,7 +1587,7 @@ S_CheckFull:
return;
Example 2: callsub used repeatedly, with different arguments
-// notice how the zeny check/delete is reused, instead of copy-pasting for every warp
+// notice how the Zeny check/delete is reused, instead of copy-pasting for every warp
switch(select("Abyss Lake:Amatsu Dungeon:Anthell:Ayothaya Dungeon:Beacon Island, Pharos") {
case 1: callsub S_DunWarp,"hu_fild05",192,207;
case 2: callsub S_DunWarp,"ama_in02",119,181;
@@ -1527,7 +1607,7 @@ S_DunWarp:
set Zeny, Zeny-100;
warp getarg(0),getarg(1),getarg(2);
} else {
- mes "Dungeon warp costs 100 zeny.";
+ mes "Dungeon warp costs 100 Zeny.";
}
close;
@@ -1588,9 +1668,13 @@ in the previous example getarg(2,-1) would be 3 and getarg(3,-1) would be -1
*return {<value>};
-When you use callsub or callfunc, this command allows you to go back to the
-calling script. You can optionally return with a value telling the calling
-program what exactly happened.
+This command causes the script execution to leave previously called function
+with callfunc or script with callsub and return to the location, where the call
+originated from. Optionally a return value can be supplied, when the call was
+done using the function form.
+
+Using this command outside of functions or scripts referenced by callsub will
+result in error and termination of the script.
callfunc "<your function>";// when nothing is returned
set <variable>,callfunc("<your function>");// when a value is being returned
@@ -1605,9 +1689,9 @@ program what exactly happened.
(Skotlex stop being so selfish and give us all the commands T~T! J/k lol :P)
-This works like callfunc, but doesn't support arguments like callfunc. It's used for cleaner
-and fast script that doesn't require arguments for it to work. Also they must be inside a script.
-They're not separated scripts and they work more like labels.
+This works like callfunc. It's used for cleaner and fast scripting. Also they
+must be inside a script. They're not separated scripts and they work more like
+labels with arguments.
Note it looks like the normal declaration
@@ -1615,10 +1699,10 @@ Usage:
You first Declare the function with function <function name>;.
-Put the rest of your code. You can use then <function name>; to call the function. If it returns a value is unsure,
-test it if you want and give us some comments ;3
+Put the rest of your code. You can use then <function name>; to call the
+function. It can also return a value when used with parentheses.
-And at least, but inside the script itself, put the function <function name> {<code>}.
+And at last, but inside the script itself, put the function <function name> {<code>}.
Example:
@@ -1638,7 +1722,7 @@ if (Zeny > 50) && (BaseLevel > 50) {
set @needed,50-BaseLevel;
mes "You either are Level "+BaseLevel+", thus you need "+@needed+" more levels";
-mes "to be able to use this npc; or you don't have enough zeny, so get some please";
+mes "to be able to use this NPC; or you don't have enough Zeny, so get some please";
close;
function SF_Selling {
@@ -1667,6 +1751,24 @@ function SF_Selling {
return;
}
+Example with parameters and return value:
+
+prontera,150,150,0 script TestNPC 123,{
+ function MyAdd;
+
+ mes "Enter two numbers.";
+ next;
+ input .@a;
+ input .@b;
+ mes .@a+" + "+.@b+" = "+MyAdd(.@a,.@b);
+ close;
+
+ function MyAdd
+ {
+ return getarg(0)+getarg(1);
+ }
+}
+
---------------------------------------
@@ -1721,7 +1823,7 @@ Example 3:
if (@var==1) mes "This is the first time you have talked to me";
if (@var==2) mes "This is the second time you have talked to me";
if (@var==3) mes "This is the third time you have talked to me";
- if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgoten about you";
+ if (@var==4) mes "This is the forth time you have talked to me, but I think I am getting amnesia, I have forgotten about you";
if (@var==4) set @var,0;
close;
@@ -1733,7 +1835,7 @@ Example 4:
mes "Can you please bring me an apple?";
close;
L_GiveApple:
- mes "Oh an apple, I didnt want it, I just wanted to see one";
+ mes "Oh an apple, I didn't want it, I just wanted to see one";
close;
Example 5:
@@ -1801,7 +1903,7 @@ if (<condition)
}
Remember that if you plan to do several actions upon the condition being false, and
-you forget to use the curlies (the { } ), the second action will be executed regardless
+you forget to use the curly braces (the { } ), the second action will be executed regardless
the output of the condition, unless of course, you stop the execution of the script if the
condition is true (that is, in the first grouping using a return; , and end; or a close; )
@@ -1826,10 +1928,12 @@ else if (<condition 2>)
This command works kinda like an 'if'+'goto' combination in one go. (See 'if').
If the condition is false (equal to zero) this command will immediately jump to
-the specified label like in 'goto'.
+the specified label like in 'goto'. While 'if' is more generally useful, for
+some cases this could be an optimization.
-While 'if' is more generally useful, for some cases this could be an
-optimisation.
+The main reason for this command is that other control statements, like
+'switch', 'for' or 'while', are disassembled into simple expressions together
+with this command when a script is parsed.
---------------------------------------
@@ -1897,8 +2001,8 @@ Example 2:
*do { <statement>; } while (<condition>);
-The 'do...while' is the only posttest loop structure available in this script
-language. With a posttest, the statements are executed once before the condition
+The 'do...while' is the only post-test loop structure available in this script
+language. With a post-test, the statements are executed once before the condition
is tested. When the condition is true, the statement(s) are repeated. When the
condition is false, control is transferred to the statement following the
'do...while' loop expression.
@@ -2030,7 +2134,7 @@ returned when requesting that information.
*strnpcinfo(<type>)
-This function will return the various parts of the name of the calling npc.
+This function will return the various parts of the name of the calling NPC.
Whatever it returns is determined by type.
0 - The NPC's display name (visible#hidden)
@@ -2062,16 +2166,13 @@ This will make @arraysize == 6. But if you try this:
*getelementofarray(<array name>,<index>)
-This function will return an array's element when given an index.
-
- // This will find the 2nd array value
- getelementofarray(@array,1)
+This command retrieves the value of the element of given array at given index.
+This is equivalent to using:
-Pretty pointless now when we have
+ array[index]
- @array[1]
-
-which has the same effect.
+The reason for this is, that this short form is internally converted into a call
+to getelementofarray, when the script is loaded.
---------------------------------------
@@ -2099,9 +2200,9 @@ putting
StatusPoint
will give you the same result, and some of these parameters work just like
-variables (i.e. you can 'set Zeny,100' to make the character have 100 zeny,
-destroying whatever zeny they had before, or 'set Zeny,Zeny+100' to give them
-100 zeny)
+variables (i.e. you can 'set Zeny,100' to make the character have 100 Zeny,
+destroying whatever Zeny they had before, or 'set Zeny,Zeny+100' to give them
+100 Zeny)
You can also use this command to get stat values:
@@ -2194,7 +2295,7 @@ else.
Upon executing this,
-$@partymembername$[] is a global temporary stringarray which contains all the
+$@partymembername$[] is a global temporary string array which contains all the
names of these party members
(only set when type is 0 or not specified)
@@ -2249,7 +2350,7 @@ Example:
*getpartyleader(<party id>{,<type>})
This function returns some information about the given party-id's leader.
-When type is ommitted, the default information retrieved is the leader's name.
+When type is omitted, the default information retrieved is the leader's name.
Possible types are:
1: Leader account id
@@ -2266,7 +2367,7 @@ returns "null" instead of the character name, and -1 for the other types.
*getlook(<type>)
-This function will return the number for the currentcharacter look value
+This function will return the number for the current character look value
specified by type. See 'setlook' for valid look types.
This can be used to make a certain script behave differently for characters
@@ -2277,7 +2378,7 @@ dressed in black. :)
*getsavepoint(<information type>)
This function will return information about the invoking character's save point.
-You can use it to let a character swap between several recorded savepoints.
+You can use it to let a character swap between several recorded save points.
Available information types are:
0 - Map name (a string)
@@ -2293,7 +2394,7 @@ Available information types are:
*getequipid(<equipment slot>)
This function returns the item ID of the item equipped in the equipment slot
-specified on the invoking character. If nothing is equpped there, it returns -1.
+specified on the invoking character. If nothing is equipped there, it returns -1.
Valid equipment slots are:
EQI_HEAD_TOP (1) - Upper head gear
@@ -2310,8 +2411,8 @@ EQI_HEAD_LOW (10) - Lower Headgear (beards, some masks)
Notice that a few items occupy several equipment slots, and if the character is
wearing such an item, 'getequipid' will return it's ID number for either slot.
-Can be used to check if you have something equiped, or if you haven't got
-something equiped:
+Can be used to check if you have something equipped, or if you haven't got
+something equipped:
if(getequipid(EQI_HEAD_TOP)==2234) goto L_WearingTiara;
mes "Come back when you have a Tiara on";
@@ -2417,7 +2518,7 @@ see 'getequipid'.
*getequiprefinerycnt(<equipment slot>)
-Returns the current number of plusses for the item in the specified equipment
+Returns the current number of pluses for the item in the specified equipment
slot. For a list of equipment slots see 'getequipid'.
Can be used to check if you have reached a maximum refine value, default for
@@ -2465,7 +2566,7 @@ Or for the left hand, cause it can hold a weapon or a shield:
}
close;
L_NothingEquiped:
- mes "Seems you have nothing equiped";
+ mes "Seems you have nothing equipped";
close;
---------------------------------------
@@ -2474,7 +2575,7 @@ Or for the left hand, cause it can hold a weapon or a shield:
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 sucess rate for a given weapon level of
+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
equipment slots see 'getequipid'.
@@ -2527,7 +2628,7 @@ recreate these items perfectly if they are destroyed. Here's what you get:
@inventorylist_card3[] inscribed on the items, so you can explicitly check
@inventorylist_card4[] if the character owns an item made by a specific
craftsman.
-@inventorylist_expire[] - expire time (Unix timestamp). 0 means never expires.
+@inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires.
@inventorylist_count - the number of items in these lists.
This could be handy to save/restore a character's inventory, since no other
@@ -2557,7 +2658,7 @@ While this function was meant for item scripts, it will work outside them:
*getrefine()
-This function will return the number of plusses the weapon currently equipped on
+This function will return the number of pluses the weapon currently equipped on
the invoking character has been refined for.
While this function was meant for item scripts, it will work outside them:
@@ -2689,7 +2790,7 @@ This function will return the GM level of the account to which the invoking
character belongs. If this is somehow executed from a console command, 99 will
be returned, and 0 will be returned if the account has no GM level.
-This allows you to make NPC's only accessable for certain GM levels, or behave
+This allows you to make NPC's only accessible for certain GM levels, or behave
specially when talked to by GMs.
if (getgmlevel()) mes "What is your command, your godhood?";
@@ -2755,15 +2856,12 @@ This will print a full date and time like 'YYYY-MM/DD HH:MM:SS'.
This function will return a number of users on a map or the whole server. What
it returns is specified by Type.
-Type is a bitmask, add up to get the effects you want:
+Type can be one of the following values, which control what will be returned:
- 8 - This will count all characters on the same map as the current NPC.
- (By default, it will count people on the same map as the character)
- 7 - Return the amount of players for the entire server.
- (By default, only the players on the map will be counted.)
-
-So 'getusers(0)' will return the number of characters on the same map as the
-invoking character, while 'getusers(7)' will give the count for entire server.
+ 0 - Count of all characters on the map of the invoking character.
+ 1 - Count of all characters in the entire server.
+ 8 - Count of all characters on the map of the NPC the script is
+ running in.
---------------------------------------
@@ -2827,9 +2925,9 @@ ID number. If there is no such guild, "null" will be returned.
// In this example it would return "MissDjax" cause she owns "AlcoROhics" (10007)
mes getguildmaster(10007)+" runs "+getguildname(10007);
-Can be used to check if the character is the guildmaster of the specified guild.
+Can be used to check if the character is the guild master of the specified guild.
-Maybe you want to make a room only guildmasters can enter:
+Maybe you want to make a room only guild masters can enter:
set @GID,getcharid(2);
if(@GID==0) goto L_NoGuild;
@@ -2848,8 +2946,8 @@ Maybe you want to make a room only guildmasters can enter:
*getguildmasterid(<guild id>)
-This function will return the character ID number of the guildmaster of the
-guild specified by the ID. 0 if the character is not a guildmaster of any guild.
+This function will return the character ID number of the guild master of the
+guild specified by the ID. 0 if the character is not a guild master of any guild.
---------------------------------------
@@ -2874,9 +2972,9 @@ Valid types of data are:
of an 'OnAgitInit:' event mentioned at the beginning of this document.
1 - Guild ID
2 - Castle Economy score.
- 3 - Castle Defence score.
+ 3 - Castle Defense score.
4 - Number of times the economy was invested in today.
- 5 - Number of times the defence was invested in today.
+ 5 - Number of times the defense was invested in today.
9 - Will return 1 if a Kafra was hired for this castle, 0 otherwise.
10 - Is 1 if the 1st guardian is present (Soldier Guardian)
11 - Is 1 if the 2nd guardian is present (Soldier Guardian)
@@ -3126,16 +3224,16 @@ other length limits and asking them to try to input something else.
*skillpointcount()
-Returns the total amount of skill points a character posesses (SkillPoint+SP's used in skills)
-This command can be used to check the currently attached characters total amount of skillpoints.
-This means the skillpoints used in skill are counted, and added to SkillPoints (number of skill points not used).
+Returns the total amount of skill points a character possesses (SkillPoint+SP's used in skills)
+This command can be used to check the currently attached characters total amount of skill points.
+This means the skill points used in skill are counted, and added to SkillPoints (number of skill points not used).
Example:
-//This will set the temp character variable @skillPoints to the amount of skillpoints,
+//This will set the temp character variable @skillPoints to the amount of skill points,
//and then tell the player the value.
set @skillPoints, skillPointCount();
- mes "You have "+@skillPoints+" skillpoints in total!";
+ mes "You have "+@skillPoints+" skill points in total!";
//Self-explanatory... :P
if (skillPointCount() > 20)
@@ -3168,7 +3266,7 @@ currently work due to a bug.
*playerattached()
Returns the ID of the player currently attached to the script. It will return
-0 if noone is attached, or if the attached player no longer exists on the map
+0 if no one is attached, or if the attached player no longer exists on the map
server. It is wise to check for the attached player in script functions that
deal with timers as there's no guarantee the player will still be logged on
when the timer triggers. Note that the ID of a player is actually their
@@ -3194,7 +3292,7 @@ abuse or create some very unfair errors.
This function, in addition to checking to see if the player is capable of
holding a set amount of items, also ensures the player has room in their
-inventory for the item(s) they will be receciving.
+inventory for the item(s) they will be receiving.
Like 'getitem', this function will also accept an 'english name' from the
database as an argument.
@@ -3205,13 +3303,13 @@ database as an argument.
getitem 502,10;
close;
L_OverWeight:
- mes "Sorry you cannot hold this ammount of apples";
+ mes "Sorry you cannot hold this amount of apples";
close;
Or to put this another way:
if (checkweight("APPLE",10)) goto L_Getapples;
- mes "Sorry you cannot hold this ammount of apples";
+ mes "Sorry you cannot hold this amount of apples";
close;
L_Getapples:
getitem 502,10;
@@ -3227,7 +3325,7 @@ This function will return the state of the configuration option
'basic_skill_check' in 'battle_athena.conf'. It returns 1 if the option is
enabled and 0 if it isn't. If the 'basic_skill_check' option is enabled, which
it is by default, characters must have a certain number of basic skill levels to
-sit, request a trade, use emoticons, etc. Making your script behave differently
+sit, request a trade, use emotions, etc. Making your script behave differently
depending on whether the characters must actually have the skill to do all these
things might in some cases be required.
@@ -3282,7 +3380,7 @@ Option numbers valid for the third version (opt2) of this command are:
0x10 - Blinded.
0x80 - Deadly poisoned.
-Option numbers (except for opt1) are bitmasks - you can add them up to check
+Option numbers (except for opt1) are bit-masks - you can add them up to check
for several states, but the functions will return true if at least one of them
is in effect.
@@ -3333,7 +3431,7 @@ and 0 if they don't.
If <flag> is 0 this command will remove the mount from the character.
Otherwise it give the invoking character a PecoPeco (if they are a Knight
-series class) or a GrandPeco (if they are a Crusader seriesclass). Unlike
+series class) or a GrandPeco (if they are a Crusader series class). Unlike
'setfalcon' and 'setcart' this will not work at all if they aren't of a class
which can ride.
Note: the character needs to have the skill KN_RIDING to gain a mount
@@ -3349,7 +3447,7 @@ bird and 0 if they don't.
*checkchatting ({"<Player Name>"})
If the player's name is given, this command checks for that player
-to be online and wether he/she is chatting or vending.
+to be online and whether he/she is chatting or vending.
When no name is given, the attached player is used for checking.
Returns true or false (1 or 0) when the player is chatting/vending or not.
@@ -3393,7 +3491,7 @@ more:
This function will return 1 if the invoking character has all of the item
IDs given equipped (if card IDs are passed, then it checks if the cards are
-inserted into slots in the equipment they are currently wearing). Theorically
+inserted into slots in the equipment they are currently wearing). Theoretically
there is no limit to the number of items that may be tested for at the same time.
If even one of the items given is not equipped, 0 will be returned.
@@ -3447,18 +3545,13 @@ For a list of equipment slots see 'getequipid'.
*attachrid(<account ID>)
*detachrid;
-A 'RID' is an ID of a character who caused the NPC script to run, as has been
-explained above in the introduction section. Quite a bit of commands want a RID
-to work, since they wouldn't know where to send information otherwise. And in
-quite a few cases the script gets invoked with a RID of zero (like through
-OnTime special labels). If an NPC script needs this, it can attach a specified
-character's id to itself. by calling the 'attachrid' function.
-
-'attachrid' returns 1 if the character was found online and 0 if it wasn't.
+These commands allow the manipulation of the script's currently attached player.
+While attachrid allows attaching of a different player by using it's account id
+for the parameter rid, detachrid makes the following commands run, as if the
+script was never invoked by a player.
-This could also be used, while running in a script invoked by a character
-through talking to an NPC, to mess with other characters.
-Detaching the RID will make the RID of the script zero.
+In case, that the player cannot be attached, such as, when the player went
+offline in the mean time, attachrid returns 0, otherwise 1.
---------------------------------------
@@ -3489,7 +3582,7 @@ window.
*warp "<map name>",<x>,<y>;
-This command will take the invoking character to the specifed map, and if
+This command will take the invoking character to the specified map, and if
wanted, specified coordinates too, but these can be random.
warp "place",50,55;
@@ -3508,7 +3601,7 @@ on all official maps. If you're using custom maps, beware.
There are also three special 'map names' you can use.
"Random" will warp the player randomly on the current map.
-"Save" and "SavePoint" will warp the player back to their savepoint.
+"Save" and "SavePoint" will warp the player back to their save point.
---------------------------------------
@@ -3542,7 +3635,7 @@ See also 'warp'.
Warps a party to specified map and coordinate given the party ID, which you can get with
getcharid(1). You can also request another party id given a member's name with getcharid(1,<player_name>).
-You can use the following "map names" for special warping behaviour:
+You can use the following "map names" for special warping behavior:
Random: All party members are randomly warped in their current map (as if they
all used a fly wing)
SavePointAll: All party members are warped to their respective save point.
@@ -3635,7 +3728,7 @@ etc, etc. Since which kind of effect is shown depends on what item was used,
using it in an NPC script will not have a desired effect.
There is also a nice example on using this with the 'rand' function, to give you
-a random ammount of healing.
+a random amount of healing.
// This will heal anything thing from 100 to 150 HP and no SP
itemheal rand(100,150),0;
@@ -3651,7 +3744,7 @@ by a set value - it adds percent of their maximum HP/SP.
percentheal 0,100; // This will heal 100% SP
percentheal 50,50; // This will heal 50% HP and 50% SP
-So the amount that this will heal will depend on the total ammount of HP or SP
+So the amount that this will heal will depend on the total amount of HP or SP
you have maximum. Like 'heal', this will not call up any animations or effects.
---------------------------------------
@@ -3756,8 +3849,6 @@ It would be entered in the equip bonus section of an item
2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,119529470,7,0,16,,0,1,0,{ bonus bMdef,15; changebase 22; }
-This command only works when inside item scripts.
-
---------------------------------------
*classchange <view id>,<type>;
@@ -3809,7 +3900,7 @@ You can also use the "set" command with the constants defined in 'db/const.txt':
set BaseExp,BaseExp+10000;
set JobExp,JobExp+5000;
-You can also reduce the ammount of experience points:
+You can also reduce the amount of experience points:
set BaseExp,BaseExp-10000;
@@ -3828,12 +3919,12 @@ a palette number that exists/is usable by the client you use.
'changelook' works the same, but is only client side (it doesn't save the look value).
// This will change your hair(6), so that it uses palette 8, what ever your
- // palette 8 is, your hair will use that colour
+ // palette 8 is, your hair will use that color
setlook 6,8;
// This will change your clothes(7), so they are using palette 1, whatever
- // your palette 1 is, your clothes will then use that set of colours.
+ // your palette 1 is, your clothes will then use that set of colors.
setlook 7,1;
@@ -3850,7 +3941,7 @@ Here are the possible look types:
8 - Shield
9 - Shoes
-Whatever 'shoes' means is anybody's guess, ask Gravity - the client does nothing
+Whatever 'shoes' means is anyone's guess, ask Gravity - the client does nothing
with this value. It still wants it from the server though, so it is kept, but
normally doesn't do a thing.
@@ -3866,7 +3957,7 @@ However, it might be an easy way to quickly check for empty view IDs for
sprites, which is essential for making custom headgear.
Since a lot of people have different palettes for hair and clothes, it's
-impossible to tell you what all the colour numbers are. If you want a serious
+impossible to tell you what all the color numbers are. If you want a serious
example, there is a Stylist script inside the default eAthena installation that
you can look at, this may help you create a Stylist of your own:
'custom\dye.txt'
@@ -3876,7 +3967,7 @@ you can look at, this may help you create a Stylist of your own:
*pushpc <direction>,<cells>;
This command will push the currently attached player to given direction by given
-amount of square cells. Direction is the same as used when declaring npcs, and
+amount of square cells. Direction is the same as used when declaring NPCs, and
can be specified by using one of the DIR_* constants (db/const.txt).
The knock-back is not restricted by items or map flags, only obstacles are taken
@@ -3951,7 +4042,7 @@ Those parameters that are different from 'getitem' are:
identify - Whether you want the item to be identified or not, 0 unidentified,
1 identified.
-refine - For how many plusses will it be refined.
+refine - For how many pluses will it be refined.
It will not let you refine an item higher than +10, if you
specify more it'll still be 10.
attribute - Whether the item is broken (1) or not (0) and NOT an elemental
@@ -4044,7 +4135,7 @@ E.g: item name and character name, or with character id, etc...
Create a item signed with the given character's name.
This is the same as using the hard(ly) explained way with getitem2.
-The command returns 1 when the item is created succesfully, or 0 when failed.
+The command returns 1 when the item is created successfully, or 0 when failed.
Failure occurs when there is:
- no player attached
- Item name or ID is not valid
@@ -4071,7 +4162,7 @@ the character will receive a message in their chat window. The character will
also receive warning messages in their chat window before the item disappears.
This command can not be used to rent stackable items. Rental items cannot be
-dropped, traded, sold to npcs, or placed in guild storage. (i.e. trade mask 75)
+dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75)
Note: 'delitem' in an NPC script can still remove rental items.
---------------------------------------
@@ -4186,7 +4277,7 @@ getitem groupranditem(15),1;
*enable_items;
*disable_items;
-These commands enable item usage while an npc is running. When enable_items is
+These commands enable item usage while an NPC is running. When enable_items is
run, items can be used during scripts until disable_items is called.
To avoid possible exploits, when enable_items is invoked, it will only enable
item usage while running that script in particular. Note that if a different
@@ -4199,14 +4290,13 @@ effect is still in effect).
*itemskill <skill id>,<skill level>;
*itemskill "<skill name>",<skill level>;
-This is a command meant for item scripts to replicate single-use skills. It will
-not work properly in NPC scripts a lot of the time because casting a skill is
-not allowed when there is a message window or menu on screen. If there isn't one
-cause you've made sure to run this when they already closed it, it should work
-just fine and even show a targeting pointer if this is a targeting skill.
+This command meant for item scripts to replicate single-use skills in usable
+items. It will not work properly, if there is a visible dialog window or menu.
+If the skill is self or auto-targeting, it will be used immediately otherwise a
+target cursor is shown.
-// When you use Anodyne, you will cast Endure(8) level 1,
-// and "Endure" will appear above your head as you use it.
+// When Anodyne is used, it will cast Endure (8), Level 1, as if the actual
+// skill has been used from skill tree.
605,Anodyne,Anodyne,11,2000,0,100,,,,,10477567,2,,,,,{ itemskill 8,1; },{}
@@ -4259,7 +4349,7 @@ Whatever the type is, it will also show a failure effect on screen.
*repair <broken item number>;
-This command repairs a broken peice of equipment, using the same list of broken
+This command repairs a broken piece of equipment, using the same list of broken
items as available through 'getbrokenid'.
The official scripts seem to use the repair command as a function instead:
@@ -4344,14 +4434,13 @@ Example(s):
*openstorage;
-This will open a character's Kafra storage window on the client connected to the
-invoking character. It does not check wherever it is run from, so you can allow
-any feasible NPC to open a kafra storage. (It's not certain whether this works
-in item scripts, but if it does, it could be interesting.)
+This will open character's Kafra storage window on the client connected to the
+invoking character. It can be used from any kind of NPC or item script, not just
+limited to Kafra Staff.
-The storage window might not open if a message box or a trade deal is present on
-screen already, so you should at least make sure the message box is closed
-before you open storage.
+The storage window opens regardless of whether there are open NPC dialogs or
+not, but it is preferred to close the dialog before displaying the storage
+window, to avoid any disruption when both windows overlap.
mes "I will now open your stash for you";
close2;
@@ -4403,7 +4492,7 @@ This will also fail and return 2 if the character does not belong to any guild.
*guildchangegm(<guild id>,<new master's name>)
This function will change the Guild Master of a guild. The ID is the guild's
-id, and the new guildmaster's name must be passed.
+id, and the new guild master's name must be passed.
Returns 1 on success, 0 otherwise.
@@ -4422,7 +4511,7 @@ any guild.
This command will bump up the specified guild skill by the specified number of
levels. This refers to the invoking character and will only work if the invoking
-character is a member of a guild AND it's guildmaster, otherwise no failure
+character is a member of a guild AND it's guild master, otherwise no failure
message will be given and no error will occur, but nothing will happen - same
about the guild skill trying to exceed the possible maximum. The full list of
guild skills is available in 'db/skill_db.txt', these are all the GD_ skills at
@@ -4455,16 +4544,16 @@ This is a character reset command, meant mostly for rebirth script supporting
Advanced jobs, which will reset the invoking character's stats and level
depending on the action type given. Valid action types are:
- 1 - Base level 1, Job level 1, 0 skill points, 0 base xp, 0 job xp, wipes the
+ 1 - Base level 1, Job level 1, 0 skill points, 0 base exp, 0 job exp, wipes the
status effects (only the ones settable by 'setoption'), sets all stats to 1.
If the new job is 'Novice High', give 100 status points, give First Aid and
Play Dead skills.
- 2 - Base level 1, Job level 1, 0 skill points, 0 base xp, 0 job xp.
+ 2 - Base level 1, Job level 1, 0 skill points, 0 base exp, 0 job exp.
Skills and attribute values are not altered.
- 3 - Base level 1, base xp 0. Nothing else is changed.
- 4 - Job level 1, job xp 0. Nothing else is changed.
+ 3 - Base level 1, base exp 0. Nothing else is changed.
+ 4 - Job level 1, job exp 0. Nothing else is changed.
-In all cases it will also unequip everything the character has on.
+In all cases everything the character has on will be unequipped.
Even though it doesn't return a value, it is used as a function in the official
rebirth scripts. Ask AppleGirl why.
@@ -4546,23 +4635,26 @@ should be rather obvious.
*skilleffect <skill id>,<number>;
*skilleffect "<skill name>",<number>;
-This command will display the visual and sound effects of a specified skill (see
-'db/skill_db.txt' for a full list of skills) on the invoking character's sprite.
-Nothing but the special effects and animation will happen. If the skill's normal
-effect displays a floating number, the number given will float up.
+This command displays visual and aural effects of given skill on currently
+attached character. The number parameter is for skill whose visual effect
+involves displaying of a number (healing or damaging). Note, that this command
+will not actually use the skill, it is intended for scripts, which simulate
+skill usage by the NPC, such as buffs, by setting appropriate status and
+displaying the skill's effect.
- // This will heal the character with 2000 hp, buff with
- // Bless 10 and Increase AGI 5, and display appropriate
- // effects.
- mes "Blessed be!";
- skilleffect 28,2000;
+ mes "Be blessed!";
+ // Heal of 2000 HP
heal 2000,0;
- skilleffect 34,0;
- // That's bless 10.
+ skilleffect 28,2000;
+ // Blessing Level 10
sc_start 10,240000,10;
- skilleffect 29,0;
- // That's agi 5
+ skilleffect 34,0;
+ // Increase AGI Level 5
sc_start 12,140000,5;
+ skilleffect 29,0;
+
+This will heal the character with 2000 HP, buff it with Blessing Lv 10 and
+Increase AGI Lv 5, and display appropriate effects.
---------------------------------------
@@ -4780,7 +4872,7 @@ the invoking character. Example can be found in the wedding script.
*divorce()
-This function will un-marry the invoking character from whoever they were
+This function will "un-marry" the invoking character from whoever they were
married to. Both will no longer be each other's marriage partner, (at least in
current SVN, which prevents the cases of multi-spouse problems). It will return
1 upon success or 0 if the character was not married at all.
@@ -4813,7 +4905,7 @@ Example(s):
*pcblockmove <id>,<option>;
Prevents the given ID from moving when the option != 0, 0 enables the ID to move again.
-ID should be able to be GID of a monster/npc or AID from a character.
+ID should be able to be GID of a monster/NPC or AID from a character.
Example(s):
@@ -4835,7 +4927,7 @@ Example(s):
This command will spawn a monster on the specified coordinates on the specified
map. If the script is invoked by a character, a special map name, "this", will
-be recognised to mean the name of the map the invoking character is located at.
+be recognized to mean the name of the map the invoking character is located at.
This command works fine in the item scripts.
The same command arguments mean the same things as described above in the
@@ -4940,8 +5032,8 @@ they were spawned or what they are. As of r12873, The behavior has changed sligh
In light of a label behavior fix for mob spawning commands that will now allow the label to
trigger when there is no player, killmonsterall has also been modified to support this.
-Using this the normal/old way means labels dont trigger when a player didn't
-attack/kill a monster. This is because it breaks compatability with older scripts if
+Using this the normal/old way means labels don't trigger when a player didn't
+attack/kill a monster. This is because it breaks compatibility with older scripts if
forced to use the new method. However, if you wish to use the new label type with this
command, simply use 1 for type. Any other number won't be recognized.
@@ -4986,7 +5078,7 @@ four arguments serve the same purpose as in the monster script command, The
If <master id> is given, the clone will be a 'slave/minion' of it. Master_id
must be a character id of another online player.
-The mode can be specified to determine the behaviour of the clone, it's
+The mode can be specified to determine the behavior of the clone, it's
values are the same as the ones used for the mode field in the mob_db. The
default mode is aggressive, assists, can move, can attack.
@@ -5027,11 +5119,11 @@ summon "--ja--",-1;
*homevolution;
This command will try to evolve the current player's homunculus.
-If it doesn't work, the /swt emoticon is shown.
+If it doesn't work, the /swt emotion is shown.
To evolve a homunculus, the invoking player must have a homunculus,
the homunculus must not be the last evolution and
-the homunculus must be on at least 91000/100000 intimacy with it's owner.
+the homunculus must have above 91000 intimacy with it's owner.
---------------------------------------
@@ -5040,7 +5132,7 @@ the homunculus must be on at least 91000/100000 intimacy with it's owner.
This is one command, but can be used in two ways. If only the first argument is given,
the unit whose GID is given will start walking towards the map with the given mapid
-(we believe these are the mapindexes found in db/map_index.txt).
+(we believe these are the map-indexes found in db/map_index.txt).
When 2 arguments are passed, the given unit will walk to the given x,y coordinates on
the map where the unit currently is.
@@ -5050,7 +5142,7 @@ Example(s):
//Will move/walk the poring we made to the coordinates 150,150
unitwalk .GID,150,150;
-//Will move the poring towards alberta (if my assumed mapindexes are correct).
+//Will move the poring towards alberta (if my assumed map-indexes are correct).
unitwalk .GID,3;
---------------------------------------
@@ -5095,7 +5187,7 @@ unfortunately, not detectable by Ruwach or Sight.
As they are now, these commands are pointless, it is suggested to use
'disablenpc'/'enablenpc', because these two commands actually unload the NPC
sprite location and other accompanying data from memory when it is not used.
-However, you can use these for some quest ideas (such as cloaking npcs talking
+However, you can use these for some quest ideas (such as cloaking NPCs talking
while hidden then revealing.... you can wonder around =P
---------------------------------------
@@ -5125,21 +5217,16 @@ invoked by the RID that was active in the script that issued a 'doevent'.
*donpcevent "{NPC NAME}::<event label>";
-This command is kinda confusing cause it performs in two completely different
-ways.
+This command invokes the event label code within an another NPC or NPCs. If
+event label has the form "NpcName::OnLabel", then only given NPC's event label
+will be invoked (much like 'goto' into another NPC). If the form is "::OnLabel"
+(NpcName omitted), the event code of all NPCs with given label will be invoked,
+one after another. In both cases the invoked script will run without an attached
+RID, whether or not the invoking script was attached to a player. The event
+label name is required to start with On.
-If the event label is phrased like "::<label name>", all NPC objects that have a
-specified label in them will be invoked as if by a 'doevent', but no RID
-whatsoever will be attached while they execute.
-
-Otherwise, if the label is given as "<NPC name>::<label name>", a label within
-the NPC object that runs this command will be called, but as if it was running
-inside another, specified NPC object. No RID will be attached to it in this case
-either.
-
-This can be used for making another NPC react to an action that you have done
-with the NPC that has this command in it, i.e. show an emotion, or say
-something.
+This command can be used to make other NPCs act, as if they were responding to
+the invoking NPC's actions, such as using an emotion or talking.
place,100,100,1%TAB%script%TAB%NPC%TAB%53,{
mes "Hey NPC2 copy what I do";
@@ -5161,8 +5248,8 @@ something.
end;
}
-This will make both NPC perform the same random emotion from 1 to 30, and the
-emotion will appear above each of their heads.
+Whichever of the both NPCs is talked to, both will show a random emotion at the
+same time.
---------------------------------------
@@ -5191,8 +5278,8 @@ complete the effect.
*setnpcdisplay("<npc name>", "<display name>")
*setnpcdisplay("<npc name>", <class id>)
-Changes the display name and/or display class of the target npc.
-Returns 0 is successful, 1 if the npc does not exist.
+Changes the display name and/or display class of the target NPC.
+Returns 0 is successful, 1 if the NPC does not exist.
Size is 0 = normal 1 = small 2 = big.
Since trunk r11779
@@ -5202,19 +5289,19 @@ Since trunk r11779
5,1.- Time-related commands
\\
---------------------------------------
-*addtimer <ticks>,"<NPC object name>::<label>";
-*deltimer "<NPC object name>::<event label>";
-*addtimercount <ticks>,"<NPC object name>::<event label>";
+*addtimer <ticks>,"NPC::OnLabel";
+*deltimer "NPC::OnLabel";
+*addtimercount <ticks>,"NPC::OnLabel";
-These commands will create and manage a player-based timer: 'addtimer' to
-create, 'deltimer' to destroy and 'addtimercount' to delay it by the specified
-number of ticks. For all three cases, the event label given is the identifier of
-that timer. A player can have multiple timers running at the same time, and
-there can even be multiple timers referencing the same label.
+These commands will create, destroy, and delay a countdown timer - 'addtimer' to
+create, 'deltimer' to destroy and 'addtimercount' to delay it by the specified
+number of ticks. For all three cases, the event label given is the identifier of
+that timer. The timer runs on the character object that is attached to the script,
+and can have multiple instances. When the label is run, it is run as if the player that
+the timer runs on has clicked the NPC.
-When this timer runs out, a new execution thread will start in the specified NPC
-object at the specified label, and the script will run attached to that player.
-If the specified label is not found, the map server will happily print an error.
+When this timer runs out, a new execution thread will start in the specified NPC
+object at the specified label.
The ticks are given in 1/1000ths of a second.
@@ -5276,7 +5363,7 @@ NOTE: You need to attach the RID before the timer _before_ you start it to
get a player-attached timer. Otherwise it'll stay a NPC timer (no effect).
If the player that is attached to the npctimer logs out, the "OnTimerQuit:"
-event label of that npc will be triggered, so you can do the appropiate
+event label of that NPC will be triggered, so you can do the appropriate
cleanup (the player is still attached when this event is triggered).
The 'setnpctimer' command will explicitly set the timer to a given tick.
@@ -5291,6 +5378,8 @@ The 'setnpctimer' command will explicitly set the timer to a given tick.
Example 1:
<NPC Header> {
+ // We need to use attachnpctimer because the mes command below needs RID attach
+ attachnpctimer;
initnpctimer;
npctalk "I cant talk right now, give me 10 seconds";
end;
@@ -5310,9 +5399,11 @@ Example 1:
npctalk "1";
end;
OnTimer10000:
- stopnpctimer; // This command is indeed not neccessary here because timer automaticly stopped due to no remaining events.
+ stopnpctimer;
mes "[Man]";
mes "Ok we can talk now";
+ detachnpctimer;
+ // and remember attachnpctimer and detachnpctimer can only use while the NPC timer is not running !
}
Example 2:
@@ -5325,8 +5416,8 @@ Example 2:
end;
// This OnInit label will run when the script is loaded, so that the timer
- // is initialised immediately as the server starts. It is dropped back to 0
- // every time the NPC says something, so it will cycle continiously.
+ // is initialized immediately as the server starts. It is dropped back to 0
+ // every time the NPC says something, so it will cycle continuously.
OnInit:
initnpctimer;
end;
@@ -5357,7 +5448,7 @@ Example 4:
These commands are used to control the pause of a NPC.
sleep and sleep2 will pause the script for the given amount of milliseconds.
-Awake is used to cancel a sleep. When awake is callen on a NPC it will run as
+Awake is used to cancel a sleep. When awake is called on a NPC it will run as
if the sleep timer ran out, and thus making the script continue. Sleep and sleep2
basically do the same, but the main difference is that sleep will not keep the rid,
while sleep2 does.
@@ -5368,6 +5459,17 @@ Examples:
awake "NPC"; //Cancels any running sleep timers on the NPC 'NPC'.
---------------------------------------
+
+*progressbar "<color>",<seconds>;
+
+This command works almost like sleep2, but displays a progress bar
+above the head of the currently attached character (like cast bar).
+Once the given amount of seconds passes, the script resumes. If the
+character moves while the progress bar progresses, it is aborted and
+the script ends. The color format is in RGB (0xRRGGBB). The color is
+currently ignored by the client and appears always green.
+
+---------------------------------------
//
5,1.- End of time-related commands
//
@@ -5387,7 +5489,7 @@ The flag values are coded as constants in db/const.txt to make them easier to us
Target flags:
- bc_all: Broadcast message is sent server-wide (default).
- bc_map: Message is sent to everyone in the same map as the source of the broadcast (see below).
-- bc_area: Message is sent to players in the vecinity of the source.
+- bc_area: Message is sent to players in the vicinity of the source.
- bc_self: Message is sent only to current player.
You cannot use more than one target flag.
@@ -5395,7 +5497,7 @@ Source flags:
- bc_pc: Broadcast source is the attached player (default).
- bc_npc: Broadcast source is the NPC, not the player attached to the script
(useful when a player is not attached or the message should be sent to those
- nearby the npc).
+ nearby the NPC).
You cannot use more than one source flag.
Special flags:
@@ -5434,7 +5536,7 @@ but it can be used instead in NPCs to "preview" an announce.
*mapannounce "<map name>","<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}};
This command will work like 'announce' but will only broadcast to characters
-currently residing on the specified map. The flag and optional paramaters
+currently residing on the specified map. The flag and optional parameters
parameters are the same as in 'announce', but target and source flags are ignored.
---------------------------------------
@@ -5478,7 +5580,7 @@ can be found in the doc/sample/npc_dynamic_shop.txt file.
This example shows how to use the labels and their set variables to create a dynamic shop.
Note 1: These labels will only be triggered if a npcshop* command is executed, this is
-because these commands set a special data on the shop npc,named master_nd in the source.
+because these commands set a special data on the shop NPC,named master_nd in the source.
The OnSellItem and OnBuyItem are triggered in the NPC whose master_nd is given in the shop.
This was found out thanks to 'Hondacrx', noticing the OnBuyItem wasn't triggered unless
npcshopitem was used. After rechecking the source, I found what caused this.
@@ -5487,7 +5589,7 @@ npcshopitem was used. After rechecking the source, I found what caused this.
*npcshopitem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
-This command lets you override the contents of an existing npc shop. The
+This command lets you override the contents of an existing NPC shop. The
current sell list will be wiped, and only the items specified with the price
specified will be for sale.
@@ -5500,7 +5602,7 @@ Note that you cannot use -1 to specify default selling price!
*npcshopadditem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
This command will add more items at the end of the selling list for the
-specified npc shop. If you specify an item already for sell, that item will
+specified NPC shop. If you specify an item already for sell, that item will
appear twice on the sell list.
The function returns 1 if shop was updated successfully, or 0 if not found.
@@ -5511,7 +5613,7 @@ Note that you cannot use -1 to specify default selling price!
*npcshopdelitem "<name>",<item id>{,<item id>{,<item id>{,...}}}
-This command will remove items from the specified npc shop.
+This command will remove items from the specified NPC shop.
If the item to remove exists more than once on the shop, all instances will be
removed.
@@ -5522,7 +5624,7 @@ value is only to confirm that the shop was indeed found.
*npcshopattach "<name>"{,<flag>}
-This command will attach the current script to the given npc shop.
+This command will attach the current script to the given NPC shop.
When a script is attached to a shop, the events "OnBuyItem" and "OnSellItem"
of your script will be executed whenever a player buys/sells from the shop.
Additionally, the arrays @bought_nameid[], @bought_quantity[] or @sold_nameid[]
@@ -5530,7 +5632,7 @@ and @sold_quantity[] will be filled up with the items and quantities
bought/sold.
The optional parameter specifies whether to attach ("1") or detach ("0") from
-the shop (the default is to attach). Note that detaching will detach any npc
+the shop (the default is to attach). Note that detaching will detach any NPC
attached to the shop, even if it's from another script, while attaching will
override any other script that may be already attached.
@@ -5542,7 +5644,7 @@ The function returns 0 if the shop was not found, 1 otherwise.
This command will create a chat room, owned by the NPC object running this
script and displayed above the NPC sprite.
-The maximum length of a chatroom name is 60 letters.
+The maximum length of a chat room name is 60 letters.
The limit is the maximum number of people allowed to enter the chat room. If the
optional event and trigger parameters are given, the event label
@@ -5608,7 +5710,7 @@ but no eathena script uses these at the moment.
*getwaitingroomstate(<information type>{,"<NPC object name>"})
-This function will return information about the wating room state for the
+This function will return information about the waiting room state for the
attached waiting room or for a waiting room attached to the specified NPC if
any.
@@ -5660,10 +5762,7 @@ example.
*kickwaitingroomall {"<NPC object name>"};
-This command would kick everybody out of a specified waiting room chat. IF it
-was properly linked into the script interpreter which it isn't, even though the
-code for it is in place. Expect this to become available in upcoming SVN
-releases.
+This command kicks everybody out of a specified waiting room chat.
---------------------------------------
@@ -5672,7 +5771,7 @@ releases.
This command sets the 'nosave' flag for the specified map and also gives an
alternate respawn-upon-relogin point.
-It does not make a map impossible to make a savepoint on as you would normally
+It does not make a map impossible to make a save point on as you would normally
think, 'savepoint' will still work. It will, however, make the specified map
kick the reconnecting players off to the alternate map given to the coordinates
specified.
@@ -5757,14 +5856,14 @@ will mean randomly shuffling everyone on the same map.
This command goes through the specified map and for each player and monster
found there does stuff.
-Flag is a bitmask (add up numbers to get effects you want)
- 1 - warp all guild members to their savepoints.
- 2 - warp all non-guild members to their savepoints.
- 4 - remove all monsters which are not guardian or emperium.
+Flag is a bit-mask (add up numbers to get effects you want)
+ 1 - warp all guild members to their save points.
+ 2 - warp all non-guild members to their save points.
+ 4 - remove all monsters which are not guardian or Emperium.
-Flag 7 will, therefore, mean 'wipe all mobs but guardians and the emperium and
+Flag 7 will, therefore, mean 'wipe all mobs but guardians and the Emperium and
kick all characters out', which is what the official scripts do upon castle
-surrender. Upon start of WoE, the scripts do 2 (warp all intruiders out).
+surrender. Upon start of WoE, the scripts do 2 (warp all intruders out).
Characters not belonging to any guild will warp out regardless of the flag setting.
@@ -5833,7 +5932,7 @@ Temporary guardians are not saved with the castle and can't be accessed by guard
*guardianinfo("<map name>", <guardian number>, <type>)
This function will return various info about the specified guardian, or -1
-if it fails for some reason. It is primarily used in the castle manager npc.
+if it fails for some reason. It is primarily used in the castle manager NPC.
Map name and guardian number (value between 0 and 7) define the target.
Type indicates what information to return:
@@ -5869,7 +5968,7 @@ computed based on the speed and motion coordinates. The effect is rather
unnerving.
Only a few NPC sprites have walking animations, and those that do, do not get
-the animation invoked when moving the NPC, due to the problem in the npc walking
+the animation invoked when moving the NPC, due to the problem in the NPC walking
code, which looks a bit silly. You might have better success by defining a job-
sprite based sprite id in 'db/mob-avail.txt' with this.
@@ -5885,7 +5984,7 @@ this command just moves the NPC. It basically warps out and in on the current an
Example(s):
-//This will move Bugga from it's current position to the coords 100,20 (if those coords are walkable (legit)).
+//This will move Bugga from it's current position to the coordinates 100,20 (if those coordinates are walkable (legit)).
moveNPC "Bugga",100,20;
---------------------------------------
@@ -5908,7 +6007,7 @@ will not be displayed anywhere else.
*logmes "<message>";
-This command will write the message given to the map server npc log file, as
+This command will write the message given to the map server NPC log file, as
specified in 'conf/log_athena.conf'. In the TXT version of the server, the log
file is 'log/npclog.log' by default. In the SQL version, if SQL logging is
enabled, the message will go to the 'npclog' table, otherwise, it will go to the
@@ -5924,7 +6023,7 @@ This command will send a message to the chat window of all currently connected
characters.
If NPC name is specified, the message will be sent as if the sender would be
-the npc with the said name.
+the NPC with the said name.
---------------------------------------
@@ -5944,7 +6043,7 @@ rand(2,10) would result in 2,3,4,5,6,7,8,9 or 10
This command will mark places on the mini map in the client connected to the
invoking character. It uses the normal X and Y coordinates from the main map.
-The colors of the marks are defined using a hexidecimal number, same as the ones
+The colors of the marks are defined using a hexadecimal number, same as the ones
used to color text in 'mes' output, but are written as hexadecimal numbers in C.
(They look like 0x<six numbers>.)
@@ -5977,40 +6076,39 @@ memory of where the points are set whatsoever.
*cutin "<filename>",<position>;
-This command will display a picture stored in the GRF file in the client for the
-player.
-
-The files are taken from '\data\texture\유저인터페이스\illust' directory in the
-GRF file. Also it seems that card cutins from \cardbmp will work here as well.
-Only bitmaps (images stored in the bitmap format) will actually get displayed.
-The '.bmp' extension is optional.
-The client has no problem rendering huge 4096x4096 bitmaps, but usually they're
-around 500x500. Bright magenta (color FF00FF) is considered to be transparent in
-these pictures. You can easily add and alter them, but how to do this is outside
-of the scope of this document.
-
-The position determines just where on screen the picture will appear:
- 0 - bottom left corner
- 1 - bottom middle
- 2 - bottom right corner
- 3 - middle of screen in a movable window with an empty title bar.
- 4 - middle of screen without the window header, but still movable.
- 255 - will remove the cutin previously displayed.
-
-Giving an empty string for the filename and 255 for the position will remove all
-cutin pictures. Any other position value will not cause a script error but will
-cause the player's client to curl up and die. Only one cutin may be on screen at
-any given time, any new cutins will replace it.
+This command will display a picture, usually an NPC illustration, also called
+cutin, for the currently attached client. The position parameter determines the
+placement of the illustration and takes following values:
+
+ 0 - bottom left corner
+ 1 - bottom middle
+ 2 - bottom right corner
+ 3 - middle of screen in a movable window with an empty title bar
+ 4 - middle of screen without the window header, but still movable
- // This will display the picture of the 7th kafra,
- // the one in orange and the mini-skirt :P
- cutin "kafra_7",2;
- // This will remove the displayed picture.
- cutin "Kafra_7",255;
+The picture is read from data\texture\유저인터페이스\illust, from both the GRF archive
+and data folder, and is required to be a bitmap. The file extension .bmp can be
+omitted. Magenta color (#ff00ff) is considered transparent. There is no limit
+placed on the size of the illustrations by the client, although loading of large
+pictures (about 700x700 and larger) causes the client to freeze shortly (lag).
+Typically the size is about 320x480. New illustrations can be added by just
+putting the new file into the location above.
- // This will remove all pictures displayed.
+The client is able to display only one cutin at the same time and each new one
+will cause the old one to disappear. To delete the currently displayed
+illustration without displaying a new one, an empty file name and position 255
+must be used.
+
+ // Displays the Comodo Kafra illustration in lower right corner.
+ cutin "kafra_7",2;
+
+ // Typical way to end a script, which displayed an illustration during a
+ // dialog with a player.
+ mes "See you.";
+ close2;
cutin "",255;
+ end;
---------------------------------------
@@ -6027,9 +6125,9 @@ A full list of pet IDs can be found inside 'db/pet_db.txt'
*emotion <emotion number>{,<target>}{,"<target name>"};
-This command makes an object display an emoticon sprite above their own as
+This command makes an object display an emotion sprite above their own as
if they were doing that emotion. For a full list of emotion numbers,
-see 'db/const.txt' under 'e_'. The inobvious ones are 'e_what' (a question mark)
+see 'db/const.txt' under 'e_'. The not so obvious ones are 'e_what' (a question mark)
and 'e_gasp' (the exclamation mark).
The optional target parameter specifies who will get the emotion on top of
@@ -6045,7 +6143,7 @@ event labels. If specified name is not found, command does nothing.
This command, if run from an NPC object that has a sprite, will call up a
specified effect number, centered on the NPC sprite. If the running code does
-not have an object ID (a 'floating' npc) or is not running from an NPC object at
+not have an object ID (a 'floating' NPC) or is not running from an NPC object at
all (an item script) the effect will be centered on the character who's RID got
attached to the script, if any. For usable item scripts, this command will
create an effect centered on the player using the item.
@@ -6060,7 +6158,7 @@ those that actually work may differ greatly between client versions.
These two commands will play a sound effect to either the invoking character
only ('soundeffect') or multiple characters ('soundeffectall'). If the running
-code does not have an object ID (a 'floating' npc) or is not running from an NPC
+code does not have an object ID (a 'floating' NPC) or is not running from an NPC
object at all (an item script) the sound will be centered on the character who's
RID got attached to the script, if any. If it does, it will be centered on that
object. (an NPC sprite)
@@ -6077,19 +6175,16 @@ You can add your own effects this way, naturally.
---------------------------------------
*playBGM "<BGM filename>"
-*playBGMall "<BGM filename>",{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>}
+*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}}
These two commands will play a Background Music to either the invoking character
-only ('playBGM') or multiple characters ('playBGMall'). If the running
-code does not have an object ID (a 'floating' npc) or is not running from an NPC
-object at all (an item script) the sound will be centered on the character who's
-RID got attached to the script, if any. If it does, it will be centered on that
-object. (an NPC sprite)
+only ('playBGM') or multiple characters ('playBGMall').
BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension.
It's not required to specify the extension inside the script.
-If coordinates are omitted, BGM will be broadcasted on the entire map.
+If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name
+is omitted as well the BGM will be played for the entire server.
You can add your own BGMs this way, naturally.
@@ -6150,40 +6245,30 @@ For the position, the x and y are given in the unitSkillUsePos.
*day;
*night;
-These two commands will switch the entire server between day and night mode.
-Depending on the configuration, it may cause differing client effects. If your
-server is set to cycle between day and night, it will eventually return to that
-cycle.
-
-This example will set the night time to start at 03 AM and end at 08 AM, and the
-nighttime will persist if the server restarts during the night, if the automated
-day/night switching is turned off in the configuration files. Figure it out on
-your own:
+These two commands will switch the entire server between day and night mode
+respectively. If your server is set to cycle between day and night by
+configuration, it will eventually return to that cycle.
-%TAB%script%TAB%DayNight%TAB%-1,{
-
end;
-
-OnClock0300:
-
-OnClock0800:
-
+OnClock0600:
+ day;
+ end;
OnInit:
-
- set $@minutesfrommidnight, gettime(3)*60+gettime(2);
-
- set $@night_start, 180; // 03:00
- set $@night_end, 480; // 08:00
-
- if ($@minutesfrommidnight>=$@night_start && $@minutesfrommidnight<$@night_end) goto StartNight;
-
- goto StartDay;
- StartNight:
+ // setting correct mode upon server start-up
+ if(gettime(3)>=6 && gettime(3)<18)
+ {
+ end;
+ }
+OnClock1800:
night;
end;
- StartDay:
- day;
- end; }
+}
+
+This script allows to emulate the day/night cycle as the server does, but also
+allows triggering additional effects upon change, like announces, gifts, etc.
+The day/night cycle set by configuration should be disabled, when this script is
+used.
---------------------------------------
@@ -6201,7 +6286,7 @@ They will make the NPC object listen for text spoken publicly by players and
match it against regular expression patterns, then trigger labels associated
with these regular expression patterns.
-Patterns are organised into sets, which are referred to by a set number. You can
+Patterns are organized into sets, which are referred to by a set number. You can
have multiple sets patterns, and multiple patterns may be active at once.
Numbers for pattern sets start at 1.
@@ -6219,7 +6304,7 @@ set number in this case will deactivate all pattern sets defined.
pattern set in it's place.
Using regular expressions is high wizardry. But with this high wizardry comes
-unparallelled power of text manipulation. For an explanation of what a regular
+unparalleled power of text manipulation. For an explanation of what a regular
expression pattern is, see a few web pages:
http://www.regular-expressions.info/
@@ -6227,8 +6312,8 @@ http://www.weitz.de/regex-coach/
For an example of this in use, see 'npc\sample\npc_pcre.txt'.
-With this you could, for example, automagically punish players for asking for
-zeny in public places, or alternatively, automagically give them zeny instead if
+With this you could, for example, automatically punish players for asking for
+Zeny in public places, or alternatively, automatically give them Zeny instead if
they want it so much.
---------------------------------------
@@ -6343,9 +6428,9 @@ setitemscript 2637,"";
*atoi ("<string>")
*axtoi ("<string>")
-These commands are used to convert strings to numbers.
-atoi will convert string using normal number (0,1,2,3,etc) while axtoi converts them to
-hexadecimal numbers (0,1,11,01).
+These commands are used to convert strings to numbers. 'atoi' will interpret
+given string as a decimal number (base 10), while 'axtoi' interprets strings as
+hexadecimal numbers (base 16).
Example:
@@ -6380,6 +6465,26 @@ The first letter is position 0.
---------------------------------------
+*setfont <font>
+
+This command sets the current RO client interface font to one of the
+fonts stored in data\*.eot by using an ID of the font. When the ID
+of the currently used font is used, default interface font is used
+again.
+
+ 0 - Default
+ 1 - RixLoveangel
+ 2 - RixSquirrel
+ 3 - NHCgogo
+ 4 - RixDiary
+ 5 - RixMiniHeart
+ 6 - RixFreshman
+ 7 - RixKid
+ 8 - RixMagic
+ 9 - RixJJangu
+
+---------------------------------------
+
* The Pet AI commands
These commands will only work if the invoking character has a pet, and are meant
@@ -6417,7 +6522,7 @@ when pet performance is activated.
This will make the pet use a specified support skill on the owner whenever the
HP and SP are below the given percent values, with a specified delay time
between activations. The skill numbers are as per 'db/skill_db.txt'.
-'petheal' works the same as 'petskillsupport' but has the skill ID hardcoded to
+'petheal' works the same as 'petskillsupport' but has the skill ID hard-coded to
28 (Heal). This command is deprecated.
It's not quite certain who's stats will be used for the skills cast, the
character's or the pets. Probably, Skotlex can answer that question.
@@ -6434,11 +6539,11 @@ inflicted and the specified number of attacks.
All commands with delays and durations will only make the behavior active for
the specified duration of seconds, with a delay of the specified number of
-seconds between activations. Rates are a chance of the effect occuring and are
+seconds between activations. Rates are a chance of the effect occurring and are
given in percent. 'bonusrate' is added to the normal rate if the pet intimacy is
at the maximum possible.
-The behavior modified with the abovementioned commands will only be exibited if
+The behavior modified with the above mentioned commands will only be exhibited if
the pet is loyal and appropriate configuration options are set in
'battle_athena.conf'.
@@ -6470,7 +6575,7 @@ This is still usable outside item scripts.
This command will create a pet egg and put it in the invoking character's
inventory. The kind of pet is specified by pet ID numbers listed in
-'db/pet_db.txt'. The egg is created exactly as if the character just successfuly
+'db/pet_db.txt'. The egg is created exactly as if the character just successfully
caught a pet in the normal way.
// This will make you a poring:
@@ -6484,7 +6589,7 @@ server and the egg will disappear when anyone tries to hatch it.
*homshuffle;
-This will recalculate the homunculus stats acording to its level, of the
+This will recalculate the homunculus stats according to its level, of the
current invoking character.
---------------------------------------
@@ -6493,7 +6598,7 @@ current invoking character.
Each map cell has several 'flags' that specify the properties of that cell.
These include terrain properties (walkability, shootability, presence of water),
-skills (basilica, land protector, ...) and other (npc nearby, no vending, ...).
+skills (basilica, land protector, ...) and other (NPC nearby, no vending, ...).
Each of these can be 'on' or 'off'. Together they define a cell's behavior.
This command lets you alter these flags for all map cells in the specified
@@ -6570,7 +6675,7 @@ Example:
Creates an invisible wall, an array of "setcell" starting from x,y and doing a
line of the given size in the given direction. The difference with setcell is
-this one update client part too to avoid the glith problem. Directions are the
+this one update client part too to avoid the glitch problem. Directions are the
same as NPC sprite facing directions: 0=north, 1=northwest, 2=west, etc.
---------------------------------------
@@ -6596,7 +6701,7 @@ on the ID this command returns.
Example:
// Store the Party ID of the invoking character.
set .@party_id, getcharid(1);
- // Atempt to create an instance using that party ID.
+ // Attempt to create an instance using that party ID.
set .@id, instance_create("Endless Tower", .@party_id, ID_ENDLESS);
if (.@id == -1) { // Party ID is in use by another instance.
...
@@ -6627,20 +6732,20 @@ Initiate the instance of <Instance ID>.
*instance_announce <Instance ID>,"<text>",<flag>{,<color>};
-Works like announce, but has the <Instance ID> paramter, where 0 = active instance?
+Works like announce, but has the <Instance ID> parameter, where 0 = active instance?
---------------------------------------
*instance_attach(<Instance ID>);
-Attaches a script to the proviced <Instance ID>?
+Attaches a script to the provided <Instance ID>?
---------------------------------------
*instance_npcname("<NPC Name>",<Instance ID>)
Retrieve the unique name given to a copy of an NPC for an instance, the given
-"<NPC Name>" that belonds to instance <Instance ID>. Can be used with such commands
+"<NPC Name>" that belongs to instance <Instance ID>. Can be used with such commands
as enablenpc and disablenpc, donpcevent, etc.
---------------------------------------
@@ -6653,13 +6758,13 @@ Check if the player has been queued for the <Map Name> instance.
*instance_id(<?>)
-Apparantly returns the ID the player is currently attached too.
+Apparently returns the ID the player is currently attached too.
---------------------------------------
*instance_warpall "<Map Name>",<x>,<y>;
-Warp all palyers in the instance to <map name> and given coordinates.
+Warp all players in the instance to <map name> and given coordinates.
---------------------------------------
@@ -6702,11 +6807,11 @@ Add quest of the <ID2> to the the quest log, and the state is "active".
*checkquest(<ID>{,PLAYTIME|HUNTING})
-If no additonal argument supplied, return the state of the quest:
+If no additional argument supplied, return the state of the quest:
-1 = Quest not started (not in quest log)
0 = Quest has been given, but the state is "inactive"
1 = Quest has been given, and the state is "active"
- 2 = Quest comepleted
+ 2 = Quest completed
If parameter "PLAYTIME" is supplied:
-1 = Quest not started (not in quest log)
@@ -6723,13 +6828,13 @@ If parameter "HUNTING" is supplied:
---------------------------------------
*showevent <state>, <color>;
-Show a colored mark in the mini-map like "viewpoint" and an emoticon on top of a NPC.
+Show a colored mark in the mini-map like "viewpoint" and an emotion on top of a NPC.
This is used to indicate that a NPC has a quest or an event to certain player/s.
state can be:
- 0 = disable ( Used to disable and remove the mark and the emoticon from the NPC. )
- 1 = exclamation emoticon ( Used to show an important quest event to certain player. )
- 2 = interrogation emoticon ( Used to show an non-important quest event to certain player. )
+ 0 = disable ( Used to disable and remove the mark and the emotion from the NPC. )
+ 1 = exclamation emotion ( Used to show an important quest event to certain player. )
+ 2 = interrogation emotion ( Used to show an non-important quest event to certain player. )
Other value may cause client crashes.
color can be:
@@ -6757,7 +6862,7 @@ Unlike the prior command, the latter will attach a GROUP in a waiting room to th
sets the array $@arenamembers[0] where 0 holds the IDs of the first group, and 1 holds the IDs of the second.
Example:
- // Battle Group will be refered to as $@KvM01BG_id1, and when they die, respawn at bat_c01,52,129.
+ // Battle Group will be referred to as $@KvM01BG_id1, and when they die, respawn at bat_c01,52,129.
set $@KvM01BG_id1, waitingroom2bg("bat_c01",52,129,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie");
end;
@@ -6867,5 +6972,56 @@ This command will force the update of the displayed scoreboard.
----------------------------------------
+==========================
+|10.- Mercenary commands.|
+==========================
+---------------------------------------
+
+*mercenary_create <class>,<contract time>;
+
+This command summons a mercenary of given class, for given amount of
+time in milliseconds. Typically used in item scripts of mercenary
+scrolls.
+
+----------------------------------------
+
+*mercenary_heal <hp>,<sp>;
+
+This command works like 'heal', but affects the mercenary of the
+currently attached character.
+
+----------------------------------------
+
+*mercenary_sc_start <type>,<tick>,<val1>;
+
+This command works like 'sc_start', but affects the mercenary of the
+currently attached character.
+
+----------------------------------------
+
+*mercenary_get_calls(<guild>);
+*mercenary_set_calls <guild>,<value>;
+
+Sets or gets the mercenary calls value for given guild for currently
+attached character. Guild can be one or the following constants:
+
+ ARCH_MERC_GUILD
+ SPEAR_MERC_GUILD
+ SWORD_MERC_GUILD
+
+----------------------------------------
+
+*mercenary_get_faith(<guild>);
+*mercenary_set_faith <guild>,<value>;
+
+Sets or gets the mercenary faith value for given guild for currently
+attached character. Guild can be one or the following constants:
+
+ ARCH_MERC_GUILD
+ SPEAR_MERC_GUILD
+ SWORD_MERC_GUILD
+
+---------------------------------------
+
Whew.
That's about all of them.
diff --git a/eAthena-10.sln b/eAthena-10.sln
new file mode 100644
index 000000000..a372960d3
--- /dev/null
+++ b/eAthena-10.sln
@@ -0,0 +1,139 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_txt", "vcproj-10\map-server_txt.vcxproj", "{D356871D-58E1-450B-967A-E1E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_txt", "vcproj-10\login-server_txt.vcxproj", "{D356871D-58E1-450B-967A-E2E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_txt", "vcproj-10\char-server_txt.vcxproj", "{D356871D-58E1-450B-967A-E3E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server_sql", "vcproj-10\char-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server_sql", "vcproj-10\login-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server_sql", "vcproj-10\map-server_sql.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-10\mapcache.vcxproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ladmin", "vcproj-10\ladmin.vcxproj", "{D356871D-58E1-450B-967A-E8E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-login", "vcproj-10\txt-converter-login.vcxproj", "{D356871D-58E1-450B-967A-E9E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "txt-converter-char", "vcproj-10\txt-converter-char.vcxproj", "{D356871D-58E1-450B-967A-EAE9646175AF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug-sql|Win32 = Debug-sql|Win32
+ Debug-txt|Win32 = Debug-txt|Win32
+ Release|Win32 = Release|Win32
+ Release-sql|Win32 = Release-sql|Win32
+ Release-txt|Win32 = Release-txt|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E1E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E2E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E3E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug-sql|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug-sql|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug-sql|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug-sql|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release-sql|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E8E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E9E9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Debug-sql|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Debug-txt|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Debug-txt|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Release-sql|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Release-txt|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-EAE9646175AF}.Release-txt|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/npc/Changelog.txt b/npc/Changelog.txt
index c4a12ca7a..0d98c87d0 100644
--- a/npc/Changelog.txt
+++ b/npc/Changelog.txt
@@ -1,5 +1,14 @@
Date Added
======
+2010/12/03
+ * Rev. 14555 Updated instances with more proper English, care of Resplendent. [L0ne_W0lf]
+2010/12/02
+ * Rev. 14552 Just going through bug reports. :P [L0ne_W0lf]
+ - Removed duplicate NPCs in Lighthalzen and Morroc. (bugreport:4555)
+ - Corrected typo (Sit -> Suit) in enhcant_arm NPC. (bugreport:4586)
+ - Corrected a typo in the christmas_2008 event. (bugreport:4600)
+ - Changed which White Lady spawns in endless tower. (bugreport:4601)
+ - Also added Quest Log Entries to Endless Tower, please test.
2010/11/22
* Rev. 14490 Added quest log support for the following quests. [L0ne_W0lf]
- Factory Quest, Murder Quest, Cursed Spirit Quest, Juno Remedy Quest,
diff --git a/npc/cities/lighthalzen.txt b/npc/cities/lighthalzen.txt
index dc4a31cc7..df5e6fa2a 100644
--- a/npc/cities/lighthalzen.txt
+++ b/npc/cities/lighthalzen.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= erKURITA, Au{R}oN (Translated by Alan), $ephiroth
//===== Current Version: =====================================
-//= 2.0
+//= 2.1
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -40,6 +40,7 @@
//= 1.8 Replaced effect numerics with constants. [L0ne_W0lf]
//= 1.9 Added Cool Corp. Event Staff, who oringialy resided in the DTS_warper script file. [L0ne_W0lf]
//= 2.0 Added missing Lab Staff#amano08 NPC. (bugreport:4319) [Gepard]
+//= 2.1 Commented out Duplicate NPCs. (bugreport:4555)
//=============================================================
lighthalzen,198,285,5 script Jiwon#zen5 862,{
@@ -278,8 +279,8 @@ lighthalzen,78,120,3 script Maivi#zen1 862,{
close;
}
+/*
lighthalzen,226,210,3 script Nannan 86,{
-
mes "[Nannan]";
mes "You know, I always thought";
mes "that all Alchemists were bookish,";
@@ -305,6 +306,7 @@ lighthalzen,226,210,3 script Nannan 86,{
mes "to a street guy like me...";
close;
}
+*/
lighthalzen,230,182,4 script Klaubis#zen3 866,{
mes "[Klaubis]";
@@ -3144,6 +3146,7 @@ lhz_in02,36,284,0 script Cool Event Staff#Cesuna 874,{
close;
}
+/*
lhz_in02,19,274,2 script Maintenance Guy#lhz 851,{
mes "[Kudiuu]";
mes "Holy...!";
@@ -3154,6 +3157,7 @@ lhz_in02,19,274,2 script Maintenance Guy#lhz 851,{
mes "almost a health hazard!";
close;
}
+*/
// Lighthalzen Mushroom.
// Don't really understand why it's there, but it's funny regardless.
diff --git a/npc/cities/morocc.txt b/npc/cities/morocc.txt
index 75b1c0c04..5faf5e4a6 100644
--- a/npc/cities/morocc.txt
+++ b/npc/cities/morocc.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= kobra_k88; L0ne_W0lf
//===== Current Version: =====================================
-//= 2.1
+//= 2.2
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -24,6 +24,7 @@
//= 2.0 Fixed bad NPC header data to comply with rev. 11603. [L0ne_W0lf]
//= 2.0a Fixed outdated info about Milk [Lupus]
//= 2.1 Updated/Added NPCs for episode 12.1. [L0ne_W0lf]
+//= 2.2 Removed duplicate bartender NPC. (bugreport:4555) [L0ne_W0lf]
//============================================================
// Morroc
@@ -715,6 +716,7 @@ moc_fild16,211,254,4 script Assassin#07rhea_30 118,{
// Other NPCs
//============================================================
//Bartender
+/*
morocc_in,166,76,3 script Bartender#02 46,{
mes "[Bartender]";
mes "What are you going to order?";
@@ -752,6 +754,7 @@ morocc_in,166,76,3 script Bartender#02 46,{
mes "Don't even think about drinking if you don't have 1,000 zeny.";
close;
}
+*/
// Assassin Guild Guards
//===================================================
diff --git a/npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt b/npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt
index b8f96d09e..95a887ddb 100644
--- a/npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt
+++ b/npc/custom/eAAC_Scripts/kafraExpress/ke_main.txt
@@ -330,7 +330,7 @@ function script F_keGuildStorage {
callfunc "F_keIntro", e_an, "Sorry, but you don't have enough Zeny.";
return;
}
- if (guildopenstorage(0) == 1) {
+ if (guildopenstorage() == 1) {
callfunc "F_keIntro", -1, "Sorry, the guild storage is currently in use by someone else. Try again later.";
return;
}
diff --git a/npc/events/christmas_2008.txt b/npc/events/christmas_2008.txt
index dc26d26e0..99b783a22 100644
--- a/npc/events/christmas_2008.txt
+++ b/npc/events/christmas_2008.txt
@@ -361,7 +361,7 @@ prontera,226,306,4 script Carolling#iROxmas08 79,{
mes "[Carolling]";
mes "For all of the children of this";
mes "world!!!";
- mes "Please bring me ^0000FF6Singing Crystal";
+ mes "Please bring me ^0000FFSinging Crystal";
mes "Pieces^000000 from ^0000FFViolent Gift Boxes^000000!";
next;
emotion 33;
diff --git a/npc/guild/agit_template.txt b/npc/guild/agit_template.txt
index 4e57b65d0..f43536978 100644
--- a/npc/guild/agit_template.txt
+++ b/npc/guild/agit_template.txt
@@ -954,7 +954,7 @@ OnGuardianDied:
case 2:
// Unofficial, but since it's already been in eA for ages
// and used, I can't exactly remove it, now, can I? >:(
- if(guildopenstorage(0) == 1){
+ if(guildopenstorage() == 1){
mes "[Kafra Employee]";
mes "I'm sorry but another guild member is using the guild storage";
mes "right now. Please wait until that person is finished.";
diff --git a/npc/instances/EndlessTower.txt b/npc/instances/EndlessTower.txt
index 60894861d..b1dc002b9 100644
--- a/npc/instances/EndlessTower.txt
+++ b/npc/instances/EndlessTower.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.3
+//= 1.5
//===== Compatible With: =====================================
//= eAthena SVN
//===== Description: =========================================
@@ -17,6 +17,10 @@
//= Added some missing stopnpctimers to npcs. (bugreport:4418)
//= 1.3 Fixed a couple copy/paste errors :D I fail. [L0ne_W0lf]
// Timer no longer resets when re-entering.
+//= 1.4 Added quest log entries based on iRO. [L0ne_W0lf]
+//= You may need to update your questid2display.
+//= Changed White lady spawn to MVP White Lady. (bugreport:4601)
+//= 1.5 Corrected some grammar and typos.
//============================================================
alberta,214,77,6 script Captain Janssen 709,{
@@ -48,7 +52,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "As you may know after a few sea voyages, not many people have gone across the ocean beyond the continent. I too have failed to conquer the ocean.";
next;
- mes "^0000ffMr. Janssen talked about his perilous ocean journeys for quite a while. You had enough time on your hands, so you sat down, quietly listening to his story.^000000";
+ mes "^0000ffMr. Janssen talked about his perilous ocean journeys for quite a while. You have enough time on your hands, so you sit down, quietly listening to his story.^000000";
next;
mes "^0000ffAt least half of his story sounded grossly exaggerated, but something caught your ear: he insists that a humongous tower exists on the ocean, and that it's so tall, it scrapes across the sky.^000000";
set in_102tower,2;
@@ -59,7 +63,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "So all I could do was cast anchor at that humongous tower after my fleet was wrecked. At first, we were only going to stay there until the rainstorm was over, but it didn't end as soon as we had hoped.";
next;
mes "[Captain Janssen]";
- mes "My crew was starving, and a few of them walked into the tower of the unknown in order to find food... They never came back.";
+ mes "My crew was starving, and a few of them walked into the tower in order to find food... They never came back.";
next;
mes "["+.@name_102$+"]";
mes "Why didn't you go in there with them?";
@@ -70,7 +74,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "[Captain Janssen]";
mes "In our desperation to survive, we abandoned all our goods, and left the tower only with a little bit of the water and edible plants we'd found around the tower. When we finally reached land, I was the only one alive...";
next;
- mes "^0000ffYou could imagine the heartrending scene of the dying fleet on their last voyage, even if he didn't explain it any further. A look of somber regret swept his face as he remained silent a while, and then he said:^000000";
+ mes "^0000ffYou could imagine the heartwretching scene of the dying fleet on their last voyage, even if he didn't explain it any further. A look of somber regret swept over his face as he remained silent a while, and then he said:^000000";
next;
mes "[Captain Janssen]";
mes "I have something I must do before I die. I must retrieve the remains of my crew that died in the tower, and give them a proper burial.";
@@ -179,7 +183,7 @@ alberta,214,77,6 script Captain Janssen 709,{
mes "^0000ffYou have donated 10,000 Zeny to Captain Janssen^000000.";
next;
mes "[Captain Janssen]";
- mes "Thank you so much! Now I can stock food and materials for my ship. You're kind, very kind!";
+ mes "Thank you so much! Now I can stock up on food and materials for my ship. You're kind, very kind!";
set zeny,zeny-10000;
set in_102tower,1;
close;
@@ -201,6 +205,9 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
set .@partymembercount,$@partymembercount;
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
+ set .@etower_timer,checkquest(60200,PLAYTIME); // 1 week
+ set .@etower_timer2,checkquest(60201,PLAYTIME); // 4 hours
+
set .@dun_lim_time,etower_timer+604800; // 1 week
set .@dun_lim_time2,etower_timer+14400; // 4 hours
set .@dun_cur_time,gettimetick(2);
@@ -210,9 +217,9 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
set .@dun_s,.@dun_ent_t - ((.@dun_h * 3600) + (.@dun_m * 60));
if ((.@party_id > 0) && (.@partymembercount > 1)) {
- if (etower_timer < 1) {
+ if (.@etower_timer == -1) {
if (.@ins_mas == getcharid(0)) {
- mes "Confirmed the party has been made. Would you like to reserve for entrance to the Endless Tower?";
+ mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
next;
switch(select(.@md_name$ + " Dungeon Generated:Enter the dungeon:Return to Alberta:Cancel")) {
case 1:
@@ -273,6 +280,8 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
else {
mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
set etower_timer,gettimetick(2);
+ setquest 60200;
+ setquest 60201;
warp "1@tower",52,354;
end;
}
@@ -299,6 +308,8 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
else {
mapannounce "e_tower", .@p_name2$ + " of the party, " + .@p_name$ + ", is entering the dungeon, " + .@md_name$ + ".",bc_map,"0x00ff99",FW_NORMAL,12;
set etower_timer,gettimetick(2);
+ setquest 60200;
+ setquest 60201;
warp "1@tower",52,354;
end;
}
@@ -314,7 +325,7 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
close;
}
}
- else if ((etower_timer > 0) && (.@dun_cur_time < .@dun_lim_time2)) {
+ else if ((.@etower_timer >= 0) && (.@etower_timer2 < 2)) {
mes "If you have the dungeon generated already, you can enter it. ";
next;
switch(select(.@md_name$ + "Enter the dungeon:Return to Alberta:Cancel")) {
@@ -341,8 +352,8 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
}
close;
}
- else if ((.@dun_cur_time > .@dun_lim_time2) && (.@dun_cur_time < .@dun_lim_time)) {
- mes "Due to the entree aftereffect, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
+ else if ((.@etower_timer >= 0) && (.@etower_timer2 == 2)) {
+ mes "Due to the tower's aftereffects, you cannot enter the dungeon right now, " + .@dun_h + "hours " + .@dun_m + "minutes " + .@dun_s + "seconds left to enter the next dungeon.";
next;
mes "It is dangerous here. Let me move you to Alberta.";
close2;
@@ -351,12 +362,14 @@ e_tower,81,105,0 script Tower Protection Stone 406,{
}
else {
set etower_timer,0;
+ erasequest 60200;
+ erasequest 60201;
mes "^0000ffThe records and after effects related to the Endless Tower have been removed. You can generate and enter the Endless Tower again.^000000";
close;
}
}
else {
- mes "Make or join the party with more than 1 member and try again.";
+ mes "Make or join a party with more than 1 member and try again.";
close;
}
}
@@ -1380,7 +1393,7 @@ OnInstanceInit:
OnEnable:
enablenpc instance_npcname("29FGate102tower", instance_id());
- areamonster "2@tower",352,351,362,387,"White Lady",1518,1,instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead";
+ areamonster "2@tower",352,351,362,387,"White Lady",1630,1,instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead";
areamonster "2@tower",352,351,362,387,"Evil Nymph",1416,30,instance_npcname("29FGate102tower", instance_id())+"::OnMyMobDead";
end;
@@ -2970,7 +2983,7 @@ OnInstanceInit:
OnEnable:
enablenpc instance_npcname("80FGate102tower", instance_id());
- areamonster "4@tower",9,267,19,303,"Mysteltainn",1203,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
+ areamonster "4@tower",9,267,19,303,"Mysteltainn",1203,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
areamonster "4@tower",9,267,19,303,"Ogretooth",1204,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
areamonster "4@tower",9,267,19,303,"Executioner",1205,20,instance_npcname("80FGate102tower", instance_id())+"::OnMyMobDead";
end;
@@ -3649,7 +3662,7 @@ OnTouch_:
mes "Good-bye for now.";
mes "Once again, I had such a great time, humans. I look forward to seeing you again.";
next;
- mes "^0000ffAs soon as the voice stopped talking, an irresistible force lifted and moved you to another space.";
+ mes "^0000ffAs soon as the voice stopped talking, an irresistible force lifted and moved you somewhere else.";
close2;
set in_102tower,10;
warp "alberta",223,36;
@@ -3993,7 +4006,7 @@ OnTimer5500:
OnTimer10500:
instance_announce 0,"You'll soon know. Mine is the face of death!",bc_map,"0x00ffcc";
stopnpctimer;
- monster "6@tower",156,147,"Naght Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";
+ monster "6@tower",156,147,"Nacht Sieger",1956,1,instance_npcname("#4th Beeper", instance_id())+"::OnMyMobDead";
end;
OnMyMobDead:
diff --git a/npc/instances/OrcsMemory.txt b/npc/instances/OrcsMemory.txt
index acbfdad49..a4034557c 100644
--- a/npc/instances/OrcsMemory.txt
+++ b/npc/instances/OrcsMemory.txt
@@ -50,7 +50,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
if ((.@party_id > 0) && ((.@partymembercount > 1))) {
if (.@orctime == -1) {
if (.@ins_mas == getcharid(0)) {
- mes "Party generation confirmed. Would you like to book entrance to the " + .@md_name$ + "?";
+ mes "Party status confirmed. Would you like to book entrance to the " + .@md_name$ + "?";
next;
switch(select("Reserve the " + .@md_name$ + ":Enter the Dungeon:Cancel")) {
case 1:
@@ -63,7 +63,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
}
else {
mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
- mes "After making a reservation, you have to select the menu 'Enter the Dungeon' if you wish to enter the " + .@md_name$ + ".";
+ mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the " + .@md_name$ + ".";
for( set .@i, 1; .@i <= 2; set .@i, .@i + 1 ) {
if( instance_attachmap(.@i + "@orcs", .@instance) == "" )
@@ -121,7 +121,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
mes "Memorial Dungeon " + .@md_name$ + " does not exist.";
mes "The party leader has not reserved entrance to the dungeon yet.";
next;
- mes "Once reservation is complete, the dungeon will be generated.";
+ mes "Once the reservation is complete, the dungeon will be generated.";
mes "If your dungeon has been destroyed you must wait 7 days before re-entering.";
close;
}
@@ -150,8 +150,8 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
//}
//else if (move_md == 2) {
if (has_instance("1@orcs") == "") {
- mes "Memorial Dungeon " + .@md_name$ + " does not exist.";
- mes "Memorial Dungeon has been destroyed by the Party Leader, or because of the time limit. Please try again after 2 hours.";
+ mes "The Memorial Dungeon " + .@md_name$ + " does not exist.";
+ mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
close;
}
//else if (move_md == 1) {
@@ -182,8 +182,8 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
//}
//else if (move_md == 2) {
if (has_instance("1@orcs") == "") {
- mes "Memorial Dungeon " + .@md_name$ + " does not exist.";
- mes "Memorial Dungeon has been destroyed by the Party Leader, or because of the time limit. Please try again after 2 hours.";
+ mes "The Memorial Dungeon " + .@md_name$ + " does not exist.";
+ mes "The Memorial Dungeon has been destroyed by the Party Leader or because of the time limit. Please try again after 2 hours.";
close;
}
//else if (move_md == 1) {
@@ -203,7 +203,7 @@ gef_fild10,242,202,0 script Dimensional Gorge Piece 406,{
}
}
else if (.@orctime == 2) {
- mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or enter the Orc's Memory.^000000";
+ mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000";
erasequest 12059;
close;
}
@@ -247,14 +247,14 @@ gef_fild10,238,202,6 script Mad Scientist#orc 865,{
mes "Very smart! I have actually just done that! See that statue over there? It's not your normal Monolith!";
next;
mes "[Mad Scientist]";
- mes "I have created it with the combination with our technology and the unlimited energy I discovered from that crevice! Want to try it?";
+ mes "I have created it with a combination of our technology and the unlimited energy I discovered from the Gorge! Want to try it?";
next;
break;
}
switch(select("... Um, that doesn't sound legal?")) {
case 1:
mes "[Mad Scientist]";
- mes "Hey, since when is something so interesting legal!? How about it! You can talk to the Orcs! C'mon!";
+ mes "Hey, since when did something so interesting have to be legal!? How about it! You can talk to the Orcs! C'mon!";
next;
mes "[Mad Scientist]";
mes "Chances are they'll just give you lots of instructions once they see you, so just wing it! They're always saying the same thing, to the point where I memorized them!";
@@ -338,7 +338,7 @@ OnMyMobDead:
else if ((.@mob_ran > 28) && (.@mob_ran < 30)) {
monster "1@orcs",0,0,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,10) == 9) {
- instance_announce 0, "High Orc: We need more defense! Get more people here!",bc_map,"0xff4444";
+ instance_announce 0, "High Orc: We need more defenses! Get more people here!",bc_map,"0xff4444";
}
}
else if ((.@mob_ran > 26) && (.@mob_ran < 29)) {
@@ -350,7 +350,7 @@ OnMyMobDead:
else {
areamonster "1@orcs",17,187,27,177,"High Orc",1213,.@mob_dead_num,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
if (rand(1,5) == 3) {
- instance_announce 0, "Caution: The army's starting to concentrate at Zone No.4.",bc_map,"0x77ff77";
+ instance_announce 0, "Caution: The army's starting to concentrate at Zone No. 4.",bc_map,"0x77ff77";
}
if (rand(1,100) == 50) {
initnpctimer;
@@ -365,7 +365,7 @@ OnTimer10:
OnTimer4010:
instance_announce 0, "Stalactic Golems are digging out of the deep underground.",bc_map,"0x77ff77";
- areamonster "1@orcs",17,187,27,177,"Stalctic Golem",1278,20,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
+ areamonster "1@orcs",17,187,27,177,"Stalactic Golem",1278,20,instance_npcname("#Resurrect Monsters1", instance_id())+"::OnMyMobDead";
stopnpctimer;
end;
}
@@ -531,11 +531,11 @@ OnTimer14610:
end;
OnTimer20210:
- instance_announce 0, "Kruger: Darn it.. They'll come in any minute. Ok. Listen to me now.",bc_map,"0xffff00";
+ instance_announce 0, "Kruger: Darn it.. They'll be here any minute. Ok. Listen to me now.",bc_map,"0xffff00";
end;
OnTimer24910:
- instance_announce 0, "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the magic to unseal the next zone.",bc_map,"0xffff00";
+ instance_announce 0, "Kruger: The Orc Shaman has sealed the 1st basement by dividing it into 4 zones. Each zone has one Enchanted Orc who has the power to unseal the next zone.",bc_map,"0xffff00";
end;
OnTimer34310:
@@ -551,7 +551,7 @@ OnTimer49210:
end;
OnTimer56310:
- instance_announce 0, "Mission: Sneak in and get rid of the 'Enchanted Orc'. Avoiding battles with other Orcs can be a tactical way of getting into the 2nd floor.",bc_map,"0x44ffff";
+ instance_announce 0, "Mission: Sneak in and get rid of the 'Enchanted Orcs'. Avoiding battles with other Orcs is the best way of getting into the 2nd floor.",bc_map,"0x44ffff";
donpcevent instance_npcname("#Resurrect Monsters1", instance_id())+"::OnEnable";
donpcevent instance_npcname("#Resurrect Monsters2", instance_id())+"::OnEnable";
donpcevent instance_npcname("#Resurrect Monsters3", instance_id())+"::OnEnable";
@@ -585,7 +585,7 @@ OnContinue:
end;
OnTimer10300:
- instance_announce 0, "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shamans started to control them with her magic.",bc_map,"0xff4499";
+ instance_announce 0, "Kruger's Whisper: The Orcs here used to be my companions. They just lost their will ever since the Orc Shaman started to control them with her magic.",bc_map,"0xff4499";
end;
OnTimer18700:
@@ -614,11 +614,11 @@ OnContinue:
end;
OnTimer30300:
- instance_announce 0, "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman has used those Orcs for her rituals.",bc_map,"0xff4499";
+ instance_announce 0, "Kruger's Whisper: I saw the bodies of our tribe. It seems that the Orc Shaman used those Orcs for her rituals.",bc_map,"0xff4499";
end;
OnTimer37600:
- instance_announce 0, "Kruger's Whisper: ... It all has to do with me. I am responsible for this evilness.",bc_map,"0xff4499";
+ instance_announce 0, "Kruger's Whisper: ... It all has to do with me. I am responsible for this evil.",bc_map,"0xff4499";
stopnpctimer;
end;
}
@@ -888,15 +888,15 @@ OnTimer10710:
end;
OnTimer16310:
- instance_announce 0, "Kruger's Whisper: But still try keep the battles not too noticable so the Shaman won't guard the altar with her direct army squad.",bc_map,"0xffff00";
+ instance_announce 0, "Kruger's Whisper: But still, try keep the battles not too noticable so the Shaman won't guard the altar with her army squad.",bc_map,"0xffff00";
end;
OnTimer21910:
- instance_announce 0, "Kruger's Whisper: Only the Party Leader can strengthen the flames so protect your leader.",bc_map,"0xffff00";
+ instance_announce 0, "Kruger's Whisper: Only the Party Leader can strengthen the flames, so protect your leader.",bc_map,"0xffff00";
end;
OnTimer23910:
- instance_announce 0, "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order so be careful.",bc_map,"0x4444ff";
+ instance_announce 0, "Mission: Unseal the zone by lighting the braziers. They can only be lit in a certain order, so be careful.",bc_map,"0x4444ff";
donpcevent instance_npcname("#2Resurrect Monsters1", instance_id())+"::OnEnable";
donpcevent instance_npcname("#2Resurrect Monsters3", instance_id())+"::OnEnable";
donpcevent instance_npcname("Torch#1-1", instance_id())+"::OnEnable";
@@ -1011,7 +1011,7 @@ OnInstanceInit:
OnEnable:
monster "2@orcs",109,156,"Safeguard Chief",1981,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead1";
- instance_announce 0, "The Chief Orc of Safeguards: Oh!! Looks like I have a company. Try me if you can!!",bc_map,"0xff8888";
+ instance_announce 0, "The Chief Orc of Safeguards: Oh!! Looks like I have company. Defeat me if you can!!",bc_map,"0xff8888";
end;
OnContinue:
@@ -1128,7 +1128,7 @@ OnInstanceInit:
OnEnable:
monster "2@orcs",67,64,"Orc Sniper",1982,1,instance_npcname("#Mobs Control", instance_id())+"::OnMyMobDead2";
- instance_announce 0, "Orc Sniper: Hah! Pretty impressive that you made it here, but your foolish little trip ends here...",bc_map,"0xff8888";
+ instance_announce 0, "Orc Sniper: Hah! Pretty impressive that you made it this far, but your foolish little trip ends here...",bc_map,"0xff8888";
end;
OnContinue:
@@ -1268,7 +1268,7 @@ OnTimer10310:
end;
OnTimer13110:
- instance_announce 0, "Caution: You are discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
+ instance_announce 0, "Caution: You have been discovered by Shaman Cargalache. Kruger's plan to assassinate the Shaman has failed. You must defeat Cargalache and find traces of Kruger.",bc_map,"0x8888ff";
stopnpctimer;
end;
@@ -1338,7 +1338,7 @@ OnTouch:
mes "Don't move! You are wounded!";
next;
mes "[Kruger]";
- mes "It's alright.. I'm dying...";
+ mes "It's... all right.. I'm dying...";
mes "....";
mes "The Shaman? What about the Shaman?";
next;
@@ -1351,7 +1351,7 @@ OnTouch:
mes "I.. I just couldn't kill my own daughter...";
mes "Thank you, I'm sure she's finally free from the nightmare that used to choke her soul.";
next;
- mes "Kruger was about to say something more, but he breathed his last breath before he could say anything.";
+ mes "Kruger was about to say something more, but he breathed his last breath before he could...";
set yong_odun,2;
close;
}
diff --git a/npc/instances/SealedShrine.txt b/npc/instances/SealedShrine.txt
index 9c82a0d57..813b1d1e9 100644
--- a/npc/instances/SealedShrine.txt
+++ b/npc/instances/SealedShrine.txt
@@ -30,18 +30,18 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
next;
if (countitem(6004) > 0) {
set .@doll,1;
- set .@selection,select("What is this place?:I want to enter here.:About the Cursed Baphomet Doll.:Cancel.");
+ set .@selection,select("What is this place?:I want to enter.:About the Cursed Baphomet Doll.:Cancel.");
}
else {
- set .@selection,select("What is this place?:I want to enter here.:Cancel.");
+ set .@selection,select("What is this place?:I want to enter.:Cancel.");
}
switch(.@selection) {
case 1:
mes "[Friar Patrick]";
- mes "Huh... Don't you know? This is St. Capitolina monastery where the Brothers who wish to become monks train and pray.";
+ mes "Huh... Don't you know? This is St. Capitolina Monastery where the Brothers who wish to become monks train and pray.";
next;
mes "[Friar Patrick]";
- mes "And this place is... What can I say... Yes. It's grave of the Devil. Grave...";
+ mes "And this place is... What can I say... Yes. It's the grave of the Devil. Grave...";
next;
mes "[Friar Patrick]";
mes "The very place where the great Devil who once demolished this world is sleeping.";
@@ -50,7 +50,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
case 1:
cutin "ins_cata_pri_n",2;
mes "[Friar Patrick]";
- mes "Baphomet... It is the name of the Devil... I think you have heard of his name.";
+ mes "Baphomet... is the name of the Devil... I think you have heard of his name.";
next;
mes "[Friar Patrick]";
mes "Numerous brave men and brothers have trained in this monastery...";
@@ -59,19 +59,19 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "Under this gravestone in front of you... Baphomet is sealed.";
next;
mes "[Friar Patrick]";
- mes "But... As we speak Satan Morocc is marshalling his powerful magical power in order to affect all life on this continent.";
+ mes "But... As we speak Satan Morocc is marshalling his powerful magic in order to affect all life on this continent.";
next;
mes "[Friar Patrick]";
- mes "Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the magical power of Satan Morocc...";
+ mes "Baphomet also... has awakened and is preparing for his revival, into this world, by weakening the power of the seal through the power of Satan Morocc...";
next;
mes "[Friar Patrick]";
- mes "Now... I'm looking for one brave enough to reseal Baphomet in it's grave... as we once did many years ago...";
+ mes "Now... I'm looking for someone brave enough to reseal Baphomet in its shrine... as we once did many years ago...";
next;
mes "[Friar Patrick]";
mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
next;
mes "[Friar Patrick]";
- mes "Train more and use your skills to prevent the world from evil's looming presence...";
+ mes "Train more and use your skills to protect the world from evil's looming presence...";
break;
case 2:
cutin "ins_cata_pri_n",2;
@@ -79,7 +79,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
next;
mes "[Friar Patrick]";
- mes "Train more and use your skills to prevent the world from evil's looming presence...";
+ mes "Train more and use your skills to protect the world from evil's looming presence...";
break;
}
break;
@@ -92,7 +92,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
copyarray .@partymembername$[0],$@partymembername$[0],.@partymembercount;
mes "[Friar Patrick]";
- mes "Do you mean you'll go to the grave and reseal Baphomet?";
+ mes "Do you mean you'll go to the shrine and reseal Baphomet?";
next;
// 12 hour cooldown
@@ -108,7 +108,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "[Friar Patrick]";
mes "Party name is "+getpartyname(.@party_id)+"...";
mes "Name of the leader is "+.@partymembername$[0]+"...";
- mes "Umm... But it seems that there is an unknown problem here... I'll check quickly. Please wait.";
+ mes "Umm... But it seems that there is a problem here... I'll check quickly. Please wait.";
}
else {
@@ -126,7 +126,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
instance_init(.@instance);
// First Floor
- disablenpc instance_npcname("Soul of Ancient Hero#1F", instance_id());
+ disablenpc instance_npcname("Ancient Hero's Soul#1F", instance_id());
disablenpc instance_npcname("ins_bapho_to_2f", instance_id());
for( set .@i, 1; .@i < 13; set .@i, .@i + 1 ) {
@@ -145,7 +145,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
disablenpc instance_npcname("Magical Seal#4", instance_id());
disablenpc instance_npcname("Magical Seal#8", instance_id());
disablenpc instance_npcname("Magical Seal#10", instance_id());
- disablenpc instance_npcname("Soul of Ancient Hero#2F", instance_id());
+ disablenpc instance_npcname("Ancient Hero's Soul#2F", instance_id());
disablenpc instance_npcname("control_baphomet", instance_id());
disablenpc instance_npcname("ins_2f_hero_broad2", instance_id());
disablenpc instance_npcname("2f_callmon_pattern_c", instance_id());
@@ -162,22 +162,22 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "[Friar Patrick]";
mes "Party name is "+getpartyname(.@party_id)+"...";
mes "Name of the leader is "+.@partymembername$[0]+"...";
- mes "Okay... I'll adjust the seal of the grave so that you and your company can enter.";
+ mes "Okay... I'll adjust the shrine's seal so that you and your group can enter.";
next;
mes "[Friar Patrick]";
- mes "You will see a sign when the control of the seal is finished. Please wait until the sign shows...";
+ mes "You will see a sign when the seal has broken. Please wait until the sign appears...";
next;
mes "[Friar Patrick]";
- mes "When you see the sign, put your hands on the altar of the grave... Then you can move to inside of the grave.";
+ mes "When you see the sign, put your hands on the gravestone... Then you can move inside.";
next;
mes "[Friar Patrick]";
- mes "One thing that you should remember is... Anyone who enters this grave, will be cursed by Baphomet and they can't enter or leave this grave while they are cursed.";
+ mes "One thing that you should remember is... Anyone who enters this shrine will be cursed by Baphomet and cannot enter or leave while they are cursed.";
next;
mes "[Friar Patrick]";
- mes "And one more thing... In this cursed area, some skills, which are protected by outer physical power, are prohibited by the effect of the seal.";
+ mes "And one more thing... In this cursed area, some skills, which are protected by outer physical power are prohibited by the effect of the seal.";
next;
mes "[Friar Patrick]";
- mes "For example, the skills like ^0000FFSafety wall, Assumptio^000000... So you'd better to prepare enoughly before enter the grave.";
+ mes "For example, the skills like ^0000FFSafety Wall and Assumptio^000000... So you'd better prepare before entering the shrine.";
}
}
else {
@@ -190,7 +190,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
}
else if ((.@ins_bapho_check == 0) || (.@ins_bapho_check == 1)) {
mes "[Friar Patrick]";
- mes "It seems you have entered this grave recently... You cannot enter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.";
+ mes "It seems you have entered this shrine recently... You cannot reenter because Baphomet's Curse still remains. Baphomet's Curse disappears only after a certain amount of time has passed.";
}
else if (.@ins_bapho_check == 2) {
mes "[Friar Patrick]";
@@ -224,13 +224,13 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "... ... ...";
next;
mes "[Friar Patrick]";
- mes "That's correct... I can feel the bad feeling of Baphomet... So, what will you do with the doll?";
+ mes "That's correct... I can feel Baphomet's evil inside... So, what will you do with the doll?";
next;
mes "[Friar Patrick]";
mes "It is just a dangerous and useless thing if you do nothing with it... I'll introduce someone who can help you... Do you want to see him?";
next;
mes "[Friar Patrick]";
- mes "Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... Then he will make this doll helpful to you.";
+ mes "Go to see ^0000FFRust Blackhand^000000 who is near the main building of the monastery... He will make this doll helpful to you.";
setquest 3042;
break;
}
@@ -239,7 +239,7 @@ monk_test,309,146,3 script Friar Patrick#edq 412,{
mes "Anyone who fights for good will know, deep inside, that evil is threatening to conquer this world...";
next;
mes "[Friar Patrick]";
- mes "Train more and use your skills to prevent the world from evil's looming presence...";
+ mes "Train more and use your skills to protect the world from evil's looming presence...";
break;
}
close2;
@@ -251,9 +251,9 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
if (checkquest(3040)>=0) erasequest 3040;
if (countitem(6002) > 0)
delitem 6002,countitem(6002); //Token_Of_Apostle
- mes "This stone-grave has a carving of a wicked devil with large horns. An ominous feeling emits from it.";
+ mes "This gravestone has a carving of a wicked devil with large horns. It arouses an ominous feeling.";
next;
- switch(select("Touch this.:Step back.")) {
+ switch(select("Touch the stone.:Step back.")) {
case 1:
set .@party_id,getcharid(1);
@@ -271,10 +271,10 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
if ((.@ins_bapho_check == -1) || ((.@ins_bapho_check2 >= 0) && (.@ins_bapho_check2 < 2))) {
if (has_instance("1@cata") == "") {
- mes "It's cold to the touch. But, there is no response.";
+ mes "It's cold to the touch. It doesn't respond.";
}
//else if (ret == 2) {
- // mes "It's cold to the touch. But, there is no response.";
+ // mes "It's cold to the touch. It doesn't respond.";
// close;
//}
else if ((has_instance("1@cata") != "") && (.@partymembercount < 2)) {
@@ -283,7 +283,7 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
}
//else if (ret == 0) {
else {
- mapannounce "monk_test","[" + strcharinfo(0) + "] member of [" + getpartyname(.@party_id) + "] party enters the Sealed catacombs.",bc_map,"0x00ff99";
+ mapannounce "monk_test","[" + strcharinfo(0) + "] member of the [" + getpartyname(.@party_id) + "] party has entered the Sealed Shrine.",bc_map,"0x00ff99";
setquest 3046;
setquest 3045;
warp "1@cata",100,224;
@@ -291,7 +291,7 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
}
else if ((.@ins_bapho_check == 0) || (.@ins_bapho_check == 1)) {
mes "[Friar Patrick]";
- mes "It seems you have entered this grave recently... You cannot enter because the curse of Baphomet still remains.";
+ mes "It seems you have entered this shrine recently... You cannot reenter because the curse of Baphomet still remains.";
mes "The curse of Baphomet disappears after a certain amount of time after you entered.";
}
else if (.@ins_bapho_check == 2) {
@@ -306,7 +306,7 @@ monk_test,306,151,3 script Grave of Baphomet#edq 111,{
if (checkquest(3045)) erasequest 3045;
next;
mes "[Friar Patrick]";
- mes "Huu... It's over. Now I released all the curses on you. You can enter again.";
+ mes "Huu... It's over. Now I released all of the curses on you. You can enter again.";
}
break;
case 2:
@@ -325,14 +325,14 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
next;
if ((.@new_maje == 0) || (.@new_maje == 1)) {
mes "[Rust Blackhand]";
- mes "Do you bring all the materials?";
+ mes "Did you bring all of the ingredients?";
next;
if ((countitem(6004) > 0) && (countitem(2256) > 0) && (countitem(7799) > 29) && (countitem(7798) > 49) && (Zeny > 990000)) {
mes "[Rust Blackhand]";
- mes "kkk... You prepared the materials well. Why don't you leave it there and wait?";
+ mes "kkk... You prepared the ingredients well. Why don't you leave it there and wait?";
next;
mes "[Rust Blackhand]";
- mes "Hmm... It is so long time to see this wicked horn... kkk... Let me start...";
+ mes "Hmm... It's been such a long time since I last saw these wicked horns... kkk... Let me start...";
next;
mes "...";
next;
@@ -348,21 +348,21 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
completequest 3043;
getitem 5374,1; //L_Magestic_Goat
mes "[Rust Blackhand]";
- mes "It's done. You would be touched and excited, of course. I understand...";
+ mes "It's done. You may be excited, of course. I understand...";
next;
mes "[Rust Blackhand]";
- mes "I don't accept complains or A/S request, so use it with care. I got to go...";
+ mes "I don't accept complaints or A/S requests, so use it with care. I must go...";
close;
}
else {
mes "[Rust Blackhand]";
- mes "Huu... You couldn't understand what I said. With this materials, you can make nothing.";
+ mes "Huu... You don't understand what I said. You cannot make anything with these ingredients.";
next;
mes "[Rust Blackhand]";
- mes "I'll tell you the materials one more time, so gather them correctly.";
+ mes "I'll tell you the ingredients one more time, so please gather them correctly.";
next;
mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF 990000^000000 Zeny.";
+ mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
close;
}
}
@@ -370,47 +370,47 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
switch(select("About the Cursed Baphomet Doll:Stop talking.")) {
case 1:
mes "[Rust Blackhand]";
- mes "What?... Hmmm... Did you get the doll? You are pretty good unlike your apperance...";
+ mes "What?... Hmmm... Did you get the doll? You're pretty good, unlike your appearance...";
next;
mes "[Rust Blackhand]";
- mes "Let me see... Needless to say, Patric must be sent you here to deal with the doll, right?";
+ mes "Let me see... Needless to say, Patric must have sent you here to deal with the doll, right?";
next;
mes "[Rust Blackhand]";
- mes "Cool... I'll help you to make the bad doll useful. What? What can I do?";
+ mes "Cool... I'll help you make the evil doll useful. What? What can I do?";
next;
mes "[Rust Blackhand]";
- mes "I can make you to have the strong and large horn of the wicked devil. A helm that has power of Baphomet.";
+ mes "I can make the strong and large horns of the wicked devil Baphomet for you. A helm that has his immense power.";
next;
mes "[Rust Blackhand]";
- mes "It is to say ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you know is just a green apple to ripe.";
+ mes "It is called the ^4d4dffGigantic Magestic Goat^000000. You'll realize that the Magestic Goat you're familiar with is nothing in comparison.";
next;
mes "[Rust Blackhand]";
- mes "The Cursed Baphomet Doll is the most important material... I'll make you if you want. What would you do?";
+ mes "The Cursed Baphomet Doll is the most important ingredient... I'll make you if you want. What would you like to do?";
next;
- switch(select("I want to make.:I don't need.")) {
+ switch(select("I want to make one!:I don't need one.")) {
case 1:
mes "[Rust Blackhand]";
- mes "kkk... Yes, wise men get their chances when the chance comes. I'll tell you the materials. Not to forget and bring them all.";
+ mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.";
next;
mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF 990000^000000 Zeny.";
+ mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
next;
mes "[Rust Blackhand]";
- mes "You can get the Magestic Goat from the weak Baphomet in Labyrinth Forest. Crystal of Darkness and Fragment of Darkness can get from Incarnation of Morocc.";
+ mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.";
next;
mes "[Rust Blackhand]";
- mes "I'm sure that you can get the materials because you sealed the real Baphomet. Can't you? kkk...";
+ mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...";
next;
mes "[Rust Blackhand]";
- mes "You'll never know how great is this before you see this. If you understood, go and get the materials.";
+ mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
changequest 3042,3043;
close;
case 2:
mes "[Rust Blackhand]";
- mes "Huh... Do you? Do whatever you want... Do you think you can even touch this not by this chance?";
+ mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?";
next;
mes "[Rust Blackhand]";
- mes "Tut, tut... I don't care if the wicked doll threatens your life all the time.";
+ mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!";
close;
}
case 2:
@@ -421,7 +421,7 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
}
else if ((.@new_maje == -1) && (countitem(6004) == 0)) {
mes "[Rust Blackhand]";
- mes "If you don't have a business on me, go away! As you see, I make equipments for Brothers at monastery, not for adventurers like you. Do you understand?";
+ mes "If you don't have business with me, go away! As you see, I make equipment for the Brothers at the monastery, not for adventurers like you. Do you understand?";
close;
}
else if ((.@new_maje == 2) && (countitem(6004) > 0)) {
@@ -431,42 +431,42 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
mes "What?... You again? What do you want this time?";
next;
mes "[Rust Blackhand]";
- mes "What? You got another doll of the wicked devil? Umm... You're much better than I thought...";
+ mes "What? You got another doll from the wicked devil? Umm... You're much better than I thought...";
next;
mes "[Rust Blackhand]";
mes "Alright... I'll help you again.";
next;
mes "[Rust Blackhand]";
- mes "If you want to make the doll to a ^4d4dffGigantic Magestic Goat^000000 again, I can make you one more.";
+ mes "If you want to make the doll into a ^4d4dffGigantic Magestic Goat^000000 again, I can make you another.";
next;
mes "[Rust Blackhand]";
- mes "I'll tell you the materials again. So, do you want to make?";
+ mes "I'll tell you the ingredients again. So, do you want to make?";
next;
switch(select("I want.:No, I don't want.")) {
case 1:
mes "[Rust Blackhand]";
- mes "kkk... Yes, wise men get their chances when the chance comes. I'll tell you the materials. Not to forget and bring them all.";
+ mes "kkk... Yes, wise men take their chances when the opportunity comes. I'll tell you the ingredients. Don't forget, and bring them all.";
next;
mes "[Rust Blackhand]";
- mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF 990000^000000 Zeny.";
+ mes "^0000FFCursed Baphomet Doll, Magestic Goat, 30 Crystal of Darkness, 50 Fragment of Darkness^000000, and the most important, production cost is ^0000FF990000^000000 Zeny.";
next;
mes "[Rust Blackhand]";
- mes "You can get the Magestic Goat from the weak Baphomet in Labyrinth Forest. Crystal of Darkness and Fragment of Darkness can get from Incarnation of Morocc.";
+ mes "You can get the Magestic Goat from the weak Baphomet in the Labyrinth Forest. Crystal of Darkness and Fragment of Darkness are from the Incarnation of Morocc.";
next;
mes "[Rust Blackhand]";
- mes "I'm sure that you can get the materials because you sealed the real Baphomet. Can't you? kkk...";
+ mes "I'm sure that you can get the ingredients because you sealed the real Baphomet. Can't you? kkk...";
next;
mes "[Rust Blackhand]";
- mes "You'll never know how great is this before you see this. If you understood, go and get the materials.";
+ mes "You'll never know how great this hat is until you get one. If you understood, go and get the ingredients.";
//recall_completequest 3043
- setquest 3043;
+ changequest 3042,3043;
close;
case 2:
mes "[Rust Blackhand]";
- mes "Huh... Do you? Do whatever you want... Do you think you can even touch this not by this chance?";
+ mes "Huh... Do you? Do whatever you want... Do you really want to let this opportunity go to waste?";
next;
mes "[Rust Blackhand]";
- mes "Tut, tut... I don't care if the wicked doll threatens your life all the time.";
+ mes "Tut, tut... I don't care if the wicked doll threatens your life all the time!";
close;
}
case 2:
@@ -477,12 +477,12 @@ prt_monk,261,91,3 script Rust Blackhand#edq 826,{
}
else if ((.@new_maje == 2) && (countitem(6004) == 0)) {
mes "[Rust Blackhand]";
- mes "Why are you hanging around here? If you won't make ^4d4dffGigantic Magestic Goat^000000, go away";
+ mes "Why are you hanging around here? If you don't want a ^4d4dffGigantic Magestic Goat^000000, go away.";
close;
}
}
-// Inside Sealed Catacomb
+// Sealed Shrine Interior
1@cata,1,2,0 script ins_baphomet_lotto -1,{
OnEnable:
switch(rand(1,13)) {
@@ -739,7 +739,7 @@ OnMyMobDead:
if ('ins_baphomet == 0) {
mes "The gravestone is trembling...";
next;
- mes "By touching the gravestone, I hear a voice.";
+ mes "When touching the gravestone, I hear a voice.";
next;
specialeffect2 EF_CONE;
mes "[Voice of the Gravestone]";
@@ -749,13 +749,13 @@ OnMyMobDead:
switch(select("Who are you?:Waited for me?:Cancel.")) {
case 1:
mes "[Voice of the Gravestone]";
- mes "I was one of the warriors to stop the Baphomet like you. Now, I'm dead and only my soul remains...";
+ mes "I was one of the warriors to stop Baphomet like you. Now, I'm dead and only my soul remains...";
next;
mes "[Voice of the Gravestone]";
- mes "As you know... We don't have enough time. You can't stop the Baphomet by yourselves. The power of the devil has strengthened during the decades.";
+ mes "As you know... We don't have much time. You can't stop Baphomet by yourselves. The power of the devil has strengthened over the years.";
next;
mes "[Voice of the Gravestone]";
- mes "In the past, my companions and I sealed the Baphomet at the altar located on the 2nd basement and blocked the entrance.";
+ mes "In the past, my companions and I sealed Baphomet at the altar located on the 2nd basement and blocked the entrance.";
next;
mes "[Voice of the Gravestone]";
mes "I moved my soul's essence to my pendant, so that I could remain in this world. That's when I became this grave's guardian.";
@@ -763,7 +763,7 @@ OnMyMobDead:
break;
case 2:
mes "[Voice of the Gravestone]";
- mes "Baphomet's power is about to exceed the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time.";
+ mes "Baphomet's power is about to break the seal that we made. If you don't reactivate them... Baphomet's revival will only be a matter of time.";
next;
mes "[Voice of the Gravestone]";
mes "To open the entrance, you must substantialize my soul. I'll open the entrance and reactivate the weakened seals after I am substantilized.";
@@ -776,7 +776,7 @@ OnMyMobDead:
set 'ins_baphomet,1;
close;
case 3:
- mes "I can feel the voice becomming faint.";
+ mes "I can feel the voice becoming faint.";
close;
}
}
@@ -802,13 +802,13 @@ OnMyMobDead:
mes "Yes... This is... My pendant...";
next;
delitem 6003,1; //Soul_Pendant
- enablenpc instance_npcname("Soul of Ancient Hero#1F", instance_id());
+ enablenpc instance_npcname("Ancient Hero's Soul#1F", instance_id());
disablenpc instance_npcname("Gravestone#", instance_id());
mes "[Voice of the Gravestone]";
mes "Now I can substantialize my soul. I'll wait for you in front of the altar of fire located at the center of this grave. Let's meet there.";
next;
- instance_announce 0, "Soul of Ancient Hero : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
- mes "I can feel the voice becomming faint.";
+ instance_announce 0, "Ancient Hero's Soul : I'll wait for you in front of the altar of fire located at the center",bc_map,"0xFFFF00";
+ mes "I can feel the voice becoming faint.";
close;
}
else {
@@ -822,7 +822,7 @@ OnMyMobDead:
}
else {
mes "[Voice of the Gravestone]";
- mes "I want to talk to ^0000FFa representative among your party^000000. Others, wait here.";
+ mes "I want to talk to ^0000FFa representative among your party^000000. Everyone else, wait here.";
close;
}
end;
@@ -831,101 +831,101 @@ OnTouch:
if ('ins_baphomet == 0) {
mes "'Krrrr... Krrrr...'";
next;
- mes "I can feel an odd feeling at the grave. It's like someone is calling something silently...";
+ mes "I can feel something odd at the grave. It's like someone is calling out silently...";
close;
}
end;
}
-1@cata,176,119,4 script Soul of Ancient Hero#1F 411,{
+1@cata,176,119,4 script Ancient Hero's Soul#1F 411,{
set .@party_id,getcharid(1);
cutin "ins_cata_champ_n",2;
if ('ins_baphomet == 2) {
- mes "[Soul of Ancient Hero]";
- mes "By your help, my soul can be substantialized. I want to talk more, but we do not have enough time...";
+ mes "[Ancient Hero's Soul]";
+ mes "With your help, my soul can be substantialized. I want to talk more, but we do not have enough time...";
next;
- mes "[Soul of Ancient Hero]";
- mes "I can be substantialized about one hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal.";
+ mes "[Ancient Hero's Soul]";
+ mes "I must be substantialized within the next hour. To reach the Main Altar underground, you must help me perform the ceremony for opening each seal.";
next;
- mes "[Soul of Ancient Hero]";
- mes "Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches of the graves...";
+ mes "[Ancient Hero's Soul]";
+ mes "Now I'll tell you what should you do. First, collect ^0000FFEssence of Fire^000000 from the torches on the graves...";
next;
- mes "[Soul of Ancient Hero]";
- mes "And second, all members who will enter the underground must carry a symbol which is called the Token of Apostle.";
+ mes "[Ancient Hero's Soul]";
+ mes "Second, all members who will enter the underground must carry a symbol, called the Token of Apostle.";
next;
while(1) {
cutin "ins_cata_champ_n",2;
switch(select("What is Essence of Fire?:What is a Token of Apostle?:What should I do?:I am ready.")) {
case 1:
set .@ins_baphomet_1f_1,.@ins_baphomet_1f_1+1;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "You can see the torches here and there. These torches are the essence of Thor, the god of Thunder. They are inherited from our predecessors to stop the darkness of Baphomet...";
next;
- mes "[Soul of Ancient Hero]";
- mes "To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. So collect ^0000FF10 Essence of Fire^000000 from the torches.";
+ mes "[Ancient Hero's Soul]";
+ mes "To open the sealed underground gate, I must be purified by the ^0000FFEssence of Fire^000000 which has the power of Thor. Collect ^0000FF10 Essence of Fire^000000 from the torches.";
next;
- mes "[Soul of Ancient Hero]";
- mes "One thing you must remember is... This ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith.";
+ mes "[Ancient Hero's Soul]";
+ mes "One thing you must remember is... ^0000FFEssence of Fire^000000 can only be collected by the Inheritor of Faith.";
next;
- mes "[Soul of Ancient Hero]";
- mes "I'll inscribe the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000.";
+ mes "[Ancient Hero's Soul]";
+ mes "I'll give the token of the Inheritor of Faith to the party leader. Only the party leader can collect the ^0000FFEssence of Fire^000000.";
next;
break;
case 2:
set .@ins_baphomet_1f_2,.@ins_baphomet_1f_2+1;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "At that time, it was impossible to get rid of Devil Baphomet by ourselves. After numerous heroes sacrificed their lives, we could barely seal him under this Abbey.";
next;
- mes "[Soul of Ancient Hero]";
- mes "However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this grave.";
+ mes "[Ancient Hero's Soul]";
+ mes "However, Baphomet never gave up. He continuously strengthened his power. And his power has brought new life to this shrine.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Some of these monsters have magical powers. Baphomet calls them his 'Apostles'.";
next;
- mes "[Soul of Ancient Hero]";
- mes "The apostles are cloning themselves to fill the grave with their evil energy. They are the monsters here in this catacomb.";
+ mes "[Ancient Hero's Soul]";
+ mes "The apostles are cloning themselves to fill the shrine with their evil energy. They are the monsters here in this catacomb.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Kill the Apostles. They can only be distinguished from their clones because they will possess a ^0000FFToken of Apostle^000000...";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "If each party member possesses a ^0000FFToken of Apostle^000000, Baphomet will not be able to perceive your entrance to the Main Altar underground.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "If Baphomet perceives you when you pass through the sealed gate, he may release his tremendous magical power. Then, this abbey will be demolished.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Kill the apostles and get the ^0000FFToken of Apostle^000000.";
next;
break;
case 3:
set .@ins_baphomet_1f_3,.@ins_baphomet_1f_3+1;
if (getpartyleader(.@party_id,2) == getcharid(0)) {
- mes "[Soul of Ancient Hero]";
- mes "You look like the leader of this party. Then you need to go and get ^0000FF10 Essence of Fire^000000 from the torches.";
+ mes "[Ancient Hero's Soul]";
+ mes "You look like the leader of this party. You need to go and get ^0000FF10 Essence of Fire^000000 from the torches.";
next;
- mes "[Soul of Ancient Hero]";
- mes "Now I'll carve you the symbol which shows you're a inheritor of faith. Be noticed that, no one can get the Essence of Fire exclude you in your party.";
+ mes "[Ancient Hero's Soul]";
+ mes "Now I'll carve you the symbol which shows you're a inheritor of faith. Be aware that no one in your party but you can collect the Essence of Fire.";
next;
specialeffect2 EF_HOLYHIT;
- mes "[Soul of Ancient Hero]";
- mes "You should carry ^0000FFToken of Apostle^000000 also. So prepare your own.";
+ mes "[Ancient Hero's Soul]";
+ mes "You should also carry a ^0000FFToken of Apostle^000000, so find one for yourself too.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "When all of you are ready to go, let me know. I'll open the sealed gate when you're ready.";
next;
}
else {
- mes "[Soul of Ancient Hero]";
- mes "Make sure that your party leader has listened to my explanation of what you and your companions must do";
+ mes "[Ancient Hero's Soul]";
+ mes "Make sure that your party leader has listened to my explanation of what you and your companions must do.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Kill the Apostles of Baphomet and find their ^0000FFToken of Apostle^000000.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "It might be better to kill all of them because there is no way to differentiate them from their clones.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Are you ready?";
mes "Make sure that you have listened to all that I have to say before saying that you are ready.";
next;
@@ -934,17 +934,17 @@ OnTouch:
case 4:
if ((.@ins_baphomet_1f_1 > 0) && (.@ins_baphomet_1f_2 > 0) && (.@ins_baphomet_1f_3 > 0)) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Are you ready to go? Then I'll open this sealed gate now.";
next;
set .@exitloop,1;
}
else {
cutin "ins_cata_champ_a",2;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "It may be difficult but I wish you luck braving the perils of this catacomb.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Remember, you need to collect ^0000FF10 Essence of Fire^000000 from the torches and the ^0000FFToken of Apostle^000000 from the Apostles of Baphomet.";
next;
}
@@ -953,16 +953,16 @@ OnTouch:
if (.@exitloop) break;
}
if (getpartyleader(.@party_id,2) == getcharid(0)) {
- mes "[Soul of Ancient Hero]";
- mes "To remind you again, I can be substantialized in one hour. So everyone, finish your work within that time.";
+ mes "[Ancient Hero's Soul]";
+ mes "To remind you again, I must be substantialized within the next hour. So everyone, finish your work within that time!";
set 'ins_baphomet,3;
donpcevent instance_npcname("ins_baphomet_1f_timer", instance_id())+"::OnEnable";
donpcevent instance_npcname("ins_baphomet_lotto2", instance_id())+"::OnEnable";
donpcevent instance_npcname("ins_baphomet_lotto3", instance_id())+"::OnEnable";
}
else {
- mes "[Soul of Ancient Hero]";
- mes "To remind you again, I can be substantialized in one hour. So everyone, finish your work within that time.";
+ mes "[Ancient Hero's Soul]";
+ mes "To remind you again, I can be substantialized for the next hour. So everyone, finish your work within that time.";
//set 'ins_baphomet,3;
}
close2;
@@ -971,17 +971,17 @@ OnTouch:
}
else if (('ins_baphomet == 3) && (getpartyleader(.@party_id,2) == getcharid(0))) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Did you get 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000?";
next;
if ((countitem(6001) > 9) && (countitem(6002) > 0)) {
delitem 6001,countitem(6001); //Essence_Of_Fire
set 'ins_baphomet,4;
- mes "[Soul of Ancient Hero]";
- mes "Okay. You've done your work. Now check your companions and tell me when everyone finished their work.";
+ mes "[Ancient Hero's Soul]";
+ mes "Okay. You've done your work. Now check your companions and tell me when everyone has finished their work.";
}
else {
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Not ready yet? You should prepare 10 ^0000FFEssence of Fire^000000 and ^0000FFToken of Apostle^000000.";
}
close2;
@@ -990,16 +990,16 @@ OnTouch:
}
else if ('ins_baphomet == 3) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
- mes "Do you have ^0000FFToken of Apostle^000000?";
+ mes "[Ancient Hero's Soul]";
+ mes "Do you have a ^0000FFToken of Apostle^000000?";
next;
if (countitem(6002) > 0) {
set 'ins_baphomet,4;
- mes "[Soul of Ancient Hero]";
- mes "Okay. You've done your work. Tell your representative to check your companions and come to me when everyone finished their work.";
+ mes "[Ancient Hero's Soul]";
+ mes "Okay. You've done your work. Tell your representative to check your companions and come to me when everyone has finished their work.";
}
else {
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Not ready yet? You should prepare ^0000FFToken of Apostle^000000.";
}
close2;
@@ -1008,44 +1008,44 @@ OnTouch:
}
else if (('ins_baphomet == 4) && (getpartyleader(.@party_id,2) == getcharid(0))) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
- mes "Are you ready? I opened the sealed gate right now. To pass the gate, you should carry ^0000FFToken of Apostle^000000.";
+ mes "[Ancient Hero's Soul]";
+ mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.";
next;
set 'ins_baphomet,5;
specialeffect EF_TELEPORTATION;
enablenpc instance_npcname("ins_bapho_to_2f", instance_id());
- mes "[Soul of Ancient Hero]";
- mes "Now you can go to the main altar. It is located in the corner of right bottom of this floor.";
+ mes "[Ancient Hero's Soul]";
+ mes "Now you can go to the main altar. It is located in the bottom right corner of this floor.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Your real battle will begin... I'll follow you soon and find a way to help you.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Go ahead, warriors.";
cutin "",255;
- instance_announce 0, "Soul of Ancient Hero : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Now you can go to the Main Altar's gate. It is located in the Southeast",bc_map,"0xFFFF00";
close;
}
else if ('ins_baphomet == 4) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
- mes "Are you ready? I opened the sealed gate right now. To pass the gate, you should carry ^0000FFToken of Apostle^000000.";
+ mes "[Ancient Hero's Soul]";
+ mes "Are you ready? I opened the sealed gate. To pass the gate, you should carry a ^0000FFToken of Apostle^000000.";
next;
- mes "[Soul of Ancient Hero]";
- mes "I'll complete opening the sealed gate when your representative tell me that you're ready.";
+ mes "[Ancient Hero's Soul]";
+ mes "I'll complete opening the sealed gate when your representative tells me that you're ready.";
cutin "",255;
close;
}
else if ('ins_baphomet == 5) {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
- mes "What are you doing? The entrance of the main altar is opened right now, go and fight! Entrance is near the bottom of rightside of this floor.";
+ mes "[Ancient Hero's Soul]";
+ mes "What are you doing? The entrance of the main altar is opened now, go and fight! The entrance is near the bottom right side of this floor.";
cutin "",255;
close;
}
else {
cutin "ins_cata_champ_n",2;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "I have nothing to say to you...";
cutin "",255;
close;
@@ -1063,7 +1063,7 @@ OnTouch:
end;
}
else {
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "Where is your Token of Apostle? I said you should carry the Token of Apostle to pass this gate.";
close;
}
@@ -1073,7 +1073,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1095,7 +1095,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1116,7 +1116,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1137,7 +1137,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1158,7 +1158,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1179,7 +1179,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1200,7 +1200,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1221,7 +1221,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1242,7 +1242,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1264,7 +1264,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1286,7 +1286,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1307,7 +1307,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1328,7 +1328,7 @@ OnTouch:
if ('ins_baphomet == 1) {
getitem 6003,1; //Soul_Pendant
set 'ins_baphomet,2;
- mes "A small stuff is shining under a falling grave.";
+ mes "A small object is shining under a leaning grave.";
next;
mes "[" + strcharinfo(0) + "]";
mes "I think this is the pendant...";
@@ -1349,18 +1349,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#1", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1369,7 +1369,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1383,18 +1383,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#2", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1403,7 +1403,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1417,18 +1417,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#3", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1437,7 +1437,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1451,18 +1451,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#4", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1471,7 +1471,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1485,18 +1485,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#5", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1505,7 +1505,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1519,18 +1519,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#6", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1539,7 +1539,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1553,18 +1553,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#7", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1573,7 +1573,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1587,18 +1587,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#8", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1607,7 +1607,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1621,18 +1621,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#9", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1641,7 +1641,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1655,18 +1655,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#10", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1675,7 +1675,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1689,18 +1689,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#11", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1709,7 +1709,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1723,18 +1723,18 @@ OnTouch:
set .@party_id,getcharid(1);
if (getpartyleader(.@party_id,2) == getcharid(0)) {
if (('ins_baphomet == 3) && (countitem(6001) < 11)) {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me.";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me.";
next;
- mes "The grand appearance and heat of the fire makes me step back... But I pluck up my courage and make a long arm to pick up the torch.";
+ mes "Its grand appearance and heat of the fire makes me step back... But I pluck up my courage and reach out to pick up the torch.";
next;
specialeffect2 EF_HOLYHIT;
getitem 6001,1; //Essence_Of_Fire
- mes "The symbol of inheritor shines. Then a small crystal is fallen to my hand from the torch.";
+ mes "The symbol of inheritor shines. Then a small crystal falls into my hand from the torch.";
disablenpc instance_npcname("Bobbing Torch#12", instance_id());
close;
}
else if (('ins_baphomet == 3) && (countitem(6001) > 10)) {
- mes "You have 10 Essence of Fire already. So you don't need to collect it anymore.";
+ mes "You have 10 Essence of Fire already, so you don't need to collect any more.";
close;
}
else {
@@ -1743,7 +1743,7 @@ OnTouch:
}
}
else {
- mes "A huge torch which seems it can burn everything is bobbing up and down in front of me..";
+ mes "A huge torch appearing as if it can burn everything is bobbing up and down in front of me..";
next;
mes "[Unknown Voice]";
mes "You are not a inheritor of faith. Do not desecrate the Essence of Fire with your disrespectful hands.";
@@ -1765,19 +1765,19 @@ OnDisable:;
end;
OnTimer1800000:
- instance_announce 0, "Soul of Ancient Hero : We don't have enough time. Hurry up.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : We don't have enough time! Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer2400000:
- instance_announce 0, "Soul of Ancient Hero : My body is disappearing... Hurry up.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : My body is disappearing... Hurry up!",bc_map,"0xFFFF00";
end;
OnTimer3000000:
- instance_announce 0, "Soul of Ancient Hero : Everything is over... Is there no other way than to wait next chance...",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Everything is over... There is no other way but to wait for the next chance...",bc_map,"0xFFFF00";
end;
OnTimer3050000:
- instance_announce 0, "Soul of Ancient Hero : We failed... However... We still have chances. I hope you to train yourselves until the time comes.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : We failed... However... We still have a chance. I hope you will train yourselves until the time comes.",bc_map,"0xFFFF00";
end;
OnTimer3100000:
@@ -1820,7 +1820,7 @@ OnTimer16000:
end;
OnTimer18000:
- instance_announce 0, "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us.",bc_map,"0xFFFF00";
+ instance_announce 0, "Apostle of Baphomet : Hurry up and release the seals of the altars! Our Master's return is upon us!",bc_map,"0xFFFF00";
stopnpctimer;
disablenpc instance_npcname("ins_2f_enter_broad", instance_id());
end;
@@ -1905,16 +1905,16 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
else if ((.@seal_check == 0) || (.@seal_check == 1)) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
- mes "Your SP is not recovered yet. You lost your SP on the altar, but it seems the power of the seal doesn't came back.";
+ mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
close;
}
else if (.@seal_check == 2) {
@@ -1926,9 +1926,9 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
end;
@@ -1944,16 +1944,16 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
else if ((.@seal_check == 0) || (.@seal_check == 1)) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
- mes "Your SP is not recovered yet. You lost your SP on the altar, but it seems the power of the seal doesn't came back.";
+ mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
close;
}
else if (.@seal_check == 2) {
@@ -1965,9 +1965,9 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
end;
@@ -1983,16 +1983,16 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
else if ((.@seal_check == 0) || (.@seal_check == 1)) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
- mes "Your SP is not recovered yet. You lost your SP on the altar, but it seems the power of the seal doesn't came back.";
+ mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
close;
}
else if (.@seal_check == 2) {
@@ -2004,9 +2004,9 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
end;
@@ -2022,16 +2022,16 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
else if ((.@seal_check == 0) || (.@seal_check == 1)) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
- mes "Your SP is not recovered yet. You lost your SP on the altar, but it seems the power of the seal doesn't came back.";
+ mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
close;
}
else if (.@seal_check == 2) {
@@ -2043,9 +2043,9 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
end;
@@ -2061,16 +2061,16 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
else if ((.@seal_check == 0) || (.@seal_check == 1)) {
specialeffect2 EF_SILENCEATTACK;
percentheal -50,0;
sc_start Eff_Stone,30000,0;
- mes "Your SP is not recovered yet. You lost your SP on the altar, but it seems the power of the seal doesn't came back.";
+ mes "Your SP has not recovered yet. You lost your SP on the altar, but it seems the power of the seal has returned.";
close;
}
else if (.@seal_check == 2) {
@@ -2082,9 +2082,9 @@ OnTouch:
sc_start Eff_Stone,20000,0;
setquest 3041;
instance_announce 0, "The seal activated by putting magical power into the altar.",bc_map,"0x87ceeb";
- mes "I can feel the power of the altar came back by putting magical power.";
+ mes "I can feel the power of the altar came back by adding magical power.";
next;
- mes "But you can't put your magical power during 3 minutes because you spent your SP on the altar.";
+ mes "But you can't use your magic for 3 minutes because you used your SP on the altar.";
close;
}
end;
@@ -2123,37 +2123,37 @@ OnTouch:
end;
}
-2@cata,80,63,4 script Soul of Ancient Hero#2F 411,{
+2@cata,80,63,4 script Ancient Hero's Soul#2F 411,{
cutin "ins_cata_champ_s",2;
if (checkquest(3041)) erasequest 3041;
if (checkquest(3046)) erasequest 3046;
setquest 3046;
- mes "[Soul of Ancient Hero]";
- mes "Good job, my descendants... You've satisfied our long-cherished desire that me and my companies can't accomplish.";
+ mes "[Ancient Hero's Soul]";
+ mes "Good job, my descendants... You've finished the long-cherished task that me and my bretheren could not complete.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "I really appreciate your help.";
mes "Our souls can finally rest in peace...";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "The struggle for peace on this world will never end. But... my role here is finally over because there are brave heroes like you.";
next;
- switch(select("Let me leave the monastery.:Stop talking.")) {
+ switch(select("Let me leave the shrine.:Stop talking.")) {
case 1:
- mes "[Soul of Ancient Hero]";
- mes "Okay. I'll let you and your company leave here safely.";
+ mes "[Ancient Hero's Soul]";
+ mes "Okay. I'll let you and your group leave here safely.";
next;
- mes "[Soul of Ancient Hero]";
+ mes "[Ancient Hero's Soul]";
mes "If you leave, please say hello to Patrick for me.";
cutin "",255;
set 'ins_baphomet,0;
warp "monk_test",310,150;
close;
case 2:
- mes "[Soul of Ancient Hero]";
- mes "Do you still have something to do here? If you're done I'll let you leave here safely...";
+ mes "[Ancient Hero's Soul]";
+ mes "Do you still have something to do here? If you're done I'll let you leave safely...";
cutin "",255;
close;
}
@@ -2170,23 +2170,23 @@ OnDisable:
end;
OnTimer3000:
- instance_announce 0, "Soul of Ancient Hero : My God! The seal of the Main Altar is weakening.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : My God! The seal of the Main Altar is weakening!",bc_map,"0xFFFF00";
end;
OnTimer6000:
- instance_announce 0, "Soul of Ancient Hero : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : My descendants... Listen carefully to what I'm going to say.",bc_map,"0xFFFF00";
end;
OnTimer9000:
- instance_announce 0, "Soul of Ancient Hero : The altars, that control the Main Altar's power, are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The altars that control the Main Altar's power are located in the Northeast, Southeast, Southwest and Northwest corners of this room.",bc_map,"0xFFFF00";
end;
OnTimer12000:
- instance_announce 0, "Soul of Ancient Hero : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Find these altars and activate their seals before Baphomet revives.",bc_map,"0xFFFF00";
end;
OnTimer15000:
- instance_announce 0, "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death.",bc_map,"0xdb7093";
+ instance_announce 0, "Baphomet : It's too late, weaklings... Now, you'll feel the despair of death!",bc_map,"0xdb7093";
end;
OnTimer17000:
@@ -2214,8 +2214,8 @@ OnMyMobDead:
set 'ins_baphomet,7;
setquest 3046;
erasequest 3041;
- instance_announce 0, "Baphomet : No! Nonono! I get this insult again from these trivial bugs... No...",bc_map,"0xdb7093";
- enablenpc instance_npcname("Soul of Ancient Hero#2F", instance_id());
+ instance_announce 0, "Baphomet : No! Nonono! How dare these weaklings defeat me!... No!!...",bc_map,"0xdb7093";
+ enablenpc instance_npcname("Ancient Hero's Soul#2F", instance_id());
disablenpc instance_npcname("slave_down", instance_id());
disablenpc instance_npcname("slave_left", instance_id());
disablenpc instance_npcname("slave_right", instance_id());
@@ -2243,31 +2243,31 @@ OnDisable:
end;
OnTimer8000:
- instance_announce 0, "Soul of Ancient Hero : Don't be discouraged, Baphomet can still be defeated.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Don't be discouraged, Baphomet can still be defeated!",bc_map,"0xFFFF00";
end;
OnTimer11000:
- instance_announce 0, "Soul of Ancient Hero : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Go to the altars and activate their seals.",bc_map,"0xFFFF00";
end;
OnTimer13000:
- instance_announce 0, "Soul of Ancient Hero : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : Once the seals recover their power, Baphomet will be vulnerable.",bc_map,"0xFFFF00";
end;
OnTimer16000:
- instance_announce 0, "Soul of Ancient Hero : You should lure Baphomet to the unsealed Altars. Otherwise, your effort will be futile.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : You should lure Baphomet to the unsealed Altars. Otherwise, your efforts will be futile.",bc_map,"0xFFFF00";
end;
OnTimer19000:
- instance_announce 0, "Soul of Ancient Hero : We have only 1 hour to stop Baphomet. If the time passes, the power of the seals will be useless.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : We have only 1 hour to stop Baphomet. If time runs out, the power of the seals will be useless.",bc_map,"0xFFFF00";
end;
OnTimer22000:
- instance_announce 0, "Baphomet : It's useless. Make more seals. I'll crush them all. None of you'll survive.",bc_map,"0xdb7093";
+ instance_announce 0, "Baphomet : It's useless. Make more seals. I'll crush them all. None of you will survive!",bc_map,"0xdb7093";
end;
OnTimer26000:
- instance_announce 0, "Soul of Ancient Hero : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The magical power of the central seal is running out. Go to the central seal and put the magical power.",bc_map,"0xFFFF00";
enablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -2343,11 +2343,11 @@ OnDisable:
end;
OnTimer3600000:
- instance_announce 0, "Baphomet : krrrr... Now you can't stop me by such a seal. Just wait for your death.",bc_map,"0xdb7093";
+ instance_announce 0, "Baphomet : krrrr... Now you can't stop me with the seals. All you can do is wait for death!",bc_map,"0xdb7093";
end;
OnTimer3605000:
- instance_announce 0, "Soul of Ancient Hero : We can't stop Baphomet by the magical power of the seals anymore. Now everything is depend on God...",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : We can't stop Baphomet with the magical power of the seals anymore. Now everything depends on God...",bc_map,"0xFFFF00";
donpcevent instance_npcname("ins_2f_hero_pattern_c", instance_id())+"::OnDisable";
end;
}
@@ -2366,7 +2366,7 @@ OnDisable:
OnTimer70000:
switch(rand(1,5)) {
case 1:
- instance_announce 0, "Soul of Ancient Hero : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The seal of the Main Altar is running out. Strengthen the Main Altar's seal!",bc_map,"0xFFFF00";
enablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -2374,7 +2374,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 2:
- instance_announce 0, "Soul of Ancient Hero : The magical power of the seal in the direction of 2 o'clock is running out. Go to the direction of 2o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 2 o'clock is running out. Go to 2 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
enablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -2382,7 +2382,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 3:
- instance_announce 0, "Soul of Ancient Hero : The magical power of the seal in the direction of 4 o'clock is running out. Go to the direction of 4o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 4 o'clock is running out. Go to 4 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
enablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -2390,7 +2390,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 4:
- instance_announce 0, "Soul of Ancient Hero : The magical power of the seal in the direction of 8 o'clock is running out. Go to the direction of 8o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 8 o'clock is running out. Go to 8 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
@@ -2398,7 +2398,7 @@ OnTimer70000:
disablenpc instance_npcname("Magical Seal#10", instance_id());
break;
case 5:
- instance_announce 0, "Soul of Ancient Hero : The magical power of the seal in the direction of 10 o'clock is running out. Go to the direction of 10o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
+ instance_announce 0, "Ancient Hero's Soul : The magical power of the seal at 10 o'clock is running out. Go to 10 o'clock and put the magical power in the seal.",bc_map,"0xFFFF00";
disablenpc instance_npcname("Magical Seal#0", instance_id());
disablenpc instance_npcname("Magical Seal#2", instance_id());
disablenpc instance_npcname("Magical Seal#4", instance_id());
diff --git a/npc/kafras/functions_kafras.txt b/npc/kafras/functions_kafras.txt
index 268b54f64..96bf62130 100644
--- a/npc/kafras/functions_kafras.txt
+++ b/npc/kafras/functions_kafras.txt
@@ -260,7 +260,7 @@ function script F_Kafra {
function script F_KafStor {
// Unable to access Guild Storage (Busy)
if(getarg(0) == 1){
- if(guildopenstorage(0) == 1){
+ if(guildopenstorage() == 1){
mes "[Kafra Employee]";
mes "I'm sorry but another guild member is using the guild storage";
mes "right now. Please wait until that person is finished.";
diff --git a/npc/merchants/enchan_arm.txt b/npc/merchants/enchan_arm.txt
index 535ccc398..802bfc17d 100644
--- a/npc/merchants/enchan_arm.txt
+++ b/npc/merchants/enchan_arm.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
-//= 1.0
+//= 1.1
//===== Compatible With: =====================================
//= eAhena SVN
//===== Description: =========================================
@@ -11,6 +11,7 @@
//= Add a +1, 2, or 3, of a random stat to specified armor.
//===== Additional Comments: =================================
//= 1.0 First version.
+//= 1.1 Corrected typo (Sit -> Suit) (bugreport:4586)
//============================================================
prontera,165,60,2 script Apprentice Craftsman 73,{
@@ -120,7 +121,7 @@ prontera,165,60,2 script Apprentice Craftsman 73,{
callsub S_EnchantArmor,2351,55;
}
case 3:
- switch(select("Meteo Plate Armor:Orlean's Gown:Life Link:Diablos Robe:Diablos Armor:Assaulter Plate:Elite Engineer Armor:Assassin Robe:Warlock's Battle Robe:Medic's Robe:Elite Archer Suit:Elite Shooter Sit:Sprint Mail:Kandura:Armor of Naga:Improved Tights")) {
+ switch(select("Meteo Plate Armor:Orlean's Gown:Life Link:Diablos Robe:Diablos Armor:Assaulter Plate:Elite Engineer Armor:Assassin Robe:Warlock's Battle Robe:Medic's Robe:Elite Archer Suit:Elite Shooter Suit:Sprint Mail:Kandura:Armor of Naga:Improved Tights")) {
case 1:
callsub S_EnchantArmor,2364,60;
case 2:
diff --git a/sql-files/main.sql b/sql-files/main.sql
index f67bfd2d8..9e55daf33 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -574,8 +574,7 @@ CREATE TABLE IF NOT EXISTS `ragsrvinfo` (
`name` varchar(255) NOT NULL default '',
`exp` int(11) unsigned NOT NULL default '0',
`jexp` int(11) unsigned NOT NULL default '0',
- `drop` int(11) unsigned NOT NULL default '0',
- `motd` varchar(255) NOT NULL default ''
+ `drop` int(11) unsigned NOT NULL default '0'
) ENGINE=MyISAM;
--
diff --git a/sql-files/upgrade_svn14507.sql b/sql-files/upgrade_svn14507.sql
new file mode 100644
index 000000000..823dee9d8
--- /dev/null
+++ b/sql-files/upgrade_svn14507.sql
@@ -0,0 +1 @@
+DELETE FROM `global_reg_value` WHERE `str` = 'killedrid' OR `str` = 'killerrid';
diff --git a/sql-files/upgrade_svn14579.sql b/sql-files/upgrade_svn14579.sql
new file mode 100644
index 000000000..ad407aa90
--- /dev/null
+++ b/sql-files/upgrade_svn14579.sql
@@ -0,0 +1 @@
+ALTER TABLE `ragsrvinfo` DROP `motd`;
diff --git a/src/char/char.c b/src/char/char.c
index 91ad7d33d..6dd131976 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2,19 +2,16 @@
// For more information, see LICENCE in the main folder
#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
+#include "../common/core.h"
#include "../common/db.h"
#include "../common/lock.h"
#include "../common/malloc.h"
-#include "../common/core.h"
+#include "../common/mapindex.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
#include "../common/socket.h"
#include "../common/strlib.h"
-#include "../common/showmsg.h"
#include "../common/timer.h"
-#include "../common/lock.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/showmsg.h"
#include "../common/utils.h"
#include "../common/version.h"
#include "inter.h"
@@ -27,16 +24,8 @@
#include "char.h"
#include <sys/types.h>
-#ifdef WIN32
-#include <winsock2.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif
#include <time.h>
#include <signal.h>
-#include <fcntl.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
@@ -51,8 +40,13 @@ char friends_txt[1024] = "save/friends.txt";
char hotkeys_txt[1024] = "save/hotkeys.txt";
char char_log_filename[1024] = "log/char.log";
-int save_log = 1; // show loading/saving messages
+// show loading/saving messages
+#ifndef TXT_SQL_CONVERT
+int save_log = 1;
+#endif
+//If your code editor is having problems syntax highlighting this file, uncomment this and RECOMMENT IT BEFORE COMPILING
+//#undef TXT_SQL_CONVERT
#ifndef TXT_SQL_CONVERT
char db_path[1024] = "db";
@@ -85,9 +79,12 @@ int email_creation = 0; // disabled by default
bool name_ignoring_case = false; // Allow or not identical name for characters but with a different case by [Yor]
int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
-char unknown_char_name[1024] = "Unknown"; // Name to use when the requested name cannot be determined
+char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the requested name cannot be determined
#define TRIM_CHARS "\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
-char char_name_letters[1024] = ""; // list of letters/symbols authorised (or not) in a character name. by [Yor]
+char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor]
+
+int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius]
+int char_del_level = 0; //From which level u can delete character [Lupus]
int log_char = 1; // loggin char or not [devil]
int log_inter = 1; // loggin inter or not [devil]
@@ -118,7 +115,7 @@ int char_num, char_max;
int max_connect_user = 0;
int gm_allow_level = 99;
int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
-int start_zeny = 500;
+int start_zeny = 0;
int start_weapon = 1201;
int start_armor = 2301;
int guild_exp_rate = 100;
@@ -173,7 +170,7 @@ struct online_char_data {
int char_id;
int fd;
int waiting_disconnect;
- short server;
+ short server; // -2: unknown server, -1: not connected, 0+: id of server
};
static DBMap* online_char_db; // int account_id -> struct online_char_data*
@@ -223,6 +220,7 @@ void set_char_online(int map_id, int char_id, int account_id)
{
struct online_char_data* character;
+ //Check to see for online conflicts
character = (struct online_char_data*)idb_ensure(online_char_db, account_id, create_online_char_data);
if( character->char_id != -1 && character->server > -1 && character->server != map_id )
{
@@ -238,11 +236,13 @@ void set_char_online(int map_id, int char_id, int account_id)
if( character->server > -1 )
server[character->server].users++;
+ //Get rid of disconnect timer
if(character->waiting_disconnect != -1) {
delete_timer(character->waiting_disconnect, chardb_waiting_disconnect);
character->waiting_disconnect = -1;
}
+ //Notify login server
if (login_fd > 0 && !session[login_fd]->flag.eof)
{
WFIFOHEAD(login_fd,6);
@@ -261,7 +261,7 @@ void set_char_offline(int char_id, int account_id)
if( character->server > -1 )
if( server[character->server].users > 0 ) // Prevent this value from going negative.
server[character->server].users--;
-
+
if(character->waiting_disconnect != -1){
delete_timer(character->waiting_disconnect, chardb_waiting_disconnect);
character->waiting_disconnect = -1;
@@ -678,7 +678,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
tmp_int[46] = mapindex_name2id(tmp_str[2]);
} // Char structure of version 1500 (homun + mapindex maps)
- memcpy(p->name, tmp_str[0], NAME_LENGTH); //Overflow protection [Skotlex]
+ safestrncpy(p->name, tmp_str[0], NAME_LENGTH); //Overflow protection [Skotlex]
p->char_id = tmp_int[0];
p->account_id = tmp_int[1];
p->slot = tmp_int[2];
@@ -1150,16 +1150,9 @@ int mmo_char_sync_timer(int tid, unsigned int tick, int id, intptr data)
return 0;
}
-//-----------------------------------
-// Function to create a new character
-//-----------------------------------
-int make_new_char(struct char_session_data* sd, char* name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style)
+int check_char_name(char * name)
{
- char name[NAME_LENGTH];
int i;
-
- safestrncpy(name, name_, NAME_LENGTH);
- normalize_name(name,TRIM_CHARS);
// check length of character name
if( name[0] == '\0' )
@@ -1174,33 +1167,64 @@ int make_new_char(struct char_session_data* sd, char* name_, int str, int agi, i
return -1; // nick reserved for internal server messages
// Check Authorised letters/symbols in the name of the character
- if( char_name_option == 1 ) { // only letters/symbols in char_name_letters are authorised
+ if( char_name_option == 1 )
+ { // only letters/symbols in char_name_letters are authorised
for( i = 0; i < NAME_LENGTH && name[i]; i++ )
if( strchr(char_name_letters, name[i]) == NULL )
return -2;
- } else
- if( char_name_option == 2 ) { // letters/symbols in char_name_letters are forbidden
+ }
+ else if( char_name_option == 2 )
+ { // letters/symbols in char_name_letters are forbidden
for( i = 0; i < NAME_LENGTH && name[i]; i++ )
if( strchr(char_name_letters, name[i]) != NULL )
return -2;
- } // else, all letters/symbols are authorised (except control char removed before)
+ }
// check name (already in use?)
- ARR_FIND( 0, char_num, i,
- (name_ignoring_case && strncmp(char_dat[i].status.name, name, NAME_LENGTH) == 0) ||
- (!name_ignoring_case && strncmpi(char_dat[i].status.name, name, NAME_LENGTH) == 0) );
+ if( name_ignoring_case )
+ {
+ ARR_FIND( 0, char_num, i, strncmp(char_dat[i].status.name, name, NAME_LENGTH) == 0 );
+ }
+ else
+ {
+ ARR_FIND( 0, char_num, i, strncmpi(char_dat[i].status.name, name, NAME_LENGTH) == 0 );
+ }
if( i < char_num )
return -1; // name already exists
+ return 0;
+}
+
+//-----------------------------------
+// Function to create a new character
+//-----------------------------------
+int make_new_char(struct char_session_data* sd, char* name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style)
+{
+ char name[NAME_LENGTH];
+ int i, flag;
+
+ safestrncpy(name, name_, NAME_LENGTH);
+ normalize_name(name,TRIM_CHARS);
+
+ flag = check_char_name(name);
+ if( flag < 0 )
+ return flag;
+
//check other inputs
if((slot >= MAX_CHARS) // slots
- || (hair_style >= 24) // hair style
- || (hair_color >= 9) // hair color
|| (str + agi + vit + int_ + dex + luk != 6*5 ) // stats
|| (str < 1 || str > 9 || agi < 1 || agi > 9 || vit < 1 || vit > 9 || int_ < 1 || int_ > 9 || dex < 1 || dex > 9 || luk < 1 || luk > 9) // individual stat values
|| (str + int_ != 10 || agi + luk != 10 || vit + dex != 10) ) // pairs
return -2; // invalid input
+ // check the number of already existing chars in this account
+ if( char_per_account != 0 ) {
+ ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == -1 );
+
+ if( i >= char_per_account )
+ return -2; // character account limit exceeded
+ }
+
// check char slot
ARR_FIND( 0, char_num, i, char_dat[i].status.account_id == sd->account_id && char_dat[i].status.slot == slot );
if( i < char_num )
@@ -1563,7 +1587,7 @@ void create_online_files(void)
j = id[i];
// displaying the character name
if ((online_display_option & 1) || (online_display_option & 64)) { // without/with 'GM' display
- strcpy(temp, char_dat[j].status.name);
+ safestrncpy(temp, char_dat[j].status.name, sizeof(temp));
//l = isGM(char_dat[j].status.account_id);
l = 0; //FIXME: how to get the gm level?
if (online_display_option & 64) {
@@ -1611,7 +1635,7 @@ void create_online_files(void)
// displaying of the map
if (online_display_option & 24) { // 8 or 16
// prepare map name
- memcpy(temp, mapindex_id2name(char_dat[j].status.last_point.map), MAP_NAME_LENGTH);
+ safestrncpy(temp, mapindex_id2name(char_dat[j].status.last_point.map), sizeof(temp));
// write map name
if (online_display_option & 16) { // map-name AND coordinates
fprintf(fp2, " <td>%s (%d, %d)</td>\n", temp, char_dat[j].status.last_point.x, char_dat[j].status.last_point.y);
@@ -1670,10 +1694,11 @@ int count_users(void)
int i, users;
users = 0;
- for(i = 0; i < MAX_MAP_SERVERS; i++)
- if (server[i].fd >= 0)
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (server[i].fd > 0) {
users += server[i].users;
-
+ }
+ }
return users;
}
@@ -1738,7 +1763,7 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
#endif
#if (PACKETVER >= 20100720 && PACKETVER <= 20100727) || PACKETVER >= 20100803
mapindex_getmapname_ext(mapindex_id2name(p->last_point.map), (char*)WBUFP(buf,108));
- offset += 16;
+ offset += MAP_NAME_LENGTH_EXT;
#endif
return 106+offset;
}
@@ -1807,7 +1832,7 @@ int char_divorce(struct mmo_charstatus *cs)
return 0;
}
-int char_married(int pl1,int pl2)
+int char_married(int pl1, int pl2)
{
return (char_dat[pl1].status.char_id == char_dat[pl2].status.partner_id && char_dat[pl2].status.char_id == char_dat[pl1].status.partner_id);
}
@@ -1850,38 +1875,18 @@ int char_family(int cid1, int cid2, int cid3)
return 0;
}
-//Clears the given party id from all characters.
-//Since sometimes the party format changes and parties must be wiped, this
-//method is required to prevent stress during the "party not found!" stages.
-void char_clearparty(int party_id)
-{
- int i;
- for(i = 0; i < char_num; i++)
- {
- if (char_dat[i].status.party_id == party_id)
- char_dat[i].status.party_id = 0;
- }
-}
-
//----------------------------------------------------------------------
// Force disconnection of an online player (with account value) by [Yor]
//----------------------------------------------------------------------
-int disconnect_player(int account_id)
+void disconnect_player(int account_id)
{
int i;
- struct char_session_data *sd;
+ struct char_session_data* sd;
// disconnect player if online on char-server
- for(i = 0; i < fd_max; i++) {
- if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) {
- if (sd->account_id == account_id) {
- set_eof(i);
- return 1;
- }
- }
- }
-
- return 0;
+ ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == account_id );
+ if( i < fd_max )
+ set_eof(i);
}
// L폜ɔf[^폜
@@ -2005,8 +2010,8 @@ int parse_fromlogin(int fd)
//printf("connect login server error : %d\n", RFIFOB(fd,2));
ShowError("Can not connect to login-server.\n");
ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
- ShowInfo("Also, please make sure your accounts file (default: accounts.txt) has those values present.\n");
- ShowInfo("The communication passwords can be changed in map_athena.conf and char_athena.conf\n");
+ ShowError("Also, please make sure your accounts file (default: accounts.txt) has the correct communication username/passwords and the gender of the account is S.\n");
+ ShowError("The communication passwords are set in map_athena.conf and char_athena.conf\n");
} else {
ShowStatus("Connected to login-server (connection #%d).\n", fd);
@@ -2099,7 +2104,7 @@ int parse_fromlogin(int fd)
if (RFIFOREST(fd) < 7)
return 0;
{
- int i, j;
+ int j;
unsigned char buf[7];
int acc = RFIFOL(fd,2);
@@ -2107,7 +2112,7 @@ int parse_fromlogin(int fd)
RFIFOSKIP(fd,7);
if( acc > 0 )
- {
+ {// TODO: Is this even possible?
struct auth_node* node = (struct auth_node*)idb_get(auth_db, acc);
if( node != NULL )
node->sex = sex;
@@ -2162,6 +2167,8 @@ int parse_fromlogin(int fd)
// disconnect player if online on char-server
disconnect_player(acc);
}
+
+ // notify all mapservers about this change
WBUFW(buf,0) = 0x2b0d;
WBUFL(buf,2) = acc;
WBUFB(buf,6) = sex;
@@ -2235,14 +2242,14 @@ int parse_fromlogin(int fd)
RFIFOSKIP(fd,8 + RFIFOL(fd,4));
break;
- // account_reg2ύXʒm
+ // reply to an account_reg2 registry request
case 0x2729:
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
+
{ //Receive account_reg2 registry, forward to map servers.
unsigned char buf[13+ACCOUNT_REG2_NUM*sizeof(struct global_reg)];
memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
-// WBUFW(buf,0) = 0x2b11;
WBUFW(buf,0) = 0x3804; //Map server can now receive all kinds of reg values with the same packet. [Skotlex]
mapif_sendall(buf, WBUFW(buf,2));
RFIFOSKIP(fd, RFIFOW(fd,2));
@@ -2297,12 +2304,12 @@ int parse_fromlogin(int fd)
RFIFOSKIP(fd,6);
break;
- // State change of account/ban notification (from login-server) by [Yor]
+ // State change of account/ban notification (from login-server)
case 0x2731:
if (RFIFOREST(fd) < 11)
return 0;
- // send to all map-servers to disconnect the player
- {
+
+ { // send to all map-servers to disconnect the player
unsigned char buf[11];
WBUFW(buf,0) = 0x2b14;
WBUFL(buf,2) = RFIFOL(fd,2);
@@ -2312,6 +2319,7 @@ int parse_fromlogin(int fd)
}
// disconnect player if online on char-server
disconnect_player(RFIFOL(fd,2));
+
RFIFOSKIP(fd,11);
break;
@@ -2351,7 +2359,8 @@ int parse_fromlogin(int fd)
idb_remove(auth_db, aid);// reject auth attempts from map-server
}
break;
-
+
+ // ip address update signal from login server
case 0x2735:
{
unsigned char buf[2];
@@ -2362,13 +2371,14 @@ int parse_fromlogin(int fd)
new_ip = host2ip(login_ip_str);
if (new_ip && new_ip != login_ip)
- login_ip = new_ip; //Update login up.
+ login_ip = new_ip; //Update login ip, too.
new_ip = host2ip(char_ip_str);
if (new_ip && new_ip != char_ip)
{ //Update ip.
char_ip = new_ip;
ShowInfo("Updating IP for [%s].\n", char_ip_str);
+ // notify login server about the change
WFIFOHEAD(fd,6);
WFIFOW(fd,0) = 0x2736;
WFIFOL(fd,2) = htonl(char_ip);
@@ -2380,7 +2390,7 @@ int parse_fromlogin(int fd)
break;
default:
- ShowError("Unknown packet 0x%04x received from login-server, disconnecting.\n", RFIFOW(fd,0));
+ ShowError("Unknown packet 0x%04x received from login-server, disconnecting.\n", command);
set_eof(fd);
return 0;
}
@@ -2498,7 +2508,7 @@ void char_read_fame_list(void)
{
fame_item.id = char_dat[id[i]].status.char_id;
fame_item.fame = char_dat[id[i]].status.fame;
- strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+ safestrncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
memcpy(&smith_fame_list[j],&fame_item,sizeof(struct fame_list));
j++;
@@ -2513,7 +2523,7 @@ void char_read_fame_list(void)
{
fame_item.id = char_dat[id[i]].status.char_id;
fame_item.fame = char_dat[id[i]].status.fame;
- strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+ safestrncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
memcpy(&chemist_fame_list[j],&fame_item,sizeof(struct fame_list));
@@ -2527,7 +2537,7 @@ void char_read_fame_list(void)
{
fame_item.id = char_dat[id[i]].status.char_id;
fame_item.fame = char_dat[id[i]].status.fame;
- strncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
+ safestrncpy(fame_item.name, char_dat[id[i]].status.name, NAME_LENGTH);
memcpy(&taekwon_fame_list[j],&fame_item,sizeof(struct fame_list));
@@ -2536,6 +2546,7 @@ void char_read_fame_list(void)
}
DELETE_BUFFER(id);
}
+
// Send map-servers the fame ranking lists
int char_send_fame_list(int fd)
{
@@ -2565,7 +2576,7 @@ int char_send_fame_list(int fd)
// add total packet length
WBUFW(buf, 2) = len;
- if(fd!=-1)
+ if (fd != -1)
mapif_send(fd, buf, len);
else
mapif_sendall(buf, len);
@@ -2575,7 +2586,7 @@ int char_send_fame_list(int fd)
void char_update_fame_list(int type, int index, int fame)
{
- unsigned char buf[9];
+ unsigned char buf[8];
WBUFW(buf,0) = 0x2b22;
WBUFB(buf,2) = type;
WBUFB(buf,3) = index;
@@ -2588,14 +2599,18 @@ void char_update_fame_list(int type, int index, int fame)
int char_loadName(int char_id, char* name)
{
int j;
- for( j = 0; j < char_num && char_dat[j].status.char_id != char_id; ++j )
- ;// find char
+
+ ARR_FIND( 0, char_num, j, char_dat[j].status.char_id == char_id );
if( j < char_num )
- strncpy(name, char_dat[j].status.name, NAME_LENGTH);
+ {
+ safestrncpy(name, char_dat[j].status.name, NAME_LENGTH);
+ return 1;
+ }
else
- strncpy(name, unknown_char_name, NAME_LENGTH);
-
- return (j < char_num) ? 1 : 0;
+ {
+ safestrncpy(name, unknown_char_name, NAME_LENGTH);
+ }
+ return 0;
}
int search_mapserver(unsigned short map, uint32 ip, uint16 port);
@@ -2624,6 +2639,7 @@ int parse_frommap(int fd)
WBUFW(buf,2) = j * 4 + 10;
mapif_sendallwos(fd, buf, WBUFW(buf,2));
}
+ memset(&server[id], 0, sizeof(struct mmo_map_server));
server[id].fd = -1;
online_char_db->foreach(online_char_db,char_db_setoffline,id); //Tag relevant chars as 'in disconnected' server.
}
@@ -2634,8 +2650,6 @@ int parse_frommap(int fd)
while(RFIFOREST(fd) >= 2)
{
- //ShowDebug("Received packet 0x%4x (%d bytes) from map-server (connection %d)\n", RFIFOW(fd, 0), RFIFOREST(fd), fd);
-
switch(RFIFOW(fd,0))
{
@@ -2727,7 +2741,7 @@ int parse_frommap(int fd)
RFIFOSKIP(fd, 10);
}
break;
-
+
case 0x2afe: //set MAP user count
if (RFIFOREST(fd) < 4)
return 0;
@@ -2741,12 +2755,14 @@ int parse_frommap(int fd)
case 0x2aff: //set MAP users
if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
+ {
//TODO: When data mismatches memory, update guild/party online/offline states.
+ int aid, cid;
+ struct online_char_data* character;
+
server[id].users = RFIFOW(fd,4);
online_char_db->foreach(online_char_db,char_db_setoffline,id); //Set all chars from this server as 'unknown'
for(i = 0; i < server[id].users; i++) {
- int aid, cid;
- struct online_char_data* character;
aid = RFIFOL(fd,6+i*8);
cid = RFIFOL(fd,6+i*8+4);
character = (struct online_char_data*)idb_ensure(online_char_db, aid, create_online_char_data);
@@ -2756,33 +2772,44 @@ int parse_frommap(int fd)
character->account_id, character->char_id, character->server, id, aid, cid);
mapif_disconnectplayer(server[character->server].fd, character->account_id, character->char_id, 2);
}
- character->char_id = cid;
character->server = id;
+ character->char_id = cid;
}
//If any chars remain in -2, they will be cleaned in the cleanup timer.
- RFIFOSKIP(fd,6+i*8);
+ RFIFOSKIP(fd,RFIFOW(fd,2));
+ }
break;
case 0x2b01: // Receive character data from map-server for saving
if (RFIFOREST(fd) < 4 || RFIFOREST(fd) < RFIFOW(fd,2))
return 0;
+ {
+ int aid = RFIFOL(fd,4), cid = RFIFOL(fd,8), size = RFIFOW(fd,2);
+ struct mmo_charstatus* cs;
- ARR_FIND( 0, char_num, i, char_dat[i].status.account_id == RFIFOL(fd,4) && char_dat[i].status.char_id == RFIFOL(fd,8) );
- if( i < char_num )
+ if (size - 13 != sizeof(struct mmo_charstatus))
+ {
+ ShowError("parse_from_map (save-char): Size mismatch! %d != %d\n", size-13, sizeof(struct mmo_charstatus));
+ RFIFOSKIP(fd,size);
+ break;
+ }
+ if( ( cs = search_character(aid, cid) ) != NULL )
{
- memcpy(&char_dat[i].status, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
- storage_save(char_dat[i].status.account_id, &char_dat[i].status.storage);
+ memcpy(cs, RFIFOP(fd,13), sizeof(struct mmo_charstatus));
+ storage_save(cs->account_id, &cs->storage);
}
if (RFIFOB(fd,12))
- { //Flag, set character offline. [Skotlex]
- set_char_offline(RFIFOL(fd,8),RFIFOL(fd,4));
+ { //Flag, set character offline after saving. [Skotlex]
+ set_char_offline(cid, aid);
+ WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x2b21; //Save ack only needed on final save.
- WFIFOL(fd,2) = RFIFOL(fd,4);
- WFIFOL(fd,6) = RFIFOL(fd,8);
+ WFIFOL(fd,2) = aid;
+ WFIFOL(fd,6) = cid;
WFIFOSET(fd,10);
}
- RFIFOSKIP(fd,RFIFOW(fd,2));
+ RFIFOSKIP(fd,size);
+ }
break;
case 0x2b02: // req char selection
@@ -2805,7 +2832,8 @@ int parse_frommap(int fd)
node->login_id2 = login_id2;
//node->sex = 0;
node->ip = ntohl(ip);
- node->expiration_time = 0; // unlimited/unknown time by default (not display in map-server)
+ //node->expiration_time = 0; // unlimited/unknown time by default (not display in map-server)
+ //node->gmlevel = 0;
idb_put(auth_db, account_id, node);
//Set char to "@ char select" in online db [Kevin]
@@ -2823,22 +2851,15 @@ int parse_frommap(int fd)
if (RFIFOREST(fd) < 35)
return 0;
{
- unsigned short name;
int map_id, map_fd = -1;
struct online_char_data* data;
struct mmo_charstatus* char_data;
- name = RFIFOW(fd,18);
- map_id = search_mapserver(name, ntohl(RFIFOL(fd,24)), ntohs(RFIFOW(fd,28))); //Locate mapserver by ip and port.
+ map_id = search_mapserver(RFIFOW(fd,18), ntohl(RFIFOL(fd,24)), ntohs(RFIFOW(fd,28))); //Locate mapserver by ip and port.
if (map_id >= 0)
map_fd = server[map_id].fd;
- for(i = 0; i < char_num; i++) {
- if (char_dat[i].status.account_id == RFIFOL(fd,2) &&
- char_dat[i].status.char_id == RFIFOL(fd,14))
- break;
- }
- char_data = i < char_num ? &char_dat[i].status : NULL;
+ char_data = search_character(RFIFOL(fd,2), RFIFOL(fd,14));
if (map_fd >= 0 && session[map_fd] && char_data)
{ //Send the map server the auth of this player.
@@ -2940,6 +2961,7 @@ int parse_frommap(int fd)
if( login_fd <= 0 )
result = 3; // 3-login-server offline
+ //FIXME: need to move this check to login server [ultramage]
// else
// if( acc != -1 && isGM(acc) < isGM(account_id) )
// result = 2; // 2-gm level too low
@@ -3053,10 +3075,10 @@ int parse_frommap(int fd)
break;
case 0x2b16: // Receive rates [Wizputer]
- if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ if( RFIFOREST(fd) < 14 )
return 0;
// Txt doesn't need this packet, so just skip it
- RFIFOSKIP(fd,RFIFOW(fd,8));
+ RFIFOSKIP(fd,14);
break;
case 0x2b17: // Character disconnected set online 0 [Wizputer]
@@ -3238,7 +3260,7 @@ int lan_subnetcheck(uint32 ip)
{
int i;
ARR_FIND( 0, subnet_count, i, (subnet[i].char_ip & subnet[i].mask) == (ip & subnet[i].mask) );
- if ( i < subnet_count ) {
+ if( i < subnet_count ) {
ShowInfo("Subnet check [%u.%u.%u.%u]: Matches "CL_CYAN"%u.%u.%u.%u/%u.%u.%u.%u"CL_RESET"\n", CONVIP(ip), CONVIP(subnet[i].char_ip & subnet[i].mask), CONVIP(subnet[i].mask));
return subnet[i].char_ip;
} else {
@@ -3255,7 +3277,7 @@ int parse_char(int fd)
int map_fd;
struct char_session_data* sd;
uint32 ipl = session[fd]->client_addr;
-
+
sd = (struct char_session_data*)session[fd]->session_data;
// disconnect any player if no login-server.
@@ -3265,7 +3287,7 @@ int parse_char(int fd)
if(session[fd]->flag.eof)
{
if( sd != NULL && sd->auth )
- {
+ { // already authed client
struct online_char_data* data = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
if( data != NULL && data->fd == fd)
data->fd = -1;
@@ -3377,15 +3399,21 @@ int parse_char(int fd)
ARR_FIND( 0, MAX_CHARS, ch, sd->found_char[ch] >= 0 && char_dat[sd->found_char[ch]].status.slot == slot );
if (ch == MAX_CHARS)
{ //Not found?? May be forged packet.
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0; // rejected from server
+ WFIFOSET(fd,3);
break;
}
cd = &char_dat[sd->found_char[ch]].status;
char_log("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s.\n", sd->account_id, slot, cd->name);
cd->sex = sd->sex;
-
+
+ ShowInfo("Selected char: (Account %d: %d - %s)\n", sd->account_id, slot, cd->name);
+
// searching map server
- i = search_mapserver(cd->last_point.map,-1,-1);
+ i = search_mapserver(cd->last_point.map, -1, -1);
// if map is not found, we check major cities
if (i < 0) {
@@ -3430,6 +3458,7 @@ int parse_char(int fd)
cd->last_point.map = j;
}
+ //Send NEW auth packet [Kevin]
//FIXME: is this case even possible? [ultramage]
if ((map_fd = server[i].fd) < 1 || session[map_fd] == NULL)
{
@@ -3454,8 +3483,6 @@ int parse_char(int fd)
WFIFOW(fd,26) = ntows(htons(server[i].port)); // [!] LE byte order here [!]
WFIFOSET(fd,28);
- ShowInfo("Character selection '%s' (account: %d, slot: %d).\n", cd->name, sd->account_id, ch);
-
// create temporary auth entry
CREATE(node, struct auth_node, 1);
node->account_id = sd->account_id;
@@ -3495,8 +3522,9 @@ int parse_char(int fd)
else
{
int len;
+
// send to player
- WFIFOHEAD(fd,MAX_CHAR_BUF+2);
+ WFIFOHEAD(fd,2+MAX_CHAR_BUF);
WFIFOW(fd,0) = 0x6d;
len = 2 + mmo_char_tobuf(WFIFOP(fd,2), &char_dat[i].status);
WFIFOSET(fd,len);
@@ -3504,7 +3532,7 @@ int parse_char(int fd)
// add new entry to the chars list
ARR_FIND( 0, MAX_CHARS, ch, sd->found_char[ch] == -1 );
if( ch < MAX_CHARS )
- sd->found_char[ch] = i; // position of the new char in the char_dat[] array
+ sd->found_char[ch] = i; // position of the new char in the char_dat[] array
}
RFIFOSKIP(fd,37);
@@ -3519,12 +3547,13 @@ int parse_char(int fd)
{
int cid = RFIFOL(fd,2);
struct mmo_charstatus* cs = NULL;
+
ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
memcpy(email, RFIFOP(fd,6), 40);
RFIFOSKIP(fd,RFIFOREST(fd)); // hack to make the other deletion packet work
if (e_mail_check(email) == 0)
- strncpy(email, "a@a.com", 40); // default e-mail
+ safestrncpy(email, "a@a.com", sizeof(email)); // default e-mail
// BEGIN HACK: "change email using the char deletion 'confirm email' menu"
// if we activated email creation and email is default email
@@ -3587,6 +3616,17 @@ int parse_char(int fd)
// deletion process
cs = &char_dat[sd->found_char[i]].status;
+
+ //check for config char del condition [Lupus]
+ if( ( char_del_level > 0 && cs->base_level >= (unsigned int)char_del_level ) || ( char_del_level < 0 && cs->base_level <= (unsigned int)(-char_del_level) ) )
+ {
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x70;
+ WFIFOB(fd,2) = 1; // This character cannot be deleted.
+ WFIFOSET(fd,3);
+ break;
+ }
+
char_delete(cs);
if (sd->found_char[i] != char_num - 1) {
int j, k;
@@ -3632,9 +3672,25 @@ int parse_char(int fd)
// R 028d <account ID>.l <char ID>.l <new name>.24B
case 0x28d:
FIFOSD_CHECK(34);
- //not implemented
- RFIFOSKIP(fd,34);
- break;
+ {
+ //not implemented
+ RFIFOSKIP(fd,34);
+ }
+ break;
+ //Confirm change name.
+ // 0x28f <char_id>.L
+ case 0x28f:
+ // 0: Sucessfull
+ // 1: This character's name has already been changed. You cannot change a character's name more than once.
+ // 2: User information is not correct.
+ // 3: You have failed to change this character's name.
+ // 4: Another user is using this character name, so please select another one.
+ FIFOSD_CHECK(6);
+ {
+ //not implemented
+ RFIFOSKIP(fd,6);
+ }
+ break;
// captcha code request (not implemented)
// R 07e5 <?>.w <aid>.l
@@ -3752,7 +3808,6 @@ int parse_console(char* buf)
return 0;
}
-// SĂMAPT[o[Ƀf[^MiMmapI̐Ԃj
int mapif_sendall(unsigned char *buf, unsigned int len)
{
int i, c;
@@ -3771,7 +3826,6 @@ int mapif_sendall(unsigned char *buf, unsigned int len)
return c;
}
-// ȊȎSĂMAPT[o[Ƀf[^MiMmapI̐Ԃj
int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len)
{
int i, c;
@@ -3789,19 +3843,19 @@ int mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len)
return c;
}
-// MAPT[o[Ƀf[^MimapImFLj
+
int mapif_send(int fd, unsigned char *buf, unsigned int len)
{
int i;
if (fd >= 0) {
- for(i = 0; i < MAX_MAP_SERVERS; i++) {
- if (fd == server[i].fd) {
- WFIFOHEAD(fd,len);
- memcpy(WFIFOP(fd,0), buf, len);
- WFIFOSET(fd,len);
- return 1;
- }
+ ARR_FIND( 0, MAX_MAP_SERVERS, i, fd == server[i].fd );
+ if( i < MAX_MAP_SERVERS )
+ {
+ WFIFOHEAD(fd,len);
+ memcpy(WFIFOP(fd,0), buf, len);
+ WFIFOSET(fd,len);
+ return 1;
}
}
return 0;
@@ -4028,7 +4082,7 @@ int char_config_read(const char *cfgName)
remove_control_chars(w1);
remove_control_chars(w2);
if(strcmpi(w1,"timestamp_format") == 0) {
- strncpy(timestamp_format, w2, 20);
+ safestrncpy(timestamp_format, w2, sizeof(timestamp_format));
} else if(strcmpi(w1,"console_silent")==0){
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
msg_silent = atoi(w2);
@@ -4036,23 +4090,21 @@ int char_config_read(const char *cfgName)
} else if(strcmpi(w1,"stdout_with_ansisequence")==0){
stdout_with_ansisequence = config_switch(w2);
} else if (strcmpi(w1, "userid") == 0) {
- strncpy(userid, w2, 24);
+ safestrncpy(userid, w2, sizeof(userid));
} else if (strcmpi(w1, "passwd") == 0) {
- strncpy(passwd, w2, 24);
+ safestrncpy(passwd, w2, sizeof(passwd));
} else if (strcmpi(w1, "server_name") == 0) {
- strncpy(server_name, w2, 20);
- server_name[sizeof(server_name) - 1] = '\0';
+ safestrncpy(server_name, w2, sizeof(server_name));
ShowStatus("%s server has been initialized\n", w2);
} else if (strcmpi(w1, "wisp_server_name") == 0) {
if (strlen(w2) >= 4) {
- memcpy(wisp_server_name, w2, sizeof(wisp_server_name));
- wisp_server_name[sizeof(wisp_server_name) - 1] = '\0';
+ safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name));
}
} else if (strcmpi(w1, "login_ip") == 0) {
char ip_str[16];
login_ip = host2ip(w2);
if (login_ip) {
- strncpy(login_ip_str, w2, sizeof(login_ip_str));
+ safestrncpy(login_ip_str, w2, sizeof(login_ip_str));
ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str));
}
} else if (strcmpi(w1, "login_port") == 0) {
@@ -4061,14 +4113,14 @@ int char_config_read(const char *cfgName)
char ip_str[16];
char_ip = host2ip(w2);
if (char_ip){
- strncpy(char_ip_str, w2, sizeof(char_ip_str));
+ safestrncpy(char_ip_str, w2, sizeof(char_ip_str));
ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str));
}
} else if (strcmpi(w1, "bind_ip") == 0) {
char ip_str[16];
bind_ip = host2ip(w2);
if (bind_ip) {
- strncpy(bind_ip_str, w2, sizeof(bind_ip_str));
+ safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str));
ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str));
}
} else if (strcmpi(w1, "char_port") == 0) {
@@ -4082,14 +4134,14 @@ int char_config_read(const char *cfgName)
} else if (strcmpi(w1, "email_creation") == 0) {
email_creation = config_switch(w2);
} else if (strcmpi(w1, "scdata_txt") == 0) { //By Skotlex
- strcpy(scdata_txt, w2);
+ safestrncpy(scdata_txt, w2, sizeof(scdata_txt));
#endif
} else if (strcmpi(w1, "char_txt") == 0) {
- strcpy(char_txt, w2);
+ safestrncpy(char_txt, w2, sizeof(char_txt));
} else if (strcmpi(w1, "friends_txt") == 0) { //By davidsiaw
- strcpy(friends_txt, w2);
+ safestrncpy(friends_txt, w2, sizeof(friends_txt));
} else if (strcmpi(w1, "hotkeys_txt") == 0) { //By davidsiaw
- strcpy(hotkeys_txt, w2);
+ safestrncpy(hotkeys_txt, w2, sizeof(hotkeys_txt));
#ifndef TXT_SQL_CONVERT
} else if (strcmpi(w1, "max_connect_user") == 0) {
max_connect_user = atoi(w2);
@@ -4111,10 +4163,8 @@ int char_config_read(const char *cfgName)
if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3)
continue;
start_point.map = mapindex_name2id(map);
- if (!start_point.map) {
+ if (!start_point.map)
ShowError("Specified start_point %s not found in map-index cache.\n", map);
- start_point.map = 0;
- }
start_point.x = x;
start_point.y = y;
} else if (strcmpi(w1, "start_zeny") == 0) {
@@ -4132,21 +4182,25 @@ int char_config_read(const char *cfgName)
} else if(strcmpi(w1,"log_char")==0) { //log char or not [devil]
log_char = atoi(w2);
} else if (strcmpi(w1, "unknown_char_name") == 0) {
- strcpy(unknown_char_name, w2);
+ safestrncpy(unknown_char_name, w2, sizeof(unknown_char_name));
unknown_char_name[NAME_LENGTH-1] = '\0';
} else if (strcmpi(w1, "char_log_filename") == 0) {
- strcpy(char_log_filename, w2);
+ safestrncpy(char_log_filename, w2, sizeof(char_log_filename));
} else if (strcmpi(w1, "name_ignoring_case") == 0) {
name_ignoring_case = (bool)config_switch(w2);
} else if (strcmpi(w1, "char_name_option") == 0) {
char_name_option = atoi(w2);
} else if (strcmpi(w1, "char_name_letters") == 0) {
- strcpy(char_name_letters, w2);
+ safestrncpy(char_name_letters, w2, sizeof(char_name_letters));
+ } else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius]
+ char_per_account = atoi(w2);
+ } else if (strcmpi(w1, "char_del_level") == 0) { //disable/enable char deletion by its level condition [Lupus]
+ char_del_level = atoi(w2);
// online files options
} else if (strcmpi(w1, "online_txt_filename") == 0) {
- strcpy(online_txt_filename, w2);
+ safestrncpy(online_txt_filename, w2, sizeof(online_txt_filename));
} else if (strcmpi(w1, "online_html_filename") == 0) {
- strcpy(online_html_filename, w2);
+ safestrncpy(online_html_filename, w2, sizeof(online_html_filename));
} else if (strcmpi(w1, "online_sorting_option") == 0) {
online_sorting_option = atoi(w2);
} else if (strcmpi(w1, "online_display_option") == 0) {
@@ -4160,7 +4214,7 @@ int char_config_read(const char *cfgName)
if (online_refresh_html < 1)
online_refresh_html = 1;
} else if(strcmpi(w1,"db_path")==0) {
- strcpy(db_path,w2);
+ safestrncpy(db_path, w2, sizeof(db_path));
} else if (strcmpi(w1, "console") == 0) {
console = config_switch(w2);
} else if (strcmpi(w1, "fame_list_alchemist") == 0) {
@@ -4195,11 +4249,6 @@ int char_config_read(const char *cfgName)
}
#ifndef TXT_SQL_CONVERT
-int chardb_final(int key, void* data, va_list va)
-{
- aFree(data);
- return 0;
-}
void do_final(void)
{
ShowStatus("Terminating server.\n");
@@ -4209,9 +4258,10 @@ void do_final(void)
set_all_offline(-1);
flush_fifos();
// write online players files with no player
- online_char_db->clear(online_char_db, NULL); //clean the db...
+ online_char_db->clear(online_char_db, NULL);
create_online_files();
- online_char_db->destroy(online_char_db, NULL); //dispose the db...
+
+ online_char_db->destroy(online_char_db, NULL);
auth_db->destroy(auth_db, NULL);
if(char_dat) aFree(char_dat);
@@ -4294,11 +4344,11 @@ int do_init(int argc, char **argv)
else
ShowStatus("Defaulting to %s as our IP address\n", ip_str);
if (!login_ip) {
- strcpy(login_ip_str, ip_str);
+ safestrncpy(login_ip_str, ip_str, sizeof(login_ip_str));
login_ip = str2ip(login_ip_str);
}
if (!char_ip) {
- strcpy(char_ip_str, ip_str);
+ safestrncpy(char_ip_str, ip_str, sizeof(char_ip_str));
char_ip = str2ip(char_ip_str);
}
}
diff --git a/src/char/char.h b/src/char/char.h
index 8c8d7c554..18bb7b1b5 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -29,7 +29,6 @@ int mapif_send(int fd,unsigned char *buf, unsigned int len);
int char_married(int pl1,int pl2);
int char_child(int parent_id, int child_id);
int char_family(int cid1, int cid2, int cid3);
-void char_clearparty(int party_id);
int char_log(char *fmt, ...);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 9a815200f..31cceeff0 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -865,8 +865,8 @@ int mapif_guild_notice(struct guild *g)
WBUFW(buf,0) = 0x383e;
WBUFL(buf,2) = g->guild_id;
- memcpy(WBUFP(buf,6), g->mes1, 60);
- memcpy(WBUFP(buf,66), g->mes2, 120);
+ memcpy(WBUFP(buf,6), g->mes1, MAX_GUILDMES1);
+ memcpy(WBUFP(buf,66), g->mes2, MAX_GUILDMES2);
mapif_sendall(buf, 186);
return 0;
@@ -1404,8 +1404,8 @@ int mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *
g = (struct guild*)idb_get(guild_db, guild_id);
if (g == NULL)
return 0;
- memcpy(g->mes1, mes1, 60);
- memcpy(g->mes2, mes2, 120);
+ memcpy(g->mes1, mes1, MAX_GUILDMES1);
+ memcpy(g->mes2, mes2, MAX_GUILDMES2);
return mapif_guild_notice(g);
}
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 04d638049..b340aa9cf 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -488,7 +488,6 @@ int mapif_parse_PartyInfo(int fd, int party_id)
mapif_party_info(fd, &p->party);
else {
mapif_party_noinfo(fd, party_id);
- char_clearparty(party_id);
}
return 0;
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index bae72fcf4..2a041b286 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -101,12 +101,12 @@ int guild_storage_tostr(char *str,struct guild_storage *p)
str_p+=sprintf(str,"%d,%d\t",p->guild_id,p->storage_amount);
for(i=0;i<MAX_GUILD_STORAGE;i++)
- if( (p->storage_[i].nameid) && (p->storage_[i].amount) ){
+ if( (p->items[i].nameid) && (p->items[i].amount) ){
str_p += sprintf(str_p,"%d,%d,%d,%d,%d,%d,%d",
- p->storage_[i].id,p->storage_[i].nameid,p->storage_[i].amount,p->storage_[i].equip,
- p->storage_[i].identify,p->storage_[i].refine,p->storage_[i].attribute);
+ p->items[i].id,p->items[i].nameid,p->items[i].amount,p->items[i].equip,
+ p->items[i].identify,p->items[i].refine,p->items[i].attribute);
for(j=0; j<MAX_SLOTS; j++)
- str_p += sprintf(str_p,",%d",p->storage_[i].card[j]);
+ str_p += sprintf(str_p,",%d",p->items[i].card[j]);
str_p += sprintf(str_p," ");
f++;
}
@@ -138,15 +138,15 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
&tmp_int[4], &tmp_int[5], &tmp_int[6], tmp_str, &len) == 8)
{
- p->storage_[i].id = tmp_int[0];
- p->storage_[i].nameid = tmp_int[1];
- p->storage_[i].amount = tmp_int[2];
- p->storage_[i].equip = tmp_int[3];
- p->storage_[i].identify = tmp_int[4];
- p->storage_[i].refine = tmp_int[5];
- p->storage_[i].attribute = tmp_int[6];
+ p->items[i].id = tmp_int[0];
+ p->items[i].nameid = tmp_int[1];
+ p->items[i].amount = tmp_int[2];
+ p->items[i].equip = tmp_int[3];
+ p->items[i].identify = tmp_int[4];
+ p->items[i].refine = tmp_int[5];
+ p->items[i].attribute = tmp_int[6];
for(j = 0; j < MAX_SLOTS && tmp_str[0] && sscanf(tmp_str, ",%d%[0-9,-]",&tmp_int[0], tmp_str) > 0; j++)
- p->storage_[i].card[j] = tmp_int[0];
+ p->items[i].card[j] = tmp_int[0];
next += len;
if (str[next] == ' ')
next++;
@@ -371,8 +371,8 @@ int inter_guild_storage_delete(int guild_id)
if(gs) {
int i;
for(i=0;i<gs->storage_amount;i++){
- if(gs->storage_[i].card[0] == (short)0xff00)
- inter_pet_delete( MakeDWord(gs->storage_[i].card[1],gs->storage_[i].card[2]) );
+ if(gs->items[i].card[0] == (short)0xff00)
+ inter_pet_delete( MakeDWord(gs->items[i].card[1],gs->items[i].card[2]) );
}
idb_remove(guild_storage_db,guild_id);
}
diff --git a/src/char/inter.c b/src/char/inter.c
index 051d8117a..8d9cac99f 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -210,7 +210,7 @@ static int inter_config_read(const char *cfgName) {
} else if(strcmpi(w1,"log_inter")==0) {
log_inter = atoi(w2);
} else if(strcmpi(w1, "main_chat_nick")==0){ // Main chat nick [LuzZza]
- strcpy(main_chat_nick, w2);
+ safestrncpy(main_chat_nick, w2, sizeof(main_chat_nick));
#endif //TXT_SQL_CONVERT
} else if (strcmpi(w1, "import") == 0) {
inter_config_read(w2);
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 36944cd35..46b645ce6 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2,17 +2,17 @@
// For more information, see LICENCE in the main folder
#include "../common/cbasetypes.h"
-#include "../common/strlib.h"
#include "../common/core.h"
-#include "../common/timer.h"
-#include "../common/mmo.h"
#include "../common/db.h"
#include "../common/malloc.h"
#include "../common/mapindex.h"
+#include "../common/mmo.h"
#include "../common/showmsg.h"
#include "../common/socket.h"
-#include "../common/version.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
#include "../common/utils.h"
+#include "../common/version.h"
#include "inter.h"
#include "int_guild.h"
#include "int_homun.h"
@@ -60,6 +60,13 @@ char friend_db[256] = "friends";
char hotkey_db[256] = "hotkey";
char quest_db[256] = "quest";
+// show loading/saving messages
+#ifdef TXT_SQL_CONVERT
+int save_log = 0; //Have the logs be off by default when converting
+#else
+int save_log = 1;
+#endif
+
//If your code editor is having problems syntax highlighting this file, uncomment this and RECOMMENT IT BEFORE COMPILING
//#undef TXT_SQL_CONVERT
#ifndef TXT_SQL_CONVERT
@@ -94,11 +101,11 @@ int char_maintenance = 0;
bool char_new = true;
int char_new_display = 0;
-int name_ignoring_case = 0; // Allow or not identical name for characters but with a different case by [Yor]
+bool name_ignoring_case = false; // Allow or not identical name for characters but with a different case by [Yor]
int char_name_option = 0; // Option to know which letters/symbols are authorised in the name of a character (0: all, 1: only those in char_name_letters, 2: all EXCEPT those in char_name_letters) by [Yor]
char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the requested name cannot be determined
#define TRIM_CHARS "\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
-char char_name_letters[1024] = ""; // list of letters/symbols used to authorise or not a name of a character. by [Yor]
+char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor]
int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius]
int char_del_level = 0; //From which level u can delete character [Lupus]
@@ -106,12 +113,6 @@ int char_del_level = 0; //From which level u can delete character [Lupus]
int log_char = 1; // loggin char or not [devil]
int log_inter = 1; // loggin inter or not [devil]
-#ifdef TXT_SQL_CONVERT
-int save_log = 0; //Have the logs be off by default when converting
-#else
-int save_log = 1;
-#endif
-
// Advanced subnet check [LuzZza]
struct s_subnet {
uint32 mask;
@@ -813,7 +814,6 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
return 0;
}
-#define MAX_CHAR_BUF 110 //Max size (for WFIFOHEAD calls)
int mmo_char_tobuf(uint8* buf, struct mmo_charstatus* p);
#ifndef TXT_SQL_CONVERT
@@ -1249,7 +1249,7 @@ int check_char_name(char * name, char * esc_name)
// check for reserved names
if( strcmpi(name, main_chat_nick) == 0 || strcmpi(name, wisp_server_name) == 0 )
return -1; // nick reserved for internal server messages
-
+
// Check Authorised letters/symbols in the name of the character
if( char_name_option == 1 )
{ // only letters/symbols in char_name_letters are authorised
@@ -1264,13 +1264,14 @@ int check_char_name(char * name, char * esc_name)
return -2;
}
+ // check name (already in use?)
if( SQL_ERROR == Sql_Query(sql_handle, "SELECT 1 FROM `%s` WHERE `name` = '%s'", char_db, esc_name) )
- { // check name (already in use?)
+ {
Sql_ShowDebug(sql_handle);
return -2;
}
if( Sql_NumRows(sql_handle) > 0 )
- return -1; // name already exists
+ return -1; // name already exists
return 0;
}
@@ -1294,8 +1295,6 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
//check other inputs
if((slot >= MAX_CHARS) // slots
- || (hair_style >= 24) // hair style
- || (hair_color >= 9) // hair color
|| (str + agi + vit + int_ + dex + luk != 6*5 ) // stats
|| (str < 1 || str > 9 || agi < 1 || agi > 9 || vit < 1 || vit > 9 || int_ < 1 || int_ > 9 || dex < 1 || dex > 9 || luk < 1 || luk > 9) // individual stat values
|| (str + int_ != 10 || agi + luk != 10 || vit + dex != 10) ) // pairs
@@ -1524,27 +1523,26 @@ int delete_char_sql(int char_id)
return 0;
}
-//==========================================================================================================
-
+//---------------------------------------------------------------------
+// This function return the number of online players in all map-servers
+//---------------------------------------------------------------------
int count_users(void)
{
int i, users;
- if (login_fd > 0 && session[login_fd]){
- users = 0;
- for(i = 0; i < MAX_MAP_SERVERS; i++) {
- if (server[i].fd > 0) {
- users += server[i].users;
- }
+ users = 0;
+ for(i = 0; i < MAX_MAP_SERVERS; i++) {
+ if (server[i].fd > 0) {
+ users += server[i].users;
}
- return users;
}
- return 0;
+ return users;
}
-/// Writes char data to the buffer in the format used by the client.
-/// Used in packets 0x6b (chars info) and 0x6d (new char info)
+// Writes char data to the buffer in the format used by the client.
+// Used in packets 0x6b (chars info) and 0x6d (new char info)
// Returns the size
+#define MAX_CHAR_BUF 110 //Max size (for WFIFOHEAD calls)
int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
{
unsigned short offset = 0;
@@ -1598,15 +1596,18 @@ int mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p)
WBUFW(buf,104) = p->slot;
#if PACKETVER >= 20061023
WBUFW(buf,106) = ( p->rename > 0 ) ? 0 : 1;
- offset+=2;
+ offset += 2;
#endif
#if (PACKETVER >= 20100720 && PACKETVER <= 20100727) || PACKETVER >= 20100803
mapindex_getmapname_ext(mapindex_id2name(p->last_point.map), (char*)WBUFP(buf,108));
- offset += 16;
+ offset += MAP_NAME_LENGTH_EXT;
#endif
return 106+offset;
}
+//----------------------------------------
+// Function to send characters to a player
+//----------------------------------------
int mmo_char_send006b(int fd, struct char_session_data* sd)
{
int j, offset = 0;
@@ -1671,9 +1672,9 @@ int char_child(int parent_id, int child_id)
return 0;
}
-int char_family(int pl1, int pl2, int pl3)
+int char_family(int cid1, int cid2, int cid3)
{
- if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `char_id`,`partner_id`,`child` FROM `%s` WHERE `char_id` IN ('%d','%d','%d')", char_db, pl1, pl2, pl3) )
+ if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `char_id`,`partner_id`,`child` FROM `%s` WHERE `char_id` IN ('%d','%d','%d')", char_db, cid1, cid2, cid3) )
Sql_ShowDebug(sql_handle);
else while( SQL_SUCCESS == Sql_NextRow(sql_handle) )
{
@@ -1686,9 +1687,9 @@ int char_family(int pl1, int pl2, int pl3)
Sql_GetData(sql_handle, 1, &data, NULL); partnerid = atoi(data);
Sql_GetData(sql_handle, 2, &data, NULL); childid = atoi(data);
- if( (pl1 == charid && ((pl2 == partnerid && pl3 == childid ) || (pl2 == childid && pl3 == partnerid))) ||
- (pl1 == partnerid && ((pl2 == charid && pl3 == childid ) || (pl2 == childid && pl3 == charid ))) ||
- (pl1 == childid && ((pl2 == charid && pl3 == partnerid) || (pl2 == partnerid && pl3 == charid ))) )
+ if( (cid1 == charid && ((cid2 == partnerid && cid3 == childid ) || (cid2 == childid && cid3 == partnerid))) ||
+ (cid1 == partnerid && ((cid2 == charid && cid3 == childid ) || (cid2 == childid && cid3 == charid ))) ||
+ (cid1 == childid && ((cid2 == charid && cid3 == partnerid) || (cid2 == partnerid && cid3 == charid ))) )
{
Sql_FreeResult(sql_handle);
return childid;
@@ -1698,6 +1699,20 @@ int char_family(int pl1, int pl2, int pl3)
return 0;
}
+//----------------------------------------------------------------------
+// Force disconnection of an online player (with account value) by [Yor]
+//----------------------------------------------------------------------
+void disconnect_player(int account_id)
+{
+ int i;
+ struct char_session_data* sd;
+
+ // disconnect player if online on char-server
+ ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == account_id );
+ if( i < fd_max )
+ set_eof(i);
+}
+
static void char_auth_ok(int fd, struct char_session_data *sd)
{
struct online_char_data* character;
@@ -1777,17 +1792,17 @@ int parse_fromlogin(int fd)
return 0;
if (RFIFOB(fd,2)) {
- //printf("connect login server error : %d\n", RFIFOB(fd, 2));
+ //printf("connect login server error : %d\n", RFIFOB(fd,2));
ShowError("Can not connect to login-server.\n");
ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
ShowError("Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.\n");
ShowError("The communication passwords are set in map_athena.conf and char_athena.conf\n");
- }else {
+ } else {
ShowStatus("Connected to login-server (connection #%d).\n", fd);
//Send online accounts to login server.
send_accounts_tologin(-1, gettick(), 0, 0);
-
+
// if no map-server already connected, display a message...
ARR_FIND( 0, MAX_MAP_SERVERS, i, server[i].fd > 0 && server[i].map[0] );
if( i == MAX_MAP_SERVERS )
@@ -1874,19 +1889,18 @@ int parse_fromlogin(int fd)
if (RFIFOREST(fd) < 7)
return 0;
{
- unsigned char buf[16];
+ unsigned char buf[7];
int acc = RFIFOL(fd,2);
int sex = RFIFOB(fd,6);
RFIFOSKIP(fd,7);
if( acc > 0 )
- {
+ {// TODO: Is this even possible?
int char_id[MAX_CHARS];
int class_[MAX_CHARS];
int guild_id[MAX_CHARS];
int num;
- int i;
char* data;
struct auth_node* node = (struct auth_node*)idb_get(auth_db, acc);
@@ -1935,12 +1949,10 @@ int parse_fromlogin(int fd)
inter_guild_sex_changed(guild_id[i], acc, char_id[i], sex);
}
Sql_FreeResult(sql_handle);
- }
- // disconnect player if online on char-server
- ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == acc );
- if( i < fd_max )
- set_eof(i);
+ // disconnect player if online on char-server
+ disconnect_player(acc);
+ }
// notify all mapservers about this change
WBUFW(buf,0) = 0x2b0d;
@@ -1960,8 +1972,8 @@ int parse_fromlogin(int fd)
memcpy(buf,RFIFOP(fd,0), RFIFOW(fd,2));
WBUFW(buf,0) = 0x3804; //Map server can now receive all kinds of reg values with the same packet. [Skotlex]
mapif_sendall(buf, WBUFW(buf,2));
- }
RFIFOSKIP(fd, RFIFOW(fd,2));
+ }
break;
// State change of account/ban notification (from login-server)
@@ -1978,9 +1990,7 @@ int parse_fromlogin(int fd)
mapif_sendall(buf, 11);
}
// disconnect player if online on char-server
- ARR_FIND( 0, fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == RFIFOL(fd,2) );
- if( i < fd_max )
- set_eof(i);
+ disconnect_player(RFIFOL(fd,2));
RFIFOSKIP(fd,11);
break;
@@ -2032,8 +2042,8 @@ int parse_fromlogin(int fd)
mapif_sendall(buf, 2);
new_ip = host2ip(login_ip_str);
- if (new_ip && new_ip != login_ip) //Update login ip, too.
- login_ip = new_ip;
+ if (new_ip && new_ip != login_ip)
+ login_ip = new_ip; //Update login ip, too.
new_ip = host2ip(char_ip_str);
if (new_ip && new_ip != char_ip)
@@ -2046,13 +2056,13 @@ int parse_fromlogin(int fd)
WFIFOL(fd,2) = htonl(char_ip);
WFIFOSET(fd,6);
}
- }
RFIFOSKIP(fd,2);
+ }
break;
default:
- ShowError("Unknown packet 0x%04x received from login server, disconnecting.\n", command);
+ ShowError("Unknown packet 0x%04x received from login-server, disconnecting.\n", command);
set_eof(fd);
return 0;
}
@@ -2180,6 +2190,7 @@ int char_send_fame_list(int fd)
mapif_send(fd, buf, len);
else
mapif_sendall(buf, len);
+
return 0;
}
@@ -2205,13 +2216,12 @@ int char_loadName(int char_id, char* name)
else if( SQL_SUCCESS == Sql_NextRow(sql_handle) )
{
Sql_GetData(sql_handle, 0, &data, &len);
- memset(name, 0, NAME_LENGTH);
- memcpy(name, data, min(len, NAME_LENGTH));
+ safestrncpy(name, data, NAME_LENGTH);
return 1;
}
else
{
- memcpy(name, unknown_char_name, NAME_LENGTH);
+ safestrncpy(name, unknown_char_name, NAME_LENGTH);
}
return 0;
}
@@ -2220,15 +2230,9 @@ int search_mapserver(unsigned short map, uint32 ip, uint16 port);
int parse_frommap(int fd)
{
- int i = 0, j = 0;
+ int i, j;
int id;
- // Sometimes fd=0, and it will cause server crash. Don't know why. :(
- if (fd <= 0) {
- ShowError("parse_frommap error fd=%d\n", fd);
- return 0;
- }
-
ARR_FIND( 0, MAX_MAP_SERVERS, id, server[id].fd == fd );
if(id == MAX_MAP_SERVERS)
set_eof(fd);
@@ -2260,7 +2264,7 @@ int parse_frommap(int fd)
while(RFIFOREST(fd) >= 2)
{
- switch(RFIFOW(fd, 0))
+ switch(RFIFOW(fd,0))
{
case 0x2afa: // Receiving map names list from the map-server
@@ -2390,16 +2394,16 @@ int parse_frommap(int fd)
return 0;
{
//TODO: When data mismatches memory, update guild/party online/offline states.
- int i, aid, cid;
+ int aid, cid;
struct online_char_data* character;
- online_char_db->foreach(online_char_db,char_db_setoffline,id); //Set all chars from this server as 'unknown'
server[id].users = RFIFOW(fd,4);
+ online_char_db->foreach(online_char_db,char_db_setoffline,id); //Set all chars from this server as 'unknown'
for(i = 0; i < server[id].users; i++) {
aid = RFIFOL(fd,6+i*8);
cid = RFIFOL(fd,6+i*8+4);
character = (struct online_char_data*)idb_ensure(online_char_db, aid, create_online_char_data);
- if (character->server > -1 && character->server != id)
+ if( character->server > -1 && character->server != id )
{
ShowNotice("Set map user: Character (%d:%d) marked on map server %d, but map server %d claims to have (%d:%d) online!\n",
character->account_id, character->char_id, character->server, id, aid, cid);
@@ -2419,6 +2423,7 @@ int parse_frommap(int fd)
{
int aid = RFIFOL(fd,4), cid = RFIFOL(fd,8), size = RFIFOW(fd,2);
struct online_char_data* character;
+
if (size - 13 != sizeof(struct mmo_charstatus))
{
ShowError("parse_from_map (save-char): Size mismatch! %d != %d\n", size-13, sizeof(struct mmo_charstatus));
@@ -2439,7 +2444,7 @@ int parse_frommap(int fd)
}
if (RFIFOB(fd,12))
- { //Flag? Set character offline after saving [Skotlex]
+ { //Flag, set character offline after saving. [Skotlex]
set_char_offline(cid, aid);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x2b21; //Save ack only needed on final save.
@@ -2530,7 +2535,7 @@ int parse_frommap(int fd)
data = (struct online_char_data*)idb_ensure(online_char_db, RFIFOL(fd,2), create_online_char_data);
data->char_id = char_data->char_id;
data->server = map_id; //Update server where char is.
-
+
//Reply with an ack.
WFIFOHEAD(fd,30);
WFIFOW(fd,0) = 0x2b06;
@@ -2738,22 +2743,17 @@ int parse_frommap(int fd)
break;
case 0x2b16: // Receive rates [Wizputer]
- if (RFIFOREST(fd) < 6 || RFIFOREST(fd) < RFIFOW(fd,8))
+ if( RFIFOREST(fd) < 14 )
return 0;
{
- char motd[256];
- char esc_motd[sizeof(motd)*2+1];
char esc_server_name[sizeof(server_name)*2+1];
- strncpy(motd, (char*)RFIFOP(fd,10), 255); //First copy it to make sure the motd fits.
- motd[255] = '\0';
- Sql_EscapeString(sql_handle, esc_motd, motd);
Sql_EscapeString(sql_handle, esc_server_name, server_name);
- if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d',`motd`='%s'",
- fd, esc_server_name, RFIFOW(fd,2), RFIFOW(fd,4), RFIFOW(fd,6), esc_motd) )
+ if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `ragsrvinfo` SET `index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d'",
+ fd, esc_server_name, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)) )
Sql_ShowDebug(sql_handle);
- RFIFOSKIP(fd,RFIFOW(fd,8));
+ RFIFOSKIP(fd,14);
}
break;
@@ -2790,7 +2790,7 @@ int parse_frommap(int fd)
{
#ifdef ENABLE_SC_SAVING
int count, aid, cid;
-
+
aid = RFIFOL(fd, 4);
cid = RFIFOL(fd, 8);
count = RFIFOW(fd, 12);
@@ -2939,7 +2939,8 @@ int search_mapserver(unsigned short map, uint32 ip, uint16 port)
return -1;
}
-int char_mapif_init(int fd)
+// char_mapif̏i݂inter_mapif̂݁j
+static int char_mapif_init(int fd)
{
return inter_mapif_init(fd);
}
@@ -2962,8 +2963,8 @@ int lan_subnetcheck(uint32 ip)
int parse_char(int fd)
{
- int i, ch = 0;
- char email[40];
+ int i, ch;
+ char email[40];
unsigned short cmd;
int map_fd;
struct char_session_data* sd;
@@ -3072,7 +3073,7 @@ int parse_char(int fd)
FIFOSD_CHECK(3);
{
struct mmo_charstatus char_dat;
- struct mmo_charstatus * cp;
+ struct mmo_charstatus *cd;
char* data;
int char_id;
uint32 subnet_map_ip;
@@ -3084,11 +3085,13 @@ int parse_char(int fd)
if ( SQL_SUCCESS != Sql_Query(sql_handle, "SELECT `char_id` FROM `%s` WHERE `account_id`='%d' AND `char_num`='%d'", char_db, sd->account_id, slot)
|| SQL_SUCCESS != Sql_NextRow(sql_handle)
|| SQL_SUCCESS != Sql_GetData(sql_handle, 0, &data, NULL) )
- {
- //Not found?? May be forged packet.
+ { //Not found?? May be forged packet.
Sql_ShowDebug(sql_handle);
Sql_FreeResult(sql_handle);
- //TODO: perhaps add some reply? (otherwise it hangs the client)
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0; // rejected from server
+ WFIFOSET(fd,3);
break;
}
@@ -3097,8 +3100,8 @@ int parse_char(int fd)
mmo_char_fromsql(char_id, &char_dat, true);
//Have to switch over to the DB instance otherwise data won't propagate [Kevin]
- cp = (struct mmo_charstatus *)idb_get(char_db_, char_id);
- cp->sex = sd->sex;
+ cd = (struct mmo_charstatus *)idb_get(char_db_, char_id);
+ cd->sex = sd->sex;
if (log_char) {
char esc_name[NAME_LENGTH*2+1];
@@ -3111,7 +3114,7 @@ int parse_char(int fd)
ShowInfo("Selected char: (Account %d: %d - %s)\n", sd->account_id, slot, char_dat.name);
// searching map server
- i = search_mapserver(char_dat.last_point.map, -1, -1);
+ i = search_mapserver(cd->last_point.map, -1, -1);
// if map is not found, we check major cities
if (i < 0) {
@@ -3127,33 +3130,33 @@ int parse_char(int fd)
break;
}
if ((i = search_mapserver((j=mapindex_name2id(MAP_PRONTERA)),-1,-1)) >= 0) {
- cp->last_point.x = 273;
- cp->last_point.y = 354;
+ cd->last_point.x = 273;
+ cd->last_point.y = 354;
} else if ((i = search_mapserver((j=mapindex_name2id(MAP_GEFFEN)),-1,-1)) >= 0) {
- cp->last_point.x = 120;
- cp->last_point.y = 100;
+ cd->last_point.x = 120;
+ cd->last_point.y = 100;
} else if ((i = search_mapserver((j=mapindex_name2id(MAP_MORROC)),-1,-1)) >= 0) {
- cp->last_point.x = 160;
- cp->last_point.y = 94;
+ cd->last_point.x = 160;
+ cd->last_point.y = 94;
} else if ((i = search_mapserver((j=mapindex_name2id(MAP_ALBERTA)),-1,-1)) >= 0) {
- cp->last_point.x = 116;
- cp->last_point.y = 57;
+ cd->last_point.x = 116;
+ cd->last_point.y = 57;
} else if ((i = search_mapserver((j=mapindex_name2id(MAP_PAYON)),-1,-1)) >= 0) {
- cp->last_point.x = 87;
- cp->last_point.y = 117;
+ cd->last_point.x = 87;
+ cd->last_point.y = 117;
} else if ((i = search_mapserver((j=mapindex_name2id(MAP_IZLUDE)),-1,-1)) >= 0) {
- cp->last_point.x = 94;
- cp->last_point.y = 103;
+ cd->last_point.x = 94;
+ cd->last_point.y = 103;
} else {
- ShowInfo("Connection Closed. No map server available that has a major city, and unable to find map-server for '%s'.\n", mapindex_id2name(char_dat.last_point.map));
+ ShowInfo("Connection Closed. No map server available that has a major city, and unable to find map-server for '%s'.\n", mapindex_id2name(cd->last_point.map));
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = 1; // 01 = Server closed
WFIFOSET(fd,3);
break;
}
- ShowWarning("Unable to find map-server for '%s', sending to major city '%s'.\n", mapindex_id2name(char_dat.last_point.map), mapindex_id2name(j));
- cp->last_point.map = j;
+ ShowWarning("Unable to find map-server for '%s', sending to major city '%s'.\n", mapindex_id2name(cd->last_point.map), mapindex_id2name(j));
+ cd->last_point.map = j;
}
//Send NEW auth packet [Kevin]
@@ -3174,9 +3177,9 @@ int parse_char(int fd)
//Send player to map
WFIFOHEAD(fd,28);
WFIFOW(fd,0) = 0x71;
- WFIFOL(fd,2) = cp->char_id;
- mapindex_getmapname_ext(mapindex_id2name(cp->last_point.map), (char*)WFIFOP(fd,6));
- subnet_map_ip = lan_subnetcheck(ipl);
+ WFIFOL(fd,2) = cd->char_id;
+ mapindex_getmapname_ext(mapindex_id2name(cd->last_point.map), (char*)WFIFOP(fd,6));
+ subnet_map_ip = lan_subnetcheck(ipl); // Advanced subnet check [LuzZza]
WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : server[i].ip);
WFIFOW(fd,26) = ntows(htons(server[i].port)); // [!] LE byte order here [!]
WFIFOSET(fd,28);
@@ -3184,7 +3187,7 @@ int parse_char(int fd)
// create temporary auth entry
CREATE(node, struct auth_node, 1);
node->account_id = sd->account_id;
- node->char_id = cp->char_id;
+ node->char_id = cd->char_id;
node->login_id1 = sd->login_id1;
node->login_id2 = sd->login_id2;
node->sex = sd->sex;
@@ -3219,8 +3222,6 @@ int parse_char(int fd)
case -3: WFIFOB(fd,2) = 0x01; break;
}
WFIFOSET(fd,3);
- RFIFOSKIP(fd,37);
- break;
}
else
{
@@ -3253,7 +3254,6 @@ int parse_char(int fd)
{
int cid = RFIFOL(fd,2);
- WFIFOHEAD(fd,46);
ShowInfo(CL_RED"Request Char Deletion: "CL_GREEN"%d (%d)"CL_RESET"\n", sd->account_id, cid);
memcpy(email, RFIFOP(fd,6), 40);
RFIFOSKIP(fd,RFIFOREST(fd)); // hack to make the other deletion packet work
@@ -3270,7 +3270,7 @@ int parse_char(int fd)
WFIFOSET(fd,3);
break;
}
-
+
// check if this char exists
ARR_FIND( 0, MAX_CHARS, i, sd->found_char[i] == cid );
if( i == MAX_CHARS )
@@ -3313,7 +3313,7 @@ int parse_char(int fd)
break;
// char rename request
- // R 028d <account ID>.l <char ID>.l <new name>.24B
+ // R 028d <account ID>.l <char ID>.l <new name>.24B
case 0x28d:
FIFOSD_CHECK(34);
{
@@ -3393,7 +3393,7 @@ int parse_char(int fd)
RFIFOSKIP(fd,32);
break;
- // log in as map-server
+ // login as map-server
case 0x2af8:
if (RFIFOREST(fd) < 60)
return 0;
@@ -3424,7 +3424,7 @@ int parse_char(int fd)
realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
char_mapif_init(fd);
}
-
+
RFIFOSKIP(fd,60);
}
return 0; // avoid processing of followup packets here
@@ -3487,7 +3487,6 @@ int parse_console(char* buf)
return 0;
}
-// MAP send all
int mapif_sendall(unsigned char *buf, unsigned int len)
{
int i, c;
@@ -3665,7 +3664,7 @@ static int online_data_cleanup_sub(DBKey key, void *data, va_list ap)
{
struct online_char_data *character= (struct online_char_data*)data;
if (character->fd != -1)
- return 0; //Still connected
+ return 0; //Character still connected
if (character->server == -2) //Unknown server.. set them offline
set_char_offline(character->char_id, character->account_id);
if (character->server < 0)
@@ -3758,59 +3757,55 @@ void sql_config_read(const char* cfgName)
continue;
if(!strcmpi(w1,"char_db"))
- strcpy(char_db,w2);
+ safestrncpy(char_db, w2, sizeof(char_db));
else if(!strcmpi(w1,"scdata_db"))
- strcpy(scdata_db,w2);
+ safestrncpy(scdata_db, w2, sizeof(scdata_db));
else if(!strcmpi(w1,"cart_db"))
- strcpy(cart_db,w2);
+ safestrncpy(cart_db, w2, sizeof(cart_db));
else if(!strcmpi(w1,"inventory_db"))
- strcpy(inventory_db, w2);
+ safestrncpy(inventory_db, w2, sizeof(inventory_db));
else if(!strcmpi(w1,"charlog_db"))
- strcpy(charlog_db,w2);
+ safestrncpy(charlog_db, w2, sizeof(charlog_db));
else if(!strcmpi(w1,"storage_db"))
- strcpy(storage_db,w2);
+ safestrncpy(storage_db, w2, sizeof(storage_db));
else if(!strcmpi(w1,"reg_db"))
- strcpy(reg_db,w2);
+ safestrncpy(reg_db, w2, sizeof(reg_db));
else if(!strcmpi(w1,"skill_db"))
- strcpy(skill_db,w2);
+ safestrncpy(skill_db, w2, sizeof(skill_db));
else if(!strcmpi(w1,"interlog_db"))
- strcpy(interlog_db,w2);
+ safestrncpy(interlog_db, w2, sizeof(interlog_db));
else if(!strcmpi(w1,"memo_db"))
- strcpy(memo_db,w2);
+ safestrncpy(memo_db, w2, sizeof(memo_db));
else if(!strcmpi(w1,"guild_db"))
- strcpy(guild_db,w2);
+ safestrncpy(guild_db, w2, sizeof(guild_db));
else if(!strcmpi(w1,"guild_alliance_db"))
- strcpy(guild_alliance_db,w2);
+ safestrncpy(guild_alliance_db, w2, sizeof(guild_alliance_db));
else if(!strcmpi(w1,"guild_castle_db"))
- strcpy(guild_castle_db,w2);
+ safestrncpy(guild_castle_db, w2, sizeof(guild_castle_db));
else if(!strcmpi(w1,"guild_expulsion_db"))
- strcpy(guild_expulsion_db,w2);
+ safestrncpy(guild_expulsion_db, w2, sizeof(guild_expulsion_db));
else if(!strcmpi(w1,"guild_member_db"))
- strcpy(guild_member_db,w2);
+ safestrncpy(guild_member_db, w2, sizeof(guild_member_db));
else if(!strcmpi(w1,"guild_skill_db"))
- strcpy(guild_skill_db,w2);
+ safestrncpy(guild_skill_db, w2, sizeof(guild_skill_db));
else if(!strcmpi(w1,"guild_position_db"))
- strcpy(guild_position_db,w2);
+ safestrncpy(guild_position_db, w2, sizeof(guild_position_db));
else if(!strcmpi(w1,"guild_storage_db"))
- strcpy(guild_storage_db,w2);
+ safestrncpy(guild_storage_db, w2, sizeof(guild_storage_db));
else if(!strcmpi(w1,"party_db"))
- strcpy(party_db,w2);
+ safestrncpy(party_db, w2, sizeof(party_db));
else if(!strcmpi(w1,"pet_db"))
- strcpy(pet_db,w2);
+ safestrncpy(pet_db, w2, sizeof(pet_db));
else if(!strcmpi(w1,"mail_db"))
- strcpy(mail_db,w2);
+ safestrncpy(mail_db, w2, sizeof(mail_db));
else if(!strcmpi(w1,"auction_db"))
- strcpy(auction_db,w2);
+ safestrncpy(auction_db, w2, sizeof(auction_db));
else if(!strcmpi(w1,"friend_db"))
- strcpy(friend_db,w2);
+ safestrncpy(friend_db, w2, sizeof(friend_db));
else if(!strcmpi(w1,"hotkey_db"))
- strcpy(hotkey_db,w2);
+ safestrncpy(hotkey_db, w2, sizeof(hotkey_db));
else if(!strcmpi(w1,"quest_db"))
- strcpy(quest_db,w2);
-#ifndef TXT_SQL_CONVERT
- else if(!strcmpi(w1,"db_path"))
- strcpy(db_path,w2);
-#endif
+ safestrncpy(quest_db,w2,sizeof(quest_db));
//support the import command, just like any other config
else if(!strcmpi(w1,"import"))
sql_config_read(w2);
@@ -3842,30 +3837,28 @@ int char_config_read(const char* cfgName)
remove_control_chars(w1);
remove_control_chars(w2);
if(strcmpi(w1,"timestamp_format") == 0) {
- strncpy(timestamp_format, w2, 20);
+ safestrncpy(timestamp_format, w2, sizeof(timestamp_format));
} else if(strcmpi(w1,"console_silent")==0){
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
msg_silent = atoi(w2);
} else if(strcmpi(w1,"stdout_with_ansisequence")==0){
stdout_with_ansisequence = config_switch(w2);
} else if (strcmpi(w1, "userid") == 0) {
- strncpy(userid, w2, 24);
+ safestrncpy(userid, w2, sizeof(userid));
} else if (strcmpi(w1, "passwd") == 0) {
- strncpy(passwd, w2, 24);
+ safestrncpy(passwd, w2, sizeof(passwd));
} else if (strcmpi(w1, "server_name") == 0) {
- strncpy(server_name, w2, 20);
- server_name[sizeof(server_name) - 1] = '\0';
+ safestrncpy(server_name, w2, sizeof(server_name));
ShowStatus("%s server has been initialized\n", w2);
} else if (strcmpi(w1, "wisp_server_name") == 0) {
if (strlen(w2) >= 4) {
- memcpy(wisp_server_name, w2, sizeof(wisp_server_name));
- wisp_server_name[sizeof(wisp_server_name) - 1] = '\0';
+ safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name));
}
} else if (strcmpi(w1, "login_ip") == 0) {
char ip_str[16];
login_ip = host2ip(w2);
if (login_ip) {
- strncpy(login_ip_str, w2, sizeof(login_ip_str));
+ safestrncpy(login_ip_str, w2, sizeof(login_ip_str));
ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str));
}
} else if (strcmpi(w1, "login_port") == 0) {
@@ -3874,14 +3867,14 @@ int char_config_read(const char* cfgName)
char ip_str[16];
char_ip = host2ip(w2);
if (char_ip){
- strncpy(char_ip_str, w2, sizeof(char_ip_str));
+ safestrncpy(char_ip_str, w2, sizeof(char_ip_str));
ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str));
}
} else if (strcmpi(w1, "bind_ip") == 0) {
char ip_str[16];
bind_ip = host2ip(w2);
if (bind_ip) {
- strncpy(bind_ip_str, w2, sizeof(bind_ip_str));
+ safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str));
ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str));
}
} else if (strcmpi(w1, "char_port") == 0) {
@@ -3931,18 +3924,20 @@ int char_config_read(const char* cfgName)
} else if(strcmpi(w1,"log_char")==0) { //log char or not [devil]
log_char = atoi(w2);
} else if (strcmpi(w1, "unknown_char_name") == 0) {
- strcpy(unknown_char_name, w2);
+ safestrncpy(unknown_char_name, w2, sizeof(unknown_char_name));
unknown_char_name[NAME_LENGTH-1] = '\0';
} else if (strcmpi(w1, "name_ignoring_case") == 0) {
- name_ignoring_case = config_switch(w2);
+ name_ignoring_case = (bool)config_switch(w2);
} else if (strcmpi(w1, "char_name_option") == 0) {
char_name_option = atoi(w2);
} else if (strcmpi(w1, "char_name_letters") == 0) {
- strcpy(char_name_letters, w2);
+ safestrncpy(char_name_letters, w2, sizeof(char_name_letters));
} else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius]
char_per_account = atoi(w2);
} else if (strcmpi(w1, "char_del_level") == 0) { //disable/enable char deletion by its level condition [Lupus]
char_del_level = atoi(w2);
+ } else if(strcmpi(w1,"db_path")==0) {
+ safestrncpy(db_path, w2, sizeof(db_path));
} else if (strcmpi(w1, "console") == 0) {
console = config_switch(w2);
} else if (strcmpi(w1, "fame_list_alchemist") == 0) {
@@ -3970,16 +3965,14 @@ int char_config_read(const char* cfgName)
}
}
fclose(fp);
-
+
ShowInfo("Done reading %s.\n", cfgName);
return 0;
}
void do_final(void)
{
- ShowInfo("Doing final stage...\n");
- //check SQL save progress.
- //wait until save char complete
+ ShowStatus("Terminating server.\n");
set_all_offline(-1);
set_all_offline_sql();
@@ -3988,22 +3981,20 @@ void do_final(void)
flush_fifos();
- mapindex_final();
-
if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `ragsrvinfo`") )
Sql_ShowDebug(sql_handle);
+ char_db_->destroy(char_db_, NULL);
+ online_char_db->destroy(online_char_db, NULL);
+ auth_db->destroy(auth_db, NULL);
+
if (login_fd > 0)
do_close(login_fd);
if (char_fd > 0)
do_close(char_fd);
- char_db_->destroy(char_db_, NULL);
- online_char_db->destroy(online_char_db, NULL);
- auth_db->destroy(auth_db, NULL);
Sql_Free(sql_handle);
-
- ShowInfo("ok! all done...\n");
+ mapindex_final();
}
//------------------------------
@@ -4031,7 +4022,7 @@ int do_init(int argc, char **argv)
//Read map indexes
mapindex_init();
start_point.map = mapindex_name2id("new_zone01");
-
+
char_config_read((argc < 2) ? CHAR_CONF_NAME : argv[1]);
char_lan_config_read((argc > 3) ? argv[3] : LAN_CONF_NAME);
sql_config_read(SQL_CONF_NAME);
@@ -4041,7 +4032,7 @@ int do_init(int argc, char **argv)
ShowNotice("Please edit your 'login' table to create a proper inter-server user/password (gender 'S')\n");
ShowNotice("And then change the user/password to use in conf/char_athena.conf (or conf/import/char_conf.txt)\n");
}
-
+
ShowInfo("Finished reading the char-server configuration.\n");
inter_init_sql((argc > 2) ? argv[2] : inter_cfgName); // inter server ʱȭ
@@ -4066,11 +4057,11 @@ int do_init(int argc, char **argv)
else
ShowStatus("Defaulting to %s as our IP address\n", ip_str);
if (!login_ip) {
- strcpy(login_ip_str, ip_str);
+ safestrncpy(login_ip_str, ip_str, sizeof(login_ip_str));
login_ip = str2ip(login_ip_str);
}
if (!char_ip) {
- strcpy(char_ip_str, ip_str);
+ safestrncpy(char_ip_str, ip_str, sizeof(char_ip_str));
char_ip = str2ip(char_ip_str);
}
}
@@ -4089,7 +4080,7 @@ int do_init(int argc, char **argv)
// send a list of all online account IDs to login server
add_timer_func_list(send_accounts_tologin, "send_accounts_tologin");
- add_timer_interval(gettick() + 1000, send_accounts_tologin, 0, 0, 3600 * 1000); //Sync online accounts every hour.
+ add_timer_interval(gettick() + 1000, send_accounts_tologin, 0, 0, 3600 * 1000); //Sync online accounts every hour
// ???
add_timer_func_list(chardb_waiting_disconnect, "chardb_waiting_disconnect");
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 00331e8e6..0b3d77f07 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -1131,8 +1131,8 @@ int mapif_guild_notice(struct guild *g)
unsigned char buf[256];
WBUFW(buf,0)=0x383e;
WBUFL(buf,2)=g->guild_id;
- memcpy(WBUFP(buf,6),g->mes1,60);
- memcpy(WBUFP(buf,66),g->mes2,120);
+ memcpy(WBUFP(buf,6),g->mes1,MAX_GUILDMES1);
+ memcpy(WBUFP(buf,66),g->mes2,MAX_GUILDMES2);
mapif_sendall(buf,186);
return 0;
}
@@ -1826,8 +1826,8 @@ int mapif_parse_GuildNotice(int fd,int guild_id,const char *mes1,const char *mes
if(g==NULL)
return 0;
- memcpy(g->mes1,mes1,60);
- memcpy(g->mes2,mes2,120);
+ memcpy(g->mes1,mes1,MAX_GUILDMES1);
+ memcpy(g->mes2,mes2,MAX_GUILDMES2);
g->save_flag |= GS_MES; //Change mes of guild
return mapif_guild_notice(g);
}
diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c
index 7cab6d5d9..0719685ae 100644
--- a/src/char_sql/int_storage.c
+++ b/src/char_sql/int_storage.c
@@ -76,7 +76,7 @@ int storage_fromsql(int account_id, struct storage_data* p)
/// Save guild_storage data to sql
int guild_storage_tosql(int guild_id, struct guild_storage* p)
{
- memitemdata_to_sql(p->storage_, MAX_GUILD_STORAGE, guild_id, TABLE_GUILD_STORAGE);
+ memitemdata_to_sql(p->items, MAX_GUILD_STORAGE, guild_id, TABLE_GUILD_STORAGE);
ShowInfo ("guild storage save to DB - guild: %d\n", guild_id);
return 0;
}
@@ -109,7 +109,7 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p)
for( i = 0; i < MAX_GUILD_STORAGE && SQL_SUCCESS == Sql_NextRow(sql_handle); ++i )
{
- item = &p->storage_[i];
+ item = &p->items[i];
Sql_GetData(sql_handle, 0, &data, NULL); item->id = atoi(data);
Sql_GetData(sql_handle, 1, &data, NULL); item->nameid = atoi(data);
Sql_GetData(sql_handle, 2, &data, NULL); item->amount = atoi(data);
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c
index 2f5c2daff..97c48bdf1 100644
--- a/src/char_sql/inter.c
+++ b/src/char_sql/inter.c
@@ -235,7 +235,7 @@ static int inter_config_read(const char* cfgName)
else if(!strcmpi(w1,"log_inter"))
log_inter = atoi(w2);
else if(!strcmpi(w1,"main_chat_nick"))
- strcpy(main_chat_nick, w2);
+ safestrncpy(main_chat_nick, w2, sizeof(main_chat_nick));
#endif //TXT_SQL_CONVERT
else if(!strcmpi(w1,"import"))
inter_config_read(w2);
diff --git a/src/common/lock.c b/src/common/lock.c
index 5cb4c3a67..643b86e5c 100644
--- a/src/common/lock.c
+++ b/src/common/lock.c
@@ -1,8 +1,9 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#include "../common/cbasetypes.h"
-#include "../common/showmsg.h"
+#include "cbasetypes.h"
+#include "showmsg.h"
+#include "utils.h"
#include "lock.h"
#include <stdio.h>
@@ -12,12 +13,8 @@
#include <unistd.h>
#else
#include <io.h>
-#define F_OK 0x0
-#define R_OK 0x4
#endif
-#define exists(filename) (!access(filename, F_OK))
-
// ݃t@C̕ی쏈
// i݂I܂ŁAt@CۊǂĂj
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 6a78d840c..92adf8af0 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -108,13 +108,6 @@
#define MAX_QUEST_DB 2000 //Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3 //Max quest objectives for a quest
-#define MIN_HAIR_STYLE battle_config.min_hair_style
-#define MAX_HAIR_STYLE battle_config.max_hair_style
-#define MIN_HAIR_COLOR battle_config.min_hair_color
-#define MAX_HAIR_COLOR battle_config.max_hair_color
-#define MIN_CLOTH_COLOR battle_config.min_cloth_color
-#define MAX_CLOTH_COLOR battle_config.max_cloth_color
-
// for produce
#define MIN_ATTRIBUTE 0
#define MAX_ATTRIBUTE 4
@@ -147,6 +140,10 @@
#define END_ACCOUNT_NUM 100000000
#define START_CHAR_NUM 150000
+//Guilds
+#define MAX_GUILDMES1 60
+#define MAX_GUILDMES2 120
+
//Base Homun skill.
#define HM_SKILLBASE 8001
#define MAX_HOMUNSKILL 16
@@ -177,6 +174,7 @@ enum item_types {
IT_UNKNOWN2,//9
IT_AMMO, //10
IT_DELAYCONSUME,//11
+ IT_CASH = 18,
IT_MAX
};
@@ -240,7 +238,7 @@ struct guild_storage {
int guild_id;
short storage_status;
short storage_amount;
- struct item storage_[MAX_GUILD_STORAGE];
+ struct item items[MAX_GUILD_STORAGE];
};
struct s_pet {
@@ -474,7 +472,7 @@ struct guild {
char name[NAME_LENGTH],master[NAME_LENGTH];
struct guild_member member[MAX_GUILD];
struct guild_position position[MAX_GUILDPOSITION];
- char mes1[60],mes2[120];
+ char mes1[MAX_GUILDMES1],mes2[MAX_GUILDMES2];
int emblem_len,emblem_id;
char emblem_data[2048];
struct guild_alliance alliance[MAX_GUILDALLIANCE];
diff --git a/src/common/socket.c b/src/common/socket.c
index deba0e97b..89c605c9d 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -199,6 +199,10 @@ time_t stall_time = 60;
uint32 addr_[16]; // ip addresses of local host (host byte order)
int naddr_ = 0; // # of ip addresses
+// Maximum packet size in bytes, which the client is able to handle.
+// Larger packets cause a buffer overflow and stack corruption.
+static size_t socket_max_client_packet = 20480;
+
// initial recv buffer size (this will also be the max. size)
// biggest known packet: S 0153 <len>.w <emblem data>.?B -> 24x24 256 color .bmp (0153 + len.w + 1618/1654/1756 bytes)
#define RFIFO_SIZE (2*1024)
@@ -643,8 +647,15 @@ int WFIFOSET(int fd, size_t len)
exit(EXIT_FAILURE);
}
+ if( !s->flag.server && len > socket_max_client_packet )
+ {// see declaration of socket_max_client_packet for details
+ ShowError("WFIFOSET: Dropped too large client packet 0x%04x (length=%u, max=%u).\n", WFIFOW(fd,0), len, socket_max_client_packet);
+ return 0;
+ }
+
if( !s->flag.server && s->wdata_size+len > WFIFO_MAX )
{// reached maximum write fifo size
+ ShowError("WFIFOSET: Maximum write buffer size for client connection %d exceeded, most likely caused by packet 0x%04x (len=%u, ip=%lu.%lu.%lu.%lu).\n", fd, WFIFOW(fd,0), len, CONVIP(s->client_addr));
set_eof(fd);
return 0;
}
@@ -1064,6 +1075,8 @@ int socket_config_read(const char* cfgName)
ddos_autoreset = atoi(w2);
else if (!strcmpi(w1,"debug"))
access_debug = config_switch(w2);
+ else if (!strcmpi(w1,"socket_max_client_packet"))
+ socket_max_client_packet = strtoul(w2, NULL, 0);
#endif
else if (!strcmpi(w1, "import"))
socket_config_read(w2);
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 7a6c134e7..019e2d629 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -12,7 +12,6 @@
#include <errno.h>
-
#define J_MAX_MALLOC_SIZE 65535
// escapes a string in-place (' -> \' , \ -> \\ , % -> _)
@@ -657,7 +656,7 @@ int sv_split(char* str, int len, int startoff, char delim, char** out_fields, in
end[0] = end[1] = '\0';
*out_fields = end + 2;
}
- else if( (opt&SV_TERMINATE_LF) && end[0] == '\r' )
+ else if( (opt&SV_TERMINATE_CR) && end[0] == '\r' )
{
if( !(opt&SV_KEEP_TERMINATOR) )
end[0] = '\0';
@@ -923,18 +922,12 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
FILE* fp;
int lines = 0;
int entries = 0;
- char* fields[64]; // room for 63 fields ([0] is reserved)
- int columns;
+ char** fields; // buffer for fields ([0] is reserved)
+ int columns, fields_length;
char path[1024], line[1024];
snprintf(path, sizeof(path), "%s/%s", directory, filename);
- if( maxcols > ARRAYLENGTH(fields)-1 )
- {
- ShowError("sv_readdb: Insufficient column storage in parser for file \"%s\" (want %d, have only %d). Increase the capacity in the source code please.\n", path, maxcols, ARRAYLENGTH(fields)-1);
- return false;
- }
-
// open file
fp = fopen(path, "r");
if( fp == NULL )
@@ -943,6 +936,10 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
return false;
}
+ // allocate enough memory for the maximum requested amount of columns plus the reserved one
+ fields_length = maxcols+1;
+ fields = aMalloc(fields_length*sizeof(char*));
+
// process rows one by one
while( fgets(line, sizeof(line), fp) )
{
@@ -954,7 +951,7 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
if( line[0] == '\0' || line[0] == '\n' || line[0] == '\r')
continue;
- columns = sv_split(line, strlen(line), 0, delim, fields, ARRAYLENGTH(fields), (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
+ columns = sv_split(line, strlen(line), 0, delim, fields, fields_length, (e_svopt)(SV_TERMINATE_LF|SV_TERMINATE_CRLF));
if( columns < mincols )
{
@@ -983,6 +980,7 @@ bool sv_readdb(const char* directory, const char* filename, char delim, int minc
entries++;
}
+ aFree(fields);
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", entries, path);
diff --git a/src/common/utils.c b/src/common/utils.c
index c1128edb4..12123784f 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -14,7 +14,11 @@
#include <math.h> // floor()
#ifdef WIN32
+ #include <io.h>
#include <windows.h>
+ #ifndef F_OK
+ #define F_OK 0x0
+ #endif /* F_OK */
#else
#include <unistd.h>
#include <dirent.h>
@@ -182,6 +186,11 @@ void findfile(const char *p, const char *pat, void (func)(const char*))
}
#endif
+bool exists(const char* filename)
+{
+ return !access(filename, F_OK);
+}
+
uint8 GetByte(uint32 val, int idx)
{
switch( idx )
diff --git a/src/common/utils.h b/src/common/utils.h
index 93563dc34..5cf3ff3cf 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -14,6 +14,7 @@
void dump(FILE* fp, const unsigned char* buffer, int length);
void findfile(const char *p, const char *pat, void (func)(const char*));
+bool exists(const char* filename);
//Caps values to min/max
#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a)
diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c
index 3f02a240a..d7a78c119 100644
--- a/src/ladmin/ladmin.c
+++ b/src/ladmin/ladmin.c
@@ -261,7 +261,7 @@ int ladmin_log(char *fmt, ...)
}
//---------------------------------------------
-// Function to return ordonal text of a number.
+// Function to return ordinal text of a number.
//---------------------------------------------
char* makeordinal(int number)
{
@@ -275,7 +275,6 @@ char* makeordinal(int number)
} else {
return "th";
}
- return "";
}
//-----------------------------------------------------------------------------------------
diff --git a/src/login/login.c b/src/login/login.c
index e888d21f6..6b3a1bcaf 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -402,7 +402,7 @@ int parse_fromchar(int fd)
uint32 login_id1 = RFIFOL(fd,6);
uint32 login_id2 = RFIFOL(fd,10);
uint8 sex = RFIFOB(fd,14);
- uint32 ip_ = ntohl(RFIFOL(fd,15));
+ //uint32 ip_ = ntohl(RFIFOL(fd,15));
int request_id = RFIFOL(fd,19);
RFIFOSKIP(fd,23);
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d48dda0db..95b3dc33e 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -452,7 +452,7 @@ ACMD_FUNC(mapmove)
clif_displaymessage(fd, msg_txt(248));
return -1;
}
- if (pc_setpos(sd, mapindex, x, y, 3) != 0) {
+ if (pc_setpos(sd, mapindex, x, y, CLR_TELEPORT) != 0) {
clif_displaymessage(fd, msg_txt(1)); // Map not found.
return -1;
}
@@ -535,7 +535,7 @@ ACMD_FUNC(jumpto)
return -1;
}
- pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);
+ pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(4), pl_sd->status.name); // Jumped to %s
clif_displaymessage(fd, atcmd_output);
@@ -572,7 +572,7 @@ ACMD_FUNC(jump)
x = y = 0; //Invalid cell, use random spot.
}
- pc_setpos(sd, sd->mapindex, x, y, 3);
+ pc_setpos(sd, sd->mapindex, x, y, CLR_TELEPORT);
sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); // Jumped to %d %d
clif_displaymessage(fd, atcmd_output);
return 0;
@@ -1114,7 +1114,7 @@ ACMD_FUNC(load)
return -1;
}
- pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 0);
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT);
clif_displaymessage(fd, msg_txt(7)); // Warping to save point..
return 0;
@@ -1663,15 +1663,15 @@ ACMD_FUNC(item2)
if (item_id > 500) {
loop = 1;
get_count = number;
- if (item_data->type == 4 || item_data->type == 5 ||
- item_data->type == 7 || item_data->type == 8) {
+ if (item_data->type == IT_WEAPON || item_data->type == IT_ARMOR ||
+ item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) {
loop = number;
get_count = 1;
- if (item_data->type == 7) {
+ if (item_data->type == IT_PETEGG) {
identify = 1;
refine = 0;
}
- if (item_data->type == 8)
+ if (item_data->type == IT_PETARMOR)
refine = 0;
if (refine > 10)
refine = 10;
@@ -1777,8 +1777,10 @@ ACMD_FUNC(baselevelup)
sd->status.base_level -= (unsigned int)level;
clif_displaymessage(fd, msg_txt(22)); // Base level lowered.
}
+ sd->status.base_exp = 0;
clif_updatestatus(sd, SP_STATUSPOINT);
clif_updatestatus(sd, SP_BASELEVEL);
+ clif_updatestatus(sd, SP_BASEEXP);
clif_updatestatus(sd, SP_NEXTBASEEXP);
status_calc_pc(sd, 0);
if(sd->status.party_id)
@@ -1808,11 +1810,7 @@ ACMD_FUNC(joblevelup)
if ((unsigned int)level > pc_maxjoblv(sd) || (unsigned int)level > pc_maxjoblv(sd) - sd->status.job_level) // fix positiv overflow
level = pc_maxjoblv(sd) - sd->status.job_level;
sd->status.job_level += (unsigned int)level;
- clif_updatestatus(sd, SP_JOBLEVEL);
- clif_updatestatus(sd, SP_NEXTJOBEXP);
sd->status.skill_point += level;
- clif_updatestatus(sd, SP_SKILLPOINT);
- status_calc_pc(sd, 0);
clif_misceffect(&sd->bl, 1);
clif_displaymessage(fd, msg_txt(24)); // Job level raised.
} else {
@@ -1824,18 +1822,20 @@ ACMD_FUNC(joblevelup)
if ((unsigned int)level >= sd->status.job_level) // fix negativ overflow
level = sd->status.job_level-1;
sd->status.job_level -= (unsigned int)level;
- clif_updatestatus(sd, SP_JOBLEVEL);
- clif_updatestatus(sd, SP_NEXTJOBEXP);
if (sd->status.skill_point < level)
pc_resetskill(sd,0); //Reset skills since we need to substract more points.
if (sd->status.skill_point < level)
sd->status.skill_point = 0;
else
sd->status.skill_point -= level;
- clif_updatestatus(sd, SP_SKILLPOINT);
- status_calc_pc(sd, 0);
clif_displaymessage(fd, msg_txt(25)); // Job level lowered.
}
+ sd->status.job_exp = 0;
+ clif_updatestatus(sd, SP_JOBLEVEL);
+ clif_updatestatus(sd, SP_JOBEXP);
+ clif_updatestatus(sd, SP_NEXTJOBEXP);
+ clif_updatestatus(sd, SP_SKILLPOINT);
+ status_calc_pc(sd, 0);
return 0;
}
@@ -2308,7 +2308,7 @@ ACMD_FUNC(go)
clif_displaymessage(fd, msg_txt(248));
return -1;
}
- if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, 3) == 0) {
+ if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == 0) {
clif_displaymessage(fd, msg_txt(0)); // Warped.
} else {
clif_displaymessage(fd, msg_txt(1)); // Map not found.
@@ -3329,7 +3329,7 @@ ACMD_FUNC(recall)
clif_displaymessage(fd, "You are not authorized to warp this player from its actual map.");
return -1;
}
- pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled!
clif_displaymessage(fd, atcmd_output);
@@ -3988,7 +3988,7 @@ ACMD_FUNC(recallall)
pc_setstand(pl_sd);
pc_setrestartvalue(pl_sd,1);
}
- pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
}
}
}
@@ -4047,7 +4047,7 @@ ACMD_FUNC(guildrecall)
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
count++;
else
- pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
}
}
mapit_free(iter);
@@ -4106,7 +4106,7 @@ ACMD_FUNC(partyrecall)
if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd))
count++;
else
- pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, 2);
+ pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
}
}
mapit_free(iter);
@@ -4704,7 +4704,7 @@ ACMD_FUNC(tonpc)
}
if ((nd = npc_name2id(npcname)) != NULL) {
- if (pc_setpos(sd, map_id2index(nd->bl.m), nd->bl.x, nd->bl.y, 3) == 0)
+ if (pc_setpos(sd, map_id2index(nd->bl.m), nd->bl.x, nd->bl.y, CLR_TELEPORT) == 0)
clif_displaymessage(fd, msg_txt(0)); // Warped.
else
return -1;
@@ -5786,7 +5786,7 @@ ACMD_FUNC(skilltree)
ent = &skill_tree[c][j];
meets = 1;
- for(j=0;j<5;j++)
+ for(j=0;j<MAX_PC_SKILL_REQUIRE;j++)
{
if( ent->need[j].id && pc_checkskill(sd,ent->need[j].id) < ent->need[j].lv)
{
@@ -6352,7 +6352,7 @@ ACMD_FUNC(mobsearch)
clif_displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
- while( true )
+ for(;;)
{
TBL_MOB* md = (TBL_MOB*)mapit_next(it);
if( md == NULL )
@@ -6502,7 +6502,7 @@ ACMD_FUNC(users)
// count users on each map
iter = mapit_getallusers();
- while( true )
+ for(;;)
{
struct map_session_data* sd2 = (struct map_session_data*)mapit_next(iter);
if( sd2 == NULL )
@@ -6585,7 +6585,7 @@ ACMD_FUNC(summon)
md->master_id=sd->bl.id;
md->special_state.ai=1;
md->deletetimer=add_timer(tick+(duration*60000),mob_timer_delete,md->bl.id,0);
- clif_misceffect2(&md->bl,344);
+ clif_specialeffect(&md->bl,344,AREA);
mob_spawn(md);
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,md->bl.x,md->bl.y,tick);
@@ -6862,26 +6862,36 @@ ACMD_FUNC(identify)
*------------------------------------------*/
ACMD_FUNC(gmotd)
{
- char buf[CHAT_SIZE_MAX];
- FILE *fp;
- nullpo_retr(-1, sd);
- if((fp = fopen(motd_txt, "r"))!=NULL){
- while(fgets(buf, sizeof(buf), fp) != NULL)
+ char buf[CHAT_SIZE_MAX];
+ size_t len;
+ FILE* fp;
+
+ if( ( fp = fopen(motd_txt, "r") ) != NULL )
+ {
+ while( fgets(buf, sizeof(buf), fp) )
+ {
+ if( buf[0] == '/' && buf[1] == '/' )
{
- int i;
- if (buf[0] == '/' && buf[1] == '/')
- continue;
- for(i=0; buf[i]; i++){
- if(buf[i]=='\r' || buf[i]=='\n'){
- buf[i]=0;
- break;
- }
- }
- intif_broadcast(buf, strlen(buf)+1, 0);
+ continue;
+ }
+
+ len = strlen(buf);
+
+ while( len && ( buf[len-1] == '\r' || buf[len-1] == '\n' ) )
+ {// strip trailing EOL characters
+ len--;
+ }
+
+ if( len )
+ {
+ buf[len] = 0;
+
+ intif_broadcast(buf, len+1, 0);
}
- fclose(fp);
}
- return 0;
+ fclose(fp);
+ }
+ return 0;
}
ACMD_FUNC(misceffect)
@@ -7071,7 +7081,7 @@ ACMD_FUNC(showmobs)
clif_displaymessage(fd, atcmd_output);
it = mapit_geteachmob();
- while( true )
+ for(;;)
{
TBL_MOB* md = (TBL_MOB*)mapit_next(it);
if( md == NULL )
@@ -7124,7 +7134,7 @@ ACMD_FUNC(homlevel)
}
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
- clif_misceffect2(&hd->bl,568);
+ clif_specialeffect(&hd->bl,568,AREA);
return 0;
}
@@ -7390,9 +7400,6 @@ ACMD_FUNC(homshuffle)
*------------------------------------------*/
ACMD_FUNC(iteminfo)
{
- char *itype[12] = {"Potion/Food", "BUG!", "Usable", "Etc", "Weapon", "Protection", "Card", "Egg", "Pet Acessory", "BUG!", "Arrow"};
- //, "Lure/Scroll"}; No need, type 11 items are converted to type 2 upon loading [Skotlex]
-
struct item_data *item_data, *item_array[MAX_SEARCH];
int i, count = 1;
@@ -7417,20 +7424,20 @@ ACMD_FUNC(iteminfo)
item_data = item_array[i];
sprintf(atcmd_output, "Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s",
item_data->name,item_data->jname,item_data->slot,item_data->nameid,
- item_data->type < 12 ? itype[item_data->type] : "BUG!",
+ itemdb_typename(item_data->type),
(item_data->script==NULL)? "None" : "With script"
);
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, "NPC Buy:%dz%s, Sell:%dz%s | Weight: %.1f ", item_data->value_buy, item_data->flag.value_notdc ? "(No Discount!)":"", item_data->value_sell, item_data->flag.value_notoc ? "(No Overcharge!)":"", item_data->weight/10. );
+ sprintf(atcmd_output, "NPC Buy:%dz, Sell:%dz | Weight: %.1f ", item_data->value_buy, item_data->value_sell, item_data->weight/10. );
clif_displaymessage(fd, atcmd_output);
- if (item_data->maxchance == 10000)
- strcpy(atcmd_output, " - Available in the shops only");
+ if (item_data->maxchance == -1)
+ strcpy(atcmd_output, " - Available in the shops only.");
else if (item_data->maxchance)
sprintf(atcmd_output, " - Maximal monsters drop chance: %02.02f%%", (float)item_data->maxchance / 100 );
else
- strcpy(atcmd_output, " - Monsters don't drop this item");
+ strcpy(atcmd_output, " - Monsters don't drop this item.");
clif_displaymessage(fd, atcmd_output);
}
@@ -7700,7 +7707,7 @@ ACMD_FUNC(size)
size = atoi(message);
if(sd->state.size) {
sd->state.size=0;
- pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, 3);
+ pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_TELEPORT);
}
if(size==1) {
@@ -8499,58 +8506,68 @@ ACMD_FUNC(stats)
ACMD_FUNC(delitem)
{
char item_name[100];
- int i, number = 0, item_id, item_position, count;
- struct item_data *item_data;
- char output[CHAT_SIZE_MAX];
+ int nameid, amount = 0, total, idx;
+ struct item_data* id;
nullpo_retr(-1, sd);
- memset(item_name, '\0', sizeof(item_name));
- memset(output, '\0', sizeof(output));
+ if( !message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &amount) < 2 && sscanf(message, "%99s %d", item_name, &amount) < 2 ) || amount < 1 )
+ {
+ clif_displaymessage(fd, "Please, enter an item name/id, a quantity and a player name (usage: #delitem <player> <item_name_or_ID> <quantity>).");
+ return -1;
+ }
- if (!message || !*message || (
- sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 2 &&
- sscanf(message, "%s %d", item_name, &number) < 2
- ) || number < 1) {
- clif_displaymessage(fd, "Please, enter an item name/id, a quantity and a player name (usage: #delitem <item_name_or_ID> <quantity> <player>).");
+ if( ( id = itemdb_searchname(item_name) ) != NULL || ( id = itemdb_exists(atoi(item_name)) ) != NULL )
+ {
+ nameid = id->nameid;
+ }
+ else
+ {
+ clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
return -1;
}
- item_id = 0;
- if ((item_data = itemdb_searchname(item_name)) != NULL ||
- (item_data = itemdb_exists(atoi(item_name))) != NULL)
- item_id = item_data->nameid;
-
- if (item_id > 500) {
- item_position = pc_search_inventory(sd, item_id);
- if (item_position >= 0) {
- count = 0;
- for(i = 0; i < number && item_position >= 0; i++) {
+ total = amount;
- //Logs (A)dmins items [Lupus]
- if(log_config.enable_logs&0x400)
- log_pick_pc(sd, "A", sd->status.inventory[item_position].nameid, -1, &sd->status.inventory[item_position]);
+ // delete items
+ while( amount && ( idx = pc_search_inventory(sd, nameid) ) != -1 )
+ {
+ int delamount = ( amount < sd->status.inventory[idx].amount ) ? amount : sd->status.inventory[idx].amount;
- pc_delitem(sd, item_position, 1, 0, 0);
- count++;
- item_position = pc_search_inventory(sd, item_id); // for next loop
- }
- sprintf(output, msg_txt(113), count); // %d item(s) removed by a GM.
- clif_displaymessage(sd->fd, output);
- if (number == count)
- sprintf(output, msg_txt(114), count); // %d item(s) removed from the player.
- else
- sprintf(output, msg_txt(115), count, count, number); // %d item(s) removed. Player had only %d on %d items.
- clif_displaymessage(fd, output);
- } else {
- clif_displaymessage(fd, msg_txt(116)); // Character does not have the item.
- return -1;
+ if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET )
+ {// delete pet
+ intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2]));
+ }
+
+ //Logs (A)dmins items [Lupus]
+ if( log_config.enable_logs&0x400 )
+ {
+ log_pick_pc(sd, "A", nameid, -delamount, &sd->status.inventory[idx]);
}
+
+ pc_delitem(sd, idx, delamount, 0, 0);
+
+ amount-= delamount;
+ }
+
+ // notify target
+ sprintf(atcmd_output, msg_txt(113), total-amount); // %d item(s) removed by a GM.
+ clif_displaymessage(sd->fd, atcmd_output);
+
+ // notify source
+ if( amount == total )
+ {
+ clif_displaymessage(fd, msg_txt(116)); // Character does not have the item.
+ }
+ else if( amount )
+ {
+ sprintf(atcmd_output, msg_txt(115), total-amount, total-amount, total); // %d item(s) removed. Player had only %d on %d items.
+ clif_displaymessage(fd, atcmd_output);
}
else
{
- clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name.
- return -1;
+ sprintf(atcmd_output, msg_txt(114), total); // %d item(s) removed from the player.
+ clif_displaymessage(fd, atcmd_output);
}
return 0;
diff --git a/src/map/battle.c b/src/map/battle.c
index 5c6da69e3..32def23f3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1942,8 +1942,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (sc && sc->data[SC_MIRACLE]) i = 2; //Star anger
else
- ARR_FIND(0, 3, i, t_class == sd->hate_mob[i]);
- if (i < 3 && (skill=pc_checkskill(sd,sg_info[i].anger_id)))
+ ARR_FIND(0, MAX_PC_FEELHATE, i, t_class == sd->hate_mob[i]);
+ if (i < MAX_PC_FEELHATE && (skill=pc_checkskill(sd,sg_info[i].anger_id)))
{
skillratio = sd->status.base_level + sstatus->dex + sstatus->luk;
if (i == 2) skillratio += sstatus->str; //Star Anger
@@ -4004,6 +4004,8 @@ static const struct _battle_data {
{ "invincible.nodamage", &battle_config.invincible_nodamage, 0, 0, 1, },
{ "mob_slave_keep_target", &battle_config.mob_slave_keep_target, 0, 0, 1, },
{ "autospell_check_range", &battle_config.autospell_check_range, 0, 0, 1, },
+ { "client_reshuffle_dice", &battle_config.client_reshuffle_dice, 0, 0, 1, },
+ { "client_sort_storage", &battle_config.client_sort_storage, 0, 0, 1, },
// BattleGround Settings
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
{ "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 230a86007..3abc6b0a4 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -96,6 +96,13 @@ bool battle_check_range(struct block_list *src,struct block_list *bl,int range);
void battle_consume_ammo(struct map_session_data* sd, int skill, int lv);
// ݒ
+#define MIN_HAIR_STYLE battle_config.min_hair_style
+#define MAX_HAIR_STYLE battle_config.max_hair_style
+#define MIN_HAIR_COLOR battle_config.min_hair_color
+#define MAX_HAIR_COLOR battle_config.max_hair_color
+#define MIN_CLOTH_COLOR battle_config.min_cloth_color
+#define MAX_CLOTH_COLOR battle_config.max_cloth_color
+
extern struct Battle_Config
{
int warp_point_debug;
@@ -471,6 +478,8 @@ extern struct Battle_Config
int invincible_nodamage;
int mob_slave_keep_target;
int autospell_check_range; //Enable range check for autospell bonus. [L0ne_W0lf]
+ int client_reshuffle_dice; // Reshuffle /dice
+ int client_sort_storage;
// [BattleGround Settings]
int bg_update_interval;
diff --git a/src/map/battleground.c b/src/map/battleground.c
index fad22c38f..1c2a90d90 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -64,7 +64,7 @@ int bg_team_warp(int bg_id, unsigned short mapindex, short x, short y)
struct battleground_data *bg = bg_team_search(bg_id);
if( bg == NULL ) return 0;
for( i = 0; i < MAX_BG_MEMBERS; i++ )
- if( bg->members[i].sd != NULL ) pc_setpos(bg->members[i].sd, mapindex, x, y, 3);
+ if( bg->members[i].sd != NULL ) pc_setpos(bg->members[i].sd, mapindex, x, y, CLR_TELEPORT);
return 1;
}
@@ -145,7 +145,7 @@ int bg_member_respawn(struct map_session_data *sd)
return 0;
if( bg->mapindex == 0 )
return 0; // Respawn not handled by Core
- pc_setpos(sd, bg->mapindex, bg->x, bg->y, 0);
+ pc_setpos(sd, bg->mapindex, bg->x, bg->y, CLR_OUTSIGHT);
status_revive(&sd->bl, 1, 100);
return 1; // Warped
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 40e7ca8d1..a9634d2c2 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -74,7 +74,7 @@ static const int packet_len_table[0x3d] = { // U - used, F - free
//2b13: Incoming, chrif_accountdeletion -> 'Delete acc XX, if the player is on, kick ....'
//2b14: Incoming, chrif_accountban -> 'not sure: kick the player with message XY'
//2b15: FREE
-//2b16: Outgoing, chrif_ragsrvinfo -> 'sends motd / rates ....'
+//2b16: Outgoing, chrif_ragsrvinfo -> 'sends base / job / drop rates ....'
//2b17: Outgoing, chrif_char_offline -> 'tell the charserver that the char is now offline'
//2b18: Outgoing, chrif_char_reset_offline -> 'set all players OFF!'
//2b19: Outgoing, chrif_char_online -> 'tell the charserver that the char .. is online'
@@ -1229,40 +1229,18 @@ int chrif_load_scdata(int fd)
/*==========================================
* Send rates and motd to char server [Wizputer]
- * S 2b16 <base rate>.w <job rate>.w <drop rate>.w <motd len>.w <motd>.256B
+ * S 2b16 <base rate>.L <job rate>.L <drop rate>.L
*------------------------------------------*/
- int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
+int chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate)
{
- char buf[256];
- FILE *fp;
- int i;
-
chrif_check(-1);
- WFIFOHEAD(char_fd, sizeof(buf) + 10);
+ WFIFOHEAD(char_fd,14);
WFIFOW(char_fd,0) = 0x2b16;
- WFIFOW(char_fd,2) = base_rate;
- WFIFOW(char_fd,4) = job_rate;
- WFIFOW(char_fd,6) = drop_rate;
- WFIFOW(char_fd,8) = sizeof(buf) + 10;
-
- if ((fp = fopen(motd_txt, "r")) != NULL) {
- if (fgets(buf, sizeof(buf), fp) != NULL)
- {
- for(i = 0; buf[i]; i++) {
- if (buf[i] == '\r' || buf[i] == '\n') {
- buf[i] = 0;
- break;
- }
- }
- memcpy(WFIFOP(char_fd,10), buf, sizeof(buf));
- }
- fclose(fp);
- } else {
- memset(buf, 0, sizeof(buf)); //No data found, send empty packets?
- memcpy(WFIFOP(char_fd,10), buf, sizeof(buf));
- }
- WFIFOSET(char_fd,WFIFOW(char_fd,8));
+ WFIFOL(char_fd,2) = base_rate;
+ WFIFOL(char_fd,6) = job_rate;
+ WFIFOL(char_fd,10) = drop_rate;
+ WFIFOSET(char_fd,14);
return 0;
}
diff --git a/src/map/clif.c b/src/map/clif.c
index e55a27108..c5796555a 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -168,9 +168,9 @@ static inline unsigned char clif_bl_type(struct block_list *bl) {
case BL_ITEM: return 0x2; //ITEM_TYPE
case BL_SKILL: return 0x3; //SKILL_TYPE
case BL_CHAT: return 0x4; //UNKNOWN_TYPE
- case BL_MOB: return pcdb_checkid(((TBL_MOB*)bl)->vd->class_)?0x0:0x5; //NPC_MOB_TYPE
+ case BL_MOB: return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x5; //NPC_MOB_TYPE
case BL_NPC: return 0x6; //NPC_EVT_TYPE
- case BL_PET: return 0x7; //NPC_PET_TYPE
+ case BL_PET: return pcdb_checkid(status_get_viewdata(bl)->class_)?0x0:0x7; //NPC_PET_TYPE
case BL_HOM: return 0x8; //NPC_HOM_TYPE
case BL_MER: return 0x9; //NPC_MERSOL_TYPE
// case BL_ELEM: return 0xA; //NPC_ELEMENTAL_TYPE
@@ -658,7 +658,7 @@ int clif_clearflooritem(struct flooritem_data *fitem, int fd)
* 3 - teleported / logged out
* fd : the target client
*------------------------------------------*/
-int clif_clearunit_single(int id, uint8 type, int fd)
+int clif_clearunit_single(int id, clr_type type, int fd)
{
WFIFOHEAD(fd, packet_len(0x80));
WFIFOW(fd,0) = 0x80;
@@ -676,7 +676,7 @@ int clif_clearunit_single(int id, uint8 type, int fd)
* 2 - respawned
* 3 - teleported / logged out
*------------------------------------------*/
-int clif_clearunit_area(struct block_list* bl, uint8 type)
+int clif_clearunit_area(struct block_list* bl, clr_type type)
{
unsigned char buf[16];
@@ -686,7 +686,7 @@ int clif_clearunit_area(struct block_list* bl, uint8 type)
WBUFL(buf,2) = bl->id;
WBUFB(buf,6) = type;
- clif_send(buf, packet_len(0x80), bl, type == 1 ? AREA : AREA_WOS);
+ clif_send(buf, packet_len(0x80), bl, type == CLR_DEAD ? AREA : AREA_WOS);
if(disguised(bl)) {
WBUFL(buf,2) = -bl->id;
@@ -699,7 +699,7 @@ int clif_clearunit_area(struct block_list* bl, uint8 type)
static int clif_clearunit_delayed_sub(int tid, unsigned int tick, int id, intptr data)
{
struct block_list *bl = (struct block_list *)data;
- clif_clearunit_area(bl, 0);
+ clif_clearunit_area(bl, CLR_OUTSIGHT);
aFree(bl);
return 0;
}
@@ -1059,16 +1059,6 @@ static void clif_spiritball_single(int fd, struct map_session_data *sd)
WFIFOSET(fd, packet_len(0x1e1));
}
-// new and improved weather display [Valaris]
-static void clif_weather_sub(int fd, int id, int type)
-{
- WFIFOHEAD(fd,packet_len(0x1f3));
- WFIFOW(fd,0) = 0x1f3;
- WFIFOL(fd,2) = id;
- WFIFOL(fd,6) = type;
- WFIFOSET(fd,packet_len(0x1f3));
-}
-
/*==========================================
*
*------------------------------------------*/
@@ -1086,24 +1076,24 @@ static void clif_weather_check(struct map_session_data *sd)
|| map[m].flag.clouds2)
{
if (map[m].flag.snow)
- clif_weather_sub(fd, sd->bl.id, 162);
+ clif_specialeffect_single(&sd->bl, 162, fd);
if (map[m].flag.clouds)
- clif_weather_sub(fd, sd->bl.id, 233);
+ clif_specialeffect_single(&sd->bl, 233, fd);
if (map[m].flag.clouds2)
- clif_weather_sub(fd, sd->bl.id, 516);
+ clif_specialeffect_single(&sd->bl, 516, fd);
if (map[m].flag.fog)
- clif_weather_sub(fd, sd->bl.id, 515);
+ clif_specialeffect_single(&sd->bl, 515, fd);
if (map[m].flag.fireworks) {
- clif_weather_sub(fd, sd->bl.id, 297);
- clif_weather_sub(fd, sd->bl.id, 299);
- clif_weather_sub(fd, sd->bl.id, 301);
+ clif_specialeffect_single(&sd->bl, 297, fd);
+ clif_specialeffect_single(&sd->bl, 299, fd);
+ clif_specialeffect_single(&sd->bl, 301, fd);
}
if (map[m].flag.sakura)
- clif_weather_sub(fd, sd->bl.id, 163);
+ clif_specialeffect_single(&sd->bl, 163, fd);
if (map[m].flag.leaves)
- clif_weather_sub(fd, sd->bl.id, 333);
+ clif_specialeffect_single(&sd->bl, 333, fd);
if (map[m].flag.rain)
- clif_weather_sub(fd, sd->bl.id, 161);
+ clif_specialeffect_single(&sd->bl, 161, fd);
}
}
@@ -1280,13 +1270,14 @@ int clif_homskillinfoblock(struct map_session_data *sd)
void clif_homskillup(struct map_session_data *sd, int skill_num)
{ //[orn]
struct homun_data *hd;
- int fd=sd->fd, skillid;
- WFIFOHEAD(fd, packet_len(0x239));
+ int fd, skillid;
nullpo_retv(sd);
skillid = skill_num - HM_SKILLBASE;
+ fd=sd->fd;
hd=sd->hd;
+ WFIFOHEAD(fd, packet_len(0x239));
WFIFOW(fd,0) = 0x239;
WFIFOW(fd,2) = skill_num;
WFIFOW(fd,4) = hd->homunculus.hskill[skillid].lv;
@@ -1468,9 +1459,10 @@ void clif_blown(struct block_list *bl)
clif_slide(bl, bl->x, bl->y);
}
-/*==========================================
- *
- *------------------------------------------*/
+/// Visually moves(slides) a character to x,y. If the target cell
+/// isn't walkable, the char doesn't move at all. If the char is
+/// sitting it will stand up.
+/// S 0088 <gid>.L <x>.W <y>.W
void clif_fixpos(struct block_list *bl)
{
unsigned char buf[10];
@@ -1529,9 +1521,7 @@ int clif_buylist(struct map_session_data *sd, struct npc_data *nd)
if( id == NULL )
continue;
WFIFOL(fd, 4+c*11) = val;
- if (!id->flag.value_notdc)
- val = pc_modifybuyvalue(sd,val);
- WFIFOL(fd, 8+c*11) = val;
+ WFIFOL(fd, 8+c*11) = pc_modifybuyvalue(sd,val);
WFIFOB(fd,12+c*11) = itemtype(id->type);
WFIFOW(fd,13+c*11) = ( id->view_id > 0 ) ? id->view_id : id->nameid;
c++;
@@ -1570,9 +1560,7 @@ int clif_selllist(struct map_session_data *sd)
continue;
WFIFOW(fd,4+c*10)=i+2;
WFIFOL(fd,6+c*10)=val;
- if( !sd->inventory_data[i]->flag.value_notoc )
- val=pc_modifysellvalue(sd,val);
- WFIFOL(fd,10+c*10)=val;
+ WFIFOL(fd,10+c*10)=pc_modifysellvalue(sd,val);
c++;
}
}
@@ -2166,7 +2154,7 @@ void clif_equiplist(struct map_session_data *sd)
}
}
-void clif_storagelist(struct map_session_data* sd, struct storage_data* stor)
+void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length)
{
struct item_data *id;
int i,n,ne;
@@ -2187,21 +2175,21 @@ void clif_storagelist(struct map_session_data* sd, struct storage_data* stor)
const int cmd = 28;
#endif
- buf = (unsigned char*)aMallocA(MAX_STORAGE * s + 4);
- bufe = (unsigned char*)aMallocA(MAX_STORAGE * cmd + 4);
+ buf = (unsigned char*)aMallocA(items_length * s + 4);
+ bufe = (unsigned char*)aMallocA(items_length * cmd + 4);
- for( i = 0, n = 0, ne = 0; i < MAX_STORAGE; i++ )
+ for( i = 0, n = 0, ne = 0; i < items_length; i++ )
{
- if( stor->items[i].nameid <= 0 )
+ if( items[i].nameid <= 0 )
continue;
- id = itemdb_search(stor->items[i].nameid);
+ id = itemdb_search(items[i].nameid);
if( !itemdb_isstackable2(id) )
{ //Equippable
WBUFW(bufe,ne*cmd+4)=i+1;
- clif_item_sub(bufe, ne*cmd+6, &stor->items[i], id, id->equip);
- clif_addcards(WBUFP(bufe, ne*cmd+16), &stor->items[i]);
+ clif_item_sub(bufe, ne*cmd+6, &items[i], id, id->equip);
+ clif_addcards(WBUFP(bufe, ne*cmd+16), &items[i]);
#if PACKETVER >= 20071002
- WBUFL(bufe,ne*cmd+24)=stor->items[i].expire_time;
+ WBUFL(bufe,ne*cmd+24)=items[i].expire_time;
WBUFW(bufe,ne*cmd+28)=0; //Unknown
#endif
ne++;
@@ -2209,93 +2197,12 @@ void clif_storagelist(struct map_session_data* sd, struct storage_data* stor)
else
{ //Stackable
WBUFW(buf,n*s+4)=i+1;
- clif_item_sub(buf, n*s+6, &stor->items[i], id,-1);
+ clif_item_sub(buf, n*s+6, &items[i], id,-1);
#if PACKETVER >= 5
- clif_addcards(WBUFP(buf,n*s+14), &stor->items[i]);
+ clif_addcards(WBUFP(buf,n*s+14), &items[i]);
#endif
#if PACKETVER >= 20080102
- WBUFL(buf,n*s+22)=stor->items[i].expire_time;
-#endif
- n++;
- }
- }
- if( n )
- {
-#if PACKETVER < 5
- WBUFW(buf,0)=0xa5;
-#elif PACKETVER < 20080102
- WBUFW(buf,0)=0x1f0;
-#else
- WBUFW(buf,0)=0x2ea;
-#endif
- WBUFW(buf,2)=4+n*s;
- clif_send(buf, WBUFW(buf,2), &sd->bl, SELF);
- }
- if( ne )
- {
-#if PACKETVER < 20071002
- WBUFW(bufe,0)=0xa6;
-#else
- WBUFW(bufe,0)=0x2d1;
-#endif
- WBUFW(bufe,2)=4+ne*cmd;
- clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF);
- }
-
- if( buf ) aFree(buf);
- if( bufe ) aFree(bufe);
-}
-
-//Unified storage function which sends all of the storage (requires two packets, one for equipable items and one for stackable ones. [Skotlex]
-void clif_guildstoragelist(struct map_session_data *sd,struct guild_storage *stor)
-{
- struct item_data *id;
- int i,n,ne;
- unsigned char *buf;
- unsigned char *bufe;
-#if PACKETVER < 5
- const int s = 10; //Entry size.
-#elif PACKETVER < 20080102
- const int s = 18;
-#else
- const int s = 22;
-#endif
-#if PACKETVER < 20071002
- const int cmd = 20;
-#elif PACKETVER < 20100629
- const int cmd = 26;
-#else
- const int cmd = 28;
-#endif
-
- buf = (unsigned char*)aMallocA(MAX_GUILD_STORAGE * s + 4);
- bufe = (unsigned char*)aMallocA(MAX_GUILD_STORAGE * cmd + 4);
-
- for( i = 0, n = 0, ne = 0; i < MAX_GUILD_STORAGE; i++ )
- {
- if( stor->storage_[i].nameid <= 0 )
- continue;
- id = itemdb_search(stor->storage_[i].nameid);
- if( !itemdb_isstackable2(id) )
- { //Equippable
- WBUFW(bufe,ne*cmd+4)=i+1;
- clif_item_sub(bufe, ne*cmd+6, &stor->storage_[i], id, id->equip);
- clif_addcards(WBUFP(bufe, ne*cmd+16), &stor->storage_[i]);
-#if PACKETVER >= 20071002
- WBUFL(bufe,ne*cmd+24)=stor->storage_[i].expire_time;
- WBUFW(bufe,ne*cmd+28)=0; //Unknown
-#endif
- ne++;
- }
- else
- { //Stackable
- WBUFW(buf,n*s+4)=i+1;
- clif_item_sub(buf, n*s+6, &stor->storage_[i], id,-1);
-#if PACKETVER >= 5
- clif_addcards(WBUFP(buf,n*s+14), &stor->storage_[i]);
-#endif
-#if PACKETVER >= 20080102
- WBUFL(buf,n*s+22)=stor->storage_[i].expire_time;
+ WBUFL(buf,n*s+22)=items[i].expire_time;
#endif
n++;
}
@@ -3089,23 +2996,7 @@ int clif_misceffect(struct block_list* bl,int type)
return 0;
}
-int clif_misceffect2(struct block_list *bl, int type)
-{
- unsigned char buf[24];
-
- nullpo_ret(bl);
-
- memset(buf, 0, packet_len(0x1f3));
-
- WBUFW(buf,0) = 0x1f3;
- WBUFL(buf,2) = bl->id;
- WBUFL(buf,6) = type;
-
- clif_send(buf, packet_len(0x1f3), bl, AREA);
-
- return 0;
-}
/*==========================================
* \IvVύX
*------------------------------------------*/
@@ -3226,11 +3117,13 @@ int clif_useitemack(struct map_session_data *sd,int index,int amount,int ok)
return 0;
}
-/*==========================================
- * Inform client whether chatroom creation was successful or not
- * R 00d6 <fail>.B
- *------------------------------------------*/
-void clif_createchat(struct map_session_data* sd, int fail)
+/// Inform client whether chatroom creation was successful or not
+/// R 00d6 <flag>.B
+/// flag:
+/// 0 = Room has been successfully created (opens chat room)
+/// 1 = Room limit exceeded
+/// 2 = Same room already exists
+void clif_createchat(struct map_session_data* sd, int flag)
{
int fd;
@@ -3239,7 +3132,7 @@ void clif_createchat(struct map_session_data* sd, int fail)
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0xd6));
WFIFOW(fd,0) = 0xd6;
- WFIFOB(fd,2) = fail;
+ WFIFOB(fd,2) = flag;
WFIFOSET(fd,packet_len(0xd6));
}
@@ -3327,10 +3220,18 @@ int clif_clearchat(struct chat_data *cd,int fd)
return 0;
}
-/*==========================================
- *
- *------------------------------------------*/
-int clif_joinchatfail(struct map_session_data *sd,int fail)
+/// Displays message (mostly) regarding join chat
+/// failures
+/// R 0x00da <flag>.B
+/// flag:
+/// 0 = The room is already full.
+/// 1 = Incorrect password, please try again.
+/// 2 = You have been kicked out of the room.
+/// 4 = You don't have enough money.
+/// 5 = You are not the required level.
+/// 6 = Too high level for this job.
+/// 7 = Not the suitable job for this type of work.
+int clif_joinchatfail(struct map_session_data *sd,int flag)
{
int fd;
@@ -3340,7 +3241,7 @@ int clif_joinchatfail(struct map_session_data *sd,int fail)
WFIFOHEAD(fd,packet_len(0xda));
WFIFOW(fd,0) = 0xda;
- WFIFOB(fd,2) = fail;
+ WFIFOB(fd,2) = flag;
WFIFOSET(fd,packet_len(0xda));
return 0;
@@ -3393,7 +3294,7 @@ int clif_addchat(struct chat_data* cd,struct map_session_data *sd)
/*==========================================
* Announce the new owner
- * R 00e1 <index>.l <nick>.24B
+ * R 00e1 <owner flag>.l <nick>.24B
*------------------------------------------*/
void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
{
@@ -3405,6 +3306,8 @@ void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd)
//FIXME: this announces a swap between positions 0 and 1 (probably not what we want) [ultramage]
//FIXME: aegis sends obviously incorrect packets; need to figure out what to send to display it correctly :X
//TODO: is it just owner swap, or can it do general-purpose reordering?
+ // It's not position, but operator flag, everyone set to 1 gets chat
+ // operator menu (yes, that means a chat may host multiple operators) [Ai4rei]
WBUFW(buf, 0) = 0xe1;
WBUFL(buf, 2) = 1;
@@ -3690,41 +3593,6 @@ void clif_updateguildstorageamount(struct map_session_data* sd, int amount)
}
/*==========================================
- *
- *------------------------------------------*/
-void clif_guildstorageitemadded(struct map_session_data* sd, struct item* i, int index, int amount)
-{
- int view,fd;
- unsigned char *buf;
-#if PACKETVER < 20090603
- const int cmd = 0xf4;
-#else
- const int cmd = 0x1c4;
-#endif
-
- nullpo_retv(sd);
- nullpo_retv(i);
- fd=sd->fd;
- view = itemdb_viewid(i->nameid);
- buf = WFIFOP(fd,0);
-
- WFIFOHEAD(fd,packet_len(cmd));
- WBUFW(buf, 0) = cmd; // Storage item added
- WBUFW(buf, 2) = index+1; // index
- WBUFL(buf, 4) = amount; // amount
- WBUFW(buf, 8) = ( view > 0 ) ? view : i->nameid; // id
-#if PACKETVER >= 20090603
- WBUFB(buf,10) = itemdb_type(i->nameid); //type
- buf = WBUFP(buf,1); //Advance 1B
-#endif
- WBUFB(buf,10) = i->identify; //identify flag
- WBUFB(buf,11) = i->attribute; // attribute
- WBUFB(buf,12) = i->refine; //refine
- clif_addcards(WBUFP(buf,13), i);
- WFIFOSET(fd,packet_len(cmd));
-}
-
-/*==========================================
* JvqɂACe苎
*------------------------------------------*/
void clif_storageitemremoved(struct map_session_data* sd, int index, int amount)
@@ -3885,7 +3753,8 @@ static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int da
/*==========================================
* Sends a 'damage' packet (src performs action on dst)
- * R 008a <src ID>.l <dst ID>.l <server tick>.l <src speed>.l <dst speed>.l <param1>.w <param2>.w <type>.B <param3>.w
+ * R 008a <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.W <div>.W <type>.B <damage2>.W
+ * R 02e1 <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.L <div>.W <type>.B <damage2>.L
*
* type=00 damage [param1: total damage, param2: div, param3: assassin dual-wield damage]
* type=01 pick up item
@@ -4131,12 +4000,11 @@ void clif_skill_delunit(struct skill_unit *unit)
}
/*==========================================
- * Unknown... trap related?
- * Sent when an object gets ankle-snared
+ * Sent when an object gets ankle-snared (ZC_SKILL_UPDATE)
* Only affects units with class [139,153] client-side
* R 01ac <object id>.l
*------------------------------------------*/
-void clif_01ac(struct block_list* bl)
+void clif_skillunit_update(struct block_list* bl)
{
unsigned char buf[6];
nullpo_retv(bl);
@@ -4195,7 +4063,7 @@ int clif_outsight(struct block_list *bl,va_list ap)
switch(bl->type){
case BL_PC:
if (sd->vd.class_ != INVISIBLE_CLASS)
- clif_clearunit_single(bl->id,0,tsd->fd);
+ clif_clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd);
if(sd->chatID){
struct chat_data *cd;
cd=(struct chat_data*)map_id2bl(sd->chatID);
@@ -4213,14 +4081,14 @@ int clif_outsight(struct block_list *bl,va_list ap)
break;
default:
if ((vd=status_get_viewdata(bl)) && vd->class_ != INVISIBLE_CLASS)
- clif_clearunit_single(bl->id,0,tsd->fd);
+ clif_clearunit_single(bl->id,CLR_OUTSIGHT,tsd->fd);
break;
}
}
if (sd && sd->fd)
{ //sd is watching tbl go out of view.
if ((vd=status_get_viewdata(tbl)) && vd->class_ != INVISIBLE_CLASS)
- clif_clearunit_single(tbl->id,0,sd->fd);
+ clif_clearunit_single(tbl->id,CLR_OUTSIGHT,sd->fd);
}
return 0;
}
@@ -4414,6 +4282,15 @@ int clif_skillup(struct map_session_data *sd,int skill_num)
/*==========================================
* XLrGtFNg𑗐M
+ * pl:
+ * 0 = Yellow cast aura
+ * 1 = Water elemental cast aura
+ * 2 = Earth elemental cast aura
+ * 3 = Fire elemental cast aura
+ * 4 = Wind elemental cast aura
+ * 5 = Poison elemental cast aura
+ * 6 = White cast aura
+ * ? = like 0
*------------------------------------------*/
int clif_skillcasting(struct block_list* bl,
int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl, int casttime)
@@ -7081,8 +6958,8 @@ int clif_guild_notice(struct map_session_data* sd, struct guild* g)
WFIFOHEAD(fd,packet_len(0x16f));
WFIFOW(fd,0) = 0x16f;
- memcpy(WFIFOP(fd,2), g->mes1, 60);
- memcpy(WFIFOP(fd,62), g->mes2, 120);
+ memcpy(WFIFOP(fd,2), g->mes1, MAX_GUILDMES1);
+ memcpy(WFIFOP(fd,62), g->mes2, MAX_GUILDMES2);
WFIFOSET(fd,packet_len(0x16f));
return 0;
}
@@ -7106,7 +6983,12 @@ int clif_guild_invite(struct map_session_data *sd,struct guild *g)
return 0;
}
/*==========================================
- * MhoU
+ * Reply to invite request
+ * Flag:
+ * 0 = Already in guild.
+ * 1 = Offer rejected.
+ * 2 = Offer accepted.
+ * 3 = Guild full.
*------------------------------------------*/
int clif_guild_inviteack(struct map_session_data *sd,int flag)
{
@@ -7285,7 +7167,11 @@ int clif_guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
return 0;
}
/*==========================================
- * MhGΌ
+ * Reply to opposition request
+ * Flag:
+ * 0 = Antagonist has been set.
+ * 1 = Guild has too many Antagonists.
+ * 2 = Already set as an Antagonist.
*------------------------------------------*/
int clif_guild_oppositionack(struct map_session_data *sd,int flag)
{
@@ -7579,20 +7465,17 @@ int clif_wisall(struct map_session_data *sd,int type,int flag)
/*==========================================
* Play a BGM! [Rikter/Yommy]
*------------------------------------------*/
-void clif_playBGM(struct map_session_data* sd, struct block_list* bl, const char* name)
+void clif_playBGM(struct map_session_data* sd, const char* name)
{
int fd;
nullpo_retv(sd);
- nullpo_retv(bl);
fd = sd->fd;
WFIFOHEAD(fd,packet_len(0x7fe));
WFIFOW(fd,0) = 0x7fe;
safestrncpy((char*)WFIFOP(fd,2), name, NAME_LENGTH);
WFIFOSET(fd,packet_len(0x7fe));
-
- return;
}
/*==========================================
@@ -7742,7 +7625,7 @@ int clif_refresh(struct map_session_data *sd)
if( pc_issit(sd) )
clif_sitting(&sd->bl); // FIXME: just send to self, not area
if( pc_isdead(sd) ) //When you refresh, resend the death packet.
- clif_clearunit_single(sd->bl.id,1,sd->fd);
+ clif_clearunit_single(sd->bl.id,CLR_DEAD,sd->fd);
else
clif_changed_dir(&sd->bl, SELF);
@@ -7928,6 +7811,9 @@ int clif_charnameupdate (struct map_session_data *ssd)
return 0;
}
+/// Visually moves(instant) a character to x,y. The char moves even
+/// when the target cell isn't walkable. If the char is sitting it
+/// stays that way.
void clif_slide(struct block_list *bl, int x, int y)
{
unsigned char buf[10];
@@ -8014,21 +7900,58 @@ void clif_gospel_info(struct map_session_data *sd, int type)
WFIFOSET(fd, packet_len(0x215));
}
+
+/// Multi purpose mission information packet (ZC_STARSKILL).
+/// 0x20e <mapname>.24B <monster_id>.L <star>.B <result>.B
+/// result:
+/// 0 = Star Gladiator %s has designed <mapname>'s as the %s.
+/// star:
+/// 0 = Place of the Sun
+/// 1 = Place of the Moon
+/// 2 = Place of the Stars
+/// 1 = Star Gladiator %s's %s: <mapname>
+/// star:
+/// 0 = Place of the Sun
+/// 1 = Place of the Moon
+/// 2 = Place of the Stars
+/// 10 = Star Gladiator %s has designed <mapname>'s as the %s.
+/// star:
+/// 0 = Target of the Sun
+/// 1 = Target of the Moon
+/// 2 = Target of the Stars
+/// 11 = Star Gladiator %s's %s: <mapname used as monster name>
+/// star:
+/// 0 = Monster of the Sun
+/// 1 = Monster of the Moon
+/// 2 = Monster of the Stars
+/// 20 = [TaeKwon Mission] Target Monster : <mapname used as monster name> (<star>%)
+/// 21 = [Taming Mission] Target Monster : <mapname used as monster name>
+/// 22 = [Collector Rank] Target Item : <monster_id used as item id>
+/// 30 = [Sun, Moon and Stars Angel] Designed places and monsters have been reset.
+/// 40 = Target HP : <monster_id used as HP>
+void clif_starskill(struct map_session_data* sd, const char* mapname, int monster_id, unsigned char star, unsigned char result)
+{
+ int fd = sd->fd;
+
+ WFIFOHEAD(fd,packet_len(0x20e));
+ WFIFOW(fd,0) = 0x20e;
+ safestrncpy((char*)WFIFOP(fd,2), mapname, NAME_LENGTH);
+ WFIFOL(fd,26) = monster_id;
+ WFIFOB(fd,30) = star;
+ WFIFOB(fd,31) = result;
+ WFIFOSET(fd,packet_len(0x20e));
+}
+
/*==========================================
* Info about Star Glaldiator save map [Komurka]
* type: 1: Information, 0: Map registered
*------------------------------------------*/
void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsigned char type)
{
- int fd=sd->fd;
+ char mapname[MAP_NAME_LENGTH_EXT];
- WFIFOHEAD(fd,packet_len(0x20e));
- WFIFOW(fd,0) = 0x20e;
- mapindex_getmapname_ext(mapindex_id2name(sd->feel_map[feel_level].index), (char*)WFIFOP(fd,2));
- WFIFOL(fd,26) = sd->bl.id;
- WFIFOB(fd,30) = feel_level;
- WFIFOB(fd,31) = type?1:0;
- WFIFOSET(fd,packet_len(0x20e));
+ mapindex_getmapname_ext(mapindex_id2name(sd->feel_map[feel_level].index), mapname);
+ clif_starskill(sd, mapname, 0, feel_level, type ? 1 : 0);
}
/*==========================================
@@ -8037,19 +7960,18 @@ void clif_feel_info(struct map_session_data* sd, unsigned char feel_level, unsig
*------------------------------------------*/
void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type)
{
- int fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0x20e));
- WFIFOW(fd,0)=0x20e;
- if (pcdb_checkid(class_))
- strncpy((char*)WFIFOP(fd,2),job_name(class_), NAME_LENGTH);
- else if (mobdb_checkid(class_))
- strncpy((char*)WFIFOP(fd,2),mob_db(class_)->jname, NAME_LENGTH);
- else //Really shouldn't happen...
- memset(WFIFOP(fd,2), 0, NAME_LENGTH);
- WFIFOL(fd,26)=sd->bl.id;
- WFIFOB(fd,30)=hate_level;
- WFIFOB(fd,31)=type?10:11; //Register/Info
- WFIFOSET(fd, packet_len(0x20e));
+ if( pcdb_checkid(class_) )
+ {
+ clif_starskill(sd, job_name(class_), class_, hate_level, type ? 10 : 11);
+ }
+ else if( mobdb_checkid(class_) )
+ {
+ clif_starskill(sd, mob_db(class_)->jname, class_, hate_level, type ? 10 : 11);
+ }
+ else
+ {
+ ShowWarning("clif_hate_info: Received invalid class %d for this packet (char_id=%d, hate_level=%u, type=%u).\n", class_, sd->status.char_id, (unsigned int)hate_level, (unsigned int)type);
+ }
}
/*==========================================
@@ -8057,14 +7979,7 @@ void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int cl
*------------------------------------------*/
void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress)
{
- int fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0x20e));
- WFIFOW(fd,0)=0x20e;
- strncpy((char*)WFIFOP(fd,2),mob_db(mob_id)->jname, NAME_LENGTH);
- WFIFOL(fd,26)=mob_id;
- WFIFOB(fd,30)=progress; //Message to display
- WFIFOB(fd,31)=20;
- WFIFOSET(fd, packet_len(0x20e));
+ clif_starskill(sd, mob_db(mob_id)->jname, mob_id, progress, 20);
}
/*==========================================
@@ -8072,14 +7987,7 @@ void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char pr
*------------------------------------------*/
void clif_feel_hate_reset(struct map_session_data *sd)
{
- int fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0x20e));
- WFIFOW(fd,0)=0x20e;
- memset(WFIFOP(fd,2), 0, NAME_LENGTH); //Blank name as all was reset.
- WFIFOL(fd,26)=sd->bl.id;
- WFIFOB(fd,30)=0; //Feel/hate level: irrelevant
- WFIFOB(fd,31)=30;
- WFIFOSET(fd, packet_len(0x20e));
+ clif_starskill(sd, "", 0, 0, 30);
}
/*==========================================
@@ -8175,12 +8083,9 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
WFIFOSET(fd, WFIFOW(fd, 2));
}
-/*==========================================
- * View player equip request denied
- * R 0291 <message>.W
- * TODO: this looks like a general-purpose packet to print msgstringtable entries.
- *------------------------------------------*/
-void clif_viewequip_fail(struct map_session_data* sd)
+/// Display msgstringtable.txt string (ZC_MSG)
+/// R 0291 <message>.W
+void clif_msg(struct map_session_data* sd, unsigned short id)
{
int fd;
nullpo_retv(sd);
@@ -8188,10 +8093,16 @@ void clif_viewequip_fail(struct map_session_data* sd)
WFIFOHEAD(fd, packet_len(0x291));
WFIFOW(fd, 0) = 0x291;
- WFIFOW(fd, 2) = 0x54d; // This controls which message is displayed. 0x54d is the correct one. Maybe it's used for something else too?
+ WFIFOW(fd, 2) = id; // zero-based msgstringtable.txt index
WFIFOSET(fd, packet_len(0x291));
}
+/// View player equip request denied
+void clif_viewequip_fail(struct map_session_data* sd)
+{
+ clif_msg(sd, 0x54d);
+}
+
/// Validates one global/guild/party/whisper message packet and tries to recognize its components.
/// Returns true if the packet was parsed successfully.
/// Formats: 0 - <packet id>.w <packet len>.w (<name> : <message>).?B 00
@@ -8329,6 +8240,10 @@ static int clif_guess_PacketVer(int fd, int get_previous, int *error)
err = n;\
//define SET_ERROR
+ // FIXME: If the packet is not received at once, this will FAIL.
+ // Figure out, when it happens, that only part of the packet is
+ // received, or fix the function to be able to deal with that
+ // case.
#define CHECK_PACKET_VER() \
if( cmd != clif_config.connect_cmd[packet_ver] || packet_len != packet_db[packet_ver][cmd].len )\
;/* not wanttoconnection or wrong length */\
@@ -8561,20 +8476,22 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange)
map_foreachinarea(clif_getareachar, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_ALL, sd);
- //TODO: merge it with the code below
- if (battle_config.pet_no_gvg && map_flag_gvg(sd->bl.m) && sd->pd)
- { //Return the pet to egg. [Skotlex]
- clif_displaymessage(sd->fd, "Pets are not allowed in Guild Wars.");
- pet_menu(sd, 3); //Option 3 is return to egg.
- }
-
// pet
- if(sd->pd) {
- map_addblock(&sd->pd->bl);
- clif_spawn(&sd->pd->bl);
- clif_send_petdata(sd,sd->pd,0,0);
- clif_send_petstatus(sd);
-// skill_unit_move(&sd->pd->bl,gettick(),1);
+ if( sd->pd )
+ {
+ if( battle_config.pet_no_gvg && map_flag_gvg(sd->bl.m) )
+ { //Return the pet to egg. [Skotlex]
+ clif_displaymessage(sd->fd, "Pets are not allowed in Guild Wars.");
+ pet_menu(sd, 3); //Option 3 is return to egg.
+ }
+ else
+ {
+ map_addblock(&sd->pd->bl);
+ clif_spawn(&sd->pd->bl);
+ clif_send_petdata(sd,sd->pd,0,0);
+ clif_send_petstatus(sd);
+// skill_unit_move(&sd->pd->bl,gettick(),1);
+ }
}
//homunculus [blackhole89]
@@ -8605,7 +8522,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
sd->state.connect_new = 0;
clif_skillinfoblock(sd);
clif_hotkeys_send(sd);
+ clif_updatestatus(sd,SP_BASEEXP);
clif_updatestatus(sd,SP_NEXTBASEEXP);
+ clif_updatestatus(sd,SP_JOBEXP);
clif_updatestatus(sd,SP_NEXTJOBEXP);
clif_updatestatus(sd,SP_SKILLPOINT);
clif_initialstatus(sd);
@@ -8720,7 +8639,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// If player is dead, and is spawned (such as @refresh) send death packet. [Valaris]
if(pc_isdead(sd))
- clif_clearunit_area(&sd->bl, 1);
+ clif_clearunit_area(&sd->bl, CLR_DEAD);
// Uncomment if you want to make player face in the same direction he was facing right before warping. [Skotlex]
// else
// clif_changed_dir(&sd->bl, SELF);
@@ -8821,7 +8740,7 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
int cmd;
if (pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl, 1);
+ clif_clearunit_area(&sd->bl, CLR_DEAD);
return;
}
@@ -8940,6 +8859,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
WFIFOW(fd,2) = 8 + textlen;
WFIFOL(fd,4) = sd->bl.id;
safestrncpy((char*)WFIFOP(fd,8), text, textlen);
+ //FIXME: chat has range of 9 only
clif_send(WFIFOP(fd,0), WFIFOW(fd,2), &sd->bl, sd->chatID ? CHAT_WOS : AREA_CHAT_WOC);
// send back message to the speaker
@@ -9063,10 +8983,10 @@ void clif_parse_ChangeDir(int fd, struct map_session_data *sd)
*------------------------------------------*/
void clif_parse_Emotion(int fd, struct map_session_data *sd)
{
- unsigned char buf[64];
+ int emoticon = RFIFOB(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
- if (RFIFOB(fd,2) == 34) {// prevent use of the mute emote [Valaris]
+ if (emoticon == E_MUTE) {// prevent use of the mute emote [Valaris]
clif_skill_fail(sd, 1, 0, 1);
return;
}
@@ -9077,11 +8997,13 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd)
return;
}
sd->emotionlasttime = time(NULL) + 1; // not more than 1 per second (using /commands the client can spam it)
-
- WBUFW(buf,0) = 0xc0;
- WBUFL(buf,2) = sd->bl.id;
- WBUFB(buf,6) = RFIFOB(fd,2);
- clif_send(buf, packet_len(0xc0), &sd->bl, AREA);
+
+ if(battle_config.client_reshuffle_dice && emoticon>=E_DICE1 && emoticon<=E_DICE6)
+ {// re-roll dice
+ emoticon = rand()%6+E_DICE1;
+ }
+
+ clif_emotion(&sd->bl, emoticon);
} else
clif_skill_fail(sd, 1, 0, 1);
}
@@ -9100,7 +9022,7 @@ void clif_parse_HowManyConnections(int fd, struct map_session_data *sd)
void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick)
{
if (pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl, 1);
+ clif_clearunit_area(&sd->bl, CLR_DEAD);
return;
}
@@ -9198,7 +9120,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd)
{
switch(RFIFOB(fd,2)) {
case 0x00:
- pc_respawn(sd,2);
+ pc_respawn(sd,CLR_RESPAWN);
break;
case 0x01:
/* Rovert's Prevent logout option - Fixed [Valaris] */
@@ -9219,7 +9141,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd)
/*==========================================
* Validates and processes whispered messages
- * S 0096 <packet len>.w <nick>.23B 00 <message>.?B
+ * S 0096 <packet len>.w <nick>.24B <message>.?B
*------------------------------------------*/
void clif_parse_WisMessage(int fd, struct map_session_data* sd)
{
@@ -9416,7 +9338,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd)
do {
if (pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl, 1);
+ clif_clearunit_area(&sd->bl, CLR_DEAD);
break;
}
@@ -9451,7 +9373,8 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
{
int item_index = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0])-2;
int item_amount = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[1]);
- do {
+
+ for(;;) {
if (pc_isdead(sd))
break;
@@ -9469,7 +9392,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
break;
return;
- } while (0);
+ }
//Because the client does not like being ignored.
clif_dropitem(sd, item_index,0);
@@ -9483,7 +9406,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd)
int n;
if (pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl, 1);
+ clif_clearunit_area(&sd->bl, CLR_DEAD);
return;
}
@@ -9516,7 +9439,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
int index;
if(pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl,1);
+ clif_clearunit_area(&sd->bl,CLR_DEAD);
return;
}
index = RFIFOW(fd,2)-2;
@@ -9559,7 +9482,7 @@ void clif_parse_UnequipItem(int fd,struct map_session_data *sd)
int index;
if(pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl,1);
+ clif_clearunit_area(&sd->bl,CLR_DEAD);
return;
}
@@ -9581,7 +9504,7 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
struct block_list *bl;
if(pc_isdead(sd)) {
- clif_clearunit_area(&sd->bl,1);
+ clif_clearunit_area(&sd->bl,CLR_DEAD);
return;
}
@@ -9592,8 +9515,6 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd)
if (!bl) return;
switch (bl->type) {
case BL_MOB:
- clif_parse_ActionRequest_sub(sd, 0x07, bl->id, gettick());
- break;
case BL_PC:
clif_parse_ActionRequest_sub(sd, 0x07, bl->id, gettick());
break;
@@ -10260,6 +10181,11 @@ void clif_parse_Cooking(int fd,struct map_session_data *sd)
//int type = RFIFOW(fd,2); // '1' for cooking, but what do other values mean?
int nameid = RFIFOW(fd,4);
+ if( sd->menuskill_id != AM_PHARMACY )
+ {
+ return;
+ }
+
if (pc_istrading(sd)) {
//Make it fail to avoid shop exploits where you sell something different than you see.
clif_skill_fail(sd,sd->ud.skillid,0,0);
@@ -10379,9 +10305,15 @@ void clif_parse_NpcCloseClicked(int fd,struct map_session_data *sd)
*------------------------------------------*/
void clif_parse_ItemIdentify(int fd,struct map_session_data *sd)
{
+ short idx = RFIFOW(fd,2);
+
if (sd->menuskill_id != MC_IDENTIFY)
return;
- skill_identify(sd,RFIFOW(fd,2)-2);
+ if( idx == -1 )
+ {// cancel pressed
+ return;
+ }
+ skill_identify(sd,idx-2);
sd->menuskill_val = sd->menuskill_id = 0;
}
/*==========================================
@@ -10585,7 +10517,7 @@ void clif_parse_StoragePassword(int fd, struct map_session_data *sd)
/*==========================================
* Party creation request
* S 00f9 <party name>.24S
- * S 01e8 <party name>.24S <item1>.B <item2>.B
+ * S 01e8 <party name>.24S <share flag>.B <share type>.B
*------------------------------------------*/
void clif_parse_CreateParty(int fd, struct map_session_data *sd)
{
@@ -10796,10 +10728,10 @@ void clif_parse_PartyBookingRegisterReq(int fd, struct map_session_data* sd)
{
short level = RFIFOW(fd,2);
short mapid = RFIFOW(fd,4);
- short job[6];
+ short job[PARTY_BOOKING_JOBS];
int i;
- for(i=0; i<6; i++)
+ for(i=0; i<PARTY_BOOKING_JOBS; i++)
job[i] = RFIFOB(fd,6+i*2);
party_booking_register(sd, level, mapid, job);
@@ -10832,7 +10764,7 @@ void clif_parse_PartyBookingSearchReq(int fd, struct map_session_data* sd)
/*==========================================
* more_result: 0 - no more, 1 - more
*------------------------------------------*/
-void clif_PartyBookingSearchAck(int fd, unsigned long *index, int count, bool more_result)
+void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result)
{
int i, j;
int size = sizeof(struct party_booking_ad_info); // structure size (48)
@@ -10840,17 +10772,16 @@ void clif_PartyBookingSearchAck(int fd, unsigned long *index, int count, bool mo
WFIFOHEAD(fd,size*count + 5);
WFIFOW(fd,0) = 0x805;
WFIFOW(fd,2) = size*count + 5;
- WFIFOB(fd,4) = (bool)more_result;
+ WFIFOB(fd,4) = more_result;
for(i=0; i<count; i++)
{
- pb_ad = party_booking_getdata(index[i]);
- if(pb_ad == NULL) return;
+ pb_ad = results[i];
WFIFOL(fd,i*size+5) = pb_ad->index;
memcpy(WFIFOP(fd,i*size+9),pb_ad->charname,NAME_LENGTH);
WFIFOL(fd,i*size+33) = pb_ad->starttime;
WFIFOW(fd,i*size+37) = pb_ad->p_detail.level;
WFIFOW(fd,i*size+39) = pb_ad->p_detail.mapid;
- for(j=0; j<6; j++)
+ for(j=0; j<PARTY_BOOKING_JOBS; j++)
WFIFOW(fd,i*size+41+j*2) = pb_ad->p_detail.job[j];
}
WFIFOSET(fd,WFIFOW(fd,2));
@@ -10858,7 +10789,7 @@ void clif_PartyBookingSearchAck(int fd, unsigned long *index, int count, bool mo
void clif_parse_PartyBookingDeleteReq(int fd, struct map_session_data* sd)
{
- if(party_booking_delete(sd, false))
+ if(party_booking_delete(sd))
clif_PartyBookingDeleteAck(sd, 0);
}
@@ -10877,10 +10808,10 @@ void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag)
void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
{
- short job[6];
+ short job[PARTY_BOOKING_JOBS];
int i;
- for(i=0; i<6; i++)
+ for(i=0; i<PARTY_BOOKING_JOBS; i++)
job[i] = RFIFOW(fd,2+i*2);
party_booking_update(sd, job);
@@ -10889,32 +10820,32 @@ void clif_parse_PartyBookingUpdateReq(int fd, struct map_session_data* sd)
void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
int i;
+ uint8 buf[38+PARTY_BOOKING_JOBS*2];
if(pb_ad == NULL) return;
- WFIFOHEAD(sd->fd,packet_len(0x809));
- WFIFOW(sd->fd,0) = 0x809;
- WFIFOL(sd->fd,2) = pb_ad->index;
- memcpy(WFIFOP(sd->fd,6),pb_ad->charname,NAME_LENGTH);
- WFIFOL(sd->fd,30) = pb_ad->starttime;
- WFIFOW(sd->fd,34) = pb_ad->p_detail.level;
- WFIFOW(sd->fd,36) = pb_ad->p_detail.mapid;
- for(i=0; i<6; i++)
- WFIFOW(sd->fd,38+i*2) = pb_ad->p_detail.job[i];
+ WBUFW(buf,0) = 0x809;
+ WBUFL(buf,2) = pb_ad->index;
+ memcpy(WBUFP(buf,6),pb_ad->charname,NAME_LENGTH);
+ WBUFL(buf,30) = pb_ad->starttime;
+ WBUFW(buf,34) = pb_ad->p_detail.level;
+ WBUFW(buf,36) = pb_ad->p_detail.mapid;
+ for(i=0; i<PARTY_BOOKING_JOBS; i++)
+ WBUFW(buf,38+i*2) = pb_ad->p_detail.job[i];
- WFIFOSET(sd->fd,packet_len(0x809));
+ clif_send(buf, packet_len(0x809), &sd->bl, ALL_CLIENT);
}
void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad)
{
int i;
- uint8 buf[18];
+ uint8 buf[6+PARTY_BOOKING_JOBS*2];
if(pb_ad == NULL) return;
WBUFW(buf,0) = 0x80a;
WBUFL(buf,2) = pb_ad->index;
- for(i=0; i<6; i++)
+ for(i=0; i<PARTY_BOOKING_JOBS; i++)
WBUFW(buf,6+i*2) = pb_ad->p_detail.job[i];
clif_send(buf,packet_len(0x80a),&sd->bl,ALL_CLIENT); // Now UPDATE all client.
}
@@ -10941,10 +10872,11 @@ void clif_parse_CloseVending(int fd, struct map_session_data* sd)
*------------------------------------------*/
void clif_parse_VendingListReq(int fd, struct map_session_data* sd)
{
- vending_vendinglistreq(sd,RFIFOL(fd,2));
-
if( sd->npc_id )
- npc_event_dequeue(sd);
+ {// using an NPC
+ return;
+ }
+ vending_vendinglistreq(sd,RFIFOL(fd,2));
}
/*==========================================
@@ -11075,6 +11007,7 @@ void clif_parse_GuildChangePositionInfo(int fd, struct map_session_data *sd)
/*==========================================
* MhoEύX
+ * S 0155 <packet len>.W {<account id>.L <char id>.L <idx>.L}
*------------------------------------------*/
void clif_parse_GuildChangeMemberPosition(int fd, struct map_session_data *sd)
{
@@ -11103,6 +11036,7 @@ void clif_parse_GuildRequestEmblem(int fd,struct map_session_data *sd)
/*==========================================
* MhGuύX
+ * S 0153 <packet len>.W <emblem data>.?B
*------------------------------------------*/
void clif_parse_GuildChangeEmblem(int fd,struct map_session_data *sd)
{
@@ -11128,7 +11062,7 @@ void clif_parse_GuildChangeNotice(int fd, struct map_session_data* sd)
// compensate for some client defects when using multilanguage mode
if (msg1[0] == '|' && msg1[3] == '|') msg1+= 3; // skip duplicate marker
if (msg2[0] == '|' && msg2[3] == '|') msg2+= 3; // skip duplicate marker
- if (msg2[0] == '|') msg2[strnlen(msg2, 120)-1] = '\0'; // delete extra space at the end of string
+ if (msg2[0] == '|') msg2[strnlen(msg2, MAX_GUILDMES2)-1] = '\0'; // delete extra space at the end of string
guild_change_notice(sd, guild_id, msg1, msg2);
}
@@ -11186,7 +11120,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd)
/*==========================================
* Request to expel a member of a guild
- * S 015b <guild_id>.L <account_id>.L <char_id>.L <reason>.39B 00
+ * S 015b <guild_id>.L <account_id>.L <char_id>.L <reason>.40B
*------------------------------------------*/
void clif_parse_GuildExpulsion(int fd,struct map_session_data *sd)
{
@@ -11458,10 +11392,11 @@ void clif_parse_GMKickAll(int fd, struct map_session_data* sd)
}
/*==========================================
- * /shift <name>
+ * /remove <account name>
+ * /shift <char name>
*------------------------------------------*/
void clif_parse_GMShift(int fd, struct map_session_data *sd)
-{
+{// FIXME: remove is supposed to receive account name for clients prior 20100803RE
char *player_name;
int lv;
@@ -11480,11 +11415,47 @@ void clif_parse_GMShift(int fd, struct map_session_data *sd)
}
}
+
+/// Warps oneself to the location of the character given by account id ( /remove <account id> ).
+/// R 0843 <account id>.L
+void clif_parse_GMRemove2(int fd, struct map_session_data* sd)
+{
+ int account_id, lv;
+ struct map_session_data* pl_sd;
+
+ if( battle_config.atc_gmonly && !pc_isGM(sd) )
+ {
+ return;
+ }
+
+ if( pc_isGM(sd) < ( lv = get_atcommand_level(atcommand_jumpto) ) )
+ {
+ return;
+ }
+
+ account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+ if( ( pl_sd = map_id2sd(account_id) ) != NULL && pc_isGM(sd) >= pc_isGM(pl_sd) )
+ {
+ pc_warpto(sd, pl_sd);
+ }
+
+ if( log_config.gm && lv >= log_config.gm )
+ {
+ char message[32];
+
+ sprintf(message, "/remove %d", account_id);
+ log_atcommand(sd, message);
+ }
+}
+
+
/*==========================================
- * /recall <name>
+ * /recall <account name>
+ * /summon <char name>
*------------------------------------------*/
void clif_parse_GMRecall(int fd, struct map_session_data *sd)
-{
+{// FIXME: recall is supposed to receive account name for clients prior 20100803RE
char *player_name;
int lv;
@@ -11504,8 +11475,44 @@ void clif_parse_GMRecall(int fd, struct map_session_data *sd)
}
}
+
+/// Summons a character given by account id to one's own position ( /recall <account id> )
+/// R 0842 <account id>.L
+void clif_parse_GMRecall2(int fd, struct map_session_data* sd)
+{
+ int account_id, lv;
+ struct map_session_data* pl_sd;
+
+ if( battle_config.atc_gmonly && !pc_isGM(sd) )
+ {
+ return;
+ }
+
+ if( pc_isGM(sd) < ( lv = get_atcommand_level(atcommand_recall) ) )
+ {
+ return;
+ }
+
+ account_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
+
+ if( ( pl_sd = map_id2sd(account_id) ) != NULL && pc_isGM(sd) >= pc_isGM(pl_sd) )
+ {
+ pc_recall(sd, pl_sd);
+ }
+
+ if( log_config.gm && lv >= log_config.gm )
+ {
+ char message[32];
+
+ sprintf(message, "/recall %d", account_id);
+ log_atcommand(sd, message);
+ }
+}
+
+
/*==========================================
* /monster /item
+ * R 01F3 <name>.24B
*------------------------------------------*/
void clif_parse_GM_Monster_Item(int fd, struct map_session_data *sd)
{
@@ -11663,11 +11670,11 @@ void clif_parse_GMReqAccountName(int fd, struct map_session_data *sd)
/*==========================================
* GM single cell type change request
- * /changemaptype <x> <y> <type>
+ * /changemaptype <x> <y> <type:0-1>
* S 0198 <x>.W <y>.W <gat>.W
*------------------------------------------*/
void clif_parse_GMChangeMapType(int fd, struct map_session_data *sd)
-{
+{// FIXME: type sent by client is 0 or 1 (even if you enter 2+); that suggests, that it is walkable gat attribute
int x,y,type;
if( battle_config.atc_gmonly && !pc_isGM(sd) )
@@ -12107,6 +12114,7 @@ void clif_parse_PVPInfo(int fd,struct map_session_data *sd)
/*==========================================
* /blacksmith
+ * S 0217
*------------------------------------------*/
void clif_parse_Blacksmith(int fd,struct map_session_data *sd)
{
@@ -12150,6 +12158,7 @@ int clif_fame_blacksmith(struct map_session_data *sd, int points)
/*==========================================
* /alchemist
+ * S 0218
*------------------------------------------*/
void clif_parse_Alchemist(int fd,struct map_session_data *sd)
{
@@ -12193,6 +12202,7 @@ int clif_fame_alchemist(struct map_session_data *sd, int points)
/*==========================================
* /taekwon
+ * S 0225
*------------------------------------------*/
void clif_parse_Taekwon(int fd,struct map_session_data *sd)
{
@@ -12234,7 +12244,8 @@ int clif_fame_taekwon(struct map_session_data *sd, int points)
}
/*==========================================
- * PK Ranking table?
+ * /pk
+ * S 0237
*------------------------------------------*/
void clif_parse_RankingPk(int fd,struct map_session_data *sd)
{
@@ -12259,7 +12270,7 @@ void clif_parse_FeelSaveOk(int fd,struct map_session_data *sd)
if (sd->menuskill_id != SG_FEEL)
return;
i = sd->menuskill_val-1;
- if (i<0 || i > 2) return; //Bug?
+ if (i<0 || i >= MAX_PC_FEELHATE) return; //Bug?
sd->feel_map[i].index = map_id2index(sd->bl.m);
sd->feel_map[i].m = sd->bl.m;
@@ -12738,9 +12749,10 @@ void clif_parse_Mail_setattach(int fd, struct map_session_data *sd)
/*------------------------------------------
* Mail Window Operation
+ * S 0246 <flag>.W
* 0 : Switch to 'new mail' window, or Close mailbox
* 1 : ???
- * 2 : ???
+ * 2 : Zeny entering start
*------------------------------------------*/
void clif_parse_Mail_winopen(int fd, struct map_session_data *sd)
{
@@ -13592,12 +13604,9 @@ void clif_parse_mercenary_action(int fd, struct map_session_data* sd)
* 2 = Your mercenary soldier has been fired.
* 3 = Your mercenary soldier has ran away.
*------------------------------------------*/
-void clif_mercenary_message(int fd, int message)
+void clif_mercenary_message(struct map_session_data* sd, int message)
{
- WFIFOHEAD(fd,4);
- WFIFOW(fd,0) = 0x0291;
- WFIFOW(fd,2) = 1266 + message;
- WFIFOSET(fd,4);
+ clif_msg(sd, 1266 + message);
}
/*------------------------------------------
@@ -13959,6 +13968,23 @@ void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, b
return;
}
+/// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT).
+/// type:
+/// 0: Displays 'value' for 5 seconds.
+/// 1: Incremental counter (1 tick/second), negated 'value' specifies start value (e.g. using -10 lets the counter start at 10).
+/// 2: Decremental counter (1 tick/second), negated 'value' specifies start value (does not stop when reaching 0, but overflows).
+/// 3: Decremental counter (2 ticks/second), 'value' specifies start value (stops when reaching 0, displays at most 2 digits).
+/// value:
+/// Except for type 3 it is interpreted as seconds for displaying as DD:HH:MM:SS, HH:MM:SS, MM:SS or SS (leftmost '00' is not displayed).
+void clif_showdigit(struct map_session_data* sd, unsigned char type, int value)
+{
+ WFIFOHEAD(sd->fd, packet_len(0x1b1));
+ WFIFOW(sd->fd,0) = 0x1b1;
+ WFIFOB(sd->fd,0) = type;
+ WFIFOL(sd->fd,0) = value;
+ WFIFOSET(sd->fd, packet_len(0x1b1));
+}
+
/*==========================================
* pPbgfobO
*------------------------------------------*/
@@ -13987,10 +14013,10 @@ int clif_parse(int fd)
TBL_PC* sd;
int pnum;
- //TODO apply deplays or disconnect based on packet throughput [FlavioJS]
+ //TODO apply delays or disconnect based on packet throughput [FlavioJS]
// Note: "click masters" can do 80+ clicks in 10 seconds
- for( pnum = 0; pnum < 3; ++pnum )// Limit max packets per cycle to 3 (delay packet spammers) [FlavioJS]
+ for( pnum = 0; pnum < 3; ++pnum )// Limit max packets per cycle to 3 (delay packet spammers) [FlavioJS] -- This actually aids packet spammers, but stuff like /str+ gets slow without it [Ai4rei]
{ // begin main client packet processing loop
sd = (TBL_PC *)session[fd]->session_data;
@@ -14491,6 +14517,8 @@ static int packetdb_readdb(void)
{clif_parse_GMShift,"shift"},
{clif_parse_GMChangeMapType,"changemaptype"},
{clif_parse_GMRc,"rc"},
+ {clif_parse_GMRecall2,"recall2"},
+ {clif_parse_GMRemove2,"remove2"},
{clif_parse_NoviceDoriDori,"sndoridori"},
{clif_parse_NoviceExplosionSpirits,"snexplosionspirits"},
diff --git a/src/map/clif.h b/src/map/clif.h
index d3a3679f1..ded8ece30 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -78,6 +78,101 @@ typedef enum send_target {
BG_AREA_WOS,
} send_target;
+typedef enum emotion_type
+{
+ E_GASP = 0, // /!
+ E_WHAT, // /?
+ E_HO,
+ E_LV,
+ E_SWT,
+ E_IC,
+ E_AN,
+ E_AG,
+ E_CASH, // /$
+ E_DOTS, // /...
+ E_SCISSORS, // /gawi --- 10
+ E_ROCK, // /bawi
+ E_PAPER, // /bo
+ E_KOREA,
+ E_LV2,
+ E_THX,
+ E_WAH,
+ E_SRY,
+ E_HEH,
+ E_SWT2,
+ E_HMM, // --- 20
+ E_NO1,
+ E_NO, // /??
+ E_OMG,
+ E_OH,
+ E_X,
+ E_HLP,
+ E_GO,
+ E_SOB,
+ E_GG,
+ E_KIS, // --- 30
+ E_KIS2,
+ E_PIF,
+ E_OK,
+ E_MUTE, // red /... used for muted characters
+ E_INDONESIA,
+ E_BZZ, // /bzz, /stare
+ E_RICE,
+ E_AWSM, // /awsm, /cool
+ E_MEH,
+ E_SHY, // --- 40
+ E_PAT, // /pat, /goodboy
+ E_MP, // /mp, /sptime
+ E_SLUR,
+ E_COM, // /com, /comeon
+ E_YAWN, // /yawn, /sleepy
+ E_GRAT, // /grat, /congrats
+ E_HP, // /hp, /hptime
+ E_PHILIPPINES,
+ E_MALAYSIA,
+ E_SINGAPORE, // --- 50
+ E_BRAZIL,
+ E_FLASH, // /fsh
+ E_SPIN, // /spin
+ E_SIGH,
+ E_PROUD, // /dum
+ E_LOUD, // /crwd
+ E_OHNOES, // /desp, /otl
+ E_DICE1,
+ E_DICE2,
+ E_DICE3, // --- 60
+ E_DICE4,
+ E_DICE5,
+ E_DICE6,
+ E_INDIA,
+ E_LOOSER,
+ E_RUSSIA,
+ E_VIRGIN,
+ E_PHONE,
+ E_MAIL,
+ E_CHINESE, // --- 70
+ E_SIGNAL,
+ E_SIGNAL2,
+ E_SIGNAL3,
+ E_HUM,
+ E_ABS,
+ E_OOPS,
+ E_SPIT,
+ E_ENE,
+ E_PANIC,
+ E_WHISP, // --- 80
+ //
+ E_MAX
+} emotion_type;
+
+typedef enum clr_type
+{
+ CLR_OUTSIGHT = 0,
+ CLR_DEAD,
+ CLR_RESPAWN,
+ CLR_TELEPORT,
+} clr_type;
+
int clif_setip(const char* ip);
void clif_setbindip(const char* ip);
void clif_setport(uint16 port);
@@ -92,8 +187,8 @@ int clif_charselectok(int);
int clif_dropflooritem(struct flooritem_data *);
int clif_clearflooritem(struct flooritem_data *,int);
-int clif_clearunit_single(int id, uint8 type, int fd);
-int clif_clearunit_area(struct block_list* bl, uint8 type);
+int clif_clearunit_single(int id, clr_type type, int fd);
+int clif_clearunit_area(struct block_list* bl, clr_type type);
int clif_clearunit_delayed(struct block_list* bl, unsigned int tick);
int clif_spawn(struct block_list*); //area
int clif_walkok(struct map_session_data*); // self
@@ -133,14 +228,13 @@ int clif_statusupack(struct map_session_data *,int,int,int); // self
int clif_equipitemack(struct map_session_data *,int,int,int); // self
int clif_unequipitemack(struct map_session_data *,int,int,int); // self
int clif_misceffect(struct block_list*,int); // area
-int clif_misceffect2(struct block_list *bl,int type);
int clif_changeoption(struct block_list*); // area
int clif_changeoption2(struct block_list*); // area
int clif_useitemack(struct map_session_data*,int,int,int); // self
void clif_GlobalMessage(struct block_list* bl, const char* message);
-void clif_createchat(struct map_session_data* sd, int fail); // self
+void clif_createchat(struct map_session_data* sd, int flag); // self
int clif_dispchat(struct chat_data*,int); // area or fd
-int clif_joinchatfail(struct map_session_data*,int); // self
+int clif_joinchatfail(struct map_session_data* sd,int flag); // self
int clif_joinchatok(struct map_session_data*,struct chat_data*); // self
int clif_addchat(struct chat_data*,struct map_session_data*); // chat
void clif_changechatowner(struct chat_data* cd, struct map_session_data* sd); // chat
@@ -158,7 +252,7 @@ void clif_talkiebox(struct block_list* bl, const char* talkie);
void clif_wedding_effect(struct block_list *bl);
void clif_divorced(struct map_session_data* sd, const char* name);
void clif_callpartner(struct map_session_data *sd);
-void clif_playBGM(struct map_session_data* sd, struct block_list* bl, const char* name);
+void clif_playBGM(struct map_session_data* sd, const char* name);
void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type);
int clif_soundeffectall(struct block_list* bl, const char *name, int type, enum send_target coverage);
void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, unsigned int tick);
@@ -176,14 +270,12 @@ void clif_tradecompleted(struct map_session_data* sd, int fail);
// storage
#include "storage.h"
-void clif_storagelist(struct map_session_data* sd, struct storage_data* stor);
+void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length);
void clif_updatestorageamount(struct map_session_data* sd, int amount);
void clif_storageitemadded(struct map_session_data* sd, struct item* i, int index, int amount);
void clif_storageitemremoved(struct map_session_data* sd, int index, int amount);
void clif_storageclose(struct map_session_data* sd);
-void clif_guildstoragelist(struct map_session_data* sd, struct guild_storage* stor);
void clif_updateguildstorageamount(struct map_session_data* sd, int amount);
-void clif_guildstorageitemadded(struct map_session_data* sd, struct item* i, int index, int amount);
int clif_insight(struct block_list *,va_list); // map_forallinmovearea callback
int clif_outsight(struct block_list *,va_list); // map_forallinmovearea callback
@@ -218,7 +310,7 @@ int clif_produceeffect(struct map_session_data* sd,int flag,int nameid);
void clif_skill_setunit(struct skill_unit *unit);
void clif_skill_delunit(struct skill_unit *unit);
-void clif_01ac(struct block_list* bl);
+void clif_skillunit_update(struct block_list* bl);
int clif_autospell(struct map_session_data *sd,int skilllv);
void clif_devotion(struct block_list *src, struct map_session_data *tsd);
@@ -390,6 +482,7 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
int clif_party_xy_remove(struct map_session_data *sd); //Fix for minimap [Kevin]
void clif_gospel_info(struct map_session_data *sd, int type);
void clif_parse_ReqFeel(int fd, struct map_session_data *sd, int skilllv);
+void clif_starskill(struct map_session_data* sd, const char* mapname, int monster_id, unsigned char star, unsigned char result);
void clif_feel_info(struct map_session_data *sd, unsigned char feel_level, unsigned char type);
void clif_hate_info(struct map_session_data *sd, unsigned char hate_level,int class_, unsigned char type);
void clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char progress);
@@ -409,6 +502,8 @@ void clif_viewequip_ack(struct map_session_data* sd, struct map_session_data* ts
void clif_viewequip_fail(struct map_session_data* sd);
void clif_equipcheckbox(struct map_session_data* sd);
+void clif_msg(struct map_session_data* sd, unsigned short id);
+
//quest system [Kevin] [Inkfish]
void clif_quest_send_list(struct map_session_data * sd);
void clif_quest_send_mission(struct map_session_data * sd);
@@ -450,7 +545,7 @@ void clif_Adopt_reply(struct map_session_data *sd, int type);
// MERCENARIES
void clif_mercenary_info(struct map_session_data *sd);
void clif_mercenary_skillblock(struct map_session_data *sd);
-void clif_mercenary_message(int fd, int message);
+void clif_mercenary_message(struct map_session_data* sd, int message);
void clif_mercenary_updatestatus(struct map_session_data *sd, int type);
// RENTAL SYSTEM
@@ -469,9 +564,11 @@ void clif_progressbar_abort(struct map_session_data * sd);
void clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag);
void clif_PartyBookingDeleteAck(struct map_session_data* sd, int flag);
-void clif_PartyBookingSearchAck(int fd, unsigned long *index, int count, bool more_result);
+void clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info** results, int count, bool more_result);
void clif_PartyBookingUpdateNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
void clif_PartyBookingDeleteNotify(struct map_session_data* sd, int index);
void clif_PartyBookingInsertNotify(struct map_session_data* sd, struct party_booking_ad_info* pb_ad);
+void clif_showdigit(struct map_session_data* sd, unsigned char type, int value);
+
#endif /* _CLIF_H_ */
diff --git a/src/map/guild.c b/src/map/guild.c
index cdc978929..f90fc8946 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1068,8 +1068,8 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
if(g==NULL)
return 0;
- memcpy(g->mes1,mes1,60);
- memcpy(g->mes2,mes2,120);
+ memcpy(g->mes1,mes1,MAX_GUILDMES1);
+ memcpy(g->mes2,mes2,MAX_GUILDMES2);
for(i=0;i<g->max_member;i++){
if((sd=g->member[i].sd)!=NULL)
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 97a3274fb..0fbd7cbff 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -68,7 +68,7 @@ int merc_hom_dead(struct homun_data *hd, struct block_list *src)
//There's no intimacy penalties on death (from Tharis)
struct map_session_data *sd = hd->master;
- clif_emotion(&hd->bl, 16) ; //wah
+ clif_emotion(&hd->bl, E_WAH);
//Delete timers when dead.
merc_hom_hungry_timer_delete(hd);
@@ -77,7 +77,7 @@ int merc_hom_dead(struct homun_data *hd, struct block_list *src)
if (!sd) //unit remove map will invoke unit free
return 3;
- clif_emotion(&sd->bl, 28) ; //sob
+ clif_emotion(&sd->bl, E_SOB);
//Remove from map (if it has no intimacy, it is auto-removed from memory)
return 3;
}
@@ -107,7 +107,7 @@ int merc_hom_vaporize(struct map_session_data *sd, int flag)
memset(hd->blockskill, 0, sizeof(hd->blockskill));
clif_hominfo(sd, sd->hd, 0);
merc_save(hd);
- return unit_remove_map(&hd->bl, 0);
+ return unit_remove_map(&hd->bl, CLR_OUTSIGHT);
}
//delete a homunculus, completely "killing it".
@@ -119,7 +119,7 @@ int merc_hom_delete(struct homun_data *hd, int emote)
sd = hd->master;
if (!sd)
- return unit_free(&hd->bl,1);
+ return unit_free(&hd->bl,CLR_DEAD);
if (emote >= 0)
clif_emotion(&sd->bl, emote);
@@ -129,7 +129,7 @@ int merc_hom_delete(struct homun_data *hd, int emote)
// Send homunculus_dead to client
hd->homunculus.hp = 0;
clif_hominfo(sd, hd, 0);
- return unit_remove_map(&hd->bl,0);
+ return unit_remove_map(&hd->bl,CLR_OUTSIGHT);
}
int merc_hom_calc_skilltree(struct homun_data *hd)
@@ -147,7 +147,7 @@ int merc_hom_calc_skilltree(struct homun_data *hd)
continue; //Skill already known.
if(!battle_config.skillfree)
{
- for(j=0;j<5;j++)
+ for(j=0;j<MAX_PC_SKILL_REQUIRE;j++)
{
if( hskill_tree[c][i].need[j].id &&
merc_hom_checkskill(hd,hskill_tree[c][i].need[j].id) < hskill_tree[c][i].need[j].lv)
@@ -291,7 +291,7 @@ int merc_hom_evolution(struct homun_data *hd)
if(!hd->homunculusDB->evo_class || hd->homunculus.class_ == hd->homunculusDB->evo_class)
{
- clif_emotion(&hd->bl, 4) ; //swt
+ clif_emotion(&hd->bl, E_SWT);
return 0 ;
}
sd = hd->master;
@@ -317,12 +317,12 @@ int merc_hom_evolution(struct homun_data *hd)
hom->luk += 10*rand(min->luk, max->luk);
hom->intimacy = 500;
- unit_remove_map(&hd->bl, 0);
+ unit_remove_map(&hd->bl, CLR_OUTSIGHT);
map_addblock(&hd->bl);
clif_spawn(&hd->bl);
- clif_emotion(&sd->bl, 21); //no1
- clif_misceffect2(&hd->bl,568);
+ clif_emotion(&sd->bl, E_NO1);
+ clif_specialeffect(&hd->bl,568,AREA);
//status_Calc flag&1 will make current HP/SP be reloaded from hom structure
hom->hp = hd->battle_status.hp;
@@ -362,7 +362,7 @@ int merc_hom_gainexp(struct homun_data *hd,int exp)
if( hd->exp_next == 0 )
hd->homunculus.exp = 0 ;
- clif_misceffect2(&hd->bl,568);
+ clif_specialeffect(&hd->bl,568,AREA);
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
return 0;
@@ -448,33 +448,33 @@ int merc_hom_food(struct map_session_data *sd, struct homun_data *hd)
if ( hd->homunculus.hunger >= 91 ) {
merc_hom_decrease_intimacy(hd, 50);
- emotion = 16;
+ emotion = E_WAH;
} else if ( hd->homunculus.hunger >= 76 ) {
merc_hom_decrease_intimacy(hd, 5);
- emotion = 19;
+ emotion = E_SWT2;
} else if ( hd->homunculus.hunger >= 26 ) {
merc_hom_increase_intimacy(hd, 75);
- emotion = 2;
+ emotion = E_HO;
} else if ( hd->homunculus.hunger >= 11 ) {
merc_hom_increase_intimacy(hd, 100);
- emotion = 2;
+ emotion = E_HO;
} else {
merc_hom_increase_intimacy(hd, 50);
- emotion = 2;
+ emotion = E_HO;
}
hd->homunculus.hunger += 10; //dunno increase value for each food
if(hd->homunculus.hunger > 100)
hd->homunculus.hunger = 100;
- clif_emotion(&hd->bl,emotion) ;
+ clif_emotion(&hd->bl,emotion);
clif_send_homdata(sd,SP_HUNGRY,hd->homunculus.hunger);
clif_send_homdata(sd,SP_INTIMATE,hd->homunculus.intimacy / 100);
clif_hom_food(sd,foodID,1);
// Too much food :/
if(hd->homunculus.intimacy == 0)
- return merc_hom_delete(sd->hd, 23); //omg
+ return merc_hom_delete(sd->hd, E_OMG);
return 0;
}
@@ -500,18 +500,18 @@ static int merc_hom_hungry(int tid, unsigned int tick, int id, intptr data)
hd->homunculus.hunger-- ;
if(hd->homunculus.hunger <= 10) {
- clif_emotion(&hd->bl, 6) ; //an
+ clif_emotion(&hd->bl, E_AN);
} else if(hd->homunculus.hunger == 25) {
- clif_emotion(&hd->bl, 20) ; //hmm
+ clif_emotion(&hd->bl, E_HMM);
} else if(hd->homunculus.hunger == 75) {
- clif_emotion(&hd->bl, 33) ; //ok
+ clif_emotion(&hd->bl, E_OK);
}
if(hd->homunculus.hunger < 0) {
hd->homunculus.hunger = 0;
// Delete the homunculus if intimacy <= 100
if ( !merc_hom_decrease_intimacy(hd, 100) )
- return merc_hom_delete(hd, 23); //omg
+ return merc_hom_delete(hd, E_OMG);
clif_send_homdata(sd,SP_INTIMATE,hd->homunculus.intimacy / 100);
}
@@ -676,7 +676,7 @@ int merc_call_homunculus(struct map_session_data *sd)
merc_save(hd);
} else
//Warp him to master.
- unit_warp(&hd->bl,sd->bl.m, sd->bl.x, sd->bl.y,0);
+ unit_warp(&hd->bl,sd->bl.m, sd->bl.x, sd->bl.y,CLR_OUTSIGHT);
return 1;
}
@@ -871,7 +871,7 @@ int merc_hom_shuffle(struct homun_data *hd)
clif_homskillinfoblock(sd);
status_calc_homunculus(hd,0);
status_percent_heal(&hd->bl, 100, 100);
- clif_misceffect2(&hd->bl,568);
+ clif_specialeffect(&hd->bl,568,AREA);
return 1;
}
@@ -1088,7 +1088,7 @@ int read_homunculus_skilldb(void)
if (minJobLevelPresent)
hskill_tree[classid][j].joblv=atoi(split[3]);
- for(k=0;k<5;k++){
+ for(k=0;k<MAX_PC_SKILL_REQUIRE;k++){
hskill_tree[classid][j].need[k].id=atoi(split[3+k*2+minJobLevelPresent]);
hskill_tree[classid][j].need[k].lv=atoi(split[3+k*2+minJobLevelPresent+1]);
}
diff --git a/src/map/instance.c b/src/map/instance.c
index c1d43c27b..6fa3a2c0a 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -235,7 +235,7 @@ int instance_del_load(struct map_session_data* sd, va_list args)
if( !sd || sd->bl.m != m )
return 0;
- pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 0);
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_OUTSIGHT);
return 1;
}
@@ -439,9 +439,9 @@ void instance_check_kick(struct map_session_data *sd)
if( map[m].instance_id )
{ // User was on the instance map
if( map[m].save.map )
- pc_setpos(sd, map[m].save.map, map[m].save.x, map[m].save.y, 3);
+ pc_setpos(sd, map[m].save.map, map[m].save.x, map[m].save.y, CLR_TELEPORT);
else
- pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 3);
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
}
}
diff --git a/src/map/intif.c b/src/map/intif.c
index ba5230bab..875baa036 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -698,8 +698,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
WFIFOHEAD(inter_fd,186);
WFIFOW(inter_fd,0)=0x303e;
WFIFOL(inter_fd,2)=guild_id;
- memcpy(WFIFOP(inter_fd,6),mes1,60);
- memcpy(WFIFOP(inter_fd,66),mes2,120);
+ memcpy(WFIFOP(inter_fd,6),mes1,MAX_GUILDMES1);
+ memcpy(WFIFOP(inter_fd,66),mes2,MAX_GUILDMES2);
WFIFOSET(inter_fd,186);
return 0;
}
@@ -984,10 +984,7 @@ int intif_parse_LoadGuildStorage(int fd)
if(battle_config.save_log)
ShowInfo("intif_open_guild_storage: %d\n",RFIFOL(fd,4) );
memcpy(gstor,RFIFOP(fd,12),sizeof(struct guild_storage));
- gstor->storage_status = 1;
- sd->state.storage_flag = 2;
- clif_guildstoragelist(sd,gstor);
- clif_updateguildstorageamount(sd,gstor->storage_amount);
+ storage_guild_storageopen(sd);
return 0;
}
int intif_parse_SaveGuildStorage(int fd)
@@ -1920,7 +1917,7 @@ int intif_parse_mercenary_received(int fd)
if( sizeof(struct s_mercenary) != len )
{
if( battle_config.etc_log )
- ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_homunculus), len);
+ ShowError("intif: create mercenary data size error %d != %d\n", sizeof(struct s_mercenary), len);
return 0;
}
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 2096ddf9e..ce10f4f39 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -27,8 +27,6 @@ static struct item_group itemgroup_db[MAX_ITEMGROUP];
struct item_data dummy_item; //This is the default dummy item used for non-existant items. [Skotlex]
-int item_delays = 0;
-
/*==========================================
* OŌp
*------------------------------------------*/
@@ -182,6 +180,27 @@ struct item_data* itemdb_exists(int nameid)
return item;
}
+/// Returns human readable name for given item type.
+/// @param type Type id to retrieve name for ( IT_* ).
+const char* itemdb_typename(int type)
+{
+ switch(type)
+ {
+ case IT_HEALING: return "Potion/Food";
+ case IT_USABLE: return "Usable";
+ case IT_ETC: return "Etc.";
+ case IT_WEAPON: return "Weapon";
+ case IT_ARMOR: return "Armor";
+ case IT_CARD: return "Card";
+ case IT_PETEGG: return "Pet Egg";
+ case IT_PETARMOR: return "Pet Accessory";
+ case IT_AMMO: return "Arrow/Ammunition";
+ case IT_DELAYCONSUME: return "Delay-Consume Usable";
+ case IT_CASH: return "Cash Usable";
+ }
+ return "Unknown Type";
+}
+
/*==========================================
* Converts the jobid from the format in itemdb
* to the format used by the map server. [Skotlex]
@@ -667,7 +686,7 @@ static int itemdb_read_itemtrade(void)
static int itemdb_read_itemdelay(void)
{
FILE *fp;
- int nameid, j;
+ int nameid, j, item_delays = 0;
char line[1024], *str[10], *p;
struct item_data *id;
@@ -679,12 +698,12 @@ static int itemdb_read_itemdelay(void)
while(fgets(line, sizeof(line), fp))
{
+ if (line[0] == '/' && line[1] == '/')
+ continue;
if (item_delays == MAX_ITEMDELAYS) {
- ShowError("itemdb_read_itemdelay: Too many entries specified in %s/item_delay.txt!\n", db_path);
+ ShowError("itemdb_read_itemdelay: Too many entries specified in %s/item_delay.txt! Increase MAX_ITEMDELAYS in itemdb.h!\n", db_path);
break;
}
- if (line[0] == '/' && line[1] == '/')
- continue;
memset(str, 0, sizeof(str));
for (j = 0, p = line; j < 2 && p; j++) {
str[j] = p;
@@ -750,6 +769,13 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
safestrncpy(id->jname, str[2], sizeof(id->jname));
id->type = atoi(str[3]);
+
+ if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_DELAYCONSUME && id->type < IT_CASH ) || id->type >= IT_MAX )
+ {// catch invalid item types
+ ShowWarning("itemdb_parse_dbrow: Invalid item type %d for item %d. IT_ETC will be used.\n", id->type, nameid);
+ id->type = IT_ETC;
+ }
+
if (id->type == IT_DELAYCONSUME)
{ //Items that are consumed only after target confirmation
id->type = IT_USABLE;
@@ -809,8 +835,6 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
id->look = atoi(str[18]);
id->flag.available = 1;
- id->flag.value_notdc = 0;
- id->flag.value_notoc = 0;
id->view_id = 0;
id->sex = itemdb_gendercheck(id); //Apply gender filtering.
@@ -1075,7 +1099,10 @@ void itemdb_reload(void)
// readjust itemdb pointer cache for each player
iter = mapit_geteachpc();
for( sd = (struct map_session_data*)mapit_first(iter); mapit_exists(iter); sd = (struct map_session_data*)mapit_next(iter) )
+ {
+ memset(sd->item_delay, 0, sizeof(sd->item_delay)); // reset item delays
pc_setinventorydata(sd);
+ }
mapit_free(iter);
}
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 5b07b5c1b..3fb14b2d4 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -45,7 +45,7 @@ struct item_data {
int value_buy;
int value_sell;
int type;
- int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it) [Lupus]
+ int maxchance; //For logs, for external game info, for scripts: Max drop chance of this item (e.g. 0.01% , etc.. if it = 0, then monsters don't drop it, -1 denotes items sold in shops only) [Lupus]
int sex;
int equip;
int weight;
@@ -71,8 +71,6 @@ struct item_data {
struct script_code *unequip_script;//Script executed once when unequipping.
struct {
unsigned available : 1;
- unsigned value_notdc : 1;
- unsigned value_notoc : 1;
short no_equip;
unsigned no_refine : 1; // [celest]
unsigned delay_consume : 1; // Signifies items that are not consumed immediately upon double-click [Skotlex]
@@ -108,14 +106,13 @@ struct item_data* itemdb_exists(int nameid);
#define itemdb_available(n) (itemdb_exists(n) && itemdb_search(n)->flag.available)
#define itemdb_viewid(n) (itemdb_search(n)->view_id)
#define itemdb_autoequip(n) (itemdb_search(n)->flag.autoequip)
+const char* itemdb_typename(int type);
int itemdb_group_bonus(struct map_session_data* sd, int itemid);
int itemdb_searchrandomid(int flags);
#define itemdb_value_buy(n) itemdb_search(n)->value_buy
#define itemdb_value_sell(n) itemdb_search(n)->value_sell
-#define itemdb_value_notdc(n) itemdb_search(n)->flag.value_notdc
-#define itemdb_value_notoc(n) itemdb_search(n)->flag.value_notoc
#define itemdb_canrefine(n) itemdb_search(n)->flag.no_refine
//Item trade restrictions [Skotlex]
int itemdb_isdropable_sub(struct item_data *, int, int);
diff --git a/src/map/log.c b/src/map/log.c
index 474a6bb96..bf6133684 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -27,7 +27,7 @@ time_t curtime;
//Bits: ||
//2 - Healing items (0)
//3 - Etc Items(3) + Arrows (10)
-//4 - Usable Items(2) + Scrolls,Lures(11)
+//4 - Usable Items(2) + Scrolls,Lures(11) + Usable Cash Items(18)
//5 - Weapon(4)
//6 - Shields,Armor,Headgears,Accessories,etc(5)
//7 - Cards(6)
@@ -45,14 +45,14 @@ int should_log_item(int filter, int nameid, int amount)
if ((filter&1) || // Filter = 1, we log any item
(filter&2 && item_data->type == IT_HEALING ) ||
(filter&4 && (item_data->type == IT_ETC || item_data->type == IT_AMMO) ) ||
- (filter&8 && item_data->type == IT_USABLE ) ||
+ (filter&8 && (item_data->type == IT_USABLE || item_data->type == IT_CASH) ) ||
(filter&16 && item_data->type == IT_WEAPON ) ||
(filter&32 && item_data->type == IT_ARMOR ) ||
(filter&64 && item_data->type == IT_CARD ) ||
(filter&128 && (item_data->type == IT_PETEGG || item_data->type == IT_PETARMOR) ) ||
(filter&256 && item_data->value_buy >= log_config.price_items_log ) || //expensive items
(filter&512 && abs(amount) >= log_config.amount_items_log ) || //big amount of items
- (filter&2048 && ((item_data->maxchance <= log_config.rare_items_log) || item_data->nameid == 714) ) //Rare items or Emperium
+ (filter&2048 && ((item_data->maxchance != -1 && item_data->maxchance <= log_config.rare_items_log) || item_data->nameid == 714) ) //Rare items or Emperium
) return item_data->nameid;
return 0;
diff --git a/src/map/map.c b/src/map/map.c
index 309095ff0..b052cd7bc 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1645,7 +1645,7 @@ int map_quit(struct map_session_data *sd)
if( sd->pd ) pet_lootitem_drop(sd->pd, sd);
if( sd->state.storage_flag == 1 ) sd->state.storage_flag = 0; // No need to Double Save Storage on Quit.
- unit_remove_map_pc(sd,3);
+ unit_remove_map_pc(sd,CLR_TELEPORT);
if( map[sd->bl.m].instance_id )
{ // Avoid map conflicts and warnings on next login
@@ -1665,7 +1665,7 @@ int map_quit(struct map_session_data *sd)
}
}
- party_booking_delete(sd, true); // Party Booking [Spiria]
+ party_booking_delete(sd); // Party Booking [Spiria]
pc_makesavestatus(sd);
pc_clean_skilltree(sd);
chrif_save(sd,1);
@@ -2150,7 +2150,7 @@ int map_removemobs_sub(struct block_list *bl, va_list ap)
if( md->db->mexp > 0 )
return 0;
- unit_free(&md->bl,0);
+ unit_free(&md->bl,CLR_OUTSIGHT);
return 1;
}
@@ -2797,6 +2797,20 @@ int map_delmap(char* mapname)
return 0;
}
+/// Initializes map flags and adjusts them depending on configuration.
+void map_flags_init(void)
+{
+ int i;
+
+ for( i = 0; i < map_num; i++ )
+ {
+ memset(&map[i].flag, 0, sizeof(map[i].flag));
+
+ if( battle_config.pk_mode )
+ map[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
+ }
+}
+
#define NO_WATER 1000000
/*
@@ -2892,7 +2906,7 @@ int map_readallmaps (void)
int i;
FILE* fp=NULL;
int maps_removed = 0;
- unsigned char *map_cache_buffer; // Has the uncompressed gat data of all maps, so just one allocation has to be made
+ unsigned char *map_cache_buffer = NULL; // Has the uncompressed gat data of all maps, so just one allocation has to be made
unsigned char map_cache_decode_buffer[MAX_MAP_SIZE];
if( enable_grf )
@@ -2958,8 +2972,6 @@ int map_readallmaps (void)
map[i].m = i;
memset(map[i].moblist, 0, sizeof(map[i].moblist)); //Initialize moblist [Skotlex]
map[i].mob_delete_timer = INVALID_TIMER; //Initialize timer [Skotlex]
- if(battle_config.pk_mode)
- map[i].flag.pvp = 1; // make all maps pvp for pk_mode [Valaris]
map[i].bxs = (map[i].xs + BLOCK_SIZE - 1) / BLOCK_SIZE;
map[i].bys = (map[i].ys + BLOCK_SIZE - 1) / BLOCK_SIZE;
@@ -2973,6 +2985,9 @@ int map_readallmaps (void)
map[i].block_mob = (struct block_list**)aCalloc(size, 1);
}
+ // intialization and configuration-dependent adjustments of mapflags
+ map_flags_init();
+
if( !enable_grf ) {
fclose(fp);
@@ -3205,7 +3220,7 @@ int inter_config_read(char *cfgName)
continue;
if(strcmpi(w1, "main_chat_nick")==0)
- strcpy(main_chat_nick, w2);
+ safestrncpy(main_chat_nick, w2, sizeof(main_chat_nick));
#ifndef TXT_ONLY
else
@@ -3365,7 +3380,7 @@ int cleanup_sub(struct block_list *bl, va_list ap)
npc_unload((struct npc_data *)bl);
break;
case BL_MOB:
- unit_free(bl,0);
+ unit_free(bl,CLR_OUTSIGHT);
break;
case BL_PET:
//There is no need for this, the pet is removed together with the player. [Skotlex]
diff --git a/src/map/map.h b/src/map/map.h
index 9f25249e2..3b1775e46 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -296,6 +296,8 @@ enum _sp {
SP_BASEJOB=119, // 100+19 - celest
SP_BASECLASS=120, //Hmm.. why 100+19? I just use the next one... [Skotlex]
+ SP_KILLERRID=121,
+ SP_KILLEDRID=122,
// Mercenaries
SP_MERCFLEE=165, SP_MERCKILLS=189, SP_MERCFAITH=190,
@@ -628,6 +630,7 @@ int cleanup_sub(struct block_list *bl, va_list ap);
void map_helpscreen(int flag); // [Valaris]
int map_delmap(char* mapname);
+void map_flags_init(void);
bool map_iwall_set(int m, int x, int y, int size, int dir, bool shootable, const char* wall_name);
void map_iwall_get(struct map_session_data *sd);
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 287aae4f9..f80be56a2 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -122,9 +122,9 @@ static void script_load_mapreg(void)
return;
}
- SqlStmt_BindColumn(stmt, 0, SQLDT_STRING, &varname[0], 32, &length, NULL);
+ SqlStmt_BindColumn(stmt, 0, SQLDT_STRING, &varname[0], sizeof(varname), &length, NULL);
SqlStmt_BindColumn(stmt, 1, SQLDT_INT, &index, 0, NULL, NULL);
- SqlStmt_BindColumn(stmt, 2, SQLDT_STRING, &value[0], 255, NULL, NULL);
+ SqlStmt_BindColumn(stmt, 2, SQLDT_STRING, &value[0], sizeof(value), NULL, NULL);
while ( SQL_SUCCESS == SqlStmt_NextRow(stmt) )
{
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 84974e906..79bec2da6 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -244,7 +244,7 @@ int merc_delete(struct mercenary_data *md, int reply)
merc_contract_stop(md);
if( !sd )
- return unit_free(&md->bl, 0);
+ return unit_free(&md->bl, CLR_OUTSIGHT);
if( md->devotion_flag )
{
@@ -258,8 +258,8 @@ int merc_delete(struct mercenary_data *md, int reply)
case 1: mercenary_set_faith(md, -1); break; // -1 Loyalty on Mercenary killed
}
- clif_mercenary_message(sd->fd, reply);
- return unit_remove_map(&md->bl, 0);
+ clif_mercenary_message(sd, reply);
+ return unit_remove_map(&md->bl, CLR_OUTSIGHT);
}
void merc_contract_stop(struct mercenary_data *md)
diff --git a/src/map/mob.c b/src/map/mob.c
index 413d88f26..d67b470af 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -82,7 +82,6 @@ const int mob_splendide[5] = { 1991, 1992, 1993, 1994, 1995 };
*------------------------------------------*/
static int mob_makedummymobdb(int);
static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr data);
-int mobskill_use(struct mob_data *md,unsigned int tick,int event);
int mob_skillid2skillidx(int class_,int skillid);
/*==========================================
@@ -276,7 +275,7 @@ int mob_get_random_id(int type, int flag, int lv)
(flag&8 && mob->spawn[0].qty < 1)
) && (i++) < MAX_MOB_DB);
- if(i >= MAX_MOB_DB)
+ if(i >= MAX_MOB_DB) // no suitable monster found, use fallback for given list
class_ = mob_db_data[0]->summonper[type];
return class_;
}
@@ -449,7 +448,7 @@ int mob_once_spawn(struct map_session_data* sd, int m, short x, short y, const c
if (class_ < 0 && battle_config.dead_branch_active)
//Behold Aegis's masterful decisions yet again...
//"I understand the "Aggressive" part, but the "Can Move" and "Can Attack" is just stupid" - Poki#3
- sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE, 0, 60000);
+ sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE|MD_ANGRY, 0, 60000);
}
return (md)?md->bl.id : 0; // id of last spawned mob
@@ -547,7 +546,7 @@ static int mob_spawn_guardian_sub(int tid, unsigned int tick, int id, intptr dat
md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
}
- unit_free(&md->bl,0); //Remove guardian.
+ unit_free(&md->bl,CLR_OUTSIGHT); //Remove guardian.
}
return 0;
}
@@ -795,7 +794,7 @@ int mob_setdelayspawn(struct mob_data *md)
unsigned int spawntime;
if (!md->spawn) //Doesn't has respawn data!
- return unit_free(&md->bl,1);
+ return unit_free(&md->bl,CLR_DEAD);
spawntime = md->spawn->delay1; //Base respawn time
if (md->spawn->delay2) //random variance
@@ -826,7 +825,7 @@ int mob_spawn (struct mob_data *md)
md->last_thinktime = tick;
if (md->bl.prev != NULL)
- unit_remove_map(&md->bl,2);
+ unit_remove_map(&md->bl,CLR_RESPAWN);
else
if (md->spawn && md->class_ != md->spawn->class_)
{
@@ -1121,7 +1120,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
md->master_dist > MAX_MINCHASE
){
md->master_dist = 0;
- unit_warp(&md->bl,bl->m,bl->x,bl->y,3);
+ unit_warp(&md->bl,bl->m,bl->x,bl->y,CLR_TELEPORT);
return 1;
}
@@ -1761,7 +1760,7 @@ int mob_timer_delete(int tid, unsigned int tick, int id, intptr data)
}
//for Alchemist CANNIBALIZE [Lupus]
md->deletetimer = INVALID_TIMER;
- unit_free(bl, 3);
+ unit_free(bl, CLR_TELEPORT);
}
return 0;
}
@@ -1805,7 +1804,7 @@ int mob_respawn(int tid, unsigned int tick, int id, intptr data)
void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
{
- int char_id = 0, flag = 0;
+ int char_id = 0, flag = MDLF_NORMAL;
if( damage < 0 )
return; //Do nothing for absorbed damage.
@@ -1827,7 +1826,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
case BL_HOM:
{
struct homun_data *hd = (TBL_HOM*)src;
- flag = 1;
+ flag = MDLF_HOMUN;
if( hd->master )
char_id = hd->master->status.char_id;
if( damage )
@@ -1846,7 +1845,7 @@ void mob_log_damage(struct mob_data *md, struct block_list *src, int damage)
case BL_PET:
{
struct pet_data *pd = (TBL_PET*)src;
- flag = 2;
+ flag = MDLF_PET;
if( pd->msd )
{
char_id = pd->msd->status.char_id;
@@ -1960,9 +1959,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
unsigned int base_exp,job_exp;
} pt[DAMAGELOG_SIZE];
int i,temp,count,pnum=0,m=md->bl.m;
+ int dmgbltypes = 0; // bitfield of all bl types, that caused damage to the mob and are elligible for exp distribution
unsigned int mvp_damage, tick = gettick();
- unsigned short flaghom = 1; // [Zephyrus] Does the mob only received damage from homunculus?
- bool rebirth;
+ bool rebirth, homkillonly;
status = &md->status;
@@ -2022,9 +2021,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
count++; //Only logged into same map chars are counted for the total.
if (pc_isdead(tsd))
continue; // skip dead players
- if(md->dmglog[i].flag == 1 && !merc_is_hom_active(tsd->hd))
+ if(md->dmglog[i].flag == MDLF_HOMUN && !merc_is_hom_active(tsd->hd))
continue; // skip homunc's share if inactive
- if( md->dmglog[i].flag == 2 && (!tsd->status.pet_id || !tsd->pd) )
+ if( md->dmglog[i].flag == MDLF_PET && (!tsd->status.pet_id || !tsd->pd) )
continue; // skip pet's share if inactive
if(md->dmglog[i].dmg > mvp_damage)
@@ -2037,10 +2036,17 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
tmpsd[i] = tsd; // record as valid damage-log entry
- if(!md->dmglog[i].flag == 1 && flaghom)
- flaghom = 0; // Damage received from other Types != Homunculus
+ switch( md->dmglog[i].flag )
+ {
+ case MDLF_NORMAL: dmgbltypes|= BL_PC; break;
+ case MDLF_HOMUN: dmgbltypes|= BL_HOM; break;
+ case MDLF_PET: dmgbltypes|= BL_PET; break;
+ }
}
+ // determines, if the monster was killed by homunculus' damage only
+ homkillonly = (bool)( ( dmgbltypes&BL_HOM ) && !( dmgbltypes&~BL_HOM ) );
+
if(!battle_config.exp_calc_type && count > 1)
{ //Apply first-attacker 200% exp share bonus
//TODO: Determine if this should go before calculating the MVP player instead of after.
@@ -2065,9 +2071,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
temp = status_get_class(&md->bl);
if(sd->sc.data[SC_MIRACLE]) i = 2; //All mobs are Star Targets
else
- ARR_FIND(0, 3, i, temp == sd->hate_mob[i] &&
+ ARR_FIND(0, MAX_PC_FEELHATE, i, temp == sd->hate_mob[i] &&
(battle_config.allow_skill_without_day || sg_info[i].day_func()));
- if(i<3 && (temp=pc_checkskill(sd,sg_info[i].bless_id)))
+ if(i<MAX_PC_FEELHATE && (temp=pc_checkskill(sd,sg_info[i].bless_id)))
bonus += (i==2?20:10)*temp;
}
if(battle_config.mobs_level_up && md->level > md->db->lv) // [Valaris]
@@ -2103,7 +2109,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
else if(md->special_state.size==2)
per *=2.;
- if( md->dmglog[i].flag == 2 )
+ if( md->dmglog[i].flag == MDLF_PET )
per *= battle_config.pet_attack_exp_rate/100.;
if(battle_config.zeny_from_mobs && md->level) {
@@ -2118,12 +2124,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
else
base_exp = (unsigned int)cap_value(md->db->base_exp * per * bonus/100. * map[m].bexp/100., 1, UINT_MAX);
- if (map[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == 1) //Homun earned job-exp is always lost.
+ if (map[m].flag.nojobexp || !md->db->job_exp || md->dmglog[i].flag == MDLF_HOMUN) //Homun earned job-exp is always lost.
job_exp = 0;
else
job_exp = (unsigned int)cap_value(md->db->job_exp * per * bonus/100. * map[m].jexp/100., 1, UINT_MAX);
- if((temp = tmpsd[i]->status.party_id )>0 && !md->dmglog[i].flag == 1) //Homun-done damage (flag 1) is not given to party
+ if((temp = tmpsd[i]->status.party_id )>0 && !md->dmglog[i].flag == MDLF_HOMUN) //Homun-done damage (flag 1) is not given to party
{
int j;
for(j=0;j<pnum && pt[j].id!=temp;j++); //Locate party.
@@ -2155,11 +2161,11 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
}
if(flag) {
- if(base_exp && md->dmglog[i].flag == 1) //tmpsd[i] is null if it has no homunc.
+ if(base_exp && md->dmglog[i].flag == MDLF_HOMUN) //tmpsd[i] is null if it has no homunc.
merc_hom_gainexp(tmpsd[i]->hd, base_exp);
if(base_exp || job_exp)
{
- if( md->dmglog[i].flag != 2 || battle_config.pet_attack_exp_to_master )
+ if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master )
pc_gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false);
}
if(zeny) // zeny from mobs [Valaris]
@@ -2241,13 +2247,13 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
// Announce first, or else ditem will be freed. [Lance]
// By popular demand, use base drop rate for autoloot code. [Skotlex]
- mob_item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, flaghom);
+ mob_item_drop(md, dlist, ditem, 0, md->db->dropitem[i].p, homkillonly);
}
// Ore Discovery [Celest]
if (sd == mvp_sd && pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/10 >= rand()%10000) {
ditem = mob_setdropitem(itemdb_searchrandomid(IG_FINDINGORE), 1);
- mob_item_drop(md, dlist, ditem, 0, battle_config.finding_ore_rate/10, 0);
+ mob_item_drop(md, dlist, ditem, 0, battle_config.finding_ore_rate/10, homkillonly);
}
if(sd) {
@@ -2273,7 +2279,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
if (rand()%10000 >= drop_rate)
continue;
itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id : itemdb_searchrandomid(sd->add_drop[i].group);
- mob_item_drop(md, dlist, mob_setdropitem(itemid,1), 0, drop_rate, 0);
+ mob_item_drop(md, dlist, mob_setdropitem(itemid,1), 0, drop_rate, homkillonly);
}
}
@@ -2289,7 +2295,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
// process items looted by the mob
if(md->lootitem) {
for(i = 0; i < md->lootitem_count; i++)
- mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, 0);
+ mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
}
if (dlist->item) //There are drop items.
add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
@@ -2305,7 +2311,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
dlist->third_charid = (third_sd ? third_sd->status.char_id : 0);
dlist->item = NULL;
for(i = 0; i < md->lootitem_count; i++)
- mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, 0);
+ mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
}
@@ -2406,12 +2412,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
{
if( sd && battle_config.mob_npc_event_type )
{
- pc_setglobalreg(sd,"killerrid",sd->bl.id);
+ pc_setparam(sd, SP_KILLERRID, sd->bl.id);
npc_event(sd,md->npc_event,0);
}
else if( mvp_sd )
{
- pc_setglobalreg(mvp_sd,"killerrid",sd?sd->bl.id:0);
+ pc_setparam(mvp_sd, SP_KILLERRID, sd?sd->bl.id:0);
npc_event(mvp_sd,md->npc_event,0);
}
else
@@ -2419,7 +2425,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
}
else if( mvp_sd && !md->state.npc_killmonster )
{
- pc_setglobalreg(mvp_sd,"killedrid",md->class_);
+ pc_setparam(mvp_sd, SP_KILLEDRID, md->class_);
npc_script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance]
}
@@ -2491,7 +2497,7 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap)
md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
}
- unit_free(&md->bl,0); //Remove guardian.
+ unit_free(&md->bl,CLR_OUTSIGHT); //Remove guardian.
}
return 0;
}
@@ -2505,7 +2511,7 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap)
md->guardian_data->castle->guardian[md->guardian_data->number].visible = 0;
guild_castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0);
}
- unit_free(&md->bl,0);
+ unit_free(&md->bl,CLR_OUTSIGHT);
return 0;
}
@@ -2631,7 +2637,7 @@ int mob_warpslave_sub(struct block_list *bl,va_list ap)
return 0;
map_search_freecell(master, 0, &x, &y, range, range, 0);
- unit_warp(&md->bl, master->m, x, y,2);
+ unit_warp(&md->bl, master->m, x, y,CLR_RESPAWN);
return 1;
}
@@ -3409,9 +3415,7 @@ static bool mob_parse_dbrow(char** str)
double exp, maxhp;
struct mob_data data;
- class_ = str[0] ? atoi(str[0]) : 0;
- if (class_ == 0)
- return false; //Leave blank lines alone... [Skotlex]
+ class_ = atoi(str[0]);
if (class_ <= 1000 || class_ > MAX_MOB_DB) {
ShowWarning("Mob with ID: %d not loaded. ID must be in range [%d-%d]\n", class_, 1000, MAX_MOB_DB);
@@ -3552,7 +3556,7 @@ static bool mob_parse_dbrow(char** str)
//calculate and store Max available drop chance of the MVP item
if (db->mvpitem[i].p) {
id = itemdb_search(db->mvpitem[i].nameid);
- if (id->maxchance == 10000 || (id->maxchance < db->mvpitem[i].p/10 + 1) ) {
+ if (id->maxchance == -1 || (id->maxchance < db->mvpitem[i].p/10 + 1) ) {
//item has bigger drop chance or sold in shops
id->maxchance = db->mvpitem[i].p/10 + 1; //reduce MVP drop info to not spoil common drop rate
}
@@ -3585,6 +3589,7 @@ static bool mob_parse_dbrow(char** str)
ratemax = battle_config.item_drop_heal_max;
break;
case IT_USABLE:
+ case IT_CASH:
rate_adjust = (status->mode&MD_BOSS) ? battle_config.item_rate_use_boss : battle_config.item_rate_use;
ratemin = battle_config.item_drop_use_min;
ratemax = battle_config.item_drop_use_max;
@@ -3613,7 +3618,7 @@ static bool mob_parse_dbrow(char** str)
if( db->dropitem[i].p && (class_ < 1324 || class_ > 1363) && (class_ < 1938 || class_ > 1946) )
{ //Skip treasure chests.
id = itemdb_search(db->dropitem[i].nameid);
- if (id->maxchance == 10000 || (id->maxchance < db->dropitem[i].p) ) {
+ if (id->maxchance == -1 || (id->maxchance < db->dropitem[i].p) ) {
id->maxchance = db->dropitem[i].p; //item has bigger drop chance or sold in shops
}
for (k = 0; k< MAX_SEARCH; k++) {
@@ -3636,61 +3641,31 @@ static bool mob_parse_dbrow(char** str)
/*==========================================
* mob_db.txt reading
*------------------------------------------*/
-static int mob_readdb(void)
+static bool mob_readdb_sub(char* fields[], int columns, int current)
+{
+ return mob_parse_dbrow(fields);
+}
+
+static void mob_readdb(void)
{
const char* filename[] = { "mob_db.txt", "mob_db2.txt" };
int fi;
for( fi = 0; fi < ARRAYLENGTH(filename); ++fi )
{
- uint32 lines = 0, count = 0;
- char line[1024];
char path[256];
- FILE* fp;
-
- sprintf(path, "%s/%s", db_path, filename[fi]);
- fp = fopen(path, "r");
- if(fp == NULL) {
- if(fi > 0)
- continue;
- return -1;
- }
-
- // process rows one by one
- while(fgets(line, sizeof(line), fp))
+
+ if(fi > 0)
{
- char *str[38+2*MAX_MOB_DROP], *p, *np;
- int i;
-
- lines++;
- if(line[0] == '/' && line[1] == '/')
- continue;
-
- for(i = 0, p = line; i < 38 + 2*MAX_MOB_DROP; i++)
+ sprintf(path, "%s/%s", db_path, filename[fi]);
+ if(!exists(path))
{
- str[i] = p;
- if((np = strchr(p, ',')) != NULL) {
- *np = '\0'; p = np + 1;
- }
- }
-
- if(i < 38 + 2*MAX_MOB_DROP) {
- ShowWarning("mob_readdb: Insufficient columns for mob with id: %d, skipping.\n", atoi(str[0]));
continue;
}
-
- if (!mob_parse_dbrow(str))
- continue;
-
- count++;
}
- fclose(fp);
-
- ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename[fi]);
+ sv_readdb(db_path, filename[fi], ',', 38+2*MAX_MOB_DROP, 38+2*MAX_MOB_DROP, -1, &mob_readdb_sub);
}
-
- return 0;
}
#ifndef TXT_ONLY
@@ -3753,73 +3728,42 @@ static int mob_read_sqldb(void)
/*==========================================
* MOB display graphic change data reading
*------------------------------------------*/
-static int mob_readdb_mobavail(void)
+static bool mob_readdb_mobavail(char* str[], int columns, int current)
{
- FILE *fp;
- char line[1024];
- int ln=0;
- int class_,j,k;
- char *str[20],*p,*np;
+ int class_, k;
- sprintf(line, "%s/mob_avail.txt", db_path);
- if( (fp=fopen(line,"r"))==NULL ){
- ShowError("can't read %s\n", line);
- return -1;
- }
+ class_=atoi(str[0]);
- while(fgets(line, sizeof(line), fp))
+ if(mob_db(class_) == mob_dummy) // lُȂ珈ȂB
{
- if(line[0]=='/' && line[1]=='/')
- continue;
- memset(str,0,sizeof(str));
-
- for(j=0,p=line;j<12;j++){
- if((np=strchr(p,','))!=NULL){
- str[j]=p;
- *np=0;
- p=np+1;
- } else
- str[j]=p;
- }
-
- if(str[0]==NULL)
- continue;
-
- class_=atoi(str[0]);
- if (class_ == 0)
- continue; //Leave blank lines alone... [Skotlex]
-
- if(mob_db(class_) == mob_dummy) // lُȂ珈ȂB
- continue;
-
- k=atoi(str[1]);
- if(k < 0)
- continue;
-
- memset(&mob_db_data[class_]->vd, 0, sizeof(struct view_data));
- mob_db_data[class_]->vd.class_=k;
-
- //Player sprites
- if(pcdb_checkid(k) && j>=12) {
- mob_db_data[class_]->vd.sex=atoi(str[2]);
- mob_db_data[class_]->vd.hair_style=atoi(str[3]);
- mob_db_data[class_]->vd.hair_color=atoi(str[4]);
- mob_db_data[class_]->vd.weapon=atoi(str[5]);
- mob_db_data[class_]->vd.shield=atoi(str[6]);
- mob_db_data[class_]->vd.head_top=atoi(str[7]);
- mob_db_data[class_]->vd.head_mid=atoi(str[8]);
- mob_db_data[class_]->vd.head_bottom=atoi(str[9]);
- mob_db_data[class_]->option=atoi(str[10])&~(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE);
- mob_db_data[class_]->vd.cloth_color=atoi(str[11]); // Monster player dye option - Valaris
- }
- else if(str[2] && atoi(str[2]) > 0)
- mob_db_data[class_]->vd.head_bottom=atoi(str[2]); // mob equipment [Valaris]
+ ShowWarning("mob_readdb_mobavail: Unknown mob id %d.\n", class_);
+ return false;
+ }
- ln++;
+ k=atoi(str[1]);
+
+ memset(&mob_db_data[class_]->vd, 0, sizeof(struct view_data));
+ mob_db_data[class_]->vd.class_=k;
+
+ //Player sprites
+ if(pcdb_checkid(k) && columns==12) {
+ mob_db_data[class_]->vd.sex=atoi(str[2]);
+ mob_db_data[class_]->vd.hair_style=atoi(str[3]);
+ mob_db_data[class_]->vd.hair_color=atoi(str[4]);
+ mob_db_data[class_]->vd.weapon=atoi(str[5]);
+ mob_db_data[class_]->vd.shield=atoi(str[6]);
+ mob_db_data[class_]->vd.head_top=atoi(str[7]);
+ mob_db_data[class_]->vd.head_mid=atoi(str[8]);
+ mob_db_data[class_]->vd.head_bottom=atoi(str[9]);
+ mob_db_data[class_]->option=atoi(str[10])&~(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE);
+ mob_db_data[class_]->vd.cloth_color=atoi(str[11]); // Monster player dye option - Valaris
}
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n",ln,"mob_avail.txt");
- return 0;
+ else if(columns==3)
+ mob_db_data[class_]->vd.head_bottom=atoi(str[2]); // mob equipment [Valaris]
+ else if( columns != 2 )
+ return false;
+
+ return true;
}
/*==========================================
@@ -3842,7 +3786,7 @@ static int mob_read_randommonster(void)
for( i = 0; i < ARRAYLENGTH(mobfile) && i < MAX_RANDOMMONSTER; i++ )
{
- mob_db_data[0]->summonper[i] = 1002; // ݒ肵Yꂽꍇ̓|o悤ɂĂ
+ mob_db_data[0]->summonper[i] = 1002; // Default fallback value, in case the database does not provide one
sprintf(line, "%s/%s", db_path, mobfile[i]);
fp=fopen(line,"r");
if(fp==NULL){
@@ -3894,8 +3838,10 @@ static int mob_read_randommonster(void)
*------------------------------------------*/
static bool mob_parse_row_chatdb(char** str, const char* source, int line, int* last_msg_id)
{
+ char* msg;
struct mob_chat *ms;
int msg_id;
+ size_t len;
msg_id = atoi(str[0]);
@@ -3917,13 +3863,29 @@ static bool mob_parse_row_chatdb(char** str, const char* source, int line, int*
//Color
ms->color=strtoul(str[1],NULL,0);
//Message
- if(strlen(str[2])>(CHAT_SIZE_MAX-1)){
+ msg = str[2];
+ len = strlen(msg);
+
+ while( len && ( msg[len-1]=='\r' || msg[len-1]=='\n' ) )
+ {// find EOL to strip
+ len--;
+ }
+
+ if(len>(CHAT_SIZE_MAX-1))
+ {
if (msg_id != *last_msg_id) {
ShowError("mob_chat: readdb: Message too long! Line %d, id: %d\n", line, msg_id);
*last_msg_id = msg_id;
}
return false;
}
+ else if( !len )
+ {
+ ShowWarning("mob_parse_row_chatdb: Empty message for id %d.\n", msg_id);
+ return false;
+ }
+
+ msg[len] = 0; // strip previously found EOL
strncpy(ms->msg, str[2], CHAT_SIZE_MAX);
return true;
@@ -3987,9 +3949,8 @@ static void mob_readchatdb(void)
/*==========================================
* processes one mob_skill_db entry
- * @param last_mob_id ensures that only one error message per mob id is printed
*------------------------------------------*/
-static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, int* last_mob_id)
+static bool mob_parse_row_mobskilldb(char** str, int columns, int current)
{
static const struct {
char str[32];
@@ -4058,6 +4019,7 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
{ "around4", MST_AROUND4 },
{ "around", MST_AROUND },
};
+ static int last_mob_id = 0; // ensures that only one error message per mob id is printed
struct mob_skill *ms, gms;
int mob_id;
@@ -4067,9 +4029,9 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
if (mob_id > 0 && mob_db(mob_id) == mob_dummy)
{
- if (mob_id != *last_mob_id) {
- ShowError("mob_skill: Non existant Mob id %d at %s, line %d\n", mob_id, source, line);
- *last_mob_id = mob_id;
+ if (mob_id != last_mob_id) {
+ ShowError("mob_parse_row_mobskilldb: Non existant Mob id %d\n", mob_id);
+ last_mob_id = mob_id;
}
return false;
}
@@ -4089,9 +4051,9 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
ARR_FIND( 0, MAX_MOBSKILL, i, (ms = &mob_db_data[mob_id]->skill[i])->skill_id == 0 );
if( i == MAX_MOBSKILL )
{
- if (mob_id != *last_mob_id) {
- ShowError("mob_skill: readdb: too many skills! Line %d in %d[%s]\n", line, mob_id, mob_db_data[mob_id]->sprite);
- *last_mob_id = mob_id;
+ if (mob_id != last_mob_id) {
+ ShowError("mob_parse_row_mobskilldb: Too many skills for monster %d[%s]\n", mob_id, mob_db_data[mob_id]->sprite);
+ last_mob_id = mob_id;
}
return false;
}
@@ -4102,7 +4064,7 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
if( j < ARRAYLENGTH(state) )
ms->state = state[j].id;
else {
- ShowWarning("mob_skill: Unrecognized state %s at %s, line %d\n", str[2], source, line);
+ ShowWarning("mob_parse_row_mobskilldb: Unrecognized state %s\n", str[2]);
ms->state = MSS_ANY;
}
@@ -4111,9 +4073,9 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
if (j<=0 || j>MAX_SKILL_DB) //fixed Lupus
{
if (mob_id < 0)
- ShowError("Invalid Skill ID (%d) for all mobs\n", j);
+ ShowError("mob_parse_row_mobskilldb: Invalid Skill ID (%d) for all mobs\n", j);
else
- ShowError("Invalid Skill ID (%d) for mob %d (%s)\n", j, mob_id, mob_db_data[mob_id]->sprite);
+ ShowError("mob_parse_row_mobskilldb: Invalid Skill ID (%d) for mob %d (%s)\n", j, mob_id, mob_db_data[mob_id]->sprite);
return false;
}
ms->skill_id=j;
@@ -4146,7 +4108,7 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
if( j < ARRAYLENGTH(target) )
ms->target = target[j].id;
else {
- ShowWarning("mob_skill: Unrecognized target %s at %s, line %d\n", str[9], source, line);
+ ShowWarning("mob_parse_row_mobskilldb: Unrecognized target %s for %d\n", str[9], mob_id);
ms->target = MST_TARGET;
}
@@ -4155,13 +4117,13 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
{ //Ground skill.
if (ms->target > MST_AROUND)
{
- ShowWarning("Wrong mob skill target for ground skill %d (%s) for %s.\n",
+ ShowWarning("mob_parse_row_mobskilldb: Wrong mob skill target for ground skill %d (%s) for %s.\n",
ms->skill_id, skill_get_name(ms->skill_id),
mob_id < 0?"all mobs":mob_db_data[mob_id]->sprite);
ms->target = MST_TARGET;
}
} else if (ms->target > MST_MASTER) {
- ShowWarning("Wrong mob skill target 'around' for non-ground skill %d (%s) for %s\n.",
+ ShowWarning("mob_parse_row_mobskilldb: Wrong mob skill target 'around' for non-ground skill %d (%s) for %s\n.",
ms->skill_id, skill_get_name(ms->skill_id),
mob_id < 0?"all mobs":mob_db_data[mob_id]->sprite);
ms->target = MST_TARGET;
@@ -4172,7 +4134,7 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
if( j < ARRAYLENGTH(cond1) )
ms->cond1 = cond1[j].id;
else {
- ShowWarning("mob_skill: Unrecognized condition 1 %s at %s, line %d\n", str[10], source, line);
+ ShowWarning("mob_parse_row_mobskilldb: Unrecognized condition 1 %s for %d\n", str[10], mob_id);
ms->cond1 = -1;
}
@@ -4246,7 +4208,7 @@ static bool mob_parse_row_mobskilldb(char** str, const char* source, int line, i
/*==========================================
* mob_skill_db.txt reading
*------------------------------------------*/
-static int mob_readskilldb(void)
+static void mob_readskilldb(void)
{
const char* filename[] = { "mob_skill_db.txt", "mob_skill_db2.txt" };
int fi;
@@ -4254,130 +4216,72 @@ static int mob_readskilldb(void)
if( battle_config.mob_skill_rate == 0 )
{
ShowStatus("Mob skill use disabled. Not reading mob skills.\n");
- return 0;
+ return;
}
for( fi = 0; fi < ARRAYLENGTH(filename); ++fi )
{
- uint32 lines = 0, count = 0;
- char line[1024];
- int i;
- int tmp = 0;
-
char path[256];
- FILE *fp;
-
- sprintf(path, "%s/%s", db_path, filename[fi]);
- fp = fopen(path, "r");
- if( fp == NULL )
- {
- ShowWarning("mob_readskilldb: File not found \"%s\", skipping.\n", path);
- continue;
- }
- // process rows one by one
- while(fgets(line, sizeof(line), fp))
+ if(fi > 0)
{
- char *str[20], *p, *np;
- int j=0;
-
- lines++;
- if(line[0] == '/' && line[1] == '/')
- continue;
- memset(str, 0, sizeof(str));
-
- p = line;
- while( ISSPACE(*p) )
- ++p;
- if( *p == '\0' )
- continue;// empty line
- for(i = 0; i < 19; i++)
+ sprintf(path, "%s/%s", db_path, filename[fi]);
+ if(!exists(path))
{
- str[i] = p;
- if((np = strchr(p, ',')) != NULL) {
- *np = '\0'; p = np + 1; j++;
- }
- }
-
- if ( j < 18 || str[18]==NULL )
- {
- ShowError("mob_readskilldb: Insufficient number of fields for skill at %s, line %d\n", filename[fi], lines);
continue;
}
-
- if( !mob_parse_row_mobskilldb(str, path, lines, &tmp) )
- continue;
-
- count++;
}
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n", filename[fi]);
+
+ sv_readdb(db_path, filename[fi], ',', 19, 19, -1, &mob_parse_row_mobskilldb);
}
- return 0;
}
/*==========================================
- * mob_race_db.txt reading
+ * mob_race2_db.txt reading
*------------------------------------------*/
-static int mob_readdb_race(void)
+static bool mob_readdb_race2(char* fields[], int columns, int current)
{
- FILE *fp;
- char line[1024];
- int race,j,k;
- char *str[20],*p,*np;
+ int race, mobid, i;
- sprintf(line, "%s/mob_race2_db.txt", db_path);
- if( (fp=fopen(line,"r"))==NULL ){
- ShowError("can't read %s\n", line);
- return -1;
- }
-
- while(fgets(line, sizeof(line), fp))
- {
- if(line[0]=='/' && line[1]=='/')
- continue;
- memset(str,0,sizeof(str));
+ race = atoi(fields[0]);
- for(j=0,p=line;j<12;j++){
- if((np=strchr(p,','))!=NULL){
- str[j]=p;
- *np=0;
- p=np+1;
- } else
- str[j]=p;
- }
- if(str[0]==NULL)
- continue;
+ if (race < RC2_NONE || race >= RC2_MAX)
+ {
+ ShowWarning("mob_readdb_race2: Unknown race2 %d.\n", race);
+ return false;
+ }
- race=atoi(str[0]);
- if (race < RC2_NONE || race >= RC2_MAX)
+ for(i = 1; i<columns; i++)
+ {
+ mobid = atoi(fields[i]);
+ if (mob_db(mobid) == mob_dummy)
+ {
+ ShowWarning("mob_readdb_race2: Unknown mob id %d for race2 %d.\n", mobid, race);
continue;
-
- for (j=1; j<20; j++) {
- if (!str[j])
- break;
- k=atoi(str[j]);
- if (mob_db(k) == mob_dummy)
- continue;
- mob_db_data[k]->race2 = race;
}
+ mob_db_data[mobid]->race2 = race;
}
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","mob_race2_db.txt");
- return 0;
+ return true;
}
-void mob_reload(void)
+static void mob_load(void)
{
- int i;
#ifndef TXT_ONLY
- if(db_use_sqldbs)
- mob_read_sqldb();
- else
+ if(db_use_sqldbs)
+ mob_read_sqldb();
+ else
#endif /* TXT_ONLY */
mob_readdb();
- mob_readdb_mobavail();
+ sv_readdb(db_path, "mob_avail.txt", ',', 2, 12, -1, &mob_readdb_mobavail);
mob_read_randommonster();
+ mob_readchatdb();
+ mob_readskilldb();
+ sv_readdb(db_path, "mob_race2_db.txt", ',', 2, 20, -1, &mob_readdb_race2);
+}
+
+void mob_reload(void)
+{
+ int i;
//Mob skills need to be cleared before re-reading them. [Skotlex]
for (i = 0; i < MAX_MOB_DB; i++)
@@ -4386,9 +4290,8 @@ void mob_reload(void)
memset(&mob_db_data[i]->skill,0,sizeof(mob_db_data[i]->skill));
mob_db_data[i]->maxskill=0;
}
- mob_readchatdb();
- mob_readskilldb();
- mob_readdb_race();
+
+ mob_load();
}
void mob_clear_spawninfo()
@@ -4410,18 +4313,7 @@ int do_init_mob(void)
item_drop_ers = ers_new(sizeof(struct item_drop));
item_drop_list_ers = ers_new(sizeof(struct item_drop_list));
-#ifndef TXT_ONLY
- if(db_use_sqldbs)
- mob_read_sqldb();
- else
-#endif /* TXT_ONLY */
- mob_readdb();
-
- mob_readdb_mobavail();
- mob_read_randommonster();
- mob_readchatdb();
- mob_readskilldb();
- mob_readdb_race();
+ mob_load();
add_timer_func_list(mob_delayspawn,"mob_delayspawn");
add_timer_func_list(mob_delay_item_drop,"mob_delay_item_drop");
diff --git a/src/map/mob.h b/src/map/mob.h
index e8bd0a837..ce896646c 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -55,6 +55,13 @@ enum MobSkillState {
MSS_ANYTARGET,
};
+enum MobDamageLogFlag
+{
+ MDLF_NORMAL = 0,
+ MDLF_HOMUN,
+ MDLF_PET,
+};
+
struct mob_skill {
enum MobSkillState state;
short skill_id,skill_lv;
diff --git a/src/map/npc.c b/src/map/npc.c
index dcfa52193..4b188c177 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -176,7 +176,7 @@ int npc_enable(const char* name, int flag)
if (nd->class_ == WARP_CLASS || nd->class_ == FLAG_CLASS)
{ //Client won't display option changes for these classes [Toms]
if (nd->sc.option&(OPTION_HIDE|OPTION_INVISIBLE))
- clif_clearunit_area(&nd->bl, 0);
+ clif_clearunit_area(&nd->bl, CLR_OUTSIGHT);
else
clif_spawn(&nd->bl);
} else
@@ -206,7 +206,7 @@ int npc_event_dequeue(struct map_session_data* sd)
if(sd->npc_id)
{ //Current script is aborted.
if(sd->state.using_fake_npc){
- clif_clearunit_single(sd->npc_id, 0, sd->fd);
+ clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
}
if (sd->st) {
@@ -866,7 +866,7 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
case WARP:
if( pc_ishiding(sd) )
break; // hidden chars cannot use warps
- pc_setpos(sd,map[m].npc[i]->u.warp.mapindex,map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,0);
+ pc_setpos(sd,map[m].npc[i]->u.warp.mapindex,map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,CLR_OUTSIGHT);
break;
case SCRIPT:
if( npc_ontouch_event(sd,map[m].npc[i]) > 0 && npc_ontouch2_event(sd,map[m].npc[i]) > 0 )
@@ -923,7 +923,7 @@ int npc_touch_areanpc2(struct mob_data *md)
xs = map_mapindex2mapid(map[m].npc[i]->u.warp.mapindex);
if( m < 0 )
break; // Cannot Warp between map servers
- if( unit_warp(&md->bl, xs, map[m].npc[i]->u.warp.x, map[m].npc[i]->u.warp.y, 0) == 0 )
+ if( unit_warp(&md->bl, xs, map[m].npc[i]->u.warp.x, map[m].npc[i]->u.warp.y, CLR_OUTSIGHT) == 0 )
return 1; // Warped
break;
case SCRIPT:
@@ -1142,14 +1142,24 @@ static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* i
{
char npc_ev[NAME_LENGTH*2+3];
int i;
- int regkey = add_str("@bought_nameid");
- int regkey2 = add_str("@bought_quantity");
- snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnBuyItem", nd->exname);
- for(i=0;i<n;i++){
- pc_setreg(sd,regkey+(i<<24),(int)item_list[i*2+1]);
- pc_setreg(sd,regkey2+(i<<24),(int)item_list[i*2]);
+ int key_nameid = 0;
+ int key_amount = 0;
+
+ // discard old contents
+ script_cleararray_pc(sd, "@bought_nameid", (void*)0);
+ script_cleararray_pc(sd, "@bought_quantity", (void*)0);
+
+ // save list of bought items
+ for( i = 0; i < n; i++ )
+ {
+ script_setarray_pc(sd, "@bought_nameid", i, (void*)(intptr)item_list[i*2+1], &key_nameid);
+ script_setarray_pc(sd, "@bought_quantity", i, (void*)(intptr)item_list[i*2], &key_amount);
}
+
+ // invoke event
+ snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnBuyItem", nd->exname);
npc_event(sd, npc_ev, 0);
+
return 0;
}
/*==========================================
@@ -1251,8 +1261,6 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
nd = npc_checknear(sd,map_id2bl(sd->npc_shopid));
if( nd == NULL )
return 3;
- if( nd->master_nd != NULL ) //Script-based shops.
- return npc_buylist_sub(sd,n,item_list,nd->master_nd);
if( nd->subtype != SHOP )
return 3;
@@ -1287,6 +1295,11 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
amount = item_list[i*2+0] = 1;
}
+ if( nd->master_nd )
+ {// Script-controlled shops decide by themselves, what can be bought and for what price.
+ continue;
+ }
+
switch( pc_checkadditem(sd,nameid,amount) )
{
case ADDITEM_EXIST:
@@ -1300,13 +1313,15 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
return 2;
}
- if( !itemdb_value_notdc(nameid) )
- value = pc_modifybuyvalue(sd,value);
+ value = pc_modifybuyvalue(sd,value);
z += (double)value * amount;
w += itemdb_weight(nameid) * amount;
}
+ if( nd->master_nd != NULL ) //Script-based shops.
+ return npc_buylist_sub(sd,n,item_list,nd->master_nd);
+
if( z > (double)sd->status.zeny )
return 1; // Not enough Zeny
if( w + sd->weight > sd->max_weight )
@@ -1356,90 +1371,139 @@ int npc_buylist(struct map_session_data* sd, int n, unsigned short* item_list)
return 0;
}
-/*==========================================
- *
- *------------------------------------------*/
+
+/// npc_selllist for script-controlled shops
+static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd)
+{
+ char npc_ev[NAME_LENGTH*2+3];
+ int i, idx;
+ int key_nameid = 0;
+ int key_amount = 0;
+
+ // discard old contents
+ script_cleararray_pc(sd, "@sold_nameid", (void*)0);
+ script_cleararray_pc(sd, "@sold_quantity", (void*)0);
+
+ // save list of to be sold items
+ for( i = 0; i < n; i++ )
+ {
+ idx = item_list[i*2]-2;
+
+ script_setarray_pc(sd, "@sold_nameid", i, (void*)(intptr)sd->status.inventory[idx].nameid, &key_nameid);
+ script_setarray_pc(sd, "@sold_quantity", i, (void*)(intptr)item_list[i*2+1], &key_amount);
+ }
+
+ // invoke event
+ snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnSellItem", nd->exname);
+ npc_event(sd, npc_ev, 0);
+ return 0;
+}
+
+
+/// Player item selling to npc shop.
+///
+/// @param item_list 'n' pairs <index,amount>
+/// @return result code for clif_parse_NpcSellListSend
int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
{
double z;
int i,skill;
struct npc_data *nd;
-
+
nullpo_retr(1, sd);
nullpo_retr(1, item_list);
- if ((nd = npc_checknear(sd,map_id2bl(sd->npc_shopid))) == NULL)
+ if( ( nd = npc_checknear(sd, map_id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP )
+ {
return 1;
- nd = nd->master_nd; //For OnSell triggers.
+ }
- for(i=0,z=0;i<n;i++) {
- int nameid, idx;
- short qty;
- idx = item_list[i*2]-2;
- qty = (short)item_list[i*2+1];
-
- if (idx <0 || idx >=MAX_INVENTORY || qty < 0)
- break;
-
- nameid=sd->status.inventory[idx].nameid;
- if (nameid == 0 || !sd->inventory_data[idx] ||
- sd->status.inventory[idx].amount < qty)
- break;
-
- if (sd->inventory_data[idx]->flag.value_notoc)
- z+=(double)qty*sd->inventory_data[idx]->value_sell;
- else
- z+=(double)qty*pc_modifysellvalue(sd,sd->inventory_data[idx]->value_sell);
+ z = 0;
+
+ // verify the sell list
+ for( i = 0; i < n; i++ )
+ {
+ int nameid, amount, idx, value;
+
+ idx = item_list[i*2]-2;
+ amount = item_list[i*2+1];
- if(sd->inventory_data[idx]->type == IT_PETEGG &&
- sd->status.inventory[idx].card[0] == CARD0_PET)
+ if( idx >= MAX_INVENTORY || idx < 0 || amount < 0 )
{
- if(search_petDB_index(sd->status.inventory[idx].nameid, PET_EGG) >= 0)
- intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1],sd->status.inventory[idx].card[2]));
+ return 1;
+ }
+
+ nameid = sd->status.inventory[idx].nameid;
+
+ if( !nameid || !sd->inventory_data[idx] || sd->status.inventory[idx].amount < amount )
+ {
+ return 1;
}
- if(log_config.enable_logs&0x20) //Logs items, Sold to NPC (S)hop [Lupus]
- log_pick_pc(sd, "S", nameid, -qty, &sd->status.inventory[idx]);
+ if( nd->master_nd )
+ {// Script-controlled shops decide by themselves, what can be sold and at what price.
+ continue;
+ }
+
+ value = pc_modifysellvalue(sd, sd->inventory_data[idx]->value_sell);
+
+ z+= (double)value*amount;
+ }
+
+ if( nd->master_nd )
+ {// Script-controlled shops
+ return npc_selllist_sub(sd, n, item_list, nd->master_nd);
+ }
+
+ // delete items
+ for( i = 0; i < n; i++ )
+ {
+ int nameid, amount, idx;
+
+ idx = item_list[i*2]-2;
+ amount = item_list[i*2+1];
+ nameid = sd->status.inventory[idx].nameid;
+
+ //Logs items, Sold to NPC (S)hop [Lupus]
+ if( log_config.enable_logs&0x20 )
+ log_pick_pc(sd, "S", nameid, -amount, &sd->status.inventory[idx]);
+ //Logs
- if(nd) {
- pc_setreg(sd,add_str("@sold_nameid")+(i<<24),(int)sd->status.inventory[idx].nameid);
- pc_setreg(sd,add_str("@sold_quantity")+(i<<24),qty);
+ if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET )
+ {
+ if( search_petDB_index(sd->status.inventory[idx].nameid, PET_EGG) >= 0 )
+ {
+ intif_delete_petdata(MakeDWord(sd->status.inventory[idx].card[1], sd->status.inventory[idx].card[2]));
+ }
}
- pc_delitem(sd,idx,qty,0,6);
+
+ pc_delitem(sd, idx, amount, 0, 6);
}
- if (z > MAX_ZENY) z = MAX_ZENY;
+ if( z > MAX_ZENY )
+ z = MAX_ZENY;
- if(log_config.zeny) //Logs (S)hopping Zeny [Lupus]
+ //Logs (S)hopping Zeny [Lupus]
+ if( log_config.zeny )
log_zeny(sd, "S", sd, (int)z);
+ //Logs
- pc_getzeny(sd,(int)z);
-
- if (battle_config.shop_exp > 0 && z > 0 && (skill = pc_checkskill(sd,MC_OVERCHARGE)) > 0) {
- if (sd->status.skill[MC_OVERCHARGE].flag != 0)
+ pc_getzeny(sd, (int)z);
+
+ // custom merchant shop exp bonus
+ if( battle_config.shop_exp > 0 && z > 0 && ( skill = pc_checkskill(sd,MC_OVERCHARGE) ) > 0)
+ {
+ if( sd->status.skill[MC_OVERCHARGE].flag != 0 )
skill = sd->status.skill[MC_OVERCHARGE].flag - 2;
- if (skill > 0) {
+ if( skill > 0 )
+ {
z = z * (double)skill * (double)battle_config.shop_exp/10000.;
- if (z < 1)
+ if( z < 1 )
z = 1;
- pc_gainexp(sd,NULL,0,(int)z, false);
+ pc_gainexp(sd, NULL, 0, (int)z, false);
}
}
-
- if(nd) {
- char npc_ev[NAME_LENGTH*2+3];
- snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnSellItem", nd->exname);
- npc_event(sd, npc_ev, 0);
- }
-
- if (i<n) {
- //Error/Exploit... of some sort. If we return 1, the client will not mark
- //any item as deleted even though a few were sold. In such a case, we
- //have no recourse but to kick them out so their inventory will refresh
- //correctly on relog. [Skotlex]
- if (i) set_eof(sd->fd);
- return 1;
- }
+
return 0;
}
@@ -1451,7 +1515,7 @@ int npc_remove_map(struct npc_data* nd)
if(nd->bl.prev == NULL || nd->bl.m < 0)
return 1; //Not assigned to a map.
m = nd->bl.m;
- clif_clearunit_area(&nd->bl,2);
+ clif_clearunit_area(&nd->bl,CLR_RESPAWN);
npc_unsetcells(nd);
map_delblock(&nd->bl);
//Remove npc from map[].npc list. [Skotlex]
@@ -1875,8 +1939,8 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
id->name, nameid, value, (int)(value*0.75), id->value_sell, (int)(id->value_sell*1.24), filepath, strline(buffer,start-buffer));
}
//for logs filters, atcommands and iteminfo script command
- if( id->maxchance <= 0 )
- id->maxchance = 10000; //10000 (100% drop chance)would show that the item's sold in NPC Shop
+ if( id->maxchance == 0 )
+ id->maxchance = -1; // -1 would show that the item's sold in NPC Shop
items[i].nameid = nameid;
items[i].value = value;
@@ -2550,7 +2614,7 @@ void npc_setclass(struct npc_data* nd, short class_)
if( nd->class_ == class_ )
return;
- clif_clearunit_area(&nd->bl, 0);// fade out
+ clif_clearunit_area(&nd->bl, CLR_OUTSIGHT);// fade out
nd->class_ = class_;
status_set_viewdata(&nd->bl, class_);
clif_spawn(&nd->bl);// fade in
@@ -3129,7 +3193,12 @@ void npc_parsesrcfile(const char* filepath)
{// Incorrect map, we must skip the script info...
ShowError("npc_parsesrcfile: Unknown map '%s' in file '%s', line '%d'. Skipping line...\n", mapname, filepath, strline(buffer,p-buffer));
if( strcasecmp(w2,"script") == 0 && count > 3 )
- p = npc_skip_script(p,buffer,filepath);
+ {
+ if((p = npc_skip_script(p,buffer,filepath)) == NULL)
+ {
+ break;
+ }
+ }
p = strchr(p,'\n');// next line
continue;
}
@@ -3137,7 +3206,12 @@ void npc_parsesrcfile(const char* filepath)
if( m < 0 )
{// "mapname" is not assigned to this server, we must skip the script info...
if( strcasecmp(w2,"script") == 0 && count > 3 )
- p = npc_skip_script(p,buffer,filepath);
+ {
+ if((p = npc_skip_script(p,buffer,filepath)) == NULL)
+ {
+ break;
+ }
+ }
p = strchr(p,'\n');// next line
continue;
}
@@ -3270,7 +3344,7 @@ int npc_reload(void)
npc_unload((struct npc_data *)bl);
break;
case BL_MOB:
- unit_free(bl,0);
+ unit_free(bl,CLR_OUTSIGHT);
break;
}
}
@@ -3304,6 +3378,9 @@ int npc_reload(void)
npc_warp = npc_shop = npc_script = 0;
npc_mob = npc_cache_mob = npc_delay_mob = 0;
+ // reset mapflags
+ map_flags_init();
+
//TODO: the following code is copy-pasted from do_init_npc(); clean it up
// Reloading npcs now
for (nsl = npc_src_files; nsl; nsl = nsl->next)
@@ -3350,7 +3427,7 @@ int do_final_npc(void)
if (bl->type == BL_NPC)
npc_unload((struct npc_data *)bl);
else if (bl->type&(BL_MOB|BL_PET|BL_HOM|BL_MER))
- unit_free(bl, 0);
+ unit_free(bl, CLR_OUTSIGHT);
}
}
diff --git a/src/map/party.c b/src/map/party.c
index e6a7ffd8b..407221cde 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -30,8 +30,9 @@
static DBMap* party_db; // int party_id -> struct party_data*
static DBMap* party_booking_db; // Party Booking [Spiria]
+static unsigned long party_booking_nextid = 1;
+
int party_send_xy_timer(int tid, unsigned int tick, int id, intptr data);
-bool check_party_leader(struct map_session_data *sd, struct party_data *p); // Party Booking [Spiria]
/*==========================================
* Fills the given party_member structure according to the sd provided.
@@ -515,11 +516,6 @@ int party_leave(struct map_session_data *sd)
if( i == MAX_PARTY )
return 0;
- if( check_party_leader(sd, p) ){ // when party leader leaves party, cancel booking.
- party_booking_delete(sd,true);
- clif_PartyBookingDeleteAck(sd,0);
- }
-
intif_party_leave(p->party.party_id,sd->status.account_id,sd->status.char_id);
return 1;
}
@@ -665,8 +661,6 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
//Update info.
intif_party_leaderchange(p->party.party_id,p->party.member[tmi].account_id,p->party.member[tmi].char_id);
clif_party_info(p,NULL);
- party_booking_delete(sd, true); // Party Booking [Spiria]
- clif_PartyBookingDeleteAck(sd, 0); // Close small window
return true;
}
@@ -1070,52 +1064,25 @@ int party_foreachsamemap(int (*func)(struct block_list*,va_list),struct map_sess
* Party Booking in KRO [Spiria]
*------------------------------------------*/
-static struct party_booking_ad_info* create_party_booking_data(int party_id)
+static struct party_booking_ad_info* create_party_booking_data(void)
{
struct party_booking_ad_info *pb_ad;
CREATE(pb_ad, struct party_booking_ad_info, 1);
- pb_ad->index = party_id;
+ pb_ad->index = party_booking_nextid++;
return pb_ad;
}
-struct party_booking_ad_info* party_booking_getdata(unsigned long index)
-{
- struct party_booking_ad_info *pb_ad;
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, index);
- return pb_ad;
-}
-
-bool check_party_leader(struct map_session_data *sd, struct party_data *p)
-{
- int i;
-
- if (!sd || !sd->status.party_id) return false;
-
- if( p == NULL ) return false;
-
- ARR_FIND(0, MAX_PARTY, i, p->party.member[i].leader && p->party.member[i].online && p->data[i].sd == sd);
- if(i == MAX_PARTY) return false;
-
- return true;
-}
-
void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job)
{
struct party_booking_ad_info *pb_ad;
- struct party_data *p=party_search(sd->status.party_id);
int i;
- if (!check_party_leader(sd, p)) {
- clif_PartyBookingRegisterAck(sd, 1);
- return;
- }
-
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, p->party.party_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
if( pb_ad == NULL )
{
- pb_ad = create_party_booking_data(p->party.party_id);
- idb_put(party_booking_db, pb_ad->index, pb_ad);
+ pb_ad = create_party_booking_data();
+ idb_put(party_booking_db, sd->status.char_id, pb_ad);
}
memcpy(pb_ad->charname,sd->status.name,NAME_LENGTH);
@@ -1123,84 +1090,80 @@ void party_booking_register(struct map_session_data *sd, short level, short mapi
pb_ad->p_detail.level = level;
pb_ad->p_detail.mapid = mapid;
- for(i=0;i<6;i++)
+ for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
clif_PartyBookingRegisterAck(sd, 0);
clif_PartyBookingInsertNotify(sd, pb_ad); // Notice
- clif_PartyBookingSearchAck(sd->fd, &pb_ad->index, 1, false); // Update Client!
- return;
}
void party_booking_update(struct map_session_data *sd, short* job)
{
int i;
- struct party_data *p=party_search(sd->status.party_id);
struct party_booking_ad_info *pb_ad;
- if (!check_party_leader(sd, p)) {
- return;
- }
-
- pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, p->party.party_id);
+ pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id);
if( pb_ad == NULL )
return;
pb_ad->starttime = (int)time(NULL);// Update time.
- for(i=0;i<6;i++)
+ for(i=0;i<PARTY_BOOKING_JOBS;i++)
if(job[i] != 0xFF)
pb_ad->p_detail.job[i] = job[i];
else pb_ad->p_detail.job[i] = -1;
clif_PartyBookingUpdateNotify(sd, pb_ad);
- return;
}
void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount)
{
struct party_booking_ad_info *pb_ad;
int i, count=0;
- unsigned long index_list[10];
+ struct party_booking_ad_info* result_list[PARTY_BOOKING_RESULTS];
bool more_result = false;
DBIterator* iter = party_booking_db->iterator(party_booking_db);
- memset(index_list, 0, sizeof(index_list));
+ memset(result_list, 0, sizeof(result_list));
for( pb_ad = (struct party_booking_ad_info*)iter->first(iter,NULL); iter->exists(iter); pb_ad = (struct party_booking_ad_info*)iter->next(iter,NULL) )
{
- if (pb_ad->index < lastindex || (pb_ad->p_detail.level < level || pb_ad->p_detail.level-15 > level))
+ if (pb_ad->index < lastindex || (level && (pb_ad->p_detail.level < level-15 || pb_ad->p_detail.level > level)))
continue;
- if (count >= 10){
+ if (count >= PARTY_BOOKING_RESULTS){
more_result = true;
break;
}
if (mapid == 0 && job == -1)
- index_list[count] = pb_ad->index;
+ result_list[count] = pb_ad;
else if (mapid == 0) {
- for(i=0; i<6; i++)
+ for(i=0; i<PARTY_BOOKING_JOBS; i++)
if (pb_ad->p_detail.job[i] == job && job != -1)
- index_list[count] = pb_ad->index;
+ result_list[count] = pb_ad;
} else if (job == -1){
if (pb_ad->p_detail.mapid == mapid)
- index_list[count] = pb_ad->index;
+ result_list[count] = pb_ad;
+ }
+ if( result_list[count] )
+ {
+ count++;
}
- count++;
}
iter->destroy(iter);
- clif_PartyBookingSearchAck(sd->fd, index_list, count, more_result);
+ clif_PartyBookingSearchAck(sd->fd, result_list, count, more_result);
}
-bool party_booking_delete(struct map_session_data *sd, bool force_delete)
+bool party_booking_delete(struct map_session_data *sd)
{
- struct party_data *p=party_search(sd->status.party_id);
- if (!check_party_leader(sd, p) && !force_delete) {
- return false;
+ struct party_booking_ad_info* pb_ad;
+
+ if((pb_ad = (struct party_booking_ad_info*)idb_get(party_booking_db, sd->status.char_id))!=NULL)
+ {
+ clif_PartyBookingDeleteNotify(sd, pb_ad->index);
+ idb_remove(party_booking_db,sd->status.char_id);
}
- clif_PartyBookingDeleteNotify(sd, sd->status.party_id);
- idb_remove(party_booking_db,sd->status.party_id);
return true;
}
diff --git a/src/map/party.h b/src/map/party.h
index d396d0fe6..31e46f5ec 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -12,6 +12,9 @@ struct item;
#include <stdarg.h>
+#define PARTY_BOOKING_JOBS 6
+#define PARTY_BOOKING_RESULTS 10
+
struct party_member_data {
struct map_session_data *sd;
unsigned int hp; //For HP,x,y refreshing.
@@ -34,7 +37,7 @@ struct party_data {
struct party_booking_detail {
short level;
short mapid;
- short job[6];
+ short job[PARTY_BOOKING_JOBS];
};
struct party_booking_ad_info {
@@ -83,10 +86,9 @@ int party_foreachsamemap(int (*func)(struct block_list *,va_list),struct map_ses
/*==========================================
* Party Booking in KRO [Spiria]
*------------------------------------------*/
-struct party_booking_ad_info* party_booking_getdata(unsigned long index);
void party_booking_register(struct map_session_data *sd, short level, short mapid, short* job);
void party_booking_update(struct map_session_data *sd, short* job);
void party_booking_search(struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount);
-bool party_booking_delete(struct map_session_data *sd, bool force_delete);
+bool party_booking_delete(struct map_session_data *sd);
#endif /* _PARTY_H_ */
diff --git a/src/map/path.c b/src/map/path.c
index e2e3ae44b..bbbb99a08 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -345,7 +345,7 @@ bool path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int
xs = md->xs-1; // 炩߂PZĂ
ys = md->ys-1;
- while(1)
+ for(;;)
{
int e=0,f=0,dist,cost,dc[4]={0,0,0,0};
diff --git a/src/map/pc.c b/src/map/pc.c
index 7ad0ecfe4..94121eba9 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -61,15 +61,13 @@ struct fame_list taekwon_fame_list[MAX_FAME_LIST];
static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_AMMO};
#define MOTD_LINE_SIZE 128
-char motd_text[MOTD_LINE_SIZE][256]; // Message of the day buffer [Valaris]
+static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris]
struct duel duel_list[MAX_DUEL];
int duel_count = 0;
-extern int item_delays; // [Paradox924X]
-
//Links related info to the sd->hate_mob[]/sd->feel_map[] entries
-const struct sg_data sg_info[3] = {
+const struct sg_data sg_info[MAX_PC_FEELHATE] = {
{ SG_SUN_ANGER, SG_SUN_BLESS, SG_SUN_COMFORT, "PC_FEEL_SUN", "PC_HATE_MOB_SUN", is_day_of_sun },
{ SG_MOON_ANGER, SG_MOON_BLESS, SG_MOON_COMFORT, "PC_FEEL_MOON", "PC_HATE_MOB_MOON", is_day_of_moon },
{ SG_STAR_ANGER, SG_STAR_BLESS, SG_STAR_COMFORT, "PC_FEEL_STAR", "PC_HATE_MOB_STAR", is_day_of_star }
@@ -532,11 +530,6 @@ int pc_setinventorydata(struct map_session_data *sd)
for(i=0;i<MAX_INVENTORY;i++) {
id = sd->status.inventory[i].nameid;
sd->inventory_data[i] = id?itemdb_search(id):NULL;
- if(sd->inventory_data[i] && sd->inventory_data[i]->delay > 0) { // Load delays
- sd->item_delay[item_delays].nameid = sd->inventory_data[i]->nameid;
- sd->item_delay[item_delays].tick = 0;
- ++item_delays;
- }
}
return 0;
}
@@ -612,7 +605,7 @@ int pc_setequipindex(struct map_session_data *sd)
if( sd->status.inventory[i].equip & EQP_HAND_L )
{
- if( sd->inventory_data[i] && sd->inventory_data[i]->type == 4 )
+ if( sd->inventory_data[i] && sd->inventory_data[i]->type == IT_WEAPON )
sd->weapontype2 = sd->inventory_data[i]->look;
else
sd->weapontype2 = 0;
@@ -847,6 +840,23 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->class_ = MAPID_NOVICE;
} else
sd->class_ = i;
+
+ // Checks and fixes to character status data, that are required
+ // in case of configuration change or stuff, which cannot be
+ // checked on char-server.
+ if( sd->status.hair < MIN_HAIR_STYLE || sd->status.hair > MAX_HAIR_STYLE )
+ {
+ sd->status.hair = MIN_HAIR_STYLE;
+ }
+ if( sd->status.hair_color < MIN_HAIR_COLOR || sd->status.hair_color > MAX_HAIR_COLOR )
+ {
+ sd->status.hair_color = MIN_HAIR_COLOR;
+ }
+ if( sd->status.clothes_color < MIN_CLOTH_COLOR || sd->status.clothes_color > MAX_CLOTH_COLOR )
+ {
+ sd->status.clothes_color = MIN_CLOTH_COLOR;
+ }
+
//Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
if(!sd->status.hp) pc_setdead(sd);
sd->state.connect_new = 1;
@@ -910,11 +920,11 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
sd->hate_mob[i] = -1;
// ʒu̐ݒ
- if ((i=pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, 0)) != 0) {
+ if ((i=pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
// try warping to a default map instead (church graveyard)
- if (pc_setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, 0) != 0) {
+ if (pc_setpos(sd, mapindex_name2id(MAP_PRONTERA), 273, 354, CLR_OUTSIGHT) != 0) {
// if we fail again
clif_authfail_fd(sd->fd, 0);
return false;
@@ -1037,7 +1047,7 @@ int pc_reg_received(struct map_session_data *sd)
}
//SG map and mob read [Komurka]
- for(i=0;i<3;i++) //for now - someone need to make reading from txt/sql
+ for(i=0;i<MAX_PC_FEELHATE;i++) //for now - someone need to make reading from txt/sql
{
if ((j = pc_readglobalreg(sd,sg_info[i].feel_var))!=0) {
sd->feel_map[i].index = j;
@@ -1206,7 +1216,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
f = 1;
if(!battle_config.skillfree) {
- for(j = 0; j < 5; j++) {
+ for(j = 0; j < MAX_PC_SKILL_REQUIRE; j++) {
if((k=skill_tree[c][i].need[j].id))
{
if (!sd->status.skill[k].id || sd->status.skill[k].flag == 13)
@@ -1303,7 +1313,7 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill)
if( sd->status.skill[id].id ) //Already learned
continue;
- for( j = 0; j < 5; j++ )
+ for( j = 0; j < MAX_PC_SKILL_REQUIRE; j++ )
{
if( (k = skill_tree[c][i].need[j].id) )
{
@@ -1439,7 +1449,7 @@ int pc_disguise(struct map_session_data *sd, int class_)
if (sd->bl.prev != NULL) {
pc_stop_walking(sd, 0);
- clif_clearunit_area(&sd->bl, 0);
+ clif_clearunit_area(&sd->bl, CLR_OUTSIGHT);
}
if (!class_) {
@@ -1507,13 +1517,7 @@ static int pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short
for( i = 0; i < max && spell[i].id; i++ )
{
- if( spell[i].flag == src_skill && spell[i].id == id && spell[i].lv == lv && (spell[i].card_id == card_id || spell[i].rate <= 0 || rate < 0) )
- {
- if( !battle_config.autospell_stacking && spell[i].rate > 0 && rate > 0 )
- return 0;
- rate += spell[i].rate;
- break;
- }
+ ; // each autospell works independently
}
if( i == max )
@@ -2358,6 +2362,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->add_heal2_rate += val;
break;
+ case SP_ADD_ITEM_HEAL_RATE:
+ if(sd->state.lr_flag != 2)
+ sd->itemhealrate2 += val;
+ break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
break;
@@ -3195,6 +3203,9 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
nullpo_ret(sd);
+ if(amount > MAX_AMOUNT)
+ return ADDITEM_OVERAMOUNT;
+
if(!itemdb_isstackable(nameid))
return ADDITEM_NEW;
@@ -3206,8 +3217,6 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
}
}
- if(amount > MAX_AMOUNT)
- return ADDITEM_OVERAMOUNT;
return ADDITEM_NEW;
}
@@ -3536,7 +3545,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( item == NULL )
return 0;
//Not consumable item
- if( item->type != IT_HEALING && item->type != IT_USABLE )
+ if( item->type != IT_HEALING && item->type != IT_USABLE && item->type != IT_CASH )
return 0;
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
@@ -3662,7 +3671,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
*------------------------------------------*/
int pc_useitem(struct map_session_data *sd,int n)
{
- unsigned int delay, tick = gettick();
+ unsigned int tick = gettick();
int amount, i, nameid;
struct script_code *script;
@@ -3691,13 +3700,6 @@ int pc_useitem(struct map_session_data *sd,int n)
// Store information for later use before it is lost (via pc_delitem) [Paradox924X]
nameid = sd->inventory_data[n]->nameid;
- delay = sd->inventory_data[n]->delay;
-
- if( sd->inventory_data[n]->delay > 0 ) { // Check if there is a delay on this item [Paradox924X]
- ARR_FIND(0, item_delays, i, sd->item_delay[i].nameid == nameid);
- if( i < item_delays && DIFF_TICK(sd->item_delay[i].tick, tick) > 0 )
- return 0; // Delay has not expired yet
- }
//Since most delay-consume items involve using a "skill-type" target cursor,
//perform a skill-use check before going through. [Skotlex]
@@ -3706,6 +3708,27 @@ int pc_useitem(struct map_session_data *sd,int n)
if( sd->inventory_data[n]->flag.delay_consume && ( sd->ud.skilltimer != -1 /*|| !status_check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0)*/ ) )
return 0;
+ if( sd->inventory_data[n]->delay > 0 ) { // Check if there is a delay on this item [Paradox924X]
+ ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid || !sd->item_delay[i].nameid);
+ if( i < MAX_ITEMDELAYS )
+ {
+ if( sd->item_delay[i].nameid )
+ {// found
+ if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 )
+ return 0; // Delay has not expired yet
+ }
+ else
+ {// not yet used item (all slots are initially empty)
+ sd->item_delay[i].nameid = nameid;
+ }
+ sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
+ }
+ else
+ {// should not happen
+ ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id);
+ }
+ }
+
sd->itemid = sd->status.inventory[n].nameid;
sd->itemindex = n;
if(sd->catch_target_class != -1) //Abort pet catching.
@@ -3741,10 +3764,8 @@ int pc_useitem(struct map_session_data *sd,int n)
//Update item use time.
sd->canuseitem_tick = tick + battle_config.item_use_interval;
- if( itemdb_iscashfood(sd->status.inventory[n].nameid) )
+ if( itemdb_iscashfood(nameid) )
sd->canusecashfood_tick = tick + battle_config.cashfood_use_interval;
- if( delay > 0 && i < item_delays )
- sd->item_delay[i].tick = tick + delay;
run_script(script,0,sd->bl.id,fake_nd->bl.id);
potion_flag = 0;
@@ -4038,7 +4059,7 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
* 1 - Invalid map index.
* 2 - Map not in this map-server, and failed to locate alternate map-server.
*------------------------------------------*/
-int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, uint8 clrtype)
+int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype)
{
struct party_data *p;
int m;
@@ -4196,7 +4217,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
/*==========================================
* PC̃_?v
*------------------------------------------*/
-int pc_randomwarp(struct map_session_data *sd, int type)
+int pc_randomwarp(struct map_session_data *sd, clr_type type)
{
int x,y,i=0;
int m;
@@ -4219,6 +4240,45 @@ int pc_randomwarp(struct map_session_data *sd, int type)
return 0;
}
+
+/// Warps one player to another.
+/// @param sd player to warp.
+/// @param pl_sd player to warp to.
+int pc_warpto(struct map_session_data* sd, struct map_session_data* pl_sd)
+{
+ if( map[sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -2;
+ }
+
+ if( map[pl_sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -3;
+ }
+
+ return pc_setpos(sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
+}
+
+
+/// Recalls one player to another.
+/// @param sd player to warp to.
+/// @param pl_sd player to warp.
+int pc_recall(struct map_session_data* sd, struct map_session_data* pl_sd)
+{
+ if( map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -2;
+ }
+
+ if( map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd) )
+ {
+ return -3;
+ }
+
+ return pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
+}
+
+
/*==========================================
* Records a memo point at sd's current position
* pos - entry to replace, (-1: shift oldest entry out)
@@ -4704,7 +4764,7 @@ int pc_follow_timer(int tid, unsigned int tick, int id, intptr data)
if (!check_distance_bl(&sd->bl, tbl, 5))
unit_walktobl(&sd->bl, tbl, 5, 0);
} else
- pc_setpos(sd, map_id2index(tbl->m), tbl->x, tbl->y, 3);
+ pc_setpos(sd, map_id2index(tbl->m), tbl->x, tbl->y, CLR_TELEPORT);
}
sd->followtimer = add_timer(
tick + 1000, // increase time a bit to loosen up map's load
@@ -4767,6 +4827,7 @@ int pc_checkbaselevelup(struct map_session_data *sd)
clif_updatestatus(sd,SP_STATUSPOINT);
clif_updatestatus(sd,SP_BASELEVEL);
+ clif_updatestatus(sd,SP_BASEEXP);
clif_updatestatus(sd,SP_NEXTBASEEXP);
status_calc_pc(sd,0);
status_percent_heal(&sd->bl,100,100);
@@ -4781,7 +4842,7 @@ int pc_checkbaselevelup(struct map_session_data *sd)
if (sd->state.snovice_dead_flag)
sd->state.snovice_dead_flag = 0; //Reenable steelbody resurrection on dead.
} else
- if((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON || (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR)
+ if( (sd->class_&MAPID_BASEMASK) == MAPID_TAEKWON )
{
sc_start(&sd->bl,status_skill2sc(AL_INCAGI),100,10,600000);
sc_start(&sd->bl,status_skill2sc(AL_BLESSING),100,10,600000);
@@ -4814,6 +4875,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
} while ((next=pc_nextjobexp(sd)) > 0 && sd->status.job_exp >= next);
clif_updatestatus(sd,SP_JOBLEVEL);
+ clif_updatestatus(sd,SP_JOBEXP);
clif_updatestatus(sd,SP_NEXTJOBEXP);
clif_updatestatus(sd,SP_SKILLPOINT);
status_calc_pc(sd,0);
@@ -5272,8 +5334,8 @@ int pc_resetlvl(struct map_session_data* sd,int type)
sd->status.skill_point=0;
sd->status.base_level=1;
sd->status.job_level=1;
- sd->status.base_exp=sd->status.base_exp=0;
- sd->status.job_exp=sd->status.job_exp=0;
+ sd->status.base_exp=0;
+ sd->status.job_exp=0;
if(sd->sc.option !=0)
sd->sc.option = 0;
@@ -5317,6 +5379,8 @@ int pc_resetlvl(struct map_session_data* sd,int type)
clif_updatestatus(sd,SP_BASELEVEL);
clif_updatestatus(sd,SP_JOBLEVEL);
clif_updatestatus(sd,SP_STATUSPOINT);
+ clif_updatestatus(sd,SP_BASEEXP);
+ clif_updatestatus(sd,SP_JOBEXP);
clif_updatestatus(sd,SP_NEXTBASEEXP);
clif_updatestatus(sd,SP_NEXTJOBEXP);
clif_updatestatus(sd,SP_SKILLPOINT);
@@ -5498,7 +5562,7 @@ int pc_resetfeel(struct map_session_data* sd)
int i;
nullpo_ret(sd);
- for (i=0; i<3; i++)
+ for (i=0; i<MAX_PC_FEELHATE; i++)
{
sd->feel_map[i].m = -1;
sd->feel_map[i].index = 0;
@@ -5563,7 +5627,7 @@ int pc_skillheal2_bonus(struct map_session_data *sd, int skill_num)
return bonus;
}
-void pc_respawn(struct map_session_data* sd, uint8 clrtype)
+void pc_respawn(struct map_session_data* sd, clr_type clrtype)
{
if( !pc_isdead(sd) )
return; // not applicable
@@ -5582,7 +5646,7 @@ static int pc_respawn_timer(int tid, unsigned int tick, int id, intptr data)
if( sd != NULL )
{
sd->pvp_point=0;
- pc_respawn(sd,0);
+ pc_respawn(sd,CLR_OUTSIGHT);
}
return 0;
@@ -5656,7 +5720,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
}
pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1);
- pc_setglobalreg(sd,"killerrid",src?src->id:0);
+ pc_setparam(sd, SP_KILLERRID, src?src->id:0);
if( sd->state.bg_id )
{
struct battleground_data *bg;
@@ -5710,7 +5774,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
if (src && src->type == BL_PC)
{
struct map_session_data *ssd = (struct map_session_data *)src;
- pc_setglobalreg(ssd, "killedrid", sd->bl.id);
+ pc_setparam(ssd, SP_KILLEDRID, sd->bl.id);
npc_script_event(ssd, NPCE_KILLPC);
if (battle_config.pk_mode&2) {
@@ -5966,6 +6030,8 @@ int pc_readparam(struct map_session_data* sd,int type)
case SP_KARMA: val = sd->status.karma; break;
case SP_MANNER: val = sd->status.manner; break;
case SP_FAME: val = sd->status.fame; break;
+ case SP_KILLERRID: val = sd->killerrid; break;
+ case SP_KILLEDRID: val = sd->killedrid; break;
}
return val;
@@ -5992,11 +6058,15 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
}
sd->status.base_level = (unsigned int)val;
sd->status.base_exp = 0;
- clif_updatestatus(sd, SP_BASELEVEL);
+ // clif_updatestatus(sd, SP_BASELEVEL); // Gets updated at the bottom
clif_updatestatus(sd, SP_NEXTBASEEXP);
clif_updatestatus(sd, SP_STATUSPOINT);
clif_updatestatus(sd, SP_BASEEXP);
status_calc_pc(sd, 0);
+ if(sd->status.party_id)
+ {
+ party_send_levelup(sd);
+ }
break;
case SP_JOBLEVEL:
if ((unsigned int)val >= sd->status.job_level) {
@@ -6006,11 +6076,10 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
}
sd->status.job_level = (unsigned int)val;
sd->status.job_exp = 0;
- clif_updatestatus(sd, SP_JOBLEVEL);
+ // clif_updatestatus(sd, SP_JOBLEVEL); // Gets updated at the bottom
clif_updatestatus(sd, SP_NEXTJOBEXP);
clif_updatestatus(sd, SP_JOBEXP);
status_calc_pc(sd, 0);
- clif_updatestatus(sd,type);
break;
case SP_SKILLPOINT:
sd->status.skill_point = val;
@@ -6083,6 +6152,15 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
case SP_FAME:
sd->status.fame = val;
break;
+ case SP_KILLERRID:
+ sd->killerrid = val;
+ return 1;
+ case SP_KILLEDRID:
+ sd->killedrid = val;
+ return 1;
+ default:
+ ShowError("pc_setparam: Attempted to set unknown parameter '%d'.\n", type);
+ return 0;
}
clif_updatestatus(sd,type);
@@ -6122,6 +6200,8 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
if (potion_flag > 1)
bonus += bonus*(potion_flag-1)*50/100;
+ //All item bonuses.
+ bonus += sd->itemhealrate2;
//Item Group bonuses
bonus += bonus*itemdb_group_bonus(sd, itemid)/100;
//Individual item bonuses.
@@ -6358,10 +6438,8 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
switch(type){
case LOOK_HAIR: //Use the battle_config limits! [Skotlex]
- if (val < battle_config.min_hair_style)
- val = battle_config.min_hair_style;
- else if (val > battle_config.max_hair_style)
- val = battle_config.max_hair_style;
+ val = cap_value(val, MIN_HAIR_STYLE, MAX_HAIR_STYLE);
+
if (sd->status.hair != val)
{
sd->status.hair=val;
@@ -6383,10 +6461,8 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
sd->status.head_mid=val;
break;
case LOOK_HAIR_COLOR: //Use the battle_config limits! [Skotlex]
- if (val < battle_config.min_hair_color)
- val = battle_config.min_hair_color;
- else if (val > battle_config.max_hair_color)
- val = battle_config.max_hair_color;
+ val = cap_value(val, MIN_HAIR_COLOR, MAX_HAIR_COLOR);
+
if (sd->status.hair_color != val)
{
sd->status.hair_color=val;
@@ -6396,10 +6472,8 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
}
break;
case LOOK_CLOTHES_COLOR: //Use the battle_config limits! [Skotlex]
- if (val < battle_config.min_cloth_color)
- val = battle_config.min_cloth_color;
- else if (val > battle_config.max_cloth_color)
- val = battle_config.max_cloth_color;
+ val = cap_value(val, MIN_CLOTH_COLOR, MAX_CLOTH_COLOR);
+
sd->status.clothes_color=val;
break;
case LOOK_SHIELD:
@@ -7099,10 +7173,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
if(id) {
if(id->type == IT_WEAPON) {
sd->status.shield = 0;
- if(sd->status.inventory[n].equip == EQP_HAND_L)
- sd->weapontype2 = id->look;
- else
- sd->weapontype2 = 0;
+ sd->weapontype2 = id->look;
}
else
if(id->type == IT_ARMOR) {
@@ -7934,17 +8005,61 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max)
/*==========================================
* DB reading.
* exp.txt - required experience values
- * job_db1.txt - weight, hp, sp, aspd
- * job_db2.txt - job level stat bonuses
* skill_tree.txt - skill tree for every class
* attr_fix.txt - elemental adjustment table
- * size_fix.txt - size adjustment table for weapons
- * refine_db.txt - refining data table
+ * statpoint.txt - status points per base level
*------------------------------------------*/
+static bool pc_readdb_skilltree(char* fields[], int columns, int current)
+{
+ unsigned char joblv = 0, skilllv;
+ unsigned short skillid;
+ int idx, class_;
+ unsigned int i, offset = 3, skillidx;
+
+ class_ = atoi(fields[0]);
+ skillid = (unsigned short)atoi(fields[1]);
+ skilllv = (unsigned char)atoi(fields[2]);
+
+ if(columns==4+MAX_PC_SKILL_REQUIRE*2)
+ {// job level requirement extra column
+ joblv = (unsigned char)atoi(fields[3]);
+ offset++;
+ }
+
+ if(!pcdb_checkid(class_))
+ {
+ ShowWarning("pc_readdb_skilltree: Invalid job class %d specified.\n", class_);
+ return false;
+ }
+ idx = pc_class2idx(class_);
+
+ //This is to avoid adding two lines for the same skill. [Skotlex]
+ ARR_FIND( 0, MAX_SKILL_TREE, skillidx, skill_tree[idx][skillidx].id == 0 || skill_tree[idx][skillidx].id == skillid );
+ if( skillidx == MAX_SKILL_TREE )
+ {
+ ShowWarning("pc_readdb_skilltree: Unable to load skill %hu into job %d's tree. Maximum number of skills per class has been reached.\n", skillid, class_);
+ return false;
+ }
+ else if(skill_tree[idx][skillidx].id)
+ {
+ ShowNotice("pc_readdb_skilltree: Overwriting skill %hu for job class %d.\n", skillid, class_);
+ }
+
+ skill_tree[idx][skillidx].id = skillid;
+ skill_tree[idx][skillidx].max = skilllv;
+ skill_tree[idx][skillidx].joblv = joblv;
+
+ for(i = 0; i < MAX_PC_SKILL_REQUIRE; i++)
+ {
+ skill_tree[idx][skillidx].need[i].id = atoi(fields[i*2+offset]);
+ skill_tree[idx][skillidx].need[i].lv = atoi(fields[i*2+offset+1]);
+ }
+ return true;
+}
+
int pc_readdb(void)
{
int i,j,k;
- unsigned int stat;
FILE *fp;
char line[24000],*p;
@@ -8033,53 +8148,7 @@ int pc_readdb(void)
// XLc?
memset(skill_tree,0,sizeof(skill_tree));
- sprintf(line, "%s/skill_tree.txt", db_path);
- fp=fopen(line,"r");
- if(fp==NULL){
- ShowError("can't read %s\n", line);
- return 1;
- }
-
- while(fgets(line, sizeof(line), fp))
- {
- char *split[50];
- int f=0, m=3, idx;
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line;j<14 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(j<13)
- continue;
- if (j == 14) {
- f=1; // MinJobLvl has been added
- m++;
- }
- // check for bounds [celest]
- idx = atoi(split[0]);
- if(!pcdb_checkid(idx))
- continue;
- idx = pc_class2idx(idx);
- k = atoi(split[1]); //This is to avoid adding two lines for the same skill. [Skotlex]
- ARR_FIND( 0, MAX_SKILL_TREE, j, skill_tree[idx][j].id == 0 || skill_tree[idx][j].id == k );
- if( j == MAX_SKILL_TREE )
- {
- ShowWarning("Unable to load skill %d into job %d's tree. Maximum number of skills per class has been reached.\n", k, atoi(split[0]));
- continue;
- }
- skill_tree[idx][j].id=k;
- skill_tree[idx][j].max=atoi(split[2]);
- if (f) skill_tree[idx][j].joblv=atoi(split[3]);
-
- for(k=0;k<5;k++){
- skill_tree[idx][j].need[k].id=atoi(split[k*2+m]);
- skill_tree[idx][j].need[k].lv=atoi(split[k*2+m+1]);
- }
- }
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","skill_tree.txt");
+ sv_readdb(db_path, "skill_tree.txt", ',', 3+MAX_PC_SKILL_REQUIRE*2, 4+MAX_PC_SKILL_REQUIRE*2, -1, &pc_readdb_skilltree);
// ?Ce?u
for(i=0;i<4;i++)
@@ -8135,7 +8204,6 @@ int pc_readdb(void)
// XLc?
memset(statp,0,sizeof(statp));
i=1;
- stat = 45; // base points
sprintf(line, "%s/statpoint.txt", db_path);
fp=fopen(line,"r");
if(fp == NULL){
@@ -8144,6 +8212,7 @@ int pc_readdb(void)
} else {
while(fgets(line, sizeof(line), fp))
{
+ int stat;
if(line[0]=='/' && line[1]=='/')
continue;
if ((stat=strtoul(line,NULL,10))<0)
@@ -8157,10 +8226,9 @@ int pc_readdb(void)
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint.txt");
}
// generate the remaining parts of the db if necessary
- for (; i <= MAX_LEVEL; i++) {
- stat += (i+15)/5;
- statp[i] = stat;
- }
+ statp[0] = 45; // seed value
+ for (; i <= MAX_LEVEL; i++)
+ statp[i] = statp[i-1] + (i-1+15)/5;
return 0;
}
@@ -8168,30 +8236,60 @@ int pc_readdb(void)
// Read MOTD on startup. [Valaris]
int pc_read_motd(void)
{
- FILE *fp;
- int ln=0,i=0;
+ char* buf, * ptr;
+ unsigned int lines = 0, entries = 0;
+ size_t len;
+ FILE* fp;
+
+ // clear old MOTD
+ memset(motd_text, 0, sizeof(motd_text));
+
+ // read current MOTD
+ if( ( fp = fopen(motd_txt, "r") ) != NULL )
+ {
+ while( entries < MOTD_LINE_SIZE && fgets(motd_text[entries], sizeof(motd_text[entries]), fp) )
+ {
+ lines++;
+
+ buf = motd_text[entries];
- memset(motd_text,0,sizeof(motd_text));
- if ((fp = fopen(motd_txt, "r")) != NULL) {
- while ((ln < MOTD_LINE_SIZE) && fgets(motd_text[ln], sizeof(motd_text[ln])-1, fp) != NULL) {
- if(motd_text[ln][0] == '/' && motd_text[ln][1] == '/')
+ if( buf[0] == '/' && buf[1] == '/' )
+ {
continue;
- for(i=0; motd_text[ln][i]; i++) {
- if (motd_text[ln][i] == '\r' || motd_text[ln][i]== '\n') {
- if(i)
- motd_text[ln][i]=0;
- else
- motd_text[ln][0]=' ';
- ln++;
- break;
+ }
+
+ len = strlen(buf);
+
+ while( len && ( buf[len-1] == '\r' || buf[len-1] == '\n' ) )
+ {// strip trailing EOL characters
+ len--;
+ }
+
+ if( len )
+ {
+ buf[len] = 0;
+
+ if( ( ptr = strstr(buf, " :") ) != NULL && ptr-buf >= NAME_LENGTH )
+ {// crashes newer clients
+ ShowWarning("Found sequence '"CL_WHITE" :"CL_RESET"' on line '"CL_WHITE"%u"CL_RESET"' in '"CL_WHITE"%s"CL_RESET"'. This can cause newer clients to crash.\n", lines, motd_txt);
}
}
+ else
+ {// empty line
+ buf[0] = ' ';
+ buf[1] = 0;
+ }
+ entries++;
}
fclose(fp);
+
+ ShowStatus("Done reading '"CL_WHITE"%u"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", entries, motd_txt);
}
else
- ShowWarning("In function pc_read_motd() -> File '"CL_WHITE"%s"CL_RESET"' not found.\n", motd_txt);
-
+ {
+ ShowWarning("File '"CL_WHITE"%s"CL_RESET"' not found.\n", motd_txt);
+ }
+
return 0;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 7bf3a050f..2921b4527 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -17,6 +17,8 @@
#include "mob.h"
#define MAX_PC_BONUS 10
+#define MAX_PC_SKILL_REQUIRE 5
+#define MAX_PC_FEELHATE 3
struct weapon_data {
int atkmods[3];
@@ -53,6 +55,7 @@ struct weapon_data {
struct s_autospell {
short id, lv, rate, card_id, flag;
+ bool lock; // bAutoSpellOnSkill: blocks autospell from triggering again, while being executed
};
struct s_addeffect {
@@ -132,7 +135,6 @@ struct map_session_data {
short pmap; // Previous map on Map Change
struct guild *gmaster_flag;
unsigned int bg_id;
- unsigned skillonskill : 1;
unsigned short user_font;
unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish]
} state;
@@ -290,6 +292,7 @@ struct map_session_data {
int crit_atk_rate;
int classchange; // [Valaris]
int speed_rate, speed_add_rate, aspd_add;
+ int itemhealrate2; // [Epoque] Increase heal rate of all healing items.
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
short splash_range, splash_add_range;
@@ -378,6 +381,8 @@ struct map_session_data {
int duel_group; // duel vars [LuzZza]
int duel_invite;
+ int killerrid, killedrid;
+
char away_message[128]; // [LuzZza]
int cashPoints, kafraPoints;
@@ -543,7 +548,7 @@ bool pc_can_give_items(int level);
int pc_setrestartvalue(struct map_session_data *sd,int type);
int pc_makesavestatus(struct map_session_data *);
-void pc_respawn(struct map_session_data* sd, uint8 clrtype);
+void pc_respawn(struct map_session_data* sd, clr_type clrtype);
int pc_setnewpc(struct map_session_data*,int,int,int,unsigned int,int,int);
bool pc_authok(struct map_session_data* sd, int, time_t, int gmlevel, struct mmo_charstatus* status);
void pc_authfail(struct map_session_data *);
@@ -564,11 +569,12 @@ int pc_clean_skilltree(struct map_session_data *sd);
#define pc_checkoverhp(sd) (sd->battle_status.hp == sd->battle_status.max_hp)
#define pc_checkoversp(sd) (sd->battle_status.sp == sd->battle_status.max_sp)
-int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, uint8 clrtype);
+int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y, clr_type clrtype);
int pc_setsavepoint(struct map_session_data*,short,int,int);
-int pc_randomwarp(struct map_session_data *sd,int type);
+int pc_randomwarp(struct map_session_data *sd,clr_type type);
+int pc_warpto(struct map_session_data* sd, struct map_session_data* pl_sd);
+int pc_recall(struct map_session_data* sd, struct map_session_data* pl_sd);
int pc_memo(struct map_session_data* sd, int pos);
-int pc_remove_map(struct map_session_data *sd,int clrtype);
int pc_checkadditem(struct map_session_data*,int,int);
int pc_inventoryblank(struct map_session_data*);
@@ -720,7 +726,7 @@ struct skill_tree_entry {
struct {
short id;
unsigned char lv;
- } need[5];
+ } need[MAX_PC_SKILL_REQUIRE];
}; // Celest
extern struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE];
@@ -732,7 +738,7 @@ struct sg_data {
char hate_var[NAME_LENGTH];
int (*day_func)(void);
};
-extern const struct sg_data sg_info[3];
+extern const struct sg_data sg_info[MAX_PC_FEELHATE];
void pc_setinvincibletimer(struct map_session_data* sd, int val);
void pc_delinvincibletimer(struct map_session_data* sd);
diff --git a/src/map/pet.c b/src/map/pet.c
index d02f93446..843f1cc11 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -306,7 +306,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
map_addflooritem(&tmp_item,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
pd->pet.incuvate = 1;
- unit_free(&pd->bl,0);
+ unit_free(&pd->bl,CLR_OUTSIGHT);
status_calc_pc(sd,0);
sd->status.pet_id = 0;
@@ -509,7 +509,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
if (sd->catch_target_class == 0 && !(md->status.mode&MD_BOSS))
sd->catch_target_class = md->class_;
if(i < 0 || sd->catch_target_class != md->class_) {
- clif_emotion(&md->bl, 7); //mob will do /ag if wrong lure is used on them.
+ clif_emotion(&md->bl, E_AG); //mob will do /ag if wrong lure is used on them.
clif_pet_roulette(sd,0);
sd->catch_target_class = -1;
return 1;
@@ -523,7 +523,7 @@ int pet_catch_process2(struct map_session_data* sd, int target_id)
if(rand()%10000 < pet_catch_rate)
{
- unit_remove_map(&md->bl,0);
+ unit_remove_map(&md->bl,CLR_OUTSIGHT);
status_kill(&md->bl);
clif_pet_roulette(sd,1);
intif_create_pet(sd->status.account_id,sd->status.char_id,pet_db[i].class_,mob_db(pet_db[i].class_)->lv,
@@ -1100,7 +1100,7 @@ int pet_recovery_timer(int tid, unsigned int tick, int id, intptr data)
//Detoxify is chosen for now.
clif_skill_nodamage(&pd->bl,&sd->bl,TF_DETOXIFY,1,1);
status_change_end(&sd->bl,pd->recovery->type,-1);
- clif_emotion(&pd->bl, 33);
+ clif_emotion(&pd->bl, E_OK);
}
pd->recovery->timer = INVALID_TIMER;
diff --git a/src/map/script.c b/src/map/script.c
index c71debc0d..773f8d6c4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -67,7 +67,6 @@
// - 'function FuncName;' function declarations reverting to global functions
// if local label isn't found
// - join callfunc and callsub's functionality
-// - use script_op2name in the DEBUG_DISASM block
// - remove dynamic allocation in add_word()
// - remove GETVALUE / SETVALUE
// - clean up the set_reg / set_val / setd_sub mess
@@ -160,6 +159,9 @@
if( script_hasdata(st,n) ) \
(t)=script_getnum(st,n);
+/// Maximum amount of elements in script arrays
+#define SCRIPT_MAX_ARRAYSIZE 128
+
#define SCRIPT_BLOCK_SIZE 512
enum { LABEL_NEXTLINE=1,LABEL_START };
@@ -210,6 +212,7 @@ DBMap* script_get_userfunc_db(){ return userfunc_db; }
static DBMap* autobonus_db=NULL; // char* script -> char* bytecode
struct Script_Config script_config = {
+ 1, // warn_func_mismatch_argtypes
1, 65535, 2048, //warn_func_mismatch_paramnum/check_cmdcount/check_gotocount
0, INT_MAX, // input_min_value/input_max_value
"OnPCDieEvent", //die_event_name
@@ -281,13 +284,11 @@ typedef struct script_function {
extern script_function buildin_func[];
static struct linkdb_node* sleep_db;// int oid -> struct script_state*
-uint32 crctab[256];
/*==========================================
* [Jvg^Cv錾 (Kvȕ̂)
*------------------------------------------*/
const char* parse_subexpr(const char* p,int limit);
-void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
enum {
@@ -515,6 +516,44 @@ static void script_reportdata(struct script_data* data)
}
}
+
+/// Reports on the console information about the current built-in function.
+static void script_reportfunc(struct script_state* st)
+{
+ int i, params, id;
+ struct script_data* data;
+
+ if( !script_hasdata(st,0) )
+ {// no stack
+ return;
+ }
+
+ data = script_getdata(st,0);
+
+ if( !data_isreference(data) || str_data[reference_getid(data)].type != C_FUNC )
+ {// script currently not executing a built-in function or corrupt stack
+ return;
+ }
+
+ id = reference_getid(data);
+ params = script_lastdata(st)-1;
+
+ if( params > 0 )
+ {
+ ShowDebug("Function: %s (%d parameter%s):\n", get_str(id), params, ( params == 1 ) ? "" : "s");
+
+ for( i = 2; i <= script_lastdata(st); i++ )
+ {
+ script_reportdata(script_getdata(st,i));
+ }
+ }
+ else
+ {
+ ShowDebug("Function: %s (no parameters)\n", get_str(id));
+ }
+}
+
+
/*==========================================
* G[bZ[Wo
*------------------------------------------*/
@@ -741,8 +780,8 @@ void set_label(int l,int pos, const char* script_pos)
{
int i,next;
- if(str_data[l].type==C_INT || str_data[l].type==C_PARAM)
- { //Prevent overwriting constants values and parameters [Skotlex]
+ if(str_data[l].type==C_INT || str_data[l].type==C_PARAM || str_data[l].type==C_FUNC)
+ { //Prevent overwriting constants values, parameters and built-in functions [Skotlex]
disp_error_message("set_label: invalid label name",script_pos);
return;
}
@@ -842,7 +881,7 @@ int add_word(const char* p)
disp_error_message("script:add_word: invalid word. A word consists of undercores and/or alfanumeric characters, and valid variable prefixes/postfixes.", p);
// Duplicate the word
- CREATE(word, char, len+1);
+ word = aMalloc(len+1);
memcpy(word, p, len);
word[len] = 0;
@@ -1502,7 +1541,7 @@ const char* parse_syntax(const char* p)
// function declaration - just register the name
int l;
l = add_word(func_name);
- if( str_data[l].type == C_NOP )//## ??? [FlavioJS]
+ if( str_data[l].type == C_NOP )// set type only if the name did not exist before
str_data[l].type = C_USERFUNC;
// if, for , while ̕‚
@@ -1528,7 +1567,7 @@ const char* parse_syntax(const char* p)
// Set the position of the function (label)
l=add_word(func_name);
- if( str_data[l].type == C_NOP )//## ??? [FlavioJS]
+ if( str_data[l].type == C_NOP )// set type only if the name did not exist before
str_data[l].type = C_USERFUNC;
set_label(l, script_pos, p);
if( parse_options&SCRIPT_USE_LABEL_DB )
@@ -2078,54 +2117,30 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
{
int i = 0,j;
while(i < script_pos) {
- ShowMessage("%06x ",i);
+ c_op op = get_com(script_buf,&i);
+
+ ShowMessage("%06x %s", i, script_op2name(op));
j = i;
- switch(get_com(script_buf,&i)) {
- case C_EOL: printf("C_EOL"); break;
- case C_INT: printf("C_INT %d",get_num(script_buf,&i)); break;
+ switch(op) {
+ case C_INT:
+ ShowMessage(" %d", get_num(script_buf,&i));
+ break;
case C_POS:
- ShowMessage("C_POS 0x%06x",*(int*)(script_buf+i)&0xffffff);
+ ShowMessage(" 0x%06x", *(int*)(script_buf+i)&0xffffff);
i += 3;
break;
case C_NAME:
j = (*(int*)(script_buf+i)&0xffffff);
- ShowMessage("C_NAME %s",j == 0xffffff ? "?? unknown ??" : get_str(j));
+ ShowMessage(" %s", ( j == 0xffffff ) ? "?? unknown ??" : get_str(j));
i += 3;
break;
- case C_ARG: ShowMessage("C_ARG"); break;
- case C_FUNC: ShowMessage("C_FUNC"); break;
- case C_ADD: ShowMessage("C_ADD"); break;
- case C_SUB: ShowMessage("C_SUB"); break;
- case C_MUL: ShowMessage("C_MUL"); break;
- case C_DIV: ShowMessage("C_DIV"); break;
- case C_MOD: ShowMessage("C_MOD"); break;
- case C_EQ: ShowMessage("C_EQ"); break;
- case C_NE: ShowMessage("C_NE"); break;
- case C_GT: ShowMessage("C_GT"); break;
- case C_GE: ShowMessage("C_GE"); break;
- case C_LT: ShowMessage("C_LT"); break;
- case C_LE: ShowMessage("C_LE"); break;
- case C_AND: ShowMessage("C_AND"); break;
- case C_OR: ShowMessage("C_OR"); break;
- case C_XOR: ShowMessage("C_XOR"); break;
- case C_LAND: ShowMessage("C_LAND"); break;
- case C_LOR: ShowMessage("C_LOR"); break;
- case C_R_SHIFT: ShowMessage("C_R_SHIFT"); break;
- case C_L_SHIFT: ShowMessage("C_L_SHIFT"); break;
- case C_NEG: ShowMessage("C_NEG"); break;
- case C_NOT: ShowMessage("C_NOT"); break;
- case C_LNOT: ShowMessage("C_LNOT"); break;
- case C_NOP: ShowMessage("C_NOP"); break;
- case C_OP3: ShowMessage("C_OP3"); break;
case C_STR:
j = strlen(script_buf + i);
- ShowMessage("C_STR %s",script_buf + i);
- i+= j+1;
+ ShowMessage(" %s", script_buf + i);
+ i += j+1;
break;
- default:
- ShowMessage("unknown");
}
- ShowMessage(CL_CLL "\n");
+ ShowMessage(CL_CLL"\n");
}
}
#endif
@@ -2144,6 +2159,7 @@ TBL_PC *script_rid2sd(struct script_state *st)
TBL_PC *sd=map_id2sd(st->rid);
if(!sd){
ShowError("script_rid2sd: fatal error ! player not attached!\n");
+ script_reportfunc(st);
script_reportsrc(st);
st->state = END;
}
@@ -2694,6 +2710,10 @@ struct script_state* script_alloc_state(struct script_code* script, int pos, int
/// @param st Script state
void script_free_state(struct script_state* st)
{
+ if(st->bk_st)
+ {// backup was not restored
+ ShowDebug("script_free_state: Previous script state lost (rid=%d, oid=%d, state=%d, bk_npcid=%d).\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid);
+ }
if( st->sleep.timer != INVALID_TIMER )
delete_timer(st->sleep.timer, run_script_timer);
script_free_vars(st->stack->var_function);
@@ -2977,6 +2997,94 @@ void op_1(struct script_state* st, int op)
}
+/// Checks the type of all arguments passed to a built-in function.
+///
+/// @param st Script state whose stack arguments should be inspected.
+/// @param func Built-in function for which the arguments are intended.
+static void script_check_buildin_argtype(struct script_state* st, int func)
+{
+ char type;
+ int idx, invalid = 0;
+ script_function* sf = &buildin_func[str_data[func].val];
+
+ for( idx = 2; script_hasdata(st, idx); idx++ )
+ {
+ struct script_data* data = script_getdata(st, idx);
+
+ type = sf->arg[idx-2];
+
+ if( type == '?' || type == '*' )
+ {// optional argument or unknown number of optional parameters ( no types are after this )
+ break;
+ }
+ else if( type == 0 )
+ {// more arguments than necessary ( should not happen, as it is checked before )
+ ShowWarning("Found more arguments than necessary.\n");
+ invalid++;
+ break;
+ }
+ else
+ {
+ const char* name = NULL;
+
+ if( data_isreference(data) )
+ {// get name for variables to determine the type they refer to
+ name = reference_getname(data);
+ }
+
+ switch( type )
+ {
+ case 'v':
+ if( !data_isstring(data) && !data_isint(data) && !data_isreference(data) )
+ {// variant
+ ShowWarning("Unexpected type for argument %d. Expected string, number or variable.\n", idx-1);
+ script_reportdata(data);
+ invalid++;
+ }
+ break;
+ case 's':
+ if( !data_isstring(data) && !( data_isreference(data) && is_string_variable(name) ) )
+ {// string
+ ShowWarning("Unexpected type for argument %d. Expected string.\n", idx-1);
+ script_reportdata(data);
+ invalid++;
+ }
+ break;
+ case 'i':
+ if( !data_isint(data) && !( data_isreference(data) && ( reference_toparam(data) || reference_toconstant(data) || !is_string_variable(name) ) ) )
+ {// int ( params and constants are always int )
+ ShowWarning("Unexpected type for argument %d. Expected number.\n", idx-1);
+ script_reportdata(data);
+ invalid++;
+ }
+ break;
+ case 'r':
+ if( !data_isreference(data) )
+ {// variables
+ ShowWarning("Unexpected type for argument %d. Expected variable.\n", idx-1);
+ script_reportdata(data);
+ invalid++;
+ }
+ break;
+ case 'l':
+ if( !data_islabel(data) && !data_isfunclabel(data) )
+ {// label
+ ShowWarning("Unexpected type for argument %d. Expected label.\n", idx-1);
+ script_reportdata(data);
+ invalid++;
+ }
+ break;
+ }
+ }
+ }
+
+ if(invalid)
+ {
+ ShowDebug("Function: %s\n", get_str(func));
+ script_reportsrc(st);
+ }
+}
+
/// Executes a buildin command.
/// Stack: C_NAME(<command>) C_ARG <arg0> <arg1> ... <argN>
@@ -3012,6 +3120,11 @@ int run_func(struct script_state *st)
return 1;
}
+ if( script_config.warn_func_mismatch_argtypes )
+ {
+ script_check_buildin_argtype(st, func);
+ }
+
if(str_data[func].func){
if (str_data[func].func(st)) //Report error
script_reportsrc(st);
@@ -3062,8 +3175,6 @@ int run_func(struct script_state *st)
/*==========================================
* script execution
*------------------------------------------*/
-void run_script_main(struct script_state *st);
-
void run_script(struct script_code *rootscript,int pos,int rid,int oid)
{
struct script_state *st;
@@ -3138,6 +3249,63 @@ int run_script_timer(int tid, unsigned int tick, int id, intptr data)
return 0;
}
+/// Detaches script state from possibly attached character and restores it's previous script if any.
+///
+/// @param st Script state to detach.
+/// @param dequeue_event Whether to schedule any queued events, when there was no previous script.
+static void script_detach_state(struct script_state* st, bool dequeue_event)
+{
+ struct map_session_data* sd;
+
+ if(st->rid && (sd = map_id2sd(st->rid))!=NULL)
+ {
+ sd->st = st->bk_st;
+ sd->npc_id = st->bk_npcid;
+
+ if(st->bk_st)
+ {
+ //Remove tag for removal.
+ st->bk_st = NULL;
+ st->bk_npcid = 0;
+ }
+ else if(dequeue_event)
+ {
+ npc_event_dequeue(sd);
+ }
+ }
+ else if(st->bk_st)
+ {// rid was set to 0, before detaching the script state
+ ShowError("script_detach_state: Found previous script state without attached player (rid=%d, oid=%d, state=%d, bk_npcid=%d)\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid);
+ script_reportsrc(st->bk_st);
+
+ script_free_state(st->bk_st);
+ st->bk_st = NULL;
+ }
+}
+
+/// Attaches script state to possibly attached character and backups it's previous script, if any.
+///
+/// @param st Script state to attach.
+static void script_attach_state(struct script_state* st)
+{
+ struct map_session_data* sd;
+
+ if(st->rid && (sd = map_id2sd(st->rid))!=NULL)
+ {
+ if(st!=sd->st)
+ {
+ if(st->bk_st)
+ {// there is already a backup
+ ShowDebug("script_free_state: Previous script state lost (rid=%d, oid=%d, state=%d, bk_npcid=%d).\n", st->bk_st->rid, st->bk_st->oid, st->bk_st->state, st->bk_npcid);
+ }
+ st->bk_st = sd->st;
+ st->bk_npcid = sd->npc_id;
+ }
+ sd->st = st;
+ sd->npc_id = st->oid;
+ }
+}
+
/*==========================================
* XNvg̎sC
*------------------------------------------*/
@@ -3146,22 +3314,10 @@ void run_script_main(struct script_state *st)
int cmdcount=script_config.check_cmdcount;
int gotocount=script_config.check_gotocount;
TBL_PC *sd;
- //For backing up purposes
- struct script_state *bk_st = NULL;
- int bk_npcid = 0;
struct script_stack *stack=st->stack;
struct npc_data *nd;
- sd = map_id2sd(st->rid);
-
- if(sd){
- if(sd->st != st){
- bk_st = sd->st;
- bk_npcid = sd->npc_id;
- }
- sd->st = st;
- sd->npc_id = st->oid;
- }
+ script_attach_state(st);
nd = map_id2nd(st->oid);
if( nd && map[nd->bl.m].instance_id > 0 )
@@ -3260,43 +3416,37 @@ void run_script_main(struct script_state *st)
if(st->sleep.tick > 0) {
//Restore previous script
- if (sd) {
- sd->st = bk_st;
- sd->npc_id = bk_npcid;
- bk_st = NULL; //Remove tag for removal.
- }
+ script_detach_state(st, false);
//Delay execution
- sd = map_id2sd(st->rid); // Refresh sd since script might have attached someone while running. [Inkfish]
+ sd = map_id2sd(st->rid); // Get sd since script might have attached someone while running. [Inkfish]
st->sleep.charid = sd?sd->status.char_id:0;
st->sleep.timer = add_timer(gettick()+st->sleep.tick,
run_script_timer, st->sleep.charid, (intptr)st);
linkdb_insert(&sleep_db, (void*)st->oid, st);
}
- else if(st->state != END && sd){
+ else if(st->state != END && st->rid){
//Resume later (st is already attached to player).
- if(bk_st) {
+ if(st->bk_st) {
ShowWarning("Unable to restore stack! Double continuation!\n");
//Report BOTH scripts to see if that can help somehow.
ShowDebug("Previous script (lost):\n");
- script_reportsrc(bk_st);
+ script_reportsrc(st->bk_st);
ShowDebug("Current script:\n");
script_reportsrc(st);
+
+ script_free_state(st->bk_st);
+ st->bk_st = NULL;
}
} else {
//Dispose of script.
- if (sd)
+ if ((sd = map_id2sd(st->rid))!=NULL)
{ //Restore previous stack and save char.
if(sd->state.using_fake_npc){
- clif_clearunit_single(sd->npc_id, 0, sd->fd);
+ clif_clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
}
//Restore previous script if any.
- sd->st = bk_st;
- sd->npc_id = bk_npcid;
- if (!bk_st)
- npc_event_dequeue(sd);
- else
- bk_st = NULL; //Remove tag for removal.
+ script_detach_state(st, true);
if (sd->state.reg_dirty&2)
intif_saveregistry(sd,2);
if (sd->state.reg_dirty&1)
@@ -3305,13 +3455,6 @@ void run_script_main(struct script_state *st)
script_free_state(st);
st = NULL;
}
-
- if (bk_st)
- { //Remove previous script
- script_free_state(bk_st);
- bk_st = NULL;
- }
-
}
int script_config_read(char *cfgName)
@@ -3349,6 +3492,9 @@ int script_config_read(char *cfgName)
else if(strcmpi(w1,"input_max_value")==0) {
script_config.input_max_value = config_switch(w2);
}
+ else if(strcmpi(w1,"warn_func_mismatch_argtypes")==0) {
+ script_config.warn_func_mismatch_argtypes = config_switch(w2);
+ }
else if(strcmpi(w1,"import")==0){
script_config_read(w2);
}
@@ -3401,6 +3547,74 @@ void script_add_autobonus(const char *autobonus)
}
}
+
+/// resets a temporary character array variable to given value
+void script_cleararray_pc(struct map_session_data* sd, const char* varname, void* value)
+{
+ int key;
+ uint8 idx;
+
+ if( not_array_variable(varname[0]) || !not_server_variable(varname[0]) )
+ {
+ ShowError("script_cleararray_pc: Variable '%s' has invalid scope (char_id=%d).\n", varname, sd->status.char_id);
+ return;
+ }
+
+ key = add_str(varname);
+
+ if( is_string_variable(varname) )
+ {
+ for( idx = 0; idx < SCRIPT_MAX_ARRAYSIZE; idx++ )
+ {
+ pc_setregstr(sd, reference_uid(key, idx), (const char*)value);
+ }
+ }
+ else
+ {
+ for( idx = 0; idx < SCRIPT_MAX_ARRAYSIZE; idx++ )
+ {
+ pc_setreg(sd, reference_uid(key, idx), (int)value);
+ }
+ }
+}
+
+
+/// sets a temporary character array variable element idx to given value
+/// @param refcache Pointer to an int variable, which keeps a copy of the reference to varname and must be initialized to 0. Can be NULL if only one element is set.
+void script_setarray_pc(struct map_session_data* sd, const char* varname, uint8 idx, void* value, int* refcache)
+{
+ int key;
+
+ if( not_array_variable(varname[0]) || !not_server_variable(varname[0]) )
+ {
+ ShowError("script_setarray_pc: Variable '%s' has invalid scope (char_id=%d).\n", varname, sd->status.char_id);
+ return;
+ }
+
+ if( idx >= SCRIPT_MAX_ARRAYSIZE )
+ {
+ ShowError("script_setarray_pc: Variable '%s' has invalid index '%d' (char_id=%d).\n", varname, (int)idx, sd->status.char_id);
+ return;
+ }
+
+ key = ( refcache && refcache[0] ) ? refcache[0] : add_str(varname);
+
+ if( is_string_variable(varname) )
+ {
+ pc_setregstr(sd, reference_uid(key, idx), (const char*)value);
+ }
+ else
+ {
+ pc_setreg(sd, reference_uid(key, idx), (int)value);
+ }
+
+ if( refcache )
+ {// save to avoid repeated add_str calls
+ refcache[0] = key;
+ }
+}
+
+
/*==========================================
* I
*------------------------------------------*/
@@ -3698,7 +3912,12 @@ BUILDIN_FUNC(menu)
sd->state.menu_or_input = 1;
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
- //TODO what's the maximum number of options that can be displayed and/or received? -> give warning
+
+ if( sd->npc_menu >= 0xff )
+ {// client supports only up to 254 entries; 0 is not used and 255 is reserved for cancel; excess entries are displayed but cause 'uint8' overflow
+ ShowWarning("buildin_menu: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
+ script_reportsrc(st);
+ }
}
else if( sd->npc_menu == 0xff )
{// Cancel was pressed
@@ -3780,6 +3999,12 @@ BUILDIN_FUNC(select)
sd->state.menu_or_input = 1;
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
+
+ if( sd->npc_menu >= 0xff )
+ {
+ ShowWarning("buildin_select: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
+ script_reportsrc(st);
+ }
}
else if( sd->npc_menu == 0xff )
{// Cancel was pressed
@@ -3842,6 +4067,12 @@ BUILDIN_FUNC(prompt)
sd->state.menu_or_input = 1;
clif_scriptmenu(sd, st->oid, StringBuf_Value(&buf));
StringBuf_Destroy(&buf);
+
+ if( sd->npc_menu >= 0xff )
+ {
+ ShowWarning("buildin_prompt: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
+ script_reportsrc(st);
+ }
}
else if( sd->npc_menu == 0xff )
{// Cancel was pressed
@@ -4100,11 +4331,11 @@ BUILDIN_FUNC(warp)
y = script_getnum(st,4);
if(strcmp(str,"Random")==0)
- ret = pc_randomwarp(sd,3);
+ ret = pc_randomwarp(sd,CLR_TELEPORT);
else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0)
- ret = pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ ret = pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
else
- ret = pc_setpos(sd,mapindex_name2id(str),x,y,0);
+ ret = pc_setpos(sd,mapindex_name2id(str),x,y,CLR_OUTSIGHT);
if( ret ) {
ShowError("buildin_warp: moving player '%s' to \"%s\",%d,%d failed.\n", sd->status.name, str, x, y);
@@ -4124,9 +4355,9 @@ static int buildin_areawarp_sub(struct block_list *bl,va_list ap)
x=va_arg(ap,int);
y=va_arg(ap,int);
if(map == 0)
- pc_randomwarp((TBL_PC *)bl,3);
+ pc_randomwarp((TBL_PC *)bl,CLR_TELEPORT);
else
- pc_setpos((TBL_PC *)bl,map,x,y,0);
+ pc_setpos((TBL_PC *)bl,map,x,y,CLR_OUTSIGHT);
return 0;
}
BUILDIN_FUNC(areawarp)
@@ -4212,12 +4443,12 @@ BUILDIN_FUNC(warpchar)
return 0;
if(strcmp(str, "Random") == 0)
- pc_randomwarp(sd, 3);
+ pc_randomwarp(sd, CLR_TELEPORT);
else
if(strcmp(str, "SavePoint") == 0)
- pc_setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, 3);
+ pc_setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
else
- pc_setpos(sd, mapindex_name2id(str), x, y, 3);
+ pc_setpos(sd, mapindex_name2id(str), x, y, CLR_TELEPORT);
return 0;
}
@@ -4274,15 +4505,15 @@ BUILDIN_FUNC(warpparty)
{
case 0: // Random
if(!map[pl_sd->bl.m].flag.nowarp)
- pc_randomwarp(pl_sd,3);
+ pc_randomwarp(pl_sd,CLR_TELEPORT);
break;
case 1: // SavePointAll
if(!map[pl_sd->bl.m].flag.noreturn)
- pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,3);
+ pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT);
break;
case 2: // SavePoint
if(!map[pl_sd->bl.m].flag.noreturn)
- pc_setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ pc_setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
case 3: // Leader
for(j = 0; j < MAX_PARTY && !p->party.member[j].leader; j++);
@@ -4298,12 +4529,12 @@ BUILDIN_FUNC(warpparty)
continue;
if(map[pl_sd->bl.m].flag.noreturn || map[pl_sd->bl.m].flag.nowarp)
continue;
- pc_setpos(pl_sd,mapindex,x,y,3);
+ pc_setpos(pl_sd,mapindex,x,y,CLR_TELEPORT);
}
break;
case 4: // m,x,y
if(!map[pl_sd->bl.m].flag.noreturn && !map[pl_sd->bl.m].flag.nowarp)
- pc_setpos(pl_sd,mapindex_name2id(str),x,y,3);
+ pc_setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT);
break;
}
}
@@ -4352,19 +4583,19 @@ BUILDIN_FUNC(warpguild)
{
case 0: // Random
if(!map[pl_sd->bl.m].flag.nowarp)
- pc_randomwarp(pl_sd,3);
+ pc_randomwarp(pl_sd,CLR_TELEPORT);
break;
case 1: // SavePointAll
if(!map[pl_sd->bl.m].flag.noreturn)
- pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,3);
+ pc_setpos(pl_sd,pl_sd->status.save_point.map,pl_sd->status.save_point.x,pl_sd->status.save_point.y,CLR_TELEPORT);
break;
case 2: // SavePoint
if(!map[pl_sd->bl.m].flag.noreturn)
- pc_setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ pc_setpos(pl_sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
case 3: // m,x,y
if(!map[pl_sd->bl.m].flag.noreturn && !map[pl_sd->bl.m].flag.nowarp)
- pc_setpos(pl_sd,mapindex_name2id(str),x,y,3);
+ pc_setpos(pl_sd,mapindex_name2id(str),x,y,CLR_TELEPORT);
break;
}
}
@@ -4588,7 +4819,7 @@ static int32 getarraysize(struct script_state* st, int32 id, int32 idx, int isst
if( isstring )
{
- for( ; idx < 128; ++idx )
+ for( ; idx < SCRIPT_MAX_ARRAYSIZE; ++idx )
{
char* str = (char*)get_val2(st, reference_uid(id, idx), ref);
if( str && *str )
@@ -4598,7 +4829,7 @@ static int32 getarraysize(struct script_state* st, int32 id, int32 idx, int isst
}
else
{
- for( ; idx < 128; ++idx )
+ for( ; idx < SCRIPT_MAX_ARRAYSIZE; ++idx )
{
int32 num = (int32)get_val2(st, reference_uid(id, idx), ref);
if( num )
@@ -4651,8 +4882,8 @@ BUILDIN_FUNC(setarray)
}
end = start + script_lastdata(st) - 2;
- if( end > 127 )
- end = 127;
+ if( end >= SCRIPT_MAX_ARRAYSIZE )
+ end = SCRIPT_MAX_ARRAYSIZE-1;
if( is_string_variable(name) )
{// string array
@@ -4714,8 +4945,8 @@ BUILDIN_FUNC(cleararray)
v = (void*)script_getnum(st, 3);
end = start + script_getnum(st, 4);
- if( end > 127 )
- end = 127;
+ if( end >= SCRIPT_MAX_ARRAYSIZE )
+ end = SCRIPT_MAX_ARRAYSIZE-1;
for( ; start <= end; ++start )
set_reg(st, sd, reference_uid(id, start), name, v, script_getref(st,2));
@@ -4784,8 +5015,8 @@ BUILDIN_FUNC(copyarray)
}
count = script_getnum(st, 4);
- if( count > 128 - idx1 )
- count = 128 - idx1;
+ if( count >= SCRIPT_MAX_ARRAYSIZE - idx1 )
+ count = (SCRIPT_MAX_ARRAYSIZE-1) - idx1;
if( count <= 0 || (id1 == id2 && idx1 == idx2) )
return 0;// nothing to copy
@@ -4802,7 +5033,7 @@ BUILDIN_FUNC(copyarray)
{// normal copy
for( i = 0; i < count; ++i )
{
- if( idx2 + i < 128 )
+ if( idx2 + i < SCRIPT_MAX_ARRAYSIZE )
{
v = get_val2(st, reference_uid(id2, idx2 + i), reference_getref(data2));
set_reg(st, sd, reference_uid(id1, idx1 + i), name1, v, reference_getref(data1));
@@ -4958,7 +5189,7 @@ BUILDIN_FUNC(getelementofarray)
}
i = script_getnum(st, 3);
- if( i < 0 || i >= 128 )
+ if( i < 0 || i >= SCRIPT_MAX_ARRAYSIZE )
{
ShowWarning("script:getelementofarray: index out of range (%d)\n", i);
script_reportdata(data);
@@ -5154,48 +5385,80 @@ BUILDIN_FUNC(countitem2)
*------------------------------------------*/
BUILDIN_FUNC(checkweight)
{
- int nameid=0,amount,i;
- unsigned long weight;
- TBL_PC *sd;
- struct script_data *data;
+ int nameid, amount, slots;
+ unsigned int weight;
+ struct item_data* id = NULL;
+ struct map_session_data* sd;
+ struct script_data* data;
- sd = script_rid2sd(st);
- if( sd == NULL )
+ if( ( sd = script_rid2sd(st) ) == NULL )
+ {
return 0;
+ }
- data=script_getdata(st,2);
- get_val(st,data);
- if( data_isstring(data) ){
- const char *name=conv_str(st,data);
- struct item_data *item_data = itemdb_searchname(name);
- if( item_data )
- nameid=item_data->nameid;
- }else
- nameid=conv_num(st,data);
+ data = script_getdata(st,2);
+ get_val(st, data); // convert into value in case of a variable
- amount=script_getnum(st,3);
- if ( amount<=0 || nameid<500 ) { //if get wrong item ID or amount<=0, don't count weight of non existing items
- script_pushint(st,0);
- ShowError("buildin_checkweight: Wrong item ID or amount.\n");
+ if( data_isstring(data) )
+ {// item name
+ id = itemdb_searchname(conv_str(st, data));
+ }
+ else
+ {// item id
+ id = itemdb_exists(conv_num(st, data));
+ }
+
+ if( id == NULL )
+ {
+ ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was
+ return 1;
+ }
+
+ nameid = id->nameid;
+ amount = script_getnum(st,3);
+
+ if( amount < 1 )
+ {
+ ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount);
return 1;
}
weight = itemdb_weight(nameid)*amount;
- if( amount > MAX_AMOUNT || weight + sd->weight > sd->max_weight )
+
+ if( weight + sd->weight > sd->max_weight )
+ {// too heavy
script_pushint(st,0);
- else if( itemdb_isstackable(nameid) )
- {
- if( (i = pc_search_inventory(sd,nameid)) >= 0 )
- script_pushint(st,amount + sd->status.inventory[i].amount > MAX_AMOUNT ? 0 : 1);
- else
- script_pushint(st,pc_search_inventory(sd,0) >= 0 ? 1 : 0);
+ return 0;
}
- else
+
+ switch( pc_checkadditem(sd, nameid, amount) )
{
- for( i = 0; i < MAX_INVENTORY && amount; ++i )
- if( sd->status.inventory[i].nameid == 0 )
- amount--;
- script_pushint(st,amount ? 0 : 1);
+ case ADDITEM_EXIST:
+ // item is already in inventory, but there is still space for the requested amount
+ break;
+ case ADDITEM_NEW:
+ slots = pc_inventoryblank(sd);
+
+ if( itemdb_isstackable(nameid) )
+ {// stackable
+ if( slots < 1 )
+ {
+ script_pushint(st,0);
+ return 0;
+ }
+ }
+ else
+ {// non-stackable
+ if( slots < amount )
+ {
+ script_pushint(st,0);
+ return 0;
+ }
+ }
+ break;
+ case ADDITEM_OVERAMOUNT:
+ script_pushint(st,0);
+ return 0;
}
return 0;
@@ -5390,8 +5653,8 @@ BUILDIN_FUNC(getitem2)
}
/*==========================================
- * rentitem <item id>
- * rentitem "<item name>"
+ * rentitem <item id>,<seconds>
+ * rentitem "<item name>",<seconds>
*------------------------------------------*/
BUILDIN_FUNC(rentitem)
{
@@ -5596,6 +5859,156 @@ BUILDIN_FUNC(makeitem)
return 0;
}
+
+/// Counts / deletes the current item given by idx.
+/// Used by buildin_delitem_search
+/// Relies on all input data being already fully valid.
+static void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, bool delete_items)
+{
+ int delamount;
+ struct item* inv = &sd->status.inventory[idx];
+
+ delamount = ( amount[0] < inv->amount ) ? amount[0] : inv->amount;
+
+ if( delete_items )
+ {
+ if( sd->inventory_data[idx]->type == IT_PETEGG && inv->card[0] == CARD0_PET )
+ {// delete associated pet
+ intif_delete_petdata(MakeDWord(inv->card[1], inv->card[2]));
+ }
+
+ //Logs items, got from (N)PC scripts [Lupus]
+ if( log_config.enable_logs&0x40 )
+ {
+ log_pick_pc(sd, "N", inv->nameid, -delamount, inv);
+ }
+ //Logs
+
+ pc_delitem(sd, idx, delamount, 0, 0);
+ }
+
+ amount[0]-= delamount;
+}
+
+
+/// Searches for item(s) and checks, if there is enough of them.
+/// Used by delitem and delitem2
+/// Relies on all input data being already fully valid.
+/// @param exact_match will also match item attributes and cards, not just name id
+/// @return true when all items could be deleted, false when there were not enough items to delete
+static bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool exact_match)
+{
+ bool delete_items = false;
+ int i, amount, important;
+ struct item* inv;
+
+ // prefer always non-equipped items
+ it->equip = 0;
+
+ // when searching for nameid only, prefer additionally
+ if( !exact_match )
+ {
+ // non-refined items
+ it->refine = 0;
+ // card-less items
+ memset(it->card, 0, sizeof(it->card));
+ }
+
+ for(;;)
+ {
+ amount = it->amount;
+ important = 0;
+
+ // 1st pass -- less important items / exact match
+ for( i = 0; amount && i < ARRAYLENGTH(sd->status.inventory); i++ )
+ {
+ inv = &sd->status.inventory[i];
+
+ if( !inv->nameid || !sd->inventory_data[i] || inv->nameid != it->nameid )
+ {// wrong/invalid item
+ continue;
+ }
+
+ if( inv->equip != it->equip || inv->refine != it->refine )
+ {// not matching attributes
+ important++;
+ continue;
+ }
+
+ if( exact_match )
+ {
+ if( inv->identify != it->identify || inv->attribute != it->attribute || memcmp(inv->card, it->card, sizeof(inv->card)) )
+ {// not matching exact attributes
+ continue;
+ }
+ }
+ else
+ {
+ if( sd->inventory_data[i]->type == IT_PETEGG )
+ {
+ if( inv->card[0] == CARD0_PET && CheckForCharServer() )
+ {// pet which cannot be deleted
+ continue;
+ }
+ }
+ else if( memcmp(inv->card, it->card, sizeof(inv->card)) )
+ {// named/carded item
+ important++;
+ continue;
+ }
+ }
+
+ // count / delete item
+ buildin_delitem_delete(sd, i, &amount, delete_items);
+ }
+
+ // 2nd pass -- any matching item
+ if( amount == 0 || important == 0 )
+ {// either everything was already consumed or no items were skipped
+ ;
+ }
+ else for( i = 0; amount && i < ARRAYLENGTH(sd->status.inventory); i++ )
+ {
+ inv = &sd->status.inventory[i];
+
+ if( !inv->nameid || !sd->inventory_data[i] || inv->nameid != it->nameid )
+ {// wrong/invalid item
+ continue;
+ }
+
+ if( sd->inventory_data[i]->type == IT_PETEGG && inv->card[0] == CARD0_PET && CheckForCharServer() )
+ {// pet which cannot be deleted
+ continue;
+ }
+
+ if( exact_match )
+ {
+ if( inv->refine != it->refine || inv->identify != it->identify || inv->attribute != it->attribute || memcmp(inv->card, it->card, sizeof(inv->card)) )
+ {// not matching attributes
+ continue;
+ }
+ }
+
+ // count / delete item
+ buildin_delitem_delete(sd, i, &amount, delete_items);
+ }
+
+ if( amount )
+ {// not enough items
+ return false;
+ }
+ else if( delete_items )
+ {// we are done with the work
+ return true;
+ }
+ else
+ {// get rid of the items now
+ delete_items = true;
+ }
+ }
+}
+
+
/// Deletes items from the target/attached player.
/// Prioritizes ordinary items.
///
@@ -5603,8 +6016,8 @@ BUILDIN_FUNC(makeitem)
/// delitem "<item name>",<amount>{,<account id>}
BUILDIN_FUNC(delitem)
{
- int nameid=0,amount,i,important_item=0;
TBL_PC *sd;
+ struct item it;
struct script_data *data;
if( script_hasdata(st,4) )
@@ -5637,89 +6050,30 @@ BUILDIN_FUNC(delitem)
st->state = END;
return 1;
}
- nameid = id->nameid;// "<item name>"
+ it.nameid = id->nameid;// "<item name>"
}
else
- nameid = conv_num(st,data);// <item id>
-
- amount=script_getnum(st,3);
-
- if( amount <= 0 )
- return 0;// nothing to do
-
- //1st pass
- //here we won't delete items with CARDS, named items but we count them
- for(i=0;i<MAX_INVENTORY;i++){
- //we don't delete wrong item or equipped item
- if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
- sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid)
- continue;
- //1 egg uses 1 cell in the inventory. so it's ok to delete 1 pet / per cycle
- if(sd->inventory_data[i]->type==IT_PETEGG &&
- sd->status.inventory[i].card[0] == CARD0_PET)
+ {
+ it.nameid = conv_num(st,data);// <item id>
+ if( !itemdb_exists( it.nameid ) )
{
- if (!intif_delete_petdata(MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2])))
- continue; //pet couldn't be sent for deletion.
- } else
- //is this item important? does it have cards? or Player's name? or Refined/Upgraded
- if(itemdb_isspecial(sd->status.inventory[i].card[0]) ||
- sd->status.inventory[i].card[0] ||
- sd->status.inventory[i].refine) {
- //this is important item, count it (except for pet eggs)
- if(sd->status.inventory[i].card[0] != CARD0_PET)
- important_item++;
- continue;
- }
-
- if(sd->status.inventory[i].amount>=amount){
-
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
-
- pc_delitem(sd,i,amount,0,0);
- return 0; //we deleted exact amount of items. now exit
- } else {
- amount-=sd->status.inventory[i].amount;
-
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40) {
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
- }
- //Logs
-
- pc_delitem(sd,i,sd->status.inventory[i].amount,0,0);
+ ShowError("script:delitem: unknown item \"%d\".\n", it.nameid);
+ st->state = END;
+ return 1;
}
}
- //2nd pass
- //now if there WERE items with CARDs/REFINED/NAMED... and if we still have to delete some items. we'll delete them finally
- if (important_item>0 && amount>0)
- for(i=0;i<MAX_INVENTORY;i++){
- //we don't delete wrong item
- if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
- sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid )
- continue;
- if(sd->status.inventory[i].amount>=amount){
+ it.amount=script_getnum(st,3);
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
-
- pc_delitem(sd,i,amount,0,0);
- return 0; //we deleted exact amount of items. now exit
- } else {
- amount-=sd->status.inventory[i].amount;
-
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ if( it.amount <= 0 )
+ return 0;// nothing to do
- pc_delitem(sd,i,sd->status.inventory[i].amount,0,0);
- }
- }
+ if( buildin_delitem_search(sd, &it, false) )
+ {// success
+ return 0;
+ }
- ShowError("script:delitem: failed to delete %d items (AID=%d item_id=%d).\n", amount, sd->status.account_id, nameid);
+ ShowError("script:delitem: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
clif_scriptclose(sd, st->oid);
return 1;
@@ -5731,9 +6085,8 @@ BUILDIN_FUNC(delitem)
/// delitem2 "<Item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}
BUILDIN_FUNC(delitem2)
{
- int nameid=0,amount,i=0;
- int iden,ref,attr,c1,c2,c3,c4;
TBL_PC *sd;
+ struct item it;
struct script_data *data;
if( script_hasdata(st,11) )
@@ -5766,59 +6119,37 @@ BUILDIN_FUNC(delitem2)
st->state = END;
return 1;
}
- nameid = id->nameid;// "<item name>"
+ it.nameid = id->nameid;// "<item name>"
}
else
- nameid = conv_num(st,data);// <item id>
-
- amount=script_getnum(st,3);
- iden=script_getnum(st,4);
- ref=script_getnum(st,5);
- attr=script_getnum(st,6);
- c1=(short)script_getnum(st,7);
- c2=(short)script_getnum(st,8);
- c3=(short)script_getnum(st,9);
- c4=(short)script_getnum(st,10);
-
- if( amount <= 0 )
- return 0;// nothing to do
-
- for(i=0;i<MAX_INVENTORY;i++){
- //we don't delete wrong item or equipped item
- if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL ||
- sd->status.inventory[i].amount<=0 || sd->status.inventory[i].nameid!=nameid ||
- sd->status.inventory[i].identify!=iden || sd->status.inventory[i].refine!=ref ||
- sd->status.inventory[i].attribute!=attr || sd->status.inventory[i].card[0]!=c1 ||
- sd->status.inventory[i].card[1]!=c2 || sd->status.inventory[i].card[2]!=c3 ||
- sd->status.inventory[i].card[3]!=c4)
- continue;
- //1 egg uses 1 cell in the inventory. so it's ok to delete 1 pet / per cycle
- if(sd->inventory_data[i]->type==IT_PETEGG && sd->status.inventory[i].card[0] == CARD0_PET)
+ {
+ it.nameid = conv_num(st,data);// <item id>
+ if( !itemdb_exists( it.nameid ) )
{
- if (!intif_delete_petdata( MakeDWord(sd->status.inventory[i].card[1], sd->status.inventory[i].card[2])))
- continue; //Failed to send delete the pet.
+ ShowError("script:delitem: unknown item \"%d\".\n", it.nameid);
+ st->state = END;
+ return 1;
}
+ }
- if(sd->status.inventory[i].amount>=amount){
-
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -amount, &sd->status.inventory[i]);
-
- pc_delitem(sd,i,amount,0,0);
- return 0; //we deleted exact amount of items. now exit
- } else {
- amount-=sd->status.inventory[i].amount;
+ it.amount=script_getnum(st,3);
+ it.identify=script_getnum(st,4);
+ it.refine=script_getnum(st,5);
+ it.attribute=script_getnum(st,6);
+ it.card[0]=(short)script_getnum(st,7);
+ it.card[1]=(short)script_getnum(st,8);
+ it.card[2]=(short)script_getnum(st,9);
+ it.card[3]=(short)script_getnum(st,10);
- //Logs items, got from (N)PC scripts [Lupus]
- if(log_config.enable_logs&0x40)
- log_pick_pc(sd, "N", sd->status.inventory[i].nameid, -sd->status.inventory[i].amount, &sd->status.inventory[i]);
+ if( it.amount <= 0 )
+ return 0;// nothing to do
- pc_delitem(sd,i,sd->status.inventory[i].amount,0,0);
- }
+ if( buildin_delitem_search(sd, &it, true) )
+ {// success
+ return 0;
}
- ShowError("script:delitem2: failed to delete %d items (AID=%d item_id=%d).\n", amount, sd->status.account_id, nameid);
+ ShowError("script:delitem2: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
clif_scriptclose(sd, st->oid);
return 1;
@@ -5904,34 +6235,21 @@ BUILDIN_FUNC(getcharid)
/*==========================================
*wIDPT擾
*------------------------------------------*/
-char *buildin_getpartyname_sub(int party_id)
-{
- struct party_data *p;
-
- p=party_search(party_id);
-
- if(p!=NULL){
- char *buf;
- buf=(char *)aMallocA(NAME_LENGTH*sizeof(char));
- memcpy(buf, p->party.name, NAME_LENGTH);
- buf[NAME_LENGTH-1] = '\0';
- return buf;
- }
-
- return 0;
-}
BUILDIN_FUNC(getpartyname)
{
- char *name;
int party_id;
+ struct party_data* p;
- party_id=script_getnum(st,2);
- name=buildin_getpartyname_sub(party_id);
- if(name != NULL)
- script_pushstr(st,name);
+ party_id = script_getnum(st,2);
+
+ if( ( p = party_search(party_id) ) != NULL )
+ {
+ script_pushstrcopy(st,p->party.name);
+ }
else
+ {
script_pushconststr(st,"null");
-
+ }
return 0;
}
/*==========================================
@@ -5952,13 +6270,13 @@ BUILDIN_FUNC(getpartymember)
if(p->party.member[i].account_id){
switch (type) {
case 2:
- mapreg_setreg(add_str("$@partymemberaid")+(j<<24),p->party.member[i].account_id);
+ mapreg_setreg(reference_uid(add_str("$@partymemberaid"), j),p->party.member[i].account_id);
break;
case 1:
- mapreg_setreg(add_str("$@partymembercid")+(j<<24),p->party.member[i].char_id);
+ mapreg_setreg(reference_uid(add_str("$@partymembercid"), j),p->party.member[i].char_id);
break;
default:
- mapreg_setregstr(add_str("$@partymembername$")+(j<<24),p->party.member[i].name);
+ mapreg_setregstr(reference_uid(add_str("$@partymembername$"), j),p->party.member[i].name);
}
j++;
}
@@ -6009,75 +6327,58 @@ BUILDIN_FUNC(getpartyleader)
/*==========================================
*wID̃Mh擾
*------------------------------------------*/
-char *buildin_getguildname_sub(int guild_id)
+BUILDIN_FUNC(getguildname)
{
- struct guild *g=NULL;
- g=guild_search(guild_id);
+ int guild_id;
+ struct guild* g;
- if(g!=NULL){
- char *buf;
- buf=(char *)aMallocA(NAME_LENGTH*sizeof(char));
- memcpy(buf, g->name, NAME_LENGTH);
- buf[NAME_LENGTH-1] = '\0';
- return buf;
+ guild_id = script_getnum(st,2);
+
+ if( ( g = guild_search(guild_id) ) != NULL )
+ {
+ script_pushstrcopy(st,g->name);
}
- return NULL;
-}
-BUILDIN_FUNC(getguildname)
-{
- char *name;
- int guild_id=script_getnum(st,2);
- name=buildin_getguildname_sub(guild_id);
- if(name != NULL)
- script_pushstr(st,name);
else
+ {
script_pushconststr(st,"null");
+ }
return 0;
}
/*==========================================
*wIDGuildMaster擾
*------------------------------------------*/
-char *buildin_getguildmaster_sub(int guild_id)
+BUILDIN_FUNC(getguildmaster)
{
- struct guild *g=NULL;
- g=guild_search(guild_id);
+ int guild_id;
+ struct guild* g;
- if(g!=NULL){
- char *buf;
- buf=(char *)aMallocA(NAME_LENGTH*sizeof(char));
- memcpy(buf, g->master, NAME_LENGTH);
- buf[NAME_LENGTH-1] = '\0';
- return buf;
- }
+ guild_id = script_getnum(st,2);
- return 0;
-}
-BUILDIN_FUNC(getguildmaster)
-{
- char *master;
- int guild_id=script_getnum(st,2);
- master=buildin_getguildmaster_sub(guild_id);
- if(master!=0)
- script_pushstr(st,master);
+ if( ( g = guild_search(guild_id) ) != NULL )
+ {
+ script_pushstrcopy(st,g->member[0].name);
+ }
else
+ {
script_pushconststr(st,"null");
+ }
return 0;
}
BUILDIN_FUNC(getguildmasterid)
{
- char *master;
- TBL_PC *sd=NULL;
- int guild_id=script_getnum(st,2);
- master=buildin_getguildmaster_sub(guild_id);
- if(master!=0){
- if((sd=map_nick2sd(master)) == NULL){
- script_pushint(st,0);
- return 0;
- }
- script_pushint(st,sd->status.char_id);
- }else{
+ int guild_id;
+ struct guild* g;
+
+ guild_id = script_getnum(st,2);
+
+ if( ( g = guild_search(guild_id) ) != NULL )
+ {
+ script_pushint(st,g->member[0].char_id);
+ }
+ else
+ {
script_pushint(st,0);
}
return 0;
@@ -6090,7 +6391,8 @@ BUILDIN_FUNC(strcharinfo)
{
TBL_PC *sd;
int num;
- char *buf;
+ struct guild* g;
+ struct party_data* p;
sd=script_rid2sd(st);
if (!sd) { //Avoid crashing....
@@ -6103,18 +6405,24 @@ BUILDIN_FUNC(strcharinfo)
script_pushstrcopy(st,sd->status.name);
break;
case 1:
- buf=buildin_getpartyname_sub(sd->status.party_id);
- if(buf!=0)
- script_pushstr(st,buf);
+ if( ( p = party_search(sd->status.party_id) ) != NULL )
+ {
+ script_pushstrcopy(st,p->party.name);
+ }
else
+ {
script_pushconststr(st,"");
+ }
break;
case 2:
- buf=buildin_getguildname_sub(sd->status.guild_id);
- if(buf != NULL)
- script_pushstr(st,buf);
+ if( ( g = guild_search(sd->status.guild_id) ) != NULL )
+ {
+ script_pushstrcopy(st,g->name);
+ }
else
+ {
script_pushconststr(st,"");
+ }
break;
case 3:
script_pushconststr(st,map[sd->bl.m].name);
@@ -7534,8 +7842,8 @@ BUILDIN_FUNC(getmobdrops)
if( itemdb_exists(mob->dropitem[i].nameid) == NULL )
continue;
- mapreg_setreg(add_str("$@MobDrop_item") + (j<<24), mob->dropitem[i].nameid);
- mapreg_setreg(add_str("$@MobDrop_rate") + (j<<24), mob->dropitem[i].p);
+ mapreg_setreg(reference_uid(add_str("$@MobDrop_item"), j), mob->dropitem[i].nameid);
+ mapreg_setreg(reference_uid(add_str("$@MobDrop_rate"), j), mob->dropitem[i].p);
j++;
}
@@ -7750,8 +8058,15 @@ BUILDIN_FUNC(clone)
BUILDIN_FUNC(doevent)
{
const char* event = script_getstr(st,2);
+ struct map_session_data* sd;
+
+ if( ( sd = script_rid2sd(st) ) == NULL )
+ {
+ return 0;
+ }
+
check_event(st, event);
- npc_event(map_id2sd(st->rid),event,0);
+ npc_event(sd, event, 0);
return 0;
}
/*==========================================
@@ -8226,18 +8541,18 @@ BUILDIN_FUNC(getusers)
flag = script_getnum(st,2);
- if(flag&0x8)
- {// npc
- bl = map_id2bl(st->oid);
- }
- else if((sd = script_rid2sd(st))!=NULL)
- {// pc
- bl = &sd->bl;
- }
-
switch(flag&0x07)
{
case 0:
+ if(flag&0x8)
+ {// npc
+ bl = map_id2bl(st->oid);
+ }
+ else if((sd = script_rid2sd(st))!=NULL)
+ {// pc
+ bl = &sd->bl;
+ }
+
if(bl)
{
val = map[bl->m].users;
@@ -8657,7 +8972,7 @@ BUILDIN_FUNC(homunculus_evolution)
if (sd->hd->homunculus.intimacy > 91000)
merc_hom_evolution(sd->hd);
else
- clif_emotion(&sd->hd->bl, 4) ; //swt
+ clif_emotion(&sd->hd->bl, E_SWT);
}
return 0;
}
@@ -9061,23 +9376,23 @@ BUILDIN_FUNC(warpwaitingpc)
if( sd == NULL )
{
ShowDebug("script:warpwaitingpc: no user in chat room position 0 (cd->users=%d,%d/%d)\n", cd->users, i, n);
- mapreg_setreg(add_str("$@warpwaitingpc")+(i<<24), 0);
+ mapreg_setreg(reference_uid(add_str("$@warpwaitingpc"), i), 0);
continue;// Broken npc chat room?
}
- mapreg_setreg(add_str("$@warpwaitingpc")+(i<<24), sd->bl.id);
+ mapreg_setreg(reference_uid(add_str("$@warpwaitingpc"), i), sd->bl.id);
if( strcmp(map_name,"Random") == 0 )
- pc_randomwarp(sd,3);
+ pc_randomwarp(sd,CLR_TELEPORT);
else if( strcmp(map_name,"SavePoint") == 0 )
{
if( map[sd->bl.m].flag.noteleport )
return 0;// can't teleport on this map
- pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, 3);
+ pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
}
else
- pc_setpos(sd, mapindex_name2id(map_name), x, y, 0);
+ pc_setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT);
}
mapreg_setreg(add_str("$@warpwaitingpcnum"), i);
return 0;
@@ -9087,15 +9402,31 @@ BUILDIN_FUNC(warpwaitingpc)
// ...
//
+/// Detaches a character from a script.
+///
+/// @param st Script state to detach the character from.
+static void script_detach_rid(struct script_state* st)
+{
+ if(st->rid)
+ {
+ script_detach_state(st, false);
+ st->rid = 0;
+ }
+}
+
/*==========================================
* RID̃A^b`
*------------------------------------------*/
BUILDIN_FUNC(attachrid)
{
int rid = script_getnum(st,2);
-
- if (map_id2sd(rid)) {
+ struct map_session_data* sd;
+
+ if ((sd = map_id2sd(rid))!=NULL) {
+ script_detach_rid(st);
+
st->rid = rid;
+ script_attach_state(st);
script_pushint(st,1);
} else
script_pushint(st,0);
@@ -9106,7 +9437,7 @@ BUILDIN_FUNC(attachrid)
*------------------------------------------*/
BUILDIN_FUNC(detachrid)
{
- st->rid=0;
+ script_detach_rid(st);
return 0;
}
/*==========================================
@@ -9495,7 +9826,7 @@ static int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list
(sd->status.guild_id != g_id && flag&2) || //Warp out outsiders
(sd->status.guild_id == 0) // Warp out players not in guild [Valaris]
)
- pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
return 1;
}
@@ -9969,7 +10300,7 @@ BUILDIN_FUNC(mapwarp) // Added by RoVeRT
for( i=0; i < g->max_member; i++)
{
if(g->member[i].sd && g->member[i].sd->bl.m==m){
- pc_setpos(g->member[i].sd,index,x,y,3);
+ pc_setpos(g->member[i].sd,index,x,y,CLR_TELEPORT);
}
}
}
@@ -9979,7 +10310,7 @@ BUILDIN_FUNC(mapwarp) // Added by RoVeRT
if(p){
for(i=0;i<MAX_PARTY; i++){
if(p->data[i].sd && p->data[i].sd->bl.m == m){
- pc_setpos(p->data[i].sd,index,x,y,3);
+ pc_setpos(p->data[i].sd,index,x,y,CLR_TELEPORT);
}
}
}
@@ -10142,7 +10473,7 @@ BUILDIN_FUNC(warppartner)
mapindex = mapindex_name2id(str);
if (mapindex) {
- pc_setpos(p_sd,mapindex,x,y,0);
+ pc_setpos(p_sd,mapindex,x,y,CLR_OUTSIGHT);
script_pushint(st,1);
} else
script_pushint(st,0);
@@ -10356,7 +10687,7 @@ BUILDIN_FUNC(getitemslots)
2 type;
3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
if = 0, then monsters don't drop it at all (rare or a quest item)
- if = 10000, then this item is sold in NPC shops only
+ if = -1, then this item is sold in NPC shops only
4 sex;
5 equip;
6 weight;
@@ -10396,7 +10727,7 @@ BUILDIN_FUNC(getiteminfo)
2 type;
3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
if = 0, then monsters don't drop it at all (rare or a quest item)
- if = 10000, then this item is sold in NPC shops only
+ if = -1, then this item is sold in NPC shops only
4 sex;
5 equip;
6 weight;
@@ -10545,18 +10876,18 @@ BUILDIN_FUNC(getinventorylist)
if(!sd) return 0;
for(i=0;i<MAX_INVENTORY;i++){
if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0){
- pc_setreg(sd,add_str("@inventorylist_id")+(j<<24),sd->status.inventory[i].nameid);
- pc_setreg(sd,add_str("@inventorylist_amount")+(j<<24),sd->status.inventory[i].amount);
- pc_setreg(sd,add_str("@inventorylist_equip")+(j<<24),sd->status.inventory[i].equip);
- pc_setreg(sd,add_str("@inventorylist_refine")+(j<<24),sd->status.inventory[i].refine);
- pc_setreg(sd,add_str("@inventorylist_identify")+(j<<24),sd->status.inventory[i].identify);
- pc_setreg(sd,add_str("@inventorylist_attribute")+(j<<24),sd->status.inventory[i].attribute);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_equip"), j),sd->status.inventory[i].equip);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_refine"), j),sd->status.inventory[i].refine);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_identify"), j),sd->status.inventory[i].identify);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_attribute"), j),sd->status.inventory[i].attribute);
for (k = 0; k < MAX_SLOTS; k++)
{
sprintf(card_var, "@inventorylist_card%d",k+1);
- pc_setreg(sd,add_str(card_var)+(j<<24),sd->status.inventory[i].card[k]);
+ pc_setreg(sd,reference_uid(add_str(card_var), j),sd->status.inventory[i].card[k]);
}
- pc_setreg(sd,add_str("@inventorylist_expire")+(j<<24),sd->status.inventory[i].expire_time);
+ pc_setreg(sd,reference_uid(add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time);
j++;
}
}
@@ -10571,9 +10902,9 @@ BUILDIN_FUNC(getskilllist)
if(!sd) return 0;
for(i=0;i<MAX_SKILL;i++){
if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0){
- pc_setreg(sd,add_str("@skilllist_id")+(j<<24),sd->status.skill[i].id);
- pc_setreg(sd,add_str("@skilllist_lv")+(j<<24),sd->status.skill[i].lv);
- pc_setreg(sd,add_str("@skilllist_flag")+(j<<24),sd->status.skill[i].flag);
+ pc_setreg(sd,reference_uid(add_str("@skilllist_id"), j),sd->status.skill[i].id);
+ pc_setreg(sd,reference_uid(add_str("@skilllist_lv"), j),sd->status.skill[i].lv);
+ pc_setreg(sd,reference_uid(add_str("@skilllist_flag"), j),sd->status.skill[i].flag);
j++;
}
}
@@ -10665,11 +10996,11 @@ BUILDIN_FUNC(misceffect)
if(st->oid && st->oid != fake_nd->bl.id) {
struct block_list *bl = map_id2bl(st->oid);
if (bl)
- clif_misceffect2(bl,type);
+ clif_specialeffect(bl,type,AREA);
} else{
TBL_PC *sd=script_rid2sd(st);
if(sd)
- clif_misceffect2(&sd->bl,type);
+ clif_specialeffect(&sd->bl,type,AREA);
}
return 0;
}
@@ -10678,27 +11009,34 @@ BUILDIN_FUNC(misceffect)
*------------------------------------------*/
BUILDIN_FUNC(playBGM)
{
- TBL_PC* sd = script_rid2sd(st);
- const char* name = script_getstr(st,2);
+ const char* name;
+ struct map_session_data* sd;
- if(sd)
+ if( ( sd = script_rid2sd(st) ) != NULL )
{
- if(!st->rid)
- clif_playBGM(sd,map_id2bl(st->oid),name);
- else
- clif_playBGM(sd,&sd->bl,name);
+ name = script_getstr(st,2);
+
+ clif_playBGM(sd, name);
}
return 0;
}
-int playBGM_sub(struct block_list* bl,va_list ap)
+static int playBGM_sub(struct block_list* bl,va_list ap)
{
- char* name = va_arg(ap,char*);
+ const char* name = va_arg(ap,const char*);
- clif_playBGM((TBL_PC *)bl, bl, name);
+ clif_playBGM(BL_CAST(BL_PC, bl), name);
- return 0;
+ return 0;
+}
+
+static int playBGM_foreachpc_sub(struct map_session_data* sd, va_list args)
+{
+ const char* name = va_arg(args, const char*);
+
+ clif_playBGM(sd, name);
+ return 0;
}
/*==========================================
@@ -10706,33 +11044,29 @@ int playBGM_sub(struct block_list* bl,va_list ap)
*------------------------------------------*/
BUILDIN_FUNC(playBGMall)
{
- struct block_list* bl;
const char* name;
- bl = (st->rid) ? &(script_rid2sd(st)->bl) : map_id2bl(st->oid);
- if (!bl)
- return 0;
-
name = script_getstr(st,2);
- if(script_hasdata(st,7))
- { // specified part of map
+ if( script_hasdata(st,7) )
+ {// specified part of map
const char* map = script_getstr(st,3);
int x0 = script_getnum(st,4);
int y0 = script_getnum(st,5);
int x1 = script_getnum(st,6);
int y1 = script_getnum(st,7);
+
map_foreachinarea(playBGM_sub, map_mapname2mapid(map), x0, y0, x1, y1, BL_PC, name);
}
- else
- if(!script_hasdata(st,7))
- { // entire map
+ else if( script_hasdata(st,3) )
+ {// entire map
const char* map = script_getstr(st,3);
+
map_foreachinmap(playBGM_sub, map_mapname2mapid(map), BL_PC, name);
}
else
- {
- ShowError("buildin_playBGMall: insufficient arguments for specific area broadcast.\n");
+ {// entire server
+ map_foreachpc(&playBGM_foreachpc_sub, name);
}
return 0;
@@ -10749,10 +11083,7 @@ BUILDIN_FUNC(soundeffect)
if(sd)
{
- if(!st->rid)
- clif_soundeffect(sd,map_id2bl(st->oid),name,type);
- else
- clif_soundeffect(sd,&sd->bl,name,type);
+ clif_soundeffect(sd,&sd->bl,name,type);
}
return 0;
}
@@ -11702,7 +12033,7 @@ BUILDIN_FUNC(summon)
delete_timer(md->deletetimer, mob_timer_delete);
md->deletetimer = add_timer(tick+(timeout>0?timeout*1000:60000),mob_timer_delete,md->bl.id,0);
mob_spawn (md); //Now it is ready for spawning.
- clif_misceffect2(&md->bl,344);
+ clif_specialeffect(&md->bl,344,AREA);
sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
}
return 0;
@@ -11724,68 +12055,6 @@ BUILDIN_FUNC(isday)
}
/*================================================
- * Check whether another item/card has been
- * equipped - used for 2/15's cards patch [celest]
- *------------------------------------------------*/
-// leave this here, just in case
-#if 0
-BUILDIN_FUNC(isequipped)
-{
- TBL_PC *sd;
- int i, j, k, id = 1;
- int ret = -1;
-
- sd = script_rid2sd(st);
-
- for (i=0; id!=0; i++) {
- int flag = 0;
-
- FETCH (i+2, id) else id = 0;
- if (id <= 0)
- continue;
-
- for (j=0; j<EQI_MAX; j++) {
- int index;
- index = sd->equip_index[j];
- if(index < 0) continue;
- if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue;
- if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) continue;
- if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) continue;
-
- if(!sd->inventory_data[index])
- continue;
-
- if(itemdb_type(id) != IT_CARD) { //Non card
- if (sd->inventory_data[index]->nameid != id)
- continue;
- flag = 1;
- break;
- } else { //Card
- if (itemdb_isspecial(sd->status.inventory[index].card[0]))
- continue;
- for(k=0; k<sd->inventory_data[index]->slot; k++) {
- if (sd->status.inventory[index].card[k] == id)
- {
- flag = 1;
- break;
- }
- }
- }
- if (flag) break;
- }
- if (ret == -1)
- ret = flag;
- else
- ret &= flag;
- if (!ret) break;
- }
-
- script_pushint(st,ret);
- return 0;
-}
-#endif
-
-/*================================================
* Check how many items/cards in the list are
* equipped - used for 2/15's cards patch [celest]
*------------------------------------------------*/
@@ -12051,7 +12320,7 @@ BUILDIN_FUNC(setbattleflag)
const char *flag, *value;
flag = script_getstr(st,2);
- value = script_getstr(st,3);
+ value = script_getstr(st,3); // HACK: Retrieve number as string (auto-converted) for battle_set_value
if (battle_set_value(flag, value) == 0)
ShowWarning("buildin_setbattleflag: unknown battle_config flag '%s'\n",flag);
@@ -12142,7 +12411,7 @@ BUILDIN_FUNC(setnpcdisplay)
if( newname )
npc_setdisplayname(nd, newname);
- if( size != -1 && size != nd->size )
+ if( size != -1 && size != (int)nd->size )
nd->size = size;
else
size = -1;
@@ -12151,7 +12420,7 @@ BUILDIN_FUNC(setnpcdisplay)
npc_setclass(nd, class_);
else if( size != -1 )
{ // Required to update the visual size
- clif_clearunit_area(&nd->bl, 0);
+ clif_clearunit_area(&nd->bl, CLR_OUTSIGHT);
clif_spawn(&nd->bl);
}
@@ -12231,10 +12500,9 @@ BUILDIN_FUNC(setd)
{
TBL_PC *sd=NULL;
char varname[100];
- const char *value, *buffer;
+ const char *buffer;
int elem;
buffer = script_getstr(st, 2);
- value = script_getstr(st, 3);
if(sscanf(buffer, "%99[^[][%d]", varname, &elem) < 2)
elem = 0;
@@ -12249,10 +12517,10 @@ BUILDIN_FUNC(setd)
}
}
- if(varname[strlen(varname)-1] != '$') {
- setd_sub(st,sd, varname, elem, (void *)atoi(value),NULL);
+ if( is_string_variable(varname) ) {
+ setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL);
} else {
- setd_sub(st,sd, varname, elem, (void *)value,NULL);
+ setd_sub(st, sd, varname, elem, (void *)script_getnum(st, 3), NULL);
}
return 0;
@@ -12266,7 +12534,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
const char* query;
struct script_data* data;
const char* name;
- int max_rows = 128;// maximum number of rows
+ int max_rows = SCRIPT_MAX_ARRAYSIZE;// maximum number of rows
int num_vars;
int num_cols;
@@ -12413,7 +12681,7 @@ BUILDIN_FUNC(getd)
elem = 0;
// Push the 'pointer' so it's more flexible [Lance]
- push_val(st->stack, C_NAME, (elem<<24) | add_str(varname));
+ push_val(st->stack, C_NAME, reference_uid(add_str(varname), elem));
return 0;
}
@@ -12548,6 +12816,7 @@ BUILDIN_FUNC(npcshopdelitem)
{
const char* npcname = script_getstr(st,2);
struct npc_data* nd = npc_name2id(npcname);
+ unsigned int nameid;
int n, i;
int amount;
int size;
@@ -12564,7 +12833,9 @@ BUILDIN_FUNC(npcshopdelitem)
// remove specified items from the shop item list
for( i = 3; i < 3 + amount; i++ )
{
- ARR_FIND( 0, size, n, nd->u.shop.shop_item[n].nameid == script_getnum(st,i) );
+ nameid = script_getnum(st,i);
+
+ ARR_FIND( 0, size, n, nd->u.shop.shop_item[n].nameid == nameid );
if( n < size )
{
memmove(&nd->u.shop.shop_item[n], &nd->u.shop.shop_item[n+1], sizeof(nd->u.shop.shop_item[0])*(size-n));
@@ -13016,7 +13287,7 @@ BUILDIN_FUNC(unitwarp)
bl = map_id2bl(unit_id);
if( map >= 0 && bl != NULL )
- script_pushint(st, unit_warp(bl,map,x,y,0));
+ script_pushint(st, unit_warp(bl,map,x,y,CLR_OUTSIGHT));
else
script_pushint(st, 0);
@@ -13212,17 +13483,11 @@ BUILDIN_FUNC(unitskillusepos)
BUILDIN_FUNC(sleep)
{
int ticks;
- TBL_PC* sd;
ticks = script_getnum(st,2);
- sd = map_id2sd(st->rid);
// detach the player
- if( sd && sd->npc_id == st->oid )
- {
- sd->npc_id = 0;
- }
- st->rid = 0;
+ script_detach_rid(st);
if( ticks <= 0 )
{// do nothing
@@ -13779,9 +14044,9 @@ BUILDIN_FUNC(waitingroom2bg)
for( i = 0; i < n && i < MAX_BG_MEMBERS; i++ )
{
if( (sd = cd->usersd[i]) != NULL && bg_team_join(bg_id, sd) )
- mapreg_setreg(add_str("$@arenamembers") + (i<<24), sd->bl.id);
+ mapreg_setreg(reference_uid(add_str("$@arenamembers"), i), sd->bl.id);
else
- mapreg_setreg(add_str("$@arenamembers") + (i<<24), 0);
+ mapreg_setreg(reference_uid(add_str("$@arenamembers"), i), 0);
}
mapreg_setreg(add_str("$@arenamembersnum"), i);
@@ -13814,7 +14079,7 @@ BUILDIN_FUNC(waitingroom2bg_single)
if( bg_team_join(bg_id, sd) )
{
- pc_setpos(sd, mapindex, x, y, 3);
+ pc_setpos(sd, mapindex, x, y, CLR_TELEPORT);
script_pushint(st,1);
}
else
@@ -14283,7 +14548,7 @@ BUILDIN_FUNC(instance_warpall)
mapindex = map_id2index(m);
for( i = 0; i < MAX_PARTY; i++ )
- if( (pl_sd = p->data[i].sd) && map[pl_sd->bl.m].instance_id == st->instance_id ) pc_setpos(pl_sd,mapindex,x,y,3);
+ if( (pl_sd = p->data[i].sd) && map[pl_sd->bl.m].instance_id == st->instance_id ) pc_setpos(pl_sd,mapindex,x,y,CLR_TELEPORT);
return 0;
}
@@ -14451,7 +14716,8 @@ BUILDIN_FUNC(deactivatepset);
BUILDIN_FUNC(deletepset);
#endif
-
+/// script command definitions
+/// for an explanation on args, see add_buildin_func
struct script_function buildin_func[] = {
// NPC interaction
BUILDIN_DEF(mes,"s"),
@@ -14463,21 +14729,21 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(prompt,"s*"),
//
BUILDIN_DEF(goto,"l"),
- BUILDIN_DEF(callsub,"i*"),
+ BUILDIN_DEF(callsub,"l*"),
BUILDIN_DEF(callfunc,"s*"),
BUILDIN_DEF(return,"?"),
BUILDIN_DEF(getarg,"i?"),
- BUILDIN_DEF(jobchange,"i*"),
+ BUILDIN_DEF(jobchange,"i?"),
BUILDIN_DEF(jobname,"i"),
- BUILDIN_DEF(input,"v??"),
+ BUILDIN_DEF(input,"r??"),
BUILDIN_DEF(warp,"sii"),
BUILDIN_DEF(areawarp,"siiiisii"),
BUILDIN_DEF(warpchar,"siii"), // [LuzZza]
- BUILDIN_DEF(warpparty,"siii*"), // [Fredzilla] [Paradox924X]
+ BUILDIN_DEF(warpparty,"siii?"), // [Fredzilla] [Paradox924X]
BUILDIN_DEF(warpguild,"siii"), // [Fredzilla]
BUILDIN_DEF(setlook,"ii"),
BUILDIN_DEF(changelook,"ii"), // Simulates but don't Store it
- BUILDIN_DEF(set,"ii"),
+ BUILDIN_DEF(set,"rv"),
BUILDIN_DEF(setarray,"rv*"),
BUILDIN_DEF(cleararray,"rvi"),
BUILDIN_DEF(copyarray,"rri"),
@@ -14486,12 +14752,12 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(getelementofarray,"ri"),
BUILDIN_DEF(getitem,"vi?"),
BUILDIN_DEF(rentitem,"vi"),
- BUILDIN_DEF(getitem2,"iiiiiiiii*"),
- BUILDIN_DEF(getnameditem,"is"),
+ BUILDIN_DEF(getitem2,"viiiiiiii?"),
+ BUILDIN_DEF(getnameditem,"vv"),
BUILDIN_DEF2(grouprandomitem,"groupranditem","i"),
- BUILDIN_DEF(makeitem,"iisii"),
- BUILDIN_DEF(delitem,"ii?"),
- BUILDIN_DEF(delitem2,"iiiiiiiii?"),
+ BUILDIN_DEF(makeitem,"visii"),
+ BUILDIN_DEF(delitem,"vi?"),
+ BUILDIN_DEF(delitem2,"viiiiiiii?"),
BUILDIN_DEF2(enableitemuse,"enable_items",""),
BUILDIN_DEF2(disableitemuse,"disable_items",""),
BUILDIN_DEF(cutin,"si"),
@@ -14500,13 +14766,13 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(itemheal,"ii"),
BUILDIN_DEF(percentheal,"ii"),
BUILDIN_DEF(rand,"i?"),
- BUILDIN_DEF(countitem,"i"),
- BUILDIN_DEF(countitem2,"iiiiiiii"),
- BUILDIN_DEF(checkweight,"ii"),
- BUILDIN_DEF(readparam,"i*"),
- BUILDIN_DEF(getcharid,"i*"),
+ BUILDIN_DEF(countitem,"v"),
+ BUILDIN_DEF(countitem2,"viiiiiii"),
+ BUILDIN_DEF(checkweight,"vi"),
+ BUILDIN_DEF(readparam,"i?"),
+ BUILDIN_DEF(getcharid,"i?"),
BUILDIN_DEF(getpartyname,"i"),
- BUILDIN_DEF(getpartymember,"i*"),
+ BUILDIN_DEF(getpartymember,"i?"),
BUILDIN_DEF(getpartyleader,"i?"),
BUILDIN_DEF(getguildname,"i"),
BUILDIN_DEF(getguildmaster,"i"),
@@ -14557,16 +14823,16 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(gettime,"i"),
BUILDIN_DEF(gettimestr,"si"),
BUILDIN_DEF(openstorage,""),
- BUILDIN_DEF(guildopenstorage,"*"),
+ BUILDIN_DEF(guildopenstorage,""),
BUILDIN_DEF(itemskill,"vi"),
BUILDIN_DEF(produce,"i"),
BUILDIN_DEF(cooking,"i"),
- BUILDIN_DEF(monster,"siisii*"),
+ BUILDIN_DEF(monster,"siisii?"),
BUILDIN_DEF(getmobdrops,"i"),
- BUILDIN_DEF(areamonster,"siiiisii*"),
+ BUILDIN_DEF(areamonster,"siiiisii?"),
BUILDIN_DEF(killmonster,"ss?"),
BUILDIN_DEF(killmonsterall,"s?"),
- BUILDIN_DEF(clone,"siisi*"),
+ BUILDIN_DEF(clone,"siisi????"),
BUILDIN_DEF(doevent,"s"),
BUILDIN_DEF(donpcevent,"s"),
BUILDIN_DEF(cmdothernpc,"ss"),
@@ -14581,14 +14847,14 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(attachnpctimer,"?"), // attached the player id to the npc timer [Celest]
BUILDIN_DEF(detachnpctimer,"?"), // detached the player id from the npc timer [Celest]
BUILDIN_DEF(playerattached,""), // returns id of the current attached player. [Skotlex]
- BUILDIN_DEF(announce,"si*"),
- BUILDIN_DEF(mapannounce,"ssi*"),
- BUILDIN_DEF(areaannounce,"siiiisi*"),
+ BUILDIN_DEF(announce,"si?????"),
+ BUILDIN_DEF(mapannounce,"ssi?????"),
+ BUILDIN_DEF(areaannounce,"siiiisi?????"),
BUILDIN_DEF(getusers,"i"),
BUILDIN_DEF(getmapguildusers,"si"),
BUILDIN_DEF(getmapusers,"s"),
BUILDIN_DEF(getareausers,"siiii"),
- BUILDIN_DEF(getareadropitem,"siiiii"),
+ BUILDIN_DEF(getareadropitem,"siiiiv"),
BUILDIN_DEF(enablenpc,"s"),
BUILDIN_DEF(disablenpc,"s"),
BUILDIN_DEF(hideoffnpc,"s"),
@@ -14597,7 +14863,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(sc_start2,"iiii?"),
BUILDIN_DEF(sc_start4,"iiiiii?"),
BUILDIN_DEF(sc_end,"i?"),
- BUILDIN_DEF(getscrate,"ii*"),
+ BUILDIN_DEF(getscrate,"ii?"),
BUILDIN_DEF(debugmes,"s"),
BUILDIN_DEF2(catchpet,"pet","i"),
BUILDIN_DEF2(birthpet,"bpet",""),
@@ -14605,7 +14871,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(resetstatus,""),
BUILDIN_DEF(resetskill,""),
BUILDIN_DEF(skillpointcount,""),
- BUILDIN_DEF(changebase,"i"),
+ BUILDIN_DEF(changebase,"i?"),
BUILDIN_DEF(changesex,""),
BUILDIN_DEF(waitingroom,"si??"),
BUILDIN_DEF(delwaitingroom,"?"),
@@ -14621,22 +14887,22 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(isloggedin,"i?"),
BUILDIN_DEF(setmapflagnosave,"ssii"),
BUILDIN_DEF(getmapflag,"si"),
- BUILDIN_DEF(setmapflag,"si*"),
+ BUILDIN_DEF(setmapflag,"si?"),
BUILDIN_DEF(removemapflag,"si"),
BUILDIN_DEF(pvpon,"s"),
BUILDIN_DEF(pvpoff,"s"),
BUILDIN_DEF(gvgon,"s"),
BUILDIN_DEF(gvgoff,"s"),
- BUILDIN_DEF(emotion,"i*"),
+ BUILDIN_DEF(emotion,"i??"),
BUILDIN_DEF(maprespawnguildid,"sii"),
BUILDIN_DEF(agitstart,""), // <Agit>
BUILDIN_DEF(agitend,""),
BUILDIN_DEF(agitcheck,""), // <Agitcheck>
BUILDIN_DEF(flagemblem,"i"), // Flag Emblem
BUILDIN_DEF(getcastlename,"s"),
- BUILDIN_DEF(getcastledata,"si*"),
+ BUILDIN_DEF(getcastledata,"si?"),
BUILDIN_DEF(setcastledata,"sii"),
- BUILDIN_DEF(requestguildinfo,"i*"),
+ BUILDIN_DEF(requestguildinfo,"i?"),
BUILDIN_DEF(getequipcardcnt,"i"),
BUILDIN_DEF(successremovecards,"i"),
BUILDIN_DEF(failedremovecards,"ii"),
@@ -14649,7 +14915,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(getmotherid,""),
BUILDIN_DEF(getfatherid,""),
BUILDIN_DEF(warppartner,"sii"),
- BUILDIN_DEF(getitemname,"i"),
+ BUILDIN_DEF(getitemname,"v"),
BUILDIN_DEF(getitemslots,"i"),
BUILDIN_DEF(makepet,"i"),
BUILDIN_DEF(getexp,"ii"),
@@ -14659,9 +14925,9 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(classchange,"ii"),
BUILDIN_DEF(misceffect,"i"),
BUILDIN_DEF(playBGM,"s"),
- BUILDIN_DEF(playBGMall,"s*"),
+ BUILDIN_DEF(playBGMall,"s?????"),
BUILDIN_DEF(soundeffect,"si"),
- BUILDIN_DEF(soundeffectall,"si*"), // SoundEffectAll [Codemaster]
+ BUILDIN_DEF(soundeffectall,"si?????"), // SoundEffectAll [Codemaster]
BUILDIN_DEF(strmobinfo,"ii"), // display mob data [Valaris]
BUILDIN_DEF(guardian,"siisi??"), // summon guardians
BUILDIN_DEF(guardianinfo,"sii"), // display guardian data [Valaris]
@@ -14674,34 +14940,34 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(petskillsupport,"viiii"), // [Skotlex]
BUILDIN_DEF(skilleffect,"vi"), // skill effect [Celest]
BUILDIN_DEF(npcskilleffect,"viii"), // npc skill effect [Valaris]
- BUILDIN_DEF(specialeffect,"i*"), // npc skill effect [Valaris]
- BUILDIN_DEF(specialeffect2,"i*"), // skill effect on players[Valaris]
+ BUILDIN_DEF(specialeffect,"i??"), // npc skill effect [Valaris]
+ BUILDIN_DEF(specialeffect2,"i??"), // skill effect on players[Valaris]
BUILDIN_DEF(nude,""), // nude command [Valaris]
- BUILDIN_DEF(mapwarp,"ssii*"), // Added by RoVeRT
- BUILDIN_DEF(atcommand,"*"), // [MouseJstr]
- BUILDIN_DEF(charcommand,"*"), // [MouseJstr]
+ BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT
+ BUILDIN_DEF(atcommand,"s"), // [MouseJstr]
+ BUILDIN_DEF(charcommand,"s"), // [MouseJstr]
BUILDIN_DEF(movenpc,"sii"), // [MouseJstr]
- BUILDIN_DEF(message,"s*"), // [MouseJstr]
- BUILDIN_DEF(npctalk,"*"), // [Valaris]
+ BUILDIN_DEF(message,"ss"), // [MouseJstr]
+ BUILDIN_DEF(npctalk,"s"), // [Valaris]
BUILDIN_DEF(mobcount,"ss"),
BUILDIN_DEF(getlook,"i"),
BUILDIN_DEF(getsavepoint,"i"),
BUILDIN_DEF(npcspeed,"i"), // [Valaris]
BUILDIN_DEF(npcwalkto,"ii"), // [Valaris]
BUILDIN_DEF(npcstop,""), // [Valaris]
- BUILDIN_DEF(getmapxy,"siii*"), //by Lorky [Lupus]
+ BUILDIN_DEF(getmapxy,"rrri?"), //by Lorky [Lupus]
BUILDIN_DEF(checkoption1,"i"),
BUILDIN_DEF(checkoption2,"i"),
BUILDIN_DEF(guildgetexp,"i"),
BUILDIN_DEF(guildchangegm,"is"),
BUILDIN_DEF(logmes,"s"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus]
- BUILDIN_DEF(summon,"si*"), // summons a slave monster [Celest]
+ BUILDIN_DEF(summon,"si??"), // summons a slave monster [Celest]
BUILDIN_DEF(isnight,""), // check whether it is night time [Celest]
BUILDIN_DEF(isday,""), // check whether it is day time [Celest]
BUILDIN_DEF(isequipped,"i*"), // check whether another item/card has been equipped [Celest]
BUILDIN_DEF(isequippedcnt,"i*"), // check how many items/cards are being equipped [Celest]
BUILDIN_DEF(cardscnt,"i*"), // check how many items/cards are being equipped in the same arm [Lupus]
- BUILDIN_DEF(getrefine,"*"), // returns the refined number of the current item, or an item with index specified [celest]
+ BUILDIN_DEF(getrefine,""), // returns the refined number of the current item, or an item with index specified [celest]
BUILDIN_DEF(night,""), // sets the server to night time
BUILDIN_DEF(day,""), // sets the server to day time
#ifdef PCRE_SUPPORT
@@ -14711,13 +14977,13 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(deletepset,"i"), // Delete a pattern set [MouseJstr]
#endif
BUILDIN_DEF(dispbottom,"s"), //added from jA [Lupus]
- BUILDIN_DEF(getusersname,"*"),
+ BUILDIN_DEF(getusersname,""),
BUILDIN_DEF(recovery,""),
BUILDIN_DEF(getpetinfo,"i"),
BUILDIN_DEF(gethominfo,"i"),
BUILDIN_DEF(checkequipedcard,"i"),
- BUILDIN_DEF(jump_zero,"ii"), //for future jA script compatibility
- BUILDIN_DEF(globalmes,"s*"),
+ BUILDIN_DEF(jump_zero,"il"), //for future jA script compatibility
+ BUILDIN_DEF(globalmes,"s?"),
BUILDIN_DEF(getmapmobs,"s"), //end jA addition
BUILDIN_DEF(unequip,"i"), // unequip command [Spectre]
BUILDIN_DEF(getstrlen,"s"), //strlen [Valaris]
@@ -14734,22 +15000,22 @@ struct script_function buildin_func[] = {
// <--- [zBuffer] List of mathematics commands
BUILDIN_DEF(md5,"s"),
// [zBuffer] List of dynamic var commands --->
- BUILDIN_DEF(getd,"*"),
- BUILDIN_DEF(setd,"*"),
+ BUILDIN_DEF(getd,"s"),
+ BUILDIN_DEF(setd,"sv"),
// <--- [zBuffer] List of dynamic var commands
BUILDIN_DEF(petstat,"i"),
- BUILDIN_DEF(callshop,"si"), // [Skotlex]
+ BUILDIN_DEF(callshop,"s?"), // [Skotlex]
BUILDIN_DEF(npcshopitem,"sii*"), // [Lance]
BUILDIN_DEF(npcshopadditem,"sii*"),
BUILDIN_DEF(npcshopdelitem,"si*"),
BUILDIN_DEF(npcshopattach,"s?"),
BUILDIN_DEF(equip,"i"),
BUILDIN_DEF(autoequip,"ii"),
- BUILDIN_DEF(setbattleflag,"ss"),
+ BUILDIN_DEF(setbattleflag,"si"),
BUILDIN_DEF(getbattleflag,"s"),
- BUILDIN_DEF(setitemscript,"is*"), //Set NEW item bonus script. Lupus
+ BUILDIN_DEF(setitemscript,"is?"), //Set NEW item bonus script. Lupus
BUILDIN_DEF(disguise,"i"), //disguise player. Lupus
- BUILDIN_DEF(undisguise,"*"), //undisguise player. Lupus
+ BUILDIN_DEF(undisguise,""), //undisguise player. Lupus
BUILDIN_DEF(getmonsterinfo,"ii"), //Lupus
BUILDIN_DEF(axtoi,"s"),
BUILDIN_DEF(query_sql,"s*"),
@@ -14780,10 +15046,10 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(warpportal,"iisii"),
BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn]
BUILDIN_DEF2(homunculus_shuffle,"homshuffle",""), //[Zephyrus]
- BUILDIN_DEF(eaclass,"*"), //[Skotlex]
- BUILDIN_DEF(roclass,"i*"), //[Skotlex]
- BUILDIN_DEF(checkvending,"*"),
- BUILDIN_DEF(checkchatting,"*"),
+ BUILDIN_DEF(eaclass,"?"), //[Skotlex]
+ BUILDIN_DEF(roclass,"i?"), //[Skotlex]
+ BUILDIN_DEF(checkvending,"?"),
+ BUILDIN_DEF(checkchatting,"?"),
BUILDIN_DEF(openmail,""),
BUILDIN_DEF(openauction,""),
BUILDIN_DEF(checkcell,"siii"),
@@ -14801,7 +15067,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(readbook,"ii"),
BUILDIN_DEF(setfont,"i"),
BUILDIN_DEF(areamobuseskill,"siiiiviiiii"),
- BUILDIN_DEF(progressbar, "si"),
+ BUILDIN_DEF(progressbar,"si"),
BUILDIN_DEF(pushpc,"ii"),
// WoE SE
BUILDIN_DEF(agitstart2,""),
@@ -14812,7 +15078,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(waitingroom2bg_single,"isiis"),
BUILDIN_DEF(bg_team_setxy,"iii"),
BUILDIN_DEF(bg_warp,"isii"),
- BUILDIN_DEF(bg_monster,"isiisi*"),
+ BUILDIN_DEF(bg_monster,"isiisi?"),
BUILDIN_DEF(bg_monster_set_team,"ii"),
BUILDIN_DEF(bg_leave,""),
BUILDIN_DEF(bg_destroy,"i"),
@@ -14830,7 +15096,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(instance_id,"?"),
BUILDIN_DEF(instance_set_timeout,"ii?"),
BUILDIN_DEF(instance_init,"i"),
- BUILDIN_DEF(instance_announce,"isi*"),
+ BUILDIN_DEF(instance_announce,"isi?????"),
BUILDIN_DEF(instance_npcname,"s?"),
BUILDIN_DEF(has_instance,"s?"),
BUILDIN_DEF(instance_warpall,"sii?"),
@@ -14839,7 +15105,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(setquest, "i"),
BUILDIN_DEF(erasequest, "i"),
BUILDIN_DEF(completequest, "i"),
- BUILDIN_DEF(checkquest, "i*"),
+ BUILDIN_DEF(checkquest, "i?"),
BUILDIN_DEF(changequest, "ii"),
BUILDIN_DEF(showevent, "ii"),
{NULL,NULL,NULL},
diff --git a/src/map/script.h b/src/map/script.h
index aa6b85140..d6ede0e8b 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -11,6 +11,7 @@ extern int potion_hp, potion_per_hp, potion_sp, potion_per_sp;
extern int potion_target;
extern struct Script_Config {
+ unsigned warn_func_mismatch_argtypes : 1;
unsigned warn_func_mismatch_paramnum : 1;
int check_cmdcount;
int check_gotocount;
@@ -121,6 +122,9 @@ struct script_state {
int tick,timer,charid;
} sleep;
int instance_id;
+ //For backing up purposes
+ struct script_state *bk_st;
+ int bk_npcid;
};
struct script_reg {
@@ -163,6 +167,9 @@ struct DBMap* script_get_label_db(void);
struct DBMap* script_get_userfunc_db(void);
void script_run_autobonus(const char *autobonus,int id, int pos);
+void script_cleararray_pc(struct map_session_data* sd, const char* varname, void* value);
+void script_setarray_pc(struct map_session_data* sd, const char* varname, uint8 idx, void* value, int* refcache);
+
int script_config_read(char *cfgName);
int do_init_script(void);
int do_final_script(void);
diff --git a/src/map/skill.c b/src/map/skill.c
index ccc3d96f9..3c4cbcd21 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -180,9 +180,7 @@ int skill_tree_get_max(int id, int b_class)
return skill_get_max(id);
}
-int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
int skill_frostjoke_scream(struct block_list *bl,va_list ap);
-int status_change_timer_sub(struct block_list *bl, va_list ap);
int skill_attack_area(struct block_list *bl,va_list ap);
struct skill_unit_group *skill_locate_element_field(struct block_list *bl); // [Skotlex]
int skill_graffitiremover(struct block_list *bl, va_list ap); // [Valaris]
@@ -734,7 +732,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
case AM_ACIDTERROR:
sc_start(bl,SC_BLEEDING,(skilllv*3),skilllv,skill_get_time2(skillid,skilllv));
if (skill_break_equip(bl, EQP_ARMOR, 100*skill_get_time(skillid,skilllv), BCT_ENEMY))
- clif_emotion(bl,23);
+ clif_emotion(bl,E_OMG);
break;
case AM_DEMONSTRATION:
@@ -1093,11 +1091,14 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
if( sd == NULL || skillid <= 0 )
return 0;
- sd->state.skillonskill = 1;
for( i = 0; i < ARRAYLENGTH(sd->autospell3) && sd->autospell3[i].flag; i++ )
{
if( sd->autospell3[i].flag != skillid )
continue;
+
+ if( sd->autospell3[i].lock )
+ continue; // autospell already being executed
+
skill = (sd->autospell3[i].id > 0) ? sd->autospell3[i].id : -sd->autospell3[i].id;
if( skillnotok(skill, sd) )
continue;
@@ -1115,6 +1116,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
continue;
sd->state.autocast = 1;
+ sd->autospell3[i].lock = true;
skill_consume_requirement(sd,skill,skilllv,1);
switch( skill_get_casttype(skill) )
{
@@ -1122,6 +1124,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
case CAST_NODAMAGE: skill_castend_nodamage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
case CAST_DAMAGE: skill_castend_damage_id(&sd->bl, tbl, skill, skilllv, tick, 0); break;
}
+ sd->autospell3[i].lock = false;
sd->state.autocast = 0;
}
@@ -1139,7 +1142,6 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s
}
}
- sd->state.skillonskill = 0;
return 1;
}
@@ -2307,11 +2309,11 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr data)
switch(skl->skill_id) {
case RG_INTIMIDATE:
- if (unit_warp(src,-1,-1,-1,3) == 0) {
+ if (unit_warp(src,-1,-1,-1,CLR_TELEPORT) == 0) {
short x,y;
map_search_freecell(src, 0, &x, &y, 1, 1, 0);
if (target != src && !status_isdead(target))
- unit_warp(target, -1, x, y, 3);
+ unit_warp(target, -1, x, y, CLR_TELEPORT);
}
break;
case BA_FROSTJOKER:
@@ -3002,7 +3004,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
break;
case NPC_DARKBREATH:
- clif_emotion(src,7);
+ clif_emotion(src,E_AG);
case SN_FALCONASSAULT:
case PA_PRESSURE:
case CR_ACIDDEMONSTRATION:
@@ -3098,8 +3100,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
{
if( sd->state.arrow_atk ) //Consume arrow on last invocation to this skill.
battle_consume_ammo(sd, skillid, skilllv);
- if( !sd->state.skillonskill )
- skill_onskillusage(sd, bl, skillid, tick);
+ skill_onskillusage(sd, bl, skillid, tick);
skill_consume_requirement(sd,skillid,skilllv,2);
}
@@ -4418,9 +4419,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if( sd->state.autocast || ( (sd->skillitem == AL_TELEPORT || battle_config.skip_teleport_lv1_menu) && skilllv == 1 ) || skilllv == 3 )
{
if( skilllv == 1 )
- pc_randomwarp(sd,3);
+ pc_randomwarp(sd,CLR_TELEPORT);
else
- pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
}
@@ -4430,12 +4431,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
else
clif_skill_warppoint(sd,skillid,skilllv, (unsigned short)-1,sd->status.save_point.map,0,0);
} else
- unit_warp(bl,-1,-1,-1,3);
+ unit_warp(bl,-1,-1,-1,CLR_TELEPORT);
break;
case NPC_EXPULSION:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- unit_warp(bl,-1,-1,-1,3);
+ unit_warp(bl,-1,-1,-1,CLR_TELEPORT);
break;
case AL_HOLYWATER:
@@ -5360,7 +5361,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case 5: // 2000HP heal, random teleported
status_heal(src, 2000, 0, 0);
if( !map_flag_vs(bl->m) )
- unit_warp(bl, -1,-1,-1, 3);
+ unit_warp(bl, -1,-1,-1, CLR_TELEPORT);
break;
case 6: // random 2 other effects
if (count == -1)
@@ -5435,7 +5436,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
{ //Erase death count 1% of the casts
dstsd->die_counter = 0;
pc_setglobalreg(dstsd,"PC_DIE_COUNTER", 0);
- clif_misceffect2(bl, 0x152);
+ clif_specialeffect(bl, 0x152, AREA);
//SC_SPIRIT invokes status_calc_pc for us.
}
clif_skill_nodamage(src,bl,skillid,skilllv,
@@ -5530,7 +5531,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
continue;
if(map_getcell(src->m,src->x+dx[j],src->y+dy[j],CELL_CHKNOREACH))
dx[j] = dy[j] = 0;
- pc_setpos(dstsd, map_id2index(src->m), src->x+dx[j], src->y+dy[j], 2);
+ pc_setpos(dstsd, map_id2index(src->m), src->x+dx[j], src->y+dy[j], CLR_RESPAWN);
}
}
if (sd)
@@ -5720,8 +5721,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
{
if( sd->state.arrow_atk ) //Consume arrow on last invocation to this skill.
battle_consume_ammo(sd, skillid, skilllv);
- if( !sd->state.skillonskill )
- skill_onskillusage(sd, bl, skillid, tick);
+ skill_onskillusage(sd, bl, skillid, tick);
skill_consume_requirement(sd,skillid,skilllv,2);
}
@@ -6585,8 +6585,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
{
if( sd->state.arrow_atk && !(flag&1) ) //Consume arrow if a ground skill was not invoked. [Skotlex]
battle_consume_ammo(sd, skillid, skilllv);
- if( !sd->state.skillonskill )
- skill_onskillusage(sd, NULL, skillid, tick);
+ skill_onskillusage(sd, NULL, skillid, tick);
skill_consume_requirement(sd,skillid,skilllv,2);
}
@@ -6643,9 +6642,9 @@ int skill_castend_map (struct map_session_data *sd, short skill_num, const char
{
case AL_TELEPORT:
if(strcmp(map,"Random")==0)
- pc_randomwarp(sd,3);
+ pc_randomwarp(sd,CLR_TELEPORT);
else if (sd->menuskill_val > 1) //Need lv2 to be able to warp here.
- pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,3);
+ pc_setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
break;
case AL_WARP:
@@ -7259,7 +7258,7 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un
if( --sg->val1 <= 0 )
skill_delunitgroup(sg);
- pc_setpos(sd,m,x,y,3);
+ pc_setpos(sd,m,x,y,CLR_TELEPORT);
sg = src->group; // avoid dangling pointer (pc_setpos can cause deletion of 'sg')
}
} else
@@ -7267,7 +7266,7 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un
{
int m = map_mapindex2mapid(sg->val3);
if (m < 0) break; //Map not available on this map-server.
- unit_warp(bl,m,sg->val2>>16,sg->val2&0xffff,3);
+ unit_warp(bl,m,sg->val2>>16,sg->val2&0xffff,CLR_TELEPORT);
}
break;
@@ -7569,7 +7568,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
}
else
sec = 3000; //Couldn't trap it?
- clif_01ac(&src->bl); // mysterious packet
+ clif_skillunit_update(&src->bl);
sg->limit = DIFF_TICK(tick,sg->tick)+sec;
sg->interval = -1;
src->range = 0;
@@ -9307,7 +9306,7 @@ void skill_repairweapon (struct map_session_data *sd, int idx)
return;
}
- if (itemdb_type(item->nameid)==4)
+ if (itemdb_type(item->nameid)==IT_WEAPON)
material = materials [itemdb_wlv(item->nameid)-1]; // Lv1/2/3/4 weapons consume 1 Iron Ore/Iron/Steel/Rough Oridecon
else
material = materials [2]; // Armors consume 1 Steel
@@ -9358,7 +9357,7 @@ void skill_weaponrefine (struct map_session_data *sd, int idx)
struct item_data *ditem = sd->inventory_data[idx];
item = &sd->status.inventory[idx];
- if(item->nameid > 0 && ditem->type == 4)
+ if(item->nameid > 0 && ditem->type == IT_WEAPON)
{
if( item->refine >= sd->menuskill_val
|| item->refine >= MAX_REFINE // if it's no longer refineable
@@ -9408,7 +9407,7 @@ void skill_weaponrefine (struct map_session_data *sd, int idx)
clif_refine(sd->fd,1,idx,item->refine);
pc_delitem(sd,idx,1,0,2);
clif_misceffect(&sd->bl,2);
- clif_emotion(&sd->bl, 23);
+ clif_emotion(&sd->bl, E_OMG);
}
}
}
@@ -10162,13 +10161,17 @@ struct skill_unit_group* skill_initunitgroup (struct block_list* src, int count,
/*==========================================
*
*------------------------------------------*/
-int skill_delunitgroup (struct skill_unit_group *group)
+int skill_delunitgroup_(struct skill_unit_group *group, const char* file, int line, const char* func)
{
struct block_list* src;
struct unit_data *ud;
int i,j;
- nullpo_ret(group);
+ if( group == NULL )
+ {
+ ShowDebug("skill_delunitgroup: group is NULL (source=%s:%d, %s)! Please report this! (#3504)\n", file, line, func);
+ return 0;
+ }
src=map_id2bl(group->src_id);
ud = unit_bl2ud(src);
@@ -10404,13 +10407,13 @@ static int skill_unit_timer_sub (DBKey key, void* data, va_list ap)
sd = map_charid2sd(group->val1);
group->val1 = 0;
if (sd && !map[sd->bl.m].flag.nowarp)
- pc_setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,3);
+ pc_setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,CLR_TELEPORT);
}
if(group->val2) {
sd = map_charid2sd(group->val2);
group->val2 = 0;
if (sd && !map[sd->bl.m].flag.nowarp)
- pc_setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,3);
+ pc_setpos(sd,map_id2index(unit->bl.m),unit->bl.x,unit->bl.y,CLR_TELEPORT);
}
skill_delunit(unit);
}
diff --git a/src/map/skill.h b/src/map/skill.h
index 04f2e8d28..fc7877be3 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -272,7 +272,8 @@ struct skill_unit_group *skill_unitsetting(struct block_list* src, short skillid
struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2);
int skill_delunit(struct skill_unit *unit);
struct skill_unit_group *skill_initunitgroup(struct block_list* src, int count, short skillid, short skilllv, int unit_id, int limit, int interval);
-int skill_delunitgroup(struct skill_unit_group *group);
+int skill_delunitgroup_(struct skill_unit_group *group, const char* file, int line, const char* func);
+#define skill_delunitgroup(group) skill_delunitgroup_(group,__FILE__,__LINE__,__func__)
int skill_clear_unitgroup(struct block_list *src);
int skill_clear_group(struct block_list *bl, int flag);
diff --git a/src/map/status.c b/src/map/status.c
index 95d7f3796..449ea8f56 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8,6 +8,7 @@
#include "../common/malloc.h"
#include "../common/utils.h"
#include "../common/ers.h"
+#include "../common/strlib.h"
#include "map.h"
#include "path.h"
@@ -831,16 +832,16 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
status_change_clear(target,0);
if(flag&4) //Delete from memory. (also invokes map removal code)
- unit_free(target,1);
+ unit_free(target,CLR_DEAD);
else
if(flag&2) //remove from map
- unit_remove_map(target,1);
+ unit_remove_map(target,CLR_DEAD);
else
{ //Some death states that would normally be handled by unit_remove_map
unit_stop_attack(target);
unit_stop_walking(target,1);
unit_skillcastcancel(target,0);
- clif_clearunit_area(target,1);
+ clif_clearunit_area(target,CLR_DEAD);
skill_unit_move(target,gettick(),4);
skill_cleartimerskill(target);
}
@@ -1083,7 +1084,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
if (sc->data[SC_WINKCHARM] && target && !flag)
{ //Prevents skill usage
- clif_emotion(src, 3);
+ clif_emotion(src, E_LV);
return 0;
}
@@ -1546,8 +1547,13 @@ int status_calc_pet_(struct pet_data *pd, bool first)
if (first) {
memcpy(&pd->status, &pd->db->status, sizeof(struct status_data));
- pd->status.mode|= MD_CANMOVE; //so they can chase their master!
+ pd->status.mode = MD_CANMOVE; // pets discard all modes, except walking
pd->status.speed = pd->petDB->speed;
+
+ if(battle_config.pet_attack_support || battle_config.pet_damage_support)
+ {// attack support requires the pet to be able to attack
+ pd->status.mode|= MD_CANATTACK;
+ }
}
if (battle_config.pet_lv_rate && pd->msd)
@@ -1840,6 +1846,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
+ sizeof(sd->aspd_add)
+ sizeof(sd->setitem_hash)
+ sizeof(sd->setitem_hash2)
+ + sizeof(sd->itemhealrate2)
// shorts
+ sizeof(sd->splash_range)
+ sizeof(sd->splash_add_range)
@@ -1859,8 +1866,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
// Autobonus
pc_delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),true);
- pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus),true);
- pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus),true);
+ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus2),true);
+ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
// Parse equipment.
for(i=0;i<EQI_MAX-1;i++) {
@@ -3091,6 +3098,9 @@ void status_calc_bl_(struct block_list* bl, enum scb_flag flag, bool first)
}
}
+ if( bl->type == BL_PET )
+ return; // pets are not affected by statuses
+
if( first && bl->type == BL_MOB )
return; // assume there will be no statuses active
@@ -4915,51 +4925,51 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
return 0; // Stats only for Mercenaries
break;
case SC_STRFOOD:
- if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 > val1)
return 0;
break;
case SC_AGIFOOD:
- if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 > val1)
return 0;
break;
case SC_VITFOOD:
- if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 > val1)
return 0;
break;
case SC_INTFOOD:
- if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 > val1)
return 0;
break;
case SC_DEXFOOD:
- if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 > val1)
return 0;
break;
case SC_LUKFOOD:
- if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 > val1)
return 0;
break;
case SC_FOOD_STR_CASH:
- if (sc->data[SC_STRFOOD] && sc->data[SC_STRFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_STRFOOD] && sc->data[SC_STRFOOD]->val1 > val1)
return 0;
break;
case SC_FOOD_AGI_CASH:
- if (sc->data[SC_AGIFOOD] && sc->data[SC_AGIFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_AGIFOOD] && sc->data[SC_AGIFOOD]->val1 > val1)
return 0;
break;
case SC_FOOD_VIT_CASH:
- if (sc->data[SC_VITFOOD] && sc->data[SC_VITFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_VITFOOD] && sc->data[SC_VITFOOD]->val1 > val1)
return 0;
break;
case SC_FOOD_INT_CASH:
- if (sc->data[SC_INTFOOD] && sc->data[SC_INTFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_INTFOOD] && sc->data[SC_INTFOOD]->val1 > val1)
return 0;
break;
case SC_FOOD_DEX_CASH:
- if (sc->data[SC_DEXFOOD] && sc->data[SC_DEXFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_DEXFOOD] && sc->data[SC_DEXFOOD]->val1 > val1)
return 0;
break;
case SC_FOOD_LUK_CASH:
- if (sc->data[SC_LUKFOOD] && sc->data[SC_LUKFOOD]->val1 > sc->data[type]->val1)
+ if (sc->data[SC_LUKFOOD] && sc->data[SC_LUKFOOD]->val1 > val1)
return 0;
break;
}
@@ -5084,52 +5094,40 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
status_change_end(bl,SC_INCREASEAGI,-1);
break;
case SC_STRFOOD:
- if (sc->data[SC_FOOD_STR_CASH] && sc->data[SC_FOOD_STR_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_STR_CASH,-1);
+ status_change_end(bl,SC_FOOD_STR_CASH,-1);
break;
case SC_AGIFOOD:
- if (sc->data[SC_FOOD_AGI_CASH] && sc->data[SC_FOOD_AGI_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_AGI_CASH,-1);
+ status_change_end(bl,SC_FOOD_AGI_CASH,-1);
break;
case SC_VITFOOD:
- if (sc->data[SC_FOOD_VIT_CASH] && sc->data[SC_FOOD_VIT_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_VIT_CASH,-1);
+ status_change_end(bl,SC_FOOD_VIT_CASH,-1);
break;
case SC_INTFOOD:
- if (sc->data[SC_FOOD_INT_CASH] && sc->data[SC_FOOD_INT_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_INT_CASH,-1);
+ status_change_end(bl,SC_FOOD_INT_CASH,-1);
break;
case SC_DEXFOOD:
- if (sc->data[SC_FOOD_DEX_CASH] && sc->data[SC_FOOD_DEX_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_DEX_CASH,-1);
+ status_change_end(bl,SC_FOOD_DEX_CASH,-1);
break;
case SC_LUKFOOD:
- if (sc->data[SC_FOOD_LUK_CASH] && sc->data[SC_FOOD_LUK_CASH]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_FOOD_LUK_CASH,-1);
+ status_change_end(bl,SC_FOOD_LUK_CASH,-1);
break;
case SC_FOOD_STR_CASH:
- if (sc->data[SC_STRFOOD] && sc->data[SC_STRFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_STRFOOD,-1);
+ status_change_end(bl,SC_STRFOOD,-1);
break;
case SC_FOOD_AGI_CASH:
- if (sc->data[SC_AGIFOOD] && sc->data[SC_AGIFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_AGIFOOD,-1);
+ status_change_end(bl,SC_AGIFOOD,-1);
break;
case SC_FOOD_VIT_CASH:
- if (sc->data[SC_VITFOOD] && sc->data[SC_VITFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_VITFOOD,-1);
+ status_change_end(bl,SC_VITFOOD,-1);
break;
case SC_FOOD_INT_CASH:
- if (sc->data[SC_INTFOOD] && sc->data[SC_INTFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_INTFOOD,-1);
+ status_change_end(bl,SC_INTFOOD,-1);
break;
case SC_FOOD_DEX_CASH:
- if (sc->data[SC_DEXFOOD] && sc->data[SC_DEXFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_DEXFOOD,-1);
+ status_change_end(bl,SC_DEXFOOD,-1);
break;
case SC_FOOD_LUK_CASH:
- if (sc->data[SC_LUKFOOD] && sc->data[SC_LUKFOOD]->val1 <= sc->data[type]->val1)
- status_change_end(bl,SC_LUKFOOD,-1);
+ status_change_end(bl,SC_LUKFOOD,-1);
break;
}
@@ -5258,7 +5256,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SIGNUMCRUCIS:
val2 = 10 + 4*val1; //Def reduction
tick = -1;
- clif_emotion(bl,4);
+ clif_emotion(bl,E_SWT);
break;
case SC_MAXIMIZEPOWER:
val2 = tick>0?tick:60000;
@@ -5475,7 +5473,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
case SC_CONFUSION:
- clif_emotion(bl,1);
+ clif_emotion(bl,E_WHAT);
break;
case SC_BLEEDING:
val4 = tick/10000;
@@ -5945,7 +5943,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
int pos = (bl->x&0xFFFF)|(bl->y<<16), //Current Coordinates
map = sd->mapindex; //Current Map
//1. Place in Jail (val2 -> Jail Map, val3 -> x, val4 -> y
- pc_setpos(sd,(unsigned short)val2,val3,val4, 3);
+ pc_setpos(sd,(unsigned short)val2,val3,val4, CLR_TELEPORT);
//2. Set restore point (val3 -> return map, val4 return coords
val3 = map;
val4 = pos;
@@ -6607,6 +6605,15 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
if(sce->val2)
{// erase associated land skill
group = skill_id2group(sce->val2);
+
+ if( group == NULL )
+ {
+ ShowDebug("status_change_end: SC_DANCING is missing skill unit group (val1=%d, val2=%d, val3=%d, val4=%d, timer=%d, tid=%d, char_id=%d, map=%s, x=%d, y=%d). Please report this! (#3504)\n",
+ sce->val1, sce->val2, sce->val3, sce->val4, sce->timer, tid,
+ sd ? sd->status.char_id : 0,
+ mapindex_id2name(map_id2index(bl->m)), bl->x, bl->y);
+ }
+
sce->val2 = 0;
skill_delunitgroup(group);
}
@@ -6728,7 +6735,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
break;
//natural expiration.
if(sd && sd->mapindex == sce->val2)
- pc_setpos(sd,(unsigned short)sce->val3,sce->val4&0xFFFF, sce->val4>>16, 3);
+ pc_setpos(sd,(unsigned short)sce->val3,sce->val4&0xFFFF, sce->val4>>16, CLR_TELEPORT);
break; //guess hes not in jail :P
case SC_CHANGE:
if (tid == -1)
@@ -7668,146 +7675,124 @@ static int status_natural_heal_timer(int tid, unsigned int tick, int id, intptr
return 0;
}
-int status_readdb(void)
-{
- int i,j,class_;
- FILE *fp;
- char line[1024], path[1024],*p;
-
- sprintf(path, "%s/job_db1.txt", db_path);
- fp=fopen(path,"r"); // Job-specific values (weight, HP, SP, ASPD)
- if(fp==NULL){
- ShowError("can't read %s\n", path);
- return 1;
+/*==========================================
+ * DB reading.
+ * job_db1.txt - weight, hp, sp, aspd
+ * job_db2.txt - job level stat bonuses
+ * size_fix.txt - size adjustment table for weapons
+ * refine_db.txt - refining data table
+ *------------------------------------------*/
+static bool status_readdb_job1(char* fields[], int columns, int current)
+{// Job-specific values (weight, HP, SP, ASPD)
+ int idx, class_;
+ unsigned int i;
+
+ class_ = atoi(fields[0]);
+
+ if(!pcdb_checkid(class_))
+ {
+ ShowWarning("status_readdb_job1: Invalid job class %d specified.\n", class_);
+ return false;
}
- i = 0;
- while(fgets(line, sizeof(line), fp))
+ idx = pc_class2idx(class_);
+
+ max_weight_base[idx] = atoi(fields[1]);
+ hp_coefficient[idx] = atoi(fields[2]);
+ hp_coefficient2[idx] = atoi(fields[3]);
+ sp_coefficient[idx] = atoi(fields[4]);
+
+ for(i = 0; i < MAX_WEAPON_TYPE; i++)
{
- //NOTE: entry MAX_WEAPON_TYPE is not counted
- char* split[5 + MAX_WEAPON_TYPE];
- i++;
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line; j < 5 + MAX_WEAPON_TYPE && p; j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- if(j < 5 + MAX_WEAPON_TYPE)
- { //Weapon #.MAX_WEAPON_TYPE is constantly not load. Fix to that: replace < with <= [blackhole89]
- ShowDebug("%s: Not enough columns at line %d\n", path, i);
- continue;
- }
- class_ = atoi(split[0]);
- if(!pcdb_checkid(class_))
- continue;
- class_ = pc_class2idx(class_);
- max_weight_base[class_]=atoi(split[1]);
- hp_coefficient[class_]=atoi(split[2]);
- hp_coefficient2[class_]=atoi(split[3]);
- sp_coefficient[class_]=atoi(split[4]);
- for(j=0;j<MAX_WEAPON_TYPE;j++)
- aspd_base[class_][j]=atoi(split[j+5]);
+ aspd_base[idx][i] = atoi(fields[i+5]);
}
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+ return true;
+}
- memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
- sprintf(path, "%s/job_db2.txt", db_path);
- fp=fopen(path,"r");
- if(fp==NULL){
- ShowError("can't read %s\n", path);
- return 1;
+static bool status_readdb_job2(char* fields[], int columns, int current)
+{
+ int idx, class_, i;
+
+ class_ = atoi(fields[0]);
+
+ if(!pcdb_checkid(class_))
+ {
+ ShowWarning("status_readdb_job2: Invalid job class %d specified.\n", class_);
+ return false;
}
- while(fgets(line, sizeof(line), fp))
+ idx = pc_class2idx(class_);
+
+ for(i = 1; i < columns; i++)
{
- char *split[MAX_LEVEL+1]; //Job Level is limited to MAX_LEVEL, so the bonuses should likewise be limited to it. [Skotlex]
- if(line[0]=='/' && line[1]=='/')
- continue;
- for(j=0,p=line;j<MAX_LEVEL+1 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- class_ = atoi(split[0]);
- if(!pcdb_checkid(class_))
- continue;
- class_ = pc_class2idx(class_);
- for(i=1;i<j && split[i];i++)
- job_bonus[class_][i-1]=atoi(split[i]);
- }
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
-
- // TCY␳e?u
- for(i=0;i<3;i++)
- for(j=0;j<MAX_WEAPON_TYPE;j++)
- atkmods[i][j]=100;
- sprintf(path, "%s/size_fix.txt", db_path);
- fp=fopen(path,"r");
- if(fp==NULL){
- ShowError("can't read %s\n", path);
- return 1;
+ job_bonus[idx][i-1] = atoi(fields[i]);
}
- i=0;
- while(fgets(line, sizeof(line), fp))
+ return true;
+}
+
+static bool status_readdb_sizefix(char* fields[], int columns, int current)
+{
+ unsigned int i;
+
+ for(i = 0; i < MAX_WEAPON_TYPE; i++)
{
- char *split[MAX_WEAPON_TYPE];
- if(line[0]=='/' && line[1]=='/')
- continue;
- if(atoi(line)<=0)
- continue;
- memset(split,0,sizeof(split));
- for(j=0,p=line;j<MAX_WEAPON_TYPE && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- atkmods[i][j]=atoi(split[j]);
- }
- i++;
+ atkmods[current][i] = atoi(fields[i]);
}
- fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+ return true;
+}
+
+static bool status_readdb_refine(char* fields[], int columns, int current)
+{
+ int i;
+
+ refinebonus[current][0] = atoi(fields[0]); // stats per safe-upgrade
+ refinebonus[current][1] = atoi(fields[1]); // stats after safe-limit
+ refinebonus[current][2] = atoi(fields[2]); // safe limit
+
+ for(i = 0; i < MAX_REFINE; i++)
+ {
+ percentrefinery[current][i] = atoi(fields[3+i]);
+ }
+ return true;
+}
- // ?f?^e?u
- for(i=0;i<5;i++){
+int status_readdb(void)
+{
+ int i, j;
+
+ // initialize databases to default
+ //
+
+ // job_db1.txt
+ memset(max_weight_base, 0, sizeof(max_weight_base));
+ memset(hp_coefficient, 0, sizeof(hp_coefficient));
+ memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
+ memset(sp_coefficient, 0, sizeof(sp_coefficient));
+ memset(aspd_base, 0, sizeof(aspd_base));
+
+ // job_db2.txt
+ memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
+
+ // size_fix.txt
+ for(i=0;i<ARRAYLENGTH(atkmods);i++)
+ for(j=0;j<MAX_WEAPON_TYPE;j++)
+ atkmods[i][j]=100;
+
+ // refine_db.txt
+ for(i=0;i<ARRAYLENGTH(percentrefinery);i++){
for(j=0;j<MAX_REFINE; j++)
- percentrefinery[i][j]=100;
+ percentrefinery[i][j]=100; // success chance
percentrefinery[i][j]=0; //Slot MAX+1 always has 0% success chance [Skotlex]
- refinebonus[i][0]=0;
- refinebonus[i][1]=0;
- refinebonus[i][2]=10;
+ refinebonus[i][0]=0; // stats per safe-upgrade
+ refinebonus[i][1]=0; // stats after safe-limit
+ refinebonus[i][2]=10; // safe limit
}
- sprintf(path, "%s/refine_db.txt", db_path);
- fp=fopen(path,"r");
- if(fp==NULL){
- ShowError("can't read %s\n", path);
- return 1;
- }
- i=0;
- while(fgets(line, sizeof(line), fp))
- {
- char *split[MAX_REFINE+4];
- if(line[0]=='/' && line[1]=='/')
- continue;
- if(atoi(line)<=0)
- continue;
- memset(split,0,sizeof(split));
- for(j=0,p=line;j<MAX_REFINE+4 && p;j++){
- split[j]=p;
- p=strchr(p,',');
- if(p) *p++=0;
- }
- refinebonus[i][0]=atoi(split[0]); // ?{?iX
- refinebonus[i][1]=atoi(split[1]); // ??{?iX
- refinebonus[i][2]=atoi(split[2]); // S?E
- for(j=0;j<MAX_REFINE && split[j+3];j++)
- percentrefinery[i][j]=atoi(split[j+3]);
- i++;
- }
- fclose(fp); //Lupus. close this file!!!
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n",path);
+ // read databases
+ //
+
+ sv_readdb(db_path, "job_db1.txt", ',', 5+MAX_WEAPON_TYPE, 5+MAX_WEAPON_TYPE, -1, &status_readdb_job1);
+ sv_readdb(db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2);
+ sv_readdb(db_path, "size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(atkmods), &status_readdb_sizefix);
+ sv_readdb(db_path, "refine_db.txt", ',', 3+MAX_REFINE+1, 3+MAX_REFINE+1, ARRAYLENGTH(percentrefinery), &status_readdb_refine);
return 0;
}
diff --git a/src/map/storage.c b/src/map/storage.c
index 8960f7203..eb64d3eb4 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -42,17 +42,15 @@ static int storage_comp_item(const void *_i1, const void *_i2)
return -1;
return i1->nameid - i2->nameid;
}
-/* In case someone wants to use it in the future.
-static void storage_sortitem(struct storage_data* stor)
-{
- nullpo_retv(stor);
- qsort(stor->items, MAX_STORAGE, sizeof(struct item), storage_comp_item);
-}
-*/
-static void storage_gsortitem(struct guild_storage* gstor)
+
+static void storage_sortitem(struct item* items, unsigned int size)
{
- nullpo_retv(gstor);
- qsort(gstor->storage_, MAX_GUILD_STORAGE, sizeof(struct item), storage_comp_item);
+ nullpo_retv(items);
+
+ if( battle_config.client_sort_storage )
+ {
+ qsort(items, size, sizeof(struct item), storage_comp_item);
+ }
}
/*==========================================
@@ -104,7 +102,8 @@ int storage_storageopen(struct map_session_data *sd)
}
sd->state.storage_flag = 1;
- clif_storagelist(sd,&sd->status.storage);
+ storage_sortitem(sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
+ clif_storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif_updatestorageamount(sd,sd->status.storage.storage_amount);
return 0;
}
@@ -380,7 +379,8 @@ int storage_guild_storageopen(struct map_session_data* sd)
gstor->storage_status = 1;
sd->state.storage_flag = 2;
- clif_guildstoragelist(sd,gstor);
+ storage_sortitem(gstor->items, ARRAYLENGTH(gstor->items));
+ clif_storagelist(sd, gstor->items, ARRAYLENGTH(gstor->items));
clif_updateguildstorageamount(sd,gstor->storage_amount);
return 0;
}
@@ -406,11 +406,11 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
if(itemdb_isstackable2(data)){ //Stackable
for(i=0;i<MAX_GUILD_STORAGE;i++){
- if(compare_item(&stor->storage_[i], item_data)) {
- if(stor->storage_[i].amount+amount > MAX_AMOUNT)
+ if(compare_item(&stor->items[i], item_data)) {
+ if(stor->items[i].amount+amount > MAX_AMOUNT)
return 1;
- stor->storage_[i].amount+=amount;
- clif_guildstorageitemadded(sd,&stor->storage_[i],i,amount);
+ stor->items[i].amount+=amount;
+ clif_storageitemadded(sd,&stor->items[i],i,amount);
stor->dirty = 1;
if(log_config.enable_logs&0x1000)
log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
@@ -419,15 +419,15 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
}
}
//Add item
- for(i=0;i<MAX_GUILD_STORAGE && stor->storage_[i].nameid;i++);
+ for(i=0;i<MAX_GUILD_STORAGE && stor->items[i].nameid;i++);
if(i>=MAX_GUILD_STORAGE)
return 1;
- memcpy(&stor->storage_[i],item_data,sizeof(stor->storage_[0]));
- stor->storage_[i].amount=amount;
+ memcpy(&stor->items[i],item_data,sizeof(stor->items[0]));
+ stor->items[i].amount=amount;
stor->storage_amount++;
- clif_guildstorageitemadded(sd,&stor->storage_[i],i,amount);
+ clif_storageitemadded(sd,&stor->items[i],i,amount);
clif_updateguildstorageamount(sd,stor->storage_amount);
stor->dirty = 1;
if(log_config.enable_logs&0x1000)
@@ -440,14 +440,14 @@ int guild_storage_delitem(struct map_session_data* sd, struct guild_storage* sto
nullpo_retr(1, sd);
nullpo_retr(1, stor);
- if(stor->storage_[n].nameid==0 || stor->storage_[n].amount<amount)
+ if(stor->items[n].nameid==0 || stor->items[n].amount<amount)
return 1;
- stor->storage_[n].amount-=amount;
+ stor->items[n].amount-=amount;
if(log_config.enable_logs&0x1000)
- log_pick_pc(sd, "G", stor->storage_[n].nameid, amount, &stor->storage_[n]);
- if(stor->storage_[n].amount==0){
- memset(&stor->storage_[n],0,sizeof(stor->storage_[0]));
+ log_pick_pc(sd, "G", stor->items[n].nameid, amount, &stor->items[n]);
+ if(stor->items[n].amount==0){
+ memset(&stor->items[n],0,sizeof(stor->items[0]));
stor->storage_amount--;
clif_updateguildstorageamount(sd,stor->storage_amount);
}
@@ -496,13 +496,13 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount)
if(index<0 || index>=MAX_GUILD_STORAGE)
return 0;
- if(stor->storage_[index].nameid <= 0)
+ if(stor->items[index].nameid <= 0)
return 0;
- if(amount < 1 || amount > stor->storage_[index].amount)
+ if(amount < 1 || amount > stor->items[index].amount)
return 0;
- if((flag = pc_additem(sd,&stor->storage_[index],amount)) == 0)
+ if((flag = pc_additem(sd,&stor->items[index],amount)) == 0)
guild_storage_delitem(sd,stor,index,amount);
else
clif_additem(sd,0,0,flag);
@@ -549,13 +549,13 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a
if(index<0 || index>=MAX_GUILD_STORAGE)
return 0;
- if(stor->storage_[index].nameid<=0)
+ if(stor->items[index].nameid<=0)
return 0;
- if(amount < 1 || amount > stor->storage_[index].amount)
+ if(amount < 1 || amount > stor->items[index].amount)
return 0;
- if(pc_cart_additem(sd,&stor->storage_[index],amount)==0)
+ if(pc_cart_additem(sd,&stor->items[index],amount)==0)
guild_storage_delitem(sd,stor,index,amount);
return 1;
@@ -584,7 +584,6 @@ int storage_guild_storagesaved(int guild_id)
if (stor->dirty && stor->storage_status == 0)
{ //Storage has been correctly saved.
stor->dirty = 0;
- storage_gsortitem(stor);
}
return 1;
}
diff --git a/src/map/unit.c b/src/map/unit.c
index 05c0bcb16..df4efef8e 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -641,7 +641,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
//Warps a unit/ud to a given map/position.
//In the case of players, pc_setpos is used.
//it respects the no warp flags, so it is safe to call this without doing nowarpto/nowarp checks.
-int unit_warp(struct block_list *bl,short m,short x,short y,int type)
+int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type)
{
struct unit_data *ud;
nullpo_ret(bl);
@@ -650,7 +650,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,int type)
if(bl->prev==NULL || !ud)
return 1;
- if (type < 0 || type == 1)
+ if (type == CLR_DEAD)
//Type 1 is invalid, since you shouldn't warp a bl with the "death"
//animation, it messes up with unit_remove_map! [Skotlex]
return 1;
@@ -1305,8 +1305,6 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
return 1;
}
-static int unit_attack_timer(int tid, unsigned int tick, int id, intptr data);
-
int unit_stop_attack(struct block_list *bl)
{
struct unit_data *ud = unit_bl2ud(bl);
@@ -1800,7 +1798,7 @@ int unit_changeviewsize(struct block_list *bl,short size)
} else
return 0;
if(size!=0)
- clif_misceffect2(bl,421+size);
+ clif_specialeffect(bl,421+size, AREA);
return 0;
}
@@ -1811,7 +1809,7 @@ int unit_changeviewsize(struct block_list *bl,short size)
* Otherwise it is assumed bl is being warped.
* On-Kill specific stuff is not performed here, look at status_damage for that.
*------------------------------------------*/
-int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int line, const char* func)
+int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func)
{
struct unit_data *ud = unit_bl2ud(bl);
struct status_change *sc = status_get_sc(bl);
@@ -1960,7 +1958,7 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
{ //If logging out, this is deleted on unit_free
clif_clearunit_area(bl,clrtype);
map_delblock(bl);
- unit_free(bl,0);
+ unit_free(bl,CLR_OUTSIGHT);
map_freeblock_unlock();
return 0;
}
@@ -1973,10 +1971,10 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
ud->canact_tick = ud->canmove_tick; //It appears HOM do reset the can-act tick.
if( !hd->homunculus.intimacy && !(hd->master && !hd->master->state.active) )
{ //If logging out, this is deleted on unit_free
- clif_emotion(bl, 28) ; //sob
+ clif_emotion(bl, E_SOB);
clif_clearunit_area(bl,clrtype);
map_delblock(bl);
- unit_free(bl,0);
+ unit_free(bl,CLR_OUTSIGHT);
map_freeblock_unlock();
return 0;
}
@@ -1990,7 +1988,7 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
{
clif_clearunit_area(bl,clrtype);
map_delblock(bl);
- unit_free(bl,0);
+ unit_free(bl,CLR_OUTSIGHT);
map_freeblock_unlock();
return 0;
}
@@ -2005,11 +2003,11 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
return 1;
}
-void unit_remove_map_pc(struct map_session_data *sd, int clrtype)
+void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype)
{
unit_remove_map(&sd->bl,clrtype);
- if (clrtype == 3) clrtype = 0; //3 is the warp from logging out, but pets/homunc need to just 'vanish' instead of showing the warping out animation.
+ if (clrtype == CLR_TELEPORT) clrtype = CLR_OUTSIGHT; //CLR_TELEPORT is the warp from logging out, but pets/homunc need to just 'vanish' instead of showing the warping out animation.
if(sd->pd)
unit_remove_map(&sd->pd->bl, clrtype);
@@ -2021,19 +2019,17 @@ void unit_remove_map_pc(struct map_session_data *sd, int clrtype)
void unit_free_pc(struct map_session_data *sd)
{
- if (sd->pd) unit_free(&sd->pd->bl,0);
- if (sd->hd) unit_free(&sd->hd->bl,0);
- if (sd->md) unit_free(&sd->md->bl,0);
- unit_free(&sd->bl,3);
+ if (sd->pd) unit_free(&sd->pd->bl,CLR_OUTSIGHT);
+ if (sd->hd) unit_free(&sd->hd->bl,CLR_OUTSIGHT);
+ if (sd->md) unit_free(&sd->md->bl,CLR_OUTSIGHT);
+ unit_free(&sd->bl,CLR_TELEPORT);
}
/*==========================================
* Function to free all related resources to the bl
* if unit is on map, it is removed using the clrtype specified
- * If clrtype is <0, no saving is performed. This is only for non-authed
- * objects that shouldn't be on a map yet.
*------------------------------------------*/
-int unit_free(struct block_list *bl, int clrtype)
+int unit_free(struct block_list *bl, clr_type clrtype)
{
struct unit_data *ud = unit_bl2ud( bl );
nullpo_ret(ud);
@@ -2053,8 +2049,8 @@ int unit_free(struct block_list *bl, int clrtype)
pc_delinvincibletimer(sd);
pc_delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),false);
- pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus),false);
- pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus),false);
+ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus2),false);
+ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),false);
if( sd->followtimer != -1 )
pc_stop_following(sd);
@@ -2138,15 +2134,12 @@ int unit_free(struct block_list *bl, int clrtype)
aFree (pd->loot);
pd->loot = NULL;
}
- if( clrtype >= 0 )
- {
- if( pd->pet.intimate > 0 )
- intif_save_petdata(pd->pet.account_id,&pd->pet);
- else
- { //Remove pet.
- intif_delete_petdata(pd->pet.pet_id);
- if (sd) sd->status.pet_id = 0;
- }
+ if( pd->pet.intimate > 0 )
+ intif_save_petdata(pd->pet.account_id,&pd->pet);
+ else
+ { //Remove pet.
+ intif_delete_petdata(pd->pet.pet_id);
+ if (sd) sd->status.pet_id = 0;
}
if( sd )
sd->pd = NULL;
@@ -2213,16 +2206,13 @@ int unit_free(struct block_list *bl, int clrtype)
struct homun_data *hd = (TBL_HOM*)bl;
struct map_session_data *sd = hd->master;
merc_hom_hungry_timer_delete(hd);
- if( clrtype >= 0 )
+ if( hd->homunculus.intimacy > 0 )
+ merc_save(hd);
+ else
{
- if( hd->homunculus.intimacy > 0 )
- merc_save(hd);
- else
- {
- intif_homunculus_requestdelete(hd->homunculus.hom_id);
- if( sd )
- sd->status.hom_id = 0;
- }
+ intif_homunculus_requestdelete(hd->homunculus.hom_id);
+ if( sd )
+ sd->status.hom_id = 0;
}
if( sd )
sd->hd = NULL;
@@ -2232,16 +2222,13 @@ int unit_free(struct block_list *bl, int clrtype)
{
struct mercenary_data *md = (TBL_MER*)bl;
struct map_session_data *sd = md->master;
- if( clrtype >= 0 )
+ if( mercenary_get_lifetime(md) > 0 )
+ mercenary_save(md);
+ else
{
- if( mercenary_get_lifetime(md) > 0 )
- mercenary_save(md);
- else
- {
- intif_mercenary_delete(md->mercenary.mercenary_id);
- if( sd )
- sd->status.mer_id = 0;
- }
+ intif_mercenary_delete(md->mercenary.mercenary_id);
+ if( sd )
+ sd->status.mer_id = 0;
}
if( sd )
sd->md = NULL;
diff --git a/src/map/unit.h b/src/map/unit.h
index 3b82dce56..fd5a83208 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -9,6 +9,7 @@ struct block_list;
struct unit_data;
struct map_session_data;
+#include "clif.h" // clr_type
#include "map.h" // struct block_list
#include "path.h" // struct walkpath_data
#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
@@ -81,7 +82,7 @@ int unit_set_walkdelay(struct block_list *bl, unsigned int tick, int delay, int
int unit_escape(struct block_list *bl, struct block_list *target, short dist);
// ʒűړ(΂Ȃ)
int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath);
-int unit_warp(struct block_list *bl, short map, short x, short y, int type);
+int unit_warp(struct block_list *bl, short map, short x, short y, clr_type type);
int unit_setdir(struct block_list *bl,unsigned char dir);
uint8 unit_getdir(struct block_list *bl);
int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag);
@@ -114,11 +115,11 @@ void unit_dataset(struct block_list *bl);
int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int tick,int sdelay,int ddelay,int damage,int div,int type,int damage2);
// ̑
struct unit_data* unit_bl2ud(struct block_list *bl);
-void unit_remove_map_pc(struct map_session_data *sd, int clrtype);
+void unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype);
void unit_free_pc(struct map_session_data *sd);
#define unit_remove_map(bl,clrtype) unit_remove_map_(bl,clrtype,__FILE__,__LINE__,__func__)
-int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int line, const char* func);
-int unit_free(struct block_list *bl, int clrtype);
+int unit_remove_map_(struct block_list *bl, clr_type clrtype, const char* file, int line, const char* func);
+int unit_free(struct block_list *bl, clr_type clrtype);
int unit_changeviewsize(struct block_list *bl,short size);
// [`
diff --git a/src/map/vending.c b/src/map/vending.c
index 67e5ebf19..90bff7399 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -275,7 +275,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
sd->vending[i].index = index;
sd->vending[i].amount = amount;
- sd->vending[i].value = cap_value(value, 1, (unsigned int)battle_config.vending_max_value);
+ sd->vending[i].value = cap_value(value, 0, (unsigned int)battle_config.vending_max_value);
i++; // item successfully added
}
diff --git a/src/plugins/sig.c b/src/plugins/sig.c
index 1872d48ff..9db0638ca 100644
--- a/src/plugins/sig.c
+++ b/src/plugins/sig.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
+#define __USE_GNU // required to enable strsignal on some platforms
#include <string.h>
#include <time.h>
#include "../common/plugin.h"
@@ -52,7 +53,6 @@ unsigned long (*getuptime)();
char *server_name;
int crash_flag = 0;
-extern const char *strsignal(int);
int sig_final ();
// by Gabuzomeu
@@ -60,9 +60,6 @@ int sig_final ();
// (sigaction() is POSIX; signal() is not.) Taken from Stevens' _Advanced
// Programming in the UNIX Environment_.
//
-#ifdef WIN32 // windows don't have SIGPIPE
-#define SIGPIPE SIGINT
-#endif
#ifndef POSIX
#define compat_signal(signo, func) signal(signo, func)
@@ -203,9 +200,7 @@ int sig_init ()
compat_signal(SIGSEGV, func);
compat_signal(SIGFPE, func);
compat_signal(SIGILL, func);
- #ifndef __WIN32
- compat_signal(SIGBUS, func);
- #endif
+ compat_signal(SIGBUS, func);
return 1;
}
diff --git a/src/tool/adduser.c b/src/tool/adduser.c
index 2c7461930..5f4dfb6a5 100644
--- a/src/tool/adduser.c
+++ b/src/tool/adduser.c
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
strcpy(username, "");
while (strlen(username) < 4 || strlen(username) > 23) {
printf("Enter an username (4-23 characters): ");
- scanf("%s", &username);
+ scanf("%s", username);
username[23] = 0;
remove_control_chars(username);
}
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
strcpy(password, "");
while (strlen(password) < 4 || strlen(password) > 23) {
printf("Enter a password (4-23 characters): ");
- scanf("%s", &password);
+ scanf("%s", password);
password[23] = 0;
remove_control_chars(password);
}
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
strcpy(sex, "");
while (strcmp(sex, "F") != 0 && strcmp(sex, "M") != 0) {
printf("Enter a gender (M for male, F for female): ");
- scanf("%s", &sex);
+ scanf("%s", sex);
}
FPaccout = fopen(account_txt, "r+");
diff --git a/src/txt-converter/Makefile.in b/src/txt-converter/Makefile.in
index 089d9d276..50e89e34e 100644
--- a/src/txt-converter/Makefile.in
+++ b/src/txt-converter/Makefile.in
@@ -10,6 +10,7 @@ LOGIN_CONVERTER_OBJ = \
../common/obj_all/showmsg.o \
../common/obj_all/strlib.o \
../common/obj_all/timer.o \
+ ../common/obj_all/utils.o \
../common/obj_sql/sql.o
LOGIN_CONVERTER_H = \
../login/account.h \
@@ -23,6 +24,7 @@ LOGIN_CONVERTER_H = \
../common/showmsg.h \
../common/strlib.h \
../common/timer.h \
+ ../common/utils.h \
../common/sql.h
CHAR_CONVERTER_OBJ = \
diff --git a/vcproj-10/char-server_sql.vcxproj b/vcproj-10/char-server_sql.vcxproj
new file mode 100644
index 000000000..20ad18d28
--- /dev/null
+++ b/vcproj-10/char-server_sql.vcxproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E4E9646175AF}</ProjectGuid>
+ <RootNamespace>char-server_sql</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ <ClInclude Include="..\src\char_sql\char.h" />
+ <ClInclude Include="..\src\char_sql\int_auction.h" />
+ <ClInclude Include="..\src\char_sql\int_guild.h" />
+ <ClInclude Include="..\src\char_sql\int_homun.h" />
+ <ClInclude Include="..\src\char_sql\int_mail.h" />
+ <ClInclude Include="..\src\char_sql\int_mercenary.h" />
+ <ClInclude Include="..\src\char_sql\int_party.h" />
+ <ClInclude Include="..\src\char_sql\int_pet.h" />
+ <ClInclude Include="..\src\char_sql\int_quest.h" />
+ <ClInclude Include="..\src\char_sql\int_storage.h" />
+ <ClInclude Include="..\src\char_sql\inter.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\char_sql\char.c" />
+ <ClCompile Include="..\src\char_sql\int_auction.c" />
+ <ClCompile Include="..\src\char_sql\int_guild.c" />
+ <ClCompile Include="..\src\char_sql\int_homun.c" />
+ <ClCompile Include="..\src\char_sql\int_mail.c" />
+ <ClCompile Include="..\src\char_sql\int_mercenary.c" />
+ <ClCompile Include="..\src\char_sql\int_party.c" />
+ <ClCompile Include="..\src\char_sql\int_pet.c" />
+ <ClCompile Include="..\src\char_sql\int_quest.c" />
+ <ClCompile Include="..\src\char_sql\int_storage.c" />
+ <ClCompile Include="..\src\char_sql\inter.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/char-server_txt.vcxproj b/vcproj-10/char-server_txt.vcxproj
new file mode 100644
index 000000000..e4b23d9b4
--- /dev/null
+++ b/vcproj-10/char-server_txt.vcxproj
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E3E9646175AF}</ProjectGuid>
+ <RootNamespace>char-server_txt</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)char-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)char-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)char-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)char-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\char\char.c" />
+ <ClCompile Include="..\src\char\int_guild.c" />
+ <ClCompile Include="..\src\char\int_homun.c" />
+ <ClCompile Include="..\src\char\int_party.c" />
+ <ClCompile Include="..\src\char\int_pet.c" />
+ <ClCompile Include="..\src\char\int_status.c" />
+ <ClCompile Include="..\src\char\int_storage.c" />
+ <ClCompile Include="..\src\char\inter.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\char\char.h" />
+ <ClInclude Include="..\src\char\int_guild.h" />
+ <ClInclude Include="..\src\char\int_homun.h" />
+ <ClInclude Include="..\src\char\int_party.h" />
+ <ClInclude Include="..\src\char\int_pet.h" />
+ <ClInclude Include="..\src\char\int_status.h" />
+ <ClInclude Include="..\src\char\int_storage.h" />
+ <ClInclude Include="..\src\char\inter.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/ladmin.vcxproj b/vcproj-10/ladmin.vcxproj
new file mode 100644
index 000000000..4865159bf
--- /dev/null
+++ b/vcproj-10/ladmin.vcxproj
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E8E9646175AF}</ProjectGuid>
+ <RootNamespace>ladmin</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)ladmin.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;MINICORE;FD_SETSIZE=4096;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)ladmin.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\ladmin\ladmin.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\ladmin\ladmin.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/login-server_sql.vcxproj b/vcproj-10/login-server_sql.vcxproj
new file mode 100644
index 000000000..e8d91e186
--- /dev/null
+++ b/vcproj-10/login-server_sql.vcxproj
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E5E9646175AF}</ProjectGuid>
+ <RootNamespace>login-server_sql</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;WITH_SQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;WITH_SQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\login\account.h" />
+ <ClInclude Include="..\src\login\ipban.h" />
+ <ClInclude Include="..\src\login\login.h" />
+ <ClInclude Include="..\src\login\loginlog.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\login\account_sql.c" />
+ <ClCompile Include="..\src\login\admin.c" />
+ <ClCompile Include="..\src\login\ipban_sql.c" />
+ <ClCompile Include="..\src\login\login.c" />
+ <ClCompile Include="..\src\login\loginlog_sql.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/login-server_txt.vcxproj b/vcproj-10/login-server_txt.vcxproj
new file mode 100644
index 000000000..c82e5e30d
--- /dev/null
+++ b/vcproj-10/login-server_txt.vcxproj
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E2E9646175AF}</ProjectGuid>
+ <RootNamespace>login-server_txt</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;WITH_TXT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ShowProgress>NotSet</ShowProgress>
+ <OutputFile>$(OutDir)login-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)login-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;WITH_TXT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)login-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)login-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\login\account.h" />
+ <ClInclude Include="..\src\login\ipban.h" />
+ <ClInclude Include="..\src\login\login.h" />
+ <ClInclude Include="..\src\login\loginlog.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\login\account_txt.c" />
+ <ClCompile Include="..\src\login\admin.c" />
+ <ClCompile Include="..\src\login\ipban_txt.c" />
+ <ClCompile Include="..\src\login\login.c" />
+ <ClCompile Include="..\src\login\loginlog_txt.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/map-server_sql.vcxproj b/vcproj-10/map-server_sql.vcxproj
new file mode 100644
index 000000000..d8a35698e
--- /dev/null
+++ b/vcproj-10/map-server_sql.vcxproj
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E6E9646175AF}</ProjectGuid>
+ <RootNamespace>map-server_sql</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\grfio.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ <ClInclude Include="..\src\map\atcommand.h" />
+ <ClInclude Include="..\src\map\battle.h" />
+ <ClInclude Include="..\src\map\battleground.h" />
+ <ClInclude Include="..\src\map\chat.h" />
+ <ClInclude Include="..\src\map\chrif.h" />
+ <ClInclude Include="..\src\map\clif.h" />
+ <ClInclude Include="..\src\map\date.h" />
+ <ClInclude Include="..\src\map\guild.h" />
+ <ClInclude Include="..\src\map\intif.h" />
+ <ClInclude Include="..\src\map\itemdb.h" />
+ <ClInclude Include="..\src\map\log.h" />
+ <ClInclude Include="..\src\map\mail.h" />
+ <ClInclude Include="..\src\map\map.h" />
+ <ClInclude Include="..\src\map\mapreg.h" />
+ <ClInclude Include="..\src\map\homunculus.h" />
+ <ClInclude Include="..\src\map\instance.h" />
+ <ClInclude Include="..\src\map\mercenary.h" />
+ <ClInclude Include="..\src\map\mob.h" />
+ <ClInclude Include="..\src\map\npc.h" />
+ <ClInclude Include="..\src\map\party.h" />
+ <ClInclude Include="..\src\map\path.h" />
+ <ClInclude Include="..\src\map\pc.h" />
+ <ClInclude Include="..\src\map\pet.h" />
+ <ClInclude Include="..\src\map\quest.h" />
+ <ClInclude Include="..\src\map\script.h" />
+ <ClInclude Include="..\src\map\skill.h" />
+ <ClInclude Include="..\src\map\status.h" />
+ <ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\trade.h" />
+ <ClInclude Include="..\src\map\unit.h" />
+ <ClInclude Include="..\src\map\vending.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\grfio.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\map\atcommand.c" />
+ <ClCompile Include="..\src\map\battle.c" />
+ <ClCompile Include="..\src\map\battleground.c" />
+ <ClCompile Include="..\src\map\chat.c" />
+ <ClCompile Include="..\src\map\chrif.c" />
+ <ClCompile Include="..\src\map\clif.c" />
+ <ClCompile Include="..\src\map\date.c" />
+ <ClCompile Include="..\src\map\guild.c" />
+ <ClCompile Include="..\src\map\intif.c" />
+ <ClCompile Include="..\src\map\itemdb.c" />
+ <ClCompile Include="..\src\map\log.c" />
+ <ClCompile Include="..\src\map\mail.c" />
+ <ClCompile Include="..\src\map\map.c" />
+ <ClCompile Include="..\src\map\mapreg_sql.c" />
+ <ClCompile Include="..\src\map\homunculus.c" />
+ <ClCompile Include="..\src\map\instance.c" />
+ <ClCompile Include="..\src\map\mercenary.c" />
+ <ClCompile Include="..\src\map\mob.c" />
+ <ClCompile Include="..\src\map\npc.c" />
+ <ClCompile Include="..\src\map\npc_chat.c" />
+ <ClCompile Include="..\src\map\party.c" />
+ <ClCompile Include="..\src\map\path.c" />
+ <ClCompile Include="..\src\map\pc.c" />
+ <ClCompile Include="..\src\map\pet.c" />
+ <ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\script.c" />
+ <ClCompile Include="..\src\map\skill.c" />
+ <ClCompile Include="..\src\map\status.c" />
+ <ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\trade.c" />
+ <ClCompile Include="..\src\map\unit.c" />
+ <ClCompile Include="..\src\map\vending.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/map-server_txt.vcxproj b/vcproj-10/map-server_txt.vcxproj
new file mode 100644
index 000000000..3efded728
--- /dev/null
+++ b/vcproj-10/map-server_txt.vcxproj
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E1E9646175AF}</ProjectGuid>
+ <RootNamespace>map-server_txt</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)map-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)map-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;TXT_ONLY;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)map-server.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)map-server.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\map\atcommand.c" />
+ <ClCompile Include="..\src\map\battle.c" />
+ <ClCompile Include="..\src\map\battleground.c" />
+ <ClCompile Include="..\src\map\chat.c" />
+ <ClCompile Include="..\src\map\chrif.c" />
+ <ClCompile Include="..\src\map\clif.c" />
+ <ClCompile Include="..\src\map\date.c" />
+ <ClCompile Include="..\src\map\guild.c" />
+ <ClCompile Include="..\src\map\homunculus.c" />
+ <ClCompile Include="..\src\map\instance.c" />
+ <ClCompile Include="..\src\map\intif.c" />
+ <ClCompile Include="..\src\map\itemdb.c" />
+ <ClCompile Include="..\src\map\log.c" />
+ <ClCompile Include="..\src\map\mail.c" />
+ <ClCompile Include="..\src\map\map.c" />
+ <ClCompile Include="..\src\map\mapreg_txt.c" />
+ <ClCompile Include="..\src\map\mercenary.c" />
+ <ClCompile Include="..\src\map\mob.c" />
+ <ClCompile Include="..\src\map\npc.c" />
+ <ClCompile Include="..\src\map\npc_chat.c" />
+ <ClCompile Include="..\src\map\party.c" />
+ <ClCompile Include="..\src\map\path.c" />
+ <ClCompile Include="..\src\map\pc.c" />
+ <ClCompile Include="..\src\map\pet.c" />
+ <ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\script.c" />
+ <ClCompile Include="..\src\map\skill.c" />
+ <ClCompile Include="..\src\map\status.c" />
+ <ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\trade.c" />
+ <ClCompile Include="..\src\map\unit.c" />
+ <ClCompile Include="..\src\map\vending.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\grfio.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\plugins.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\map\atcommand.h" />
+ <ClInclude Include="..\src\map\battle.h" />
+ <ClInclude Include="..\src\map\battleground.h" />
+ <ClInclude Include="..\src\map\chat.h" />
+ <ClInclude Include="..\src\map\chrif.h" />
+ <ClInclude Include="..\src\map\clif.h" />
+ <ClInclude Include="..\src\map\date.h" />
+ <ClInclude Include="..\src\map\guild.h" />
+ <ClInclude Include="..\src\map\homunculus.h" />
+ <ClInclude Include="..\src\map\instance.h" />
+ <ClInclude Include="..\src\map\intif.h" />
+ <ClInclude Include="..\src\map\itemdb.h" />
+ <ClInclude Include="..\src\map\log.h" />
+ <ClInclude Include="..\src\map\mail.h" />
+ <ClInclude Include="..\src\map\map.h" />
+ <ClInclude Include="..\src\map\mapreg.h" />
+ <ClInclude Include="..\src\map\mercenary.h" />
+ <ClInclude Include="..\src\map\mob.h" />
+ <ClInclude Include="..\src\map\npc.h" />
+ <ClInclude Include="..\src\map\party.h" />
+ <ClInclude Include="..\src\map\path.h" />
+ <ClInclude Include="..\src\map\pc.h" />
+ <ClInclude Include="..\src\map\pet.h" />
+ <ClInclude Include="..\src\map\quest.h" />
+ <ClInclude Include="..\src\map\script.h" />
+ <ClInclude Include="..\src\map\skill.h" />
+ <ClInclude Include="..\src\map\status.h" />
+ <ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\trade.h" />
+ <ClInclude Include="..\src\map\unit.h" />
+ <ClInclude Include="..\src\map\vending.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\grfio.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\plugin.h" />
+ <ClInclude Include="..\src\common\plugins.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\version.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/mapcache.vcxproj b/vcproj-10/mapcache.vcxproj
new file mode 100644
index 000000000..04c6edc67
--- /dev/null
+++ b/vcproj-10/mapcache.vcxproj
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E7E9646175AF}</ProjectGuid>
+ <RootNamespace>mapcache</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\zlib\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)mapcache.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\zlib\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)mapcache.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\tool\grfio.c" />
+ <ClCompile Include="..\src\tool\mapcache.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\tool\grfio.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/txt-converter-char.vcxproj b/vcproj-10/txt-converter-char.vcxproj
new file mode 100644
index 000000000..1fbd306dd
--- /dev/null
+++ b/vcproj-10/txt-converter-char.vcxproj
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-EAE9646175AF}</ProjectGuid>
+ <RootNamespace>txt-converter-char</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\tools\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\tools\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)char-converter.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)char-converter.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;TXT_SQL_CONVERT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)char-converter.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)char-converter.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\char\char.c" />
+ <ClCompile Include="..\src\char\int_guild.c" />
+ <ClCompile Include="..\src\char\int_party.c" />
+ <ClCompile Include="..\src\char\int_pet.c" />
+ <ClCompile Include="..\src\char\int_storage.c" />
+ <ClCompile Include="..\src\char\inter.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\char_sql\char.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\int_guild.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\int_mercenary.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\int_party.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\int_pet.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\int_storage.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\char_sql\inter.c">
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ <ObjectFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)%(Filename)_sql.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\src\txt-converter\char-converter.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\char\char.h" />
+ <ClInclude Include="..\src\char\int_guild.h" />
+ <ClInclude Include="..\src\char\int_party.h" />
+ <ClInclude Include="..\src\char\int_pet.h" />
+ <ClInclude Include="..\src\char\int_storage.h" />
+ <ClInclude Include="..\src\char\inter.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\char_sql\char.h" />
+ <ClInclude Include="..\src\char_sql\int_guild.h" />
+ <ClInclude Include="..\src\char_sql\int_mercenary.h" />
+ <ClInclude Include="..\src\char_sql\int_party.h" />
+ <ClInclude Include="..\src\char_sql\int_pet.h" />
+ <ClInclude Include="..\src\char_sql\int_storage.h" />
+ <ClInclude Include="..\src\char_sql\inter.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-10/txt-converter-login.vcxproj b/vcproj-10/txt-converter-login.vcxproj
new file mode 100644
index 000000000..842388705
--- /dev/null
+++ b/vcproj-10/txt-converter-login.vcxproj
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E9E9646175AF}</ProjectGuid>
+ <RootNamespace>txt-converter-login</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\tools\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\tools\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;WITH_TXT;WITH_SQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <MinimalRebuild>true</MinimalRebuild>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)login-converter.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)login-converter.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MINICORE;WITH_TXT;WITH_SQL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)login-converter.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)login-converter.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\lock.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\login\account_sql.c" />
+ <ClCompile Include="..\src\login\account_txt.c" />
+ <ClCompile Include="..\src\txt-converter\login-converter.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\lock.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\login\account.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-8/txt-converter-login.vcproj b/vcproj-8/txt-converter-login.vcproj
index fcdafc35c..4e43fd147 100644
--- a/vcproj-8/txt-converter-login.vcproj
+++ b/vcproj-8/txt-converter-login.vcproj
@@ -270,6 +270,14 @@
RelativePath="..\src\common\timer.h"
>
</File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h"
+ >
+ </File>
</Filter>
<File
RelativePath="..\src\login\account.h"
diff --git a/vcproj-9/txt-converter-login.vcproj b/vcproj-9/txt-converter-login.vcproj
index 39e69e1a3..7d7cbad97 100644
--- a/vcproj-9/txt-converter-login.vcproj
+++ b/vcproj-9/txt-converter-login.vcproj
@@ -275,6 +275,14 @@
RelativePath="..\src\common\timer.h"
>
</File>
+ <File
+ RelativePath="..\src\common\utils.c"
+ >
+ </File>
+ <File
+ RelativePath="..\src\common\utils.h"
+ >
+ </File>
</Filter>
<File
RelativePath="..\src\login\account.h"