diff options
88 files changed, 13468 insertions, 3738 deletions
diff --git a/.travis.yml b/.travis.yml index cb4139c38..46600a7f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,7 @@ matrix: - cd ../.. - ./tools/checksql.sh - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" HPM="1" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" HPM="1" addons: apt: sources: @@ -60,7 +60,7 @@ matrix: - libxml-sax-perl - libxml-parser-perl - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug CC=clang-5.0 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -80,7 +80,7 @@ matrix: - gdb - clang-5.0 - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -114,11 +114,11 @@ matrix: - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" - compiler: gcc env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -136,7 +136,7 @@ matrix: - gdb - gcc-5 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -154,7 +154,7 @@ matrix: - gdb - gcc-6 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: @@ -172,7 +172,7 @@ matrix: - gdb - gcc-7 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200108 --enable-packetver-re --enable-buildbot" + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-8 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: apt: sources: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4033ec590..718fe09a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,54 @@ and this project does not adhere to [Semantic Versioning](http://semver.org/spec If you are reading this in a text editor, simply ignore this section --> +## [v2020.02.09] `February 09 2020` + +### Added + +- Added/updated packets, encryption keys and message tables for clients up to 2020-02-06. (#2625) +- Added support for the expanded barter shop, see example script in `npc/custom/expandedbartershop.txt` and the related script commands `sellitem()`, `startsellitem()`, `sellitemcurrency()`, `endsellitem()`. Note: this includes a database migration. (part of #2625) +- Added the new script commands `cloakonnpc()` and `cloakoffnpc()`. (part of #2615) +- Added the new script command `achievement_iscompleted()` to check for achievement completion. (part of #2615) +- Added Exploration Achievement NPCs. (#2615) +- Added support for an `OnNPCUnload` label, where a script can perform its cleanup before being unloaded (such as removing mapflags, etc). (part of #2590) +- Added the Rebellion jobchange quest and its related mobs and items. (#2621) +- Added support for switching madogear type. See the documentation for `setmount()` and the related `MADO_ROBOT` and `MADO_SUITE` constants. (#2586) + +### Changed + +- Changed the logic of `skill_get_index` to make it easier to add new skills, custom or official. (#2596) +- Refactored `int_party` code related to exp sharing calculations. (part of #2601) +- Updated the Duel system cooldown to be configurable with seconds granularity. The `duel_time_interval` setting can be safely updated and with `@reloadbattleconf`, applying to any existing cooldowns. (#1495) +- Converted `PACKET_ZC_STATE_CHANGE` to use its struct format and added a function to send it to a single target. (part of #2615) +- Changed the behavior of `@unloadnpc`, `@reloadnpc`, `@unloadnpcfile` to kill the monsters that were spawned by the unloaded script (non-permanent spawns). (#2590, issue #2530) +- Updated the `mobdbconverter.py` tool to support Race, Size and Element constants. The script now requires Python 3. (#2620) +- Cleaned up a duplicate definition of `SP_VARCASTRATE` in `pc_readparam()`. (#2624, issue #1311) +- Extended `itemskill()` with a new `ISF_INSTANTCAST` flag to be able to cast a skill without cast time. (part of #2616) +- Extended `itemskill()` with a new `ISF_CASTONSELF` flag to be able to forcefully cast a skill on the invoking character. (part of #2616) +- Converted `ZC_AUTORUN_SKILL` to use its struct format. (part of #2616) + +### Fixed + +- Fixed some signed/unsigned mismatch compiler warnings. (#2601, issue #1434) +- Fixed some cases where the family exp sharing state wasn't correctly detected. (part of #2601) +- Fixed a duplicate "Skill Failed" message when using Asura Strike. (part of #2248, issue #1239) +- Fixed an issue that made a character turn to face its target after casting Asura Strike. (#2248, issue #1239) +- Fixed the position of a character after a failed Asura Strike cast, to be 3 cells from its original position instead of 2. (part of #2248, issue #1239) +- Fixed the status icon from the Elemental Resistance Potions and the Undead Element Scroll not disappearing when the status changes end. (#2614, issue #2593) +- Fixed a crash when using `@loadnpc`, `@reloadnpc` or `@unloadnpcfile` on a directory. (part of #2590, issue #1279) +- Fixed `PR_STRECOVERY` to only cure status effects if the target's element isn't Undead. (#2618, issue #2558) +- Fixed the mobs spawned by `mob_clone_spawn()` (`clone()`, `@evilclone`) being invulnerable because of an uninitialized `dmg_taken_rate` taking the value of 0. (#2617, issue #2607) +- Fixed a crash when the script function `getunits()` was called with an invalid mapindex. Now an error message is added when the mapindex validation fails. (#2619) +- Fixed a crash when `map_forcountinmap()` was called with an invalid mapindex. Now the function will return 0 instead. (part of #2619) +- Fixed clientside errors when using a `ViewData` block in the mob database without specifying a `HairStyleId`. The hair style will now default to 1 when a `ViewData` block is specified. (#2622) +- Fixed the damage calculation being too low when using weapons of type `W_RIFLE` (in pre-renewal). (#2623) +- Fixed an issue that could cause homunculi to be in an unexpected partially-vaporized state (i.e. when a Vanilmirth kills its own master through `HVAN_EXPLOSION`). (#2626) +- Fixed NPC ID validation when `SECURE_NPCTIMEOUT` is defined, causing scripts to abort with an "Unknown NPC" error on the console. (#2627, issue #2073) +- Fixed the skill condition checks and the `flag` parameter of `itemskill()`. The constants `ISF_NONE` and `ISF_IGNORECONDITIONS` are now available. (part of #2616) +- Fixed the `itemskill()` items to provide their proper Aegis behavior, in their requirement checks, self-targeting and item consumption. (#2616, issue #819) +- Fixed the Earth Spike Scroll to consume 10 SP when `SC_EARTHSCROLL` is active. (part of #2616) +- Fixed warnings in the HPMHookGenerator. (1000b10026) + ## [v2020.01.12] `January 12 2020` ### Added @@ -669,7 +717,7 @@ If you are reading this in a text editor, simply ignore this section ### Changed - Changed the Travis build to use the maximum available PACKETVER, so that the recent code is tested. (#2199) -- Added a shortand to call `mes()` without arguments to mean `mes("")`. (#2193) +- Added a shorthand to call `mes()` without arguments to mean `mes("")`. (#2193) ### Fixed @@ -767,7 +815,7 @@ If you are reading this in a text editor, simply ignore this section - Fixed the maximum array size being higher than the maximum integer (uint32 vs int32), which could cause integer overflows in scripts. (#2093) - Fixed a wrongly named constant, which made `Sea-Otter Card` not increase the `Sushi` heal rate. (#2117) - Fixed misc bugs related to pet evolution. (#2136, #2153) -- Fixed a bug that sent an attendance system message without the attendence ui being opened. (#2129) +- Fixed a bug that sent an attendance system message without the attendance ui being opened. (#2129) - Corrected several outdated documentation references to `db/constants.conf`, to point to `doc/constants.md`. (#2090) - Fixed an issue in the script command `getd()` that wouldn't properly initialize the type of newly created variables through `set(getd(...), ...)` (#2158) - Fixed a missing memory initialization in several dummy `struct block_list` entries created as local variables. (#2159) @@ -1148,6 +1196,7 @@ If you are reading this in a text editor, simply ignore this section - New versioning scheme and project changelogs/release notes (#1853) [Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master +[v2020.02.09]: https://github.com/HerculesWS/Hercules/compare/v2020.01.12...v2020.02.09 [v2020.01.12]: https://github.com/HerculesWS/Hercules/compare/v2019.12.15...v2020.01.12 [v2019.12.15]: https://github.com/HerculesWS/Hercules/compare/v2019.11.17+1...v2019.12.15 [v2019.11.17+1]: https://github.com/HerculesWS/Hercules/compare/v2019.11.17...v2019.11.17+1 diff --git a/conf/common/inter-server.conf b/conf/common/inter-server.conf index 5bec34d44..7696774d6 100644 --- a/conf/common/inter-server.conf +++ b/conf/common/inter-server.conf @@ -118,6 +118,7 @@ inter_configuration: { autotrade_data_db: "autotrade_data" npc_market_data_db: "npc_market_data" npc_barter_data_db: "npc_barter_data" + npc_expanded_barter_data_db: "npc_expanded_barter_data" } } diff --git a/conf/map/battle/misc.conf b/conf/map/battle/misc.conf index cc2abc16c..8cc1d0171 100644 --- a/conf/map/battle/misc.conf +++ b/conf/map/battle/misc.conf @@ -101,7 +101,7 @@ duel_allow_teleport: false // Autoleave duel when die duel_autoleave_when_die: true -// Delay between using @duel in minutes +// Delay between using @duel in seconds duel_time_interval: 60 // Restrict duel usage to same map diff --git a/conf/messages.conf b/conf/messages.conf index b91b03921..98b0e0a9d 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -191,7 +191,7 @@ 170: The item is not equippable. 171: %d - void 172: Speed returned to normal. -//173 FREE +173: Please enter a valid madogear type. 174: Number of status points changed. 175: Number of skill points changed. 176: Current amount of zeny changed. @@ -368,7 +368,7 @@ 353: Duel: The Player is in the duel already. 354: Duel: Invitation has been sent. 355: Duel: You can't use @duel without @reject. -356: Duel: You can take part in duel once per %d minutes. +356: Duel: You can take part in duel again after %d seconds. 357: Duel: Invalid value. 358: Duel: You can't use @leave. You aren't a duelist. 359: Duel: You've left the duel. @@ -1016,8 +1016,8 @@ // @loadnpc 1132: Please enter a script file name (usage: @loadnpc <file name>). -// @npcoff -1133: Please enter a NPC name (usage: @npcoff <NPC_name>). +// @unloadnpc +1133: Please enter a NPC name (Usage: @unloadnpc <NPC_name> {<flag>}). // @jail 1134: Please enter a player name (usage: @jail <char_name>). @@ -1455,8 +1455,8 @@ 1384: User '%s' permissions updated successfully. The changes are temporary. // @unloadnpcfile -1385: Usage: @unloadnpcfile <file name> -1386: File unloaded. Be aware that mapflags and monsters spawned directly are not removed. +1385: Usage: @unloadnpcfile <path> {<flag>} +1386: File unloaded. Be aware that some changes made by NPC are not reverted on unload. See doc/atcommands.txt for details. 1387: File not found. // General command messages @@ -1636,5 +1636,13 @@ 1514: %d: Refine All Equip (Costume) 1515: %d: Refine All Equip (Shadow) +// @reloadnpc +1516: Usage: @reloadnpc <path> {<flag>} +1517: Script could not be unloaded. + +// File name validation +1518: Not a file. +1519: Can't open file. + //Custom translations import: conf/import/msg_conf.txt diff --git a/db/constants.conf b/db/constants.conf index f76f2ea6a..6f87b2d51 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -1416,6 +1416,7 @@ constants_db: { SC_RESIST_PROPERTY_FIRE: 666 SC_RESIST_PROPERTY_WIND: 667 SC_CLIENT_ONLY_EQUIP_ARROW: 668 + SC_MADOGEAR: 669 comment__: "Emotes" e_gasp: 0 @@ -4730,4 +4731,5 @@ constants_db: { SI_FRESHSHRIMP: 921 SI_SUHIDE: 933 SI_SPRITEMABLE: 937 + SI_MADOGEAR: 1149 } diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 7d9708f81..3ce62a0fe 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -1159,7 +1159,7 @@ item_db: ( Id: 601 AegisName: "Wing_Of_Fly" Name: "Fly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 60 Weight: 50 BuyingStore: true @@ -1169,7 +1169,7 @@ item_db: ( Id: 602 AegisName: "Wing_Of_Butterfly" Name: "Butterfly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 300 Weight: 50 BuyingStore: true @@ -1199,7 +1199,7 @@ item_db: ( Id: 605 AegisName: "Anodyne" Name: "Anodyne" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 100 BuyingStore: true @@ -1212,7 +1212,7 @@ item_db: ( Id: 606 AegisName: "Aloebera" Name: "Aloevera" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1500 Weight: 100 BuyingStore: true @@ -1254,7 +1254,7 @@ item_db: ( Id: 610 AegisName: "Leaf_Of_Yggdrasil" Name: "Yggdrasil Leaf" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 4000 Weight: 100 BuyingStore: true @@ -1264,7 +1264,7 @@ item_db: ( Id: 611 AegisName: "Spectacles" Name: "Magnifier" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 40 Weight: 50 BuyingStore: true @@ -2040,7 +2040,7 @@ item_db: ( Id: 686 AegisName: "Earth_Scroll_1_3" Name: "Level 3 Earth Spike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2053,7 +2053,7 @@ item_db: ( Id: 687 AegisName: "Earth_Scroll_1_5" Name: "Level 5 Earth Spike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2066,7 +2066,7 @@ item_db: ( Id: 688 AegisName: "Cold_Scroll_1_3" Name: "Level 3 Cold Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2079,7 +2079,7 @@ item_db: ( Id: 689 AegisName: "Cold_Scroll_1_5" Name: "Level 5 Cold Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2092,7 +2092,7 @@ item_db: ( Id: 690 AegisName: "Fire_Scroll_1_3" Name: "Level 3 Fire Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2105,7 +2105,7 @@ item_db: ( Id: 691 AegisName: "Fire_Scroll_1_5" Name: "Level 5 Fire Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2118,7 +2118,7 @@ item_db: ( Id: 692 AegisName: "Wind_Scroll_1_3" Name: "Level 3 Lightening Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2131,7 +2131,7 @@ item_db: ( Id: 693 AegisName: "Wind_Scroll_1_5" Name: "Level 5 Lightening Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2144,7 +2144,7 @@ item_db: ( Id: 694 AegisName: "Ghost_Scroll_1_3" Name: "Level 3 Soul Strike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2157,7 +2157,7 @@ item_db: ( Id: 695 AegisName: "Ghost_Scroll_1_5" Name: "Level 5 Soul Strike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2170,7 +2170,7 @@ item_db: ( Id: 696 AegisName: "Fire_Scroll_2_1" Name: "Level 1 Fire Ball" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2183,7 +2183,7 @@ item_db: ( Id: 697 AegisName: "Fire_Scroll_2_5" Name: "Level 5 Fire Ball" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2196,7 +2196,7 @@ item_db: ( Id: 698 AegisName: "Fire_Scroll_3_1" Name: "Level 1 Fire Wall" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2209,7 +2209,7 @@ item_db: ( Id: 699 AegisName: "Fire_Scroll_3_5" Name: "Level 5 Fire Wall" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2222,7 +2222,7 @@ item_db: ( Id: 700 AegisName: "Cold_Scroll_2_1" Name: "Level 1 Frost Diver" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -65857,7 +65857,7 @@ item_db: ( Id: 12000 AegisName: "Cold_Scroll_2_5" Name: "Level 5 Frost Diver" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -65870,7 +65870,7 @@ item_db: ( Id: 12001 AegisName: "Holy_Scroll_1_3" Name: "Level 3 Heal" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -65883,7 +65883,7 @@ item_db: ( Id: 12002 AegisName: "Holy_Scroll_1_5" Name: "Level 5 Heal" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -65896,7 +65896,7 @@ item_db: ( Id: 12003 AegisName: "Holy_Scroll_2_1" Name: "Level 1 Teleport" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -66056,7 +66056,7 @@ item_db: ( Id: 12019 AegisName: "Holy_Egg" Name: "Holy Egg" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 150 Script: <" itemskill ALL_RESURRECTION,2; "> @@ -66065,7 +66065,7 @@ item_db: ( Id: 12020 AegisName: "Water_Of_Darkness" Name: "Cursed Water" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 30 BuyingStore: true @@ -66156,7 +66156,7 @@ item_db: ( Id: 12029 AegisName: "Gloomy_Box" Name: "Box of Gloom" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 200 BuyingStore: true @@ -66195,7 +66195,7 @@ item_db: ( Id: 12032 AegisName: "Box_Of_Storm" Name: "Box of Storms" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 200 BuyingStore: true @@ -67217,7 +67217,7 @@ item_db: ( Id: 12114 AegisName: "Elemental_Fire" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -67227,7 +67227,7 @@ item_db: ( Id: 12115 AegisName: "Elemental_Water" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -67237,7 +67237,7 @@ item_db: ( Id: 12116 AegisName: "Elemental_Earth" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -67247,7 +67247,7 @@ item_db: ( Id: 12117 AegisName: "Elemental_Wind" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -67261,7 +67261,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,-15,0,20,0; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_WATER, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12119 @@ -67271,7 +67274,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,20,0,0,-15; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_WATER, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_WIND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12120 @@ -67281,7 +67287,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,0,20,-15,0; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12121 @@ -67291,7 +67300,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,0,-15,0,20; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_WIND, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12122 @@ -68310,7 +68322,7 @@ item_db: ( Id: 12200 AegisName: "Event_Cake" Name: "X-mas Cake" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 50 Script: <" itemskill PR_MAGNIFICAT,3; "> @@ -68597,10 +68609,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,240000,10; - "> + Script: <" itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12216 @@ -68621,14 +68630,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - if(Hp>15) { - skilleffect AL_INCAGI,0; - sc_start SC_INC_AGI,240000,10; - heal -15,0; - } - - "> + Script: <" itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12217 @@ -68649,14 +68651,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - if(countitem(523)>0) { - skilleffect PR_ASPERSIO,0; - sc_start SC_ASPERSIO,180000,5; - delitem 523,1; - } - - "> + Script: <" itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12218 @@ -68677,10 +68672,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - sc_start SC_ASSUMPTIO,100000,5; - skilleffect HP_ASSUMPTIO,0; - "> + Script: <" itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12219 @@ -68701,10 +68693,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - skilleffect SN_WINDWALK,0; - sc_start SC_WINDWALK,250000,5; - "> + Script: <" itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12220 @@ -68725,14 +68714,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - .@type = getiteminfo(getequipid(EQI_HAND_R),11); - if (.@type==6||.@type==7||.@type==8) { - skilleffect BS_ADRENALINE,0; - sc_start SC_ADRENALINE,150000,5; - } - - "> + Script: <" itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12221 @@ -68907,16 +68889,15 @@ item_db: ( sitting: true } Script: <" - percentheal 0,5; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,240000,10; + percentheal(0, 5); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12236 AegisName: "Choco_Tart" Name: "Chocolate Tart" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 100 Nouse: { @@ -69521,7 +69502,12 @@ item_db: ( Name: "Undead Elemental Scroll" Type: "IT_USABLE" Weight: 10 - Script: <" sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_FIRE, 300000, 20); + sc_start(SC_RESIST_PROPERTY_WATER, 300000, 20); + sc_start(SC_RESIST_PROPERTY_WIND, 300000, 20); + sc_start(SC_RESIST_PROPERTY_GROUND, 300000, 20); + "> }, { Id: 12280 @@ -69684,9 +69670,8 @@ item_db: ( sitting: true } Script: <" - percentheal 5,0; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,120000,5; + percentheal(5, 0); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -69701,9 +69686,8 @@ item_db: ( sitting: true } Script: <" - percentheal 5,0; - skilleffect AL_INCAGI,0; - sc_start SC_INC_AGI,120000,5; + percentheal(0, 5); + itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -70056,7 +70040,7 @@ item_db: ( Id: 12311 AegisName: "Large_Spray_Of_Flowers" Name: "Huge Spray Of Flowers" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Trade: { nodrop: true @@ -70175,7 +70159,7 @@ item_db: ( Id: 12323 AegisName: "N_Fly_Wing" Name: "Novice Fly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -70195,7 +70179,7 @@ item_db: ( Id: 12324 AegisName: "N_Butterfly_Wing" Name: "Novice Butterfly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -70215,7 +70199,7 @@ item_db: ( Id: 12325 AegisName: "N_Magnifier" Name: "Novice Magnifier" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -70582,7 +70566,7 @@ item_db: ( Id: 12350 AegisName: "Angeling_Potion" Name: "Angeling Potion" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 100 BuyingStore: true @@ -70597,16 +70581,15 @@ item_db: ( sitting: true } Script: <" - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,120000,5; - itemskill AL_ANGELUS,5; + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); + itemskill(AL_ANGELUS, 5); "> }, { Id: 12351 AegisName: "Shout_Megaphone" Name: "Scream Megaphone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 50 BuyingStore: true @@ -70951,8 +70934,8 @@ item_db: ( sitting: true } Script: <" - percentheal 3, 0; - itemskill PR_GLORIA, 2; + percentheal(3, 0); + itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -70967,8 +70950,8 @@ item_db: ( sitting: true } Script: <" - percentheal 0, 3; - itemskill PR_MAGNIFICAT, 1; + percentheal(0, 3); + itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -71040,7 +71023,7 @@ item_db: ( Id: 12384 AegisName: "Rainbow_Ruby_Water" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -71061,7 +71044,7 @@ item_db: ( Id: 12385 AegisName: "Rainbow_Ruby_Fire" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -71082,7 +71065,7 @@ item_db: ( Id: 12386 AegisName: "Rainbow_Ruby_Wind" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -71103,7 +71086,7 @@ item_db: ( Id: 12387 AegisName: "Rainbow_Ruby_Earth" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -71124,7 +71107,7 @@ item_db: ( Id: 12388 AegisName: "Runstone_Crush" Name: "Rhydo Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -71149,7 +71132,7 @@ item_db: ( Id: 12389 AegisName: "Runstone_Storm" Name: "Pertz Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -71165,16 +71148,15 @@ item_db: ( sitting: true } Script: <" - //if(strcharinfo(PC_MAP)=="job3_rune02") { - // itemskill RK_STORMBLAST,1; - //} + //if (strcharinfo(PC_MAP) == "job3_rune02") + // itemskill(RK_STORMBLAST, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12390 AegisName: "Runstone_Millennium" Name: "Verkana Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -71190,9 +71172,8 @@ item_db: ( sitting: true } Script: <" - //if(strcharinfo(PC_MAP)=="job3_rune02") { - // itemskill RK_MILLENNIUMSHIELD,1; - //} + //if (strcharinfo(PC_MAP) == "job3_rune02") + // itemskill(RK_MILLENNIUMSHIELD, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -71268,7 +71249,7 @@ item_db: ( Id: 12396 AegisName: "Fools_Day_Box" Name: "Gift Box?" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 10 Trade: { @@ -71297,7 +71278,7 @@ item_db: ( Id: 12397 AegisName: "Fools_Day_Box2" Name: "Gift Box?" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 10 Trade: { @@ -71309,17 +71290,27 @@ item_db: ( sitting: true } Script: <" - .@temp = rand(1,10); - if (.@temp == 1) itemskill TF_DETOXIFY,1; - else if (.@temp == 2) itemskill TF_PICKSTONE,1; - else if (.@temp == 3) itemskill BA_FROSTJOKER,1; - else if (.@temp == 4) itemskill DC_SCREAM,1; - else if (.@temp == 5) percentheal 50,50; - else if (.@temp == 6) getitem Jellopy,1; - else if (.@temp == 7) itemskill AL_RUWACH,1; - else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); - else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); - else specialeffect(EF_CURSEATTACK, AREA, playerattached()); + .@temp = rand(1, 10); + if (.@temp == 1) + itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF); + else if (.@temp == 2) + itemskill(TF_PICKSTONE, 1); + else if (.@temp == 3) + itemskill(BA_FROSTJOKER, 1); + else if (.@temp == 4) + itemskill(DC_SCREAM, 1); + else if (.@temp == 5) + announce(strcharinfo(PC_NAME) + " shouts : I am a fool!!!", bc_all, C_WHITE); + else if (.@temp == 6) + getitem(Jellopy, 1); + else if (.@temp == 7) + itemskill(AL_RUWACH, 1); + else if (.@temp == 8) + specialeffect(EF_BEGINASURA, AREA, playerattached()); + else if (.@temp == 9) + specialeffect(EF_MVP, AREA, playerattached()); + else + specialeffect(EF_CURSEATTACK, AREA, playerattached()); "> }, { @@ -71420,9 +71411,8 @@ item_db: ( noauction: true } Script: <" - percentheal 30,30; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,140000,5; + percentheal(30, 30); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -71516,9 +71506,8 @@ item_db: ( Weight: 10 BuyingStore: true Script: <" - sc_start SC_ATTHASTE_POTION1, 1800000, 0; - sc_start SC_INC_AGI, 140000, 5; - skilleffect AL_INCAGI, 0; + sc_start(SC_ATTHASTE_POTION1, 1800000, 0); + itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -71906,51 +71895,80 @@ item_db: ( { Id: 12459 AegisName: "F_Med_Life_Potion" - Name: "F Med Life Potion" + Name: "Medium Life Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_HEAL3, AREA, playerattached()); + sc_start2(SC_M_LIFEPOTION, 600000, -7, 4); + "> }, { Id: 12460 AegisName: "F_Small_Life_Potion" - Name: "F Small Life Potion" + Name: "Small Life Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_HEAL3, AREA, playerattached()); + /* Probably it should be 5% instead of 7%, but we'll follow the client side description... */ + sc_start2(SC_S_LIFEPOTION, 600000, -7, 4); + "> }, { Id: 12461 AegisName: "F_Regeneration_Potion" - Name: "F Regeneration Potion" + Name: "Regeneration Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); + sc_start(SC_HEALPLUS, 1800000, 20); + "> }, { Id: 12462 AegisName: "F_B_Mdef_Potion" - Name: "F B Mdef Potion" + Name: "Big Magic Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_SPELLBREAKER, AREA, playerattached()); + sc_start(SC_PROTECT_MDEF, 180000, 3); + "> }, { Id: 12463 AegisName: "F_S_Mdef_Potion" - Name: "F S Mdef Potion" + Name: "Small Magic Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_SPELLBREAKER, AREA, playerattached()); + sc_start(SC_PROTECT_MDEF, 60000, 3); + "> }, { Id: 12464 AegisName: "F_B_Def_Potion" - Name: "F B Def Potion" + Name: "Big Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_GUARD, AREA, playerattached()); + sc_start(SC_PROTECT_DEF, 180000, 3); + "> }, { Id: 12465 AegisName: "F_S_Def_Potion" - Name: "F S Def Potion" + Name: "Small Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_GUARD, AREA, playerattached()); + sc_start(SC_PROTECT_DEF, 60000, 3); + "> }, { Id: 12466 @@ -73208,34 +73226,34 @@ item_db: ( Id: 12706 AegisName: "Lucky_Cookie01" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_GLORIA,5; "> + Script: <" itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12707 AegisName: "Lucky_Cookie02" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_MAGNIFICAT,1; "> + Script: <" itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12708 AegisName: "Lucky_Cookie03" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_IMPOSITIO,3; "> + Script: <" itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12709 @@ -73464,7 +73482,7 @@ item_db: ( Id: 12725 AegisName: "Runstone_Nosiege" Name: "Nauthiz Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73491,7 +73509,7 @@ item_db: ( Id: 12726 AegisName: "Runstone_Rhydo" Name: "Raido Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73518,7 +73536,7 @@ item_db: ( Id: 12727 AegisName: "Runstone_Verkana" Name: "Berkana Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73545,7 +73563,7 @@ item_db: ( Id: 12728 AegisName: "Runstone_Isia" Name: "Isa Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73571,7 +73589,7 @@ item_db: ( Id: 12729 AegisName: "Runstone_Asir" Name: "Othila Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73597,7 +73615,7 @@ item_db: ( Id: 12730 AegisName: "Runstone_Urj" Name: "Uruz Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73623,7 +73641,7 @@ item_db: ( Id: 12731 AegisName: "Runstone_Turisus" Name: "Thurisaz Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73649,7 +73667,7 @@ item_db: ( Id: 12732 AegisName: "Runstone_Pertz" Name: "Wyrd Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -73676,7 +73694,7 @@ item_db: ( Id: 12733 AegisName: "Runstone_Hagalas" Name: "Hagalaz Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 100 Weight: 100 Job: { @@ -74663,7 +74681,7 @@ item_db: ( Id: 12928 AegisName: "J_Aspersio_5_Scroll" Name: "Sacred Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Trade: { @@ -75320,7 +75338,7 @@ item_db: ( Id: 12968 AegisName: "Emergency_Scroll1" Name: "Emergency Level 1 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Script: <" itemskill GD_EMERGENCYCALL,1; "> @@ -75329,7 +75347,7 @@ item_db: ( Id: 12969 AegisName: "Emergency_Scroll2" Name: "Emergency Level 2 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Script: <" itemskill GD_EMERGENCYCALL,1; "> @@ -75338,7 +75356,7 @@ item_db: ( Id: 12970 AegisName: "Emergency_Scroll3" Name: "Emergency Level 3 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Script: <" itemskill GD_EMERGENCYCALL,1; "> @@ -92137,7 +92155,7 @@ item_db: ( Id: 14512 AegisName: "Meteor_10_Scroll" Name: "Meteor Storm Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill WZ_METEOR,10; "> }, @@ -92145,7 +92163,7 @@ item_db: ( Id: 14513 AegisName: "Storm_10_Scroll" Name: "Storm Gust Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill WZ_STORMGUST,10; "> }, @@ -92153,7 +92171,7 @@ item_db: ( Id: 14514 AegisName: "Vermilion_10_Scroll" Name: "Lord of Vermilion Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill WZ_VERMILION,10; "> }, @@ -92161,7 +92179,7 @@ item_db: ( Id: 14515 AegisName: "Lex_Aeterna_Scroll" Name: "Lex Aeterna Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill PR_LEXAETERNA,1; "> }, @@ -92169,7 +92187,7 @@ item_db: ( Id: 14516 AegisName: "Magnificat_5_Scroll" Name: "Magnificat Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill PR_MAGNIFICAT,5; "> }, @@ -92179,7 +92197,7 @@ item_db: ( Name: "Chemical Protection Helm Scroll" Type: "IT_USABLE" Weight: 10 - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; "> + Script: <" itemskill(AM_CP_HELM, 5); "> }, { Id: 14518 @@ -92187,7 +92205,7 @@ item_db: ( Name: "Chemical Protection Shield Scrol" Type: "IT_USABLE" Weight: 10 - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; "> + Script: <" itemskill(AM_CP_SHIELD, 5); "> }, { Id: 14519 @@ -92195,7 +92213,7 @@ item_db: ( Name: "Chemical Protection Armor Scroll" Type: "IT_USABLE" Weight: 10 - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; "> + Script: <" itemskill(AM_CP_ARMOR, 5); "> }, { Id: 14520 @@ -92203,7 +92221,7 @@ item_db: ( Name: "Chemical Protection Weapon Scroll" Type: "IT_USABLE" Weight: 10 - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; "> + Script: <" itemskill(AM_CP_WEAPON, 5); "> }, { Id: 14521 @@ -92223,7 +92241,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; "> + Script: <" itemskill(BS_REPAIRWEAPON, 1); "> }, { Id: 14522 @@ -92293,12 +92311,12 @@ item_db: ( Id: 14529 AegisName: "Greed_Scroll" Name: "Greed Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Nouse: { sitting: true } - Script: <" itemskill BS_GREED,1; "> + Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14530 @@ -93071,7 +93089,7 @@ item_db: ( Id: 14587 AegisName: "Repair_Scroll_" Name: "Equipment Repair Spell Book" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -93091,7 +93109,7 @@ item_db: ( Id: 14588 AegisName: "Pty_Blessing_Scroll" Name: "Party Blessing 10 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -93100,13 +93118,13 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" itemskill CASH_BLESSING,10; "> + Script: <" itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14589 AegisName: "Pty_Inc_Agi_Scroll" Name: "Party Increase Agi 10 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -93115,13 +93133,13 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" itemskill CASH_INCAGI,10; "> + Script: <" itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14590 AegisName: "Pty_Assumptio_Scroll" Name: "Party Assumptio 5 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -93130,7 +93148,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" itemskill CASH_ASSUMPTIO,5; "> + Script: <" itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14591 @@ -93176,7 +93194,7 @@ item_db: ( Id: 14593 AegisName: "Magic_Power_Scroll" Name: "Mystical Amplification Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -93190,13 +93208,13 @@ item_db: ( Nouse: { sitting: true } - Script: <" itemskill HW_MAGICPOWER,10; "> + Script: <" itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14594 AegisName: "Quagmire_Scroll" Name: "Quagmire Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -93289,6 +93307,7 @@ item_db: ( Nouse: { sitting: true } + Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14600 @@ -95504,7 +95523,7 @@ item_db: ( Id: 22540 AegisName: "Runstone_Lux" Name: "Lux Anima Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf index 45592ad90..78e255f36 100644 --- a/db/pre-re/mob_db.conf +++ b/db/pre-re/mob_db.conf @@ -102,7 +102,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) diff --git a/db/quest_db.conf b/db/quest_db.conf index adf425405..8163c540a 100644 --- a/db/quest_db.conf +++ b/db/quest_db.conf @@ -12626,6 +12626,42 @@ quest_db: ( Name: "About skills" }, { + Id: 12340 + Name: "Suspicious Person" +}, +{ + Id: 12341 + Name: "New Challenge" +}, +{ + Id: 12342 + Name: "Crafting Firearms" +}, +{ + Id: 12343 + Name: "Target Practice" + Targets: ( + { + MobId: 3169 + Count: 10 + }, + ) +}, +{ + Id: 12344 + Name: "Wrong Target Practice" + Targets: ( + { + MobId: 3170 + Count: 3 + }, + ) +}, +{ + Id: 12345 + Name: "Transforming to Rebellion" +}, +{ Id: 13101 Name: "The way of Taekwon" }, diff --git a/db/re/item_db.conf b/db/re/item_db.conf index d06c02279..ed77cadc6 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1177,7 +1177,7 @@ item_db: ( Id: 601 AegisName: "Wing_Of_Fly" Name: "Fly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 60 Weight: 50 BuyingStore: true @@ -1187,7 +1187,7 @@ item_db: ( Id: 602 AegisName: "Wing_Of_Butterfly" Name: "Butterfly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 300 Weight: 50 BuyingStore: true @@ -1220,7 +1220,7 @@ item_db: ( Id: 605 AegisName: "Anodyne" Name: "Anodyne" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 100 BuyingStore: true @@ -1233,7 +1233,7 @@ item_db: ( Id: 606 AegisName: "Aloebera" Name: "Aloevera" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1500 Weight: 100 BuyingStore: true @@ -1277,7 +1277,7 @@ item_db: ( Id: 610 AegisName: "Leaf_Of_Yggdrasil" Name: "Yggdrasil Leaf" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 4000 Weight: 100 BuyingStore: true @@ -1287,7 +1287,7 @@ item_db: ( Id: 611 AegisName: "Spectacles" Name: "Magnifier" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 40 Weight: 50 BuyingStore: true @@ -2066,7 +2066,7 @@ item_db: ( Id: 686 AegisName: "Earth_Scroll_1_3" Name: "Level 3 Earth Spike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2079,7 +2079,7 @@ item_db: ( Id: 687 AegisName: "Earth_Scroll_1_5" Name: "Level 5 Earth Spike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2092,7 +2092,7 @@ item_db: ( Id: 688 AegisName: "Cold_Scroll_1_3" Name: "Level 3 Cold Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2105,7 +2105,7 @@ item_db: ( Id: 689 AegisName: "Cold_Scroll_1_5" Name: "Level 5 Cold Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2118,7 +2118,7 @@ item_db: ( Id: 690 AegisName: "Fire_Scroll_1_3" Name: "Level 3 Fire Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2131,7 +2131,7 @@ item_db: ( Id: 691 AegisName: "Fire_Scroll_1_5" Name: "Level 5 Fire Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2144,7 +2144,7 @@ item_db: ( Id: 692 AegisName: "Wind_Scroll_1_3" Name: "Level 3 Lightening Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2157,7 +2157,7 @@ item_db: ( Id: 693 AegisName: "Wind_Scroll_1_5" Name: "Level 5 Lightening Bolt" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2170,7 +2170,7 @@ item_db: ( Id: 694 AegisName: "Ghost_Scroll_1_3" Name: "Level 3 Soul Strike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2183,7 +2183,7 @@ item_db: ( Id: 695 AegisName: "Ghost_Scroll_1_5" Name: "Level 5 Soul Strike" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2196,7 +2196,7 @@ item_db: ( Id: 696 AegisName: "Fire_Scroll_2_1" Name: "Level 1 Fire Ball" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2209,7 +2209,7 @@ item_db: ( Id: 697 AegisName: "Fire_Scroll_2_5" Name: "Level 5 Fire Ball" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2222,7 +2222,7 @@ item_db: ( Id: 698 AegisName: "Fire_Scroll_3_1" Name: "Level 1 Fire Wall" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -2235,7 +2235,7 @@ item_db: ( Id: 699 AegisName: "Fire_Scroll_3_5" Name: "Level 5 Fire Wall" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -2248,7 +2248,7 @@ item_db: ( Id: 700 AegisName: "Cold_Scroll_2_1" Name: "Level 1 Frost Diver" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -74523,6 +74523,16 @@ item_db: ( Name: "Love Wand" }, { + Id: 6746 + AegisName: "Steel_Article" + Name: "Steel Artifact" +}, +{ + Id: 6747 + AegisName: "Steel_Article_" + Name: "Steel Artifact" +}, +{ Id: 6755 AegisName: "Corrupted_Charm" Name: "Contaminated Magic" @@ -85546,7 +85556,7 @@ item_db: ( Id: 12000 AegisName: "Cold_Scroll_2_5" Name: "Level 5 Frost Diver" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -85559,7 +85569,7 @@ item_db: ( Id: 12001 AegisName: "Holy_Scroll_1_3" Name: "Level 3 Heal" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -85572,7 +85582,7 @@ item_db: ( Id: 12002 AegisName: "Holy_Scroll_1_5" Name: "Level 5 Heal" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2000 Weight: 10 BuyingStore: true @@ -85585,7 +85595,7 @@ item_db: ( Id: 12003 AegisName: "Holy_Scroll_2_1" Name: "Level 1 Teleport" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 10 BuyingStore: true @@ -85745,7 +85755,7 @@ item_db: ( Id: 12019 AegisName: "Holy_Egg" Name: "Holy Egg" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 150 Script: <" itemskill ALL_RESURRECTION,2; "> @@ -85754,7 +85764,7 @@ item_db: ( Id: 12020 AegisName: "Water_Of_Darkness" Name: "Cursed Water" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 30 BuyingStore: true @@ -85845,7 +85855,7 @@ item_db: ( Id: 12029 AegisName: "Gloomy_Box" Name: "Box of Gloom" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 200 BuyingStore: true @@ -85884,7 +85894,7 @@ item_db: ( Id: 12032 AegisName: "Box_Of_Storm" Name: "Box of Storms" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 1000 Weight: 200 BuyingStore: true @@ -86846,7 +86856,7 @@ item_db: ( Id: 12114 AegisName: "Elemental_Fire" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -86856,7 +86866,7 @@ item_db: ( Id: 12115 AegisName: "Elemental_Water" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -86866,7 +86876,7 @@ item_db: ( Id: 12116 AegisName: "Elemental_Earth" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -86876,7 +86886,7 @@ item_db: ( Id: 12117 AegisName: "Elemental_Wind" Name: "Elemental Converter" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 BuyingStore: true @@ -86890,7 +86900,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,-15,0,20,0; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_WATER, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12119 @@ -86900,7 +86913,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,20,0,0,-15; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_WATER, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_WIND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12120 @@ -86910,7 +86926,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,0,20,-15,0; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12121 @@ -86920,7 +86939,10 @@ item_db: ( Buy: 2 Weight: 10 BuyingStore: true - Script: <" sc_start4 SC_ARMORPROPERTY,1200000,0,-15,0,20; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_WIND, 1200000, 20); + sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON); + "> }, { Id: 12122 @@ -87943,7 +87965,7 @@ item_db: ( Id: 12200 AegisName: "Event_Cake" Name: "X-mas Cake" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 50 Script: <" itemskill PR_MAGNIFICAT,3; "> @@ -88230,10 +88252,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,240000,10; - "> + Script: <" itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12216 @@ -88254,13 +88273,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - if(Hp>15) { - skilleffect AL_INCAGI,0; - sc_start SC_INC_AGI,240000,10; - heal -15,0; - } - "> + Script: <" itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12217 @@ -88281,13 +88294,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - if(countitem(523)>0) { - skilleffect PR_ASPERSIO,0; - sc_start SC_ASPERSIO,180000,5; - delitem 523,1; - } - "> + Script: <" itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12218 @@ -88308,10 +88315,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - sc_start SC_ASSUMPTIO,100000,5; - skilleffect HP_ASSUMPTIO,0; - "> + Script: <" itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12219 @@ -88332,10 +88336,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - skilleffect SN_WINDWALK,0; - sc_start SC_WINDWALK,250000,5; - "> + Script: <" itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12220 @@ -88356,13 +88357,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" - .@type = getiteminfo(getequipid(EQI_HAND_R),11); - if (.@type==6||.@type==7||.@type==8) { - skilleffect BS_ADRENALINE,0; - sc_start SC_ADRENALINE,150000,5; - } - "> + Script: <" itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12221 @@ -88537,16 +88532,15 @@ item_db: ( sitting: true } Script: <" - percentheal 0,5; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,240000,10; + percentheal(0, 5); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12236 AegisName: "Choco_Tart" Name: "Chocolate Tart" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 100 Nouse: { @@ -89170,7 +89164,12 @@ item_db: ( Name: "Undead Elemental Scroll" Type: "IT_USABLE" Weight: 10 - Script: <" sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20; "> + Script: <" + sc_start(SC_RESIST_PROPERTY_FIRE, 300000, 20); + sc_start(SC_RESIST_PROPERTY_WATER, 300000, 20); + sc_start(SC_RESIST_PROPERTY_WIND, 300000, 20); + sc_start(SC_RESIST_PROPERTY_GROUND, 300000, 20); + "> }, { Id: 12280 @@ -89333,9 +89332,8 @@ item_db: ( sitting: true } Script: <" - percentheal 5,0; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,120000,5; + percentheal(5, 0); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -89350,9 +89348,8 @@ item_db: ( sitting: true } Script: <" - percentheal 5,0; - skilleffect AL_INCAGI,0; - sc_start SC_INC_AGI,120000,5; + percentheal(0, 5); + itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -89705,7 +89702,7 @@ item_db: ( Id: 12311 AegisName: "Large_Spray_Of_Flowers" Name: "Huge Spray Of Flowers" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Trade: { nodrop: true @@ -89867,7 +89864,7 @@ item_db: ( Id: 12323 AegisName: "N_Fly_Wing" Name: "Novice Fly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -89886,7 +89883,7 @@ item_db: ( Id: 12324 AegisName: "N_Butterfly_Wing" Name: "Novice Butterfly Wing" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -89905,7 +89902,7 @@ item_db: ( Id: 12325 AegisName: "N_Magnifier" Name: "Novice Magnifier" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Trade: { nodrop: true notrade: true @@ -90206,7 +90203,7 @@ item_db: ( Id: 12350 AegisName: "Angeling_Potion" Name: "Angeling Potion" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 100 BuyingStore: true @@ -90214,16 +90211,15 @@ item_db: ( sitting: true } Script: <" - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,120000,5; - itemskill AL_ANGELUS,5; + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); + itemskill(AL_ANGELUS, 5); "> }, { Id: 12351 AegisName: "Shout_Megaphone" Name: "Scream Megaphone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 50 BuyingStore: true @@ -90551,8 +90547,8 @@ item_db: ( sitting: true } Script: <" - percentheal 3, 0; - itemskill PR_GLORIA, 2; + percentheal(3, 0); + itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -90567,8 +90563,8 @@ item_db: ( sitting: true } Script: <" - percentheal 0, 3; - itemskill PR_MAGNIFICAT, 1; + percentheal(0, 3); + itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -90638,7 +90634,7 @@ item_db: ( Id: 12384 AegisName: "Rainbow_Ruby_Water" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -90659,7 +90655,7 @@ item_db: ( Id: 12385 AegisName: "Rainbow_Ruby_Fire" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -90680,7 +90676,7 @@ item_db: ( Id: 12386 AegisName: "Rainbow_Ruby_Wind" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -90701,7 +90697,7 @@ item_db: ( Id: 12387 AegisName: "Rainbow_Ruby_Earth" Name: "Rainbow Ruby" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 50 Trade: { nodrop: true @@ -90722,7 +90718,7 @@ item_db: ( Id: 12388 AegisName: "Runstone_Crush" Name: "Rhydo Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -90747,7 +90743,7 @@ item_db: ( Id: 12389 AegisName: "Runstone_Storm" Name: "Pertz Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -90763,16 +90759,15 @@ item_db: ( sitting: true } Script: <" - if(strcharinfo(PC_MAP)=="job3_rune02") { - itemskill RK_STORMBLAST,1; - } + if (strcharinfo(PC_MAP) == "job3_rune02") + itemskill(RK_STORMBLAST, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12390 AegisName: "Runstone_Millennium" Name: "Verkana Runestone For Apprentice" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -90788,9 +90783,8 @@ item_db: ( sitting: true } Script: <" - if(strcharinfo(PC_MAP)=="job3_rune02") { - itemskill RK_MILLENNIUMSHIELD,1; - } + if (strcharinfo(PC_MAP) == "job3_rune02") + itemskill(RK_MILLENNIUMSHIELD, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -90863,7 +90857,7 @@ item_db: ( Id: 12396 AegisName: "Fools_Day_Box" Name: "Gift Box?" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 10 Nouse: { @@ -90887,24 +90881,34 @@ item_db: ( Id: 12397 AegisName: "Fools_Day_Box2" Name: "Gift Box?" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 10 Nouse: { sitting: true } Script: <" - .@temp = rand(1,10); - if (.@temp == 1) itemskill TF_DETOXIFY,1; - else if (.@temp == 2) itemskill TF_PICKSTONE,1; - else if (.@temp == 3) itemskill BA_FROSTJOKER,1; - else if (.@temp == 4) itemskill DC_SCREAM,1; - else if (.@temp == 5) percentheal 50,50; - else if (.@temp == 6) getitem Jellopy,1; - else if (.@temp == 7) itemskill AL_RUWACH,1; - else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); - else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); - else specialeffect(EF_CURSEATTACK, AREA, playerattached()); + .@temp = rand(1, 10); + if (.@temp == 1) + itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF); + else if (.@temp == 2) + itemskill(TF_PICKSTONE, 1); + else if (.@temp == 3) + itemskill(BA_FROSTJOKER, 1); + else if (.@temp == 4) + itemskill(DC_SCREAM, 1); + else if (.@temp == 5) + announce(strcharinfo(PC_NAME) + " shouts : I am a fool!!!", bc_all, C_WHITE); + else if (.@temp == 6) + getitem(Jellopy, 1); + else if (.@temp == 7) + itemskill(AL_RUWACH, 1); + else if (.@temp == 8) + specialeffect(EF_BEGINASURA, AREA, playerattached()); + else if (.@temp == 9) + specialeffect(EF_MVP, AREA, playerattached()); + else + specialeffect(EF_CURSEATTACK, AREA, playerattached()); "> }, { @@ -91015,9 +91019,8 @@ item_db: ( noauction: true } Script: <" - percentheal 30,30; - skilleffect AL_BLESSING,0; - sc_start SC_BLESSING,140000,5; + percentheal(30, 30); + itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -91118,9 +91121,8 @@ item_db: ( Weight: 10 BuyingStore: true Script: <" - sc_start SC_ATTHASTE_POTION1,1800000,0; - sc_start SC_INC_AGI,140000,5; - skilleffect AL_INCAGI,0; + sc_start(SC_ATTHASTE_POTION1, 1800000, 0); + itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { @@ -91529,6 +91531,10 @@ item_db: ( Name: "Medium Life Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_HEAL3, AREA, playerattached()); + sc_start2(SC_M_LIFEPOTION, 600000, -7, 4); + "> }, { Id: 12460 @@ -91536,6 +91542,11 @@ item_db: ( Name: "Small Life Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_HEAL3, AREA, playerattached()); + /* Probably it should be 5% instead of 7%, but we'll follow the client side description... */ + sc_start2(SC_S_LIFEPOTION, 600000, -7, 4); + "> }, { Id: 12461 @@ -91543,6 +91554,10 @@ item_db: ( Name: "Regeneration Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); + sc_start(SC_HEALPLUS, 1800000, 20); + "> }, { Id: 12462 @@ -91550,6 +91565,10 @@ item_db: ( Name: "Big Magic Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_SPELLBREAKER, AREA, playerattached()); + sc_start(SC_PROTECT_MDEF, 180000, 3); + "> }, { Id: 12463 @@ -91557,6 +91576,10 @@ item_db: ( Name: "Small Magic Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_SPELLBREAKER, AREA, playerattached()); + sc_start(SC_PROTECT_MDEF, 60000, 3); + "> }, { Id: 12464 @@ -91564,6 +91587,10 @@ item_db: ( Name: "Big Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_GUARD, AREA, playerattached()); + sc_start(SC_PROTECT_DEF, 180000, 3); + "> }, { Id: 12465 @@ -91571,6 +91598,10 @@ item_db: ( Name: "Small Defense Potion" Type: "IT_USABLE" Weight: 10 + Script: <" + specialeffect(EF_GUARD, AREA, playerattached()); + sc_start(SC_PROTECT_DEF, 60000, 3); + "> }, { Id: 12466 @@ -94451,34 +94482,34 @@ item_db: ( Id: 12706 AegisName: "Lucky_Cookie01" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_GLORIA,5; "> + Script: <" itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12707 AegisName: "Lucky_Cookie02" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_MAGNIFICAT,1; "> + Script: <" itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12708 AegisName: "Lucky_Cookie03" Name: "Lucky Cookie" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 100 Nouse: { sitting: true } - Script: <" itemskill PR_IMPOSITIO,3; "> + Script: <" itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 12709 @@ -94708,7 +94739,7 @@ item_db: ( Id: 12725 AegisName: "Runstone_Nosiege" Name: "Nosiege Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94735,7 +94766,7 @@ item_db: ( Id: 12726 AegisName: "Runstone_Rhydo" Name: "Rhydo Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94762,7 +94793,7 @@ item_db: ( Id: 12727 AegisName: "Runstone_Verkana" Name: "Verkana Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94789,7 +94820,7 @@ item_db: ( Id: 12728 AegisName: "Runstone_Isia" Name: "Isia Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94815,7 +94846,7 @@ item_db: ( Id: 12729 AegisName: "Runstone_Asir" Name: "Asir Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94840,7 +94871,7 @@ item_db: ( Id: 12730 AegisName: "Runstone_Urj" Name: "Urj Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94866,7 +94897,7 @@ item_db: ( Id: 12731 AegisName: "Runstone_Turisus" Name: "Turisus Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94891,7 +94922,7 @@ item_db: ( Id: 12732 AegisName: "Runstone_Pertz" Name: "Pertz Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -94917,7 +94948,7 @@ item_db: ( Id: 12733 AegisName: "Runstone_Hagalas" Name: "Hagalas Runestone" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -95534,7 +95565,7 @@ item_db: ( Id: 12796 AegisName: "Red_Booster" Name: "Red Boost" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 20 Weight: 10 Trade: { @@ -95672,7 +95703,7 @@ item_db: ( Id: 12812 AegisName: "Snow_Flip" Name: "Snow Flip" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill ECL_SNOWFLIP,1; "> }, @@ -95680,7 +95711,7 @@ item_db: ( Id: 12813 AegisName: "Peony_Mommy" Name: "Peony Mamy" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill ECL_PEONYMAMY,1; "> }, @@ -95688,7 +95719,7 @@ item_db: ( Id: 12814 AegisName: "Slapping_Herb" Name: "Sadagui" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill ECL_SADAGUI,1; "> }, @@ -95696,7 +95727,7 @@ item_db: ( Id: 12815 AegisName: "Yggdrasil_Dust" Name: "Sequoia Dust" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Script: <" itemskill ECL_SEQUOIADUST,1; "> }, @@ -96617,7 +96648,7 @@ item_db: ( Id: 12928 AegisName: "J_Aspersio_5_Scroll" Name: "Sacred Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Trade: { @@ -97337,7 +97368,7 @@ item_db: ( Id: 12968 AegisName: "Emergency_Scroll1" Name: "Emergency Level 1 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Trade: { @@ -97355,7 +97386,7 @@ item_db: ( Id: 12969 AegisName: "Emergency_Scroll2" Name: "Emergency Level 2 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Trade: { @@ -97373,7 +97404,7 @@ item_db: ( Id: 12970 AegisName: "Emergency_Scroll3" Name: "Emergency Level 3 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 10 Trade: { @@ -101203,6 +101234,58 @@ item_db: ( "> }, { + Id: 13118 + AegisName: "Tiny_Flame" + Name: "Fading Flame" + Type: "IT_WEAPON" + Weight: 100 + Range: 7 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_ARMS" + WeaponLv: 1 + EquipLv: 1 + Trade: { + nodrop: true + notrade: true + nocart: true + nostorage: true + nogstorage: true + nomail: true + noauction: true + } + Subtype: "W_REVOLVER" +}, +{ + Id: 13119 + AegisName: "Freedom_Flame" + Name: "Freedom Flame" + Type: "IT_WEAPON" + Weight: 100 + Atk: 100 + Range: 7 + Slots: 2 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_ARMS" + WeaponLv: 3 + EquipLv: 99 + Trade: { + nodrop: true + notrade: true + nocart: true + nostorage: true + nogstorage: true + nomail: true + noauction: true + } + Subtype: "W_REVOLVER" +}, +{ Id: 13120 AegisName: "H_FEATHER_H_FIRE" Name: "Heaven's_Feather_&_Hell's_Fire" @@ -102872,6 +102955,7 @@ item_db: ( Atk: 15 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102887,6 +102971,7 @@ item_db: ( Atk: 30 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102905,6 +102990,7 @@ item_db: ( Atk: 50 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102920,6 +103006,7 @@ item_db: ( Atk: 50 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102935,6 +103022,7 @@ item_db: ( Atk: 50 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102953,6 +103041,7 @@ item_db: ( Atk: 50 Job: { Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" @@ -102971,11 +103060,98 @@ item_db: ( Atk: 50 Job: { Gunslinger: true + Rebellion: true + } + Loc: "EQP_AMMO" + Subtype: "A_BULLET" + Script: <" bonus bAtkEle, Ele_Water; "> +}, +{ + Id: 13228 + AegisName: "Flare_Bullet" + Name: "Flare Bullet" + Type: "IT_AMMO" + Buy: 15 + Weight: 5 + Atk: 50 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_AMMO" + Subtype: "A_BULLET" + Script: <" bonus bAtkEle, Ele_Fire; "> +}, +{ + Id: 13229 + AegisName: "Lightning_Bullet" + Name: "Lightning Bullet" + Type: "IT_AMMO" + Buy: 15 + Weight: 5 + Atk: 50 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_AMMO" + Subtype: "A_BULLET" + Script: <" bonus bAtkEle, Ele_Wind; "> +}, +{ + Id: 13230 + AegisName: "Ice_Bullet" + Name: "Ice Bullet" + Type: "IT_AMMO" + Buy: 15 + Weight: 5 + Atk: 50 + Job: { + Gunslinger: true + Rebellion: true } Loc: "EQP_AMMO" Subtype: "A_BULLET" Script: <" bonus bAtkEle, Ele_Water; "> }, +{ + Id: 13231 + AegisName: "Poison_Bullet" + Name: "Poison Bullet" + Type: "IT_AMMO" + Buy: 15 + Weight: 5 + Atk: 50 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_AMMO" + Subtype: "A_BULLET" + Script: <" + bonus bAtkEle, Ele_Poison; + bonus2 bAddEff, Eff_Poison, 500; + "> +}, +{ + Id: 13232 + AegisName: "Blind_Bullet" + Name: "Blind Bullet" + Type: "IT_AMMO" + Buy: 15 + Weight: 5 + Atk: 50 + Job: { + Gunslinger: true + Rebellion: true + } + Loc: "EQP_AMMO" + Subtype: "A_BULLET" + Script: <" + bonus bAtkEle, Ele_Dark; + bonus2 bAddEff, Eff_Blind, 500; + "> +}, //== Shurikens & Kunais ==================================== { @@ -121436,7 +121612,7 @@ item_db: ( Id: 14512 AegisName: "Meteor_10_Scroll" Name: "Meteor Storm Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121453,7 +121629,7 @@ item_db: ( Id: 14513 AegisName: "Storm_10_Scroll" Name: "Storm Gust Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121470,7 +121646,7 @@ item_db: ( Id: 14514 AegisName: "Vermilion_10_Scroll" Name: "Lord of Vermilion Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121487,7 +121663,7 @@ item_db: ( Id: 14515 AegisName: "Lex_Aeterna_Scroll" Name: "Lex Aeterna Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121504,7 +121680,7 @@ item_db: ( Id: 14516 AegisName: "Magnificat_5_Scroll" Name: "Magnificat Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121532,7 +121708,7 @@ item_db: ( nomail: true noauction: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; "> + Script: <" itemskill(AM_CP_HELM, 5); "> }, { Id: 14518 @@ -121549,7 +121725,7 @@ item_db: ( nomail: true noauction: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; "> + Script: <" itemskill(AM_CP_SHIELD, 5); "> }, { Id: 14519 @@ -121566,7 +121742,7 @@ item_db: ( nomail: true noauction: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; "> + Script: <" itemskill(AM_CP_ARMOR, 5); "> }, { Id: 14520 @@ -121583,7 +121759,7 @@ item_db: ( nomail: true noauction: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; "> + Script: <" itemskill(AM_CP_WEAPON, 5); "> }, { Id: 14521 @@ -121603,7 +121779,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; "> + Script: <" itemskill(BS_REPAIRWEAPON, 1); "> }, { Id: 14522 @@ -121727,7 +121903,7 @@ item_db: ( Id: 14529 AegisName: "Greed_Scroll" Name: "Greed Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -121742,7 +121918,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" itemskill BS_GREED,1; "> + Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14530 @@ -122852,7 +123028,7 @@ item_db: ( Id: 14587 AegisName: "Repair_Scroll_" Name: "Equipment Repair Spell Book" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -122872,7 +123048,7 @@ item_db: ( Id: 14588 AegisName: "Pty_Blessing_Scroll" Name: "Party Blessing 10 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -122884,13 +123060,13 @@ item_db: ( nomail: true noauction: true } - Script: <" itemskill CASH_BLESSING,10; "> + Script: <" itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14589 AegisName: "Pty_Inc_Agi_Scroll" Name: "Party Increase Agi 10 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -122902,13 +123078,13 @@ item_db: ( nomail: true noauction: true } - Script: <" itemskill CASH_INCAGI,10; "> + Script: <" itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14590 AegisName: "Pty_Assumptio_Scroll" Name: "Party Assumptio 5 Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 10 Weight: 10 Trade: { @@ -122920,7 +123096,7 @@ item_db: ( nomail: true noauction: true } - Script: <" itemskill CASH_ASSUMPTIO,5; "> + Script: <" itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14591 @@ -122966,7 +123142,7 @@ item_db: ( Id: 14593 AegisName: "Magic_Power_Scroll" Name: "Mystical Amplification Scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -122980,13 +123156,13 @@ item_db: ( Nouse: { sitting: true } - Script: <" itemskill HW_MAGICPOWER,10; "> + Script: <" itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14594 AegisName: "Quagmire_Scroll" Name: "Quagmire scroll" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Weight: 10 Trade: { nodrop: true @@ -123089,6 +123265,7 @@ item_db: ( Nouse: { sitting: true } + Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); "> }, { Id: 14600 @@ -148176,7 +148353,7 @@ item_db: ( Id: 22540 AegisName: "Runstone_Lux" Name: "Lux Anima Rune" - Type: "IT_DELAYCONSUME" + Type: "IT_USABLE" Buy: 2 Weight: 100 Job: { @@ -153447,6 +153624,13 @@ item_db: ( Name: "S_Genesis_Earing" }, { + Id: 25187 + AegisName: "Slug_Bullet" + Name: "Slug Bullet" + Buy: 1200 + Weight: 1200 +}, +{ Id: 25258 AegisName: "BrokenArrow" Name: "BrokenArrow" diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index c0c726f25..492b75a04 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -102,7 +102,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) @@ -64487,7 +64487,43 @@ mob_db: ( //2428,G_L_SEYREN //2429,G_L_EREMES //2430,G_L_HARWORD -//2431,G_L_SHECIL +{ + Id: 2431 + SpriteName: "G_L_SHECIL" + Name: "Hunter Shecil" + Lv: 98 + Hp: 8835 + Sp: 1 + AttackRange: 14 + Attack: [574, 223] + Def: 68 + Mdef: 13 + Stats: { + Str: 108 + Agi: 113 + Vit: 60 + Int: 72 + Dex: 148 + Luk: 37 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_DemiHuman" + Element: ("Ele_Wind", 3) + Mode: { + CanMove: true + Aggressive: true + CanAttack: true + Angry: true + ChangeTargetMelee: true + ChangeTargetChase: true + } + MoveSpeed: 160 + AttackDelay: 432 + AttackMotion: 400 + DamageMotion: 288 +}, //2432,G_L_KATRINN //2433,G_L_MAGALETA //2434,G_L_YGNIZEM @@ -83975,6 +84011,30 @@ mob_db: ( //3156,EXPLORATION_ROVER //3166,M_E_DEVILING { + Id: 3169 + SpriteName: "J_REB_SHECIL1" + Name: "Shooting Target" + Size: "Size_Small" + Race: "RC_Formless" + Element: ("Ele_Neutral", 1) + Mode: { + CanMove: true + } + MoveSpeed: 200 +}, +{ + Id: 3170 + SpriteName: "J_REB_SHECIL2" + Name: "Shooting Target" + Size: "Size_Small" + Race: "RC_Formless" + Element: ("Ele_Neutral", 1) + Mode: { + CanMove: true + } + MoveSpeed: 200 +}, +{ Id: 3181 SpriteName: "E1_FELOCK" Name: "Captain Ferlock" diff --git a/db/sc_config.conf b/db/sc_config.conf index 1d8f50e1c..2520fc595 100644 --- a/db/sc_config.conf +++ b/db/sc_config.conf @@ -3664,3 +3664,14 @@ SC_SV_ROOTTWIST: { NoBoss: true } } +SC_MADOGEAR: { + Visible: true + Flags: { + NoDeathReset: true + NoDispelReset: true + NoClearanceReset: true + NoAllReset: true + NoBoss: true + } + Icon: "SI_MADOGEAR" +} diff --git a/doc/atcommands.txt b/doc/atcommands.txt index 419cb0acd..0cddc1680 100644 --- a/doc/atcommands.txt +++ b/doc/atcommands.txt @@ -1273,31 +1273,47 @@ Example: --------------------------------------- -@unloadnpc <npc name> - -Unloads an NPC. +@unloadnpc <NPC_name> {<flag>} + +Unloads a NPC. +Flag: + 0 - do not unload mobs spawned by NPCs in file + 1 - unload mobs spawned by NPCs in file + Default is 1; every number other than 0 will be treaten as 1. + Mobs that were spawned with monster/areamonster/guardian/bg_monster/atcommand("@monster xy") are affected. +Note: + Be aware that some changes made by NPC are not reverted on unload. + Please use the OnNPCUnload label to clean things up by yourself. Commonly relevant for these script commands: + -> setmapflagnosave, setmapflag, removemapflags, setbattleflag, setcell, setwall + -> agitstart/agitstart2, agitend/agitend2, gvgon, gvgoff, pvpon, pvpoff + -> addmonsterdrop, setitemscript, npcshopitem, npcshopadditem, npcshopdelitem, hateffect, disguise + -> pcfollow, pcblockmove, setpcblock, setnpcdir, navigateto, viewpoint, add_group_command, skill/addtoskill + -> instance and battleground related stuff (excepting bg_monster) Example: -@unloadnpc Job Master +@unloadnpc Job Master 0 --------------------------------------- -@unloadnpcfile <path> +@unloadnpcfile <path> {<flag>} Unloads all NPCs in a file. +Flag: See @unloadnpc +Note: See @unloadnpc Example: -@unloadnpcfile npc/custom/jobmaster.txt +@unloadnpcfile npc/custom/jobmaster.txt 0 --------------------------------------- -@reloadnpc <path> +@reloadnpc <path> {<flag>} Unloads all NPCs in a file and reload it again. -Note: Be aware that mapflags and monsters spawned directly are not removed. +Flag: See @unloadnpc +Note: See @unloadnpc Example: -@reloadnpc npc/custom/jobmaster.txt +@reloadnpc npc/custom/jobmaster.txt 0 --------------------------------------- diff --git a/doc/constants.md b/doc/constants.md index 257696c4e..d8cc9f9f3 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -1338,6 +1338,7 @@ - `SC_RESIST_PROPERTY_FIRE`: 666 - `SC_RESIST_PROPERTY_WIND`: 667 - `SC_CLIENT_ONLY_EQUIP_ARROW`: 668 +- `SC_MADOGEAR`: 669 ### Emotes @@ -4636,6 +4637,7 @@ - `SI_FRESHSHRIMP`: 921 - `SI_SUHIDE`: 933 - `SI_SPRITEMABLE`: 937 +- `SI_MADOGEAR`: 1149 ## Hardcoded Constants (source) @@ -4648,19 +4650,19 @@ ### Server defines -- `PACKETVER`: 20141022 +- `PACKETVER`: 20190530 - `MAX_LEVEL`: 175 - `MAX_STORAGE`: 600 - `MAX_GUILD_STORAGE`: 600 - `MAX_CART`: 100 -- `MAX_INVENTORY`: 100 +- `MAX_INVENTORY`: 200 - `FIXED_INVENTORY_SIZE`: 100 - `MAX_ZENY`: 2147483647 - `MAX_BANK_ZENY`: 2147483647 - `MAX_BG_MEMBERS`: 30 - `MAX_CHAT_USERS`: 20 - `MAX_REFINE`: 20 -- `MAX_ITEM_ID`: 65535 +- `MAX_ITEM_ID`: 2147483647 - `MAX_MENU_OPTIONS`: 255 - `MAX_MENU_LENGTH`: 2048 - `MOB_CLONE_START`: 4001 @@ -5152,6 +5154,7 @@ - `NST_MARKET`: 2 - `NST_CUSTOM`: 3 - `NST_BARTER`: 4 +- `NST_EXPANDED_BARTER`: 5 ### script unit data types @@ -5241,6 +5244,26 @@ - `GUILDINFO_MASTER_NAME`: 9 - `GUILDINFO_MASTER_CID`: 10 +### madogear types + +- `MADO_ROBOT`: 0 +- `MADO_SUITE`: 2 + +### itemskill option flags + +- `ISF_NONE`: 0 +- `ISF_IGNORECONDITIONS`: 1 +- `ISF_INSTANTCAST`: 2 +- `ISF_CASTONSELF`: 4 + +### Item Bound Types + +- `IBT_ANY`: 0 +- `IBT_ACCOUNT`: 1 +- `IBT_GUILD`: 2 +- `IBT_PARTY`: 3 +- `IBT_CHARACTER`: 4 + ### Renewal - `RENEWAL`: 1 @@ -5291,1130 +5314,1130 @@ ## Skills (db/re/skill_db.txt) -- `NV_BASIC`: 1 -- `SM_SWORD`: 2 -- `SM_TWOHAND`: 3 -- `SM_RECOVERY`: 4 -- `SM_BASH`: 5 -- `SM_PROVOKE`: 6 -- `SM_MAGNUM`: 7 -- `SM_ENDURE`: 8 -- `MG_SRECOVERY`: 9 -- `MG_SIGHT`: 10 -- `MG_NAPALMBEAT`: 11 -- `MG_SAFETYWALL`: 12 -- `MG_SOULSTRIKE`: 13 -- `MG_COLDBOLT`: 14 -- `MG_FROSTDIVER`: 15 -- `MG_STONECURSE`: 16 -- `MG_FIREBALL`: 17 -- `MG_FIREWALL`: 18 -- `MG_FIREBOLT`: 19 -- `MG_LIGHTNINGBOLT`: 20 -- `MG_THUNDERSTORM`: 21 -- `AL_DP`: 22 -- `AL_DEMONBANE`: 23 -- `AL_RUWACH`: 24 -- `AL_PNEUMA`: 25 -- `AL_TELEPORT`: 26 -- `AL_WARP`: 27 -- `AL_HEAL`: 28 -- `AL_INCAGI`: 29 -- `AL_DECAGI`: 30 -- `AL_HOLYWATER`: 31 -- `AL_CRUCIS`: 32 -- `AL_ANGELUS`: 33 -- `AL_BLESSING`: 34 -- `AL_CURE`: 35 -- `MC_INCCARRY`: 36 -- `MC_DISCOUNT`: 37 -- `MC_OVERCHARGE`: 38 -- `MC_PUSHCART`: 39 -- `MC_IDENTIFY`: 40 -- `MC_VENDING`: 41 -- `MC_MAMMONITE`: 42 -- `AC_OWL`: 43 -- `AC_VULTURE`: 44 -- `AC_CONCENTRATION`: 45 -- `AC_DOUBLE`: 46 -- `AC_SHOWER`: 47 -- `TF_DOUBLE`: 48 -- `TF_MISS`: 49 -- `TF_STEAL`: 50 -- `TF_HIDING`: 51 -- `TF_POISON`: 52 -- `TF_DETOXIFY`: 53 -- `ALL_RESURRECTION`: 54 -- `KN_SPEARMASTERY`: 55 -- `KN_PIERCE`: 56 -- `KN_BRANDISHSPEAR`: 57 -- `KN_SPEARSTAB`: 58 -- `KN_SPEARBOOMERANG`: 59 -- `KN_TWOHANDQUICKEN`: 60 -- `KN_AUTOCOUNTER`: 61 -- `KN_BOWLINGBASH`: 62 -- `KN_RIDING`: 63 -- `KN_CAVALIERMASTERY`: 64 -- `PR_MACEMASTERY`: 65 -- `PR_IMPOSITIO`: 66 -- `PR_SUFFRAGIUM`: 67 -- `PR_ASPERSIO`: 68 -- `PR_BENEDICTIO`: 69 -- `PR_SANCTUARY`: 70 -- `PR_SLOWPOISON`: 71 -- `PR_STRECOVERY`: 72 -- `PR_KYRIE`: 73 -- `PR_MAGNIFICAT`: 74 -- `PR_GLORIA`: 75 -- `PR_LEXDIVINA`: 76 -- `PR_TURNUNDEAD`: 77 -- `PR_LEXAETERNA`: 78 -- `PR_MAGNUS`: 79 -- `WZ_FIREPILLAR`: 80 -- `WZ_SIGHTRASHER`: 81 -- `WZ_METEOR`: 83 -- `WZ_JUPITEL`: 84 -- `WZ_VERMILION`: 85 -- `WZ_WATERBALL`: 86 -- `WZ_ICEWALL`: 87 -- `WZ_FROSTNOVA`: 88 -- `WZ_STORMGUST`: 89 -- `WZ_EARTHSPIKE`: 90 -- `WZ_HEAVENDRIVE`: 91 -- `WZ_QUAGMIRE`: 92 -- `WZ_ESTIMATION`: 93 -- `BS_IRON`: 94 -- `BS_STEEL`: 95 -- `BS_ENCHANTEDSTONE`: 96 -- `BS_ORIDEOCON`: 97 -- `BS_DAGGER`: 98 -- `BS_SWORD`: 99 -- `BS_TWOHANDSWORD`: 100 -- `BS_AXE`: 101 -- `BS_MACE`: 102 -- `BS_KNUCKLE`: 103 -- `BS_SPEAR`: 104 -- `BS_HILTBINDING`: 105 -- `BS_FINDINGORE`: 106 -- `BS_WEAPONRESEARCH`: 107 -- `BS_REPAIRWEAPON`: 108 -- `BS_SKINTEMPER`: 109 -- `BS_HAMMERFALL`: 110 -- `BS_ADRENALINE`: 111 -- `BS_WEAPONPERFECT`: 112 -- `BS_OVERTHRUST`: 113 -- `BS_MAXIMIZE`: 114 -- `HT_SKIDTRAP`: 115 -- `HT_LANDMINE`: 116 -- `HT_ANKLESNARE`: 117 -- `HT_SHOCKWAVE`: 118 -- `HT_SANDMAN`: 119 -- `HT_FLASHER`: 120 -- `HT_FREEZINGTRAP`: 121 -- `HT_BLASTMINE`: 122 -- `HT_CLAYMORETRAP`: 123 -- `HT_REMOVETRAP`: 124 -- `HT_TALKIEBOX`: 125 -- `HT_BEASTBANE`: 126 -- `HT_FALCON`: 127 -- `HT_STEELCROW`: 128 -- `HT_BLITZBEAT`: 129 -- `HT_DETECTING`: 130 -- `HT_SPRINGTRAP`: 131 -- `AS_RIGHT`: 132 -- `AS_LEFT`: 133 -- `AS_KATAR`: 134 -- `AS_CLOAKING`: 135 -- `AS_SONICBLOW`: 136 -- `AS_GRIMTOOTH`: 137 -- `AS_ENCHANTPOISON`: 138 -- `AS_POISONREACT`: 139 -- `AS_VENOMDUST`: 140 -- `AS_SPLASHER`: 141 -- `NV_FIRSTAID`: 142 -- `NV_TRICKDEAD`: 143 -- `SM_MOVINGRECOVERY`: 144 -- `SM_FATALBLOW`: 145 -- `SM_AUTOBERSERK`: 146 -- `AC_MAKINGARROW`: 147 -- `AC_CHARGEARROW`: 148 -- `TF_SPRINKLESAND`: 149 -- `TF_BACKSLIDING`: 150 -- `TF_PICKSTONE`: 151 -- `TF_THROWSTONE`: 152 -- `MC_CARTREVOLUTION`: 153 -- `MC_CHANGECART`: 154 -- `MC_LOUD`: 155 -- `AL_HOLYLIGHT`: 156 -- `MG_ENERGYCOAT`: 157 -- `NPC_PIERCINGATT`: 158 -- `NPC_MENTALBREAKER`: 159 -- `NPC_RANGEATTACK`: 160 -- `NPC_ATTRICHANGE`: 161 -- `NPC_CHANGEWATER`: 162 -- `NPC_CHANGEGROUND`: 163 -- `NPC_CHANGEFIRE`: 164 -- `NPC_CHANGEWIND`: 165 -- `NPC_CHANGEPOISON`: 166 -- `NPC_CHANGEHOLY`: 167 -- `NPC_CHANGEDARKNESS`: 168 -- `NPC_CHANGETELEKINESIS`: 169 -- `NPC_CRITICALSLASH`: 170 -- `NPC_COMBOATTACK`: 171 -- `NPC_GUIDEDATTACK`: 172 -- `NPC_SELFDESTRUCTION`: 173 -- `NPC_SPLASHATTACK`: 174 -- `NPC_SUICIDE`: 175 -- `NPC_POISON`: 176 -- `NPC_BLINDATTACK`: 177 -- `NPC_SILENCEATTACK`: 178 -- `NPC_STUNATTACK`: 179 -- `NPC_PETRIFYATTACK`: 180 -- `NPC_CURSEATTACK`: 181 -- `NPC_SLEEPATTACK`: 182 -- `NPC_RANDOMATTACK`: 183 -- `NPC_WATERATTACK`: 184 -- `NPC_GROUNDATTACK`: 185 -- `NPC_FIREATTACK`: 186 -- `NPC_WINDATTACK`: 187 -- `NPC_POISONATTACK`: 188 -- `NPC_HOLYATTACK`: 189 -- `NPC_DARKNESSATTACK`: 190 -- `NPC_TELEKINESISATTACK`: 191 -- `NPC_MAGICALATTACK`: 192 -- `NPC_METAMORPHOSIS`: 193 -- `NPC_PROVOCATION`: 194 -- `NPC_SMOKING`: 195 -- `NPC_SUMMONSLAVE`: 196 -- `NPC_EMOTION`: 197 -- `NPC_TRANSFORMATION`: 198 -- `NPC_BLOODDRAIN`: 199 -- `NPC_ENERGYDRAIN`: 200 -- `NPC_KEEPING`: 201 -- `NPC_DARKBREATH`: 202 -- `NPC_DARKBLESSING`: 203 -- `NPC_BARRIER`: 204 -- `NPC_DEFENDER`: 205 -- `NPC_LICK`: 206 -- `NPC_HALLUCINATION`: 207 -- `NPC_REBIRTH`: 208 -- `NPC_SUMMONMONSTER`: 209 -- `RG_SNATCHER`: 210 -- `RG_STEALCOIN`: 211 -- `RG_BACKSTAP`: 212 -- `RG_TUNNELDRIVE`: 213 -- `RG_RAID`: 214 -- `RG_STRIPWEAPON`: 215 -- `RG_STRIPSHIELD`: 216 -- `RG_STRIPARMOR`: 217 -- `RG_STRIPHELM`: 218 -- `RG_INTIMIDATE`: 219 -- `RG_GRAFFITI`: 220 -- `RG_FLAGGRAFFITI`: 221 -- `RG_CLEANER`: 222 -- `RG_GANGSTER`: 223 -- `RG_COMPULSION`: 224 -- `RG_PLAGIARISM`: 225 -- `AM_AXEMASTERY`: 226 -- `AM_LEARNINGPOTION`: 227 -- `AM_PHARMACY`: 228 -- `AM_DEMONSTRATION`: 229 -- `AM_ACIDTERROR`: 230 -- `AM_POTIONPITCHER`: 231 -- `AM_CANNIBALIZE`: 232 -- `AM_SPHEREMINE`: 233 -- `AM_CP_WEAPON`: 234 -- `AM_CP_SHIELD`: 235 -- `AM_CP_ARMOR`: 236 -- `AM_CP_HELM`: 237 -- `AM_BIOETHICS`: 238 -- `AM_CALLHOMUN`: 243 -- `AM_REST`: 244 -- `AM_RESURRECTHOMUN`: 247 -- `CR_TRUST`: 248 -- `CR_AUTOGUARD`: 249 -- `CR_SHIELDCHARGE`: 250 -- `CR_SHIELDBOOMERANG`: 251 -- `CR_REFLECTSHIELD`: 252 -- `CR_HOLYCROSS`: 253 -- `CR_GRANDCROSS`: 254 -- `CR_DEVOTION`: 255 -- `CR_PROVIDENCE`: 256 -- `CR_DEFENDER`: 257 -- `CR_SPEARQUICKEN`: 258 -- `MO_IRONHAND`: 259 -- `MO_SPIRITSRECOVERY`: 260 -- `MO_CALLSPIRITS`: 261 -- `MO_ABSORBSPIRITS`: 262 -- `MO_TRIPLEATTACK`: 263 -- `MO_BODYRELOCATION`: 264 -- `MO_DODGE`: 265 -- `MO_INVESTIGATE`: 266 -- `MO_FINGEROFFENSIVE`: 267 -- `MO_STEELBODY`: 268 -- `MO_BLADESTOP`: 269 -- `MO_EXPLOSIONSPIRITS`: 270 -- `MO_EXTREMITYFIST`: 271 -- `MO_CHAINCOMBO`: 272 -- `MO_COMBOFINISH`: 273 -- `SA_ADVANCEDBOOK`: 274 -- `SA_CASTCANCEL`: 275 -- `SA_MAGICROD`: 276 -- `SA_SPELLBREAKER`: 277 -- `SA_FREECAST`: 278 -- `SA_AUTOSPELL`: 279 -- `SA_FLAMELAUNCHER`: 280 -- `SA_FROSTWEAPON`: 281 -- `SA_LIGHTNINGLOADER`: 282 -- `SA_SEISMICWEAPON`: 283 -- `SA_DRAGONOLOGY`: 284 -- `SA_VOLCANO`: 285 -- `SA_DELUGE`: 286 -- `SA_VIOLENTGALE`: 287 -- `SA_LANDPROTECTOR`: 288 -- `SA_DISPELL`: 289 -- `SA_ABRACADABRA`: 290 -- `SA_MONOCELL`: 291 -- `SA_CLASSCHANGE`: 292 -- `SA_SUMMONMONSTER`: 293 -- `SA_REVERSEORCISH`: 294 -- `SA_DEATH`: 295 -- `SA_FORTUNE`: 296 -- `SA_TAMINGMONSTER`: 297 -- `SA_QUESTION`: 298 -- `SA_GRAVITY`: 299 -- `SA_LEVELUP`: 300 -- `SA_INSTANTDEATH`: 301 -- `SA_FULLRECOVERY`: 302 -- `SA_COMA`: 303 -- `BD_ADAPTATION`: 304 -- `BD_ENCORE`: 305 -- `BD_LULLABY`: 306 -- `BD_RICHMANKIM`: 307 -- `BD_ETERNALCHAOS`: 308 -- `BD_DRUMBATTLEFIELD`: 309 -- `BD_RINGNIBELUNGEN`: 310 -- `BD_ROKISWEIL`: 311 -- `BD_INTOABYSS`: 312 -- `BD_SIEGFRIED`: 313 -- `BA_MUSICALLESSON`: 315 -- `BA_MUSICALSTRIKE`: 316 -- `BA_DISSONANCE`: 317 -- `BA_FROSTJOKER`: 318 -- `BA_WHISTLE`: 319 -- `BA_ASSASSINCROSS`: 320 -- `BA_POEMBRAGI`: 321 -- `BA_APPLEIDUN`: 322 -- `DC_DANCINGLESSON`: 323 -- `DC_THROWARROW`: 324 -- `DC_UGLYDANCE`: 325 -- `DC_SCREAM`: 326 -- `DC_HUMMING`: 327 -- `DC_DONTFORGETME`: 328 -- `DC_FORTUNEKISS`: 329 -- `DC_SERVICEFORYOU`: 330 -- `NPC_RANDOMMOVE`: 331 -- `NPC_SPEEDUP`: 332 -- `NPC_REVENGE`: 333 -- `WE_MALE`: 334 -- `WE_FEMALE`: 335 -- `WE_CALLPARTNER`: 336 -- `ITM_TOMAHAWK`: 337 -- `NPC_DARKCROSS`: 338 -- `NPC_GRANDDARKNESS`: 339 -- `NPC_DARKSTRIKE`: 340 -- `NPC_DARKTHUNDER`: 341 -- `NPC_STOP`: 342 -- `NPC_WEAPONBRAKER`: 343 -- `NPC_ARMORBRAKE`: 344 -- `NPC_HELMBRAKE`: 345 -- `NPC_SHIELDBRAKE`: 346 -- `NPC_UNDEADATTACK`: 347 -- `NPC_CHANGEUNDEAD`: 348 -- `NPC_POWERUP`: 349 -- `NPC_AGIUP`: 350 -- `NPC_SIEGEMODE`: 351 -- `NPC_CALLSLAVE`: 352 -- `NPC_INVISIBLE`: 353 -- `NPC_RUN`: 354 -- `LK_AURABLADE`: 355 -- `LK_PARRYING`: 356 -- `LK_CONCENTRATION`: 357 -- `LK_TENSIONRELAX`: 358 -- `LK_BERSERK`: 359 -- `HP_ASSUMPTIO`: 361 -- `HP_BASILICA`: 362 -- `HP_MEDITATIO`: 363 -- `HW_SOULDRAIN`: 364 -- `HW_MAGICCRASHER`: 365 -- `HW_MAGICPOWER`: 366 -- `PA_PRESSURE`: 367 -- `PA_SACRIFICE`: 368 -- `PA_GOSPEL`: 369 -- `CH_PALMSTRIKE`: 370 -- `CH_TIGERFIST`: 371 -- `CH_CHAINCRUSH`: 372 -- `PF_HPCONVERSION`: 373 -- `PF_SOULCHANGE`: 374 -- `PF_SOULBURN`: 375 -- `ASC_KATAR`: 376 -- `ASC_EDP`: 378 -- `ASC_BREAKER`: 379 -- `SN_SIGHT`: 380 -- `SN_FALCONASSAULT`: 381 -- `SN_SHARPSHOOTING`: 382 -- `SN_WINDWALK`: 383 -- `WS_MELTDOWN`: 384 -- `WS_CARTBOOST`: 387 -- `ST_CHASEWALK`: 389 -- `ST_REJECTSWORD`: 390 -- `CR_ALCHEMY`: 392 -- `CR_SYNTHESISPOTION`: 393 -- `CG_ARROWVULCAN`: 394 -- `CG_MOONLIT`: 395 -- `CG_MARIONETTE`: 396 -- `LK_SPIRALPIERCE`: 397 -- `LK_HEADCRUSH`: 398 -- `LK_JOINTBEAT`: 399 -- `HW_NAPALMVULCAN`: 400 -- `CH_SOULCOLLECT`: 401 -- `PF_MINDBREAKER`: 402 -- `PF_MEMORIZE`: 403 -- `PF_FOGWALL`: 404 -- `PF_SPIDERWEB`: 405 -- `ASC_METEORASSAULT`: 406 -- `ASC_CDP`: 407 -- `WE_BABY`: 408 -- `WE_CALLPARENT`: 409 -- `WE_CALLBABY`: 410 -- `TK_RUN`: 411 -- `TK_READYSTORM`: 412 -- `TK_STORMKICK`: 413 -- `TK_READYDOWN`: 414 -- `TK_DOWNKICK`: 415 -- `TK_READYTURN`: 416 -- `TK_TURNKICK`: 417 -- `TK_READYCOUNTER`: 418 -- `TK_COUNTER`: 419 -- `TK_DODGE`: 420 -- `TK_JUMPKICK`: 421 -- `TK_HPTIME`: 422 -- `TK_SPTIME`: 423 -- `TK_POWER`: 424 -- `TK_SEVENWIND`: 425 -- `TK_HIGHJUMP`: 426 -- `SG_FEEL`: 427 -- `SG_SUN_WARM`: 428 -- `SG_MOON_WARM`: 429 -- `SG_STAR_WARM`: 430 -- `SG_SUN_COMFORT`: 431 -- `SG_MOON_COMFORT`: 432 -- `SG_STAR_COMFORT`: 433 -- `SG_HATE`: 434 -- `SG_SUN_ANGER`: 435 -- `SG_MOON_ANGER`: 436 -- `SG_STAR_ANGER`: 437 -- `SG_SUN_BLESS`: 438 -- `SG_MOON_BLESS`: 439 -- `SG_STAR_BLESS`: 440 -- `SG_DEVIL`: 441 -- `SG_FRIEND`: 442 -- `SG_KNOWLEDGE`: 443 -- `SG_FUSION`: 444 -- `SL_ALCHEMIST`: 445 -- `AM_BERSERKPITCHER`: 446 -- `SL_MONK`: 447 -- `SL_STAR`: 448 -- `SL_SAGE`: 449 -- `SL_CRUSADER`: 450 -- `SL_SUPERNOVICE`: 451 -- `SL_KNIGHT`: 452 -- `SL_WIZARD`: 453 -- `SL_PRIEST`: 454 -- `SL_BARDDANCER`: 455 -- `SL_ROGUE`: 456 -- `SL_ASSASIN`: 457 -- `SL_BLACKSMITH`: 458 -- `BS_ADRENALINE2`: 459 -- `SL_HUNTER`: 460 -- `SL_SOULLINKER`: 461 -- `SL_KAIZEL`: 462 -- `SL_KAAHI`: 463 -- `SL_KAUPE`: 464 -- `SL_KAITE`: 465 -- `SL_KAINA`: 466 -- `SL_STIN`: 467 -- `SL_STUN`: 468 -- `SL_SMA`: 469 -- `SL_SWOO`: 470 -- `SL_SKE`: 471 -- `SL_SKA`: 472 -- `SM_SELFPROVOKE`: 473 -- `NPC_EMOTION_ON`: 474 -- `ST_PRESERVE`: 475 -- `ST_FULLSTRIP`: 476 -- `WS_WEAPONREFINE`: 477 -- `CR_SLIMPITCHER`: 478 -- `CR_FULLPROTECTION`: 479 -- `PA_SHIELDCHAIN`: 480 -- `HP_MANARECHARGE`: 481 -- `PF_DOUBLECASTING`: 482 -- `HW_GANBANTEIN`: 483 -- `HW_GRAVITATION`: 484 -- `WS_CARTTERMINATION`: 485 -- `WS_OVERTHRUSTMAX`: 486 -- `CG_LONGINGFREEDOM`: 487 -- `CG_HERMODE`: 488 -- `CG_TAROTCARD`: 489 -- `CR_ACIDDEMONSTRATION`: 490 -- `CR_CULTIVATION`: 491 -- `ITEM_ENCHANTARMS`: 492 -- `TK_MISSION`: 493 -- `SL_HIGH`: 494 -- `KN_ONEHAND`: 495 -- `AM_TWILIGHT1`: 496 -- `AM_TWILIGHT2`: 497 -- `AM_TWILIGHT3`: 498 -- `HT_POWER`: 499 -- `GS_GLITTERING`: 500 -- `GS_FLING`: 501 -- `GS_TRIPLEACTION`: 502 -- `GS_BULLSEYE`: 503 -- `GS_MADNESSCANCEL`: 504 -- `GS_ADJUSTMENT`: 505 -- `GS_INCREASING`: 506 -- `GS_MAGICALBULLET`: 507 -- `GS_CRACKER`: 508 -- `GS_SINGLEACTION`: 509 -- `GS_SNAKEEYE`: 510 -- `GS_CHAINACTION`: 511 -- `GS_TRACKING`: 512 -- `GS_DISARM`: 513 -- `GS_PIERCINGSHOT`: 514 -- `GS_RAPIDSHOWER`: 515 -- `GS_DESPERADO`: 516 -- `GS_GATLINGFEVER`: 517 -- `GS_DUST`: 518 -- `GS_FULLBUSTER`: 519 -- `GS_SPREADATTACK`: 520 -- `GS_GROUNDDRIFT`: 521 -- `NJ_TOBIDOUGU`: 522 -- `NJ_SYURIKEN`: 523 -- `NJ_KUNAI`: 524 -- `NJ_HUUMA`: 525 -- `NJ_ZENYNAGE`: 526 -- `NJ_TATAMIGAESHI`: 527 -- `NJ_KASUMIKIRI`: 528 -- `NJ_SHADOWJUMP`: 529 -- `NJ_KIRIKAGE`: 530 -- `NJ_UTSUSEMI`: 531 -- `NJ_BUNSINJYUTSU`: 532 -- `NJ_NINPOU`: 533 -- `NJ_KOUENKA`: 534 -- `NJ_KAENSIN`: 535 -- `NJ_BAKUENRYU`: 536 -- `NJ_HYOUSENSOU`: 537 -- `NJ_SUITON`: 538 -- `NJ_HYOUSYOURAKU`: 539 -- `NJ_HUUJIN`: 540 -- `NJ_RAIGEKISAI`: 541 -- `NJ_KAMAITACHI`: 542 -- `NJ_NEN`: 543 -- `NJ_ISSEN`: 544 -- `NPC_EARTHQUAKE`: 653 -- `NPC_FIREBREATH`: 654 -- `NPC_ICEBREATH`: 655 -- `NPC_THUNDERBREATH`: 656 -- `NPC_ACIDBREATH`: 657 -- `NPC_DARKNESSBREATH`: 658 -- `NPC_DRAGONFEAR`: 659 -- `NPC_BLEEDING`: 660 -- `NPC_PULSESTRIKE`: 661 -- `NPC_HELLJUDGEMENT`: 662 -- `NPC_WIDESILENCE`: 663 -- `NPC_WIDEFREEZE`: 664 -- `NPC_WIDEBLEEDING`: 665 -- `NPC_WIDESTONE`: 666 -- `NPC_WIDECONFUSE`: 667 -- `NPC_WIDESLEEP`: 668 -- `NPC_WIDESIGHT`: 669 -- `NPC_EVILLAND`: 670 -- `NPC_MAGICMIRROR`: 671 -- `NPC_SLOWCAST`: 672 -- `NPC_CRITICALWOUND`: 673 -- `NPC_EXPULSION`: 674 -- `NPC_STONESKIN`: 675 -- `NPC_ANTIMAGIC`: 676 -- `NPC_WIDECURSE`: 677 -- `NPC_WIDESTUN`: 678 -- `NPC_VAMPIRE_GIFT`: 679 -- `NPC_WIDESOULDRAIN`: 680 -- `ALL_INCCARRY`: 681 -- `NPC_TALK`: 682 -- `NPC_HELLPOWER`: 683 -- `NPC_WIDEHELLDIGNITY`: 684 -- `NPC_INVINCIBLE`: 685 -- `NPC_INVINCIBLEOFF`: 686 -- `NPC_ALLHEAL`: 687 -- `GM_SANDMAN`: 688 -- `CASH_BLESSING`: 689 -- `CASH_INCAGI`: 690 -- `CASH_ASSUMPTIO`: 691 -- `ALL_CATCRY`: 692 -- `ALL_PARTYFLEE`: 693 -- `ALL_ANGEL_PROTECT`: 694 -- `ALL_DREAM_SUMMERNIGHT`: 695 -- `ALL_REVERSEORCISH`: 697 - `ALL_WEWISH`: 698 -- `HLIF_HEAL`: 8001 -- `HLIF_AVOID`: 8002 -- `HLIF_BRAIN`: 8003 -- `HLIF_CHANGE`: 8004 -- `HAMI_CASTLE`: 8005 -- `HAMI_DEFENCE`: 8006 -- `HAMI_SKIN`: 8007 -- `HAMI_BLOODLUST`: 8008 -- `HFLI_MOON`: 8009 -- `HFLI_FLEET`: 8010 -- `HFLI_SPEED`: 8011 -- `HFLI_SBR44`: 8012 -- `HVAN_CAPRICE`: 8013 -- `HVAN_CHAOTIC`: 8014 -- `HVAN_INSTRUCT`: 8015 -- `HVAN_EXPLOSION`: 8016 -- `MH_SUMMON_LEGION`: 8018 -- `MH_NEEDLE_OF_PARALYZE`: 8019 -- `MH_POISON_MIST`: 8020 -- `MH_PAIN_KILLER`: 8021 -- `MH_LIGHT_OF_REGENE`: 8022 -- `MH_OVERED_BOOST`: 8023 -- `MH_ERASER_CUTTER`: 8024 -- `MH_XENO_SLASHER`: 8025 -- `MH_SILENT_BREEZE`: 8026 -- `MH_STYLE_CHANGE`: 8027 -- `MH_SONIC_CRAW`: 8028 -- `MH_SILVERVEIN_RUSH`: 8029 -- `MH_MIDNIGHT_FRENZY`: 8030 -- `MH_STAHL_HORN`: 8031 -- `MH_GOLDENE_FERSE`: 8032 -- `MH_STEINWAND`: 8033 -- `MH_HEILIGE_STANGE`: 8034 -- `MH_ANGRIFFS_MODUS`: 8035 -- `MH_TINDER_BREAKER`: 8036 -- `MH_CBC`: 8037 -- `MH_EQC`: 8038 -- `MH_MAGMA_FLOW`: 8039 -- `MH_GRANITIC_ARMOR`: 8040 -- `MH_LAVA_SLIDE`: 8041 -- `MH_PYROCLASTIC`: 8042 -- `MH_VOLCANIC_ASH`: 8043 -- `MS_BASH`: 8201 -- `MS_MAGNUM`: 8202 -- `MS_BOWLINGBASH`: 8203 -- `MS_PARRYING`: 8204 -- `MS_REFLECTSHIELD`: 8205 -- `MS_BERSERK`: 8206 -- `MA_DOUBLE`: 8207 -- `MA_SHOWER`: 8208 -- `MA_SKIDTRAP`: 8209 -- `MA_LANDMINE`: 8210 -- `MA_SANDMAN`: 8211 -- `MA_FREEZINGTRAP`: 8212 -- `MA_REMOVETRAP`: 8213 -- `MA_CHARGEARROW`: 8214 -- `MA_SHARPSHOOTING`: 8215 -- `ML_PIERCE`: 8216 -- `ML_BRANDISH`: 8217 -- `ML_SPIRALPIERCE`: 8218 -- `ML_DEFENDER`: 8219 -- `ML_AUTOGUARD`: 8220 -- `ML_DEVOTION`: 8221 -- `MER_MAGNIFICAT`: 8222 -- `MER_QUICKEN`: 8223 -- `MER_SIGHT`: 8224 -- `MER_CRASH`: 8225 -- `MER_REGAIN`: 8226 -- `MER_TENDER`: 8227 -- `MER_BENEDICTION`: 8228 -- `MER_RECUPERATE`: 8229 -- `MER_MENTALCURE`: 8230 -- `MER_COMPRESS`: 8231 -- `MER_PROVOKE`: 8232 -- `MER_AUTOBERSERK`: 8233 -- `MER_DECAGI`: 8234 -- `MER_SCAPEGOAT`: 8235 -- `MER_LEXDIVINA`: 8236 -- `MER_ESTIMATION`: 8237 -- `MER_KYRIE`: 8238 -- `MER_BLESSING`: 8239 -- `MER_INCAGI`: 8240 -- `EL_CIRCLE_OF_FIRE`: 8401 -- `EL_FIRE_CLOAK`: 8402 -- `EL_FIRE_MANTLE`: 8403 -- `EL_WATER_SCREEN`: 8404 -- `EL_WATER_DROP`: 8405 -- `EL_WATER_BARRIER`: 8406 -- `EL_WIND_STEP`: 8407 -- `EL_WIND_CURTAIN`: 8408 -- `EL_ZEPHYR`: 8409 -- `EL_SOLID_SKIN`: 8410 -- `EL_STONE_SHIELD`: 8411 -- `EL_POWER_OF_GAIA`: 8412 -- `EL_PYROTECHNIC`: 8413 -- `EL_HEATER`: 8414 -- `EL_TROPIC`: 8415 -- `EL_AQUAPLAY`: 8416 -- `EL_COOLER`: 8417 -- `EL_CHILLY_AIR`: 8418 -- `EL_GUST`: 8419 -- `EL_BLAST`: 8420 -- `EL_WILD_STORM`: 8421 -- `EL_PETROLOGY`: 8422 -- `EL_CURSED_SOIL`: 8423 -- `EL_UPHEAVAL`: 8424 -- `EL_FIRE_ARROW`: 8425 -- `EL_FIRE_BOMB`: 8426 -- `EL_FIRE_BOMB_ATK`: 8427 -- `EL_FIRE_WAVE`: 8428 -- `EL_FIRE_WAVE_ATK`: 8429 -- `EL_ICE_NEEDLE`: 8430 -- `EL_WATER_SCREW`: 8431 -- `EL_WATER_SCREW_ATK`: 8432 -- `EL_TIDAL_WEAPON`: 8433 -- `EL_WIND_SLASH`: 8434 -- `EL_HURRICANE`: 8435 -- `EL_HURRICANE_ATK`: 8436 -- `EL_TYPOON_MIS`: 8437 -- `EL_TYPOON_MIS_ATK`: 8438 -- `EL_STONE_HAMMER`: 8439 -- `EL_ROCK_CRUSHER`: 8440 -- `EL_ROCK_CRUSHER_ATK`: 8441 -- `EL_STONE_RAIN`: 8442 -- `GD_APPROVAL`: 10000 -- `GD_KAFRACONTRACT`: 10001 -- `GD_GUARDRESEARCH`: 10002 -- `GD_GUARDUP`: 10003 -- `GD_EXTENSION`: 10004 -- `GD_GLORYGUILD`: 10005 -- `GD_LEADERSHIP`: 10006 -- `GD_GLORYWOUNDS`: 10007 -- `GD_SOULCOLD`: 10008 -- `GD_HAWKEYES`: 10009 -- `GD_BATTLEORDER`: 10010 -- `GD_REGENERATION`: 10011 -- `GD_RESTORE`: 10012 -- `GD_EMERGENCYCALL`: 10013 -- `GD_DEVELOPMENT`: 10014 -- `RL_GLITTERING_GREED`: 2551 -- `RL_RICHS_COIN`: 2552 -- `RL_MASS_SPIRAL`: 2553 -- `RL_BANISHING_BUSTER`: 2554 -- `RL_B_TRAP`: 2555 -- `RL_FLICKER`: 2556 -- `RL_S_STORM`: 2557 -- `RL_E_CHAIN`: 2558 -- `RL_QD_SHOT`: 2559 -- `RL_C_MARKER`: 2560 -- `RL_FIREDANCE`: 2561 -- `RL_H_MINE`: 2562 -- `RL_P_ALTER`: 2563 -- `RL_FALLEN_ANGEL`: 2564 -- `RL_R_TRIP`: 2565 -- `RL_D_TAIL`: 2566 -- `RL_FIRE_RAIN`: 2567 -- `RL_HEAT_BARREL`: 2568 -- `RL_AM_BLAST`: 2569 -- `RL_SLUGSHOT`: 2570 -- `RL_HAMMER_OF_GOD`: 2571 -- `RL_R_TRIP_PLUSATK`: 2572 -- `RL_B_FLICKER_ATK`: 2573 -- `RL_GLITTERING_GREED_ATK`: 2574 -- `KN_CHARGEATK`: 1001 -- `CR_SHRINK`: 1002 -- `AS_SONICACCEL`: 1003 -- `AS_VENOMKNIFE`: 1004 -- `RG_CLOSECONFINE`: 1005 -- `WZ_SIGHTBLASTER`: 1006 -- `SA_CREATECON`: 1007 -- `SA_ELEMENTWATER`: 1008 -- `HT_PHANTASMIC`: 1009 -- `BA_PANGVOICE`: 1010 -- `DC_WINKCHARM`: 1011 -- `BS_UNFAIRLYTRICK`: 1012 -- `BS_GREED`: 1013 -- `PR_REDEMPTIO`: 1014 -- `MO_KITRANSLATION`: 1015 -- `MO_BALKYOUNG`: 1016 -- `SA_ELEMENTGROUND`: 1017 -- `SA_ELEMENTFIRE`: 1018 +- `ALL_REVERSEORCISH`: 697 +- `ALL_DREAM_SUMMERNIGHT`: 695 +- `ALL_ANGEL_PROTECT`: 694 +- `ALL_PARTYFLEE`: 693 +- `ALL_CATCRY`: 692 +- `CASH_ASSUMPTIO`: 691 +- `CASH_INCAGI`: 690 +- `CASH_BLESSING`: 689 +- `GM_SANDMAN`: 688 +- `NPC_ALLHEAL`: 687 +- `NPC_INVINCIBLEOFF`: 686 +- `NPC_INVINCIBLE`: 685 +- `NPC_WIDEHELLDIGNITY`: 684 +- `NPC_HELLPOWER`: 683 +- `NPC_TALK`: 682 +- `ALL_INCCARRY`: 681 +- `NPC_WIDESOULDRAIN`: 680 +- `NPC_VAMPIRE_GIFT`: 679 +- `NPC_WIDESTUN`: 678 +- `NPC_WIDECURSE`: 677 +- `NPC_ANTIMAGIC`: 676 +- `NPC_STONESKIN`: 675 +- `NPC_EXPULSION`: 674 +- `NPC_CRITICALWOUND`: 673 +- `NPC_SLOWCAST`: 672 +- `NPC_MAGICMIRROR`: 671 +- `NPC_EVILLAND`: 670 +- `NPC_WIDESIGHT`: 669 +- `NPC_WIDESLEEP`: 668 +- `NPC_WIDECONFUSE`: 667 +- `NPC_WIDESTONE`: 666 +- `NPC_WIDEBLEEDING`: 665 +- `NPC_WIDEFREEZE`: 664 +- `NPC_WIDESILENCE`: 663 +- `NPC_HELLJUDGEMENT`: 662 +- `NPC_PULSESTRIKE`: 661 +- `NPC_BLEEDING`: 660 +- `NPC_DRAGONFEAR`: 659 +- `NPC_DARKNESSBREATH`: 658 +- `NPC_ACIDBREATH`: 657 +- `NPC_THUNDERBREATH`: 656 +- `NPC_ICEBREATH`: 655 +- `NPC_FIREBREATH`: 654 +- `NPC_EARTHQUAKE`: 653 +- `NJ_ISSEN`: 544 +- `NJ_NEN`: 543 +- `NJ_KAMAITACHI`: 542 +- `NJ_RAIGEKISAI`: 541 +- `NJ_HUUJIN`: 540 +- `NJ_HYOUSYOURAKU`: 539 +- `NJ_SUITON`: 538 +- `NJ_HYOUSENSOU`: 537 +- `NJ_BAKUENRYU`: 536 +- `NJ_KAENSIN`: 535 +- `NJ_KOUENKA`: 534 +- `NJ_NINPOU`: 533 +- `NJ_BUNSINJYUTSU`: 532 +- `NJ_UTSUSEMI`: 531 +- `NJ_KIRIKAGE`: 530 +- `NJ_SHADOWJUMP`: 529 +- `NJ_KASUMIKIRI`: 528 +- `NJ_TATAMIGAESHI`: 527 +- `NJ_ZENYNAGE`: 526 +- `NJ_HUUMA`: 525 +- `NJ_KUNAI`: 524 +- `NJ_SYURIKEN`: 523 +- `NJ_TOBIDOUGU`: 522 +- `GS_GROUNDDRIFT`: 521 +- `GS_SPREADATTACK`: 520 +- `GS_FULLBUSTER`: 519 +- `GS_DUST`: 518 +- `GS_GATLINGFEVER`: 517 +- `GS_DESPERADO`: 516 +- `GS_RAPIDSHOWER`: 515 +- `GS_PIERCINGSHOT`: 514 +- `GS_DISARM`: 513 +- `GS_TRACKING`: 512 +- `GS_CHAINACTION`: 511 +- `GS_SNAKEEYE`: 510 +- `GS_SINGLEACTION`: 509 +- `GS_CRACKER`: 508 +- `GS_MAGICALBULLET`: 507 +- `GS_INCREASING`: 506 +- `GS_ADJUSTMENT`: 505 +- `GS_MADNESSCANCEL`: 504 +- `GS_BULLSEYE`: 503 +- `GS_TRIPLEACTION`: 502 +- `GS_FLING`: 501 +- `GS_GLITTERING`: 500 +- `HT_POWER`: 499 +- `AM_TWILIGHT3`: 498 +- `AM_TWILIGHT2`: 497 +- `AM_TWILIGHT1`: 496 +- `KN_ONEHAND`: 495 +- `SL_HIGH`: 494 +- `TK_MISSION`: 493 +- `ITEM_ENCHANTARMS`: 492 +- `CR_CULTIVATION`: 491 +- `CR_ACIDDEMONSTRATION`: 490 +- `CG_TAROTCARD`: 489 +- `CG_HERMODE`: 488 +- `CG_LONGINGFREEDOM`: 487 +- `WS_OVERTHRUSTMAX`: 486 +- `WS_CARTTERMINATION`: 485 +- `HW_GRAVITATION`: 484 +- `HW_GANBANTEIN`: 483 +- `PF_DOUBLECASTING`: 482 +- `HP_MANARECHARGE`: 481 +- `PA_SHIELDCHAIN`: 480 +- `CR_FULLPROTECTION`: 479 +- `CR_SLIMPITCHER`: 478 +- `WS_WEAPONREFINE`: 477 +- `ST_FULLSTRIP`: 476 +- `ST_PRESERVE`: 475 +- `NPC_EMOTION_ON`: 474 +- `SM_SELFPROVOKE`: 473 +- `SL_SKA`: 472 +- `SL_SKE`: 471 +- `SL_SWOO`: 470 +- `SL_SMA`: 469 +- `SL_STUN`: 468 +- `SL_STIN`: 467 +- `SL_KAINA`: 466 +- `SL_KAITE`: 465 +- `SL_KAUPE`: 464 +- `SL_KAAHI`: 463 +- `SL_KAIZEL`: 462 +- `SL_SOULLINKER`: 461 +- `SL_HUNTER`: 460 +- `BS_ADRENALINE2`: 459 +- `SL_BLACKSMITH`: 458 +- `SL_ASSASIN`: 457 +- `SL_ROGUE`: 456 +- `SL_BARDDANCER`: 455 +- `SL_PRIEST`: 454 +- `SL_WIZARD`: 453 +- `SL_KNIGHT`: 452 +- `SL_SUPERNOVICE`: 451 +- `SL_CRUSADER`: 450 +- `SL_SAGE`: 449 +- `SL_STAR`: 448 +- `SL_MONK`: 447 +- `AM_BERSERKPITCHER`: 446 +- `SL_ALCHEMIST`: 445 +- `SG_FUSION`: 444 +- `SG_KNOWLEDGE`: 443 +- `SG_FRIEND`: 442 +- `SG_DEVIL`: 441 +- `SG_STAR_BLESS`: 440 +- `SG_MOON_BLESS`: 439 +- `SG_SUN_BLESS`: 438 +- `SG_STAR_ANGER`: 437 +- `SG_MOON_ANGER`: 436 +- `SG_SUN_ANGER`: 435 +- `SG_HATE`: 434 +- `SG_STAR_COMFORT`: 433 +- `SG_MOON_COMFORT`: 432 +- `SG_SUN_COMFORT`: 431 +- `SG_STAR_WARM`: 430 +- `SG_MOON_WARM`: 429 +- `SG_SUN_WARM`: 428 +- `SG_FEEL`: 427 +- `TK_HIGHJUMP`: 426 +- `TK_SEVENWIND`: 425 +- `TK_POWER`: 424 +- `TK_SPTIME`: 423 +- `TK_HPTIME`: 422 +- `TK_JUMPKICK`: 421 +- `TK_DODGE`: 420 +- `TK_COUNTER`: 419 +- `TK_READYCOUNTER`: 418 +- `TK_TURNKICK`: 417 +- `TK_READYTURN`: 416 +- `TK_DOWNKICK`: 415 +- `TK_READYDOWN`: 414 +- `TK_STORMKICK`: 413 +- `TK_READYSTORM`: 412 +- `TK_RUN`: 411 +- `WE_CALLBABY`: 410 +- `WE_CALLPARENT`: 409 +- `WE_BABY`: 408 +- `ASC_CDP`: 407 +- `ASC_METEORASSAULT`: 406 +- `PF_SPIDERWEB`: 405 +- `PF_FOGWALL`: 404 +- `PF_MEMORIZE`: 403 +- `PF_MINDBREAKER`: 402 +- `CH_SOULCOLLECT`: 401 +- `HW_NAPALMVULCAN`: 400 +- `LK_JOINTBEAT`: 399 +- `LK_HEADCRUSH`: 398 +- `LK_SPIRALPIERCE`: 397 +- `CG_MARIONETTE`: 396 +- `CG_MOONLIT`: 395 +- `CG_ARROWVULCAN`: 394 +- `CR_SYNTHESISPOTION`: 393 +- `CR_ALCHEMY`: 392 +- `ST_REJECTSWORD`: 390 +- `ST_CHASEWALK`: 389 +- `WS_CARTBOOST`: 387 +- `WS_MELTDOWN`: 384 +- `SN_WINDWALK`: 383 +- `SN_SHARPSHOOTING`: 382 +- `SN_FALCONASSAULT`: 381 +- `SN_SIGHT`: 380 +- `ASC_BREAKER`: 379 +- `ASC_EDP`: 378 +- `ASC_KATAR`: 376 +- `PF_SOULBURN`: 375 +- `PF_SOULCHANGE`: 374 +- `PF_HPCONVERSION`: 373 +- `CH_CHAINCRUSH`: 372 +- `CH_TIGERFIST`: 371 +- `CH_PALMSTRIKE`: 370 +- `PA_GOSPEL`: 369 +- `PA_SACRIFICE`: 368 +- `PA_PRESSURE`: 367 +- `HW_MAGICPOWER`: 366 +- `HW_MAGICCRASHER`: 365 +- `HW_SOULDRAIN`: 364 +- `HP_MEDITATIO`: 363 +- `HP_BASILICA`: 362 +- `HP_ASSUMPTIO`: 361 +- `LK_BERSERK`: 359 +- `LK_TENSIONRELAX`: 358 +- `LK_CONCENTRATION`: 357 +- `LK_PARRYING`: 356 +- `LK_AURABLADE`: 355 +- `NPC_RUN`: 354 +- `NPC_INVISIBLE`: 353 +- `NPC_CALLSLAVE`: 352 +- `NPC_SIEGEMODE`: 351 +- `NPC_AGIUP`: 350 +- `NPC_POWERUP`: 349 +- `NPC_CHANGEUNDEAD`: 348 +- `NPC_UNDEADATTACK`: 347 +- `NPC_SHIELDBRAKE`: 346 +- `NPC_HELMBRAKE`: 345 +- `NPC_ARMORBRAKE`: 344 +- `NPC_WEAPONBRAKER`: 343 +- `NPC_STOP`: 342 +- `NPC_DARKTHUNDER`: 341 +- `NPC_DARKSTRIKE`: 340 +- `NPC_GRANDDARKNESS`: 339 +- `NPC_DARKCROSS`: 338 +- `ITM_TOMAHAWK`: 337 +- `WE_CALLPARTNER`: 336 +- `WE_FEMALE`: 335 +- `WE_MALE`: 334 +- `NPC_REVENGE`: 333 +- `NPC_SPEEDUP`: 332 +- `NPC_RANDOMMOVE`: 331 +- `DC_SERVICEFORYOU`: 330 +- `DC_FORTUNEKISS`: 329 +- `DC_DONTFORGETME`: 328 +- `DC_HUMMING`: 327 +- `DC_SCREAM`: 326 +- `DC_UGLYDANCE`: 325 +- `DC_THROWARROW`: 324 +- `DC_DANCINGLESSON`: 323 +- `BA_APPLEIDUN`: 322 +- `BA_POEMBRAGI`: 321 +- `BA_ASSASSINCROSS`: 320 +- `BA_WHISTLE`: 319 +- `BA_FROSTJOKER`: 318 +- `BA_DISSONANCE`: 317 +- `BA_MUSICALSTRIKE`: 316 +- `BA_MUSICALLESSON`: 315 +- `BD_SIEGFRIED`: 313 +- `BD_INTOABYSS`: 312 +- `BD_ROKISWEIL`: 311 +- `BD_RINGNIBELUNGEN`: 310 +- `BD_DRUMBATTLEFIELD`: 309 +- `BD_ETERNALCHAOS`: 308 +- `BD_RICHMANKIM`: 307 +- `BD_LULLABY`: 306 +- `BD_ENCORE`: 305 +- `BD_ADAPTATION`: 304 +- `SA_COMA`: 303 +- `SA_FULLRECOVERY`: 302 +- `SA_INSTANTDEATH`: 301 +- `SA_LEVELUP`: 300 +- `SA_GRAVITY`: 299 +- `SA_QUESTION`: 298 +- `SA_TAMINGMONSTER`: 297 +- `SA_FORTUNE`: 296 +- `SA_DEATH`: 295 +- `SA_REVERSEORCISH`: 294 +- `SA_SUMMONMONSTER`: 293 +- `SA_CLASSCHANGE`: 292 +- `SA_MONOCELL`: 291 +- `SA_ABRACADABRA`: 290 +- `SA_DISPELL`: 289 +- `SA_LANDPROTECTOR`: 288 +- `SA_VIOLENTGALE`: 287 +- `SA_DELUGE`: 286 +- `SA_VOLCANO`: 285 +- `SA_DRAGONOLOGY`: 284 +- `SA_SEISMICWEAPON`: 283 +- `SA_LIGHTNINGLOADER`: 282 +- `SA_FROSTWEAPON`: 281 +- `SA_FLAMELAUNCHER`: 280 +- `SA_AUTOSPELL`: 279 +- `SA_FREECAST`: 278 +- `SA_SPELLBREAKER`: 277 +- `SA_MAGICROD`: 276 +- `SA_CASTCANCEL`: 275 +- `SA_ADVANCEDBOOK`: 274 +- `MO_COMBOFINISH`: 273 +- `MO_CHAINCOMBO`: 272 +- `MO_EXTREMITYFIST`: 271 +- `MO_EXPLOSIONSPIRITS`: 270 +- `MO_BLADESTOP`: 269 +- `MO_STEELBODY`: 268 +- `MO_FINGEROFFENSIVE`: 267 +- `MO_INVESTIGATE`: 266 +- `MO_DODGE`: 265 +- `MO_BODYRELOCATION`: 264 +- `MO_TRIPLEATTACK`: 263 +- `MO_ABSORBSPIRITS`: 262 +- `MO_CALLSPIRITS`: 261 +- `MO_SPIRITSRECOVERY`: 260 +- `MO_IRONHAND`: 259 +- `CR_SPEARQUICKEN`: 258 +- `CR_DEFENDER`: 257 +- `CR_PROVIDENCE`: 256 +- `CR_DEVOTION`: 255 +- `CR_GRANDCROSS`: 254 +- `CR_HOLYCROSS`: 253 +- `CR_REFLECTSHIELD`: 252 +- `CR_SHIELDBOOMERANG`: 251 +- `CR_SHIELDCHARGE`: 250 +- `CR_AUTOGUARD`: 249 +- `CR_TRUST`: 248 +- `AM_RESURRECTHOMUN`: 247 +- `AM_REST`: 244 +- `AM_CALLHOMUN`: 243 +- `AM_BIOETHICS`: 238 +- `AM_CP_HELM`: 237 +- `AM_CP_ARMOR`: 236 +- `AM_CP_SHIELD`: 235 +- `AM_CP_WEAPON`: 234 +- `AM_SPHEREMINE`: 233 +- `AM_CANNIBALIZE`: 232 +- `AM_POTIONPITCHER`: 231 +- `AM_ACIDTERROR`: 230 +- `AM_DEMONSTRATION`: 229 +- `AM_PHARMACY`: 228 +- `AM_LEARNINGPOTION`: 227 +- `AM_AXEMASTERY`: 226 +- `RG_PLAGIARISM`: 225 +- `RG_COMPULSION`: 224 +- `RG_GANGSTER`: 223 +- `RG_CLEANER`: 222 +- `RG_FLAGGRAFFITI`: 221 +- `RG_GRAFFITI`: 220 +- `RG_INTIMIDATE`: 219 +- `RG_STRIPHELM`: 218 +- `RG_STRIPARMOR`: 217 +- `RG_STRIPSHIELD`: 216 +- `RG_STRIPWEAPON`: 215 +- `RG_RAID`: 214 +- `RG_TUNNELDRIVE`: 213 +- `RG_BACKSTAP`: 212 +- `RG_STEALCOIN`: 211 +- `RG_SNATCHER`: 210 +- `NPC_SUMMONMONSTER`: 209 +- `NPC_REBIRTH`: 208 +- `NPC_HALLUCINATION`: 207 +- `NPC_LICK`: 206 +- `NPC_DEFENDER`: 205 +- `NPC_BARRIER`: 204 +- `NPC_DARKBLESSING`: 203 +- `NPC_DARKBREATH`: 202 +- `NPC_KEEPING`: 201 +- `NPC_ENERGYDRAIN`: 200 +- `NPC_BLOODDRAIN`: 199 +- `NPC_TRANSFORMATION`: 198 +- `NPC_EMOTION`: 197 +- `NPC_SUMMONSLAVE`: 196 +- `NPC_SMOKING`: 195 +- `NPC_PROVOCATION`: 194 +- `NPC_METAMORPHOSIS`: 193 +- `NPC_MAGICALATTACK`: 192 +- `NPC_TELEKINESISATTACK`: 191 +- `NPC_DARKNESSATTACK`: 190 +- `NPC_HOLYATTACK`: 189 +- `NPC_POISONATTACK`: 188 +- `NPC_WINDATTACK`: 187 +- `NPC_FIREATTACK`: 186 +- `NPC_GROUNDATTACK`: 185 +- `NPC_WATERATTACK`: 184 +- `NPC_RANDOMATTACK`: 183 +- `NPC_SLEEPATTACK`: 182 +- `NPC_CURSEATTACK`: 181 +- `NPC_PETRIFYATTACK`: 180 +- `NPC_STUNATTACK`: 179 +- `NPC_SILENCEATTACK`: 178 +- `NPC_BLINDATTACK`: 177 +- `NPC_POISON`: 176 +- `NPC_SUICIDE`: 175 +- `NPC_SPLASHATTACK`: 174 +- `NPC_SELFDESTRUCTION`: 173 +- `NPC_GUIDEDATTACK`: 172 +- `NPC_COMBOATTACK`: 171 +- `NPC_CRITICALSLASH`: 170 +- `NPC_CHANGETELEKINESIS`: 169 +- `NPC_CHANGEDARKNESS`: 168 +- `NPC_CHANGEHOLY`: 167 +- `NPC_CHANGEPOISON`: 166 +- `NPC_CHANGEWIND`: 165 +- `NPC_CHANGEFIRE`: 164 +- `NPC_CHANGEGROUND`: 163 +- `NPC_CHANGEWATER`: 162 +- `NPC_ATTRICHANGE`: 161 +- `NPC_RANGEATTACK`: 160 +- `NPC_MENTALBREAKER`: 159 +- `NPC_PIERCINGATT`: 158 +- `MG_ENERGYCOAT`: 157 +- `AL_HOLYLIGHT`: 156 +- `MC_LOUD`: 155 +- `MC_CHANGECART`: 154 +- `MC_CARTREVOLUTION`: 153 +- `TF_THROWSTONE`: 152 +- `TF_PICKSTONE`: 151 +- `TF_BACKSLIDING`: 150 +- `TF_SPRINKLESAND`: 149 +- `AC_CHARGEARROW`: 148 +- `AC_MAKINGARROW`: 147 +- `SM_AUTOBERSERK`: 146 +- `SM_FATALBLOW`: 145 +- `SM_MOVINGRECOVERY`: 144 +- `NV_TRICKDEAD`: 143 +- `NV_FIRSTAID`: 142 +- `AS_SPLASHER`: 141 +- `AS_VENOMDUST`: 140 +- `AS_POISONREACT`: 139 +- `AS_ENCHANTPOISON`: 138 +- `AS_GRIMTOOTH`: 137 +- `AS_SONICBLOW`: 136 +- `AS_CLOAKING`: 135 +- `AS_KATAR`: 134 +- `AS_LEFT`: 133 +- `AS_RIGHT`: 132 +- `HT_SPRINGTRAP`: 131 +- `HT_DETECTING`: 130 +- `HT_BLITZBEAT`: 129 +- `HT_STEELCROW`: 128 +- `HT_FALCON`: 127 +- `HT_BEASTBANE`: 126 +- `HT_TALKIEBOX`: 125 +- `HT_REMOVETRAP`: 124 +- `HT_CLAYMORETRAP`: 123 +- `HT_BLASTMINE`: 122 +- `HT_FREEZINGTRAP`: 121 +- `HT_FLASHER`: 120 +- `HT_SANDMAN`: 119 +- `HT_SHOCKWAVE`: 118 +- `HT_ANKLESNARE`: 117 +- `HT_LANDMINE`: 116 +- `HT_SKIDTRAP`: 115 +- `BS_MAXIMIZE`: 114 +- `BS_OVERTHRUST`: 113 +- `BS_WEAPONPERFECT`: 112 +- `BS_ADRENALINE`: 111 +- `BS_HAMMERFALL`: 110 +- `BS_SKINTEMPER`: 109 +- `BS_REPAIRWEAPON`: 108 +- `BS_WEAPONRESEARCH`: 107 +- `BS_FINDINGORE`: 106 +- `BS_HILTBINDING`: 105 +- `BS_SPEAR`: 104 +- `BS_KNUCKLE`: 103 +- `BS_MACE`: 102 +- `BS_AXE`: 101 +- `BS_TWOHANDSWORD`: 100 +- `BS_SWORD`: 99 +- `BS_DAGGER`: 98 +- `BS_ORIDEOCON`: 97 +- `BS_ENCHANTEDSTONE`: 96 +- `BS_STEEL`: 95 +- `BS_IRON`: 94 +- `WZ_ESTIMATION`: 93 +- `WZ_QUAGMIRE`: 92 +- `WZ_HEAVENDRIVE`: 91 +- `WZ_EARTHSPIKE`: 90 +- `WZ_STORMGUST`: 89 +- `WZ_FROSTNOVA`: 88 +- `WZ_ICEWALL`: 87 +- `WZ_WATERBALL`: 86 +- `WZ_VERMILION`: 85 +- `WZ_JUPITEL`: 84 +- `WZ_METEOR`: 83 +- `WZ_SIGHTRASHER`: 81 +- `WZ_FIREPILLAR`: 80 +- `PR_MAGNUS`: 79 +- `PR_LEXAETERNA`: 78 +- `PR_TURNUNDEAD`: 77 +- `PR_LEXDIVINA`: 76 +- `PR_GLORIA`: 75 +- `PR_MAGNIFICAT`: 74 +- `PR_KYRIE`: 73 +- `PR_STRECOVERY`: 72 +- `PR_SLOWPOISON`: 71 +- `PR_SANCTUARY`: 70 +- `PR_BENEDICTIO`: 69 +- `PR_ASPERSIO`: 68 +- `PR_SUFFRAGIUM`: 67 +- `PR_IMPOSITIO`: 66 +- `PR_MACEMASTERY`: 65 +- `KN_CAVALIERMASTERY`: 64 +- `KN_RIDING`: 63 +- `KN_BOWLINGBASH`: 62 +- `KN_AUTOCOUNTER`: 61 +- `KN_TWOHANDQUICKEN`: 60 +- `KN_SPEARBOOMERANG`: 59 +- `KN_SPEARSTAB`: 58 +- `KN_BRANDISHSPEAR`: 57 +- `KN_PIERCE`: 56 +- `KN_SPEARMASTERY`: 55 +- `ALL_RESURRECTION`: 54 +- `TF_DETOXIFY`: 53 +- `TF_POISON`: 52 +- `TF_HIDING`: 51 +- `TF_STEAL`: 50 +- `TF_MISS`: 49 +- `TF_DOUBLE`: 48 +- `AC_SHOWER`: 47 +- `AC_DOUBLE`: 46 +- `AC_CONCENTRATION`: 45 +- `AC_VULTURE`: 44 +- `AC_OWL`: 43 +- `MC_MAMMONITE`: 42 +- `MC_VENDING`: 41 +- `MC_IDENTIFY`: 40 +- `MC_PUSHCART`: 39 +- `MC_OVERCHARGE`: 38 +- `MC_DISCOUNT`: 37 +- `MC_INCCARRY`: 36 +- `AL_CURE`: 35 +- `AL_BLESSING`: 34 +- `AL_ANGELUS`: 33 +- `AL_CRUCIS`: 32 +- `AL_HOLYWATER`: 31 +- `AL_DECAGI`: 30 +- `AL_INCAGI`: 29 +- `AL_HEAL`: 28 +- `AL_WARP`: 27 +- `AL_TELEPORT`: 26 +- `AL_PNEUMA`: 25 +- `AL_RUWACH`: 24 +- `AL_DEMONBANE`: 23 +- `AL_DP`: 22 +- `MG_THUNDERSTORM`: 21 +- `MG_LIGHTNINGBOLT`: 20 +- `MG_FIREBOLT`: 19 +- `MG_FIREWALL`: 18 +- `MG_FIREBALL`: 17 +- `MG_STONECURSE`: 16 +- `MG_FROSTDIVER`: 15 +- `MG_COLDBOLT`: 14 +- `MG_SOULSTRIKE`: 13 +- `MG_SAFETYWALL`: 12 +- `MG_NAPALMBEAT`: 11 +- `MG_SIGHT`: 10 +- `MG_SRECOVERY`: 9 +- `SM_ENDURE`: 8 +- `SM_MAGNUM`: 7 +- `SM_PROVOKE`: 6 +- `SM_BASH`: 5 +- `SM_RECOVERY`: 4 +- `SM_TWOHAND`: 3 +- `SM_SWORD`: 2 +- `NV_BASIC`: 1 - `SA_ELEMENTWIND`: 1019 -- `RK_ENCHANTBLADE`: 2001 -- `RK_SONICWAVE`: 2002 -- `RK_DEATHBOUND`: 2003 -- `RK_HUNDREDSPEAR`: 2004 -- `RK_WINDCUTTER`: 2005 -- `RK_IGNITIONBREAK`: 2006 -- `RK_DRAGONTRAINING`: 2007 -- `RK_DRAGONBREATH`: 2008 -- `RK_DRAGONHOWLING`: 2009 -- `RK_RUNEMASTERY`: 2010 -- `RK_MILLENNIUMSHIELD`: 2011 -- `RK_CRUSHSTRIKE`: 2012 -- `RK_REFRESH`: 2013 -- `RK_GIANTGROWTH`: 2014 -- `RK_STONEHARDSKIN`: 2015 -- `RK_VITALITYACTIVATION`: 2016 -- `RK_STORMBLAST`: 2017 -- `RK_FIGHTINGSPIRIT`: 2018 -- `RK_ABUNDANCE`: 2019 -- `RK_PHANTOMTHRUST`: 2020 -- `GC_VENOMIMPRESS`: 2021 -- `GC_CROSSIMPACT`: 2022 -- `GC_DARKILLUSION`: 2023 -- `GC_RESEARCHNEWPOISON`: 2024 -- `GC_CREATENEWPOISON`: 2025 -- `GC_ANTIDOTE`: 2026 -- `GC_POISONINGWEAPON`: 2027 -- `GC_WEAPONBLOCKING`: 2028 -- `GC_COUNTERSLASH`: 2029 -- `GC_WEAPONCRUSH`: 2030 -- `GC_VENOMPRESSURE`: 2031 -- `GC_POISONSMOKE`: 2032 -- `GC_CLOAKINGEXCEED`: 2033 -- `GC_PHANTOMMENACE`: 2034 -- `GC_HALLUCINATIONWALK`: 2035 -- `GC_ROLLINGCUTTER`: 2036 -- `GC_CROSSRIPPERSLASHER`: 2037 -- `AB_JUDEX`: 2038 -- `AB_ANCILLA`: 2039 -- `AB_ADORAMUS`: 2040 -- `AB_CLEMENTIA`: 2041 -- `AB_CANTO`: 2042 -- `AB_CHEAL`: 2043 -- `AB_EPICLESIS`: 2044 -- `AB_PRAEFATIO`: 2045 -- `AB_ORATIO`: 2046 -- `AB_LAUDAAGNUS`: 2047 -- `AB_LAUDARAMUS`: 2048 -- `AB_EUCHARISTICA`: 2049 -- `AB_RENOVATIO`: 2050 -- `AB_HIGHNESSHEAL`: 2051 -- `AB_CLEARANCE`: 2052 -- `AB_EXPIATIO`: 2053 -- `AB_DUPLELIGHT`: 2054 -- `AB_DUPLELIGHT_MELEE`: 2055 -- `AB_DUPLELIGHT_MAGIC`: 2056 +- `SA_ELEMENTFIRE`: 1018 +- `SA_ELEMENTGROUND`: 1017 +- `MO_BALKYOUNG`: 1016 +- `MO_KITRANSLATION`: 1015 +- `PR_REDEMPTIO`: 1014 +- `BS_GREED`: 1013 +- `BS_UNFAIRLYTRICK`: 1012 +- `DC_WINKCHARM`: 1011 +- `BA_PANGVOICE`: 1010 +- `HT_PHANTASMIC`: 1009 +- `SA_ELEMENTWATER`: 1008 +- `SA_CREATECON`: 1007 +- `WZ_SIGHTBLASTER`: 1006 +- `RG_CLOSECONFINE`: 1005 +- `AS_VENOMKNIFE`: 1004 +- `AS_SONICACCEL`: 1003 +- `CR_SHRINK`: 1002 +- `KN_CHARGEATK`: 1001 - `AB_SILENTIUM`: 2057 -- `WL_WHITEIMPRISON`: 2201 -- `WL_SOULEXPANSION`: 2202 -- `WL_FROSTMISTY`: 2203 -- `WL_JACKFROST`: 2204 -- `WL_MARSHOFABYSS`: 2205 -- `WL_RECOGNIZEDSPELL`: 2206 -- `WL_SIENNAEXECRATE`: 2207 -- `WL_RADIUS`: 2208 -- `WL_STASIS`: 2209 -- `WL_DRAINLIFE`: 2210 -- `WL_CRIMSONROCK`: 2211 -- `WL_HELLINFERNO`: 2212 -- `WL_COMET`: 2213 -- `WL_CHAINLIGHTNING`: 2214 -- `WL_CHAINLIGHTNING_ATK`: 2215 -- `WL_EARTHSTRAIN`: 2216 -- `WL_TETRAVORTEX`: 2217 -- `WL_TETRAVORTEX_FIRE`: 2218 -- `WL_TETRAVORTEX_WATER`: 2219 -- `WL_TETRAVORTEX_WIND`: 2220 -- `WL_TETRAVORTEX_GROUND`: 2221 -- `WL_SUMMONFB`: 2222 -- `WL_SUMMONBL`: 2223 -- `WL_SUMMONWB`: 2224 -- `WL_SUMMON_ATK_FIRE`: 2225 -- `WL_SUMMON_ATK_WIND`: 2226 -- `WL_SUMMON_ATK_WATER`: 2227 -- `WL_SUMMON_ATK_GROUND`: 2228 -- `WL_SUMMONSTONE`: 2229 -- `WL_RELEASE`: 2230 -- `WL_READING_SB`: 2231 -- `WL_FREEZE_SP`: 2232 -- `RA_ARROWSTORM`: 2233 -- `RA_FEARBREEZE`: 2234 -- `RA_RANGERMAIN`: 2235 -- `RA_AIMEDBOLT`: 2236 -- `RA_DETONATOR`: 2237 -- `RA_ELECTRICSHOCKER`: 2238 -- `RA_CLUSTERBOMB`: 2239 -- `RA_WUGMASTERY`: 2240 -- `RA_WUGRIDER`: 2241 -- `RA_WUGDASH`: 2242 -- `RA_WUGSTRIKE`: 2243 -- `RA_WUGBITE`: 2244 -- `RA_TOOTHOFWUG`: 2245 -- `RA_SENSITIVEKEEN`: 2246 -- `RA_CAMOUFLAGE`: 2247 -- `RA_RESEARCHTRAP`: 2248 -- `RA_MAGENTATRAP`: 2249 -- `RA_COBALTTRAP`: 2250 -- `RA_MAIZETRAP`: 2251 -- `RA_VERDURETRAP`: 2252 -- `RA_FIRINGTRAP`: 2253 -- `RA_ICEBOUNDTRAP`: 2254 -- `NC_MADOLICENCE`: 2255 -- `NC_BOOSTKNUCKLE`: 2256 -- `NC_PILEBUNKER`: 2257 -- `NC_VULCANARM`: 2258 -- `NC_FLAMELAUNCHER`: 2259 -- `NC_COLDSLOWER`: 2260 -- `NC_ARMSCANNON`: 2261 -- `NC_ACCELERATION`: 2262 -- `NC_HOVERING`: 2263 -- `NC_F_SIDESLIDE`: 2264 -- `NC_B_SIDESLIDE`: 2265 -- `NC_MAINFRAME`: 2266 -- `NC_SELFDESTRUCTION`: 2267 -- `NC_SHAPESHIFT`: 2268 -- `NC_EMERGENCYCOOL`: 2269 -- `NC_INFRAREDSCAN`: 2270 -- `NC_ANALYZE`: 2271 -- `NC_MAGNETICFIELD`: 2272 -- `NC_NEUTRALBARRIER`: 2273 -- `NC_STEALTHFIELD`: 2274 -- `NC_REPAIR`: 2275 -- `NC_TRAININGAXE`: 2276 -- `NC_RESEARCHFE`: 2277 -- `NC_AXEBOOMERANG`: 2278 -- `NC_POWERSWING`: 2279 -- `NC_AXETORNADO`: 2280 -- `NC_SILVERSNIPER`: 2281 -- `NC_MAGICDECOY`: 2282 -- `NC_DISJOINT`: 2283 -- `SC_FATALMENACE`: 2284 -- `SC_REPRODUCE`: 2285 -- `SC_AUTOSHADOWSPELL`: 2286 -- `SC_SHADOWFORM`: 2287 -- `SC_TRIANGLESHOT`: 2288 -- `SC_BODYPAINT`: 2289 -- `SC_INVISIBILITY`: 2290 -- `SC_DEADLYINFECT`: 2291 -- `SC_ENERVATION`: 2292 -- `SC_GROOMY`: 2293 -- `SC_IGNORANCE`: 2294 -- `SC_LAZINESS`: 2295 -- `SC_UNLUCKY`: 2296 -- `SC_WEAKNESS`: 2297 -- `SC_STRIPACCESSARY`: 2298 -- `SC_MANHOLE`: 2299 -- `SC_DIMENSIONDOOR`: 2300 -- `SC_CHAOSPANIC`: 2301 -- `SC_MAELSTROM`: 2302 -- `SC_BLOODYLUST`: 2303 +- `AB_DUPLELIGHT_MAGIC`: 2056 +- `AB_DUPLELIGHT_MELEE`: 2055 +- `AB_DUPLELIGHT`: 2054 +- `AB_EXPIATIO`: 2053 +- `AB_CLEARANCE`: 2052 +- `AB_HIGHNESSHEAL`: 2051 +- `AB_RENOVATIO`: 2050 +- `AB_EUCHARISTICA`: 2049 +- `AB_LAUDARAMUS`: 2048 +- `AB_LAUDAAGNUS`: 2047 +- `AB_ORATIO`: 2046 +- `AB_PRAEFATIO`: 2045 +- `AB_EPICLESIS`: 2044 +- `AB_CHEAL`: 2043 +- `AB_CANTO`: 2042 +- `AB_CLEMENTIA`: 2041 +- `AB_ADORAMUS`: 2040 +- `AB_ANCILLA`: 2039 +- `AB_JUDEX`: 2038 +- `GC_CROSSRIPPERSLASHER`: 2037 +- `GC_ROLLINGCUTTER`: 2036 +- `GC_HALLUCINATIONWALK`: 2035 +- `GC_PHANTOMMENACE`: 2034 +- `GC_CLOAKINGEXCEED`: 2033 +- `GC_POISONSMOKE`: 2032 +- `GC_VENOMPRESSURE`: 2031 +- `GC_WEAPONCRUSH`: 2030 +- `GC_COUNTERSLASH`: 2029 +- `GC_WEAPONBLOCKING`: 2028 +- `GC_POISONINGWEAPON`: 2027 +- `GC_ANTIDOTE`: 2026 +- `GC_CREATENEWPOISON`: 2025 +- `GC_RESEARCHNEWPOISON`: 2024 +- `GC_DARKILLUSION`: 2023 +- `GC_CROSSIMPACT`: 2022 +- `GC_VENOMIMPRESS`: 2021 +- `RK_PHANTOMTHRUST`: 2020 +- `RK_ABUNDANCE`: 2019 +- `RK_FIGHTINGSPIRIT`: 2018 +- `RK_STORMBLAST`: 2017 +- `RK_VITALITYACTIVATION`: 2016 +- `RK_STONEHARDSKIN`: 2015 +- `RK_GIANTGROWTH`: 2014 +- `RK_REFRESH`: 2013 +- `RK_CRUSHSTRIKE`: 2012 +- `RK_MILLENNIUMSHIELD`: 2011 +- `RK_RUNEMASTERY`: 2010 +- `RK_DRAGONHOWLING`: 2009 +- `RK_DRAGONBREATH`: 2008 +- `RK_DRAGONTRAINING`: 2007 +- `RK_IGNITIONBREAK`: 2006 +- `RK_WINDCUTTER`: 2005 +- `RK_HUNDREDSPEAR`: 2004 +- `RK_DEATHBOUND`: 2003 +- `RK_SONICWAVE`: 2002 +- `RK_ENCHANTBLADE`: 2001 - `SC_FEINTBOMB`: 2304 -- `LG_CANNONSPEAR`: 2307 -- `LG_BANISHINGPOINT`: 2308 -- `LG_TRAMPLE`: 2309 -- `LG_SHIELDPRESS`: 2310 -- `LG_REFLECTDAMAGE`: 2311 -- `LG_PINPOINTATTACK`: 2312 -- `LG_FORCEOFVANGUARD`: 2313 -- `LG_RAGEBURST`: 2314 -- `LG_SHIELDSPELL`: 2315 -- `LG_EXEEDBREAK`: 2316 -- `LG_OVERBRAND`: 2317 -- `LG_PRESTIGE`: 2318 -- `LG_BANDING`: 2319 -- `LG_MOONSLASHER`: 2320 -- `LG_RAYOFGENESIS`: 2321 -- `LG_PIETY`: 2322 -- `LG_EARTHDRIVE`: 2323 -- `LG_HESPERUSLIT`: 2324 -- `LG_INSPIRATION`: 2325 -- `SR_DRAGONCOMBO`: 2326 -- `SR_SKYNETBLOW`: 2327 -- `SR_EARTHSHAKER`: 2328 -- `SR_FALLENEMPIRE`: 2329 -- `SR_TIGERCANNON`: 2330 -- `SR_HELLGATE`: 2331 -- `SR_RAMPAGEBLASTER`: 2332 -- `SR_CRESCENTELBOW`: 2333 -- `SR_CURSEDCIRCLE`: 2334 -- `SR_LIGHTNINGWALK`: 2335 -- `SR_KNUCKLEARROW`: 2336 -- `SR_WINDMILL`: 2337 -- `SR_RAISINGDRAGON`: 2338 -- `SR_GENTLETOUCH`: 2339 -- `SR_ASSIMILATEPOWER`: 2340 -- `SR_POWERVELOCITY`: 2341 -- `SR_CRESCENTELBOW_AUTOSPELL`: 2342 -- `SR_GATEOFHELL`: 2343 -- `SR_GENTLETOUCH_QUIET`: 2344 -- `SR_GENTLETOUCH_CURE`: 2345 -- `SR_GENTLETOUCH_ENERGYGAIN`: 2346 -- `SR_GENTLETOUCH_CHANGE`: 2347 +- `SC_BLOODYLUST`: 2303 +- `SC_MAELSTROM`: 2302 +- `SC_CHAOSPANIC`: 2301 +- `SC_DIMENSIONDOOR`: 2300 +- `SC_MANHOLE`: 2299 +- `SC_STRIPACCESSARY`: 2298 +- `SC_WEAKNESS`: 2297 +- `SC_UNLUCKY`: 2296 +- `SC_LAZINESS`: 2295 +- `SC_IGNORANCE`: 2294 +- `SC_GROOMY`: 2293 +- `SC_ENERVATION`: 2292 +- `SC_DEADLYINFECT`: 2291 +- `SC_INVISIBILITY`: 2290 +- `SC_BODYPAINT`: 2289 +- `SC_TRIANGLESHOT`: 2288 +- `SC_SHADOWFORM`: 2287 +- `SC_AUTOSHADOWSPELL`: 2286 +- `SC_REPRODUCE`: 2285 +- `SC_FATALMENACE`: 2284 +- `NC_DISJOINT`: 2283 +- `NC_MAGICDECOY`: 2282 +- `NC_SILVERSNIPER`: 2281 +- `NC_AXETORNADO`: 2280 +- `NC_POWERSWING`: 2279 +- `NC_AXEBOOMERANG`: 2278 +- `NC_RESEARCHFE`: 2277 +- `NC_TRAININGAXE`: 2276 +- `NC_REPAIR`: 2275 +- `NC_STEALTHFIELD`: 2274 +- `NC_NEUTRALBARRIER`: 2273 +- `NC_MAGNETICFIELD`: 2272 +- `NC_ANALYZE`: 2271 +- `NC_INFRAREDSCAN`: 2270 +- `NC_EMERGENCYCOOL`: 2269 +- `NC_SHAPESHIFT`: 2268 +- `NC_SELFDESTRUCTION`: 2267 +- `NC_MAINFRAME`: 2266 +- `NC_B_SIDESLIDE`: 2265 +- `NC_F_SIDESLIDE`: 2264 +- `NC_HOVERING`: 2263 +- `NC_ACCELERATION`: 2262 +- `NC_ARMSCANNON`: 2261 +- `NC_COLDSLOWER`: 2260 +- `NC_FLAMELAUNCHER`: 2259 +- `NC_VULCANARM`: 2258 +- `NC_PILEBUNKER`: 2257 +- `NC_BOOSTKNUCKLE`: 2256 +- `NC_MADOLICENCE`: 2255 +- `RA_ICEBOUNDTRAP`: 2254 +- `RA_FIRINGTRAP`: 2253 +- `RA_VERDURETRAP`: 2252 +- `RA_MAIZETRAP`: 2251 +- `RA_COBALTTRAP`: 2250 +- `RA_MAGENTATRAP`: 2249 +- `RA_RESEARCHTRAP`: 2248 +- `RA_CAMOUFLAGE`: 2247 +- `RA_SENSITIVEKEEN`: 2246 +- `RA_TOOTHOFWUG`: 2245 +- `RA_WUGBITE`: 2244 +- `RA_WUGSTRIKE`: 2243 +- `RA_WUGDASH`: 2242 +- `RA_WUGRIDER`: 2241 +- `RA_WUGMASTERY`: 2240 +- `RA_CLUSTERBOMB`: 2239 +- `RA_ELECTRICSHOCKER`: 2238 +- `RA_DETONATOR`: 2237 +- `RA_AIMEDBOLT`: 2236 +- `RA_RANGERMAIN`: 2235 +- `RA_FEARBREEZE`: 2234 +- `RA_ARROWSTORM`: 2233 +- `WL_FREEZE_SP`: 2232 +- `WL_READING_SB`: 2231 +- `WL_RELEASE`: 2230 +- `WL_SUMMONSTONE`: 2229 +- `WL_SUMMON_ATK_GROUND`: 2228 +- `WL_SUMMON_ATK_WATER`: 2227 +- `WL_SUMMON_ATK_WIND`: 2226 +- `WL_SUMMON_ATK_FIRE`: 2225 +- `WL_SUMMONWB`: 2224 +- `WL_SUMMONBL`: 2223 +- `WL_SUMMONFB`: 2222 +- `WL_TETRAVORTEX_GROUND`: 2221 +- `WL_TETRAVORTEX_WIND`: 2220 +- `WL_TETRAVORTEX_WATER`: 2219 +- `WL_TETRAVORTEX_FIRE`: 2218 +- `WL_TETRAVORTEX`: 2217 +- `WL_EARTHSTRAIN`: 2216 +- `WL_CHAINLIGHTNING_ATK`: 2215 +- `WL_CHAINLIGHTNING`: 2214 +- `WL_COMET`: 2213 +- `WL_HELLINFERNO`: 2212 +- `WL_CRIMSONROCK`: 2211 +- `WL_DRAINLIFE`: 2210 +- `WL_STASIS`: 2209 +- `WL_RADIUS`: 2208 +- `WL_SIENNAEXECRATE`: 2207 +- `WL_RECOGNIZEDSPELL`: 2206 +- `WL_MARSHOFABYSS`: 2205 +- `WL_JACKFROST`: 2204 +- `WL_FROSTMISTY`: 2203 +- `WL_SOULEXPANSION`: 2202 +- `WL_WHITEIMPRISON`: 2201 - `SR_GENTLETOUCH_REVITALIZE`: 2348 -- `WA_SWING_DANCE`: 2350 -- `WA_SYMPHONY_OF_LOVER`: 2351 +- `SR_GENTLETOUCH_CHANGE`: 2347 +- `SR_GENTLETOUCH_ENERGYGAIN`: 2346 +- `SR_GENTLETOUCH_CURE`: 2345 +- `SR_GENTLETOUCH_QUIET`: 2344 +- `SR_GATEOFHELL`: 2343 +- `SR_CRESCENTELBOW_AUTOSPELL`: 2342 +- `SR_POWERVELOCITY`: 2341 +- `SR_ASSIMILATEPOWER`: 2340 +- `SR_GENTLETOUCH`: 2339 +- `SR_RAISINGDRAGON`: 2338 +- `SR_WINDMILL`: 2337 +- `SR_KNUCKLEARROW`: 2336 +- `SR_LIGHTNINGWALK`: 2335 +- `SR_CURSEDCIRCLE`: 2334 +- `SR_CRESCENTELBOW`: 2333 +- `SR_RAMPAGEBLASTER`: 2332 +- `SR_HELLGATE`: 2331 +- `SR_TIGERCANNON`: 2330 +- `SR_FALLENEMPIRE`: 2329 +- `SR_EARTHSHAKER`: 2328 +- `SR_SKYNETBLOW`: 2327 +- `SR_DRAGONCOMBO`: 2326 +- `LG_INSPIRATION`: 2325 +- `LG_HESPERUSLIT`: 2324 +- `LG_EARTHDRIVE`: 2323 +- `LG_PIETY`: 2322 +- `LG_RAYOFGENESIS`: 2321 +- `LG_MOONSLASHER`: 2320 +- `LG_BANDING`: 2319 +- `LG_PRESTIGE`: 2318 +- `LG_OVERBRAND`: 2317 +- `LG_EXEEDBREAK`: 2316 +- `LG_SHIELDSPELL`: 2315 +- `LG_RAGEBURST`: 2314 +- `LG_FORCEOFVANGUARD`: 2313 +- `LG_PINPOINTATTACK`: 2312 +- `LG_REFLECTDAMAGE`: 2311 +- `LG_SHIELDPRESS`: 2310 +- `LG_TRAMPLE`: 2309 +- `LG_BANISHINGPOINT`: 2308 +- `LG_CANNONSPEAR`: 2307 - `WA_MOONLIT_SERENADE`: 2352 -- `MI_RUSH_WINDMILL`: 2381 -- `MI_ECHOSONG`: 2382 +- `WA_SYMPHONY_OF_LOVER`: 2351 +- `WA_SWING_DANCE`: 2350 - `MI_HARMONIZE`: 2383 -- `WM_LESSON`: 2412 -- `WM_METALICSOUND`: 2413 -- `WM_REVERBERATION`: 2414 -- `WM_REVERBERATION_MELEE`: 2415 -- `WM_REVERBERATION_MAGIC`: 2416 -- `WM_DOMINION_IMPULSE`: 2417 -- `WM_SEVERE_RAINSTORM`: 2418 -- `WM_POEMOFNETHERWORLD`: 2419 -- `WM_VOICEOFSIREN`: 2420 -- `WM_DEADHILLHERE`: 2421 -- `WM_LULLABY_DEEPSLEEP`: 2422 -- `WM_SIRCLEOFNATURE`: 2423 -- `WM_RANDOMIZESPELL`: 2424 -- `WM_GLOOMYDAY`: 2425 -- `WM_GREAT_ECHO`: 2426 -- `WM_SONG_OF_MANA`: 2427 -- `WM_DANCE_WITH_WUG`: 2428 -- `WM_SOUND_OF_DESTRUCTION`: 2429 -- `WM_SATURDAY_NIGHT_FEVER`: 2430 -- `WM_LERADS_DEW`: 2431 -- `WM_MELODYOFSINK`: 2432 -- `WM_BEYOND_OF_WARCRY`: 2433 +- `MI_ECHOSONG`: 2382 +- `MI_RUSH_WINDMILL`: 2381 - `WM_UNLIMITED_HUMMING_VOICE`: 2434 -- `SO_FIREWALK`: 2443 -- `SO_ELECTRICWALK`: 2444 -- `SO_SPELLFIST`: 2445 -- `SO_EARTHGRAVE`: 2446 -- `SO_DIAMONDDUST`: 2447 -- `SO_POISON_BUSTER`: 2448 -- `SO_PSYCHIC_WAVE`: 2449 -- `SO_CLOUD_KILL`: 2450 -- `SO_STRIKING`: 2451 -- `SO_WARMER`: 2452 -- `SO_VACUUM_EXTREME`: 2453 -- `SO_VARETYR_SPEAR`: 2454 -- `SO_ARRULLO`: 2455 -- `SO_EL_CONTROL`: 2456 -- `SO_SUMMON_AGNI`: 2457 -- `SO_SUMMON_AQUA`: 2458 -- `SO_SUMMON_VENTUS`: 2459 -- `SO_SUMMON_TERA`: 2460 -- `SO_EL_ACTION`: 2461 -- `SO_EL_ANALYSIS`: 2462 -- `SO_EL_SYMPATHY`: 2463 -- `SO_EL_CURE`: 2464 -- `SO_FIRE_INSIGNIA`: 2465 -- `SO_WATER_INSIGNIA`: 2466 -- `SO_WIND_INSIGNIA`: 2467 +- `WM_BEYOND_OF_WARCRY`: 2433 +- `WM_MELODYOFSINK`: 2432 +- `WM_LERADS_DEW`: 2431 +- `WM_SATURDAY_NIGHT_FEVER`: 2430 +- `WM_SOUND_OF_DESTRUCTION`: 2429 +- `WM_DANCE_WITH_WUG`: 2428 +- `WM_SONG_OF_MANA`: 2427 +- `WM_GREAT_ECHO`: 2426 +- `WM_GLOOMYDAY`: 2425 +- `WM_RANDOMIZESPELL`: 2424 +- `WM_SIRCLEOFNATURE`: 2423 +- `WM_LULLABY_DEEPSLEEP`: 2422 +- `WM_DEADHILLHERE`: 2421 +- `WM_VOICEOFSIREN`: 2420 +- `WM_POEMOFNETHERWORLD`: 2419 +- `WM_SEVERE_RAINSTORM`: 2418 +- `WM_DOMINION_IMPULSE`: 2417 +- `WM_REVERBERATION_MAGIC`: 2416 +- `WM_REVERBERATION_MELEE`: 2415 +- `WM_REVERBERATION`: 2414 +- `WM_METALICSOUND`: 2413 +- `WM_LESSON`: 2412 - `SO_EARTH_INSIGNIA`: 2468 -- `GN_TRAINING_SWORD`: 2474 -- `GN_REMODELING_CART`: 2475 -- `GN_CART_TORNADO`: 2476 -- `GN_CARTCANNON`: 2477 -- `GN_CARTBOOST`: 2478 -- `GN_THORNS_TRAP`: 2479 -- `GN_BLOOD_SUCKER`: 2480 -- `GN_SPORE_EXPLOSION`: 2481 -- `GN_WALLOFTHORN`: 2482 -- `GN_CRAZYWEED`: 2483 -- `GN_CRAZYWEED_ATK`: 2484 -- `GN_DEMONIC_FIRE`: 2485 -- `GN_FIRE_EXPANSION`: 2486 -- `GN_FIRE_EXPANSION_SMOKE_POWDER`: 2487 -- `GN_FIRE_EXPANSION_TEAR_GAS`: 2488 -- `GN_FIRE_EXPANSION_ACID`: 2489 -- `GN_HELLS_PLANT`: 2490 -- `GN_HELLS_PLANT_ATK`: 2491 -- `GN_MANDRAGORA`: 2492 -- `GN_SLINGITEM`: 2493 -- `GN_CHANGEMATERIAL`: 2494 -- `GN_MIX_COOKING`: 2495 -- `GN_MAKEBOMB`: 2496 -- `GN_S_PHARMACY`: 2497 +- `SO_WIND_INSIGNIA`: 2467 +- `SO_WATER_INSIGNIA`: 2466 +- `SO_FIRE_INSIGNIA`: 2465 +- `SO_EL_CURE`: 2464 +- `SO_EL_SYMPATHY`: 2463 +- `SO_EL_ANALYSIS`: 2462 +- `SO_EL_ACTION`: 2461 +- `SO_SUMMON_TERA`: 2460 +- `SO_SUMMON_VENTUS`: 2459 +- `SO_SUMMON_AQUA`: 2458 +- `SO_SUMMON_AGNI`: 2457 +- `SO_EL_CONTROL`: 2456 +- `SO_ARRULLO`: 2455 +- `SO_VARETYR_SPEAR`: 2454 +- `SO_VACUUM_EXTREME`: 2453 +- `SO_WARMER`: 2452 +- `SO_STRIKING`: 2451 +- `SO_CLOUD_KILL`: 2450 +- `SO_PSYCHIC_WAVE`: 2449 +- `SO_POISON_BUSTER`: 2448 +- `SO_DIAMONDDUST`: 2447 +- `SO_EARTHGRAVE`: 2446 +- `SO_SPELLFIST`: 2445 +- `SO_ELECTRICWALK`: 2444 +- `SO_FIREWALK`: 2443 - `GN_SLINGITEM_RANGEMELEEATK`: 2498 -- `AB_SECRAMENT`: 2515 -- `WM_SEVERE_RAINSTORM_MELEE`: 2516 -- `SR_HOWLINGOFLION`: 2517 -- `SR_RIDEINLIGHTNING`: 2518 +- `GN_S_PHARMACY`: 2497 +- `GN_MAKEBOMB`: 2496 +- `GN_MIX_COOKING`: 2495 +- `GN_CHANGEMATERIAL`: 2494 +- `GN_SLINGITEM`: 2493 +- `GN_MANDRAGORA`: 2492 +- `GN_HELLS_PLANT_ATK`: 2491 +- `GN_HELLS_PLANT`: 2490 +- `GN_FIRE_EXPANSION_ACID`: 2489 +- `GN_FIRE_EXPANSION_TEAR_GAS`: 2488 +- `GN_FIRE_EXPANSION_SMOKE_POWDER`: 2487 +- `GN_FIRE_EXPANSION`: 2486 +- `GN_DEMONIC_FIRE`: 2485 +- `GN_CRAZYWEED_ATK`: 2484 +- `GN_CRAZYWEED`: 2483 +- `GN_WALLOFTHORN`: 2482 +- `GN_SPORE_EXPLOSION`: 2481 +- `GN_BLOOD_SUCKER`: 2480 +- `GN_THORNS_TRAP`: 2479 +- `GN_CARTBOOST`: 2478 +- `GN_CARTCANNON`: 2477 +- `GN_CART_TORNADO`: 2476 +- `GN_REMODELING_CART`: 2475 +- `GN_TRAINING_SWORD`: 2474 - `LG_OVERBRAND_BRANDISH`: 2519 -- `RETURN_TO_ELDICASTES`: 2534 -- `ALL_BUYING_STORE`: 2535 -- `ALL_GUARDIAN_RECALL`: 2536 -- `ALL_ODINS_POWER`: 2537 +- `SR_RIDEINLIGHTNING`: 2518 +- `SR_HOWLINGOFLION`: 2517 +- `WM_SEVERE_RAINSTORM_MELEE`: 2516 +- `AB_SECRAMENT`: 2515 - `MC_CARTDECORATE`: 2544 -- `KO_YAMIKUMO`: 3001 -- `KO_RIGHT`: 3002 -- `KO_LEFT`: 3003 -- `KO_JYUMONJIKIRI`: 3004 -- `KO_SETSUDAN`: 3005 -- `KO_BAKURETSU`: 3006 -- `KO_HAPPOKUNAI`: 3007 -- `KO_MUCHANAGE`: 3008 -- `KO_HUUMARANKA`: 3009 -- `KO_MAKIBISHI`: 3010 -- `KO_MEIKYOUSISUI`: 3011 -- `KO_ZANZOU`: 3012 -- `KO_KYOUGAKU`: 3013 -- `KO_JYUSATSU`: 3014 -- `KO_KAHU_ENTEN`: 3015 -- `KO_HYOUHU_HUBUKI`: 3016 -- `KO_KAZEHU_SEIRAN`: 3017 -- `KO_DOHU_KOUKAI`: 3018 -- `KO_KAIHOU`: 3019 -- `KO_ZENKAI`: 3020 -- `KO_GENWAKU`: 3021 -- `KO_IZAYOI`: 3022 -- `KG_KAGEHUMI`: 3023 -- `KG_KYOMU`: 3024 -- `KG_KAGEMUSYA`: 3025 -- `OB_ZANGETSU`: 3026 -- `OB_OBOROGENSOU`: 3027 -- `OB_OBOROGENSOU_TRANSITION_ATK`: 3028 +- `ALL_ODINS_POWER`: 2537 +- `ALL_GUARDIAN_RECALL`: 2536 +- `ALL_BUYING_STORE`: 2535 +- `RETURN_TO_ELDICASTES`: 2534 +- `RL_GLITTERING_GREED_ATK`: 2574 +- `RL_B_FLICKER_ATK`: 2573 +- `RL_R_TRIP_PLUSATK`: 2572 +- `RL_HAMMER_OF_GOD`: 2571 +- `RL_SLUGSHOT`: 2570 +- `RL_AM_BLAST`: 2569 +- `RL_HEAT_BARREL`: 2568 +- `RL_FIRE_RAIN`: 2567 +- `RL_D_TAIL`: 2566 +- `RL_R_TRIP`: 2565 +- `RL_FALLEN_ANGEL`: 2564 +- `RL_P_ALTER`: 2563 +- `RL_H_MINE`: 2562 +- `RL_FIREDANCE`: 2561 +- `RL_C_MARKER`: 2560 +- `RL_QD_SHOT`: 2559 +- `RL_E_CHAIN`: 2558 +- `RL_S_STORM`: 2557 +- `RL_FLICKER`: 2556 +- `RL_B_TRAP`: 2555 +- `RL_BANISHING_BUSTER`: 2554 +- `RL_MASS_SPIRAL`: 2553 +- `RL_RICHS_COIN`: 2552 +- `RL_GLITTERING_GREED`: 2551 - `OB_AKAITSUKI`: 3029 -- `ECL_SNOWFLIP`: 3031 -- `ECL_PEONYMAMY`: 3032 -- `ECL_SADAGUI`: 3033 -- `ECL_SEQUOIADUST`: 3034 +- `OB_OBOROGENSOU_TRANSITION_ATK`: 3028 +- `OB_OBOROGENSOU`: 3027 +- `OB_ZANGETSU`: 3026 +- `KG_KAGEMUSYA`: 3025 +- `KG_KYOMU`: 3024 +- `KG_KAGEHUMI`: 3023 +- `KO_IZAYOI`: 3022 +- `KO_GENWAKU`: 3021 +- `KO_ZENKAI`: 3020 +- `KO_KAIHOU`: 3019 +- `KO_DOHU_KOUKAI`: 3018 +- `KO_KAZEHU_SEIRAN`: 3017 +- `KO_HYOUHU_HUBUKI`: 3016 +- `KO_KAHU_ENTEN`: 3015 +- `KO_JYUSATSU`: 3014 +- `KO_KYOUGAKU`: 3013 +- `KO_ZANZOU`: 3012 +- `KO_MEIKYOUSISUI`: 3011 +- `KO_MAKIBISHI`: 3010 +- `KO_HUUMARANKA`: 3009 +- `KO_MUCHANAGE`: 3008 +- `KO_HAPPOKUNAI`: 3007 +- `KO_BAKURETSU`: 3006 +- `KO_SETSUDAN`: 3005 +- `KO_JYUMONJIKIRI`: 3004 +- `KO_LEFT`: 3003 +- `KO_RIGHT`: 3002 +- `KO_YAMIKUMO`: 3001 - `ECLAGE_RECALL`: 3035 -- `GC_DARKCROW`: 5001 -- `RA_UNLIMIT`: 5002 -- `GN_ILLUSIONDOPING`: 5003 -- `RK_DRAGONBREATH_WATER`: 5004 -- `RK_LUXANIMA`: 5005 -- `NC_MAGMA_ERUPTION`: 5006 -- `WM_FRIGG_SONG`: 5007 -- `SO_ELEMENTAL_SHIELD`: 5008 -- `SR_FLASHCOMBO`: 5009 -- `SC_ESCAPE`: 5010 -- `AB_OFFERTORIUM`: 5011 -- `WL_TELEKINESIS_INTENSE`: 5012 -- `LG_KINGS_GRACE`: 5013 +- `ECL_SEQUOIADUST`: 3034 +- `ECL_SADAGUI`: 3033 +- `ECL_PEONYMAMY`: 3032 +- `ECL_SNOWFLIP`: 3031 - `ALL_FULL_THROTTLE`: 5014 -- `SU_BASIC_SKILL`: 5018 -- `SU_BITE`: 5019 -- `SU_HIDE`: 5020 -- `SU_SCRATCH`: 5021 -- `SU_STOOP`: 5022 -- `SU_LOPE`: 5023 -- `SU_SPRITEMABLE`: 5024 -- `SU_POWEROFLAND`: 5025 -- `SU_SV_STEMSPEAR`: 5026 -- `SU_CN_POWDERING`: 5027 -- `SU_CN_METEOR`: 5028 -- `SU_SV_ROOTTWIST`: 5029 -- `SU_SV_ROOTTWIST_ATK`: 5030 -- `SU_POWEROFLIFE`: 5031 -- `SU_SCAROFTAROU`: 5032 -- `SU_PICKYPECK`: 5033 -- `SU_PICKYPECK_DOUBLE_ATK`: 5034 -- `SU_ARCLOUSEDASH`: 5035 -- `SU_LUNATICCARROTBEAT`: 5036 -- `SU_POWEROFSEA`: 5037 -- `SU_TUNABELLY`: 5038 -- `SU_TUNAPARTY`: 5039 -- `SU_BUNCHOFSHRIMP`: 5040 -- `SU_FRESHSHRIMP`: 5041 -- `SU_CN_METEOR_ATK`: 5042 +- `LG_KINGS_GRACE`: 5013 +- `WL_TELEKINESIS_INTENSE`: 5012 +- `AB_OFFERTORIUM`: 5011 +- `SC_ESCAPE`: 5010 +- `SR_FLASHCOMBO`: 5009 +- `SO_ELEMENTAL_SHIELD`: 5008 +- `WM_FRIGG_SONG`: 5007 +- `NC_MAGMA_ERUPTION`: 5006 +- `RK_LUXANIMA`: 5005 +- `RK_DRAGONBREATH_WATER`: 5004 +- `GN_ILLUSIONDOPING`: 5003 +- `RA_UNLIMIT`: 5002 +- `GC_DARKCROW`: 5001 - `SU_LUNATICCARROTBEAT2`: 5043 +- `SU_CN_METEOR_ATK`: 5042 +- `SU_FRESHSHRIMP`: 5041 +- `SU_BUNCHOFSHRIMP`: 5040 +- `SU_TUNAPARTY`: 5039 +- `SU_TUNABELLY`: 5038 +- `SU_POWEROFSEA`: 5037 +- `SU_LUNATICCARROTBEAT`: 5036 +- `SU_ARCLOUSEDASH`: 5035 +- `SU_PICKYPECK_DOUBLE_ATK`: 5034 +- `SU_PICKYPECK`: 5033 +- `SU_SCAROFTAROU`: 5032 +- `SU_POWEROFLIFE`: 5031 +- `SU_SV_ROOTTWIST_ATK`: 5030 +- `SU_SV_ROOTTWIST`: 5029 +- `SU_CN_METEOR`: 5028 +- `SU_CN_POWDERING`: 5027 +- `SU_SV_STEMSPEAR`: 5026 +- `SU_POWEROFLAND`: 5025 +- `SU_SPRITEMABLE`: 5024 +- `SU_LOPE`: 5023 +- `SU_STOOP`: 5022 +- `SU_SCRATCH`: 5021 +- `SU_HIDE`: 5020 +- `SU_BITE`: 5019 +- `SU_BASIC_SKILL`: 5018 +- `MH_VOLCANIC_ASH`: 8043 +- `MH_PYROCLASTIC`: 8042 +- `MH_LAVA_SLIDE`: 8041 +- `MH_GRANITIC_ARMOR`: 8040 +- `MH_MAGMA_FLOW`: 8039 +- `MH_EQC`: 8038 +- `MH_CBC`: 8037 +- `MH_TINDER_BREAKER`: 8036 +- `MH_ANGRIFFS_MODUS`: 8035 +- `MH_HEILIGE_STANGE`: 8034 +- `MH_STEINWAND`: 8033 +- `MH_GOLDENE_FERSE`: 8032 +- `MH_STAHL_HORN`: 8031 +- `MH_MIDNIGHT_FRENZY`: 8030 +- `MH_SILVERVEIN_RUSH`: 8029 +- `MH_SONIC_CRAW`: 8028 +- `MH_STYLE_CHANGE`: 8027 +- `MH_SILENT_BREEZE`: 8026 +- `MH_XENO_SLASHER`: 8025 +- `MH_ERASER_CUTTER`: 8024 +- `MH_OVERED_BOOST`: 8023 +- `MH_LIGHT_OF_REGENE`: 8022 +- `MH_PAIN_KILLER`: 8021 +- `MH_POISON_MIST`: 8020 +- `MH_NEEDLE_OF_PARALYZE`: 8019 +- `MH_SUMMON_LEGION`: 8018 +- `HVAN_EXPLOSION`: 8016 +- `HVAN_INSTRUCT`: 8015 +- `HVAN_CHAOTIC`: 8014 +- `HVAN_CAPRICE`: 8013 +- `HFLI_SBR44`: 8012 +- `HFLI_SPEED`: 8011 +- `HFLI_FLEET`: 8010 +- `HFLI_MOON`: 8009 +- `HAMI_BLOODLUST`: 8008 +- `HAMI_SKIN`: 8007 +- `HAMI_DEFENCE`: 8006 +- `HAMI_CASTLE`: 8005 +- `HLIF_CHANGE`: 8004 +- `HLIF_BRAIN`: 8003 +- `HLIF_AVOID`: 8002 +- `HLIF_HEAL`: 8001 +- `MER_INCAGI`: 8240 +- `MER_BLESSING`: 8239 +- `MER_KYRIE`: 8238 +- `MER_ESTIMATION`: 8237 +- `MER_LEXDIVINA`: 8236 +- `MER_SCAPEGOAT`: 8235 +- `MER_DECAGI`: 8234 +- `MER_AUTOBERSERK`: 8233 +- `MER_PROVOKE`: 8232 +- `MER_COMPRESS`: 8231 +- `MER_MENTALCURE`: 8230 +- `MER_RECUPERATE`: 8229 +- `MER_BENEDICTION`: 8228 +- `MER_TENDER`: 8227 +- `MER_REGAIN`: 8226 +- `MER_CRASH`: 8225 +- `MER_SIGHT`: 8224 +- `MER_QUICKEN`: 8223 +- `MER_MAGNIFICAT`: 8222 +- `ML_DEVOTION`: 8221 +- `ML_AUTOGUARD`: 8220 +- `ML_DEFENDER`: 8219 +- `ML_SPIRALPIERCE`: 8218 +- `ML_BRANDISH`: 8217 +- `ML_PIERCE`: 8216 +- `MA_SHARPSHOOTING`: 8215 +- `MA_CHARGEARROW`: 8214 +- `MA_REMOVETRAP`: 8213 +- `MA_FREEZINGTRAP`: 8212 +- `MA_SANDMAN`: 8211 +- `MA_LANDMINE`: 8210 +- `MA_SKIDTRAP`: 8209 +- `MA_SHOWER`: 8208 +- `MA_DOUBLE`: 8207 +- `MS_BERSERK`: 8206 +- `MS_REFLECTSHIELD`: 8205 +- `MS_PARRYING`: 8204 +- `MS_BOWLINGBASH`: 8203 +- `MS_MAGNUM`: 8202 +- `MS_BASH`: 8201 +- `EL_STONE_RAIN`: 8442 +- `EL_ROCK_CRUSHER_ATK`: 8441 +- `EL_ROCK_CRUSHER`: 8440 +- `EL_STONE_HAMMER`: 8439 +- `EL_TYPOON_MIS_ATK`: 8438 +- `EL_TYPOON_MIS`: 8437 +- `EL_HURRICANE_ATK`: 8436 +- `EL_HURRICANE`: 8435 +- `EL_WIND_SLASH`: 8434 +- `EL_TIDAL_WEAPON`: 8433 +- `EL_WATER_SCREW_ATK`: 8432 +- `EL_WATER_SCREW`: 8431 +- `EL_ICE_NEEDLE`: 8430 +- `EL_FIRE_WAVE_ATK`: 8429 +- `EL_FIRE_WAVE`: 8428 +- `EL_FIRE_BOMB_ATK`: 8427 +- `EL_FIRE_BOMB`: 8426 +- `EL_FIRE_ARROW`: 8425 +- `EL_UPHEAVAL`: 8424 +- `EL_CURSED_SOIL`: 8423 +- `EL_PETROLOGY`: 8422 +- `EL_WILD_STORM`: 8421 +- `EL_BLAST`: 8420 +- `EL_GUST`: 8419 +- `EL_CHILLY_AIR`: 8418 +- `EL_COOLER`: 8417 +- `EL_AQUAPLAY`: 8416 +- `EL_TROPIC`: 8415 +- `EL_HEATER`: 8414 +- `EL_PYROTECHNIC`: 8413 +- `EL_POWER_OF_GAIA`: 8412 +- `EL_STONE_SHIELD`: 8411 +- `EL_SOLID_SKIN`: 8410 +- `EL_ZEPHYR`: 8409 +- `EL_WIND_CURTAIN`: 8408 +- `EL_WIND_STEP`: 8407 +- `EL_WATER_BARRIER`: 8406 +- `EL_WATER_DROP`: 8405 +- `EL_WATER_SCREEN`: 8404 +- `EL_FIRE_MANTLE`: 8403 +- `EL_FIRE_CLOAK`: 8402 +- `EL_CIRCLE_OF_FIRE`: 8401 +- `GD_DEVELOPMENT`: 10014 +- `GD_EMERGENCYCALL`: 10013 +- `GD_RESTORE`: 10012 +- `GD_REGENERATION`: 10011 +- `GD_BATTLEORDER`: 10010 +- `GD_HAWKEYES`: 10009 +- `GD_SOULCOLD`: 10008 +- `GD_GLORYWOUNDS`: 10007 +- `GD_LEADERSHIP`: 10006 +- `GD_GLORYGUILD`: 10005 +- `GD_EXTENSION`: 10004 +- `GD_GUARDUP`: 10003 +- `GD_GUARDRESEARCH`: 10002 +- `GD_KAFRACONTRACT`: 10001 +- `GD_APPROVAL`: 10000 ## Mobs (db/re/mob_db.txt) @@ -7741,6 +7764,7 @@ - `DUMMY_150`: 2411 - `DUMMY_10_FIRE`: 2413 - `RUNAWAY_BOOK`: 2414 +- `G_L_SHECIL`: 2431 - `MG_ZOMBIE`: 2464 - `MG_WRAITH`: 2465 - `MG_GHOUL`: 2466 @@ -8137,6 +8161,8 @@ - `XM_CELINE_KIMI`: 2996 - `GRIM_REAPER_ANKOU`: 3029 - `TIMEHOLDER`: 3074 +- `J_REB_SHECIL1`: 3169 +- `J_REB_SHECIL2`: 3170 - `E1_FELOCK`: 3181 - `MM_SARAH`: 3190 - `ORGANIC_JAKK`: 3202 @@ -12679,6 +12705,8 @@ - `Bag_Of_Selling_Goods`: 6682 - `Cash_Hair_Coupon`: 6707 - `Lovely_Stick`: 6712 +- `Steel_Article`: 6746 +- `Steel_Article_`: 6747 - `Corrupted_Charm`: 6755 - `ORGANIC_PUMPKIN`: 6804 - `INORGANIC_PUMPKIN`: 6805 @@ -14953,6 +14981,8 @@ - `Upg_Revolver`: 13115 - `Novice_Revolver`: 13116 - `TE_Woe_Pistol`: 13117 +- `Tiny_Flame`: 13118 +- `Freedom_Flame`: 13119 - `H_FEATHER_H_FIRE`: 13120 - `ALTAIR_ARES`: 13122 - `ALTAIR_ARES_`: 13124 @@ -15035,6 +15065,11 @@ - `Poison_Sphere_`: 13225 - `Blind_Sphere_`: 13226 - `Freezing_Sphere_`: 13227 +- `Flare_Bullet`: 13228 +- `Lightning_Bullet`: 13229 +- `Ice_Bullet`: 13230 +- `Poison_Bullet`: 13231 +- `Blind_Bullet`: 13232 - `Shuriken`: 13250 - `Nimbus_Shuriken`: 13251 - `Flash_Shuriken`: 13252 @@ -18756,6 +18791,7 @@ - `S_Genesis_Weapon`: 24581 - `S_Genesis_Pendant`: 24582 - `S_Genesis_Earing`: 24583 +- `Slug_Bullet`: 25187 - `BrokenArrow`: 25258 - `Shining_Spore`: 25265 - `Dried_Leaf_Of_Ygg`: 25266 diff --git a/doc/mob_db.txt b/doc/mob_db.txt index 53d345255..0280ae9c4 100644 --- a/doc/mob_db.txt +++ b/doc/mob_db.txt @@ -82,7 +82,7 @@ mob_db: ( HeadTopId: top headgear id (int, defaults to 0) HeadMidId: middle headgear id (int, defaults to 0) HeadLowId: lower headgear id (int, defaults to 0) - HairStyleId: hair style id (int, defaults to 0) + HairStyleId: hair style id (int, defaults to 1) BodyStyleId: clothes id (int, defaults to 0) HairColorId: hair color id (int, defaults to 0) BodyColorId: clothes color id (int, defaults to 0) @@ -193,7 +193,7 @@ Element: Monster's element. Sets element type and level. Mode: Monster AI behaviour. If this block is omitted, monster doesn't react to anything. All the settings in this group are boolean values, Default value is false (mode not set) for any missing setting. - See /doc/sample/mob_db_mode_list.txt for more information about monsters Mode types. + See /doc/mob_db_mode_list.md for more information about monsters Mode types. MoveSpeed: Monster's speed. Sets speed (cells/sec). MoveSpeed is calculated to Hercules with this formula: 1000 / SPEED (CELLS/SEC) @@ -278,3 +278,4 @@ DamageTakenRate: ViewData: Overrides the default view data sent to the client with the given values for: Sprite, Weapon, Shield, Robe, HeadTop, HeadMid, HeadLow, HairStyle, BodyStyle, HairColor, BodyColor, Gender, Options + Note: HairStyleId will only default to 1, if the ViewData block is defined. diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c1b318beb..cb0314ac5 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -324,11 +324,13 @@ The types that a trader object can have are the following: and need to be refurbished) - NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample) - NST_BARTER (4) Barter Shop (each item with own item currency) +- NST_EXPANDED_BARTER (5) Expanded Barter Shop (buy items and spend zeny and items) Unless otherwise specified via *tradertype an trader object will be defined as NST_ZENY. Note: NST_MARKET is only available with PACKETVER 20131223 or newer. -Note: NST_BARTER is only available with PACKETVER 20181226 zero or newer. +Note: NST_BARTER is only available with PACKETVER 20190116 main or 20190116 RE or 20181226 zero or newer. +Note: NST_EXPANDED_BARTER is only available with PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for more information regarding how to use this NPC type. @@ -1032,6 +1034,11 @@ will only execute once and will not execute if the map server reconnects to the char server later. Note that all those events will be executed upon scripts reloading. +OnNPCUnload: + +OnNPCUnload will be executed when a NPC is unloaded. +OnNPCUnload is called when @reloadscript, @reloadnpc, @unloadnpc or @unloadnpcfile is used. + OnAgitStart: OnAgitEnd: OnAgitInit: @@ -4378,7 +4385,7 @@ falcon and false if they don't. --------------------------------------- -*setmount({<flag>}) +*setmount({<flag>{, <type>}}) *checkmount() If <flag> is MOUNT_NONE this command will remove the mount from the @@ -4414,6 +4421,12 @@ The following flag values are accepted: Unlike 'setfalcon' and 'setcart' this will not work at all if they aren't of a class which can ride a mount. +For clients PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 +you can pass a <type> flag which specifies the madogear wanted. +The Available types: + MADO_ROBOT + MADO_SUITE + The accompanying function will return MOUNT_NONE if the invoking character is not on a mount, and a non-zero value (according to the above constants) if they are. @@ -5260,11 +5273,11 @@ bound to the target character as specified by the bound type. All items created in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in some cases cannot be traded or stored. -Valid bound types are: - 1 - Account Bound - 2 - Guild Bound - 3 - Party Bound - 4 - Character Bound +Valid item bound types are: + 1 - IBT_ACCOUNT - Account Bound + 2 - IBT_GUILD - Guild Bound + 3 - IBT_PARTY - Party Bound + 4 - IBT_CHARACTER - Character Bound --------------------------------------- @@ -5305,12 +5318,12 @@ If a bound type is not specified or a bound type of 0 is used, it will search th of any type, so long as the other parameters match. In all cases, this command will return the bound type of the item found, or 0 if the specified item was not found. -Valid bound types are: - 0 - All Bound types. - 1 - Account Bound - 2 - Guild Bound - 3 - Party Bound - 4 - Character Bound +Valid item bound types are: + 0 - IBT_ANY - Any Bound + 1 - IBT_ACCOUNT - Account Bound + 2 - IBT_GUILD - Guild Bound + 3 - IBT_PARTY - Party Bound + 4 - IBT_CHARACTER - Character Bound Optional Parameters: bound_type - checks to see if the item has the specified bound type. @@ -5328,7 +5341,7 @@ Example: close(); // This will also check if you have a bound (any type) 1205 (Cutter). - if (checkbound(Cutter, 0)) { + if (checkbound(Cutter, IBT_ANY)) { mes("You have a bound Cutter"); } else { mes("You do not have a bound Cutter"); @@ -5343,8 +5356,8 @@ Example: } close(); - // This will check if the item found, has a bound type of 2 (guild_bound) - if (checkbound(Cutter) == 2) { + // This will check if the item found, has a bound type of IBT_GUILD + if (checkbound(Cutter) == IBT_GUILD) { mes("You have a guild_bound Cutter"); } else { mes("You do not have a guild_bound Cutter."); @@ -5352,7 +5365,7 @@ Example: close(); // This will check if you have a 'guild_bound' +7 1205 (Cutter). - if (checkbound(Cutter, 2, 7)) { + if (checkbound(Cutter, IBT_GUILD, 7)) { mes("You have a +7 guild_bound Cutter."); } else { mes("You don't have the required item."); @@ -5638,21 +5651,38 @@ set with 'disable_items'. --------------------------------------- -*itemskill(<skill id>, <skill level>, {flag}) -*itemskill("<skill name>", <skill level>, {flag}) +*itemskill(<skill id>, <skill level>{, <flag>}) +*itemskill("<skill name>", <skill level>{, <flag>}) 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. -Flag is a optional param and, when present, the command will not check for -skill requirements. +Optional value <flag> is a bitmask to manipulate how the skill is casted. +Since <flag> is a bitmask, the flags can be summed up. +Possible flags are: + - 0x00 - ISF_NONE - Skill is casted as if has been used from skill tree. + (Same like <flag> was omitted.) + - 0x01 - ISF_IGNORECONDITIONS - Skill requirements are ignored and not consumed + - 0x02 - ISF_INSTANTCAST - Skill is casted instantaneously. + - 0x04 - ISF_CASTONSELF - Skill is forcefully casted on invoking character, + without showing the target selection cursor. + +Important: Items which use itemskill() should be of type IT_USABLE. + If the item type is IT_DELAYCONSUME and ISF_IGNORECONDITIONS is set, + the item won't be consumed when using the item! // When Anodyne is used, it will cast Endure, Level 1, as if the actual skill // has been used from skill tree. itemskill(SM_ENDURE, 1); +// Instantaneously cast Level 10 Increase Agility on invoking character, +// without checking/consuming skill requirements. + itemskill(AL_INCAGI, 10, ISF_IGNORECONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF); +// Instaed of using the constants, one could also do it like this: + itemskill(AL_INCAGI, 10, 7); + --------------------------------------- *itemeffect(<item id>) @@ -7070,6 +7100,18 @@ NPCs talking while hidden then revealing... you can wonder around =P). --------------------------------------- +*cloakonnpc("<NPC object name>"{, <account_id>}) +*cloakoffnpc("<NPC object name>"{, <account_id>}) + +These commands are used to apply the cloaking effect on npcs +this is a visual effect only and it does NOT stop the player +from interacting with the npc. + +If an account_id is specified then the effect will only display to the given id, +otherwise it's displayed to the entire npc area. + +--------------------------------------- + *doevent("<NPC object name>::<event label>") This command will start a new execution thread in a specified NPC object @@ -10321,6 +10363,7 @@ when the optional NPC_Name param is used. *sellitem(<Item_ID>{, <price>{, <qty>}}) *sellitem(<Item_ID>, <qty>, <currency_id>, <currency_amount>) +*sellitem(<Item_ID>, <zeny>, <qty>{, <currency_id1>, <currency_amount1>{, <currency_refine1>}{, ...}}) adds (or modifies) <Item_ID> data to the shop, when <price> is not provided (or when it is -1) itemdb default is used. @@ -10329,7 +10372,37 @@ qty is only necessary for NST_MARKET trader types. when <Item_ID> is already in the shop, the previous data (price/qty), is overwritten with the new. -currency_id and currency_amount can be used only with shop type NST_BARTER +currency_id and currency_amount can be used only with shop type NST_BARTER. +zeny, currency_id1, currency_amount1, currency_refine1, can be used only with +shop type NST_EXPANDED_BARTER. + +--------------------------------------- + +*startsellitem(<Item_ID>, <zeny>, <qty>) + +Starts adding item into expanded barter shop (NST_EXPANDED_BARTER). +Before this command possible to use commands *sellitemcurrency. +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. + +Alternative way for add item to expanded barter shop is *sellitem with +currency parameters. + +--------------------------------------- + +*sellitemcurrency(<Item_ID>, <qty>{, <refine>}) + +adds <Item_ID> as currency into expanded barter shop (NST_EXPANDED_BARTER) +If <refine> set to -1, mean for any refine level. +if <refine> missing used value -1. + +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. + +--------------------------------------- + +*endsellitem() + +Complete adding item into expanded barter shop (NST_EXPANDED_BARTER). +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. --------------------------------------- @@ -10620,6 +10693,14 @@ returns progress on success and false on failure --------------------------------------- +*achievement_iscompleted(<ach_id>{, <account_id>}) + +Checks whether the attached player have completed all the given achievement objectives. + +returns true if yes and false if no. + +--------------------------------------- + *itempreview(<index>) Update already opened preview window with item from diff --git a/npc/custom/expandedbartershop.txt b/npc/custom/expandedbartershop.txt new file mode 100644 index 000000000..5ba988ad9 --- /dev/null +++ b/npc/custom/expandedbartershop.txt @@ -0,0 +1,63 @@ +//===== Hercules Script ====================================== +//= Expanded barter shop demo +//===== By: ================================================== +//= 4144 +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= Expanded barter shop demo in prontera. +//============================================================ + +prontera,160,284,4 trader Expanded Barter Shop#prt 4_M_KID1,{ + end; +OnInit: + tradertype(NST_EXPANDED_BARTER); + + // Selling Orange_Potion with items price and 4 items price + startsellitem(Orange_Potion, 2, 100000); + sellitemcurrency(Banana, 2); + sellitemcurrency(Apple, 1); + sellitemcurrency(Carrot, 2); + sellitemcurrency(Sweet_Potato, 1); + endsellitem(); + + // sell item with price only in zeny + sellitem(White_Herb, 1, 100); + // sell item with zeny and item price + sellitem(Blue_Herb, 22, 200, Orange_Potion, 2, 3); + + // sell item with price only in zeny (infinite amount) + sellitem(Green_Herb, 3, -1); + + // sell item with zeny and two items price (1) + sellitem(Orange_Potion, 20, 100000, Banana, 2, -1, Berserk_Potion, 10, -1); + + // sell item with zeny and two items price (same as before but with different zeny price) + sellitem(Orange_Potion, 1, 100000, Banana, 2, -1, Berserk_Potion, 10, -1); + + // sell item with item price + sellitem(Blade, 0, 1000, Sword, 2, -1); + + // sell item with zeny and two items price + sellitem(Scimiter, 2000, -1, Sword, 1, 2, Sword, 1, 5); + + // sell item with zeny and two items price (selling another Orange_Potion) + sellitem(Orange_Potion, 1, 100000, Green_Herb, 2, -1); + + // modify selling Orange_Potion with items price (same as previous) + // modification reset amount stored in db + startsellitem(Orange_Potion, 1, 100); + sellitemcurrency(Green_Herb, 2); + endsellitem(); + + // sell item with zeny and item price (selling another White_Herb) + sellitem(White_Herb, 10, 100, Banana, 1, -1); + + // stop selling blades +// stopselling(Blade, 1); + + // sell item with zeny and two items price (modify amount for entry (1)) +// sellitem(Orange_Potion, 1, 200000, Banana, 2, -1, Berserk_Potion, 10, -1); + + end; +} diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt index e104d89b1..f0e128453 100644 --- a/npc/custom/itembind.txt +++ b/npc/custom/itembind.txt @@ -25,7 +25,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ } mes "What kind of bind?"; .@boundtype = 1 << (select("Account", "Guild", "Character")-1); - if(.@boundtype == 2 && (!getcharid(CHAR_ID_GUILD) || getguildinfo(GUILDINFO_MASTER_NAME, getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) { + if(.@boundtype == IBT_GUILD && (!getcharid(CHAR_ID_GUILD) || getguildinfo(GUILDINFO_MASTER_NAME, getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) { mes "In order for me to bind an item to a guild you must be the master of one."; close; } @@ -68,7 +68,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ mes "You don't have any bound items in your inventory. Not much I can do here."; close; } - countbound(2); + countbound(IBT_GUILD); if(.unbindprice) { mes "Unbinding an item has a fee of ^0000FF"+.unbindprice+"^000000 zeny."; if(Zeny < .unbindprice) { @@ -127,8 +127,8 @@ OnInit: .logbinds = 1; //Other stuff - .boundtypes$[1] = "account"; - .boundtypes$[2] = "guild"; - .boundtypes$[4] = "character"; + .boundtypes$[IBT_ACCOUNT] = "account"; + .boundtypes$[IBT_GUILD] = "guild"; + .boundtypes$[IBT_CHARACTER] = "character"; end; } diff --git a/npc/re/jobs/2e/rebellion.txt b/npc/re/jobs/2e/rebellion.txt new file mode 100644 index 000000000..53beb11f5 --- /dev/null +++ b/npc/re/jobs/2e/rebellion.txt @@ -0,0 +1,1035 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2020 Hercules Dev Team +//= Copyright (C) Dastgir +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= +//= Rebellion Job Quest +//================= Description =========================================== +//= Job change Quest from Gunslinger -> Rebellion +//================= Current Version ======================================= +//= 1.0 +//========================================================================= + +job_gun,1,1,1 script Administrator1 CLEAR_NPC,{ + callfunc("F_GM_NPC"); + mes("Please enter the password."); + .@success = callfunc("F_GM_NPC", 1854, 0); + if (.@sucess != 1) + close(); + + mes("[Time Administrator]"); + mes("What time would you like to return?"); + next(); + .@select = select("Cancel", "Test monster spawn", "Start from beginning", "Furnace Zone", "Shooting Zone", "Complete the test"); + if (.@select == 1) { + close(); + } else if (.@select == 2) { + donpcevent("#target::OnStart"); + donpcevent("#nontarget::OnStart"); + close(); + } else if (.@select == 4) { + .@questComplete = 12341; + } else if (.@select == 5) { + .@questComplete = 12342; + } else if (.@select == 6) { + .@questComplete = 12344; + } + for (.@i = 12340; .@i <= 12345; .@i++) { + erasequest(.@i); + if (.@i <= .@questComplete) { + setquest(.@i); + completequest(.@i); + } + } + close(); + +OnInit: + disablenpc(strnpcinfo(NPC_NAME)); + end; +} + +// Warps +job_gun,56,26,0 warp rebelroom#1 2,2,einbroch,49,97 +job_gun,18,10,0 warp rebelroom#2 2,2,job_gun,81,29 +job_gun,165,22,0 warp rebelroom#3 2,2,job_gun,196,35 +job_gun,197,49,0 warp rebelroom#4 2,2,job_gun,157,21 + +job_gun,88,144,0 warp shootingrange#1 3,3,job_gun,93,123 +job_gun,105,97,0 warp shootingrange#2 3,3,job_gun,125,98 +job_gun,156,115,0 warp shootingrange#3 3,3,job_gun,157,137 +job_gun,152,154,0 warp shootingrange#4 3,3,job_gun,135,154 +job_gun,130,146,0 warp shootingrange#5 3,3,job_gun,120,130 + +job_gun,165,18,1 script Furnace Controller#1 CLEAR_NPC,{ + if (Class != Job_Gunslinger) { + mes("Only authorized user can do the operation."); + close(); + } + if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL) { + mes("Not an authorized user. Abort the operation."); + close(); + } + if (questprogress(12342) != 1) { + mes("Not an authorized user. Abort the operation."); + close(); + } + mes("Do you want to dredge the mold up from the furnace?"); + next(); + if (select("Quit.", "Begin.") == 1) { + mes("Switch to the Standby mode."); + close(); + } + hideonnpc("Furnace Controller#1"); + donpcevent("Furnace Controller#2::OnStart"); + mes("Initializing Furnace Controller ZX-3100..."); + close(); + +OnInit: + hideoffnpc("Furnace Controller#1"); + end; +} + +job_gun,214,36,1 script Auto Anvil#1 CLEAR_NPC,{ + if (Class != Job_Gunslinger) { + mes("Only authorized user can do the operation."); + close(); + } + if (countitem(Tiny_Flame) > 0) { + mes("Unauthorized firearm creation has been detected. Report to Manager Elwin."); + close(); + } + if (checkweight(Tiny_Flame, 1) == 0) { + mes("You have too many items, please reduce them to continue."); + close(); + } + if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL || countitem(Steel_Article_) <= 4 || questprogress(12342) != 1) { + mes("Not an authorized user. Abort the operation."); + close(); + } + + mes("Do you want to use the auto anvil and shape the standard Steel Artifacts into a firearm?"); + next(); + if (select("Quit.", "Begin.") == 1) { + mes("For your safety, please step away from the auto anvil."); + close(); + } + if (rand(1, 10) > 6) { + specialeffect(EF_REPAIRWEAPON); + mes("You have successfully created a firearm using the auto anvil. ^ff0000Please report before your transformation expires^000000."); + delitem(Steel_Article_, 5); + getitem(Tiny_Flame, 1); + } else { + specialeffect(EF_SUI_EXPLOSION); + mes("Failed to create a firearm."); + delitem(Steel_Article_, 5); + } + close(); + +OnInit: + hideoffnpc("Auto Anvil#1"); + end; +} + +job_gun,165,18,1 script Furnace Controller#2 CLEAR_NPC,{ + mes("The system is busy dredging a completed mold from the furnace."); + close(); + +OnInit: + hideonnpc("Furnace Controller#2"); + end; + +OnStart: + hideoffnpc("Furnace Controller#2"); + sleep(3000); + mapannounce("job_gun", "Furnace Controller: Dredging a mold up from the furnace... Workers, stand by at the production line.", bc_map, "0x00ff44"); + sleep(500); + .@wh_start = 0; + while (true) { + if (.@wh_start >= 30) + break; + + .@eff_rnd = rand(1, 100); + if (.@eff_rnd < 33) { // 0 - 32 + donpcevent("Heating Furnace#3::OnStart"); + } else if (.@eff_rnd > 66) { // 67-100 + donpcevent("Heating Furnace#4::OnStart"); + } else { // 33-66 + donpcevent("Heating Furnace#5::OnStart"); + } + sleep(200); + makeitem(Steel_Article, 1, "job_gun", rand(127, 143), rand(26, 29)); + if (rand(1, 10) > 7) { + makeitem(Steel_Article_, 1, "job_gun", rand(127, 143), rand(26, 29)); + } + .@wh_start += 1; + sleep(500); + + } + sleep(2000); + mapannounce("job_gun", "Furnace Controller: Finishing the operation... Entering Standby mode in 15 seconds.", bc_map, "0x00ff44"); + sleep(15000); + hideonnpc("Furnace Controller#2"); + hideoffnpc("Furnace Controller#1"); + end; +} + +job_gun,130,31,1 script Heating Furnace#3 CLEAR_NPC,{ + end; + +OnStart: + specialeffect(EF_FIREPILLAR); + sleep(500); + specialeffect(EF_FIREPILLARBOMB); + end; +} + +job_gun,136,31,1 script Heating Furnace#4 CLEAR_NPC,{ + end; + +OnStart: + specialeffect(EF_FIREPILLAR); + sleep(500); + specialeffect(EF_FIREPILLARBOMB); + end; +} + +job_gun,141,31,1 script Heating Furnace#5 CLEAR_NPC,{ + end; + +OnStart: + specialeffect(EF_FIREPILLAR); + sleep(500); + specialeffect(EF_FIREPILLARBOMB); + end; +} + +function script F_summonTargetMonster { + .@monster_id = getarg(0); + .@max_mob_count = getarg(1); + .@monster_name$ = getarg(2); + .@event_name$ = getarg(3); + while(true) { + .@mob_dead_num = mobcount("job_gun", .@event_name$); + if (.@mob_dead_num >= .@max_mob_count) + break; + + switch(rand(1, 5)) { + case 1: + .@mobx = rand(88, 99); + .@moby = rand(143, 147); + break; + case 2: + .@mobx = rand(92, 96); + .@moby = rand(95, 122); + break; + case 3: + .@mobx = rand(143, 159); + .@moby = rand(99, 100); + break; + case 4: + .@mobx = rand(157, 158); + .@moby = rand(137, 160); + break; + case 5: + .@mobx = rand(119, 134); + .@moby = rand(156, 160); + break; + } + monster("job_gun", .@mobx, .@moby, .@monster_name$, .@monster_id, 1, .@event_name$); + } + return; +} + +job_gun,1,4,1 script #target CLEAR_NPC,{ + end; + +OnStart: + killmonster("job_gun", "#target::OnTargetDead"); + callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead"); + end; + +OnInit: + hideonnpc("#target"); + callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead"); + end; + +OnTargetDead: + hideonnpc("#target"); + callfunc("F_summonTargetMonster", J_REB_SHECIL1, 16, _("Standard-issue Target"), "#target::OnTargetDead"); + end; +} + +job_gun,1,5,1 script #nontarget CLEAR_NPC,{ + end; +OnStart: + killmonster("job_gun", "#nontarget::OnNonTargetDead"); + hideonnpc("#nontarget"); + callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead"); + end; + +OnInit: + hideonnpc("#nontarget"); + callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead"); + end; + +OnNonTargetDead: + hideonnpc("#nontarget"); + callfunc("F_summonTargetMonster", J_REB_SHECIL2, 56, _("Defective Target"), "#nontarget::OnNonTargetDead"); + end; +} + +moc_fild12,261,318,3 script Suspicious Man 4_M_MOCASS2,2,2,{ + end; +OnTouch: + if (Class != Job_Gunslinger || BaseLevel < 99 || JobLevel < 70) + end; + if (questprogress(12340) < 1) { + mes("[Suspicious Man]"); + mes("Finally I've found you, Vagabond Spike! Your neck is mine!"); + next(); + select("Say what?"); + + mes("[Suspicious Man]"); + mes("*Snort* Don't pretend like you don't know. Look at this poster! You're in it!"); + next(); + select("I see the resemblance, but that's not me."); + + mesf("[%s]", strcharinfo(PC_NAME)); + mes("Forget the resemblance. Where did you get that poster? I've never committed a crime."); + next(); + mes("[Suspicious Man]"); + mes("I knew you'd try to lie your way out."); + next(); + mes("[Suspicious Man]"); + mes("The ^0000ffEinbroch Private Pub^000000 has released that wanted poster. You have many bounty hunters like me on your heels."); + next(); + mes("[Suspicious Man]"); + mes("I don't care if you're the right one so long as you look it and I can take you dead or alive."); + next(); + } else { + mes("[Suspicious Man]"); + mes("It's you again! You've got guts to come back here!"); + next(); + } + switch (select("Make a run for it.", "Fight him.")) { + case 1: + mes("^0000ffI should run for now and think about this later.^000000"); + close2(); + break; + case 2: + mes("^0000ffHe's not the only bounty hunter after me, if he's telling the truth. I need time to strategize.^000000"); + close2(); + break; + } + setquest(12340); + warp("moc_fild12", 186, 83); + end; +} + +einbroch,54,97,3 script Bouncer 4_M_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Bouncer]"); + mes("No loitering around the venue."); + close(); + } + if (questprogress(12340) < 1) { + mes("[Bouncer]"); + mes("Under construction, can't get in."); + close(); + } else if (questprogress(12340) == 1) { + mes("[Bouncer]"); + mes("*Gasp* You! I thought you were already captured. Ooh, doesn't matter now. You're my Get Out of Jail Free card!"); + next(); + select("I'm not the criminal you think I am!"); + mes("[Bouncer]"); + mes("You aren't?"); + next(); + mes("^0000ffThe bouncer examines your face.^000000"); + next(); + mes("[Bouncer]"); + mes("Hm, you bear a striking resemblance, though you don't look not as menacing as that criminal Spike"); + next(); + select("I want to talk to the poster publisher."); + mes("[Bouncer]"); + mes("Your problem is a bit out of my league. Get in. If I find out you're the real deal all along, I'll see that you'll never see the outside again."); + close2(); + warp("job_gun", 81, 29); + } else if (questprogress(12340) > 1) { + mes("[Bouncer]"); + mes("You're back. Why?"); + next(); + if (select("I want in.", "I was passing by.") == 2) { + mes("[Bouncer]"); + mes("You're silly."); + close(); + } + mes("[Bouncer]"); + mes("Go ahead. Stay out of trouble."); + close2(); + warp("job_gun", 70, 28); + } + end; +} + +job_gun,68,33,3 script Ruthless Rebellion 4_F_REBELLION,2,2,{ + mes("[Ruthless Rebellion]"); + mes("Do you know how to use a gun?"); + close(); +} + +job_gun,78,33,6 script Suspicious Gunslinger 4_M_JOB_BLACKSMITH,2,2,{ + mes("[Suspicious Gunslinger]"); + mes("... "); + next(); + mes("[Quiet Gunslinger]"); + mes("Don't say I look like a blacksmith you know."); + close(); +} + +job_gun,74,24,6 script Drunken Man 4_M_LIEMAN,2,2,{ + mes("[Drunken Man]"); + mes("*Hiccups* Oh, I'm the owner here."); + mes("Oh wait, am I in the pub or someplace else? Zzz..."); + close(); +} + +job_gun,64,33,6 script Anxious Man 4_M_ALCHE_A,2,2,{ + mes("[Anxious Man]"); + mes("Maybe I'm in the wrong place. This place doesn't look like a pub."); + close(); +} + +job_gun,86,29,3 script Kulbertinov 4_M_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Kulbertinov]"); + mes("Are you looking for me?"); + close(); + } + if (questprogress(12340) < 1) { + mes("[Kulbertinov]"); + mes("Can I help you?"); + close(); + } else if (questprogress(12340) == 1) { + mes("[Kulbertinov]"); + mes("What do you want?"); + next(); + select("I'm mistaken for a criminal!"); + mes("[Kulbertinov]"); + mes("Wait a minute... Mwah hah hah!"); + next(); + mes("^0000ffHe scans your face, then guffaws.^000000"); + next(); + mes("[Kulbertinov]"); + mes("I'm sorry. For a moment, I thought Spike came back to life. He was found dead three days ago."); + next(); + select("He was captured already?"); + mes("[Kulbertinov]"); + mes("Yes, and the bounty hunter was already paid. The news hasn't spread, and you're the spitting image of him. Go figure."); + next(); + select("You have to do something!"); + mes("[Kulbertinov]"); + mes("I'm sorry, but I can't talk to every single bounty hunter for you. Of course, I'm willing to compensate for your inconvenience."); + next(); + mes("[Kulbertinov]"); + mes("Hey, how about you join our ranks? At the very last, you won't get shot."); + next(); + select("You want me become a bounty hunter?"); + mes("[Kulbertinov]"); + mes("No, bounty hunting is just a pastime. We're the experts of all the firearms in the world."); + next(); + mes("[Kulbertinov]"); + mes("Carefree spirits!"); + mes("Magical spitfires!"); + mes("We call ourselves the ^0000ffRebellion^000000."); + next(); + mes("[Kulbertinov]"); + mes("You look like you know how to use a gun. How'd you like to join our ranks? You won't have to worry about other bounty hunters anymore too."); + next(); + switch (select("Let me think it over.", "I don't think I have a choice.")) { + case 1: + mes("[Kulbertinov]"); + mes("You can think it over and over, but the answer won't change. Just take the offer."); + break; + case 2: + mes("[Kulbertinov]"); + mes("Good thinking. Might as well do it now and get it over with."); + break; + } + next(); + mes("[Kulbertinov]"); + mes("Talk to Enwin Conick. She guides drifting spirits like you to the way of the Rebellion. I'll send word to her. Ah, and don't point your gun at her."); + setquest(12341); + completequest(12340); + } else if (questprogress(12340) > 1) { + mes("[Kulbertinov]"); + mes("Do you have business with Elwin Conick?"); + next(); + if (select("No.", "Send me to Elwin Conick.") == 1) { + mes("[Kulbertinov]"); + mes("All right. Care for a shot of vodka?"); + close(); + } + mes("[Kulbertinov]"); + mes("Okay, I'll let her know."); + } + close2(); + warp("job_gun", 19, 15); + end; +} + +job_gun,19,24,3 script Elwin Conick#1 4_F_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Elwin Conick]"); + mes("If you don't want to join Rebellions, just get out."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (questprogress(12341) == 1) { + mes("[Elwin Conick]"); + mes("Do you to join us Rebellions?"); + next(); + mes("^0000ffThe short woman with keen eyes stares into your eyes.^000000"); + next(); + mes("[Elwin Conick]"); + mes("Sign here."); + next(); + mes("^0000ffThe undersigned party [_____] will not speak of the test even if he or she suffers injury, mutilation, or death in an unforeseen accident that may occur during the test.^000000"); + next(); + select("WHAT?!"); + mes("[Elwin Conick]"); + mes("Do you want join us or not?"); + next(); + if (select("I give up.", "...I'll sign.") == 1) { + mes("[Elwin Conick]"); + mes("Your choice."); + close2(); + warp("job_gun", 81, 29); + end; + } + mes("[Elwin Conick]"); + mes("Good. Now, follow me."); + close2(); + warp("job_gun", 117, 41); + end; + } + if (questprogress(12342) == 1) { + mes("[Elwin Conick]"); + mes("Do you want to try again?"); + next(); + if (select("I give up.", "Do it.") == 1) { + mes("[Elwin Conick]"); + mes("Your choice."); + close2(); + warp("job_gun", 81, 29); + end; + } + mes("[Elwin Conick]"); + mes("Follow me."); + close2(); + warp("job_gun", 117, 41); + end; + } + if (questprogress(12343) == 1) { + mes("[Elwin Conick]"); + mes("You still have Ivan's shooting test, do you want to try again?"); + next(); + if (select("I give up.", "Do it.") == 1) { + mes("[Elwin Conick]"); + mes("It's not worth to give up, now go out and relax."); + close2(); + warp("job_gun", 81, 29); + end; + } + mes("[Elwin Conick]"); + mes("Remember to give your best."); + close2(); + warp("job_gun", 120, 130); + end; + } + if (questprogress(12343) > 1) { + mes("[Elwin Conick]"); + mes("Ivan's shooting test have not finished yet, do you want to try again?"); + next(); + if (select("I give up.", "Do it.") == 1) { + mes("[Elwin Conick]"); + mes("It's not worth to give up, now go out and relax."); + close2(); + warp("job_gun", 81, 29); + end; + } + mes("[Elwin Conick]"); + mes("Remember to give your best."); + close2(); + warp("job_gun", 120, 130); + end; + } + if (questprogress(12345) == 1) { + mes("[Elwin Conick]"); + mes("Ivan is waiting for you, go find him."); + close2(); + warp("job_gun", 120, 130); + end; + } + mes("[Elwin Conick]"); + mes("You have no more test to take. Why don't you go out and have a drink?"); + close2(); + warp("job_gun", 81, 29); + end; +} + +job_gun,117,46,3 script Elwin Conick#2 4_F_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Elwin Conick]"); + mes("If you don't want to join Rebellions, just get out."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (getstatus(SC_MONSTER_TRANSFORM, 1) == G_L_SHECIL) { + mes("^0000ffYou are already in the test form. If you have finished all your tests, report to Elwin Conick in the Assembly Room^000000."); + close(); + } else if (getstatus(SC_MONSTER_TRANSFORM, 1) > 1) { + mes("[Elwin Conick]"); + mes("Look at yourself, do you really want to test?"); + next(); + mes("^0000ffElwin see you turn into another form and she is very angry. Wait for your current form ends, and then find her again.^000000"); + next(); + if (select("Wait.", "Go away.") == 1) { + mes("[Elwin Conick]"); + mes("It's not worth to give up, now go out and relax.."); + close(); + } + mes("[Elwin Conick]"); + mes("Come back when you aren't in any form."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (questprogress(12341) == 1) { + .@st_job1 = countitem(Steel_Article); + .@st_job2 = countitem(Steel_Article_); + if (.@st_job1 > 0) { + delitem(Steel_Article, .@st_job1); + mes("[Elwin Conick]"); + mes("Any leftover Steel Artifacts must be returned after the test."); + close(); + } + if (.@st_job2 > 0) { + delitem(Steel_Article_, .@st_job2); + mes("[Elwin Conick]"); + mes("Any leftover Steel Artifacts must be returned after the test."); + close(); + } + if (countitem(Tiny_Flame) > 0) { + delitem(Tiny_Flame, 1); + mes("[Elwin Conick]"); + mes("Time over. You failed the test. Let me take all your leftover test materials."); + close(); + } + setquest(12342); + completequest(12341); + .@showDialog = true; + } else if (questprogress(12342) == 1) { + .@st_job1 = countitem(Steel_Article); + .@st_job2 = countitem(Steel_Article_); + if (.@st_job1 > 0) { + delitem(Steel_Article, .@st_job1); + mes("[Elwin Conick]"); + mes("Any leftover Steel Artifacts must be returned after the test."); + close(); + } + if (.@st_job2 > 0) { + delitem(Steel_Article_, .@st_job2); + mes("[Elwin Conick]"); + mes("Time over. You failed the test. Let me take all your leftover test materials."); + close(); + } + if (countitem(Tiny_Flame) > 0) { + delitem(Tiny_Flame, 1); + mes("[Elwin Conick]"); + mes("Time over. You failed the test. Let me take all your leftover test materials."); + close2(); + end; + } + .@showDialog = true; + } + if (.@showDialog) { + mes("[Elwin Conick]"); + mes("Listen up. I'm not going to great lengths trying to explain the test to you."); + next(); + select("Okay."); + mes("[Elwin Conick]"); + mes("This is where the firearm molds are cast. Everywhere you can see Steel Artifacts are being produced."); + next(); + mes("[Elwin Conick]"); + mes("You'll be asked to control switches on the machine and select 5 standard Steel Artifacts."); + next(); + mes("[Elwin Conick]"); + mes("You'll then take them to the next Assembly Room and assemble them into a complete firearm. You'll be given 3 minutes to finish all that. ^0000ffTo check the elapsed time, you'll be transformed into a different job^000000."); + next(); + mes("[Elwin Conick]"); + mes("I'll be in the next room, waiting for you to bring me a complete firearm. Remember, ^0000ffyou fail the test when your transformation expires after 3 minutes^000000."); + montransform(G_L_SHECIL, 180000); + close(); + } + mes("[Elwin Conick]"); + mes("Ah? Are you lost? You need to register first and then get back here."); + close2(); + warp("job_gun", 81, 29); + end; +} + +job_gun,198,39,3 script Elwin Conick#3 4_F_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Elwin Conick]"); + mes("If you don't want to join Rebellions, just get out."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (questprogress(12342) != 1) { + mes("[Elwin Conick]"); + mes("Ah? Are you lost? You need to register first and then get back here."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (getstatus(SC_MONSTER_TRANSFORM, 1) == G_L_SHECIL) { + if (countitem(Tiny_Flame) == 0) { + mes("[Elwin Conick]"); + mes("Are you done? I don't see any completed firearm in your inventory."); + close(); + } + delitem(Tiny_Flame, 1); + mes("[Elwin Conick]"); + mes("It's shoddy but not bad, given the time. You passed."); + next(); + mes("[Elwin Conick]"); + mes("Let me take all your leftover test materials."); + .@st_job1 = countitem(Steel_Article); + .@st_job2 = countitem(Steel_Article_); + if (.@st_job1 > 0) { + delitem(Steel_Article, .@st_job1); + } + if (.@st_job2 > 0) { + delitem(Steel_Article_, .@st_job2); + } + next(); + mes("[Elwin Conick]"); + mes("Now you can move on to the next course. Ivan Sidorenko will oversee your test."); + completequest(12342); + close2(); + warp("job_gun", 120, 133); + end; + + } else if (getstatus(SC_MONSTER_TRANSFORM, 1) > 1) { + mes("[Elwin Conick]"); + mes("Look at yourself, do you really want to test?"); + next(); + mes("^0000ffElwin see you turn into another form and she is very angry. Wait for your current form ends, and then find her again.^000000"); + next(); + if (select("Wait.", "Go away.") == 1) { + mes("[Elwin Conick]"); + mes("It's not worth to give up, now go out and relax.."); + close(); + } + mes("[Elwin Conick]"); + mes("Come back when you aren't in any form."); + close2(); + warp("job_gun", 81, 29); + end; + } else { + mes("[Elwin Conick]"); + mes("Time over. You failed the test. Let me take all your leftover test materials."); + .@st_job1 = countitem(Steel_Article); + .@st_job2 = countitem(Steel_Article_); + if (.@st_job1 > 0) { + delitem(Steel_Article, .@st_job1); + } + if (.@st_job2 > 0) { + delitem(Steel_Article_, .@st_job2); + } + if (countitem(Tiny_Flame) > 0) { + delitem(Tiny_Flame, 1); + } + next(); + mes("[Elwin Conick]"); + mes("Let's start again."); + close2(); + warp("job_gun", 117, 41); + end; + } + end; +} + +job_gun,120,138,3 script Ivan Sidorenko#1 4_M_REBELLION,2,2,{ + if (Class != Job_Gunslinger) { + mes("[Ivan Sidorenko]"); + mes("This is shooting test area, you can't come here as you like."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (questprogress(12342) < 2) { + mes("[Ivan Sidorenko]"); + mes("There seems to be a mistake, you can't stay here."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (questprogress(12343) < 1) { + mes("[Ivan Sidorenko]"); + mes("Hey, stay focused--we're using live ammo here, and you can get shot anytime."); + next(); + mes("[Ivan Sidorenko]"); + mes("Let me make this quick. Basically you'll be running in this shooting range consisting of 5 sections."); + next(); + mes("[Ivan Sidorenko]"); + mes("The objective is to find enemies in the midst of a crowd quickly and without fail."); + next(); + mes("[Ivan Sidorenko]"); + mes("Among all the targets, you must shoot only the ^0000ffStandard-issue Targets^000000. If you make a mistake, you'll lose points."); + next(); + mes("[Ivan Sidorenko]"); + mes("Let's try. There aren't many ^0000ffStandard-issue Targets^000000, so keep your eyes peeled."); + next(); + mes("[Ivan Sidorenko]"); + mes("^0000ffYou have 3 minutes to finish this test. If you can't finish before your transformation expires^000000, you'll fail. If that happens, just follow the path back to me."); + next(); + mes("[Ivan Sidorenko]"); + mes("^0000ffYou'll fail if you miss a Standard-issue Target, or shoot 3 incorrect targets^000000. Let's get started."); + setquest(12343); + setquest(12344); + montransform(G_L_SHECIL, 180000); + close2(); + warp("job_gun", 102, 146); + end; + } else if (questprogress(12343) == 1) { + .@standard_target = 0; + .@failed_target = 0; + .@total_target = 0; + if (questprogress(12343, HUNTING) == 2) { + .@standard_target = 10; + } + if (questprogress(12344, HUNTING) == 2) { + .@failed_target = 2; + } + if (getstatus(SC_MONSTER_TRANSFORM, 1) != G_L_SHECIL) { + .@total_target = 5; + } + .@target_count = .@standard_target - (.@failed_target + .@total_target); // + if (.@target_count > 9) { // Killed 10 Standard, 0 Failed + completequest(12343); + completequest(12344); + setquest(12345); + mes("[Ivan Sidorenko]"); + mes("Good job. I didn't think you could pass so quickly."); + next(); + mes("[Ivan Sidorenko]"); + mes("You may leave and wait outside. I'll bring other instructors' evaluation reports to see you."); + close2(); + warp("job_gun", 210, 132); + end; + } else if (.@target_count == 8) { // Killed 10 Standard, 3 failed + erasequest(12343); + erasequest(12344); + mes("[Ivan Sidorenko]"); + mes("You're quick enough, but you shot too many incorrect targets. You failed."); + next(); + } else if (.@target_count == 5) { // Timeout + erasequest(12343); + erasequest(12344); + mes("[Ivan Sidorenko]"); + mes("You accurate enough, but you took too much time. Slow Rebellions don't survive long enough."); + next(); + } else if (.@target_count < 5) { // Timeout and failed targets + erasequest(12343); + erasequest(12344); + mes("[Ivan Sidorenko]"); + mes("You failed at both speed and accuracy. How did you survive this long?"); + next(); + } else { + erasequest(12343); + erasequest(12344); + mes("[Ivan Sidorenko]"); + mes("There's a problem, the statistic seems to be wrong. Well... This can happen sometimes."); + next(); + } + mes("[Ivan Sidorenko]"); + mes("Let's try again. Be more careful this time."); + setquest(12343); + setquest(12344); + montransform(G_L_SHECIL, 180000); + close2(); + warp("job_gun", 102, 146); + end; + } else { + mes("[Ivan Sidorenko]"); + mes("How did you not leave?"); + next(); + mes("[Ivan Sidorenko]"); + mes("You may leave and wait outside. I'll bring other instructors' evaluation reports to see you."); + close2(); + warp("job_gun", 210, 132); + end; + } + end; +} + +job_gun,220,132,3 script Ivan Sidorenko#2 4_M_REBELLION,2,2,{ + .@now_weight = MaxWeight - Weight; + if (checkweight(Knife, 1) == 0) { + mes("You have too many items, please reduce them to continue."); + close(); + } + if (.@now_weight < 1000) { + mes("The items in your inventory are weighing you down. Lighten your weight first."); + close(); + } + if (questprogress(12345) != 1) { + mes("[Ivan Sidorenko]"); + mes("There must have been a mistake. You aren't supposed to remain here."); + close2(); + warp("job_gun", 81, 29); + end; + } + if (Class == Job_Gunslinger) { + if (BaseLevel < 99 || JobLevel < 70) { + mes("[Ivan Sidorenko]"); + mes("Huh? You look so weak? I have nothing more to say."); + close(); + } + if (SkillPoint != 0) { + mes("[Ivan Sidorenko]"); + mes("Oh no~ You still have Skill Points."); + close(); + } + mes("[Ivan Sidorenko]"); + mes("Kulbertinov, Elwin, and I've evaluated your Rebellion test results."); + next(); + mes("[Ivan Sidorenko]"); + mes("And..."); + next(); + mes("[Ivan Sidorenko]"); + mes("You've met all our requirements including the attitude and the test performance."); + next(); + mes("[Ivan Sidorenko]"); + mes("That's right, you're now a member of the Rebellion. Get ready to be wowed."); + next(); + jobchange(Job_Rebellion); + completequest(12345); + mes("[Ivan Sidorenko]"); + mes("And Elwin wants you to have this. Take good care of it. He made it for you."); + getitem(Freedom_Flame, 1); + next(); + mes("[Ivan Sidorenko]"); + mes("See you later."); + close2(); + warp("job_gun", 81, 29); + end; + } else if (Class == Job_Rebellion) { + mes("[Ivan Sidorenko]"); + mes("This life should be fun, not boring."); + next(); + mes("[Ivan Sidorenko]"); + mes("And by becoming a Rebellion your life should be upgraded. So, go and create a great journey, make us proud!"); + close(); + } else { + mes("[Ivan Sidorenko]"); + mes("Do you have something to say to me, don't you?"); + close(); + } +} + +job_gun,220,138,4 trader Prop Vending Machine 2_VENDING_MACHINE1,{ + end; +OnInit: + sellitem(Slug_Bullet_1); + sellitem(Slug_Bullet_2); + sellitem(Slug_Bullet_3); + sellitem(Slug_Bullet_4); + sellitem(Slug_Bullet_5); + sellitem(Fullmetal_Jacket_Bullet); + sellitem(Mine_Projectile); + sellitem(Dragon_Tail_Missile); + end; +} + +job_gun,216,138,4 script Butler Karlex 1_M_01,{ + mes("[Butler Karlex]"); + mes("Use this temporary storage to keep your items safe while on the Advancement test."); + next(); + .@select = select("Cancel", "Open the storage."); + mes("[Butler Karlex]"); + mes("Thank you for using the service."); + close2(); + if (.@select == 2) { + openstorage(); + } + end; +} + +prontera,92,209,4 trader Rebellion Weapons 2_VENDING_MACHINE1,{ + end; +OnInit: + sellitem(H_FEATHER_H_FIRE); + sellitem(ALTAIR_ARES); + sellitem(COLORSCOPE); + sellitem(RAG203); + sellitem(DEATHFIRE); + sellitem(R_THUNDER); + sellitem(P_BREAKER); + sellitem(MINIMAY); + sellitem(TEMPEST); + sellitem(END_OF_HORIZON); + sellitem(Southern_Cross_R); + end; +} + +prontera,96,209,4 trader Rebellion Accessories 2_VENDING_MACHINE1,{ + end; +OnInit: + sellitem(Slug_Bullet); + sellitem(Fullmetal_Jacket_Bullet); + sellitem(Mine_Projectile); + sellitem(Dragon_Tail_Missile); + sellitem(Special_Alloy_Trap); + sellitem(Bullet); + sellitem(Silver_Bullet_); + sellitem(Shell_Of_Blood_); + sellitem(AP_Ammo); + sellitem(Blaze_Bullet); + sellitem(Freezing_Bullet); + sellitem(Electric_Shock_Bullet); + sellitem(Magical_Stone_Bullet); + sellitem(Sanctified_Bullet); + sellitem(Flare_Bullet); + sellitem(Lightning_Bullet); + sellitem(Poison_Bullet); + sellitem(Blind_Bullet); + sellitem(Ice_Bullet); + end; +} diff --git a/npc/re/other/achievement_treasures.txt b/npc/re/other/achievement_treasures.txt new file mode 100644 index 000000000..38fb69d77 --- /dev/null +++ b/npc/re/other/achievement_treasures.txt @@ -0,0 +1,342 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2020 Hercules Dev Team +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= +// Exploration Achievements +//========================================================================= + +- script achievement_tr FAKE_NPC,{ + sscanf(strnpcinfo(NPC_NAME_HIDDEN), "tr%d", .@id); + if (!achievement_iscompleted(.@id)) + achievement_progress(.@id, 1, 1, true); + end; +OnInit: + cloakonnpc(strnpcinfo(NPC_NAME)); + end; +} + +- script achievement_wp FAKE_NPC,{ +OnTouch: + sscanf(strnpcinfo(NPC_NAME_HIDDEN), "wp%d", .@id); + if (!achievement_iscompleted(.@id)) + cloakoffnpc(sprintf("#tr%d", .@id), playerattached()); + end; +} + +// Treasure Chests +prt_fild01,146,126,4 duplicate(achievement_tr) #tr120001 4_TREASURE_BOX +prt_fild02,142,221,4 duplicate(achievement_tr) #tr120002 4_TREASURE_BOX +prt_fild03,172,139,4 duplicate(achievement_tr) #tr120003 4_TREASURE_BOX +prt_fild04,118,57,4 duplicate(achievement_tr) #tr120004 4_TREASURE_BOX +prt_fild05,189,291,4 duplicate(achievement_tr) #tr120005 4_TREASURE_BOX +prt_fild06,298,304,4 duplicate(achievement_tr) #tr120006 4_TREASURE_BOX +prt_fild07,44,104,4 duplicate(achievement_tr) #tr120007 4_TREASURE_BOX +prt_fild08,203,222,4 duplicate(achievement_tr) #tr120008 4_TREASURE_BOX +prt_fild09,37,354,4 duplicate(achievement_tr) #tr120009 4_TREASURE_BOX +prt_fild10,177,206,4 duplicate(achievement_tr) #tr120010 4_TREASURE_BOX +gef_fild00,73,119,4 duplicate(achievement_tr) #tr120011 4_TREASURE_BOX +gef_fild01,222,224,4 duplicate(achievement_tr) #tr120012 4_TREASURE_BOX +gef_fild05,202,292,4 duplicate(achievement_tr) #tr120013 4_TREASURE_BOX +gef_fild06,279,105,4 duplicate(achievement_tr) #tr120014 4_TREASURE_BOX +gef_fild07,184,249,4 duplicate(achievement_tr) #tr120015 4_TREASURE_BOX +gef_fild09,170,73,4 duplicate(achievement_tr) #tr120016 4_TREASURE_BOX +gef_fild11,239,248,4 duplicate(achievement_tr) #tr120017 4_TREASURE_BOX +moc_fild11,188,218,4 duplicate(achievement_tr) #tr120018 4_TREASURE_BOX +moc_fild12,234,96,4 duplicate(achievement_tr) #tr120019 4_TREASURE_BOX +moc_fild13,290,207,4 duplicate(achievement_tr) #tr120020 4_TREASURE_BOX +moc_fild16,196,108,4 duplicate(achievement_tr) #tr120021 4_TREASURE_BOX +moc_fild17,269,105,4 duplicate(achievement_tr) #tr120022 4_TREASURE_BOX +moc_fild18,54,284,4 duplicate(achievement_tr) #tr120023 4_TREASURE_BOX +pay_fild01,167,243,4 duplicate(achievement_tr) #tr120024 4_TREASURE_BOX +pay_fild02,105,240,4 duplicate(achievement_tr) #tr120025 4_TREASURE_BOX +pay_fild03,144,97,4 duplicate(achievement_tr) #tr120026 4_TREASURE_BOX +pay_fild04,257,95,4 duplicate(achievement_tr) #tr120027 4_TREASURE_BOX +pay_fild07,365,37,4 duplicate(achievement_tr) #tr120028 4_TREASURE_BOX +pay_fild08,237,345,4 duplicate(achievement_tr) #tr120029 4_TREASURE_BOX +pay_fild09,251,42,4 duplicate(achievement_tr) #tr120030 4_TREASURE_BOX +pay_fild10,196,38,4 duplicate(achievement_tr) #tr120031 4_TREASURE_BOX +mjolnir_01,47,60,4 duplicate(achievement_tr) #tr120032 4_TREASURE_BOX +mjolnir_02,77,49,4 duplicate(achievement_tr) #tr120033 4_TREASURE_BOX +mjolnir_03,190,200,4 duplicate(achievement_tr) #tr120034 4_TREASURE_BOX +mjolnir_04,201,146,4 duplicate(achievement_tr) #tr120035 4_TREASURE_BOX +mjolnir_05,43,327,4 duplicate(achievement_tr) #tr120036 4_TREASURE_BOX +mjolnir_06,162,290,4 duplicate(achievement_tr) #tr120037 4_TREASURE_BOX +mjolnir_07,321,127,4 duplicate(achievement_tr) #tr120038 4_TREASURE_BOX +mjolnir_08,175,225,4 duplicate(achievement_tr) #tr120039 4_TREASURE_BOX +mjolnir_09,299,123,4 duplicate(achievement_tr) #tr120040 4_TREASURE_BOX +mjolnir_10,353,371,4 duplicate(achievement_tr) #tr120041 4_TREASURE_BOX +mjolnir_11,325,178,4 duplicate(achievement_tr) #tr120042 4_TREASURE_BOX +mjolnir_12,110,298,4 duplicate(achievement_tr) #tr120043 4_TREASURE_BOX +cmd_fild01,112,200,4 duplicate(achievement_tr) #tr120044 4_TREASURE_BOX +cmd_fild02,86,94,4 duplicate(achievement_tr) #tr120045 4_TREASURE_BOX +cmd_fild03,144,190,4 duplicate(achievement_tr) #tr120046 4_TREASURE_BOX +cmd_fild04,151,191,4 duplicate(achievement_tr) #tr120047 4_TREASURE_BOX +cmd_fild06,221,108,4 duplicate(achievement_tr) #tr120048 4_TREASURE_BOX +cmd_fild07,269,322,4 duplicate(achievement_tr) #tr120049 4_TREASURE_BOX +cmd_fild08,181,136,4 duplicate(achievement_tr) #tr120050 4_TREASURE_BOX +cmd_fild09,211,266,4 duplicate(achievement_tr) #tr120051 4_TREASURE_BOX +yuno_fild01,284,138,4 duplicate(achievement_tr) #tr120052 4_TREASURE_BOX +yuno_fild12,76,268,4 duplicate(achievement_tr) #tr120053 4_TREASURE_BOX +yuno_fild02,142,191,4 duplicate(achievement_tr) #tr120054 4_TREASURE_BOX +yuno_fild03,135,329,4 duplicate(achievement_tr) #tr120055 4_TREASURE_BOX +yuno_fild04,35,369,4 duplicate(achievement_tr) #tr120056 4_TREASURE_BOX +yuno_fild06,262,220,4 duplicate(achievement_tr) #tr120057 4_TREASURE_BOX +yuno_fild07,113,339,4 duplicate(achievement_tr) #tr120058 4_TREASURE_BOX +yuno_fild08,179,209,4 duplicate(achievement_tr) #tr120059 4_TREASURE_BOX +yuno_fild09,166,228,4 duplicate(achievement_tr) #tr120060 4_TREASURE_BOX +yuno_fild11,141,357,4 duplicate(achievement_tr) #tr120061 4_TREASURE_BOX +hu_fild01,347,312,4 duplicate(achievement_tr) #tr120062 4_TREASURE_BOX +hu_fild02,80,152,4 duplicate(achievement_tr) #tr120063 4_TREASURE_BOX +hu_fild04,322,313,4 duplicate(achievement_tr) #tr120064 4_TREASURE_BOX +hu_fild06,204,228,4 duplicate(achievement_tr) #tr120065 4_TREASURE_BOX +hu_fild05,197,210,4 duplicate(achievement_tr) #tr120066 4_TREASURE_BOX +ein_fild01,266,277,4 duplicate(achievement_tr) #tr120067 4_TREASURE_BOX +ein_fild03,99,332,4 duplicate(achievement_tr) #tr120068 4_TREASURE_BOX +ein_fild04,334,305,4 duplicate(achievement_tr) #tr120069 4_TREASURE_BOX +ein_fild05,337,233,4 duplicate(achievement_tr) #tr120070 4_TREASURE_BOX +ein_fild06,174,245,4 duplicate(achievement_tr) #tr120071 4_TREASURE_BOX +ein_fild07,188,50,4 duplicate(achievement_tr) #tr120072 4_TREASURE_BOX +ein_fild08,258,78,4 duplicate(achievement_tr) #tr120073 4_TREASURE_BOX +ein_fild09,330,76,4 duplicate(achievement_tr) #tr120074 4_TREASURE_BOX +lhz_fild01,118,73,4 duplicate(achievement_tr) #tr120075 4_TREASURE_BOX +lhz_fild02,239,243,4 duplicate(achievement_tr) #tr120076 4_TREASURE_BOX +lhz_fild03,313,132,4 duplicate(achievement_tr) #tr120077 4_TREASURE_BOX +ra_fild01,138,166,4 duplicate(achievement_tr) #tr120078 4_TREASURE_BOX +ra_fild03,224,275,4 duplicate(achievement_tr) #tr120079 4_TREASURE_BOX +ra_fild08,326,45,4 duplicate(achievement_tr) #tr120080 4_TREASURE_BOX +ra_fild12,352,165,4 duplicate(achievement_tr) #tr120081 4_TREASURE_BOX +ra_fild04,92,302,4 duplicate(achievement_tr) #tr120082 4_TREASURE_BOX +ra_fild05,59,59,4 duplicate(achievement_tr) #tr120083 4_TREASURE_BOX +ra_fild06,362,230,4 duplicate(achievement_tr) #tr120084 4_TREASURE_BOX +ve_fild01,180,234,4 duplicate(achievement_tr) #tr120085 4_TREASURE_BOX +ve_fild02,65,194,4 duplicate(achievement_tr) #tr120086 4_TREASURE_BOX +ve_fild03,197,242,4 duplicate(achievement_tr) #tr120087 4_TREASURE_BOX +ve_fild04,288,279,4 duplicate(achievement_tr) #tr120088 4_TREASURE_BOX +ve_fild07,33,113,4 duplicate(achievement_tr) #tr120089 4_TREASURE_BOX +ecl_fild01,234,217,4 duplicate(achievement_tr) #tr120090 4_TREASURE_BOX +bif_fild02,155,322,4 duplicate(achievement_tr) #tr120091 4_TREASURE_BOX +bif_fild01,147,64,4 duplicate(achievement_tr) #tr120092 4_TREASURE_BOX +spl_fild01,335,315,4 duplicate(achievement_tr) #tr120093 4_TREASURE_BOX +spl_fild02,153,358,4 duplicate(achievement_tr) #tr120094 4_TREASURE_BOX +spl_fild03,61,286,4 duplicate(achievement_tr) #tr120095 4_TREASURE_BOX +man_fild01,41,172,4 duplicate(achievement_tr) #tr120096 4_TREASURE_BOX +man_fild02,268,357,4 duplicate(achievement_tr) #tr120097 4_TREASURE_BOX +man_fild03,198,91,4 duplicate(achievement_tr) #tr120098 4_TREASURE_BOX +dic_fild01,227,82,4 duplicate(achievement_tr) #tr120099 4_TREASURE_BOX +dic_fild02,147,196,4 duplicate(achievement_tr) #tr120100 4_TREASURE_BOX +ama_fild01,187,337,4 duplicate(achievement_tr) #tr120101 4_TREASURE_BOX +gon_fild01,171,332,4 duplicate(achievement_tr) #tr120102 4_TREASURE_BOX +lou_fild01,104,232,4 duplicate(achievement_tr) #tr120103 4_TREASURE_BOX +ayo_fild01,289,70,4 duplicate(achievement_tr) #tr120104 4_TREASURE_BOX +mosk_fild02,176,77,4 duplicate(achievement_tr) #tr120105 4_TREASURE_BOX +bra_fild01,99,193,4 duplicate(achievement_tr) #tr120106 4_TREASURE_BOX +dew_fild01,175,287,4 duplicate(achievement_tr) #tr120107 4_TREASURE_BOX +ma_fild01,308,206,4 duplicate(achievement_tr) #tr120108 4_TREASURE_BOX +ma_fild02,246,323,4 duplicate(achievement_tr) #tr120109 4_TREASURE_BOX +abbey03,27,72,4 duplicate(achievement_tr) #tr120110 4_TREASURE_BOX +abyss_03,86,55,4 duplicate(achievement_tr) #tr120111 4_TREASURE_BOX +alde_dun04,90,107,4 duplicate(achievement_tr) #tr120112 4_TREASURE_BOX +ama_dun03,60,163,4 duplicate(achievement_tr) #tr120113 4_TREASURE_BOX +anthell02,253,41,4 duplicate(achievement_tr) #tr120114 4_TREASURE_BOX +ayo_dun02,150,256,4 duplicate(achievement_tr) #tr120115 4_TREASURE_BOX +beach_dun3,102,71,4 duplicate(achievement_tr) #tr120116 4_TREASURE_BOX +bra_dun02,171,121,4 duplicate(achievement_tr) #tr120117 4_TREASURE_BOX +c_tower4,37,158,4 duplicate(achievement_tr) #tr120118 4_TREASURE_BOX +dew_dun02,87,272,4 duplicate(achievement_tr) #tr120119 4_TREASURE_BOX +dic_dun03,216,211,4 duplicate(achievement_tr) #tr120120 4_TREASURE_BOX +ecl_tdun04,37,37,4 duplicate(achievement_tr) #tr120121 4_TREASURE_BOX +ein_dun02,31,255,4 duplicate(achievement_tr) #tr120122 4_TREASURE_BOX +gef_dun02,222,163,4 duplicate(achievement_tr) #tr120123 4_TREASURE_BOX +gl_sew04,288,6,4 duplicate(achievement_tr) #tr120124 4_TREASURE_BOX +gl_knt02,126,235,4 duplicate(achievement_tr) #tr120125 4_TREASURE_BOX +gl_cas02,53,151,4 duplicate(achievement_tr) #tr120126 4_TREASURE_BOX +gl_prison1,126,158,4 duplicate(achievement_tr) #tr120127 4_TREASURE_BOX +gon_dun03,166,231,4 duplicate(achievement_tr) #tr120128 4_TREASURE_BOX +ice_dun03,45,261,4 duplicate(achievement_tr) #tr120129 4_TREASURE_BOX +in_sphinx5,154,107,4 duplicate(achievement_tr) #tr120130 4_TREASURE_BOX +iz_dun05,64,223,4 duplicate(achievement_tr) #tr120131 4_TREASURE_BOX +kh_dun02,70,107,4 duplicate(achievement_tr) #tr120132 4_TREASURE_BOX +lhz_dun03,240,221,4 duplicate(achievement_tr) #tr120133 4_TREASURE_BOX +lou_dun03,29,228,4 duplicate(achievement_tr) #tr120134 4_TREASURE_BOX +mag_dun02,197,77,4 duplicate(achievement_tr) #tr120135 4_TREASURE_BOX +mjo_dun03,76,220,4 duplicate(achievement_tr) #tr120136 4_TREASURE_BOX +moc_pryd06,102,121,4 duplicate(achievement_tr) #tr120137 4_TREASURE_BOX +orcsdun02,31,72,4 duplicate(achievement_tr) #tr120138 4_TREASURE_BOX +pay_dun04,120,124,4 duplicate(achievement_tr) #tr120139 4_TREASURE_BOX +prt_maze03,11,14,4 duplicate(achievement_tr) #tr120140 4_TREASURE_BOX +prt_sewb4,19,183,4 duplicate(achievement_tr) #tr120141 4_TREASURE_BOX +tha_t06,150,176,4 duplicate(achievement_tr) #tr120142 4_TREASURE_BOX +thor_v03,220,221,4 duplicate(achievement_tr) #tr120143 4_TREASURE_BOX +treasure02,19,142,4 duplicate(achievement_tr) #tr120144 4_TREASURE_BOX +tur_dun04,134,130,4 duplicate(achievement_tr) #tr120145 4_TREASURE_BOX +xmas_dun02,120,224,4 duplicate(achievement_tr) #tr120146 4_TREASURE_BOX + +// Hidden Warps +prt_fild01,146,126,0 duplicate(achievement_wp) #wp120001 HIDDEN_WARP_NPC,5,5 +prt_fild02,142,221,0 duplicate(achievement_wp) #wp120002 HIDDEN_WARP_NPC,5,5 +prt_fild03,172,139,0 duplicate(achievement_wp) #wp120003 HIDDEN_WARP_NPC,5,5 +prt_fild04,118,57,0 duplicate(achievement_wp) #wp120004 HIDDEN_WARP_NPC,5,5 +prt_fild05,189,291,0 duplicate(achievement_wp) #wp120005 HIDDEN_WARP_NPC,5,5 +prt_fild06,298,304,0 duplicate(achievement_wp) #wp120006 HIDDEN_WARP_NPC,5,5 +prt_fild07,44,104,0 duplicate(achievement_wp) #wp120007 HIDDEN_WARP_NPC,5,5 +prt_fild08,203,222,0 duplicate(achievement_wp) #wp120008 HIDDEN_WARP_NPC,5,5 +prt_fild09,37,354,0 duplicate(achievement_wp) #wp120009 HIDDEN_WARP_NPC,5,5 +prt_fild10,177,206,0 duplicate(achievement_wp) #wp120010 HIDDEN_WARP_NPC,5,5 +gef_fild00,73,119,0 duplicate(achievement_wp) #wp120011 HIDDEN_WARP_NPC,5,5 +gef_fild01,222,224,0 duplicate(achievement_wp) #wp120012 HIDDEN_WARP_NPC,5,5 +gef_fild05,202,292,0 duplicate(achievement_wp) #wp120013 HIDDEN_WARP_NPC,5,5 +gef_fild06,279,105,0 duplicate(achievement_wp) #wp120014 HIDDEN_WARP_NPC,5,5 +gef_fild07,184,249,0 duplicate(achievement_wp) #wp120015 HIDDEN_WARP_NPC,5,5 +gef_fild09,170,73,0 duplicate(achievement_wp) #wp120016 HIDDEN_WARP_NPC,5,5 +gef_fild11,239,248,0 duplicate(achievement_wp) #wp120017 HIDDEN_WARP_NPC,5,5 +moc_fild11,188,218,0 duplicate(achievement_wp) #wp120018 HIDDEN_WARP_NPC,5,5 +moc_fild12,234,96,0 duplicate(achievement_wp) #wp120019 HIDDEN_WARP_NPC,5,5 +moc_fild13,290,207,0 duplicate(achievement_wp) #wp120020 HIDDEN_WARP_NPC,5,5 +moc_fild16,196,108,0 duplicate(achievement_wp) #wp120021 HIDDEN_WARP_NPC,5,5 +moc_fild17,269,105,0 duplicate(achievement_wp) #wp120022 HIDDEN_WARP_NPC,5,5 +moc_fild18,54,284,0 duplicate(achievement_wp) #wp120023 HIDDEN_WARP_NPC,5,5 +pay_fild01,167,243,0 duplicate(achievement_wp) #wp120024 HIDDEN_WARP_NPC,5,5 +pay_fild02,105,240,0 duplicate(achievement_wp) #wp120025 HIDDEN_WARP_NPC,5,5 +pay_fild03,144,97,0 duplicate(achievement_wp) #wp120026 HIDDEN_WARP_NPC,5,5 +pay_fild04,257,95,0 duplicate(achievement_wp) #wp120027 HIDDEN_WARP_NPC,5,5 +pay_fild07,365,37,0 duplicate(achievement_wp) #wp120028 HIDDEN_WARP_NPC,5,5 +pay_fild08,237,345,0 duplicate(achievement_wp) #wp120029 HIDDEN_WARP_NPC,5,5 +pay_fild09,251,42,0 duplicate(achievement_wp) #wp120030 HIDDEN_WARP_NPC,5,5 +pay_fild10,196,38,0 duplicate(achievement_wp) #wp120031 HIDDEN_WARP_NPC,5,5 +mjolnir_01,47,60,0 duplicate(achievement_wp) #wp120032 HIDDEN_WARP_NPC,5,5 +mjolnir_02,77,49,0 duplicate(achievement_wp) #wp120033 HIDDEN_WARP_NPC,5,5 +mjolnir_03,190,200,0 duplicate(achievement_wp) #wp120034 HIDDEN_WARP_NPC,5,5 +mjolnir_04,201,146,0 duplicate(achievement_wp) #wp120035 HIDDEN_WARP_NPC,5,5 +mjolnir_05,43,327,0 duplicate(achievement_wp) #wp120036 HIDDEN_WARP_NPC,5,5 +mjolnir_06,162,290,0 duplicate(achievement_wp) #wp120037 HIDDEN_WARP_NPC,5,5 +mjolnir_07,321,127,0 duplicate(achievement_wp) #wp120038 HIDDEN_WARP_NPC,5,5 +mjolnir_08,175,225,0 duplicate(achievement_wp) #wp120039 HIDDEN_WARP_NPC,5,5 +mjolnir_09,299,123,0 duplicate(achievement_wp) #wp120040 HIDDEN_WARP_NPC,5,5 +mjolnir_10,353,371,0 duplicate(achievement_wp) #wp120041 HIDDEN_WARP_NPC,5,5 +mjolnir_11,325,178,0 duplicate(achievement_wp) #wp120042 HIDDEN_WARP_NPC,5,5 +mjolnir_12,110,298,0 duplicate(achievement_wp) #wp120043 HIDDEN_WARP_NPC,5,5 +cmd_fild01,112,200,0 duplicate(achievement_wp) #wp120044 HIDDEN_WARP_NPC,5,5 +cmd_fild02,86,94,0 duplicate(achievement_wp) #wp120045 HIDDEN_WARP_NPC,5,5 +cmd_fild03,144,190,0 duplicate(achievement_wp) #wp120046 HIDDEN_WARP_NPC,5,5 +cmd_fild04,151,191,0 duplicate(achievement_wp) #wp120047 HIDDEN_WARP_NPC,5,5 +cmd_fild06,221,108,0 duplicate(achievement_wp) #wp120048 HIDDEN_WARP_NPC,5,5 +cmd_fild07,269,322,0 duplicate(achievement_wp) #wp120049 HIDDEN_WARP_NPC,5,5 +cmd_fild08,181,136,0 duplicate(achievement_wp) #wp120050 HIDDEN_WARP_NPC,5,5 +cmd_fild09,211,266,0 duplicate(achievement_wp) #wp120051 HIDDEN_WARP_NPC,5,5 +yuno_fild01,284,138,0 duplicate(achievement_wp) #wp120052 HIDDEN_WARP_NPC,5,5 +yuno_fild12,76,268,0 duplicate(achievement_wp) #wp120053 HIDDEN_WARP_NPC,5,5 +yuno_fild02,142,191,0 duplicate(achievement_wp) #wp120054 HIDDEN_WARP_NPC,5,5 +yuno_fild03,135,329,0 duplicate(achievement_wp) #wp120055 HIDDEN_WARP_NPC,5,5 +yuno_fild04,35,369,0 duplicate(achievement_wp) #wp120056 HIDDEN_WARP_NPC,5,5 +yuno_fild06,262,220,0 duplicate(achievement_wp) #wp120057 HIDDEN_WARP_NPC,5,5 +yuno_fild07,113,339,0 duplicate(achievement_wp) #wp120058 HIDDEN_WARP_NPC,5,5 +yuno_fild08,179,209,0 duplicate(achievement_wp) #wp120059 HIDDEN_WARP_NPC,5,5 +yuno_fild09,166,228,0 duplicate(achievement_wp) #wp120060 HIDDEN_WARP_NPC,5,5 +yuno_fild11,141,357,0 duplicate(achievement_wp) #wp120061 HIDDEN_WARP_NPC,5,5 +hu_fild01,347,312,0 duplicate(achievement_wp) #wp120062 HIDDEN_WARP_NPC,5,5 +hu_fild02,80,152,0 duplicate(achievement_wp) #wp120063 HIDDEN_WARP_NPC,5,5 +hu_fild04,322,313,0 duplicate(achievement_wp) #wp120064 HIDDEN_WARP_NPC,5,5 +hu_fild06,204,228,0 duplicate(achievement_wp) #wp120065 HIDDEN_WARP_NPC,5,5 +hu_fild05,197,210,0 duplicate(achievement_wp) #wp120066 HIDDEN_WARP_NPC,5,5 +ein_fild01,266,277,0 duplicate(achievement_wp) #wp120067 HIDDEN_WARP_NPC,5,5 +ein_fild03,99,332,0 duplicate(achievement_wp) #wp120068 HIDDEN_WARP_NPC,5,5 +ein_fild04,334,305,0 duplicate(achievement_wp) #wp120069 HIDDEN_WARP_NPC,5,5 +ein_fild05,337,233,0 duplicate(achievement_wp) #wp120070 HIDDEN_WARP_NPC,5,5 +ein_fild06,174,245,0 duplicate(achievement_wp) #wp120071 HIDDEN_WARP_NPC,5,5 +ein_fild07,188,50,0 duplicate(achievement_wp) #wp120072 HIDDEN_WARP_NPC,5,5 +ein_fild08,258,78,0 duplicate(achievement_wp) #wp120073 HIDDEN_WARP_NPC,5,5 +ein_fild09,330,76,0 duplicate(achievement_wp) #wp120074 HIDDEN_WARP_NPC,5,5 +lhz_fild01,118,73,0 duplicate(achievement_wp) #wp120075 HIDDEN_WARP_NPC,5,5 +lhz_fild02,239,243,0 duplicate(achievement_wp) #wp120076 HIDDEN_WARP_NPC,5,5 +lhz_fild03,313,132,0 duplicate(achievement_wp) #wp120077 HIDDEN_WARP_NPC,5,5 +ra_fild01,138,166,0 duplicate(achievement_wp) #wp120078 HIDDEN_WARP_NPC,5,5 +ra_fild03,224,275,0 duplicate(achievement_wp) #wp120079 HIDDEN_WARP_NPC,5,5 +ra_fild08,326,45,0 duplicate(achievement_wp) #wp120080 HIDDEN_WARP_NPC,5,5 +ra_fild12,352,165,0 duplicate(achievement_wp) #wp120081 HIDDEN_WARP_NPC,5,5 +ra_fild04,92,302,0 duplicate(achievement_wp) #wp120082 HIDDEN_WARP_NPC,5,5 +ra_fild05,59,59,0 duplicate(achievement_wp) #wp120083 HIDDEN_WARP_NPC,5,5 +ra_fild06,362,230,0 duplicate(achievement_wp) #wp120084 HIDDEN_WARP_NPC,5,5 +ve_fild01,180,234,0 duplicate(achievement_wp) #wp120085 HIDDEN_WARP_NPC,5,5 +ve_fild02,65,194,0 duplicate(achievement_wp) #wp120086 HIDDEN_WARP_NPC,5,5 +ve_fild03,197,242,0 duplicate(achievement_wp) #wp120087 HIDDEN_WARP_NPC,5,5 +ve_fild04,288,279,0 duplicate(achievement_wp) #wp120088 HIDDEN_WARP_NPC,5,5 +ve_fild07,33,113,0 duplicate(achievement_wp) #wp120089 HIDDEN_WARP_NPC,5,5 +ecl_fild01,234,217,0 duplicate(achievement_wp) #wp120090 HIDDEN_WARP_NPC,5,5 +bif_fild02,155,322,0 duplicate(achievement_wp) #wp120091 HIDDEN_WARP_NPC,5,5 +bif_fild01,147,64,0 duplicate(achievement_wp) #wp120092 HIDDEN_WARP_NPC,5,5 +spl_fild01,335,315,0 duplicate(achievement_wp) #wp120093 HIDDEN_WARP_NPC,5,5 +spl_fild02,153,358,0 duplicate(achievement_wp) #wp120094 HIDDEN_WARP_NPC,5,5 +spl_fild03,61,286,0 duplicate(achievement_wp) #wp120095 HIDDEN_WARP_NPC,5,5 +man_fild01,41,172,0 duplicate(achievement_wp) #wp120096 HIDDEN_WARP_NPC,5,5 +man_fild02,268,357,0 duplicate(achievement_wp) #wp120097 HIDDEN_WARP_NPC,5,5 +man_fild03,198,91,0 duplicate(achievement_wp) #wp120098 HIDDEN_WARP_NPC,5,5 +dic_fild01,227,82,0 duplicate(achievement_wp) #wp120099 HIDDEN_WARP_NPC,5,5 +dic_fild02,147,196,0 duplicate(achievement_wp) #wp120100 HIDDEN_WARP_NPC,5,5 +ama_fild01,187,337,0 duplicate(achievement_wp) #wp120101 HIDDEN_WARP_NPC,5,5 +gon_fild01,171,332,0 duplicate(achievement_wp) #wp120102 HIDDEN_WARP_NPC,5,5 +lou_fild01,104,232,0 duplicate(achievement_wp) #wp120103 HIDDEN_WARP_NPC,5,5 +ayo_fild01,289,70,0 duplicate(achievement_wp) #wp120104 HIDDEN_WARP_NPC,5,5 +mosk_fild02,176,77,0 duplicate(achievement_wp) #wp120105 HIDDEN_WARP_NPC,5,5 +bra_fild01,99,193,0 duplicate(achievement_wp) #wp120106 HIDDEN_WARP_NPC,5,5 +dew_fild01,175,287,0 duplicate(achievement_wp) #wp120107 HIDDEN_WARP_NPC,5,5 +ma_fild01,308,206,0 duplicate(achievement_wp) #wp120108 HIDDEN_WARP_NPC,5,5 +ma_fild02,246,323,0 duplicate(achievement_wp) #wp120109 HIDDEN_WARP_NPC,5,5 +abbey03,27,72,0 duplicate(achievement_wp) #wp120110 HIDDEN_WARP_NPC,5,5 +abyss_03,86,55,0 duplicate(achievement_wp) #wp120111 HIDDEN_WARP_NPC,5,5 +alde_dun04,90,107,0 duplicate(achievement_wp) #wp120112 HIDDEN_WARP_NPC,5,5 +ama_dun03,60,163,0 duplicate(achievement_wp) #wp120113 HIDDEN_WARP_NPC,5,5 +anthell02,253,41,0 duplicate(achievement_wp) #wp120114 HIDDEN_WARP_NPC,5,5 +ayo_dun02,150,256,0 duplicate(achievement_wp) #wp120115 HIDDEN_WARP_NPC,5,5 +beach_dun3,102,71,0 duplicate(achievement_wp) #wp120116 HIDDEN_WARP_NPC,5,5 +bra_dun02,171,121,0 duplicate(achievement_wp) #wp120117 HIDDEN_WARP_NPC,5,5 +c_tower4,37,158,0 duplicate(achievement_wp) #wp120118 HIDDEN_WARP_NPC,5,5 +dew_dun02,87,272,0 duplicate(achievement_wp) #wp120119 HIDDEN_WARP_NPC,5,5 +dic_dun03,216,211,0 duplicate(achievement_wp) #wp120120 HIDDEN_WARP_NPC,5,5 +ecl_tdun04,37,37,0 duplicate(achievement_wp) #wp120121 HIDDEN_WARP_NPC,5,5 +ein_dun02,31,255,0 duplicate(achievement_wp) #wp120122 HIDDEN_WARP_NPC,5,5 +gef_dun02,222,163,0 duplicate(achievement_wp) #wp120123 HIDDEN_WARP_NPC,5,5 +gl_sew04,288,6,0 duplicate(achievement_wp) #wp120124 HIDDEN_WARP_NPC,5,5 +gl_knt02,126,235,0 duplicate(achievement_wp) #wp120125 HIDDEN_WARP_NPC,5,5 +gl_cas02,53,151,0 duplicate(achievement_wp) #wp120126 HIDDEN_WARP_NPC,5,5 +gl_prison1,126,158,0 duplicate(achievement_wp) #wp120127 HIDDEN_WARP_NPC,5,5 +gon_dun03,166,231,0 duplicate(achievement_wp) #wp120128 HIDDEN_WARP_NPC,5,5 +ice_dun03,45,261,0 duplicate(achievement_wp) #wp120129 HIDDEN_WARP_NPC,5,5 +in_sphinx5,154,107,0 duplicate(achievement_wp) #wp120130 HIDDEN_WARP_NPC,5,5 +iz_dun05,64,223,0 duplicate(achievement_wp) #wp120131 HIDDEN_WARP_NPC,5,5 +kh_dun02,70,107,0 duplicate(achievement_wp) #wp120132 HIDDEN_WARP_NPC,5,5 +lhz_dun03,240,221,0 duplicate(achievement_wp) #wp120133 HIDDEN_WARP_NPC,5,5 +lou_dun03,29,228,0 duplicate(achievement_wp) #wp120134 HIDDEN_WARP_NPC,5,5 +mag_dun02,197,77,0 duplicate(achievement_wp) #wp120135 HIDDEN_WARP_NPC,5,5 +mjo_dun03,76,220,0 duplicate(achievement_wp) #wp120136 HIDDEN_WARP_NPC,5,5 +moc_pryd06,102,121,0 duplicate(achievement_wp) #wp120137 HIDDEN_WARP_NPC,5,5 +orcsdun02,31,72,0 duplicate(achievement_wp) #wp120138 HIDDEN_WARP_NPC,5,5 +pay_dun04,120,124,0 duplicate(achievement_wp) #wp120139 HIDDEN_WARP_NPC,5,5 +prt_maze03,11,14,0 duplicate(achievement_wp) #wp120140 HIDDEN_WARP_NPC,5,5 +prt_sewb4,19,183,0 duplicate(achievement_wp) #wp120141 HIDDEN_WARP_NPC,5,5 +tha_t06,150,176,0 duplicate(achievement_wp) #wp120142 HIDDEN_WARP_NPC,5,5 +thor_v03,220,221,0 duplicate(achievement_wp) #wp120143 HIDDEN_WARP_NPC,5,5 +treasure02,19,142,0 duplicate(achievement_wp) #wp120144 HIDDEN_WARP_NPC,5,5 +tur_dun04,134,130,0 duplicate(achievement_wp) #wp120145 HIDDEN_WARP_NPC,5,5 +xmas_dun02,120,224,0 duplicate(achievement_wp) #wp120146 HIDDEN_WARP_NPC,5,5 diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf index 2499d99b2..5ecf6b741 100644 --- a/npc/re/scripts.conf +++ b/npc/re/scripts.conf @@ -136,6 +136,7 @@ "npc/re/other/turbo_track.txt", // - Clan System "npc/re/other/clans.txt", +"npc/re/other/achievement_treasures.txt", //================= Quests ================================================ // - Eden Group ------------------------------------------------- diff --git a/npc/re/scripts_jobs.conf b/npc/re/scripts_jobs.conf index f112334de..6dd99e813 100644 --- a/npc/re/scripts_jobs.conf +++ b/npc/re/scripts_jobs.conf @@ -40,6 +40,7 @@ "npc/re/jobs/1-1e/taekwon.txt", // - 2e "npc/re/jobs/2e/kagerou_oboro.txt", +"npc/re/jobs/2e/rebellion.txt", // - 3-1 "npc/re/jobs/3-1/archbishop.txt", "npc/re/jobs/3-1/mechanic.txt", diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf index 4e346238f..bf970b8ca 100644 --- a/npc/scripts_custom.conf +++ b/npc/scripts_custom.conf @@ -51,6 +51,7 @@ //"npc/custom/item_signer.txt", //"npc/custom/woe_controller.txt", //"npc/custom/bartershop.txt", +//"npc/custom/expandedbartershop.txt", //================= Other Scripts ========================================= // -- MVP Arena diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index a0f07fc7a..3a996c1bc 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -164,17 +164,17 @@ REPLACE INTO `item_db` VALUES ('596','Cute_Strawberry_Choco','Cute Strawberry-Ch REPLACE INTO `item_db` VALUES ('597','Lovely_Choco_Tart','Lovely Choco-Tart','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(10,400),0;','',''); REPLACE INTO `item_db` VALUES ('598','Light_Red_Pot','Light Red Potion','0','0','50','25','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(45,65),0;','',''); REPLACE INTO `item_db` VALUES ('599','Light_Orange_Pot','Light Orange Potion','0','0','200','100','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(105,145),0;','',''); -REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','11','0','60','30','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); -REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','11','0','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); +REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','2','0','60','30','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','2','0','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); REPLACE INTO `item_db` VALUES ('603','Old_Blue_Box','Old Blue Box','2','0','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 603,1;','',''); REPLACE INTO `item_db` VALUES ('604','Branch_Of_Dead_Tree','Dead Branch','2','0','50','25','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','monster \"this\",-1,-1,\"--ja--\",-1,1,\"\";','',''); -REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','0','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); -REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','0','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); +REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','2','0','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); +REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','2','0','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); REPLACE INTO `item_db` VALUES ('607','Yggdrasilberry','Yggdrasil Berry','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('608','Seed_Of_Yggdrasil','Yggdrasil Seed','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50,50;','',''); REPLACE INTO `item_db` VALUES ('609','Amulet','Amulet','2','0','100','50','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('610','Leaf_Of_Yggdrasil','Yggdrasil Leaf','11','0','4000','2000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,1;','',''); -REPLACE INTO `item_db` VALUES ('611','Spectacles','Magnifier','11','0','40','20','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); +REPLACE INTO `item_db` VALUES ('610','Leaf_Of_Yggdrasil','Yggdrasil Leaf','2','0','4000','2000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,1;','',''); +REPLACE INTO `item_db` VALUES ('611','Spectacles','Magnifier','2','0','40','20','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); REPLACE INTO `item_db` VALUES ('612','Portable_Furnace','Mini Furnace','2','0','150','75','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 21;','',''); REPLACE INTO `item_db` VALUES ('613','Iron_Hammer','Iron Hammer','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 1;','',''); REPLACE INTO `item_db` VALUES ('614','Golden_Hammer','Golden Hammer','2','0','3000','1500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 2;','',''); @@ -239,21 +239,21 @@ REPLACE INTO `item_db` VALUES ('682','Realgar_Wine','Distilled Fighting Spirit', REPLACE INTO `item_db` VALUES ('683','Exorcize_Herb','Herb of Incantation','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 60000, 30;','',''); REPLACE INTO `item_db` VALUES ('684','Durian','Durian','2','0','15000','7500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSATTACKPOWER, 60000, 10; sc_start SC_PLUSMAGICPOWER, 60000, 10;','',''); REPLACE INTO `item_db` VALUES ('685','RAMADAN','Ramadan','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,50;','',''); -REPLACE INTO `item_db` VALUES ('686','Earth_Scroll_1_3','Level 3 Earth Spike','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,3;','',''); -REPLACE INTO `item_db` VALUES ('687','Earth_Scroll_1_5','Level 5 Earth Spike','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,5;','',''); -REPLACE INTO `item_db` VALUES ('688','Cold_Scroll_1_3','Level 3 Cold Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('689','Cold_Scroll_1_5','Level 5 Cold Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('690','Fire_Scroll_1_3','Level 3 Fire Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('691','Fire_Scroll_1_5','Level 5 Fire Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('692','Wind_Scroll_1_3','Level 3 Lightening Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('693','Wind_Scroll_1_5','Level 5 Lightening Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('694','Ghost_Scroll_1_3','Level 3 Soul Strike','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,3;','',''); -REPLACE INTO `item_db` VALUES ('695','Ghost_Scroll_1_5','Level 5 Soul Strike','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,5;','',''); -REPLACE INTO `item_db` VALUES ('696','Fire_Scroll_2_1','Level 1 Fire Ball','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,1;','',''); -REPLACE INTO `item_db` VALUES ('697','Fire_Scroll_2_5','Level 5 Fire Ball','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,5;','',''); -REPLACE INTO `item_db` VALUES ('698','Fire_Scroll_3_1','Level 1 Fire Wall','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,1;','',''); -REPLACE INTO `item_db` VALUES ('699','Fire_Scroll_3_5','Level 5 Fire Wall','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,5;','',''); -REPLACE INTO `item_db` VALUES ('700','Cold_Scroll_2_1','Level 1 Frost Diver','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,1;','',''); +REPLACE INTO `item_db` VALUES ('686','Earth_Scroll_1_3','Level 3 Earth Spike','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,3;','',''); +REPLACE INTO `item_db` VALUES ('687','Earth_Scroll_1_5','Level 5 Earth Spike','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,5;','',''); +REPLACE INTO `item_db` VALUES ('688','Cold_Scroll_1_3','Level 3 Cold Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('689','Cold_Scroll_1_5','Level 5 Cold Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('690','Fire_Scroll_1_3','Level 3 Fire Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('691','Fire_Scroll_1_5','Level 5 Fire Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('692','Wind_Scroll_1_3','Level 3 Lightening Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('693','Wind_Scroll_1_5','Level 5 Lightening Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('694','Ghost_Scroll_1_3','Level 3 Soul Strike','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,3;','',''); +REPLACE INTO `item_db` VALUES ('695','Ghost_Scroll_1_5','Level 5 Soul Strike','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,5;','',''); +REPLACE INTO `item_db` VALUES ('696','Fire_Scroll_2_1','Level 1 Fire Ball','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,1;','',''); +REPLACE INTO `item_db` VALUES ('697','Fire_Scroll_2_5','Level 5 Fire Ball','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,5;','',''); +REPLACE INTO `item_db` VALUES ('698','Fire_Scroll_3_1','Level 1 Fire Wall','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,1;','',''); +REPLACE INTO `item_db` VALUES ('699','Fire_Scroll_3_5','Level 5 Fire Wall','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,5;','',''); +REPLACE INTO `item_db` VALUES ('700','Cold_Scroll_2_1','Level 1 Frost Diver','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,1;','',''); REPLACE INTO `item_db` VALUES ('701','Ora_Ora','Ora Ora','3','0','55000','27500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('702','Animal_Blood','Animal Gore','3','0','450','225','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('703','Hinalle','Hinalle','3','0','500','250','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4373,10 +4373,10 @@ REPLACE INTO `item_db` VALUES ('11709','Fanta_Zero_Lemon','Fanta Zero Lemon','0' REPLACE INTO `item_db` VALUES ('11710','Sakura_Mist','Sakura Mist','0','0','800','400','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(50,70),rand(10,12);','',''); REPLACE INTO `item_db` VALUES ('11711','Sakura_Milk_Tea','Sakura Milk Tea','0','0','800','400','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(50,70),rand(10,12);','',''); REPLACE INTO `item_db` VALUES ('11712','First_Leaf_Tea','Flower','0','0','800','400','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(50,70),rand(10,12);','',''); -REPLACE INTO `item_db` VALUES ('12000','Cold_Scroll_2_5','Level 5 Frost Diver','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,5;','',''); -REPLACE INTO `item_db` VALUES ('12001','Holy_Scroll_1_3','Level 3 Heal','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,3;','',''); -REPLACE INTO `item_db` VALUES ('12002','Holy_Scroll_1_5','Level 5 Heal','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,5;','',''); -REPLACE INTO `item_db` VALUES ('12003','Holy_Scroll_2_1','Level 1 Teleport','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('12000','Cold_Scroll_2_5','Level 5 Frost Diver','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,5;','',''); +REPLACE INTO `item_db` VALUES ('12001','Holy_Scroll_1_3','Level 3 Heal','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,3;','',''); +REPLACE INTO `item_db` VALUES ('12002','Holy_Scroll_1_5','Level 5 Heal','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,5;','',''); +REPLACE INTO `item_db` VALUES ('12003','Holy_Scroll_2_1','Level 1 Teleport','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); REPLACE INTO `item_db` VALUES ('12004','Arrow_Container','Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 1750,500;','',''); REPLACE INTO `item_db` VALUES ('12005','Iron_Arrow_Container','Iron Arrow Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 1770,500;','',''); REPLACE INTO `item_db` VALUES ('12006','Steel_Arrow_Container','Steel Arrow Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 1753,500;','',''); @@ -4392,8 +4392,8 @@ REPLACE INTO `item_db` VALUES ('12015','Rusty_Arrow_Container','Rusty Arrow Quiv REPLACE INTO `item_db` VALUES ('12016','Speed_Up_Potion','Speed Potion','2','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_POTION, 5000, 100;','',''); REPLACE INTO `item_db` VALUES ('12017','Slow_Down_Potion','Slow Potion','2','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVESLOW_POTION, 5000, 100;','',''); REPLACE INTO `item_db` VALUES ('12018','Fire_Cracker','Firecracker','2','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','end;','',''); -REPLACE INTO `item_db` VALUES ('12019','Holy_Egg','Holy Egg','11','0','2','1','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,2;','',''); -REPLACE INTO `item_db` VALUES ('12020','Water_Of_Darkness','Cursed Water','11','0','2','1','30','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,8;','',''); +REPLACE INTO `item_db` VALUES ('12019','Holy_Egg','Holy Egg','2','0','2','1','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,2;','',''); +REPLACE INTO `item_db` VALUES ('12020','Water_Of_Darkness','Cursed Water','2','0','2','1','30','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,8;','',''); REPLACE INTO `item_db` VALUES ('12021','Pork_Belly','Pork','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(70,99),0;','',''); REPLACE INTO `item_db` VALUES ('12022','Spareribs','Galbi','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(70,99),0;','',''); REPLACE INTO `item_db` VALUES ('12023','Giftbox_China','Wrapped Box','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12023,1;','',''); @@ -4402,10 +4402,10 @@ REPLACE INTO `item_db` VALUES ('12025','Egg_Boy','Dano Festival Egg','2','0','10 REPLACE INTO `item_db` VALUES ('12026','Egg_Girl','Dano Festival Egg','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12026,1;','',''); REPLACE INTO `item_db` VALUES ('12027','Giggling_Box','Giggling Box','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 9,0; sc_start SC_CURSE,30000,0,3000,SCFLAG_NONE;','',''); REPLACE INTO `item_db` VALUES ('12028','Box_Of_Thunder','Box of Thunder','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_HORSE, 20000, 25;','',''); -REPLACE INTO `item_db` VALUES ('12029','Gloomy_Box','Box of Gloom','11','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,1;','',''); +REPLACE INTO `item_db` VALUES ('12029','Gloomy_Box','Box of Gloom','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,1;','',''); REPLACE INTO `item_db` VALUES ('12030','Box_Of_Grudge','Box of Resentment','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_PLUSATTACKPOWER, 60000, 20;','',''); REPLACE INTO `item_db` VALUES ('12031','Sleepy_Box','Box of Drowsiness','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 60000, 20;','',''); -REPLACE INTO `item_db` VALUES ('12032','Box_Of_Storm','Box of Storms','11','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); +REPLACE INTO `item_db` VALUES ('12032','Box_Of_Storm','Box of Storms','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); REPLACE INTO `item_db` VALUES ('12033','Box_Of_Sunlight','Box of Sunlight','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CLAIRVOYANCE,30000,0;','',''); REPLACE INTO `item_db` VALUES ('12034','Painting_Box','Box of Panting','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,9; sc_start SC_SILENCE,30000,0,3000,SCFLAG_NONE;','',''); REPLACE INTO `item_db` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','0','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12035,1;','',''); @@ -4487,14 +4487,14 @@ REPLACE INTO `item_db` VALUES ('12110','First_Aid_Kit','First Aid Kit','2','0',' REPLACE INTO `item_db` VALUES ('12111','Food_Package','Bundle of Food','2','0','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1;','',''); REPLACE INTO `item_db` VALUES ('12112','Tropical_Sograt','Tropical Sograt','2','0','1000','500','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CURSE,10000,1;','',''); REPLACE INTO `item_db` VALUES ('12113','Vermilion_The_Beach','Vermilion on the Beach','2','0','1000','500','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_STUN,10000,1;','',''); -REPLACE INTO `item_db` VALUES ('12114','Elemental_Fire','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,4;','',''); -REPLACE INTO `item_db` VALUES ('12115','Elemental_Water','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); -REPLACE INTO `item_db` VALUES ('12116','Elemental_Earth','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,3;','',''); -REPLACE INTO `item_db` VALUES ('12117','Elemental_Wind','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,5;','',''); -REPLACE INTO `item_db` VALUES ('12118','Resist_Fire','Fireproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,-15,0,20,0;','',''); -REPLACE INTO `item_db` VALUES ('12119','Resist_Water','Coldproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,20,0,0,-15;','',''); -REPLACE INTO `item_db` VALUES ('12120','Resist_Earth','Earthproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,0,20,-15,0;','',''); -REPLACE INTO `item_db` VALUES ('12121','Resist_Wind','Thunderproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,0,-15,0,20;','',''); +REPLACE INTO `item_db` VALUES ('12114','Elemental_Fire','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,4;','',''); +REPLACE INTO `item_db` VALUES ('12115','Elemental_Water','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); +REPLACE INTO `item_db` VALUES ('12116','Elemental_Earth','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,3;','',''); +REPLACE INTO `item_db` VALUES ('12117','Elemental_Wind','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,5;','',''); +REPLACE INTO `item_db` VALUES ('12118','Resist_Fire','Fireproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, 20); sc_start(SC_RESIST_PROPERTY_WATER, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12119','Resist_Water','Coldproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_WATER, 1200000, 20); sc_start(SC_RESIST_PROPERTY_WIND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12120','Resist_Earth','Earthproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, 20); sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12121','Resist_Wind','Thunderproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_WIND, 1200000, 20); sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); REPLACE INTO `item_db` VALUES ('12122','Sesame_Pastry','Sesame Pastry','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,1200000,30;','',''); REPLACE INTO `item_db` VALUES ('12123','Honey_Pastry','Honey Pastry','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE,1200000,30;','',''); REPLACE INTO `item_db` VALUES ('12124','Rainbow_Cake','Rainbow Cake','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_BATKFOOD,1200000,10; sc_start SC_MATKFOOD,120000,10;','',''); @@ -4573,7 +4573,7 @@ REPLACE INTO `item_db` VALUES ('12196','Hearty_Rice_Cake','Hearty Rice Cake','0' REPLACE INTO `item_db` VALUES ('12197','Salty_Rice_Cake','Salty Rice Cake','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 10,10;','',''); REPLACE INTO `item_db` VALUES ('12198','Lucky_Rice_Cake','Lucky Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_LUK,1200000,21;','',''); REPLACE INTO `item_db` VALUES ('12199','Rice_Scroll','Scroll of Magic','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12200','Event_Cake','X-mas Cake','11','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,3;','',''); +REPLACE INTO `item_db` VALUES ('12200','Event_Cake','X-mas Cake','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,3;','',''); REPLACE INTO `item_db` VALUES ('12201','Red_Box_C','Commonplace Red Box','2','0','20','10','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12202','Str_Dish10_','Steamed Tongue','0','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_FOOD_STR_CASH, 1800000, 10); percentheal(20, 10);','',''); REPLACE INTO `item_db` VALUES ('12203','Agi_Dish10_','Steamed Scorpion','0','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_FOOD_AGI_CASH, 1800000, 10); percentheal(15, 5);','',''); @@ -4588,12 +4588,12 @@ REPLACE INTO `item_db` VALUES ('12211','Kafra_Card','Kafra Card','2','0','2','1' REPLACE INTO `item_db` VALUES ('12212','Giant_Fly_Wing','Giant Fly Wing','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashPartyCall\";','',''); REPLACE INTO `item_db` VALUES ('12213','Neuralizer','Neuralizer','11','0','2','1','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashReset\";','',''); REPLACE INTO `item_db` VALUES ('12214','Convex_Mirror','Convex Mirror','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_BOSS_ALARM,600000,0;','',''); -REPLACE INTO `item_db` VALUES ('12215','Blessing_10_Scroll','LV10 Blessing Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,240000,10;','',''); -REPLACE INTO `item_db` VALUES ('12216','Inc_Agi_10_Scroll','LV10 Agil Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','if(Hp>15) { skilleffect AL_INCAGI,0; sc_start SC_INC_AGI,240000,10; heal -15,0; }','',''); -REPLACE INTO `item_db` VALUES ('12217','Aspersio_5_Scroll','LV5 Aspersio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','if(countitem(523)>0) { skilleffect PR_ASPERSIO,0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; }','',''); -REPLACE INTO `item_db` VALUES ('12218','Assumptio_5_Scroll','LV5 Assumptio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','sc_start SC_ASSUMPTIO,100000,5; skilleffect HP_ASSUMPTIO,0;','',''); -REPLACE INTO `item_db` VALUES ('12219','Wind_Walk_10_Scroll','LV10 Wind Walker Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','skilleffect SN_WINDWALK,0; sc_start SC_WINDWALK,250000,5;','',''); -REPLACE INTO `item_db` VALUES ('12220','Adrenaline_Scroll','LV5 Adrenaline Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','.@type = getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect BS_ADRENALINE,0; sc_start SC_ADRENALINE,150000,5; }','',''); +REPLACE INTO `item_db` VALUES ('12215','Blessing_10_Scroll','LV10 Blessing Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12216','Inc_Agi_10_Scroll','LV10 Agil Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12217','Aspersio_5_Scroll','LV5 Aspersio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12218','Assumptio_5_Scroll','LV5 Assumptio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12219','Wind_Walk_10_Scroll','LV10 Wind Walker Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12220','Adrenaline_Scroll','LV5 Adrenaline Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12221','Megaphone_','Megaphone','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','input @megaphone$; announce strcharinfo(PC_NAME) + \": \" + @megaphone$,bc_all,0xFF0000; end;','',''); REPLACE INTO `item_db` VALUES ('12225','Sweet_Candy_Striper','Sweet Candy Cane','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','pet GOBLIN_XMAS;','',''); REPLACE INTO `item_db` VALUES ('12226','Examination1','Examination 1','0','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_INFINITY, 5400000, 100; percentheal 100, 100; sc_start SC_FOOD_STR, 5400000, 10; sc_start SC_FOOD_DEX, 5400000, 5; sc_start SC_PLUSATTACKPOWER, 5400000, 22; sc_start SC_PLUSMAGICPOWER, 5400000, 15;','',''); @@ -4605,8 +4605,8 @@ REPLACE INTO `item_db` VALUES ('12231','Examination6','Examination 6','0','0','2 REPLACE INTO `item_db` VALUES ('12232','Gingerbread','Ginger Bread','2','0','20','10','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION2, 900000, 0; sc_start SC_MOVHASTE_INFINITY, 900000, 100;','',''); REPLACE INTO `item_db` VALUES ('12233','Kvass','Kvass','0','0','20','10','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('12234','Cacao99','Fierce Cacao 99%','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 25,0;','',''); -REPLACE INTO `item_db` VALUES ('12235','Strawberry_Choco','Chocolate Strawberry','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,5; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,240000,10;','',''); -REPLACE INTO `item_db` VALUES ('12236','Choco_Tart','Chocolate Tart','11','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; itemskill AL_ANGELUS,5;','',''); +REPLACE INTO `item_db` VALUES ('12235','Strawberry_Choco','Chocolate Strawberry','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 5); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12236','Choco_Tart','Chocolate Tart','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; itemskill AL_ANGELUS,5;','',''); REPLACE INTO `item_db` VALUES ('12237','Choco_Lump','Junky Chocolate','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,5; sc_start SC_POISON,18000,0; sc_start SC_BLOODING,18000,0;','',''); REPLACE INTO `item_db` VALUES ('12238','New_Year_Rice_Cake_1','New Year Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DPOISON,10000,0,1000,SCFLAG_NONE; sc_start SC_POISON,50000,0;','',''); REPLACE INTO `item_db` VALUES ('12239','New_Year_Rice_Cake_2','New Year Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DPOISON,10000,0,1000,SCFLAG_NONE; sc_start SC_POISON,50000,0;','',''); @@ -4649,7 +4649,7 @@ REPLACE INTO `item_db` VALUES ('12275','Gold_Pill_2','Taecheongdan','0','0','0', REPLACE INTO `item_db` VALUES ('12276','Mimic_Scroll','Mimic Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_MIMIC, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12277','Disguise_Scroll','Disguise Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_DISGUISE, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12278','Alice_Scroll','Alice Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_ALICE, 1800000;','',''); -REPLACE INTO `item_db` VALUES ('12279','Undead_Element_Scroll','Undead Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20;','',''); +REPLACE INTO `item_db` VALUES ('12279','Undead_Element_Scroll','Undead Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_FIRE, 300000, 20); sc_start(SC_RESIST_PROPERTY_WATER, 300000, 20); sc_start(SC_RESIST_PROPERTY_WIND, 300000, 20); sc_start(SC_RESIST_PROPERTY_GROUND, 300000, 20);','',''); REPLACE INTO `item_db` VALUES ('12280','Holy_Element_Scroll','Holy Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_BENEDICTIO, AREA, playerattached()); sc_start SC_BENEDICTIO,300000,1;','',''); REPLACE INTO `item_db` VALUES ('12281','Tresure_Box_WoE','Event Treasure Box','2','0','20','10','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12281,1;','',''); REPLACE INTO `item_db` VALUES ('12282','Internet_Cafe1','Internet Cafe1','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_STR, 5400000, 3; sc_start SC_FOOD_DEX, 5400000, 3; sc_start SC_FOOD_AGI, 5400000, 3; sc_start SC_FOOD_INT, 5400000, 3; sc_start SC_FOOD_VIT, 5400000, 3; sc_start SC_FOOD_LUK, 5400000, 3; sc_start SC_PLUSATTACKPOWER, 5400000, 15; sc_start SC_PLUSMAGICPOWER, 5400000, 15;','',''); @@ -4660,8 +4660,8 @@ REPLACE INTO `item_db` VALUES ('12286','Masquerade_Ball_Box2','Masquerade Ball B REPLACE INTO `item_db` VALUES ('12287','Love_Angel','Love Angel Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(1);','',''); REPLACE INTO `item_db` VALUES ('12288','Squirrel','Squirrel Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(2);','',''); REPLACE INTO `item_db` VALUES ('12289','Gogo','Gogo Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(3);','',''); -REPLACE INTO `item_db` VALUES ('12290','Mysterious_Can','Mysterious Can Magic Powder','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5;','',''); -REPLACE INTO `item_db` VALUES ('12291','Mysterious_PET_Bottle','Mysterious PET Bottle','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; skilleffect AL_INCAGI,0; sc_start SC_INC_AGI,120000,5;','',''); +REPLACE INTO `item_db` VALUES ('12290','Mysterious_Can','Mysterious Can Magic Powder','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(5, 0); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12291','Mysterious_PET_Bottle','Mysterious PET Bottle','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 5); itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12292','Unripe_Fruit','Unripe Fruit','0','0','500','250','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 20,0;','',''); REPLACE INTO `item_db` VALUES ('12293','Dried_Yggdrasilberry','Dried Yggdrasilberry','0','0','500','250','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 0,20;','',''); REPLACE INTO `item_db` VALUES ('12294','PC_Bang_Coin_Box1','PC-Room Coin Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','getitem 2740,1;','',''); @@ -4681,7 +4681,7 @@ REPLACE INTO `item_db` VALUES ('12307','Kid','Kid Magic Powder','11','0','0','0' REPLACE INTO `item_db` VALUES ('12308','Magic_Castle','Magic Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(8);','',''); REPLACE INTO `item_db` VALUES ('12309','Bulging_Head','JJangu Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(9);','',''); REPLACE INTO `item_db` VALUES ('12310','Spray_Of_Flowers','Spray Of Flowers','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE,600000,10;','',''); -REPLACE INTO `item_db` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_PARTYFLEE,1;','',''); +REPLACE INTO `item_db` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_PARTYFLEE,1;','',''); REPLACE INTO `item_db` VALUES ('12312','Thick_Manual50','Thick Battle Manual','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,3600000,50;','',''); REPLACE INTO `item_db` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_ANGEL_PROTECT,1;','',''); REPLACE INTO `item_db` VALUES ('12314','Noive_Box','Noive Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4693,9 +4693,9 @@ REPLACE INTO `item_db` VALUES ('12319','Strawberry_Cake','Rune Strawberry Cake', REPLACE INTO `item_db` VALUES ('12320','Pineapple_Juice','Schwartzwald Pine Jubilee','2','0','0','0','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,600000,10; sc_start SC_FOOD_BASICAVOIDANCE,600000,20;','',''); REPLACE INTO `item_db` VALUES ('12321','Spicy_Sandwich','Arunafeltz Desert Sandwich','2','0','0','0','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_CRITICALSUCCESSVALUE,600000,7;','',''); REPLACE INTO `item_db` VALUES ('12322','Chocolate_Pie','Chocolate Pie','0','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 5,5;','',''); -REPLACE INTO `item_db` VALUES ('12323','N_Fly_Wing','Novice Fly Wing','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); -REPLACE INTO `item_db` VALUES ('12324','N_Butterfly_Wing','Novice Butterfly Wing','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); -REPLACE INTO `item_db` VALUES ('12325','N_Magnifier','Novice Magnifier','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); +REPLACE INTO `item_db` VALUES ('12323','N_Fly_Wing','Novice Fly Wing','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('12324','N_Butterfly_Wing','Novice Butterfly Wing','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); +REPLACE INTO `item_db` VALUES ('12325','N_Magnifier','Novice Magnifier','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); REPLACE INTO `item_db` VALUES ('12326','J_Firecracker','Large Firecracker','2','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12327','Charm_Of_Luck','Charm Of Luck','2','0','1000','500','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_LUK,3600000,20;','',''); REPLACE INTO `item_db` VALUES ('12328','Charm_Of_Happiness','Charm Of Happiness','2','0','1800','900','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_STR,20000,10; sc_start SC_FOOD_DEX,20000,10; sc_start SC_FOOD_AGI,20000,10; sc_start SC_FOOD_INT,20000,10; sc_start SC_FOOD_VIT,20000,10; sc_start SC_FOOD_LUK,20000,10;','',''); @@ -4720,8 +4720,8 @@ REPLACE INTO `item_db` VALUES ('12346','Unripe_Acorn','Unripe Acorn','2','0','0' REPLACE INTO `item_db` VALUES ('12347','Acorn_Jelly','Acorn Jelly','2','0','11','5','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_REVERSEORCISH,1;','',''); REPLACE INTO `item_db` VALUES ('12348','Manuks_Faith','Manuk\'s Faith','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_POTION_BERSERK, AREA, playerattached()); sc_start SC_MANU_MATK,600000,10;','',''); REPLACE INTO `item_db` VALUES ('12349','Cornus_Tears','Cornus\' Tears','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_POTION_BERSERK, AREA, playerattached()); sc_start SC_SPL_MATK,600000,10;','',''); -REPLACE INTO `item_db` VALUES ('12350','Angeling_Potion','Angeling Potion','11','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','457',NULL,'1',NULL,'0',NULL,'0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5; itemskill AL_ANGELUS,5;','',''); -REPLACE INTO `item_db` VALUES ('12351','Shout_Megaphone','Scream Megaphone','11','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','457',NULL,'0',NULL,'0',NULL,'0','itemskill MC_LOUD,1;','',''); +REPLACE INTO `item_db` VALUES ('12350','Angeling_Potion','Angeling Potion','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','457',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); itemskill(AL_ANGELUS, 5);','',''); +REPLACE INTO `item_db` VALUES ('12351','Shout_Megaphone','Scream Megaphone','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','457',NULL,'0',NULL,'0',NULL,'0','itemskill MC_LOUD,1;','',''); REPLACE INTO `item_db` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashDungeon\",3;','',''); REPLACE INTO `item_db` VALUES ('12353','Tiny_Waterbottle','Small Bottle','2','0','800','400','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PROPERTYWATER,90000,1;','',''); REPLACE INTO `item_db` VALUES ('12354','Buche_De_Noel','Buche De Noel','2','0','2','1','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ANGELUS, AREA, playerattached()); sc_start4 SC_BUCHEDENOEL, 600000, 3, 3, 3, 7;','',''); @@ -4746,28 +4746,28 @@ REPLACE INTO `item_db` VALUES ('12372','Hell_Contract','Hell Contract','2','0',' REPLACE INTO `item_db` VALUES ('12373','Boys_Naivety','Boy\'s Pure Heart','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet SUCCUBUS;','',''); REPLACE INTO `item_db` VALUES ('12374','Flaming_Ice','Ice Fireworks','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet IMP;','',''); REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','0','80','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_STEAL, AREA, playerattached()); sc_start2 SC_ACARAJE,120000,5,10;','',''); -REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 3, 0; itemskill PR_GLORIA, 2;','',''); -REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0, 3; itemskill PR_MAGNIFICAT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(3, 0); itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 3); itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12378','2009_Rice_Cake_Soup','Rice Cake Soup','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50, 50;','',''); REPLACE INTO `item_db` VALUES ('12379','Popes_Cookie','Pope Cookie','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12380','Desert_Wolf_Babe_Scroll','Job Change Flute','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_DESERT_WOLF_B, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12381','ValkyrieA_Scroll','Ancient Languages Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_arch02\") { mercenary_create VALKYRIE_A, 1800000; }','',''); REPLACE INTO `item_db` VALUES ('12382','ValkyrieB_Scroll','Ancient Languages Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_arch02\") { mercenary_create VALKYRIE_B, 1800000; }','',''); REPLACE INTO `item_db` VALUES ('12383','Vulcan_Bullet_Magazine','Vulcan Bullet Magazine','2','0','11000','5500','500','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Vulcan_Bullet, 1000;','',''); -REPLACE INTO `item_db` VALUES ('12384','Rainbow_Ruby_Water','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12385','Rainbow_Ruby_Fire','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12386','Rainbow_Ruby_Wind','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12387','Rainbow_Ruby_Earth','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12388','Runstone_Crush','Rhydo Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12389','Runstone_Storm','Pertz Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12390','Runstone_Millennium','Verkana Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12384','Rainbow_Ruby_Water','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12385','Rainbow_Ruby_Fire','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12386','Rainbow_Ruby_Wind','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12387','Rainbow_Ruby_Earth','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12388','Runstone_Crush','Rhydo Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12389','Runstone_Storm','Pertz Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12390','Runstone_Millennium','Verkana Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12391','Lucky_Egg_C','Lucky Egg','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12392','RepairA','Repair A','0','0','220','110','70','0','0','0','0','0','1024','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(200,300), 0;','',''); REPLACE INTO `item_db` VALUES ('12393','RepairB','Repair B','0','0','500','250','70','0','0','0','0','0','1024','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(300,400), 0;','',''); REPLACE INTO `item_db` VALUES ('12394','RepairC','Repair C','0','0','1100','550','70','0','0','0','0','0','1024','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(400,500), 0;','',''); REPLACE INTO `item_db` VALUES ('12395','Tantanmen','Tantan Noodle','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','pet CHUNG_E;','',''); -REPLACE INTO `item_db` VALUES ('12396','Fools_Day_Box','Gift Box?','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill AL_TELEPORT,1; else if (.@temp == 2) itemskill AL_TELEPORT,3; else if (.@temp == 3) percentheal 50,0; else if (.@temp == 4) percentheal 0,50; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Apple,1; else if (.@temp == 7) itemskill ALL_REVERSEORCISH,1; else if (.@temp == 8) specialeffect(EF_MAPPILLAR2, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_ANGEL2, AREA, playerattached()); else specialeffect(EF_COIN, AREA, playerattached());','',''); -REPLACE INTO `item_db` VALUES ('12397','Fools_Day_Box2','Gift Box?','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill TF_DETOXIFY,1; else if (.@temp == 2) itemskill TF_PICKSTONE,1; else if (.@temp == 3) itemskill BA_FROSTJOKER,1; else if (.@temp == 4) itemskill DC_SCREAM,1; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Jellopy,1; else if (.@temp == 7) itemskill AL_RUWACH,1; else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); else specialeffect(EF_CURSEATTACK, AREA, playerattached());','',''); +REPLACE INTO `item_db` VALUES ('12396','Fools_Day_Box','Gift Box?','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill AL_TELEPORT,1; else if (.@temp == 2) itemskill AL_TELEPORT,3; else if (.@temp == 3) percentheal 50,0; else if (.@temp == 4) percentheal 0,50; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Apple,1; else if (.@temp == 7) itemskill ALL_REVERSEORCISH,1; else if (.@temp == 8) specialeffect(EF_MAPPILLAR2, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_ANGEL2, AREA, playerattached()); else specialeffect(EF_COIN, AREA, playerattached());','',''); +REPLACE INTO `item_db` VALUES ('12397','Fools_Day_Box2','Gift Box?','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1, 10); if (.@temp == 1) itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF); else if (.@temp == 2) itemskill(TF_PICKSTONE, 1); else if (.@temp == 3) itemskill(BA_FROSTJOKER, 1); else if (.@temp == 4) itemskill(DC_SCREAM, 1); else if (.@temp == 5) announce(strcharinfo(PC_NAME) + \" shouts : I am a fool!!!\", bc_all, C_WHITE); else if (.@temp == 6) getitem(Jellopy, 1); else if (.@temp == 7) itemskill(AL_RUWACH, 1); else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); else specialeffect(EF_CURSEATTACK, AREA, playerattached());','',''); REPLACE INTO `item_db` VALUES ('12398','PCBang_Gift_Box','PCBang Gift Box','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12399','Castle_Treasure_Box','Castle Treasure Box','2','0','20','10','1000','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12400','Water_Of_Blessing_','Water Of Blessing ','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4775,7 +4775,7 @@ REPLACE INTO `item_db` VALUES ('12401','Rune_Kn_Test_Int','Rune Kn Test Int','2' REPLACE INTO `item_db` VALUES ('12402','29Fruit','29Fruit','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12403','Lucky_Egg_C2','Lucky Egg2','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12404','Acti_Potion','Acti Potion','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12405','Underripe_Yggseed','Underripe Yggseed','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 30,30; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,140000,5;','',''); +REPLACE INTO `item_db` VALUES ('12405','Underripe_Yggseed','Underripe Yggseed','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal(30, 30); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12406','Psychic_ArmorS','Psychic ArmorS','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENERGYCOAT, AREA, playerattached()); sc_start4 SC_ARMOR_PROPERTY, 10000, 1, Ele_Neutral, 1, 0;','',''); REPLACE INTO `item_db` VALUES ('12407','PCBang_Coupon_Box','PCBang Coupon Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12408','Leaf_Cat_Ball','Leaf Cat Ball','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','pet E_HYDRA;','',''); @@ -4784,7 +4784,7 @@ REPLACE INTO `item_db` VALUES ('12410','Spareribs_H','Spareribs H','2','0','0',' REPLACE INTO `item_db` VALUES ('12411','HE_Battle_Manual','HE Battle Manual','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,900000,200;','',''); REPLACE INTO `item_db` VALUES ('12412','HE_Bubble_Gum','HE Bubble Gum','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_RECEIVEITEM,900000,300;','',''); REPLACE INTO `item_db` VALUES ('12413','PCBang_Coupon_Box2','PCBang Coupon Box2','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12414','Guarana_Candy','Guarana Candy','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION1, 1800000, 0; sc_start SC_INC_AGI, 140000, 5; skilleffect AL_INCAGI, 0;','',''); +REPLACE INTO `item_db` VALUES ('12414','Guarana_Candy','Guarana Candy','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_ATTHASTE_POTION1, 1800000, 0); itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12415','Siege_Teleport_Scroll2','Siege Teleport Scroll2','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12416','Lucky_Egg_C3','Lucky Egg C3','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12417','Boost500','Boost500','2','0','100','50','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_BOOST500, 500000, 10;','',''); @@ -4828,13 +4828,13 @@ REPLACE INTO `item_db` VALUES ('12454','F_WOB_Local','F WOB Local','2','0','0',' REPLACE INTO `item_db` VALUES ('12456','F_Greed_Scroll','F Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12457','F_Glass_Of_Illusion','F Glass Of Illusion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12458','F_Abrasive','F Abrasive','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12459','F_Med_Life_Potion','F Med Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12460','F_Small_Life_Potion','F Small Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12461','F_Regeneration_Potion','F Regeneration Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12462','F_B_Mdef_Potion','F B Mdef Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12463','F_S_Mdef_Potion','F S Mdef Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12464','F_B_Def_Potion','F B Def Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12465','F_S_Def_Potion','F S Def Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12459','F_Med_Life_Potion','Medium Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); sc_start2(SC_M_LIFEPOTION, 600000, -7, 4);','',''); +REPLACE INTO `item_db` VALUES ('12460','F_Small_Life_Potion','Small Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); /* Probably it should be 5% instead of 7%, but we\'ll follow the client side description... */ sc_start2(SC_S_LIFEPOTION, 600000, -7, 4);','',''); +REPLACE INTO `item_db` VALUES ('12461','F_Regeneration_Potion','Regeneration Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start(SC_HEALPLUS, 1800000, 20);','',''); +REPLACE INTO `item_db` VALUES ('12462','F_B_Mdef_Potion','Big Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start(SC_PROTECT_MDEF, 180000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12463','F_S_Mdef_Potion','Small Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start(SC_PROTECT_MDEF, 60000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12464','F_B_Def_Potion','Big Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_GUARD, AREA, playerattached()); sc_start(SC_PROTECT_DEF, 180000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12465','F_S_Def_Potion','Small Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_GUARD, AREA, playerattached()); sc_start(SC_PROTECT_DEF, 60000, 3);','',''); REPLACE INTO `item_db` VALUES ('12466','F_Blessing_10_Scroll','F Blessing 10 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12467','F_Inc_Agi_10_Scroll','F Inc Agi 10 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12468','F_Aspersio_5_Scroll','F Aspersio 5 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4958,9 +4958,9 @@ REPLACE INTO `item_db` VALUES ('12702','Old_Bleu_Box','Old Navy Box','2','0','0' REPLACE INTO `item_db` VALUES ('12703','Holy_Egg_2','Holy Egg','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12704','Elixir_Of_Life','Elixir of Life','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','85',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','',''); REPLACE INTO `item_db` VALUES ('12705','Noble_Nameplate','Noble Nameplate','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','90',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,1800000,100;','',''); -REPLACE INTO `item_db` VALUES ('12706','Lucky_Cookie01','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_GLORIA,5;','',''); -REPLACE INTO `item_db` VALUES ('12707','Lucky_Cookie02','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,1;','',''); -REPLACE INTO `item_db` VALUES ('12708','Lucky_Cookie03','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_IMPOSITIO,3;','',''); +REPLACE INTO `item_db` VALUES ('12706','Lucky_Cookie01','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12707','Lucky_Cookie02','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12708','Lucky_Cookie03','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12709','Guyak_Candy','Guyak Candy','0','0','0','0','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 30,30;','',''); REPLACE INTO `item_db` VALUES ('12710','Guyak_Pudding','Guyak Pudding','2','0','0','0','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_POTION, 300000, 100;','',''); REPLACE INTO `item_db` VALUES ('12711','Pretzel','Pretzel','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(50,90),0;','',''); @@ -4977,15 +4977,15 @@ REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','0','2','1','20 REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nauthiz Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH, 1;','',''); -REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Raido Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); -REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Berkana Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); -REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isa Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); -REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Othila Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); -REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Uruz Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE, 1;','',''); -REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Thurisaz Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH, 1;','',''); -REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Wyrd Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST, 1;','',''); -REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalaz Rune','11','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); +REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nauthiz Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Raido Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Berkana Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); +REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isa Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); +REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Othila Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Uruz Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Thurisaz Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Wyrd Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST, 1;','',''); +REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalaz Rune','2','0','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Luxurious Rune','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rune','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rune','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); @@ -5058,7 +5058,7 @@ REPLACE INTO `item_db` VALUES ('12924','Pet_Egg_Scroll_Box2','Pet Egg Box 2','18 REPLACE INTO `item_db` VALUES ('12925','Pet_Egg_Scroll1','Kafra Item Mall Prize Package','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12926','Pet_Egg_Scroll2','December Lucky Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12927','J_Aspersio_5_Scroll_Box','Aspersio Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12928,10;','',''); -REPLACE INTO `item_db` VALUES ('12928','J_Aspersio_5_Scroll','Sacred Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_ASPERSIO,5;','',''); +REPLACE INTO `item_db` VALUES ('12928','J_Aspersio_5_Scroll','Sacred Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_ASPERSIO,5;','',''); REPLACE INTO `item_db` VALUES ('12929','Pet_Egg_Scroll_Box3','Pet Egg Box 3','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','getitem 12932,1;','',''); REPLACE INTO `item_db` VALUES ('12930','Pet_Egg_Scroll_Box4','Pet Egg Box 4','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','getitem 12933,1;','',''); REPLACE INTO `item_db` VALUES ('12931','Pet_Egg_Scroll_Box5','Pet Egg Box 5','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','getitem 12934,1;','',''); @@ -5098,9 +5098,9 @@ REPLACE INTO `item_db` VALUES ('12964','Vesper_Core04_Box','Vesper Core 04 Box', REPLACE INTO `item_db` VALUES ('12965','Emergency_Box1','Emergency Level 1 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12968,1;','',''); REPLACE INTO `item_db` VALUES ('12966','Emergency_Box2','Emergency Level 2 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12969,1;','',''); REPLACE INTO `item_db` VALUES ('12967','Emergency_Box3','Emergency Level 3 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12970,1;','',''); -REPLACE INTO `item_db` VALUES ('12968','Emergency_Scroll1','Emergency Level 1 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); -REPLACE INTO `item_db` VALUES ('12969','Emergency_Scroll2','Emergency Level 2 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); -REPLACE INTO `item_db` VALUES ('12970','Emergency_Scroll3','Emergency Level 3 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12968','Emergency_Scroll1','Emergency Level 1 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12969','Emergency_Scroll2','Emergency Level 2 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12970','Emergency_Scroll3','Emergency Level 3 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); REPLACE INTO `item_db` VALUES ('12971','Teleport_Box1','Teleport Scroll Box 1','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12977,10;','',''); REPLACE INTO `item_db` VALUES ('12972','Teleport_Box2','Teleport Scroll Box 2','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12978,10;','',''); REPLACE INTO `item_db` VALUES ('12973','Teleport_Box3','Teleport Scroll Box 3','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 12979,10;','',''); @@ -6125,16 +6125,16 @@ REPLACE INTO `item_db` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2',' REPLACE INTO `item_db` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','0','800','400','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION1, 1800000, 0;','',''); REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','0','1500','750','20','0','0','0','0','0','2145902319','63','2','0','0','40',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION2, 1800000, 0;','',''); REPLACE INTO `item_db` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','0','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION3, 1800000, 0;','',''); -REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_METEOR,10;','',''); -REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_STORMGUST,10;','',''); -REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','',''); -REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','',''); -REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','',''); -REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5;','',''); -REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5;','',''); -REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5;','',''); -REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5;','',''); -REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1;','',''); +REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_METEOR,10;','',''); +REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_STORMGUST,10;','',''); +REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','',''); +REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','',''); +REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','',''); +REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_HELM, 5);','',''); +REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_SHIELD, 5);','',''); +REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_ARMOR, 5);','',''); +REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_WEAPON, 5);','',''); +REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_REPAIRWEAPON, 1);','',''); REPLACE INTO `item_db` VALUES ('14522','Big_Bun','Big Bun','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','',''); REPLACE INTO `item_db` VALUES ('14523','Pill_','Pill','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 0,100;','',''); REPLACE INTO `item_db` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); @@ -6142,7 +6142,7 @@ REPLACE INTO `item_db` VALUES ('14525','Chewy_Ricecake','Chewy Ricecake','2','0' REPLACE INTO `item_db` VALUES ('14526','Oriental_Pastry','Oriental Pastry','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 1800000, 10;','',''); REPLACE INTO `item_db` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashDungeon\",1;','',''); REPLACE INTO `item_db` VALUES ('14528','PVP_Tele_Scroll','PVP Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('14529','Greed_Scroll','Greed Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill BS_GREED,1;','',''); +REPLACE INTO `item_db` VALUES ('14529','Greed_Scroll','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14530','Flee_30_Scroll','Evasion Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE,1800000,30;','',''); REPLACE INTO `item_db` VALUES ('14531','Accuracy_30_Scroll','Concentration Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,1800000,30;','',''); REPLACE INTO `item_db` VALUES ('14532','Battle_Manual25','Field Manual 25%','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,1800000,25;','',''); @@ -6200,19 +6200,19 @@ REPLACE INTO `item_db` VALUES ('14583','WOB_Schwaltz','Green Butterfly Wing','2' REPLACE INTO `item_db` VALUES ('14584','WOB_Rachel','Red Butterfly Wing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashCity\",3;','',''); REPLACE INTO `item_db` VALUES ('14585','WOB_Local','Blue Butterfly Wing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashCity\",4;','',''); REPLACE INTO `item_db` VALUES ('14586','Spark_Candy','Jumping Candy','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','180000','73',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HASTEUP, AREA, playerattached()); sc_start2 SC_STEAMPACK, 60000, 20, 25;','',''); -REPLACE INTO `item_db` VALUES ('14587','Repair_Scroll_','Equipment Repair Spell Book','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill BS_REPAIRWEAPON,1;','',''); -REPLACE INTO `item_db` VALUES ('14588','Pty_Blessing_Scroll','Party Blessing 10 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_BLESSING,10;','',''); -REPLACE INTO `item_db` VALUES ('14589','Pty_Inc_Agi_Scroll','Party Increase Agi 10 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_INCAGI,10;','',''); -REPLACE INTO `item_db` VALUES ('14590','Pty_Assumptio_Scroll','Party Assumptio 5 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_ASSUMPTIO,5;','',''); +REPLACE INTO `item_db` VALUES ('14587','Repair_Scroll_','Equipment Repair Spell Book','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill BS_REPAIRWEAPON,1;','',''); +REPLACE INTO `item_db` VALUES ('14588','Pty_Blessing_Scroll','Party Blessing 10 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14589','Pty_Inc_Agi_Scroll','Party Increase Agi 10 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14590','Pty_Assumptio_Scroll','Party Assumptio 5 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','75',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14591','Siege_Teleport_Scroll','WoE Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','callfunc \"F_CashSiegeTele\";','',''); REPLACE INTO `item_db` VALUES ('14592','Job_Manual50','JOB Battle Manual','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSONLYJOBEXP,1800000,50;','',''); -REPLACE INTO `item_db` VALUES ('14593','Magic_Power_Scroll','Mystical Amplification Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill HW_MAGICPOWER,10;','',''); -REPLACE INTO `item_db` VALUES ('14594','Quagmire_Scroll','Quagmire Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_QUAGMIRE,5;','',''); +REPLACE INTO `item_db` VALUES ('14593','Magic_Power_Scroll','Mystical Amplification Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14594','Quagmire_Scroll','Quagmire Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_QUAGMIRE,5;','',''); REPLACE INTO `item_db` VALUES ('14595','Unsealed_Magic_Spell','Unsealed Magic Spell','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','warp \"yuno_fild09\",255,127;','',''); REPLACE INTO `item_db` VALUES ('14596','Pierre_Treasurebox','Pierre\'s Treasure Box','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1;','',''); REPLACE INTO `item_db` VALUES ('14597','PhreeoniS','Phreeoni Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT, 180000, 100;','',''); REPLACE INTO `item_db` VALUES ('14598','GhostringS','Ghostring Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start4 SC_ARMOR_PROPERTY, 60000, 1, Ele_Neutral, 1, 0;','',''); -REPLACE INTO `item_db` VALUES ('14599','Greed_Scroll_C','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('14599','Greed_Scroll_C','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14600','Mental_Potion','Mental Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start SC_TARGET_ASPD,1800000,10;','',''); REPLACE INTO `item_db` VALUES ('14601','Tyrs_Blessing','Tyr\'s Blessing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE, 300000, 30; sc_start SC_FOOD_BASICHIT, 300000, 30; sc_start SC_PLUSATTACKPOWER, 300000, 20; sc_start SC_PLUSMAGICPOWER, 300000, 20;','',''); REPLACE INTO `item_db` VALUES ('14602','TaogunkaS','Tao Gunka Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start4 SC_MVPCARD_TAOGUNKA, 180000, 100, 50, 50, 0;','',''); @@ -6416,7 +6416,7 @@ REPLACE INTO `item_db` VALUES ('22196','Illusion_Leg_A','Illusion_Leg_A','3','0' REPLACE INTO `item_db` VALUES ('22197','Illusion_Leg_B','Illusion_Leg_B','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22204','Time_Overload_Boots','Time_Overload_Boots','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22208','Dragon_Boots','Dragon_Boots','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); +REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','2','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); REPLACE INTO `item_db` VALUES ('22777','Buff_Gift_Set','Buff Gift Set','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','getitem 14534,5; getitem 12215,5; getitem 12216,5;','',''); REPLACE INTO `item_db` VALUES ('22808','Special_Gift_Box','Special Gift Box','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22837','Integer_Time','Integer Time','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','50',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','TmpRouletteBronze += 1;','',''); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 58d89d11e..f8760542b 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -166,17 +166,17 @@ REPLACE INTO `item_db` VALUES ('596','Cute_Strawberry_Choco','Cute Strawberry-Ch REPLACE INTO `item_db` VALUES ('597','Lovely_Choco_Tart','Lovely Choco-Tart','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(10,400),0;','',''); REPLACE INTO `item_db` VALUES ('598','Light_Red_Pot','Light Red Potion','0','0','50','25','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemheal rand(45,65),0;','',''); REPLACE INTO `item_db` VALUES ('599','Light_Orange_Pot','Light Orange Potion','0','0','200','100','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemheal rand(105,145),0;','',''); -REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','11','0','60','30','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); -REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','11','0','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); +REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','2','0','60','30','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','2','0','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); REPLACE INTO `item_db` VALUES ('603','Old_Blue_Box','Old Blue Box','2','0','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','8',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 603,1;','',''); REPLACE INTO `item_db` VALUES ('604','Branch_Of_Dead_Tree','Dead Branch','2','0','50','25','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','monster \"this\",-1,-1,\"--ja--\",-1,1,\"\";','',''); -REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','0','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); -REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','0','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); +REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','2','0','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); +REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','2','0','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); REPLACE INTO `item_db` VALUES ('607','Yggdrasilberry','Yggdrasil Berry','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','5000','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('608','Seed_Of_Yggdrasil','Yggdrasil Seed','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','3000','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50,50;','',''); REPLACE INTO `item_db` VALUES ('609','Amulet','Amulet','2','0','100','50','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('610','Leaf_Of_Yggdrasil','Yggdrasil Leaf','11','0','4000','2000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,1;','',''); -REPLACE INTO `item_db` VALUES ('611','Spectacles','Magnifier','11','0','40','20','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); +REPLACE INTO `item_db` VALUES ('610','Leaf_Of_Yggdrasil','Yggdrasil Leaf','2','0','4000','2000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,1;','',''); +REPLACE INTO `item_db` VALUES ('611','Spectacles','Magnifier','2','0','40','20','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); REPLACE INTO `item_db` VALUES ('612','Portable_Furnace','Mini Furnace','2','0','150','75','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 21;','',''); REPLACE INTO `item_db` VALUES ('613','Iron_Hammer','Iron Hammer','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 1;','',''); REPLACE INTO `item_db` VALUES ('614','Golden_Hammer','Golden Hammer','2','0','3000','1500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','produce 2;','',''); @@ -241,21 +241,21 @@ REPLACE INTO `item_db` VALUES ('682','Realgar_Wine','Distilled Fighting Spirit', REPLACE INTO `item_db` VALUES ('683','Exorcize_Herb','Herb of Incantation','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 60000, 30;','',''); REPLACE INTO `item_db` VALUES ('684','Durian','Durian','2','0','15000','7500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSATTACKPOWER, 60000, 10; sc_start SC_PLUSMAGICPOWER, 60000, 10;','',''); REPLACE INTO `item_db` VALUES ('685','RAMADAN','Ramadan','0','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,50;','',''); -REPLACE INTO `item_db` VALUES ('686','Earth_Scroll_1_3','Level 3 Earth Spike','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,3;','',''); -REPLACE INTO `item_db` VALUES ('687','Earth_Scroll_1_5','Level 5 Earth Spike','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,5;','',''); -REPLACE INTO `item_db` VALUES ('688','Cold_Scroll_1_3','Level 3 Cold Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('689','Cold_Scroll_1_5','Level 5 Cold Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('690','Fire_Scroll_1_3','Level 3 Fire Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('691','Fire_Scroll_1_5','Level 5 Fire Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('692','Wind_Scroll_1_3','Level 3 Lightening Bolt','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,3;','',''); -REPLACE INTO `item_db` VALUES ('693','Wind_Scroll_1_5','Level 5 Lightening Bolt','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,5;','',''); -REPLACE INTO `item_db` VALUES ('694','Ghost_Scroll_1_3','Level 3 Soul Strike','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,3;','',''); -REPLACE INTO `item_db` VALUES ('695','Ghost_Scroll_1_5','Level 5 Soul Strike','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,5;','',''); -REPLACE INTO `item_db` VALUES ('696','Fire_Scroll_2_1','Level 1 Fire Ball','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,1;','',''); -REPLACE INTO `item_db` VALUES ('697','Fire_Scroll_2_5','Level 5 Fire Ball','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,5;','',''); -REPLACE INTO `item_db` VALUES ('698','Fire_Scroll_3_1','Level 1 Fire Wall','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,1;','',''); -REPLACE INTO `item_db` VALUES ('699','Fire_Scroll_3_5','Level 5 Fire Wall','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,5;','',''); -REPLACE INTO `item_db` VALUES ('700','Cold_Scroll_2_1','Level 1 Frost Diver','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,1;','',''); +REPLACE INTO `item_db` VALUES ('686','Earth_Scroll_1_3','Level 3 Earth Spike','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,3;','',''); +REPLACE INTO `item_db` VALUES ('687','Earth_Scroll_1_5','Level 5 Earth Spike','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_EARTHSPIKE,5;','',''); +REPLACE INTO `item_db` VALUES ('688','Cold_Scroll_1_3','Level 3 Cold Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('689','Cold_Scroll_1_5','Level 5 Cold Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_COLDBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('690','Fire_Scroll_1_3','Level 3 Fire Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('691','Fire_Scroll_1_5','Level 5 Fire Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('692','Wind_Scroll_1_3','Level 3 Lightening Bolt','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,3;','',''); +REPLACE INTO `item_db` VALUES ('693','Wind_Scroll_1_5','Level 5 Lightening Bolt','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_LIGHTNINGBOLT,5;','',''); +REPLACE INTO `item_db` VALUES ('694','Ghost_Scroll_1_3','Level 3 Soul Strike','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,3;','',''); +REPLACE INTO `item_db` VALUES ('695','Ghost_Scroll_1_5','Level 5 Soul Strike','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_SOULSTRIKE,5;','',''); +REPLACE INTO `item_db` VALUES ('696','Fire_Scroll_2_1','Level 1 Fire Ball','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,1;','',''); +REPLACE INTO `item_db` VALUES ('697','Fire_Scroll_2_5','Level 5 Fire Ball','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREBALL,5;','',''); +REPLACE INTO `item_db` VALUES ('698','Fire_Scroll_3_1','Level 1 Fire Wall','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,1;','',''); +REPLACE INTO `item_db` VALUES ('699','Fire_Scroll_3_5','Level 5 Fire Wall','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FIREWALL,5;','',''); +REPLACE INTO `item_db` VALUES ('700','Cold_Scroll_2_1','Level 1 Frost Diver','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,1;','',''); REPLACE INTO `item_db` VALUES ('701','Ora_Ora','Ora Ora','3','0','55000','27500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('702','Animal_Blood','Animal Gore','3','0','450','225','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('703','Hinalle','Hinalle','3','0','500','250','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4603,6 +4603,8 @@ REPLACE INTO `item_db` VALUES ('6681','XMAS_Cookie','XMAS Cookie','3','0','0','0 REPLACE INTO `item_db` VALUES ('6682','Bag_Of_Selling_Goods','Bag Of Selling Goods','3','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('6707','Cash_Hair_Coupon','Cash Hair Coupon','3','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('6712','Lovely_Stick','Love Wand','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('6746','Steel_Article','Steel Artifact','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('6747','Steel_Article_','Steel Artifact','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('6755','Corrupted_Charm','Contaminated Magic','3','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('6804','ORGANIC_PUMPKIN','Organic Pumpkin','3','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('6805','INORGANIC_PUMPKIN','Inorganic Pumpkin','3','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -5841,10 +5843,10 @@ REPLACE INTO `item_db` VALUES ('11716','Shepherd_Salad','Shepherd Salad','0','0' REPLACE INTO `item_db` VALUES ('11717','Yogurt','Yogurt','0','0','0','0','140','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); sc_start2 SC_ATKER_MOVESPEED, 180000, 5, 10;','',''); REPLACE INTO `item_db` VALUES ('11718','Sushi_Kebab','Sushi Kebab','0','0','0','0','60','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); sc_start2 SC_M_LIFEPOTION, 180000, -4, 4;','',''); REPLACE INTO `item_db` VALUES ('11719','Bisket_Dessert','Bisket Dessert','0','0','0','0','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP, 1800000, 100','',''); -REPLACE INTO `item_db` VALUES ('12000','Cold_Scroll_2_5','Level 5 Frost Diver','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,5;','',''); -REPLACE INTO `item_db` VALUES ('12001','Holy_Scroll_1_3','Level 3 Heal','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,3;','',''); -REPLACE INTO `item_db` VALUES ('12002','Holy_Scroll_1_5','Level 5 Heal','11','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,5;','',''); -REPLACE INTO `item_db` VALUES ('12003','Holy_Scroll_2_1','Level 1 Teleport','11','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('12000','Cold_Scroll_2_5','Level 5 Frost Diver','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill MG_FROSTDIVER,5;','',''); +REPLACE INTO `item_db` VALUES ('12001','Holy_Scroll_1_3','Level 3 Heal','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,3;','',''); +REPLACE INTO `item_db` VALUES ('12002','Holy_Scroll_1_5','Level 5 Heal','2','0','2000','1000','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AL_HEAL,5;','',''); +REPLACE INTO `item_db` VALUES ('12003','Holy_Scroll_2_1','Level 1 Teleport','2','0','1000','500','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); REPLACE INTO `item_db` VALUES ('12004','Arrow_Container','Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Arrow, 500;','',''); REPLACE INTO `item_db` VALUES ('12005','Iron_Arrow_Container','Iron Arrow Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Iron_Arrow, 500;','',''); REPLACE INTO `item_db` VALUES ('12006','Steel_Arrow_Container','Steel Arrow Quiver','2','0','2','1','250','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Steel_Arrow, 500;','',''); @@ -5860,8 +5862,8 @@ REPLACE INTO `item_db` VALUES ('12015','Rusty_Arrow_Container','Rusty Arrow Quiv REPLACE INTO `item_db` VALUES ('12016','Speed_Up_Potion','Speed Potion','2','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_POTION, 5000, 100;','',''); REPLACE INTO `item_db` VALUES ('12017','Slow_Down_Potion','Slow Potion','2','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVESLOW_POTION, 5000, 100;','',''); REPLACE INTO `item_db` VALUES ('12018','Fire_Cracker','Firecracker','2','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','end;','',''); -REPLACE INTO `item_db` VALUES ('12019','Holy_Egg','Holy Egg','11','0','2','1','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,2;','',''); -REPLACE INTO `item_db` VALUES ('12020','Water_Of_Darkness','Cursed Water','11','0','2','1','30','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,8;','',''); +REPLACE INTO `item_db` VALUES ('12019','Holy_Egg','Holy Egg','2','0','2','1','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ALL_RESURRECTION,2;','',''); +REPLACE INTO `item_db` VALUES ('12020','Water_Of_Darkness','Cursed Water','2','0','2','1','30','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,8;','',''); REPLACE INTO `item_db` VALUES ('12021','Pork_Belly','Pork','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(70,99),0;','',''); REPLACE INTO `item_db` VALUES ('12022','Spareribs','Galbi','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(70,99),0;','',''); REPLACE INTO `item_db` VALUES ('12023','Giftbox_China','Wrapped Box','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12023,1;','',''); @@ -5870,10 +5872,10 @@ REPLACE INTO `item_db` VALUES ('12025','Egg_Boy','Dano Festival Egg','2','0','10 REPLACE INTO `item_db` VALUES ('12026','Egg_Girl','Dano Festival Egg','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12026,1;','',''); REPLACE INTO `item_db` VALUES ('12027','Giggling_Box','Giggling Box','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 9,0; sc_start SC_CURSE,30000,0,3000,SCFLAG_NONE;','',''); REPLACE INTO `item_db` VALUES ('12028','Box_Of_Thunder','Box of Thunder','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_HORSE, 20000, 25;','',''); -REPLACE INTO `item_db` VALUES ('12029','Gloomy_Box','Box of Gloom','11','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,1;','',''); +REPLACE INTO `item_db` VALUES ('12029','Gloomy_Box','Box of Gloom','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,1;','',''); REPLACE INTO `item_db` VALUES ('12030','Box_Of_Grudge','Box of Resentment','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_PLUSATTACKPOWER, 60000, 20;','',''); REPLACE INTO `item_db` VALUES ('12031','Sleepy_Box','Box of Drowsiness','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 60000, 20;','',''); -REPLACE INTO `item_db` VALUES ('12032','Box_Of_Storm','Box of Storms','11','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); +REPLACE INTO `item_db` VALUES ('12032','Box_Of_Storm','Box of Storms','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); REPLACE INTO `item_db` VALUES ('12033','Box_Of_Sunlight','Box of Sunlight','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CLAIRVOYANCE,30000,0;','',''); REPLACE INTO `item_db` VALUES ('12034','Painting_Box','Box of Panting','2','0','1000','500','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,9; sc_start SC_SILENCE,30000,0,3000,SCFLAG_NONE;','',''); REPLACE INTO `item_db` VALUES ('12035','Lotto_Box01','Lotto Box 01','2','0','0','0','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12035,1;','',''); @@ -5955,14 +5957,14 @@ REPLACE INTO `item_db` VALUES ('12110','First_Aid_Kit','First Aid Kit','2','0',' REPLACE INTO `item_db` VALUES ('12111','Food_Package','Bundle of Food','2','0','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12111,1; getrandgroupitem 12111,1; getrandgroupitem 12111,1;','',''); REPLACE INTO `item_db` VALUES ('12112','Tropical_Sograt','Tropical Sograt','2','0','1000','500','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CURSE,10000,1;','',''); REPLACE INTO `item_db` VALUES ('12113','Vermilion_The_Beach','Vermilion on the Beach','2','0','1000','500','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_STUN,10000,1;','',''); -REPLACE INTO `item_db` VALUES ('12114','Elemental_Fire','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,4;','',''); -REPLACE INTO `item_db` VALUES ('12115','Elemental_Water','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); -REPLACE INTO `item_db` VALUES ('12116','Elemental_Earth','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,3;','',''); -REPLACE INTO `item_db` VALUES ('12117','Elemental_Wind','Elemental Converter','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,5;','',''); -REPLACE INTO `item_db` VALUES ('12118','Resist_Fire','Fireproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,-15,0,20,0;','',''); -REPLACE INTO `item_db` VALUES ('12119','Resist_Water','Coldproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,20,0,0,-15;','',''); -REPLACE INTO `item_db` VALUES ('12120','Resist_Earth','Earthproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,0,20,-15,0;','',''); -REPLACE INTO `item_db` VALUES ('12121','Resist_Wind','Thunderproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMORPROPERTY,1200000,0,-15,0,20;','',''); +REPLACE INTO `item_db` VALUES ('12114','Elemental_Fire','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,4;','',''); +REPLACE INTO `item_db` VALUES ('12115','Elemental_Water','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,2;','',''); +REPLACE INTO `item_db` VALUES ('12116','Elemental_Earth','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,3;','',''); +REPLACE INTO `item_db` VALUES ('12117','Elemental_Wind','Elemental Converter','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ITEM_ENCHANTARMS,5;','',''); +REPLACE INTO `item_db` VALUES ('12118','Resist_Fire','Fireproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, 20); sc_start(SC_RESIST_PROPERTY_WATER, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12119','Resist_Water','Coldproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_WATER, 1200000, 20); sc_start(SC_RESIST_PROPERTY_WIND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12120','Resist_Earth','Earthproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, 20); sc_start(SC_RESIST_PROPERTY_FIRE, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); +REPLACE INTO `item_db` VALUES ('12121','Resist_Wind','Thunderproof Potion','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_WIND, 1200000, 20); sc_start(SC_RESIST_PROPERTY_GROUND, 1200000, -15, 10000, SCFLAG_NOAVOID | SCFLAG_NOICON);','',''); REPLACE INTO `item_db` VALUES ('12122','Sesame_Pastry','Sesame Pastry','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,1200000,30;','',''); REPLACE INTO `item_db` VALUES ('12123','Honey_Pastry','Honey Pastry','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE, 1200000, 30;','',''); REPLACE INTO `item_db` VALUES ('12124','Rainbow_Cake','Rainbow Cake','2','0','2','1','70','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSATTACKPOWER, 1200000, 10; sc_start SC_PLUSMAGICPOWER, 120000, 10;','',''); @@ -6041,7 +6043,7 @@ REPLACE INTO `item_db` VALUES ('12196','Hearty_Rice_Cake','Hearty Rice Cake','0' REPLACE INTO `item_db` VALUES ('12197','Salty_Rice_Cake','Salty Rice Cake','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 10,10;','',''); REPLACE INTO `item_db` VALUES ('12198','Lucky_Rice_Cake','Lucky Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_LUK,1200000,21;','',''); REPLACE INTO `item_db` VALUES ('12199','Rice_Scroll','Scroll of Magic','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12200','Event_Cake','X-mas Cake','11','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,3;','',''); +REPLACE INTO `item_db` VALUES ('12200','Event_Cake','X-mas Cake','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,3;','',''); REPLACE INTO `item_db` VALUES ('12201','Red_Box_C','Commonplace Red Box','2','0','20','10','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12202','Str_Dish10_','Steamed Tongue','0','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_FOOD_STR_CASH, 1800000, 10); percentheal(20, 10);','',''); REPLACE INTO `item_db` VALUES ('12203','Agi_Dish10_','Steamed Scorpion','0','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_FOOD_AGI_CASH, 1800000, 10); percentheal(15, 5);','',''); @@ -6056,12 +6058,12 @@ REPLACE INTO `item_db` VALUES ('12211','Kafra_Card','Kafra Card','2','0','2','1' REPLACE INTO `item_db` VALUES ('12212','Giant_Fly_Wing','Giant Fly Wing','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashPartyCall\";','',''); REPLACE INTO `item_db` VALUES ('12213','Neuralizer','Neuralizer','11','0','2','1','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashReset\";','',''); REPLACE INTO `item_db` VALUES ('12214','Convex_Mirror','Convex Mirror','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_BOSS_ALARM,600000,0;','',''); -REPLACE INTO `item_db` VALUES ('12215','Blessing_10_Scroll','LV10 Blessing Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,240000,10;','',''); -REPLACE INTO `item_db` VALUES ('12216','Inc_Agi_10_Scroll','LV10 Agil Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','if(Hp>15) { skilleffect AL_INCAGI,0; sc_start SC_INC_AGI,240000,10; heal -15,0; }','',''); -REPLACE INTO `item_db` VALUES ('12217','Aspersio_5_Scroll','LV5 Aspersio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','if(countitem(523)>0) { skilleffect PR_ASPERSIO,0; sc_start SC_ASPERSIO,180000,5; delitem 523,1; }','',''); -REPLACE INTO `item_db` VALUES ('12218','Assumptio_5_Scroll','LV5 Assumptio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','sc_start SC_ASSUMPTIO,100000,5; skilleffect HP_ASSUMPTIO,0;','',''); -REPLACE INTO `item_db` VALUES ('12219','Wind_Walk_10_Scroll','LV10 Wind Walker Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','skilleffect SN_WINDWALK,0; sc_start SC_WINDWALK,250000,5;','',''); -REPLACE INTO `item_db` VALUES ('12220','Adrenaline_Scroll','LV5 Adrenaline Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','.@type = getiteminfo(getequipid(EQI_HAND_R),11); if (.@type==6||.@type==7||.@type==8) { skilleffect BS_ADRENALINE,0; sc_start SC_ADRENALINE,150000,5; }','',''); +REPLACE INTO `item_db` VALUES ('12215','Blessing_10_Scroll','LV10 Blessing Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12216','Inc_Agi_10_Scroll','LV10 Agil Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12217','Aspersio_5_Scroll','LV5 Aspersio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12218','Assumptio_5_Scroll','LV5 Assumptio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12219','Wind_Walk_10_Scroll','LV10 Wind Walker Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12220','Adrenaline_Scroll','LV5 Adrenaline Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12221','Megaphone_','Megaphone','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','input @megaphone$; announce strcharinfo(PC_NAME) + \": \" + @megaphone$,bc_all,0xFF0000; end;','',''); REPLACE INTO `item_db` VALUES ('12225','Sweet_Candy_Striper','Sweet Candy Cane','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','pet GOBLIN_XMAS;','',''); REPLACE INTO `item_db` VALUES ('12226','Examination1','Examination1','0','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_INFINITY, 5400000, 100; percentheal 100, 100; sc_start SC_FOOD_STR, 5400000, 10; sc_start SC_FOOD_DEX, 5400000, 5; sc_start SC_PLUSATTACKPOWER, 5400000, 22; sc_start SC_PLUSMAGICPOWER, 5400000, 15;','',''); @@ -6073,8 +6075,8 @@ REPLACE INTO `item_db` VALUES ('12231','Examination6','Examination6','0','0','20 REPLACE INTO `item_db` VALUES ('12232','Gingerbread','Ginger Bread','2','0','20','10','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION2, 900000, 6; sc_start SC_MOVHASTE_INFINITY, 900000, 100;','',''); REPLACE INTO `item_db` VALUES ('12233','Kvass','Kvass','0','0','20','10','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('12234','Cacao99','Fierce Cacao 99%','0','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 25,0;','',''); -REPLACE INTO `item_db` VALUES ('12235','Strawberry_Choco','Chocolate Strawberry','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,5; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,240000,10;','',''); -REPLACE INTO `item_db` VALUES ('12236','Choco_Tart','Chocolate Tart','11','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; itemskill AL_ANGELUS,5;','',''); +REPLACE INTO `item_db` VALUES ('12235','Strawberry_Choco','Chocolate Strawberry','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 5); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12236','Choco_Tart','Chocolate Tart','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; itemskill AL_ANGELUS,5;','',''); REPLACE INTO `item_db` VALUES ('12237','Choco_Lump','Junky Chocolate','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,5; sc_start SC_POISON,18000,0; sc_start SC_BLOODING,18000,0;','',''); REPLACE INTO `item_db` VALUES ('12238','New_Year_Rice_Cake_1','New Year Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DPOISON,10000,0,1000,SCFLAG_NONE; sc_start SC_POISON,50000,0;','',''); REPLACE INTO `item_db` VALUES ('12239','New_Year_Rice_Cake_2','New Year Rice Cake','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DPOISON,10000,0,1000,SCFLAG_NONE; sc_start SC_POISON,50000,0;','',''); @@ -6117,7 +6119,7 @@ REPLACE INTO `item_db` VALUES ('12275','Gold_Pill_2','Taecheongdan','0','0','0', REPLACE INTO `item_db` VALUES ('12276','Mimic_Scroll','Mimic Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_MIMIC, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12277','Disguise_Scroll','Disguise Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_DISGUISE, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12278','Alice_Scroll','Alice Contract','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_ALICE, 1800000;','',''); -REPLACE INTO `item_db` VALUES ('12279','Undead_Element_Scroll','Undead Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start4 SC_ARMOR_RESIST,300000,20,20,20,20;','',''); +REPLACE INTO `item_db` VALUES ('12279','Undead_Element_Scroll','Undead Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_RESIST_PROPERTY_FIRE, 300000, 20); sc_start(SC_RESIST_PROPERTY_WATER, 300000, 20); sc_start(SC_RESIST_PROPERTY_WIND, 300000, 20); sc_start(SC_RESIST_PROPERTY_GROUND, 300000, 20);','',''); REPLACE INTO `item_db` VALUES ('12280','Holy_Element_Scroll','Holy Elemental Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_BENEDICTIO, AREA, playerattached()); sc_start SC_BENEDICTIO,300000,1;','',''); REPLACE INTO `item_db` VALUES ('12281','Tresure_Box_WoE','Event Treasure Box','2','0','20','10','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12282','Internet_Cafe1','Internet Cafe1','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_STR, 5400000, 3; sc_start SC_FOOD_DEX, 5400000, 3; sc_start SC_FOOD_AGI, 5400000, 3; sc_start SC_FOOD_INT, 5400000, 3; sc_start SC_FOOD_VIT, 5400000, 3; sc_start SC_FOOD_LUK, 5400000, 3; sc_start SC_PLUSATTACKPOWER, 5400000, 15; sc_start SC_PLUSMAGICPOWER, 5400000, 15;','',''); @@ -6128,8 +6130,8 @@ REPLACE INTO `item_db` VALUES ('12286','Masquerade_Ball_Box2','Masquerade Ball B REPLACE INTO `item_db` VALUES ('12287','Love_Angel','Love Angel Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(1);','',''); REPLACE INTO `item_db` VALUES ('12288','Squirrel','Squirrel Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(2);','',''); REPLACE INTO `item_db` VALUES ('12289','Gogo','Gogo Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(3);','',''); -REPLACE INTO `item_db` VALUES ('12290','Mysterious_Can','Mysterious Can Magic Powder','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5;','',''); -REPLACE INTO `item_db` VALUES ('12291','Mysterious_PET_Bottle','Mysterious PET Bottle','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 5,0; skilleffect AL_INCAGI,0; sc_start SC_INC_AGI,120000,5;','',''); +REPLACE INTO `item_db` VALUES ('12290','Mysterious_Can','Mysterious Can Magic Powder','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(5, 0); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12291','Mysterious_PET_Bottle','Mysterious PET Bottle','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 5); itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12292','Unripe_Fruit','Unripe Yggdrasilberry','0','0','500','250','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 20,0;','',''); REPLACE INTO `item_db` VALUES ('12293','Dried_Yggdrasilberry','Dried Yggdrasilberry','0','0','500','250','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 0,20;','',''); REPLACE INTO `item_db` VALUES ('12294','PC_Bang_Coin_Box1','Blue Christmas Cheer Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','getitem 2740,1;','',''); @@ -6149,7 +6151,7 @@ REPLACE INTO `item_db` VALUES ('12307','Kid','Kid Magic Powder','11','0','0','0' REPLACE INTO `item_db` VALUES ('12308','Magic_Castle','Magic Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(8);','',''); REPLACE INTO `item_db` VALUES ('12309','Bulging_Head','JJangu Magic Powder','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','setfont(9);','',''); REPLACE INTO `item_db` VALUES ('12310','Spray_Of_Flowers','Spray Of Flowers','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE,600000,10;','',''); -REPLACE INTO `item_db` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_PARTYFLEE,1;','',''); +REPLACE INTO `item_db` VALUES ('12311','Large_Spray_Of_Flowers','Huge Spray Of Flowers','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_PARTYFLEE,1;','',''); REPLACE INTO `item_db` VALUES ('12312','Thick_Manual50','Thick Battle Manual','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,3600000,50;','',''); REPLACE INTO `item_db` VALUES ('12313','Protection_Of_Angel','Guardian Angel','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_ANGEL_PROTECT,1;','',''); REPLACE INTO `item_db` VALUES ('12314','Noive_Box','Noive Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -6161,9 +6163,9 @@ REPLACE INTO `item_db` VALUES ('12319','Strawberry_Cake','Rune Strawberry Cake', REPLACE INTO `item_db` VALUES ('12320','Pineapple_Juice','Schwartzwald Pine Jubilee','2','0','0','0','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,600000,10; sc_start SC_FOOD_BASICAVOIDANCE,600000,20;','',''); REPLACE INTO `item_db` VALUES ('12321','Spicy_Sandwich','Arunafeltz Desert Sandwich','2','0','0','0','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_CRITICALSUCCESSVALUE,600000,7;','',''); REPLACE INTO `item_db` VALUES ('12322','Chocolate_Pie','Chocolate Pie','0','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','percentheal 5,5;','',''); -REPLACE INTO `item_db` VALUES ('12323','N_Fly_Wing','Novice Fly Wing','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); -REPLACE INTO `item_db` VALUES ('12324','N_Butterfly_Wing','Novice Butterfly Wing','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); -REPLACE INTO `item_db` VALUES ('12325','N_Magnifier','Novice Magnifier','11','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); +REPLACE INTO `item_db` VALUES ('12323','N_Fly_Wing','Novice Fly Wing','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,1;','',''); +REPLACE INTO `item_db` VALUES ('12324','N_Butterfly_Wing','Novice Butterfly Wing','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); +REPLACE INTO `item_db` VALUES ('12325','N_Magnifier','Novice Magnifier','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'1',NULL,'0',NULL,'0','itemskill MC_IDENTIFY,1;','',''); REPLACE INTO `item_db` VALUES ('12326','J_Firecracker','Firecracker','2','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12327','Charm_Of_Luck','Unsuitable Of Lucky','2','0','1000','500','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_LUK,3600000,20;','',''); REPLACE INTO `item_db` VALUES ('12328','Charm_Of_Happiness','Unsuitable Of Happyness','2','0','1800','900','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_STR,20000,10; sc_start SC_FOOD_DEX,20000,10; sc_start SC_FOOD_AGI,20000,10; sc_start SC_FOOD_INT,20000,10; sc_start SC_FOOD_VIT,20000,10; sc_start SC_FOOD_LUK,20000,10;','',''); @@ -6188,8 +6190,8 @@ REPLACE INTO `item_db` VALUES ('12346','Unripe_Acorn','Unripe Acorn','2','0','0' REPLACE INTO `item_db` VALUES ('12347','Acorn_Jelly','Acorn Jelly','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill ALL_REVERSEORCISH,1;','',''); REPLACE INTO `item_db` VALUES ('12348','Manuks_Faith','Manuk\'s Faith','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_POTION_BERSERK, AREA, playerattached()); sc_start SC_MANU_MATK,600000,10;','',''); REPLACE INTO `item_db` VALUES ('12349','Cornus_Tears','Cornus\' Tears','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_POTION_BERSERK, AREA, playerattached()); sc_start SC_SPL_MATK,600000,10;','',''); -REPLACE INTO `item_db` VALUES ('12350','Angeling_Potion','Angeling Potion','11','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','skilleffect AL_BLESSING,0; sc_start SC_BLESSING,120000,5; itemskill AL_ANGELUS,5;','',''); -REPLACE INTO `item_db` VALUES ('12351','Shout_Megaphone','Scream Megaphone','11','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_LOUD,1;','',''); +REPLACE INTO `item_db` VALUES ('12350','Angeling_Potion','Angeling Potion','2','0','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); itemskill(AL_ANGELUS, 5);','',''); +REPLACE INTO `item_db` VALUES ('12351','Shout_Megaphone','Scream Megaphone','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill MC_LOUD,1;','',''); REPLACE INTO `item_db` VALUES ('12352','Dun_Tele_Scroll3','Dungeon Teleport Scroll 3','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashDungeon\",3;','',''); REPLACE INTO `item_db` VALUES ('12353','Tiny_Waterbottle','Small Bottle','2','0','600','300','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PROPERTYWATER,90000,1;','',''); REPLACE INTO `item_db` VALUES ('12354','Buche_De_Noel','Buche De Noel','2','0','2','1','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ANGELUS, AREA, playerattached()); sc_start4 SC_BUCHEDENOEL, 600000, 3, 3, 3, 7;','',''); @@ -6214,28 +6216,28 @@ REPLACE INTO `item_db` VALUES ('12372','Hell_Contract','Hell Contract','2','0',' REPLACE INTO `item_db` VALUES ('12373','Boys_Naivety','Boy\'s Pure Heart','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet SUCCUBUS;','',''); REPLACE INTO `item_db` VALUES ('12374','Flaming_Ice','Ice Fireworks','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet IMP;','',''); REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','0','80','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_STEAL, AREA, playerattached()); sc_start2 SC_ACARAJE,120000,5,10;','',''); -REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 3, 0; itemskill PR_GLORIA, 2;','',''); -REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0, 3; itemskill PR_MAGNIFICAT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(3, 0); itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal(0, 3); itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12378','2009_Rice_Cake_Soup','Rice Cake Soup','2','0','10','5','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50, 50;','',''); REPLACE INTO `item_db` VALUES ('12379','Popes_Cookie','Pope Cookie','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12380','Desert_Wolf_Babe_Scroll','Job Change Flute','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','mercenary_create M_DESERT_WOLF_B, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12381','ValkyrieA_Scroll','Ancient Language Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_arch02\") { mercenary_create VALKYRIE_A, 1800000; }','',''); REPLACE INTO `item_db` VALUES ('12382','ValkyrieB_Scroll','Ancient Language Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_arch02\") { mercenary_create VALKYRIE_B, 1800000; }','',''); REPLACE INTO `item_db` VALUES ('12383','Vulcan_Bullet_Magazine','Vulcan Bullet Magazine','2','0','13750','6875','500','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Vulcan_Bullet, 1000;','',''); -REPLACE INTO `item_db` VALUES ('12384','Rainbow_Ruby_Water','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_FROSTMISTY,5; }','',''); -REPLACE INTO `item_db` VALUES ('12385','Rainbow_Ruby_Fire','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_CRIMSONROCK,5; }','',''); -REPLACE INTO `item_db` VALUES ('12386','Rainbow_Ruby_Wind','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_CHAINLIGHTNING,5; }','',''); -REPLACE INTO `item_db` VALUES ('12387','Rainbow_Ruby_Earth','Rainbow Ruby','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_EARTHSTRAIN,5; }','',''); -REPLACE INTO `item_db` VALUES ('12388','Runstone_Crush','Rhydo Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_rune02\") { itemskill RK_CRUSHSTRIKE,1; }','',''); -REPLACE INTO `item_db` VALUES ('12389','Runstone_Storm','Pertz Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_rune02\") { itemskill RK_STORMBLAST,1; }','',''); -REPLACE INTO `item_db` VALUES ('12390','Runstone_Millennium','Verkana Runestone For Apprentice','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_rune02\") { itemskill RK_MILLENNIUMSHIELD,1; }','',''); +REPLACE INTO `item_db` VALUES ('12384','Rainbow_Ruby_Water','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_FROSTMISTY,5; }','',''); +REPLACE INTO `item_db` VALUES ('12385','Rainbow_Ruby_Fire','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_CRIMSONROCK,5; }','',''); +REPLACE INTO `item_db` VALUES ('12386','Rainbow_Ruby_Wind','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_CHAINLIGHTNING,5; }','',''); +REPLACE INTO `item_db` VALUES ('12387','Rainbow_Ruby_Earth','Rainbow Ruby','2','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_war02\") { itemskill WL_EARTHSTRAIN,5; }','',''); +REPLACE INTO `item_db` VALUES ('12388','Runstone_Crush','Rhydo Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if(strcharinfo(PC_MAP)==\"job3_rune02\") { itemskill RK_CRUSHSTRIKE,1; }','',''); +REPLACE INTO `item_db` VALUES ('12389','Runstone_Storm','Pertz Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_rune02\") itemskill(RK_STORMBLAST, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12390','Runstone_Millennium','Verkana Runestone For Apprentice','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','if (strcharinfo(PC_MAP) == \"job3_rune02\") itemskill(RK_MILLENNIUMSHIELD, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12391','Lucky_Egg_C','RWC Groove Pack','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12392','RepairA','Repair A','0','0','275','137','100','0','0','0','0','0','1024','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(200,300), 0;','',''); REPLACE INTO `item_db` VALUES ('12393','RepairB','Repair B','0','0','625','312','140','0','0','0','0','0','1024','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(300,400), 0;','',''); REPLACE INTO `item_db` VALUES ('12394','RepairC','Repair C','0','0','1375','687','180','0','0','0','0','0','1024','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','if(checkmount() == MOUNT_MADO) itemheal rand(400,500), 0;','',''); REPLACE INTO `item_db` VALUES ('12395','Tantanmen','Tantan Noodle','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','pet CHUNG_E;','',''); -REPLACE INTO `item_db` VALUES ('12396','Fools_Day_Box','Gift Box?','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill AL_TELEPORT,1; else if (.@temp == 2) itemskill AL_TELEPORT,3; else if (.@temp == 3) percentheal 50,0; else if (.@temp == 4) percentheal 0,50; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Apple,1; else if (.@temp == 7) itemskill ALL_REVERSEORCISH,1; else if (.@temp == 8) specialeffect(EF_MAPPILLAR2, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_ANGEL2, AREA, playerattached()); else specialeffect(EF_COIN, AREA, playerattached());','',''); -REPLACE INTO `item_db` VALUES ('12397','Fools_Day_Box2','Gift Box?','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill TF_DETOXIFY,1; else if (.@temp == 2) itemskill TF_PICKSTONE,1; else if (.@temp == 3) itemskill BA_FROSTJOKER,1; else if (.@temp == 4) itemskill DC_SCREAM,1; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Jellopy,1; else if (.@temp == 7) itemskill AL_RUWACH,1; else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); else specialeffect(EF_CURSEATTACK, AREA, playerattached());','',''); +REPLACE INTO `item_db` VALUES ('12396','Fools_Day_Box','Gift Box?','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1,10); if (.@temp == 1) itemskill AL_TELEPORT,1; else if (.@temp == 2) itemskill AL_TELEPORT,3; else if (.@temp == 3) percentheal 50,0; else if (.@temp == 4) percentheal 0,50; else if (.@temp == 5) percentheal 50,50; else if (.@temp == 6) getitem Apple,1; else if (.@temp == 7) itemskill ALL_REVERSEORCISH,1; else if (.@temp == 8) specialeffect(EF_MAPPILLAR2, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_ANGEL2, AREA, playerattached()); else specialeffect(EF_COIN, AREA, playerattached());','',''); +REPLACE INTO `item_db` VALUES ('12397','Fools_Day_Box2','Gift Box?','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','.@temp = rand(1, 10); if (.@temp == 1) itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF); else if (.@temp == 2) itemskill(TF_PICKSTONE, 1); else if (.@temp == 3) itemskill(BA_FROSTJOKER, 1); else if (.@temp == 4) itemskill(DC_SCREAM, 1); else if (.@temp == 5) announce(strcharinfo(PC_NAME) + \" shouts : I am a fool!!!\", bc_all, C_WHITE); else if (.@temp == 6) getitem(Jellopy, 1); else if (.@temp == 7) itemskill(AL_RUWACH, 1); else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached()); else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached()); else specialeffect(EF_CURSEATTACK, AREA, playerattached());','',''); REPLACE INTO `item_db` VALUES ('12398','PCBang_Gift_Box','PCRoom Gift Box','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12399','Castle_Treasure_Box','Castle Treasure Box','2','0','20','10','1000','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12400','Water_Of_Blessing_','Water Of Blessing','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -6243,7 +6245,7 @@ REPLACE INTO `item_db` VALUES ('12401','Rune_Kn_Test_Int','Rune Kn Test Int','2' REPLACE INTO `item_db` VALUES ('12402','29Fruit','29Truth','0','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 5,5;','',''); REPLACE INTO `item_db` VALUES ('12403','Lucky_Egg_C2','RWC2011 Lucky Scroll','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12404','Acti_Potion','Activation Potion','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12405','Underripe_Yggseed','Unripe Seed Of Yggdrasil','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 30,30; skilleffect AL_BLESSING,0; sc_start SC_BLESSING,140000,5;','',''); +REPLACE INTO `item_db` VALUES ('12405','Underripe_Yggseed','Unripe Seed Of Yggdrasil','2','0','20','10','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal(30, 30); itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12406','Psychic_ArmorS','Psychic Armor Scroll','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENERGYCOAT, AREA, playerattached()); sc_start4 SC_ARMOR_PROPERTY, 10000, 1, Ele_Neutral, 1, 0;','',''); REPLACE INTO `item_db` VALUES ('12407','PCBang_Coupon_Box','PCRoom Coupon Box','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12408','Leaf_Cat_Ball','Hydra Ball','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','pet E_HYDRA;','',''); @@ -6252,7 +6254,7 @@ REPLACE INTO `item_db` VALUES ('12410','Spareribs_H','Thick Pork Belly','2','0', REPLACE INTO `item_db` VALUES ('12411','HE_Battle_Manual','HE Battle Manual','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,900000,200;','',''); REPLACE INTO `item_db` VALUES ('12412','HE_Bubble_Gum','HE Bubble Gum','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_RECEIVEITEM,900000,300;','',''); REPLACE INTO `item_db` VALUES ('12413','PCBang_Coupon_Box2','PCRoom Coupon Box','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12414','Guarana_Candy','Guarana Candy','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION1,1800000,0; sc_start SC_INC_AGI,140000,5; skilleffect AL_INCAGI,0;','',''); +REPLACE INTO `item_db` VALUES ('12414','Guarana_Candy','Guarana Candy','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start(SC_ATTHASTE_POTION1, 1800000, 0); itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12415','Siege_Teleport_Scroll2','Siege Map Teleport Scroll II','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12416','Lucky_Egg_C3','Thanksgiving Groove Pack','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12417','Boost500','Boost500','2','0','100','50','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_BOOST500, 500000, 10;','',''); @@ -6296,13 +6298,13 @@ REPLACE INTO `item_db` VALUES ('12454','F_WOB_Local','Blue Butterfly Wing','2',' REPLACE INTO `item_db` VALUES ('12456','F_Greed_Scroll','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12457','F_Glass_Of_Illusion','Glass Of Illusion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12458','F_Abrasive','Abrasive','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12459','F_Med_Life_Potion','Medium Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12460','F_Small_Life_Potion','Small Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12461','F_Regeneration_Potion','Regeneration Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12462','F_B_Mdef_Potion','Big Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12463','F_S_Mdef_Potion','Small Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12464','F_B_Def_Potion','Big Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12465','F_S_Def_Potion','Small Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('12459','F_Med_Life_Potion','Medium Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); sc_start2(SC_M_LIFEPOTION, 600000, -7, 4);','',''); +REPLACE INTO `item_db` VALUES ('12460','F_Small_Life_Potion','Small Life Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HEAL3, AREA, playerattached()); /* Probably it should be 5% instead of 7%, but we\'ll follow the client side description... */ sc_start2(SC_S_LIFEPOTION, 600000, -7, 4);','',''); +REPLACE INTO `item_db` VALUES ('12461','F_Regeneration_Potion','Regeneration Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start(SC_HEALPLUS, 1800000, 20);','',''); +REPLACE INTO `item_db` VALUES ('12462','F_B_Mdef_Potion','Big Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start(SC_PROTECT_MDEF, 180000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12463','F_S_Mdef_Potion','Small Magic Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start(SC_PROTECT_MDEF, 60000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12464','F_B_Def_Potion','Big Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_GUARD, AREA, playerattached()); sc_start(SC_PROTECT_DEF, 180000, 3);','',''); +REPLACE INTO `item_db` VALUES ('12465','F_S_Def_Potion','Small Defense Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_GUARD, AREA, playerattached()); sc_start(SC_PROTECT_DEF, 60000, 3);','',''); REPLACE INTO `item_db` VALUES ('12466','F_Blessing_10_Scroll','LV10 Blessing Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12467','F_Inc_Agi_10_Scroll','LV10 Agil Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12468','F_Aspersio_5_Scroll','LV5 Aspersio Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -6535,9 +6537,9 @@ REPLACE INTO `item_db` VALUES ('12702','Old_Bleu_Box','Old Blue Box','2','0','0' REPLACE INTO `item_db` VALUES ('12703','Holy_Egg_2','Holy Egg','11','0','0','0','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12704','Elixir_Of_Life','Elixir of Life','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','85',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','',''); REPLACE INTO `item_db` VALUES ('12705','Noble_Nameplate','Noble Nameplate','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','90',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,1800000,100;','',''); -REPLACE INTO `item_db` VALUES ('12706','Lucky_Cookie01','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_GLORIA,5;','',''); -REPLACE INTO `item_db` VALUES ('12707','Lucky_Cookie02','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,1;','',''); -REPLACE INTO `item_db` VALUES ('12708','Lucky_Cookie03','Lucky Cookie','11','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill PR_IMPOSITIO,3;','',''); +REPLACE INTO `item_db` VALUES ('12706','Lucky_Cookie01','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12707','Lucky_Cookie02','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('12708','Lucky_Cookie03','Lucky Cookie','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('12709','Guyak_Candy','Guyak Candy','0','0','0','0','150','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 30,30;','',''); REPLACE INTO `item_db` VALUES ('12710','Guyak_Pudding','Guyak Pudding','2','0','0','0','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_MOVHASTE_POTION, 300000, 100;','',''); REPLACE INTO `item_db` VALUES ('12711','Pretzel','Pretzel','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','50',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemheal rand(50,90),0;','',''); @@ -6554,15 +6556,15 @@ REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','0','2','1','20 REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_ENCHANTPOISON, AREA, playerattached()); sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nosiege Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'60','1','0','itemskill RK_REFRESH, 1;','',''); -REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Rhydo Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'60','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); -REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Verkana Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'60','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); -REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isia Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); -REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Asir Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); -REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Urj Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_ABUNDANCE, 1;','',''); -REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Turisus Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_GIANTGROWTH, 1;','',''); -REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Pertz Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_STORMBLAST, 1;','',''); -REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalas Runestone','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); +REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nosiege Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'60','1','0','itemskill RK_REFRESH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Rhydo Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'60','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Verkana Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'60','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); +REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isia Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); +REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Asir Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Urj Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_ABUNDANCE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Turisus Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_GIANTGROWTH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Pertz Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'0',NULL,'0','itemskill RK_STORMBLAST, 1;','',''); +REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalas Runestone','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'60','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Quality Rough Runestone','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rough Runestone','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rough Runestone','0','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); @@ -6625,7 +6627,7 @@ REPLACE INTO `item_db` VALUES ('12792','P_Combat_Pill','Advanced Magic Battle Se REPLACE INTO `item_db` VALUES ('12793','Combat_Pill_Box10','Magic Battle Serum Box','11','0','20','10','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Combat_Pill, 10;','',''); REPLACE INTO `item_db` VALUES ('12794','P_Combat_Pill_Box10','Advanced Magic Battle Serum Box','11','0','20','10','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem P_Combat_Pill, 10;','',''); REPLACE INTO `item_db` VALUES ('12795','2011_RWC_Scroll_Kr','2011 RWC Scroll','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12796','Red_Booster','Red Boost','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,(getskilllv(AC_CONCENTRATION)<3?3:getskilllv(AC_CONCENTRATION));','',''); +REPLACE INTO `item_db` VALUES ('12796','Red_Booster','Red Boost','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill AC_CONCENTRATION,(getskilllv(AC_CONCENTRATION)<3?3:getskilllv(AC_CONCENTRATION));','',''); REPLACE INTO `item_db` VALUES ('12797','Wish_Maiden_Scroll','Wish Maiden Scroll','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','mercenary_create MER_WISH_MAIDEN, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12798','Zealotus_Scroll','Zealotus Scroll','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','mercenary_create MER_ZHERLTHSH, 1800000;','',''); REPLACE INTO `item_db` VALUES ('12800','Ktullanux_Scroll','Ktullanux Scroll','11','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','mercenary_create MER_KTULLANUX, 1800000;','',''); @@ -6635,10 +6637,10 @@ REPLACE INTO `item_db` VALUES ('12806','Scaraba_Scroll','Antler Scaraba Scroll', REPLACE INTO `item_db` VALUES ('12807','Mercenary_Casting_','Mercenary Casting','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','20',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem Bow_Mercenary_Scroll8,5; getitem SwordMercenary_Scroll8,5; getitem Spear_Mercenary_Scroll8,5; getitem Mother_Love_Box,1;','',''); REPLACE INTO `item_db` VALUES ('12808','Mother_Love_Box','Mother_Love_Box','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','rentitem Mother_Heart,1209600;','',''); REPLACE INTO `item_db` VALUES ('12809','Level_Up_Box','Level Up Box','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','120',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Comp_Battle_Manual,5; getitem Comp_Bubble_Gum,5; getitem Comp_Insurance,5; getitem Reward_Job_BM25,5; getitem Zherlthsh_Tck_Box_,1;','',''); -REPLACE INTO `item_db` VALUES ('12812','Snow_Flip','Snow Flip','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SNOWFLIP,1;','',''); -REPLACE INTO `item_db` VALUES ('12813','Peony_Mommy','Peony Mamy','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_PEONYMAMY,1;','',''); -REPLACE INTO `item_db` VALUES ('12814','Slapping_Herb','Sadagui','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SADAGUI,1;','',''); -REPLACE INTO `item_db` VALUES ('12815','Yggdrasil_Dust','Sequoia Dust','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SEQUOIADUST,1;','',''); +REPLACE INTO `item_db` VALUES ('12812','Snow_Flip','Snow Flip','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SNOWFLIP,1;','',''); +REPLACE INTO `item_db` VALUES ('12813','Peony_Mommy','Peony Mamy','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_PEONYMAMY,1;','',''); +REPLACE INTO `item_db` VALUES ('12814','Slapping_Herb','Sadagui','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SADAGUI,1;','',''); +REPLACE INTO `item_db` VALUES ('12815','Yggdrasil_Dust','Sequoia Dust','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SEQUOIADUST,1;','',''); REPLACE INTO `item_db` VALUES ('12817','Old_Card_Album_','Old Card Album','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','80',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12818','High_Weapon_Box_','Advanced Weapons Box','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','100',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','getitem Level_Up_Box,1;','',''); REPLACE INTO `item_db` VALUES ('12819','Zherlthsh_Tck_Box_','Zherlthsh Ticket Box','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','150',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Zherlthsh_Ticket,1;','',''); @@ -6700,7 +6702,7 @@ REPLACE INTO `item_db` VALUES ('12924','Pet_Egg_Scroll_Box2','Anniversary Destin REPLACE INTO `item_db` VALUES ('12925','Pet_Egg_Scroll1','Kafra Item Mall Prize Package','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12926','Pet_Egg_Scroll2','Anniversary Destiny Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db` VALUES ('12927','J_Aspersio_5_Scroll_Box','Aspersio Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12928,10;','',''); -REPLACE INTO `item_db` VALUES ('12928','J_Aspersio_5_Scroll','Sacred Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_ASPERSIO,5;','',''); +REPLACE INTO `item_db` VALUES ('12928','J_Aspersio_5_Scroll','Sacred Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_ASPERSIO,5;','',''); REPLACE INTO `item_db` VALUES ('12929','Pet_Egg_Scroll_Box3','Pet Egg Box 3','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12932,1;','',''); REPLACE INTO `item_db` VALUES ('12930','Pet_Egg_Scroll_Box4','Pet Egg Box 4','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12933,1;','',''); REPLACE INTO `item_db` VALUES ('12931','Pet_Egg_Scroll_Box5','Playspan 5x Easter Lucky Pack','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12934,1;','',''); @@ -6740,9 +6742,9 @@ REPLACE INTO `item_db` VALUES ('12964','Vesper_Core04_Box','Vesper Core 04 Box', REPLACE INTO `item_db` VALUES ('12965','Emergency_Box1','Emergency Level 1 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12968,1;','',''); REPLACE INTO `item_db` VALUES ('12966','Emergency_Box2','Emergency Level 2 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12969,1;','',''); REPLACE INTO `item_db` VALUES ('12967','Emergency_Box3','Emergency Level 3 Scroll Box','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12970,1;','',''); -REPLACE INTO `item_db` VALUES ('12968','Emergency_Scroll1','Emergency Level 1 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); -REPLACE INTO `item_db` VALUES ('12969','Emergency_Scroll2','Emergency Level 2 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); -REPLACE INTO `item_db` VALUES ('12970','Emergency_Scroll3','Emergency Level 3 Scroll','11','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12968','Emergency_Scroll1','Emergency Level 1 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12969','Emergency_Scroll2','Emergency Level 2 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); +REPLACE INTO `item_db` VALUES ('12970','Emergency_Scroll3','Emergency Level 3 Scroll','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill GD_EMERGENCYCALL,1;','',''); REPLACE INTO `item_db` VALUES ('12971','Teleport_Box1','Teleport Scroll Box 1','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12977,10;','',''); REPLACE INTO `item_db` VALUES ('12972','Teleport_Box2','Teleport Scroll Box 2','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12978,10;','',''); REPLACE INTO `item_db` VALUES ('12973','Teleport_Box3','Teleport Scroll Box 3','18','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 12979,10;','',''); @@ -6877,6 +6879,8 @@ REPLACE INTO `item_db` VALUES ('13114','P_Revolver3','Eden Group Revolver III',' REPLACE INTO `item_db` VALUES ('13115','Upg_Revolver','Upgrade Revolver','4','17','20','10','500','35','0','0','7','1','16777216','1','2','34','3','0',NULL,'1','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bBaseAtk,(getrefine()*5); bonus bLongAtkRate,(getrefine()*2); if(BaseLevel>70) { bonus bBaseAtk,(((BaseLevel-70)/10)*5); }','',''); REPLACE INTO `item_db` VALUES ('13116','Novice_Revolver','Beginner Revolver','4','17','0','0','500','20','0','0','7','0','16777216','1','2','34','1','0',NULL,'0','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bHit,-5;','',''); REPLACE INTO `item_db` VALUES ('13117','TE_Woe_Pistol','TE Woe Pistol','4','17','0','0','0','60','0','0','7','0','1090519040','63','2','34','3','40',NULL,'0','0','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','bonus2 bAddRace,RC_Player,40; bonus2 bAddEff,Eff_Curse,1000;','',''); +REPLACE INTO `item_db` VALUES ('13118','Tiny_Flame','Fading Flame','4','17','0','0','100','0','0','0','7','0','1090519040','63','2','34','1','1',NULL,'1','0','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('13119','Freedom_Flame','Freedom Flame','4','17','0','0','100','100','0','0','7','2','1090519040','63','2','34','3','99',NULL,'1','0','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('13120','H_FEATHER_H_FIRE','Heaven\'s_Feather_&_Hell\'s_Fire','4','17','1250000','625000','800','150','0','0','9','1','1090519040','63','2','34','3','99',NULL,'1','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,GS_DESPERADO,20; bonus2 bSkillAtk,RL_FALLEN_ANGEL,20;','',''); REPLACE INTO `item_db` VALUES ('13122','ALTAIR_ARES','Altea & Ares','4','17','1450000','725000','1000','200','0','0','9','0','1073741824','63','2','34','3','140',NULL,'1','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bHit,5; bonus bDelayrate,10; bonus bLongAtkRate,30;','',''); REPLACE INTO `item_db` VALUES ('13124','ALTAIR_ARES_','Altea & Ares','4','17','1450000','725000','1000','200','0','0','9','1','1073741824','63','2','34','3','140',NULL,'1','0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bHit,5; bonus bDelayrate,10; bonus bLongAtkRate,30;','',''); @@ -6952,13 +6956,18 @@ REPLACE INTO `item_db` VALUES ('13217','Freezing_Bullet','Freezing Bullet','10', REPLACE INTO `item_db` VALUES ('13218','Electric_Shock_Bullet','Lightning Bullet','10','3','10','5','2','40','0','0','0','0','1090519040','63','2','32768','0','100',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Wind;','',''); REPLACE INTO `item_db` VALUES ('13219','Magical_Stone_Bullet','Magic Stone Bullet','10','3','10','5','2','40','0','0','0','0','1090519040','63','2','32768','0','100',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Earth;','',''); REPLACE INTO `item_db` VALUES ('13220','Sanctified_Bullet','Purifying Bullet','10','3','10','5','2','40','0','0','0','0','1090519040','63','2','32768','0','100',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Holy;','',''); -REPLACE INTO `item_db` VALUES ('13221','Silver_Bullet_','Silver Bullet','10','3','5','2','2','15','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Holy;','',''); -REPLACE INTO `item_db` VALUES ('13222','Shell_Of_Blood_','Bloody Shell','10','3','10','5','2','30','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Neutral; bonus2 bAddEff, Eff_Bleeding, 100;','',''); -REPLACE INTO `item_db` VALUES ('13223','Flare_Sphere_','Incendiary Grenade','10','3','15','7','5','50','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Fire;','',''); -REPLACE INTO `item_db` VALUES ('13224','Lighting_Sphere_','Lightning Grenade','10','3','15','7','5','50','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Wind;','',''); -REPLACE INTO `item_db` VALUES ('13225','Poison_Sphere_','Poison Grenade','10','3','15','7','5','50','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Poison; bonus2 bAddEff, Eff_Poison, 500;','',''); -REPLACE INTO `item_db` VALUES ('13226','Blind_Sphere_','Flash Grenade','10','3','15','7','5','50','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Dark; bonus2 bAddEff, Eff_Blind, 500;','',''); -REPLACE INTO `item_db` VALUES ('13227','Freezing_Sphere_','Cyro Grenade','10','3','15','7','5','50','0','0','0','0','16777216','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Water;','',''); +REPLACE INTO `item_db` VALUES ('13221','Silver_Bullet_','Silver Bullet','10','3','5','2','2','15','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Holy;','',''); +REPLACE INTO `item_db` VALUES ('13222','Shell_Of_Blood_','Bloody Shell','10','3','10','5','2','30','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Neutral; bonus2 bAddEff, Eff_Bleeding, 100;','',''); +REPLACE INTO `item_db` VALUES ('13223','Flare_Sphere_','Incendiary Grenade','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Fire;','',''); +REPLACE INTO `item_db` VALUES ('13224','Lighting_Sphere_','Lightning Grenade','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Wind;','',''); +REPLACE INTO `item_db` VALUES ('13225','Poison_Sphere_','Poison Grenade','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Poison; bonus2 bAddEff, Eff_Poison, 500;','',''); +REPLACE INTO `item_db` VALUES ('13226','Blind_Sphere_','Flash Grenade','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Dark; bonus2 bAddEff, Eff_Blind, 500;','',''); +REPLACE INTO `item_db` VALUES ('13227','Freezing_Sphere_','Cyro Grenade','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Water;','',''); +REPLACE INTO `item_db` VALUES ('13228','Flare_Bullet','Flare Bullet','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Fire;','',''); +REPLACE INTO `item_db` VALUES ('13229','Lightning_Bullet','Lightning Bullet','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Wind;','',''); +REPLACE INTO `item_db` VALUES ('13230','Ice_Bullet','Ice Bullet','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Water;','',''); +REPLACE INTO `item_db` VALUES ('13231','Poison_Bullet','Poison Bullet','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Poison; bonus2 bAddEff, Eff_Poison, 500;','',''); +REPLACE INTO `item_db` VALUES ('13232','Blind_Bullet','Blind Bullet','10','3','15','7','5','50','0','0','0','0','1090519040','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtkEle, Ele_Dark; bonus2 bAddEff, Eff_Blind, 500;','',''); REPLACE INTO `item_db` VALUES ('13250','Shuriken','Shuriken','10','6','4','2','5','10','0','0','0','0','33554432','63','2','32768','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('13251','Nimbus_Shuriken','Nimbus Shuriken','10','6','10','5','5','30','0','0','0','0','33554432','63','2','32768','0','20',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('13252','Flash_Shuriken','Flash Shuriken','10','6','20','10','5','45','0','0','0','0','33554432','63','2','32768','0','40',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -7935,16 +7944,16 @@ REPLACE INTO `item_db` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2',' REPLACE INTO `item_db` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','0','800','400','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION1,1800000,4;','',''); REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','0','1500','750','20','0','0','0','0','0','2145902319','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION2,1800000,6;','',''); REPLACE INTO `item_db` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','0','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_ATTHASTE_POTION3,1800000,9;','',''); -REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_METEOR,10;','',''); -REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_STORMGUST,10;','',''); -REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','',''); -REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','',''); -REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','',''); -REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5;','',''); -REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5;','',''); -REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5;','',''); -REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5;','',''); -REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1;','',''); +REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_METEOR,10;','',''); +REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_STORMGUST,10;','',''); +REPLACE INTO `item_db` VALUES ('14514','Vermilion_10_Scroll','Lord of Vermilion Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill WZ_VERMILION,10;','',''); +REPLACE INTO `item_db` VALUES ('14515','Lex_Aeterna_Scroll','Lex Aeterna Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_LEXAETERNA,1;','',''); +REPLACE INTO `item_db` VALUES ('14516','Magnificat_5_Scroll','Magnificat Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill PR_MAGNIFICAT,5;','',''); +REPLACE INTO `item_db` VALUES ('14517','CP_Helm_Scroll','Chemical Protection Helm Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_HELM, 5);','',''); +REPLACE INTO `item_db` VALUES ('14518','CP_Shield_Scroll','Chemical Protection Shield Scrol','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_SHIELD, 5);','',''); +REPLACE INTO `item_db` VALUES ('14519','CP_Armor_Scroll','Chemical Protection Armor Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_ARMOR, 5);','',''); +REPLACE INTO `item_db` VALUES ('14520','CP_Weapon_Scroll','Chemical Protection Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(AM_CP_WEAPON, 5);','',''); +REPLACE INTO `item_db` VALUES ('14521','Repair_Scroll','Repair Weapon Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_REPAIRWEAPON, 1);','',''); REPLACE INTO `item_db` VALUES ('14522','Big_Bun','Big Bun','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,0;','',''); REPLACE INTO `item_db` VALUES ('14523','Pill_','Pill','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 0,100;','',''); REPLACE INTO `item_db` VALUES ('14524','Superb_Fish_Slice','Superb Fish Slice','0','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); @@ -7952,7 +7961,7 @@ REPLACE INTO `item_db` VALUES ('14525','Chewy_Ricecake','Chewy Ricecake','2','0' REPLACE INTO `item_db` VALUES ('14526','Oriental_Pastry','Oriental Pastry','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PLUSMAGICPOWER, 1800000, 10;','',''); REPLACE INTO `item_db` VALUES ('14527','Dun_Tele_Scroll1','Dungeon Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashDungeon\",1;','',''); REPLACE INTO `item_db` VALUES ('14528','PVP_Tele_Scroll','PVP Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('14529','Greed_Scroll','Greed Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill BS_GREED,1;','',''); +REPLACE INTO `item_db` VALUES ('14529','Greed_Scroll','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14530','Flee_30_Scroll','Evasion Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE,1800000,30;','',''); REPLACE INTO `item_db` VALUES ('14531','Accuracy_30_Scroll','Concentration Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT,1800000,30;','',''); REPLACE INTO `item_db` VALUES ('14532','Battle_Manual25','Field Manual 25%','2','0','2','1','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSEXP,1800000,25;','',''); @@ -8010,19 +8019,19 @@ REPLACE INTO `item_db` VALUES ('14583','WOB_Schwaltz','Green Butterfly Wing','2' REPLACE INTO `item_db` VALUES ('14584','WOB_Rachel','Red Butterfly Wing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashCity\",3;','',''); REPLACE INTO `item_db` VALUES ('14585','WOB_Local','Blue Butterfly Wing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','callfunc \"F_CashCity\",4;','',''); REPLACE INTO `item_db` VALUES ('14586','Spark_Candy','Jumping Candy','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','180000','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_HASTEUP, AREA, playerattached()); sc_start2 SC_STEAMPACK, 60000, 20, 25;','',''); -REPLACE INTO `item_db` VALUES ('14587','Repair_Scroll_','Equipment Repair Spell Book','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill BS_REPAIRWEAPON,1;','',''); -REPLACE INTO `item_db` VALUES ('14588','Pty_Blessing_Scroll','Party Blessing 10 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_BLESSING,10;','',''); -REPLACE INTO `item_db` VALUES ('14589','Pty_Inc_Agi_Scroll','Party Increase Agi 10 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_INCAGI,10;','',''); -REPLACE INTO `item_db` VALUES ('14590','Pty_Assumptio_Scroll','Party Assumptio 5 Scroll','11','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill CASH_ASSUMPTIO,5;','',''); +REPLACE INTO `item_db` VALUES ('14587','Repair_Scroll_','Equipment Repair Spell Book','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill BS_REPAIRWEAPON,1;','',''); +REPLACE INTO `item_db` VALUES ('14588','Pty_Blessing_Scroll','Party Blessing 10 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14589','Pty_Inc_Agi_Scroll','Party Increase Agi 10 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14590','Pty_Assumptio_Scroll','Party Assumptio 5 Scroll','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14591','Siege_Teleport_Scroll','WoE Teleport Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','callfunc \"F_CashSiegeTele\";','',''); REPLACE INTO `item_db` VALUES ('14592','Job_Manual50','Job Battle Manual','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','sc_start SC_CASH_PLUSONLYJOBEXP,1800000,50;','',''); -REPLACE INTO `item_db` VALUES ('14593','Magic_Power_Scroll','Mystical Amplification Scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill HW_MAGICPOWER,10;','',''); -REPLACE INTO `item_db` VALUES ('14594','Quagmire_Scroll','Quagmire scroll','11','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_QUAGMIRE,5;','',''); +REPLACE INTO `item_db` VALUES ('14593','Magic_Power_Scroll','Mystical Amplification Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); +REPLACE INTO `item_db` VALUES ('14594','Quagmire_Scroll','Quagmire scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill WZ_QUAGMIRE,5;','',''); REPLACE INTO `item_db` VALUES ('14595','Unsealed_Magic_Spell','Unsealed Magic Spell','2','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','warp \"yuno_fild09\",255,127;','',''); REPLACE INTO `item_db` VALUES ('14596','Pierre_Treasurebox','Pierre\'s Treasurebox','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1; getrandgroupitem 14596,1;','',''); REPLACE INTO `item_db` VALUES ('14597','PhreeoniS','Phreeoni Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICHIT, 180000, 100;','',''); REPLACE INTO `item_db` VALUES ('14598','GhostringS','Ghostring Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start4 SC_ARMOR_PROPERTY, 60000, 1, Ele_Neutral, 1, 0;','',''); -REPLACE INTO `item_db` VALUES ('14599','Greed_Scroll_C','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('14599','Greed_Scroll_C','Greed Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'0',NULL,'0','itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF);','',''); REPLACE INTO `item_db` VALUES ('14600','Mental_Potion','Mental Potion','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_SPELLBREAKER, AREA, playerattached()); sc_start SC_TARGET_ASPD, 1800000, 10;','',''); REPLACE INTO `item_db` VALUES ('14601','Tyrs_Blessing','Tyr\'s Blessing','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_BASICAVOIDANCE, 300000, 30; sc_start SC_FOOD_BASICHIT, 300000, 30; sc_start SC_PLUSATTACKPOWER, 300000, 20; sc_start SC_PLUSMAGICPOWER, 300000, 20;','',''); REPLACE INTO `item_db` VALUES ('14602','TaogunkaS','Tao Gunka Scroll','2','0','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','specialeffect(EF_LIGHTSPHERE, AREA, playerattached()); sc_start4 SC_MVPCARD_TAOGUNKA, 1800000, 100, 50, 50, 0;','',''); @@ -9996,7 +10005,7 @@ REPLACE INTO `item_db` VALUES ('22514','Candy_Holder','Candy Holder','11','0','2 REPLACE INTO `item_db` VALUES ('22515','Key_Of_Twisted_Time','Twisted Key of Time','3','0','10','5','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22534','Closedmind_Box','Closed Mind Box','18','0','10','5','1000','0','0','0','0','0','18446744073709551615','63','2','0','0','1',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22537','PrizeOfHero','Prize Of Hero','2','0','0','0','100','0','0','0','0','0','18446744073709551615','63','2','0','0','1',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'60','1','0','itemskill RK_LUXANIMA, 1;','',''); +REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','2','0','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'60','1','0','itemskill RK_LUXANIMA, 1;','',''); REPLACE INTO `item_db` VALUES ('22669','HALLOWEEN_G_BOX','Halloween Box','2','0','0','0','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 22669,1;','',''); REPLACE INTO `item_db` VALUES ('22670','DARK_INVITATION','Invitation of Darkness','2','0','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','.@temp = rand(1,3); if (.@temp == 1) { specialeffect(EF_DEVIL, AREA, playerattached()); warp \"niflheim\",193,186; } else if (.@temp == 2) { specialeffect(EF_DEVIL, AREA, playerattached()); warp \"niflheim\",106,254; } else { specialeffect(EF_DEVIL, AREA, playerattached()); warp \"niflheim\",347,255; }','',''); REPLACE INTO `item_db` VALUES ('22675','Mysterious_Scroll','Mysterious Scroll','2','0','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_INT,3600000,30;','',''); @@ -10680,6 +10689,7 @@ REPLACE INTO `item_db` VALUES ('24580','S_Banish_Cannon_Shoes','S_Banish_Cannon_ REPLACE INTO `item_db` VALUES ('24581','S_Genesis_Weapon','S_Genesis_Weapon','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('24582','S_Genesis_Pendant','S_Genesis_Pendant','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('24583','S_Genesis_Earing','S_Genesis_Earing','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db` VALUES ('25187','Slug_Bullet','Slug Bullet','3','0','1200','600','1200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('25258','BrokenArrow','BrokenArrow','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('25265','Shining_Spore','Shining_Spore','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('25266','Dried_Leaf_Of_Ygg','Dried_Leaf_Of_Ygg','3','0','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); diff --git a/sql-files/main.sql b/sql-files/main.sql index 258c7293a..4e75ccc8b 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -935,6 +935,7 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1565293394); -- 2019-08-0 INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1570309293); -- 2019-10-05--19-01.sql INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1570870260); -- 2019-10-21--14-21.sql INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1574463539); -- 2019-11-22--23-58.sql +INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1579817630); -- 2020-01-24--01-09.sql -- -- Table structure for table `storage` @@ -1032,3 +1033,46 @@ CREATE TABLE IF NOT EXISTS `npc_barter_data` ( `priceAmount` INT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`name`, `itemid`, `priceId`, `priceAmount`) ) ENGINE=MyISAM; + +CREATE TABLE IF NOT EXISTS `npc_expanded_barter_data` ( + `name` VARCHAR(24) NOT NULL DEFAULT '', + `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyId1` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount1` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine1` INT(11) NOT NULL DEFAULT '0', + `currencyId2` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount2` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine2` INT(11) NOT NULL DEFAULT '0', + `currencyId3` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount3` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine3` INT(11) NOT NULL DEFAULT '0', + `currencyId4` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount4` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine4` INT(11) NOT NULL DEFAULT '0', + `currencyId5` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount5` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine5` INT(11) NOT NULL DEFAULT '0', + `currencyId6` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount6` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine6` INT(11) NOT NULL DEFAULT '0', + `currencyId7` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount7` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine7` INT(11) NOT NULL DEFAULT '0', + `currencyId8` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount8` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine8` INT(11) NOT NULL DEFAULT '0', + `currencyId9` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount9` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine9` INT(11) NOT NULL DEFAULT '0', + `currencyId10` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount10` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine10` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`name`, `itemid`, `zeny`, + `currencyId1`, `currencyAmount1`, `currencyRefine1`, + `currencyId2`, `currencyAmount2`, `currencyRefine2`, + `currencyId3`, `currencyAmount3`, `currencyRefine3`, + `currencyId4`, `currencyAmount4`, `currencyRefine4` +) +) ENGINE=MyISAM; diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql index 80f5677e3..713054e9c 100644 --- a/sql-files/mob_db_re.sql +++ b/sql-files/mob_db_re.sql @@ -1412,6 +1412,7 @@ REPLACE INTO `mob_db` VALUES (2410,'DUMMY_100','Lv 100','Lv 100',100,99999999,1, REPLACE INTO `mob_db` VALUES (2411,'DUMMY_150','Lv 150','Lv 150',150,99999999,1,0,0,0,0,0,120,120,0,0,0,0,0,0,1,1,1,0,20,32768,200,398,199,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); REPLACE INTO `mob_db` VALUES (2413,'DUMMY_10_FIRE','Lv 10 (Fire)','Lv 10 (Fire)',10,99999999,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,23,32768,200,398,199,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); REPLACE INTO `mob_db` VALUES (2414,'RUNAWAY_BOOK','Runaway Book','Runaway Book',1,10,1,1,1,1,6,9,1,1,1,1,1,0,1,1,10,12,0,0,20,12417,150,864,500,192,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); +REPLACE INTO `mob_db` VALUES (2431,'G_L_SHECIL','Hunter Shecil','Hunter Shecil',98,8835,1,0,0,14,574,223,68,13,108,113,60,72,148,37,10,12,1,7,64,14469,160,432,400,288,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); REPLACE INTO `mob_db` VALUES (2464,'MG_ZOMBIE','Corrupted Steward','Corrupted Steward',130,135600,1,13332,15998,1,2364,444,15,15,44,22,77,25,88,22,10,12,1,1,29,14741,400,2612,912,288,0,0,0,0,0,0,0,6609,1000,6610,1000,6608,10,938,1000,727,500,6755,500,0,0,0,0,0,0,0,0); REPLACE INTO `mob_db` VALUES (2465,'MG_WRAITH','Corrupted Monk','Corrupted Monk',133,100168,1,13998,16796,1,999,2787,80,200,16,26,30,115,79,5,10,12,2,1,89,14229,300,1816,576,240,0,0,0,0,0,0,0,731,100,747,500,2206,100,6608,10,6609,1000,6610,1000,6755,500,0,0,0,0,0,0); REPLACE INTO `mob_db` VALUES (2466,'MG_GHOUL','Grand Chamberlain in Pa','Grand Chamberlain in Pa',132,208100,1,14222,17066,1,2965,666,30,30,88,44,88,21,95,44,10,12,1,1,49,14741,250,2456,912,504,0,0,0,0,0,0,0,756,100,2609,100,6608,10,6609,1000,6610,1000,7751,1000,6755,500,0,0,0,0,0,0); @@ -1808,6 +1809,8 @@ REPLACE INTO `mob_db` VALUES (2961,'E_TORTUROUS_REDEEMER','Torturous Redeemer',' REPLACE INTO `mob_db` VALUES (2996,'XM_CELINE_KIMI','Celine Kimi','Celine Kimi',160,66666666,1,4444444,4033332,2,5636,8303,479,444,144,166,44,444,166,166,10,12,2,1,28,13973,100,1056,1056,480,444444,616,10000,617,10000,22534,10000,22534,4000,18549,4000,7642,4000,19701,100,13442,100,712,10000,0,0,0,0,0,0,0,0); REPLACE INTO `mob_db` VALUES (3029,'GRIM_REAPER_ANKOU','Grim Reaper Ankou','Grim Reaper Ankou',159,50000000,1553,300000,330000,1,1500,2500,200,70,200,100,200,200,220,100,10,12,2,1,89,133,200,900,864,480,0,0,0,0,0,0,0,607,500,603,200,604,200,22537,10000,522,200,0,0,0,0,0,0,0,0,0,0); REPLACE INTO `mob_db` VALUES (3074,'TIMEHOLDER','Time Holder','Time Holder',170,25000000,1,2291250,1938750,1,5250,2100,288,265,224,152,251,257,402,77,10,12,2,6,80,14261,100,398,384,288,2291250,0,0,0,0,0,0,1095,3000,2121,10,7054,3000,22515,3000,18874,20,16024,5,15089,3,0,0,0,0,4625,1); +REPLACE INTO `mob_db` VALUES (3169,'J_REB_SHECIL1','Shooting Target','Shooting Target',1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,20,1,200,4000,2000,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); +REPLACE INTO `mob_db` VALUES (3170,'J_REB_SHECIL2','Shooting Target','Shooting Target',1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,20,1,200,4000,2000,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); REPLACE INTO `mob_db` VALUES (3181,'E1_FELOCK','Captain Ferlock','Captain Ferlock',130,3000000,1,3088,333333,10,0,0,0,0,0,0,0,0,0,0,10,12,2,9,47,129,170,1018,1008,300,0,0,0,0,0,0,0,15117,100,20744,100,22047,100,12082,3000,12072,3000,12087,3000,12077,3000,12092,3000,0,0,27182,1); REPLACE INTO `mob_db` VALUES (3190,'MM_SARAH','Sarah','Sarah',160,100000000,1,0,0,12,1090,2755,276,255,43,161,6,188,225,136,10,12,1,0,20,164,2000,500,500,0,0,0,0,0,0,0,0,15121,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4610,1); REPLACE INTO `mob_db` VALUES (3202,'ORGANIC_JAKK','Organic Pumpkin','Organic Pumpkin',10,40,1,20,13,1,100,0,160,99,1,1,1,1,999,1,1,1,0,3,21,97,200,398,199,0,0,0,0,0,0,0,0,6804,5000,6804,5000,6804,1000,2267,100,1062,1000,664,100,546,1000,12192,100,0,0,0,0); diff --git a/sql-files/upgrades/2020-01-24--01-09.sql b/sql-files/upgrades/2020-01-24--01-09.sql new file mode 100644 index 000000000..2370b267f --- /dev/null +++ b/sql-files/upgrades/2020-01-24--01-09.sql @@ -0,0 +1,63 @@ +#1579817630 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2013-2020 Hercules Dev Team +-- +-- Hercules is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. + +CREATE TABLE IF NOT EXISTS `npc_expanded_barter_data` ( + `name` VARCHAR(24) NOT NULL DEFAULT '', + `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `zeny` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyId1` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount1` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine1` INT(11) NOT NULL DEFAULT '0', + `currencyId2` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount2` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine2` INT(11) NOT NULL DEFAULT '0', + `currencyId3` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount3` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine3` INT(11) NOT NULL DEFAULT '0', + `currencyId4` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount4` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine4` INT(11) NOT NULL DEFAULT '0', + `currencyId5` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount5` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine5` INT(11) NOT NULL DEFAULT '0', + `currencyId6` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount6` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine6` INT(11) NOT NULL DEFAULT '0', + `currencyId7` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount7` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine7` INT(11) NOT NULL DEFAULT '0', + `currencyId8` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount8` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine8` INT(11) NOT NULL DEFAULT '0', + `currencyId9` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount9` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine9` INT(11) NOT NULL DEFAULT '0', + `currencyId10` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyAmount10` INT(11) UNSIGNED NOT NULL DEFAULT '0', + `currencyRefine10` INT(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`name`, `itemid`, `zeny`, + `currencyId1`, `currencyAmount1`, `currencyRefine1`, + `currencyId2`, `currencyAmount2`, `currencyRefine2`, + `currencyId3`, `currencyAmount3`, `currencyRefine3`, + `currencyId4`, `currencyAmount4`, `currencyRefine4` +) +) ENGINE=MyISAM; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1579817630); diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index f7fc2ac79..1ddd8b831 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -59,3 +59,4 @@ 2019-10-05--19-01.sql 2019-10-12--14-21.sql 2019-11-22--23-58.sql +2020-01-24--01-09.sql diff --git a/src/char/int_party.c b/src/char/int_party.c index b29ccaf24..c16eea34e 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -42,82 +42,139 @@ static struct inter_party_interface inter_party_s; struct inter_party_interface *inter_party; -//Updates party's level range and unsets even share if broken. +/** + * Updates party's level range and disables even share if requirements are not fulfilled. + * + * @param p The party. + * @return 0 on failure, 1 on success. + * + **/ static int inter_party_check_lv(struct party_data *p) { - int i; - unsigned int lv; nullpo_ret(p); - p->min_lv = UINT_MAX; - p->max_lv = 0; - for(i=0;i<MAX_PARTY;i++){ - /** - * - If not online OR if it's a family party and this is the child (doesn't affect exp range) - **/ - if(!p->party.member[i].online || p->party.member[i].char_id == p->family ) - continue; - lv=p->party.member[i].lv; - if (lv < p->min_lv) p->min_lv = lv; - if (lv > p->max_lv) p->max_lv = lv; + p->min_lv = MAX_LEVEL; + p->max_lv = 1; + + for (int i = 0; i < MAX_PARTY; i++) { + if (p->party.member[i].online == 0 || p->party.member[i].char_id == p->family) + continue; /// If not online OR if it's a family party and this is the child, don't affect exp range. + + p->min_lv = min(p->min_lv, p->party.member[i].lv); + p->max_lv = max(p->max_lv, p->party.member[i].lv); } - if (p->party.exp && !inter_party->check_exp_share(p)) { + if (p->party.exp == 1 && inter_party->check_exp_share(p) == 0) { p->party.exp = 0; mapif->party_optionchanged(0, &p->party, 0, 0); return 0; } + return 1; } -//Calculates the state of a party. + +/** + * Checks if a party is a family state party. (Family share feature.) + * Conditions for a family state party: + * - All party members have to belong to the same family. Not even offline strangers are allowed. + * So only parties with 2 or 3 members come in question. + * - At least one parent has to be on the same map with the child. + * - Parents within the party have to be level 70 or higher, even when offline. + * + * @param p The party. + * @return The child's char ID on success, otherwise 0. + * + **/ +static int inter_party_is_family_party(struct party_data *p) +{ + nullpo_ret(p); + + if (p->size < 2 || p->size > 3 || p->party.count < 2) + return 0; + + int child_id = 0; + + for (int i = 0; i < MAX_PARTY - 1; i++) { + if (p->party.member[i].online == 0) + continue; + + struct mmo_charstatus *char_i = idb_get(chr->char_db_, p->party.member[i].char_id); + + if (char_i == NULL) + continue; + + for (int j = i + 1; j < MAX_PARTY; j++) { + if (p->party.member[j].online == 0) + continue; + + struct mmo_charstatus *char_j = idb_get(chr->char_db_, p->party.member[j].char_id); + + if (char_j == NULL) + continue; + + if (p->party.member[i].map != p->party.member[j].map) + continue; + + if (char_i->char_id == char_j->child && char_j->base_level >= 70) + child_id = char_i->char_id; + + if (char_j->char_id == char_i->child && char_i->base_level >= 70) + child_id = char_j->char_id; + + if (child_id != 0) + break; + } + + if (child_id != 0) + break; + } + + if (child_id != 0 && p->size > 2) { + for (int i = 0; i < MAX_PARTY; i++) { + struct mmo_charstatus *party_member = idb_get(chr->char_db_, p->party.member[i].char_id); + + /// Check if there is a stranger within the party. + if (party_member != NULL && party_member->char_id != child_id && party_member->child != child_id) { + child_id = 0; /// Stranger detected. + break; + } + + /// Check if there is a parents with level lower than 70 within the party. + if (party_member != NULL && party_member->child == child_id && party_member->base_level < 70) { + child_id = 0; /// Parent with level lower than 70 detected. + break; + } + } + } + + return child_id; +} + +/** + * Calculates the state of a party. + * + * @param p The party. + * + **/ static void inter_party_calc_state(struct party_data *p) { - int i; nullpo_retv(p); - p->min_lv = UINT_MAX; - p->max_lv = 0; - p->party.count = - p->size = - p->family = 0; - - //Check party size - for(i=0;i<MAX_PARTY;i++){ - if (!p->party.member[i].lv) continue; + + p->party.count = 0; + p->size = 0; + + for (int i = 0; i < MAX_PARTY; i++) { + if (p->party.member[i].lv == 0) /// Is this even possible? [Kenpachi] + continue; + p->size++; - if(p->party.member[i].online) + + if (p->party.member[i].online == 1) p->party.count++; } - // FIXME[Haru]: What if the occupied positions aren't the first three? It can happen if some party members leave. This is the reason why family sharing some times stops working until you recreate your party - if( p->size == 2 && ( chr->char_child(p->party.member[0].char_id,p->party.member[1].char_id) || chr->char_child(p->party.member[1].char_id,p->party.member[0].char_id) ) ) { - //Child should be able to share with either of their parents [RoM] - if (p->party.member[0].class >= JOB_BABY && p->party.member[0].class <= JOB_SUPER_BABY) //first slot is the child? - p->family = p->party.member[0].char_id; - else - p->family = p->party.member[1].char_id; - } else if( p->size == 3 ) { - //Check Family State. - p->family = chr->char_family( - p->party.member[0].char_id, - p->party.member[1].char_id, - p->party.member[2].char_id - ); - } - //max/min levels. - for (i = 0; i < MAX_PARTY; i++) { - unsigned int lv = p->party.member[i].lv; - if (!lv) continue; - if (p->party.member[i].online - && p->party.member[i].char_id != p->family /* In families, the kid is not counted towards exp share rules. */ - ) { - if( lv < p->min_lv ) p->min_lv=lv; - if( p->max_lv < lv ) p->max_lv=lv; - } - } - if (p->party.exp && !inter_party->check_exp_share(p)) { - p->party.exp = 0; //Set off even share. - mapif->party_optionchanged(0, &p->party, 0, 0); - } + p->family = inter_party->is_family_party(p); + inter_party->check_lv(p); } // Save party to mysql @@ -195,6 +252,39 @@ static int inter_party_tosql(struct party *p, int flag, int index) return 1; } +/** + * Updates the `char`.`party_id` column and removes party data from memory. + * Sets the party ID of all characters whose party ID matches the passed one to 0. + * Calls idb_remove() to remove party data from memory. + * + * @param party_id The party ID. + * @return 0 on failure, 1 on success. + * + **/ +static int inter_party_del_nonexistent_party(int party_id) +{ + struct SqlStmt *stmt = SQL->StmtMalloc(inter->sql_handle); + + if (stmt == NULL) { + SqlStmt_ShowDebug(stmt); + return 0; + } + + const char *query = "UPDATE `%s` SET `party_id`='0' WHERE `party_id`=?"; + + if (SQL_ERROR == SQL->StmtPrepare(stmt, query, char_db) + || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_UINT32, &party_id, sizeof(party_id)) + || SQL_ERROR == SQL->StmtExecute(stmt)) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return 0; + } + + idb_remove(inter_party->db, party_id); + + return 1; +} + // Read party from mysql static struct party_data *inter_party_fromsql(int party_id) { @@ -313,11 +403,18 @@ static struct party_data *inter_party_search_partyname(const char *const str) return p; } -// Returns whether this party can keep having exp share or not. +/** + * Checks if a party fulfills the requirements to share EXP. + * + * @param p The party. + * @return 1 if party can share EXP, otherwise 0. + * + **/ static int inter_party_check_exp_share(struct party_data *const p) { nullpo_ret(p); - return (p->party.count < 2 || p->max_lv - p->min_lv <= party_share_level); + + return (p->party.count < 2 || p->family != 0 || p->max_lv - p->min_lv <= party_share_level); } // Is there any member in the party? @@ -388,36 +485,38 @@ static struct party_data *inter_party_create(const char *name, int item, int ite return p; } -// Add a player to party request +/** + * Add a player to party request. + * + * @param party_id The ID of the party. + * @param member The member to add. + * @return true on success, otherwise false. + * + **/ static bool inter_party_add_member(int party_id, const struct party_member *member) { - struct party_data *p; - int i; + nullpo_retr(false, member); - nullpo_ret(member); - p = inter_party->fromsql(party_id); - if( p == NULL || p->size == MAX_PARTY ) { + if (party_id < 1) /// Invalid party ID. return false; - } - ARR_FIND( 0, MAX_PARTY, i, p->party.member[i].account_id == 0 ); - if (i == MAX_PARTY) { - // Party full + struct party_data *p = inter_party->fromsql(party_id); + + if (p == NULL) { /// Party does not exist. + inter_party->del_nonexistent_party(party_id); return false; } + int i; + + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id == 0); + + if (i == MAX_PARTY) /// Party is full. + return false; + memcpy(&p->party.member[i], member, sizeof(struct party_member)); p->party.member[i].leader = 0; - if (p->party.member[i].online) p->party.count++; - p->size++; - if (p->size == 2 || p->size == 3) // Check family state. And also accept either of their Parents. [RoM] - inter_party->calc_state(p); - else //Check even share range. - if (member->lv < p->min_lv || member->lv > p->max_lv || p->family) { - if (p->family) p->family = 0; //Family state broken. - inter_party->check_lv(p); - } - + inter_party->calc_state(p); /// Count online/offline members and check family state and even share range. mapif->party_info(-1, &p->party, 0); inter_party->tosql(&p->party, PS_ADDMEMBER, i); @@ -445,105 +544,92 @@ static bool inter_party_change_option(int party_id, int account_id, int exp, int return true; } -//Request leave party +/** + * Leave party request. + * + * @param party_id The ID of the party. + * @param account_id The account ID of the leaving character. + * @param char_id The char ID of the leaving character. + * @return true on success, otherwise false. + * + **/ static bool inter_party_leave(int party_id, int account_id, int char_id) { - struct party_data *p; - int i,j; + if (party_id < 1) /// Invalid party ID. + return false; - p = inter_party->fromsql(party_id); - if( p == NULL ) - {// Party does not exists? - if( SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `party_id`='0' WHERE `party_id`='%d'", char_db, party_id) ) - Sql_ShowDebug(inter->sql_handle); + struct party_data *p = inter_party->fromsql(party_id); + + if (p == NULL) { /// Party does not exist. + inter_party->del_nonexistent_party(party_id); return false; } - for (i = 0; i < MAX_PARTY; i++) { - if(p->party.member[i].account_id == account_id && - p->party.member[i].char_id == char_id) { - break; - } - } - if (i >= MAX_PARTY) - return false; //Member not found? + int i; + + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id); + + if (i == MAX_PARTY) /// Character not found in party. + return false; mapif->party_withdraw(party_id, account_id, char_id); - j = p->party.member[i].lv; - if (p->party.member[i].online > 0) { + if (p->party.member[i].online == 1) p->party.member[i].online = 0; - p->party.count--; - } - inter_party->tosql(&p->party, PS_DELMEMBER, i); + memset(&p->party.member[i], 0, sizeof(struct party_member)); - p->size--; - if (j == p->min_lv || j == p->max_lv || p->family) { - if(p->family) p->family = 0; //Family state broken. - inter_party->check_lv(p); - } + inter_party->calc_state(p); /// Count online/offline members and check family state and even share range. + inter_party->tosql(&p->party, PS_DELMEMBER, i); - if (inter_party->check_empty(p) == 0) { + if (inter_party->check_empty(p) == 0) mapif->party_info(-1, &p->party, 0); - } + return true; } -// When member goes to other map or levels up. -static bool inter_party_change_map(int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) +/** + * Updates party data if a member changes map or levels up. + * + * @param party_id The ID of the party. + * @param account_id The character's account ID. + * @param char_id The character's char ID. + * @param map The character's map index. + * @param online The character's online state. + * @param lv The character's level. + * @return true on success, otherwise false. + * + **/ +static bool inter_party_change_map(int party_id, int account_id, int char_id, unsigned short map, int online, int lv) { - struct party_data *p; - int i; + if (party_id < 1) /// Invalid party ID. + return false; - p = inter_party->fromsql(party_id); - if (p == NULL) + struct party_data *p = inter_party->fromsql(party_id); + + if (p == NULL) { /// Party does not exist. + inter_party->del_nonexistent_party(party_id); return false; + } + + int i; - for(i = 0; i < MAX_PARTY && - (p->party.member[i].account_id != account_id || - p->party.member[i].char_id != char_id); i++); + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].account_id == account_id && p->party.member[i].char_id == char_id); - if (i == MAX_PARTY) + if (i == MAX_PARTY) /// Character not found in party. return false; if (p->party.member[i].online != online) - { p->party.member[i].online = online; - if (online) - p->party.count++; - else - p->party.count--; - // Even share check situations: Family state (always breaks) - // character logging on/off is max/min level (update level range) - // or character logging on/off has a different level (update level range using new level) - if (p->family || - (p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) || - (p->party.member[i].lv != lv && (lv <= p->min_lv || lv >= p->max_lv)) - ) - { - p->party.member[i].lv = lv; - inter_party->check_lv(p); - } - //Send online/offline update. - mapif->party_membermoved(&p->party, i); - } - if (p->party.member[i].lv != lv) { - if(p->party.member[i].lv == p->min_lv || - p->party.member[i].lv == p->max_lv) - { - p->party.member[i].lv = lv; - inter_party->check_lv(p); - } else - p->party.member[i].lv = lv; - //There is no need to send level update to map servers - //since they do nothing with it. - } + if (p->party.member[i].lv != lv) + p->party.member[i].lv = lv; - if (p->party.member[i].map != map) { + if (p->party.member[i].map != map) p->party.member[i].map = map; - mapif->party_membermoved(&p->party, i); - } + + inter_party->calc_state(p); /// Count online/offline members and check family state and even share range. + mapif->party_membermoved(&p->party, i); /// Send online/offline update. + return true; } @@ -607,98 +693,104 @@ static int inter_party_parse_frommap(int fd) return 1; } +/** + * Sets the online state of a charcter within a party to online. + * + * @param char_id The character's char ID. + * @param party_id The ID of the party. + * @return 1 on success, otherwise 0. + * + **/ static int inter_party_CharOnline(int char_id, int party_id) { - struct party_data* p; - int i; - - if( party_id == -1 ) - {// Get party_id from the database + if (party_id == INDEX_NOT_FOUND) { /// Get party_id from the database. char* data; - if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT party_id FROM `%s` WHERE char_id='%d'", char_db, char_id) ) - { + if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT party_id FROM `%s` WHERE char_id='%d'", char_db, char_id)) { Sql_ShowDebug(inter->sql_handle); return 0; } - if( SQL_SUCCESS != SQL->NextRow(inter->sql_handle) ) - return 0; //Eh? No party? + if (SQL_SUCCESS != SQL->NextRow(inter->sql_handle)) + return 0; SQL->GetData(inter->sql_handle, 0, &data, NULL); party_id = atoi(data); SQL->FreeResult(inter->sql_handle); } - if (party_id == 0) - return 0; //No party... - p = inter_party->fromsql(party_id); - if(!p) { - ShowError("Character %d's party %d not found!\n", char_id, party_id); + if (party_id == 0) /// Character isn't member of a party. return 0; - } - //Set member online - for(i=0; i<MAX_PARTY; i++) { - if (p->party.member[i].char_id == char_id) { - if (!p->party.member[i].online) { - p->party.member[i].online = 1; - p->party.count++; - if (p->party.member[i].lv < p->min_lv || - p->party.member[i].lv > p->max_lv) - inter_party->check_lv(p); - } - break; - } + struct party_data *p = inter_party->fromsql(party_id); + + if (p == NULL) { /// Party does not exist. + inter_party->del_nonexistent_party(party_id); + return 0; } + + int i; + + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].char_id == char_id); + + if (i == MAX_PARTY) /// Character not found in party. + return 0; + + p->party.member[i].online = 1; /// Set member online. + inter_party->calc_state(p); /// Count online/offline members and check family state and even share range. + return 1; } +/** + * Sets the online state of a charcter within a party to offline. + * + * @param char_id The character's char ID. + * @param party_id The ID of the party. + * @return 1 on success, otherwise 0. + * + **/ static int inter_party_CharOffline(int char_id, int party_id) { - struct party_data *p=NULL; - int i; - - if( party_id == -1 ) - {// Get guild_id from the database + if (party_id == INDEX_NOT_FOUND) { /// Get party_id from the database. char* data; - if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT party_id FROM `%s` WHERE char_id='%d'", char_db, char_id) ) - { + if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT party_id FROM `%s` WHERE char_id='%d'", char_db, char_id)) { Sql_ShowDebug(inter->sql_handle); return 0; } - if( SQL_SUCCESS != SQL->NextRow(inter->sql_handle) ) - return 0; //Eh? No party? + if (SQL_SUCCESS != SQL->NextRow(inter->sql_handle)) + return 0; SQL->GetData(inter->sql_handle, 0, &data, NULL); party_id = atoi(data); SQL->FreeResult(inter->sql_handle); } - if (party_id == 0) - return 0; //No party... - //Character has a party, set character offline and check if they were the only member online - if ((p = inter_party->fromsql(party_id)) == NULL) + if (party_id == 0) /// Character isn't member of a party. return 0; - //Set member offline - for(i=0; i< MAX_PARTY; i++) { - if(p->party.member[i].char_id == char_id) - { - p->party.member[i].online = 0; - p->party.count--; - if(p->party.member[i].lv == p->min_lv || - p->party.member[i].lv == p->max_lv) - inter_party->check_lv(p); - break; - } + struct party_data *p = inter_party->fromsql(party_id); + + if (p == NULL) { /// Party does not exist. + inter_party->del_nonexistent_party(party_id); + return 0; } - if(!p->party.count) - //Parties don't have any data that needs be saved at this point... so just remove it from memory. + int i; + + ARR_FIND(0, MAX_PARTY, i, p->party.member[i].char_id == char_id); + + if (i == MAX_PARTY) /// Character not found in party. + return 0; + + p->party.member[i].online = 0; /// Set member offline. + inter_party->calc_state(p); /// Count online/offline members and check family state and even share range. + + if (p->party.count == 0) /// Parties don't have any data that needs be saved at this point... so just remove it from memory. idb_remove(inter_party->db, party_id); + return 1; } @@ -712,8 +804,10 @@ void inter_party_defaults(void) inter_party->sql_init = inter_party_sql_init; inter_party->sql_final = inter_party_sql_final; inter_party->check_lv = inter_party_check_lv; + inter_party->is_family_party = inter_party_is_family_party; inter_party->calc_state = inter_party_calc_state; inter_party->tosql = inter_party_tosql; + inter_party->del_nonexistent_party = inter_party_del_nonexistent_party; inter_party->fromsql = inter_party_fromsql; inter_party->search_partyname = inter_party_search_partyname; inter_party->check_exp_share = inter_party_check_exp_share; diff --git a/src/char/int_party.h b/src/char/int_party.h index b3306cc13..0385b0e87 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -38,10 +38,11 @@ enum { }; struct party_data { - struct party party; - unsigned int min_lv, max_lv; - int family; //Is this party a family? if so, this holds the child id. - unsigned char size; //Total size of party. + struct party party; // Party data. + int min_lv; // The lowest base level of all party members. + int max_lv; // The highest base level of all party members. + int family; // Is this party a family? If so, this holds the child's char ID. + int size; // Amount of party members, including offline members. }; /** @@ -51,8 +52,10 @@ struct inter_party_interface { struct party_data *pt; struct DBMap *db; // int party_id -> struct party_data* int (*check_lv) (struct party_data *p); + int (*is_family_party) (struct party_data *p); void (*calc_state) (struct party_data *p); int (*tosql) (struct party *p, int flag, int index); + int (*del_nonexistent_party) (int party_id); struct party_data* (*fromsql) (int party_id); int (*sql_init) (void); void (*sql_final) (void); @@ -66,7 +69,7 @@ struct inter_party_interface { struct party_data *(*create) (const char *name, int item, int item2, const struct party_member *leader); bool (*add_member) (int party_id, const struct party_member *member); bool (*change_option) (int party_id, int account_id, int exp, int item, int map_fd); - bool (*change_map) (int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); + bool (*change_map) (int party_id, int account_id, int char_id, unsigned short map, int online, int lv); bool (*disband) (int party_id); bool (*change_leader) (int party_id, int account_id, int char_id); }; diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index a0a9f8c35..d2e491ad2 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -600,6 +600,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #endif // MAP_MOB_H #ifdef MAP_NPC_H { "event_data", sizeof(struct event_data), SERVER_TYPE_MAP }, + { "npc_barter_currency", sizeof(struct npc_barter_currency), SERVER_TYPE_MAP }, { "npc_chat_interface", sizeof(struct npc_chat_interface), SERVER_TYPE_MAP }, { "npc_data", sizeof(struct npc_data), SERVER_TYPE_MAP }, { "npc_interface", sizeof(struct npc_interface), SERVER_TYPE_MAP }, @@ -684,6 +685,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_ADD_ITEM_TO_STORE", sizeof(struct PACKET_ZC_ADD_ITEM_TO_STORE), SERVER_TYPE_MAP }, { "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP }, { "PACKET_ZC_ADD_SKILL", sizeof(struct PACKET_ZC_ADD_SKILL), SERVER_TYPE_MAP }, + { "PACKET_ZC_AUTORUN_SKILL", sizeof(struct PACKET_ZC_AUTORUN_SKILL), SERVER_TYPE_MAP }, { "PACKET_ZC_BAN_LIST", sizeof(struct PACKET_ZC_BAN_LIST), SERVER_TYPE_MAP }, { "PACKET_ZC_BAN_LIST_sub", sizeof(struct PACKET_ZC_BAN_LIST_sub), SERVER_TYPE_MAP }, { "PACKET_ZC_CASH_ITEM_DELETE", sizeof(struct PACKET_ZC_CASH_ITEM_DELETE), SERVER_TYPE_MAP }, @@ -743,6 +745,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_ZC_SKILLINFO_LIST", sizeof(struct PACKET_ZC_SKILLINFO_LIST), SERVER_TYPE_MAP }, { "PACKET_ZC_SKILLINFO_UPDATE2", sizeof(struct PACKET_ZC_SKILLINFO_UPDATE2), SERVER_TYPE_MAP }, { "PACKET_ZC_SPRITE_CHANGE", sizeof(struct PACKET_ZC_SPRITE_CHANGE), SERVER_TYPE_MAP }, + { "PACKET_ZC_STATE_CHANGE", sizeof(struct PACKET_ZC_STATE_CHANGE), SERVER_TYPE_MAP }, { "PACKET_ZC_STATUS_CHANGE_ACK", sizeof(struct PACKET_ZC_STATUS_CHANGE_ACK), SERVER_TYPE_MAP }, { "PACKET_ZC_STYLE_CHANGE_RES", sizeof(struct PACKET_ZC_STYLE_CHANGE_RES), SERVER_TYPE_MAP }, { "PACKET_ZC_TALKBOX_CHATCONTENTS", sizeof(struct PACKET_ZC_TALKBOX_CHATCONTENTS), SERVER_TYPE_MAP }, diff --git a/src/common/mmo.h b/src/common/mmo.h index ec1b2948a..25ad350c0 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -64,7 +64,7 @@ // 20120307 - 2012-03-07aRagexeRE+ - 0x970 #ifndef PACKETVER - #define PACKETVER 20141022 + #define PACKETVER 20190530 #endif // PACKETVER //Uncomment the following line if your client is ragexeRE instead of ragexe (required because of conflicting packets in ragexe vs ragexeRE). @@ -218,7 +218,7 @@ #define MAX_FAME 1000000000 #define MAX_CART 100 #ifndef MAX_SKILL_DB -#define MAX_SKILL_DB 1510 ///< Maximum number of skills in the skill DB (compacted array size) +#define MAX_SKILL_DB 1314 ///< Maximum number of skills in the skill DB (compacted array size) #endif #ifndef MAX_SKILL_ID #define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID @@ -822,8 +822,8 @@ struct party_member { int char_id; char name[NAME_LENGTH]; int class; + int lv; unsigned short map; - unsigned short lv; unsigned leader : 1, online : 1; }; diff --git a/src/common/packets/packets2020_len_main.h b/src/common/packets/packets2020_len_main.h index a85cddb29..2a6058f65 100644 --- a/src/common/packets/packets2020_len_main.h +++ b/src/common/packets/packets2020_len_main.h @@ -4611,5 +4611,40 @@ packetLen(0x0b6d, 6) // Packet: 0x0b6e packetLen(0x0b6e, 14) +// Packet: 0x0b6f +#if PACKETVER >= 20200122 +packetLen(0x0b6f, 177) +#endif + +// Packet: 0x0b70 +#if PACKETVER >= 20200122 +packetLen(0x0b70, 8) +#endif + +// Packet: 0x0b71 +#if PACKETVER >= 20200122 +packetLen(0x0b71, 177) +#endif + +// Packet: 0x0b72 +#if PACKETVER >= 20200122 +packetLen(0x0b72, 4) +#endif + +// Packet: 0x0b73 +#if PACKETVER >= 20200212 +packetLen(0x0b73, 8) +#endif + +// Packet: 0x0b74 +#if PACKETVER >= 20200304 +packetLen(0x0b74, 1026) +#endif + +// Packet: 0x0b75 +#if PACKETVER >= 20200304 +packetLen(0x0b75, 1026) +#endif + #endif /* COMMON_PACKETS2020_LEN_MAIN_H */ diff --git a/src/common/packets/packets2020_len_re.h b/src/common/packets/packets2020_len_re.h index 6e72cbb7d..2c21b1c67 100644 --- a/src/common/packets/packets2020_len_re.h +++ b/src/common/packets/packets2020_len_re.h @@ -4617,5 +4617,40 @@ packetLen(0x0b6d, 6) // Packet: 0x0b6e packetLen(0x0b6e, 14) +// Packet: 0x0b6f +#if PACKETVER >= 20200122 +packetLen(0x0b6f, 177) +#endif + +// Packet: 0x0b70 +#if PACKETVER >= 20200122 +packetLen(0x0b70, 8) +#endif + +// Packet: 0x0b71 +#if PACKETVER >= 20200122 +packetLen(0x0b71, 177) +#endif + +// Packet: 0x0b72 +#if PACKETVER >= 20200122 +packetLen(0x0b72, 4) +#endif + +// Packet: 0x0b73 +#if PACKETVER >= 20200212 +packetLen(0x0b73, 8) +#endif + +// Packet: 0x0b74 +#if PACKETVER >= 20200304 +packetLen(0x0b74, 1026) +#endif + +// Packet: 0x0b75 +#if PACKETVER >= 20200304 +packetLen(0x0b75, 1026) +#endif + #endif /* COMMON_PACKETS2020_LEN_RE_H */ diff --git a/src/common/packets/packets2020_len_zero.h b/src/common/packets/packets2020_len_zero.h new file mode 100644 index 000000000..c1ffbecf6 --- /dev/null +++ b/src/common/packets/packets2020_len_zero.h @@ -0,0 +1,4650 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2018-2020 Hercules Dev Team + * Copyright (C) 2018-2020 Andrei Karas (4144) + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef COMMON_PACKETS2020_LEN_ZERO_H +#define COMMON_PACKETS2020_LEN_ZERO_H + +/* This file is autogenerated, please do not commit manual changes */ + +// Packet: 0x0064 +packetLen(0x0064, 55) + +// Packet: 0x0065 +packetLen(0x0065, 17) + +// Packet: 0x0066 +packetLen(0x0066, 3) + +// Packet: 0x0067 +packetLen(0x0067, 37) + +// Packet: 0x0068 +packetLen(0x0068, 46) + +// Packet: 0x0069 +packetLen(0x0069, -1) + +// Packet: 0x006a +packetLen(0x006a, 23) + +// Packet: 0x006b +packetLen(0x006b, -1) + +// Packet: 0x006c +packetLen(0x006c, 3) + +// Packet: 0x006d +packetLen(0x006d, 157) + +// Packet: 0x006e +packetLen(0x006e, 3) + +// Packet: 0x006f +packetLen(0x006f, 2) + +// Packet: 0x0070 +packetLen(0x0070, 3) + +// Packet: 0x0071 +packetLen(0x0071, 28) + +// Packet: 0x0072 +packetLen(0x0072, 22) + +// Packet: 0x0073 +packetLen(0x0073, 11) + +// Packet: 0x0074 +packetLen(0x0074, 3) + +// Packet: 0x0075 +packetLen(0x0075, -1) + +// Packet: 0x0076 +packetLen(0x0076, 9) + +// Packet: 0x0077 +packetLen(0x0077, 5) + +// Packet: 0x0078 +packetLen(0x0078, 55) + +// Packet: 0x0079 +packetLen(0x0079, 53) + +// Packet: 0x007a +packetLen(0x007a, 58) + +// Packet: 0x007b +packetLen(0x007b, 60) + +// Packet: 0x007c +packetLen(0x007c, 44) + +// Packet: 0x007d +packetLen(0x007d, 2) + +// Packet: 0x007e +packetLen(0x007e, 46) + +// Packet: 0x007f +packetLen(0x007f, 6) + +// Packet: 0x0080 +packetLen(0x0080, 7) + +// Packet: 0x0081 +packetLen(0x0081, 3) + +// Packet: 0x0082 +packetLen(0x0082, 2) + +// Packet: 0x0083 +packetLen(0x0083, 2) + +// Packet: 0x0084 +packetLen(0x0084, 2) + +// Packet: 0x0085 +packetLen(0x0085, 10) + +// Packet: 0x0086 +packetLen(0x0086, 16) + +// Packet: 0x0087 +packetLen(0x0087, 12) + +// Packet: 0x0088 +packetLen(0x0088, 10) + +// Packet: 0x0089 +packetLen(0x0089, 11) + +// Packet: 0x008a +packetLen(0x008a, 29) + +// Packet: 0x008b +packetLen(0x008b, 23) + +// Packet: 0x008c +packetLen(0x008c, 14) + +// Packet: 0x008d +packetLen(0x008d, -1) + +// Packet: 0x008e +packetLen(0x008e, -1) + +// Packet: 0x0090 +packetLen(0x0090, 7) + +// Packet: 0x0091 +packetLen(0x0091, 22) + +// Packet: 0x0092 +packetLen(0x0092, 28) + +// Packet: 0x0093 +packetLen(0x0093, 2) + +// Packet: 0x0094 +packetLen(0x0094, 19) + +// Packet: 0x0095 +packetLen(0x0095, 30) + +// Packet: 0x0096 +packetLen(0x0096, -1) + +// Packet: 0x0097 +packetLen(0x0097, -1) + +// Packet: 0x0098 +packetLen(0x0098, 3) + +// Packet: 0x0099 +packetLen(0x0099, -1) + +// Packet: 0x009a +packetLen(0x009a, -1) + +// Packet: 0x009b +packetLen(0x009b, 34) + +// Packet: 0x009c +packetLen(0x009c, 9) + +// Packet: 0x009d +packetLen(0x009d, 19) + +// Packet: 0x009e +packetLen(0x009e, 19) + +// Packet: 0x009f +packetLen(0x009f, 20) + +// Packet: 0x00a0 +packetLen(0x00a0, 33) + +// Packet: 0x00a1 +packetLen(0x00a1, 6) + +// Packet: 0x00a2 +packetLen(0x00a2, 14) + +// Packet: 0x00a3 +packetLen(0x00a3, -1) + +// Packet: 0x00a4 +packetLen(0x00a4, -1) + +// Packet: 0x00a5 +packetLen(0x00a5, -1) + +// Packet: 0x00a6 +packetLen(0x00a6, -1) + +// Packet: 0x00a7 +packetLen(0x00a7, 9) + +// Packet: 0x00a8 +packetLen(0x00a8, 7) + +// Packet: 0x00a9 +packetLen(0x00a9, 6) + +// Packet: 0x00aa +packetLen(0x00aa, 9) + +// Packet: 0x00ab +packetLen(0x00ab, 4) + +// Packet: 0x00ac +packetLen(0x00ac, 7) + +// Packet: 0x00ae +packetLen(0x00ae, -1) + +// Packet: 0x00af +packetLen(0x00af, 6) + +// Packet: 0x00b0 +packetLen(0x00b0, 8) + +// Packet: 0x00b1 +packetLen(0x00b1, 8) + +// Packet: 0x00b2 +packetLen(0x00b2, 3) + +// Packet: 0x00b3 +packetLen(0x00b3, 3) + +// Packet: 0x00b4 +packetLen(0x00b4, -1) + +// Packet: 0x00b5 +packetLen(0x00b5, 6) + +// Packet: 0x00b6 +packetLen(0x00b6, 6) + +// Packet: 0x00b7 +packetLen(0x00b7, -1) + +// Packet: 0x00b8 +packetLen(0x00b8, 7) + +// Packet: 0x00b9 +packetLen(0x00b9, 6) + +// Packet: 0x00ba +packetLen(0x00ba, 2) + +// Packet: 0x00bb +packetLen(0x00bb, 5) + +// Packet: 0x00bc +packetLen(0x00bc, 6) + +// Packet: 0x00bd +packetLen(0x00bd, 44) + +// Packet: 0x00be +packetLen(0x00be, 5) + +// Packet: 0x00bf +packetLen(0x00bf, 3) + +// Packet: 0x00c0 +packetLen(0x00c0, 7) + +// Packet: 0x00c1 +packetLen(0x00c1, 2) + +// Packet: 0x00c2 +packetLen(0x00c2, 6) + +// Packet: 0x00c3 +packetLen(0x00c3, 8) + +// Packet: 0x00c4 +packetLen(0x00c4, 6) + +// Packet: 0x00c5 +packetLen(0x00c5, 7) + +// Packet: 0x00c6 +packetLen(0x00c6, -1) + +// Packet: 0x00c7 +packetLen(0x00c7, -1) + +// Packet: 0x00c8 +packetLen(0x00c8, -1) + +// Packet: 0x00c9 +packetLen(0x00c9, -1) + +// Packet: 0x00ca +packetLen(0x00ca, 3) + +// Packet: 0x00cb +packetLen(0x00cb, 3) + +// Packet: 0x00cc +packetLen(0x00cc, 6) + +// Packet: 0x00cd +packetLen(0x00cd, 3) + +// Packet: 0x00ce +packetLen(0x00ce, 2) + +// Packet: 0x00cf +packetLen(0x00cf, 27) + +// Packet: 0x00d0 +packetLen(0x00d0, 3) + +// Packet: 0x00d1 +packetLen(0x00d1, 4) + +// Packet: 0x00d2 +packetLen(0x00d2, 4) + +// Packet: 0x00d3 +packetLen(0x00d3, 2) + +// Packet: 0x00d4 +packetLen(0x00d4, -1) + +// Packet: 0x00d5 +packetLen(0x00d5, -1) + +// Packet: 0x00d6 +packetLen(0x00d6, 3) + +// Packet: 0x00d7 +packetLen(0x00d7, -1) + +// Packet: 0x00d8 +packetLen(0x00d8, 6) + +// Packet: 0x00d9 +packetLen(0x00d9, 14) + +// Packet: 0x00da +packetLen(0x00da, 3) + +// Packet: 0x00db +packetLen(0x00db, -1) + +// Packet: 0x00dc +packetLen(0x00dc, 28) + +// Packet: 0x00dd +packetLen(0x00dd, 29) + +// Packet: 0x00de +packetLen(0x00de, -1) + +// Packet: 0x00df +packetLen(0x00df, -1) + +// Packet: 0x00e0 +packetLen(0x00e0, 30) + +// Packet: 0x00e1 +packetLen(0x00e1, 30) + +// Packet: 0x00e2 +packetLen(0x00e2, 26) + +// Packet: 0x00e3 +packetLen(0x00e3, 2) + +// Packet: 0x00e4 +packetLen(0x00e4, 6) + +// Packet: 0x00e5 +packetLen(0x00e5, 26) + +// Packet: 0x00e6 +packetLen(0x00e6, 3) + +// Packet: 0x00e7 +packetLen(0x00e7, 3) + +// Packet: 0x00e8 +packetLen(0x00e8, 8) + +// Packet: 0x00e9 +packetLen(0x00e9, 29) + +// Packet: 0x00ea +packetLen(0x00ea, 5) + +// Packet: 0x00eb +packetLen(0x00eb, 2) + +// Packet: 0x00ec +packetLen(0x00ec, 3) + +// Packet: 0x00ed +packetLen(0x00ed, 2) + +// Packet: 0x00ee +packetLen(0x00ee, 2) + +// Packet: 0x00ef +packetLen(0x00ef, 2) + +// Packet: 0x00f0 +packetLen(0x00f0, 3) + +// Packet: 0x00f1 +packetLen(0x00f1, 2) + +// Packet: 0x00f2 +packetLen(0x00f2, 6) + +// Packet: 0x00f3 +packetLen(0x00f3, -1) + +// Packet: 0x00f4 +packetLen(0x00f4, 31) + +// Packet: 0x00f5 +packetLen(0x00f5, 11) + +// Packet: 0x00f6 +packetLen(0x00f6, 8) + +// Packet: 0x00f7 +packetLen(0x00f7, 17) + +// Packet: 0x00f8 +packetLen(0x00f8, 2) + +// Packet: 0x00f9 +packetLen(0x00f9, 26) + +// Packet: 0x00fa +packetLen(0x00fa, 3) + +// Packet: 0x00fb +packetLen(0x00fb, -1) + +// Packet: 0x00fc +packetLen(0x00fc, 6) + +// Packet: 0x00fd +packetLen(0x00fd, 27) + +// Packet: 0x00fe +packetLen(0x00fe, 30) + +// Packet: 0x00ff +packetLen(0x00ff, 10) + +// Packet: 0x0100 +packetLen(0x0100, 2) + +// Packet: 0x0101 +packetLen(0x0101, 6) + +// Packet: 0x0102 +packetLen(0x0102, 6) + +// Packet: 0x0103 +packetLen(0x0103, 30) + +// Packet: 0x0104 +packetLen(0x0104, 79) + +// Packet: 0x0105 +packetLen(0x0105, 31) + +// Packet: 0x0106 +packetLen(0x0106, 10) + +// Packet: 0x0107 +packetLen(0x0107, 10) + +// Packet: 0x0108 +packetLen(0x0108, -1) + +// Packet: 0x0109 +packetLen(0x0109, -1) + +// Packet: 0x010a +packetLen(0x010a, 6) + +// Packet: 0x010b +packetLen(0x010b, 6) + +// Packet: 0x010c +packetLen(0x010c, 6) + +// Packet: 0x010d +packetLen(0x010d, 2) + +// Packet: 0x010e +packetLen(0x010e, 11) + +// Packet: 0x010f +packetLen(0x010f, -1) + +// Packet: 0x0110 +packetLen(0x0110, 14) + +// Packet: 0x0111 +packetLen(0x0111, 39) + +// Packet: 0x0112 +packetLen(0x0112, 4) + +// Packet: 0x0113 +packetLen(0x0113, 25) + +// Packet: 0x0114 +packetLen(0x0114, 31) + +// Packet: 0x0115 +packetLen(0x0115, 35) + +// Packet: 0x0116 +packetLen(0x0116, 17) + +// Packet: 0x0117 +packetLen(0x0117, 18) + +// Packet: 0x0118 +packetLen(0x0118, 2) + +// Packet: 0x0119 +packetLen(0x0119, 13) + +// Packet: 0x011a +packetLen(0x011a, 15) + +// Packet: 0x011b +packetLen(0x011b, 20) + +// Packet: 0x011c +packetLen(0x011c, 68) + +// Packet: 0x011d +packetLen(0x011d, 2) + +// Packet: 0x011e +packetLen(0x011e, 3) + +// Packet: 0x011f +packetLen(0x011f, 16) + +// Packet: 0x0120 +packetLen(0x0120, 6) + +// Packet: 0x0121 +packetLen(0x0121, 14) + +// Packet: 0x0122 +packetLen(0x0122, -1) + +// Packet: 0x0123 +packetLen(0x0123, -1) + +// Packet: 0x0124 +packetLen(0x0124, 31) + +// Packet: 0x0125 +packetLen(0x0125, 8) + +// Packet: 0x0126 +packetLen(0x0126, 8) + +// Packet: 0x0127 +packetLen(0x0127, 8) + +// Packet: 0x0128 +packetLen(0x0128, 8) + +// Packet: 0x0129 +packetLen(0x0129, 8) + +// Packet: 0x012a +packetLen(0x012a, 2) + +// Packet: 0x012b +packetLen(0x012b, 2) + +// Packet: 0x012c +packetLen(0x012c, 3) + +// Packet: 0x012d +packetLen(0x012d, 4) + +// Packet: 0x012e +packetLen(0x012e, 2) + +// Packet: 0x012f +packetLen(0x012f, -1) + +// Packet: 0x0130 +packetLen(0x0130, 6) + +// Packet: 0x0131 +packetLen(0x0131, 86) + +// Packet: 0x0132 +packetLen(0x0132, 6) + +// Packet: 0x0133 +packetLen(0x0133, -1) + +// Packet: 0x0134 +packetLen(0x0134, -1) + +// Packet: 0x0135 +packetLen(0x0135, 7) + +// Packet: 0x0136 +packetLen(0x0136, -1) + +// Packet: 0x0137 +packetLen(0x0137, 6) + +// Packet: 0x0138 +packetLen(0x0138, 3) + +// Packet: 0x0139 +packetLen(0x0139, 16) + +// Packet: 0x013a +packetLen(0x013a, 4) + +// Packet: 0x013b +packetLen(0x013b, 4) + +// Packet: 0x013c +packetLen(0x013c, 4) + +// Packet: 0x013d +packetLen(0x013d, 6) + +// Packet: 0x013e +packetLen(0x013e, 24) + +// Packet: 0x013f +packetLen(0x013f, 26) + +// Packet: 0x0140 +packetLen(0x0140, 22) + +// Packet: 0x0141 +packetLen(0x0141, 14) + +// Packet: 0x0142 +packetLen(0x0142, 6) + +// Packet: 0x0143 +packetLen(0x0143, 10) + +// Packet: 0x0144 +packetLen(0x0144, 23) + +// Packet: 0x0145 +packetLen(0x0145, 19) + +// Packet: 0x0146 +packetLen(0x0146, 6) + +// Packet: 0x0147 +packetLen(0x0147, 39) + +// Packet: 0x0148 +packetLen(0x0148, 8) + +// Packet: 0x0149 +packetLen(0x0149, 9) + +// Packet: 0x014a +packetLen(0x014a, 6) + +// Packet: 0x014b +packetLen(0x014b, 27) + +// Packet: 0x014c +packetLen(0x014c, -1) + +// Packet: 0x014d +packetLen(0x014d, 2) + +// Packet: 0x014e +packetLen(0x014e, 6) + +// Packet: 0x014f +packetLen(0x014f, 6) + +// Packet: 0x0150 +packetLen(0x0150, 110) + +// Packet: 0x0151 +packetLen(0x0151, 6) + +// Packet: 0x0152 +packetLen(0x0152, -1) + +// Packet: 0x0153 +packetLen(0x0153, -1) + +// Packet: 0x0154 +packetLen(0x0154, -1) + +// Packet: 0x0155 +packetLen(0x0155, -1) + +// Packet: 0x0156 +packetLen(0x0156, -1) + +// Packet: 0x0157 +packetLen(0x0157, 6) + +// Packet: 0x0159 +packetLen(0x0159, 54) + +// Packet: 0x015a +packetLen(0x015a, 66) + +// Packet: 0x015b +packetLen(0x015b, 54) + +// Packet: 0x015c +packetLen(0x015c, 90) + +// Packet: 0x015d +packetLen(0x015d, 42) + +// Packet: 0x015e +packetLen(0x015e, 6) + +// Packet: 0x015f +packetLen(0x015f, 42) + +// Packet: 0x0160 +packetLen(0x0160, -1) + +// Packet: 0x0161 +packetLen(0x0161, -1) + +// Packet: 0x0162 +packetLen(0x0162, -1) + +// Packet: 0x0163 +packetLen(0x0163, -1) + +// Packet: 0x0164 +packetLen(0x0164, -1) + +// Packet: 0x0165 +packetLen(0x0165, 30) + +// Packet: 0x0166 +packetLen(0x0166, -1) + +// Packet: 0x0167 +packetLen(0x0167, 3) + +// Packet: 0x0168 +packetLen(0x0168, 14) + +// Packet: 0x0169 +packetLen(0x0169, 3) + +// Packet: 0x016a +packetLen(0x016a, 30) + +// Packet: 0x016b +packetLen(0x016b, 10) + +// Packet: 0x016c +packetLen(0x016c, 43) + +// Packet: 0x016d +packetLen(0x016d, 14) + +// Packet: 0x016e +packetLen(0x016e, 186) + +// Packet: 0x016f +packetLen(0x016f, 182) + +// Packet: 0x0170 +packetLen(0x0170, 14) + +// Packet: 0x0171 +packetLen(0x0171, 30) + +// Packet: 0x0172 +packetLen(0x0172, 10) + +// Packet: 0x0173 +packetLen(0x0173, 3) + +// Packet: 0x0174 +packetLen(0x0174, -1) + +// Packet: 0x0175 +packetLen(0x0175, 6) + +// Packet: 0x0176 +packetLen(0x0176, 106) + +// Packet: 0x0177 +packetLen(0x0177, -1) + +// Packet: 0x0178 +packetLen(0x0178, 4) + +// Packet: 0x0179 +packetLen(0x0179, 5) + +// Packet: 0x017a +packetLen(0x017a, 4) + +// Packet: 0x017b +packetLen(0x017b, -1) + +// Packet: 0x017c +packetLen(0x017c, 6) + +// Packet: 0x017d +packetLen(0x017d, 7) + +// Packet: 0x017e +packetLen(0x017e, -1) + +// Packet: 0x017f +packetLen(0x017f, -1) + +// Packet: 0x0180 +packetLen(0x0180, 6) + +// Packet: 0x0181 +packetLen(0x0181, 3) + +// Packet: 0x0182 +packetLen(0x0182, 106) + +// Packet: 0x0183 +packetLen(0x0183, 10) + +// Packet: 0x0184 +packetLen(0x0184, 10) + +// Packet: 0x0185 +packetLen(0x0185, 34) + +// Packet: 0x0187 +packetLen(0x0187, 6) + +// Packet: 0x0188 +packetLen(0x0188, 8) + +// Packet: 0x0189 +packetLen(0x0189, 4) + +// Packet: 0x018a +packetLen(0x018a, 4) + +// Packet: 0x018b +packetLen(0x018b, 4) + +// Packet: 0x018c +packetLen(0x018c, 29) + +// Packet: 0x018d +packetLen(0x018d, -1) + +// Packet: 0x018e +packetLen(0x018e, 18) + +// Packet: 0x018f +packetLen(0x018f, 8) + +// Packet: 0x0190 +packetLen(0x0190, 23) + +// Packet: 0x0191 +packetLen(0x0191, 27) + +// Packet: 0x0192 +packetLen(0x0192, 24) + +// Packet: 0x0193 +packetLen(0x0193, 2) + +// Packet: 0x0194 +packetLen(0x0194, 30) + +// Packet: 0x0195 +packetLen(0x0195, 102) + +// Packet: 0x0196 +packetLen(0x0196, 9) + +// Packet: 0x0197 +packetLen(0x0197, 4) + +// Packet: 0x0198 +packetLen(0x0198, 8) + +// Packet: 0x0199 +packetLen(0x0199, 4) + +// Packet: 0x019a +packetLen(0x019a, 14) + +// Packet: 0x019b +packetLen(0x019b, 10) + +// Packet: 0x019c +packetLen(0x019c, -1) + +// Packet: 0x019d +packetLen(0x019d, 6) + +// Packet: 0x019e +packetLen(0x019e, 2) + +// Packet: 0x019f +packetLen(0x019f, 6) + +// Packet: 0x01a0 +packetLen(0x01a0, 3) + +// Packet: 0x01a1 +packetLen(0x01a1, 3) + +// Packet: 0x01a2 +packetLen(0x01a2, 37) + +// Packet: 0x01a3 +packetLen(0x01a3, 7) + +// Packet: 0x01a4 +packetLen(0x01a4, 11) + +// Packet: 0x01a5 +packetLen(0x01a5, 26) + +// Packet: 0x01a6 +packetLen(0x01a6, -1) + +// Packet: 0x01a7 +packetLen(0x01a7, 4) + +// Packet: 0x01a8 +packetLen(0x01a8, 4) + +// Packet: 0x01a9 +packetLen(0x01a9, 6) + +// Packet: 0x01aa +packetLen(0x01aa, 10) + +// Packet: 0x01ab +packetLen(0x01ab, 12) + +// Packet: 0x01ac +packetLen(0x01ac, 6) + +// Packet: 0x01ad +packetLen(0x01ad, -1) + +// Packet: 0x01ae +packetLen(0x01ae, 6) + +// Packet: 0x01af +packetLen(0x01af, 4) + +// Packet: 0x01b0 +packetLen(0x01b0, 11) + +// Packet: 0x01b1 +packetLen(0x01b1, 7) + +// Packet: 0x01b2 +packetLen(0x01b2, -1) + +// Packet: 0x01b3 +packetLen(0x01b3, 67) + +// Packet: 0x01b4 +packetLen(0x01b4, 12) + +// Packet: 0x01b5 +packetLen(0x01b5, 18) + +// Packet: 0x01b6 +packetLen(0x01b6, 114) + +// Packet: 0x01b7 +packetLen(0x01b7, 6) + +// Packet: 0x01b8 +packetLen(0x01b8, 3) + +// Packet: 0x01b9 +packetLen(0x01b9, 6) + +// Packet: 0x01ba +packetLen(0x01ba, 26) + +// Packet: 0x01bb +packetLen(0x01bb, 26) + +// Packet: 0x01bc +packetLen(0x01bc, 26) + +// Packet: 0x01bd +packetLen(0x01bd, 26) + +// Packet: 0x01be +packetLen(0x01be, 2) + +// Packet: 0x01bf +packetLen(0x01bf, 3) + +// Packet: 0x01c0 +packetLen(0x01c0, 2) + +// Packet: 0x01c1 +packetLen(0x01c1, 14) + +// Packet: 0x01c2 +packetLen(0x01c2, 10) + +// Packet: 0x01c3 +packetLen(0x01c3, -1) + +// Packet: 0x01c4 +packetLen(0x01c4, 32) + +// Packet: 0x01c5 +packetLen(0x01c5, 32) + +// Packet: 0x01c6 +packetLen(0x01c6, 4) + +// Packet: 0x01c7 +packetLen(0x01c7, 2) + +// Packet: 0x01c8 +packetLen(0x01c8, 15) + +// Packet: 0x01c9 +packetLen(0x01c9, 97) + +// Packet: 0x01ca +packetLen(0x01ca, 3) + +// Packet: 0x01cb +packetLen(0x01cb, 9) + +// Packet: 0x01cc +packetLen(0x01cc, 9) + +// Packet: 0x01cd +packetLen(0x01cd, 30) + +// Packet: 0x01ce +packetLen(0x01ce, 6) + +// Packet: 0x01cf +packetLen(0x01cf, 28) + +// Packet: 0x01d0 +packetLen(0x01d0, 8) + +// Packet: 0x01d1 +packetLen(0x01d1, 14) + +// Packet: 0x01d2 +packetLen(0x01d2, 10) + +// Packet: 0x01d3 +packetLen(0x01d3, 35) + +// Packet: 0x01d4 +packetLen(0x01d4, 6) + +// Packet: 0x01d5 +packetLen(0x01d5, -1) + +// Packet: 0x01d6 +packetLen(0x01d6, 4) + +// Packet: 0x01d7 +packetLen(0x01d7, 15) + +// Packet: 0x01d8 +packetLen(0x01d8, 58) + +// Packet: 0x01d9 +packetLen(0x01d9, 57) + +// Packet: 0x01da +packetLen(0x01da, 64) + +// Packet: 0x01db +packetLen(0x01db, 2) + +// Packet: 0x01dc +packetLen(0x01dc, -1) + +// Packet: 0x01dd +packetLen(0x01dd, 47) + +// Packet: 0x01de +packetLen(0x01de, 33) + +// Packet: 0x01df +packetLen(0x01df, 6) + +// Packet: 0x01e0 +packetLen(0x01e0, 30) + +// Packet: 0x01e1 +packetLen(0x01e1, 8) + +// Packet: 0x01e2 +packetLen(0x01e2, 34) + +// Packet: 0x01e3 +packetLen(0x01e3, 14) + +// Packet: 0x01e4 +packetLen(0x01e4, 2) + +// Packet: 0x01e5 +packetLen(0x01e5, 6) + +// Packet: 0x01e6 +packetLen(0x01e6, 26) + +// Packet: 0x01e7 +packetLen(0x01e7, 2) + +// Packet: 0x01e8 +packetLen(0x01e8, 28) + +// Packet: 0x01e9 +packetLen(0x01e9, 81) + +// Packet: 0x01ea +packetLen(0x01ea, 6) + +// Packet: 0x01eb +packetLen(0x01eb, 10) + +// Packet: 0x01ec +packetLen(0x01ec, 26) + +// Packet: 0x01ed +packetLen(0x01ed, 2) + +// Packet: 0x01ee +packetLen(0x01ee, -1) + +// Packet: 0x01ef +packetLen(0x01ef, -1) + +// Packet: 0x01f0 +packetLen(0x01f0, -1) + +// Packet: 0x01f1 +packetLen(0x01f1, -1) + +// Packet: 0x01f2 +packetLen(0x01f2, 20) + +// Packet: 0x01f3 +packetLen(0x01f3, 10) + +// Packet: 0x01f4 +packetLen(0x01f4, 32) + +// Packet: 0x01f5 +packetLen(0x01f5, 9) + +// Packet: 0x01f6 +packetLen(0x01f6, 34) + +// Packet: 0x01f7 +packetLen(0x01f7, 14) + +// Packet: 0x01f8 +packetLen(0x01f8, 2) + +// Packet: 0x01f9 +packetLen(0x01f9, 6) + +// Packet: 0x01fa +packetLen(0x01fa, 48) + +// Packet: 0x01fb +packetLen(0x01fb, 56) + +// Packet: 0x01fc +packetLen(0x01fc, -1) + +// Packet: 0x01fd +packetLen(0x01fd, 25) + +// Packet: 0x01fe +packetLen(0x01fe, 5) + +// Packet: 0x01ff +packetLen(0x01ff, 10) + +// Packet: 0x0200 +packetLen(0x0200, 26) + +// Packet: 0x0201 +packetLen(0x0201, -1) + +// Packet: 0x0202 +packetLen(0x0202, 26) + +// Packet: 0x0203 +packetLen(0x0203, 10) + +// Packet: 0x0204 +packetLen(0x0204, 18) + +// Packet: 0x0205 +packetLen(0x0205, 26) + +// Packet: 0x0206 +packetLen(0x0206, 35) + +// Packet: 0x0207 +packetLen(0x0207, 34) + +// Packet: 0x0208 +packetLen(0x0208, 14) + +// Packet: 0x0209 +packetLen(0x0209, 36) + +// Packet: 0x020a +packetLen(0x020a, 10) + +// Packet: 0x020d +packetLen(0x020d, -1) + +// Packet: 0x020e +packetLen(0x020e, 32) + +// Packet: 0x0212 +packetLen(0x0212, 26) + +// Packet: 0x0213 +packetLen(0x0213, 26) + +// Packet: 0x0214 +packetLen(0x0214, 42) + +// Packet: 0x0215 +packetLen(0x0215, 6) + +// Packet: 0x0216 +packetLen(0x0216, 6) + +// Packet: 0x0217 +packetLen(0x0217, 2) + +// Packet: 0x0218 +packetLen(0x0218, 2) + +// Packet: 0x0219 +packetLen(0x0219, 282) + +// Packet: 0x021a +packetLen(0x021a, 282) + +// Packet: 0x021b +packetLen(0x021b, 10) + +// Packet: 0x021c +packetLen(0x021c, 10) + +// Packet: 0x021d +packetLen(0x021d, 6) + +// Packet: 0x021e +packetLen(0x021e, 6) + +// Packet: 0x021f +packetLen(0x021f, 66) + +// Packet: 0x0220 +packetLen(0x0220, 10) + +// Packet: 0x0221 +packetLen(0x0221, -1) + +// Packet: 0x0222 +packetLen(0x0222, 6) + +// Packet: 0x0223 +packetLen(0x0223, 10) + +// Packet: 0x0224 +packetLen(0x0224, 10) + +// Packet: 0x0225 +packetLen(0x0225, 2) + +// Packet: 0x0226 +packetLen(0x0226, 282) + +// Packet: 0x0227 +packetLen(0x0227, 18) + +// Packet: 0x0228 +packetLen(0x0228, 18) + +// Packet: 0x0229 +packetLen(0x0229, 15) + +// Packet: 0x022a +packetLen(0x022a, 62) + +// Packet: 0x022b +packetLen(0x022b, 61) + +// Packet: 0x022c +packetLen(0x022c, 69) + +// Packet: 0x022d +packetLen(0x022d, 5) + +// Packet: 0x022e +packetLen(0x022e, 73) + +// Packet: 0x022f +packetLen(0x022f, 7) + +// Packet: 0x0230 +packetLen(0x0230, 12) + +// Packet: 0x0231 +packetLen(0x0231, 26) + +// Packet: 0x0232 +packetLen(0x0232, 9) + +// Packet: 0x0233 +packetLen(0x0233, 11) + +// Packet: 0x0234 +packetLen(0x0234, 6) + +// Packet: 0x0235 +packetLen(0x0235, -1) + +// Packet: 0x0236 +packetLen(0x0236, 10) + +// Packet: 0x0237 +packetLen(0x0237, 2) + +// Packet: 0x0238 +packetLen(0x0238, 282) + +// Packet: 0x0239 +packetLen(0x0239, 11) + +// Packet: 0x023a +packetLen(0x023a, 4) + +// Packet: 0x023b +packetLen(0x023b, 36) + +// Packet: 0x023c +packetLen(0x023c, 6) + +// Packet: 0x023d +packetLen(0x023d, 6) + +// Packet: 0x023e +packetLen(0x023e, 8) + +// Packet: 0x023f +packetLen(0x023f, 2) + +// Packet: 0x0240 +packetLen(0x0240, -1) + +// Packet: 0x0241 +packetLen(0x0241, 6) + +// Packet: 0x0242 +packetLen(0x0242, -1) + +// Packet: 0x0243 +packetLen(0x0243, 6) + +// Packet: 0x0244 +packetLen(0x0244, 6) + +// Packet: 0x0245 +packetLen(0x0245, 3) + +// Packet: 0x0246 +packetLen(0x0246, 4) + +// Packet: 0x0247 +packetLen(0x0247, 8) + +// Packet: 0x0248 +packetLen(0x0248, -1) + +// Packet: 0x0249 +packetLen(0x0249, 3) + +// Packet: 0x024a +packetLen(0x024a, 70) + +// Packet: 0x024b +packetLen(0x024b, 4) + +// Packet: 0x024c +packetLen(0x024c, 8) + +// Packet: 0x024d +packetLen(0x024d, 12) + +// Packet: 0x024e +packetLen(0x024e, 6) + +// Packet: 0x024f +packetLen(0x024f, 10) + +// Packet: 0x0250 +packetLen(0x0250, 3) + +// Packet: 0x0251 +packetLen(0x0251, 34) + +// Packet: 0x0252 +packetLen(0x0252, -1) + +// Packet: 0x0253 +packetLen(0x0253, 3) + +// Packet: 0x0254 +packetLen(0x0254, 3) + +// Packet: 0x0255 +packetLen(0x0255, 5) + +// Packet: 0x0256 +packetLen(0x0256, 5) + +// Packet: 0x0257 +packetLen(0x0257, 8) + +// Packet: 0x0258 +packetLen(0x0258, 2) + +// Packet: 0x0259 +packetLen(0x0259, 3) + +// Packet: 0x025a +packetLen(0x025a, -1) + +// Packet: 0x025b +packetLen(0x025b, 8) + +// Packet: 0x025c +packetLen(0x025c, 4) + +// Packet: 0x025d +packetLen(0x025d, 6) + +// Packet: 0x025e +packetLen(0x025e, 4) + +// Packet: 0x025f +packetLen(0x025f, 6) + +// Packet: 0x0260 +packetLen(0x0260, 6) + +// Packet: 0x0261 +packetLen(0x0261, 11) + +// Packet: 0x0262 +packetLen(0x0262, 11) + +// Packet: 0x0263 +packetLen(0x0263, 11) + +// Packet: 0x0264 +packetLen(0x0264, 20) + +// Packet: 0x0265 +packetLen(0x0265, 20) + +// Packet: 0x0266 +packetLen(0x0266, 30) + +// Packet: 0x0267 +packetLen(0x0267, 4) + +// Packet: 0x0268 +packetLen(0x0268, 4) + +// Packet: 0x0269 +packetLen(0x0269, 4) + +// Packet: 0x026a +packetLen(0x026a, 4) + +// Packet: 0x026b +packetLen(0x026b, 4) + +// Packet: 0x026c +packetLen(0x026c, 4) + +// Packet: 0x026d +packetLen(0x026d, 4) + +// Packet: 0x026f +packetLen(0x026f, 2) + +// Packet: 0x0270 +packetLen(0x0270, 2) + +// Packet: 0x0271 +packetLen(0x0271, 40) + +// Packet: 0x0272 +packetLen(0x0272, 44) + +// Packet: 0x0273 +packetLen(0x0273, 30) + +// Packet: 0x0274 +packetLen(0x0274, 8) + +// Packet: 0x0275 +packetLen(0x0275, 37) + +// Packet: 0x0276 +packetLen(0x0276, -1) + +// Packet: 0x0277 +packetLen(0x0277, 84) + +// Packet: 0x0278 +packetLen(0x0278, 2) + +// Packet: 0x0279 +packetLen(0x0279, 2) + +// Packet: 0x027a +packetLen(0x027a, -1) + +// Packet: 0x027b +packetLen(0x027b, 14) + +// Packet: 0x027c +packetLen(0x027c, 60) + +// Packet: 0x027d +packetLen(0x027d, 62) + +// Packet: 0x027e +packetLen(0x027e, -1) + +// Packet: 0x027f +packetLen(0x027f, 8) + +// Packet: 0x0280 +packetLen(0x0280, 12) + +// Packet: 0x0281 +packetLen(0x0281, 4) + +// Packet: 0x0282 +packetLen(0x0282, 284) + +// Packet: 0x0283 +packetLen(0x0283, 6) + +// Packet: 0x0284 +packetLen(0x0284, 14) + +// Packet: 0x0285 +packetLen(0x0285, 6) + +// Packet: 0x0286 +packetLen(0x0286, 4) + +// Packet: 0x0287 +packetLen(0x0287, -1) + +// Packet: 0x0288 +packetLen(0x0288, -1) + +// Packet: 0x0289 +packetLen(0x0289, 12) + +// Packet: 0x028a +packetLen(0x028a, 18) + +// Packet: 0x028b +packetLen(0x028b, -1) + +// Packet: 0x028c +packetLen(0x028c, 46) + +// Packet: 0x028d +packetLen(0x028d, 34) + +// Packet: 0x028e +packetLen(0x028e, 4) + +// Packet: 0x028f +packetLen(0x028f, 6) + +// Packet: 0x0290 +packetLen(0x0290, 4) + +// Packet: 0x0291 +packetLen(0x0291, 4) + +// Packet: 0x0292 +packetLen(0x0292, 2) + +// Packet: 0x0293 +packetLen(0x0293, 70) + +// Packet: 0x0294 +packetLen(0x0294, 10) + +// Packet: 0x0295 +packetLen(0x0295, -1) + +// Packet: 0x0296 +packetLen(0x0296, -1) + +// Packet: 0x0297 +packetLen(0x0297, -1) + +// Packet: 0x0298 +packetLen(0x0298, 10) + +// Packet: 0x0299 +packetLen(0x0299, 8) + +// Packet: 0x029a +packetLen(0x029a, 37) + +// Packet: 0x029b +packetLen(0x029b, 80) + +// Packet: 0x029c +packetLen(0x029c, 66) + +// Packet: 0x029d +packetLen(0x029d, -1) + +// Packet: 0x029e +packetLen(0x029e, 11) + +// Packet: 0x029f +packetLen(0x029f, 3) + +// Packet: 0x02a2 +packetLen(0x02a2, 8) + +// Packet: 0x02a5 +packetLen(0x02a5, 8) + +// Packet: 0x02a6 +packetLen(0x02a6, -1) + +// Packet: 0x02a7 +packetLen(0x02a7, -1) + +// Packet: 0x02aa +packetLen(0x02aa, 4) + +// Packet: 0x02ab +packetLen(0x02ab, 36) + +// Packet: 0x02ac +packetLen(0x02ac, 6) + +// Packet: 0x02ad +packetLen(0x02ad, 8) + +// Packet: 0x02b0 +packetLen(0x02b0, 85) + +// Packet: 0x02b1 +packetLen(0x02b1, -1) + +// Packet: 0x02b2 +packetLen(0x02b2, -1) + +// Packet: 0x02b3 +packetLen(0x02b3, 107) + +// Packet: 0x02b4 +packetLen(0x02b4, 6) + +// Packet: 0x02b5 +packetLen(0x02b5, -1) + +// Packet: 0x02b6 +packetLen(0x02b6, 7) + +// Packet: 0x02b7 +packetLen(0x02b7, 7) + +// Packet: 0x02b8 +packetLen(0x02b8, 32) + +// Packet: 0x02b9 +packetLen(0x02b9, 191) + +// Packet: 0x02ba +packetLen(0x02ba, 11) + +// Packet: 0x02bb +packetLen(0x02bb, 8) + +// Packet: 0x02bc +packetLen(0x02bc, 6) + +// Packet: 0x02c1 +packetLen(0x02c1, -1) + +// Packet: 0x02c2 +packetLen(0x02c2, -1) + +// Packet: 0x02c4 +packetLen(0x02c4, 26) + +// Packet: 0x02c5 +packetLen(0x02c5, 30) + +// Packet: 0x02c6 +packetLen(0x02c6, 30) + +// Packet: 0x02c7 +packetLen(0x02c7, 7) + +// Packet: 0x02c8 +packetLen(0x02c8, 3) + +// Packet: 0x02c9 +packetLen(0x02c9, 3) + +// Packet: 0x02ca +packetLen(0x02ca, 3) + +// Packet: 0x02cb +packetLen(0x02cb, 65) + +// Packet: 0x02cc +packetLen(0x02cc, 4) + +// Packet: 0x02cd +packetLen(0x02cd, 71) + +// Packet: 0x02ce +packetLen(0x02ce, 10) + +// Packet: 0x02cf +packetLen(0x02cf, 6) + +// Packet: 0x02d0 +packetLen(0x02d0, -1) + +// Packet: 0x02d1 +packetLen(0x02d1, -1) + +// Packet: 0x02d2 +packetLen(0x02d2, -1) + +// Packet: 0x02d3 +packetLen(0x02d3, 4) + +// Packet: 0x02d4 +packetLen(0x02d4, 39) + +// Packet: 0x02d5 +packetLen(0x02d5, 2) + +// Packet: 0x02d6 +packetLen(0x02d6, 6) + +// Packet: 0x02d7 +packetLen(0x02d7, -1) + +// Packet: 0x02d8 +packetLen(0x02d8, 10) + +// Packet: 0x02d9 +packetLen(0x02d9, 10) + +// Packet: 0x02da +packetLen(0x02da, 3) + +// Packet: 0x02db +packetLen(0x02db, -1) + +// Packet: 0x02dc +packetLen(0x02dc, -1) + +// Packet: 0x02dd +packetLen(0x02dd, 32) + +// Packet: 0x02de +packetLen(0x02de, 6) + +// Packet: 0x02df +packetLen(0x02df, 36) + +// Packet: 0x02e0 +packetLen(0x02e0, 34) + +// Packet: 0x02e1 +packetLen(0x02e1, 33) + +// Packet: 0x02e2 +packetLen(0x02e2, 20) + +// Packet: 0x02e3 +packetLen(0x02e3, 22) + +// Packet: 0x02e4 +packetLen(0x02e4, 11) + +// Packet: 0x02e5 +packetLen(0x02e5, 9) + +// Packet: 0x02e6 +packetLen(0x02e6, 6) + +// Packet: 0x02e7 +packetLen(0x02e7, -1) + +// Packet: 0x02e8 +packetLen(0x02e8, -1) + +// Packet: 0x02e9 +packetLen(0x02e9, -1) + +// Packet: 0x02ea +packetLen(0x02ea, -1) + +// Packet: 0x02eb +packetLen(0x02eb, 13) + +// Packet: 0x02ec +packetLen(0x02ec, 71) + +// Packet: 0x02ed +packetLen(0x02ed, 63) + +// Packet: 0x02ee +packetLen(0x02ee, 64) + +// Packet: 0x02ef +packetLen(0x02ef, 8) + +// Packet: 0x02f0 +packetLen(0x02f0, 10) + +// Packet: 0x02f1 +packetLen(0x02f1, 2) + +// Packet: 0x02f2 +packetLen(0x02f2, 2) + +// Packet: 0x02f3 +packetLen(0x02f3, -1) + +// Packet: 0x02f4 +packetLen(0x02f4, 3) + +// Packet: 0x02f5 +packetLen(0x02f5, 7) + +// Packet: 0x02f6 +packetLen(0x02f6, 7) + +// Packet: 0x035c +packetLen(0x035c, 2) + +// Packet: 0x035d +packetLen(0x035d, -1) + +// Packet: 0x035e +packetLen(0x035e, 2) + +// Packet: 0x035f +packetLen(0x035f, 5) + +// Packet: 0x0360 +packetLen(0x0360, 6) + +// Packet: 0x0361 +packetLen(0x0361, 5) + +// Packet: 0x0362 +packetLen(0x0362, 6) + +// Packet: 0x0363 +packetLen(0x0363, 6) + +// Packet: 0x0364 +packetLen(0x0364, 8) + +// Packet: 0x0365 +packetLen(0x0365, 8) + +// Packet: 0x0366 +packetLen(0x0366, 10) + +// Packet: 0x0367 +packetLen(0x0367, 31) + +// Packet: 0x0368 +packetLen(0x0368, 6) + +// Packet: 0x0369 +packetLen(0x0369, 6) + +// Packet: 0x03dd +packetLen(0x03dd, 18) + +// Packet: 0x03de +packetLen(0x03de, 18) + +// Packet: 0x0436 +packetLen(0x0436, 19) + +// Packet: 0x0437 +packetLen(0x0437, 7) + +// Packet: 0x0438 +packetLen(0x0438, 10) + +// Packet: 0x0439 +packetLen(0x0439, 8) + +// Packet: 0x043d +packetLen(0x043d, 8) + +// Packet: 0x043e +packetLen(0x043e, -1) + +// Packet: 0x043f +packetLen(0x043f, 25) + +// Packet: 0x0440 +packetLen(0x0440, 10) + +// Packet: 0x0441 +packetLen(0x0441, 4) + +// Packet: 0x0442 +packetLen(0x0442, -1) + +// Packet: 0x0443 +packetLen(0x0443, 8) + +// Packet: 0x0444 +packetLen(0x0444, -1) + +// Packet: 0x0445 +packetLen(0x0445, 12) + +// Packet: 0x0446 +packetLen(0x0446, 14) + +// Packet: 0x0447 +packetLen(0x0447, 2) + +// Packet: 0x0448 +packetLen(0x0448, -1) + +// Packet: 0x0449 +packetLen(0x0449, 4) + +// Packet: 0x044a +packetLen(0x044a, 6) + +// Packet: 0x044b +packetLen(0x044b, 2) + +// Packet: 0x07d7 +packetLen(0x07d7, 8) + +// Packet: 0x07d8 +packetLen(0x07d8, 8) + +// Packet: 0x07d9 +packetLen(0x07d9, 268) + +// Packet: 0x07da +packetLen(0x07da, 6) + +// Packet: 0x07db +packetLen(0x07db, 8) + +// Packet: 0x07dc +packetLen(0x07dc, 6) + +// Packet: 0x07dd +packetLen(0x07dd, 54) + +// Packet: 0x07de +packetLen(0x07de, 30) + +// Packet: 0x07df +packetLen(0x07df, 54) + +// Packet: 0x07e0 +packetLen(0x07e0, 58) + +// Packet: 0x07e1 +packetLen(0x07e1, 15) + +// Packet: 0x07e2 +packetLen(0x07e2, 8) + +// Packet: 0x07e3 +packetLen(0x07e3, 6) + +// Packet: 0x07e4 +packetLen(0x07e4, -1) + +// Packet: 0x07e5 +packetLen(0x07e5, 4) + +// Packet: 0x07e6 +packetLen(0x07e6, 8) + +// Packet: 0x07e7 +packetLen(0x07e7, 32) + +// Packet: 0x07e8 +packetLen(0x07e8, -1) + +// Packet: 0x07e9 +packetLen(0x07e9, 5) + +// Packet: 0x07ea +packetLen(0x07ea, 2) + +// Packet: 0x07eb +packetLen(0x07eb, -1) + +// Packet: 0x07ec +packetLen(0x07ec, 8) + +// Packet: 0x07ed +packetLen(0x07ed, 10) + +// Packet: 0x07ee +packetLen(0x07ee, 6) + +// Packet: 0x07ef +packetLen(0x07ef, 8) + +// Packet: 0x07f0 +packetLen(0x07f0, 6) + +// Packet: 0x07f1 +packetLen(0x07f1, 18) + +// Packet: 0x07f2 +packetLen(0x07f2, 8) + +// Packet: 0x07f3 +packetLen(0x07f3, 6) + +// Packet: 0x07f4 +packetLen(0x07f4, 3) + +// Packet: 0x07f5 +packetLen(0x07f5, 6) + +// Packet: 0x07f6 +packetLen(0x07f6, 14) + +// Packet: 0x07f7 +packetLen(0x07f7, -1) + +// Packet: 0x07f8 +packetLen(0x07f8, -1) + +// Packet: 0x07f9 +packetLen(0x07f9, -1) + +// Packet: 0x07fa +packetLen(0x07fa, 8) + +// Packet: 0x07fb +packetLen(0x07fb, 25) + +// Packet: 0x07fc +packetLen(0x07fc, 10) + +// Packet: 0x07fd +packetLen(0x07fd, -1) + +// Packet: 0x07fe +packetLen(0x07fe, 26) + +// Packet: 0x0800 +packetLen(0x0800, -1) + +// Packet: 0x0801 +packetLen(0x0801, -1) + +// Packet: 0x0802 +packetLen(0x0802, 18) + +// Packet: 0x0803 +packetLen(0x0803, 4) + +// Packet: 0x0804 +packetLen(0x0804, 14) + +// Packet: 0x0805 +packetLen(0x0805, -1) + +// Packet: 0x0806 +packetLen(0x0806, 2) + +// Packet: 0x0807 +packetLen(0x0807, 4) + +// Packet: 0x0808 +packetLen(0x0808, 14) + +// Packet: 0x0809 +packetLen(0x0809, 50) + +// Packet: 0x080a +packetLen(0x080a, 18) + +// Packet: 0x080b +packetLen(0x080b, 6) + +// Packet: 0x080c +packetLen(0x080c, 2) + +// Packet: 0x080d +packetLen(0x080d, 3) + +// Packet: 0x080e +packetLen(0x080e, 14) + +// Packet: 0x080f +packetLen(0x080f, 30) + +// Packet: 0x0810 +packetLen(0x0810, 3) + +// Packet: 0x0811 +packetLen(0x0811, -1) + +// Packet: 0x0812 +packetLen(0x0812, 8) + +// Packet: 0x0813 +packetLen(0x0813, -1) + +// Packet: 0x0814 +packetLen(0x0814, 86) + +// Packet: 0x0815 +packetLen(0x0815, 2) + +// Packet: 0x0816 +packetLen(0x0816, 6) + +// Packet: 0x0817 +packetLen(0x0817, 6) + +// Packet: 0x0818 +packetLen(0x0818, -1) + +// Packet: 0x0819 +packetLen(0x0819, -1) + +// Packet: 0x081a +packetLen(0x081a, 4) + +// Packet: 0x081b +packetLen(0x081b, 12) + +// Packet: 0x081c +packetLen(0x081c, 10) + +// Packet: 0x081d +packetLen(0x081d, 22) + +// Packet: 0x081e +packetLen(0x081e, 8) + +// Packet: 0x081f +packetLen(0x081f, -1) + +// Packet: 0x0820 +packetLen(0x0820, 11) + +// Packet: 0x0821 +packetLen(0x0821, 2) + +// Packet: 0x0822 +packetLen(0x0822, 9) + +// Packet: 0x0823 +packetLen(0x0823, -1) + +// Packet: 0x0824 +packetLen(0x0824, 8) + +// Packet: 0x0825 +packetLen(0x0825, -1) + +// Packet: 0x0827 +packetLen(0x0827, 6) + +// Packet: 0x0828 +packetLen(0x0828, 14) + +// Packet: 0x0829 +packetLen(0x0829, 12) + +// Packet: 0x082a +packetLen(0x082a, 10) + +// Packet: 0x082b +packetLen(0x082b, 6) + +// Packet: 0x082c +packetLen(0x082c, 10) + +// Packet: 0x082d +packetLen(0x082d, -1) + +// Packet: 0x0835 +packetLen(0x0835, -1) + +// Packet: 0x0836 +packetLen(0x0836, -1) + +// Packet: 0x0837 +packetLen(0x0837, 3) + +// Packet: 0x0838 +packetLen(0x0838, 2) + +// Packet: 0x0839 +packetLen(0x0839, 66) + +// Packet: 0x083a +packetLen(0x083a, 5) + +// Packet: 0x083b +packetLen(0x083b, 2) + +// Packet: 0x083c +packetLen(0x083c, 14) + +// Packet: 0x083d +packetLen(0x083d, 6) + +// Packet: 0x083e +packetLen(0x083e, 26) + +// Packet: 0x0840 +packetLen(0x0840, -1) + +// Packet: 0x0841 +packetLen(0x0841, 4) + +// Packet: 0x0842 +packetLen(0x0842, 6) + +// Packet: 0x0843 +packetLen(0x0843, 6) + +// Packet: 0x0844 +packetLen(0x0844, 2) + +// Packet: 0x0845 +packetLen(0x0845, 10) + +// Packet: 0x0846 +packetLen(0x0846, 4) + +// Packet: 0x0847 +packetLen(0x0847, -1) + +// Packet: 0x0848 +packetLen(0x0848, -1) + +// Packet: 0x0849 +packetLen(0x0849, 16) + +// Packet: 0x084a +packetLen(0x084a, 2) + +// Packet: 0x084b +packetLen(0x084b, 21) + +// Packet: 0x084c +packetLen(0x084c, 10) + +// Packet: 0x084d +packetLen(0x084d, 10) + +// Packet: 0x084e +packetLen(0x084e, 5) + +// Packet: 0x084f +packetLen(0x084f, 6) + +// Packet: 0x0850 +packetLen(0x0850, 7) + +// Packet: 0x0851 +packetLen(0x0851, -1) + +// Packet: 0x0852 +packetLen(0x0852, 2) + +// Packet: 0x0853 +packetLen(0x0853, -1) + +// Packet: 0x0854 +packetLen(0x0854, -1) + +// Packet: 0x0855 +packetLen(0x0855, 6) + +// Packet: 0x0856 +packetLen(0x0856, -1) + +// Packet: 0x0857 +packetLen(0x0857, -1) + +// Packet: 0x0858 +packetLen(0x0858, -1) + +// Packet: 0x0859 +packetLen(0x0859, -1) + +// Packet: 0x085a +packetLen(0x085a, 2) + +// Packet: 0x085b +packetLen(0x085b, 2) + +// Packet: 0x085c +packetLen(0x085c, 2) + +// Packet: 0x085d +packetLen(0x085d, 2) + +// Packet: 0x085e +packetLen(0x085e, 2) + +// Packet: 0x085f +packetLen(0x085f, 2) + +// Packet: 0x0860 +packetLen(0x0860, 2) + +// Packet: 0x0861 +packetLen(0x0861, 2) + +// Packet: 0x0862 +packetLen(0x0862, 2) + +// Packet: 0x0863 +packetLen(0x0863, 2) + +// Packet: 0x0864 +packetLen(0x0864, 2) + +// Packet: 0x0865 +packetLen(0x0865, 2) + +// Packet: 0x0866 +packetLen(0x0866, 2) + +// Packet: 0x0867 +packetLen(0x0867, 2) + +// Packet: 0x0868 +packetLen(0x0868, 2) + +// Packet: 0x0869 +packetLen(0x0869, 2) + +// Packet: 0x086a +packetLen(0x086a, 2) + +// Packet: 0x086b +packetLen(0x086b, 2) + +// Packet: 0x086c +packetLen(0x086c, 2) + +// Packet: 0x086d +packetLen(0x086d, 2) + +// Packet: 0x086e +packetLen(0x086e, 2) + +// Packet: 0x086f +packetLen(0x086f, 2) + +// Packet: 0x0870 +packetLen(0x0870, 2) + +// Packet: 0x0871 +packetLen(0x0871, 2) + +// Packet: 0x0872 +packetLen(0x0872, 2) + +// Packet: 0x0873 +packetLen(0x0873, 2) + +// Packet: 0x0874 +packetLen(0x0874, 2) + +// Packet: 0x0875 +packetLen(0x0875, 2) + +// Packet: 0x0876 +packetLen(0x0876, 2) + +// Packet: 0x0877 +packetLen(0x0877, 2) + +// Packet: 0x0878 +packetLen(0x0878, 2) + +// Packet: 0x0879 +packetLen(0x0879, 2) + +// Packet: 0x087a +packetLen(0x087a, 2) + +// Packet: 0x087b +packetLen(0x087b, 2) + +// Packet: 0x087c +packetLen(0x087c, 2) + +// Packet: 0x087d +packetLen(0x087d, 2) + +// Packet: 0x087e +packetLen(0x087e, 2) + +// Packet: 0x087f +packetLen(0x087f, 2) + +// Packet: 0x0880 +packetLen(0x0880, 2) + +// Packet: 0x0881 +packetLen(0x0881, 2) + +// Packet: 0x0882 +packetLen(0x0882, 2) + +// Packet: 0x0883 +packetLen(0x0883, 2) + +// Packet: 0x0884 +packetLen(0x0884, 2) + +// Packet: 0x0885 +packetLen(0x0885, 2) + +// Packet: 0x0886 +packetLen(0x0886, 2) + +// Packet: 0x0887 +packetLen(0x0887, 2) + +// Packet: 0x0888 +packetLen(0x0888, 2) + +// Packet: 0x0889 +packetLen(0x0889, 2) + +// Packet: 0x088a +packetLen(0x088a, 2) + +// Packet: 0x088b +packetLen(0x088b, 2) + +// Packet: 0x088c +packetLen(0x088c, 2) + +// Packet: 0x088d +packetLen(0x088d, 2) + +// Packet: 0x088e +packetLen(0x088e, 2) + +// Packet: 0x088f +packetLen(0x088f, 2) + +// Packet: 0x0890 +packetLen(0x0890, 2) + +// Packet: 0x0891 +packetLen(0x0891, 2) + +// Packet: 0x0892 +packetLen(0x0892, 2) + +// Packet: 0x0893 +packetLen(0x0893, 2) + +// Packet: 0x0894 +packetLen(0x0894, 2) + +// Packet: 0x0895 +packetLen(0x0895, 2) + +// Packet: 0x0896 +packetLen(0x0896, 2) + +// Packet: 0x0897 +packetLen(0x0897, 2) + +// Packet: 0x0898 +packetLen(0x0898, 2) + +// Packet: 0x0899 +packetLen(0x0899, 2) + +// Packet: 0x089a +packetLen(0x089a, 2) + +// Packet: 0x089b +packetLen(0x089b, 2) + +// Packet: 0x089c +packetLen(0x089c, 2) + +// Packet: 0x089d +packetLen(0x089d, 2) + +// Packet: 0x089e +packetLen(0x089e, 2) + +// Packet: 0x089f +packetLen(0x089f, 2) + +// Packet: 0x08a0 +packetLen(0x08a0, 2) + +// Packet: 0x08a1 +packetLen(0x08a1, 2) + +// Packet: 0x08a2 +packetLen(0x08a2, 2) + +// Packet: 0x08a3 +packetLen(0x08a3, 2) + +// Packet: 0x08a4 +packetLen(0x08a4, 2) + +// Packet: 0x08a5 +packetLen(0x08a5, 2) + +// Packet: 0x08a6 +packetLen(0x08a6, 2) + +// Packet: 0x08a7 +packetLen(0x08a7, 2) + +// Packet: 0x08a8 +packetLen(0x08a8, 2) + +// Packet: 0x08a9 +packetLen(0x08a9, 2) + +// Packet: 0x08aa +packetLen(0x08aa, 2) + +// Packet: 0x08ab +packetLen(0x08ab, 2) + +// Packet: 0x08ac +packetLen(0x08ac, 2) + +// Packet: 0x08ad +packetLen(0x08ad, 2) + +// Packet: 0x08af +packetLen(0x08af, 10) + +// Packet: 0x08b0 +packetLen(0x08b0, 17) + +// Packet: 0x08b1 +packetLen(0x08b1, -1) + +// Packet: 0x08b2 +packetLen(0x08b2, -1) + +// Packet: 0x08b3 +packetLen(0x08b3, -1) + +// Packet: 0x08b4 +packetLen(0x08b4, 2) + +// Packet: 0x08b5 +packetLen(0x08b5, 6) + +// Packet: 0x08b6 +packetLen(0x08b6, 3) + +// Packet: 0x08b8 +packetLen(0x08b8, 10) + +// Packet: 0x08b9 +packetLen(0x08b9, 12) + +// Packet: 0x08ba +packetLen(0x08ba, 10) + +// Packet: 0x08bb +packetLen(0x08bb, 8) + +// Packet: 0x08bc +packetLen(0x08bc, 10) + +// Packet: 0x08bd +packetLen(0x08bd, 8) + +// Packet: 0x08be +packetLen(0x08be, 14) + +// Packet: 0x08bf +packetLen(0x08bf, 8) + +// Packet: 0x08c0 +packetLen(0x08c0, -1) + +// Packet: 0x08c1 +packetLen(0x08c1, 2) + +// Packet: 0x08c2 +packetLen(0x08c2, 2) + +// Packet: 0x08c3 +packetLen(0x08c3, 10) + +// Packet: 0x08c4 +packetLen(0x08c4, 8) + +// Packet: 0x08c5 +packetLen(0x08c5, 6) + +// Packet: 0x08c6 +packetLen(0x08c6, 4) + +// Packet: 0x08c7 +packetLen(0x08c7, -1) + +// Packet: 0x08c8 +packetLen(0x08c8, 34) + +// Packet: 0x08c9 +packetLen(0x08c9, 2) + +// Packet: 0x08ca +packetLen(0x08ca, -1) + +// Packet: 0x08cb +packetLen(0x08cb, -1) + +// Packet: 0x08cc +packetLen(0x08cc, 109) + +// Packet: 0x08cd +packetLen(0x08cd, 10) + +// Packet: 0x08ce +packetLen(0x08ce, 2) + +// Packet: 0x08cf +packetLen(0x08cf, 10) + +// Packet: 0x08d0 +packetLen(0x08d0, 9) + +// Packet: 0x08d1 +packetLen(0x08d1, 7) + +// Packet: 0x08d2 +packetLen(0x08d2, 10) + +// Packet: 0x08d3 +packetLen(0x08d3, 10) + +// Packet: 0x08d4 +packetLen(0x08d4, 8) + +// Packet: 0x08d5 +packetLen(0x08d5, -1) + +// Packet: 0x08d6 +packetLen(0x08d6, 6) + +// Packet: 0x08d7 +packetLen(0x08d7, 28) + +// Packet: 0x08d8 +packetLen(0x08d8, 27) + +// Packet: 0x08d9 +packetLen(0x08d9, 30) + +// Packet: 0x08da +packetLen(0x08da, 26) + +// Packet: 0x08db +packetLen(0x08db, 27) + +// Packet: 0x08dc +packetLen(0x08dc, 26) + +// Packet: 0x08dd +packetLen(0x08dd, 27) + +// Packet: 0x08de +packetLen(0x08de, 27) + +// Packet: 0x08df +packetLen(0x08df, 50) + +// Packet: 0x08e0 +packetLen(0x08e0, 51) + +// Packet: 0x08e1 +packetLen(0x08e1, 51) + +// Packet: 0x08e2 +packetLen(0x08e2, 27) + +// Packet: 0x08e3 +packetLen(0x08e3, 157) + +// Packet: 0x08e4 +packetLen(0x08e4, 6) + +// Packet: 0x08fc +packetLen(0x08fc, 30) + +// Packet: 0x08fd +packetLen(0x08fd, 6) + +// Packet: 0x08fe +packetLen(0x08fe, -1) + +// Packet: 0x08ff +packetLen(0x08ff, 24) + +// Packet: 0x0900 +packetLen(0x0900, -1) + +// Packet: 0x0901 +packetLen(0x0901, -1) + +// Packet: 0x0902 +packetLen(0x0902, -1) + +// Packet: 0x0903 +packetLen(0x0903, -1) + +// Packet: 0x0904 +packetLen(0x0904, -1) + +// Packet: 0x0905 +packetLen(0x0905, -1) + +// Packet: 0x0906 +packetLen(0x0906, -1) + +// Packet: 0x0907 +packetLen(0x0907, 5) + +// Packet: 0x0908 +packetLen(0x0908, 5) + +// Packet: 0x090a +packetLen(0x090a, 26) + +// Packet: 0x090d +packetLen(0x090d, -1) + +// Packet: 0x090e +packetLen(0x090e, 2) + +// Packet: 0x090f +packetLen(0x090f, -1) + +// Packet: 0x0910 +packetLen(0x0910, 10) + +// Packet: 0x0911 +packetLen(0x0911, 30) + +// Packet: 0x0912 +packetLen(0x0912, 10) + +// Packet: 0x0913 +packetLen(0x0913, 30) + +// Packet: 0x0914 +packetLen(0x0914, -1) + +// Packet: 0x0915 +packetLen(0x0915, -1) + +// Packet: 0x0916 +packetLen(0x0916, 26) + +// Packet: 0x0917 +packetLen(0x0917, 2) + +// Packet: 0x0918 +packetLen(0x0918, 2) + +// Packet: 0x0919 +packetLen(0x0919, 2) + +// Packet: 0x091a +packetLen(0x091a, 2) + +// Packet: 0x091b +packetLen(0x091b, 2) + +// Packet: 0x091c +packetLen(0x091c, 2) + +// Packet: 0x091d +packetLen(0x091d, 2) + +// Packet: 0x091e +packetLen(0x091e, 2) + +// Packet: 0x091f +packetLen(0x091f, 2) + +// Packet: 0x0920 +packetLen(0x0920, 2) + +// Packet: 0x0921 +packetLen(0x0921, 2) + +// Packet: 0x0922 +packetLen(0x0922, 2) + +// Packet: 0x0923 +packetLen(0x0923, 2) + +// Packet: 0x0924 +packetLen(0x0924, 2) + +// Packet: 0x0925 +packetLen(0x0925, 2) + +// Packet: 0x0926 +packetLen(0x0926, 2) + +// Packet: 0x0927 +packetLen(0x0927, 2) + +// Packet: 0x0928 +packetLen(0x0928, 2) + +// Packet: 0x0929 +packetLen(0x0929, 2) + +// Packet: 0x092a +packetLen(0x092a, 2) + +// Packet: 0x092b +packetLen(0x092b, 2) + +// Packet: 0x092c +packetLen(0x092c, 2) + +// Packet: 0x092d +packetLen(0x092d, 2) + +// Packet: 0x092e +packetLen(0x092e, 2) + +// Packet: 0x092f +packetLen(0x092f, 2) + +// Packet: 0x0930 +packetLen(0x0930, 2) + +// Packet: 0x0931 +packetLen(0x0931, 2) + +// Packet: 0x0932 +packetLen(0x0932, 2) + +// Packet: 0x0933 +packetLen(0x0933, 2) + +// Packet: 0x0934 +packetLen(0x0934, 2) + +// Packet: 0x0935 +packetLen(0x0935, 2) + +// Packet: 0x0936 +packetLen(0x0936, 2) + +// Packet: 0x0937 +packetLen(0x0937, 2) + +// Packet: 0x0938 +packetLen(0x0938, 2) + +// Packet: 0x0939 +packetLen(0x0939, 2) + +// Packet: 0x093a +packetLen(0x093a, 2) + +// Packet: 0x093b +packetLen(0x093b, 2) + +// Packet: 0x093c +packetLen(0x093c, 2) + +// Packet: 0x093d +packetLen(0x093d, 2) + +// Packet: 0x093e +packetLen(0x093e, 2) + +// Packet: 0x093f +packetLen(0x093f, 2) + +// Packet: 0x0940 +packetLen(0x0940, 2) + +// Packet: 0x0941 +packetLen(0x0941, 2) + +// Packet: 0x0942 +packetLen(0x0942, 2) + +// Packet: 0x0943 +packetLen(0x0943, 2) + +// Packet: 0x0944 +packetLen(0x0944, 2) + +// Packet: 0x0945 +packetLen(0x0945, 2) + +// Packet: 0x0946 +packetLen(0x0946, 2) + +// Packet: 0x0947 +packetLen(0x0947, 2) + +// Packet: 0x0948 +packetLen(0x0948, 2) + +// Packet: 0x0949 +packetLen(0x0949, 2) + +// Packet: 0x094a +packetLen(0x094a, 2) + +// Packet: 0x094b +packetLen(0x094b, 2) + +// Packet: 0x094c +packetLen(0x094c, 2) + +// Packet: 0x094d +packetLen(0x094d, 2) + +// Packet: 0x094e +packetLen(0x094e, 2) + +// Packet: 0x094f +packetLen(0x094f, 2) + +// Packet: 0x0950 +packetLen(0x0950, 2) + +// Packet: 0x0951 +packetLen(0x0951, 2) + +// Packet: 0x0952 +packetLen(0x0952, 2) + +// Packet: 0x0953 +packetLen(0x0953, 2) + +// Packet: 0x0954 +packetLen(0x0954, 2) + +// Packet: 0x0955 +packetLen(0x0955, 2) + +// Packet: 0x0956 +packetLen(0x0956, 2) + +// Packet: 0x0957 +packetLen(0x0957, 2) + +// Packet: 0x0958 +packetLen(0x0958, 2) + +// Packet: 0x0959 +packetLen(0x0959, 2) + +// Packet: 0x095a +packetLen(0x095a, 2) + +// Packet: 0x095b +packetLen(0x095b, 2) + +// Packet: 0x095c +packetLen(0x095c, 2) + +// Packet: 0x095d +packetLen(0x095d, 2) + +// Packet: 0x095e +packetLen(0x095e, 2) + +// Packet: 0x095f +packetLen(0x095f, 2) + +// Packet: 0x0960 +packetLen(0x0960, 2) + +// Packet: 0x0961 +packetLen(0x0961, 2) + +// Packet: 0x0962 +packetLen(0x0962, 2) + +// Packet: 0x0963 +packetLen(0x0963, 2) + +// Packet: 0x0964 +packetLen(0x0964, 2) + +// Packet: 0x0965 +packetLen(0x0965, 2) + +// Packet: 0x0966 +packetLen(0x0966, 2) + +// Packet: 0x0967 +packetLen(0x0967, 2) + +// Packet: 0x0968 +packetLen(0x0968, 2) + +// Packet: 0x0969 +packetLen(0x0969, 2) + +// Packet: 0x096a +packetLen(0x096a, 2) + +// Packet: 0x096b +packetLen(0x096b, 4) + +// Packet: 0x096c +packetLen(0x096c, 6) + +// Packet: 0x096d +packetLen(0x096d, -1) + +// Packet: 0x096e +packetLen(0x096e, -1) + +// Packet: 0x096f +packetLen(0x096f, 7) + +// Packet: 0x0970 +packetLen(0x0970, 31) + +// Packet: 0x0971 +packetLen(0x0971, 6) + +// Packet: 0x0972 +packetLen(0x0972, -1) + +// Packet: 0x0973 +packetLen(0x0973, 7) + +// Packet: 0x0974 +packetLen(0x0974, 2) + +// Packet: 0x0975 +packetLen(0x0975, -1) + +// Packet: 0x0976 +packetLen(0x0976, -1) + +// Packet: 0x0977 +packetLen(0x0977, 14) + +// Packet: 0x0978 +packetLen(0x0978, 6) + +// Packet: 0x0979 +packetLen(0x0979, 50) + +// Packet: 0x097a +packetLen(0x097a, -1) + +// Packet: 0x097b +packetLen(0x097b, -1) + +// Packet: 0x097c +packetLen(0x097c, 4) + +// Packet: 0x097d +packetLen(0x097d, 288) + +// Packet: 0x097e +packetLen(0x097e, 12) + +// Packet: 0x097f +packetLen(0x097f, -1) + +// Packet: 0x0980 +packetLen(0x0980, 7) + +// Packet: 0x0981 +packetLen(0x0981, -1) + +// Packet: 0x0982 +packetLen(0x0982, 7) + +// Packet: 0x0983 +packetLen(0x0983, 29) + +// Packet: 0x0984 +packetLen(0x0984, 28) + +// Packet: 0x0985 +packetLen(0x0985, -1) + +// Packet: 0x0986 +packetLen(0x0986, 10) + +// Packet: 0x0987 +packetLen(0x0987, -1) + +// Packet: 0x0988 +packetLen(0x0988, 6) + +// Packet: 0x0989 +packetLen(0x0989, 2) + +// Packet: 0x098a +packetLen(0x098a, -1) + +// Packet: 0x098b +packetLen(0x098b, 2) + +// Packet: 0x098c +packetLen(0x098c, 4) + +// Packet: 0x098d +packetLen(0x098d, -1) + +// Packet: 0x098e +packetLen(0x098e, -1) + +// Packet: 0x098f +packetLen(0x098f, -1) + +// Packet: 0x0990 +packetLen(0x0990, 41) + +// Packet: 0x0991 +packetLen(0x0991, -1) + +// Packet: 0x0992 +packetLen(0x0992, -1) + +// Packet: 0x0993 +packetLen(0x0993, -1) + +// Packet: 0x0994 +packetLen(0x0994, -1) + +// Packet: 0x0995 +packetLen(0x0995, -1) + +// Packet: 0x0996 +packetLen(0x0996, -1) + +// Packet: 0x0997 +packetLen(0x0997, -1) + +// Packet: 0x0998 +packetLen(0x0998, 8) + +// Packet: 0x0999 +packetLen(0x0999, 11) + +// Packet: 0x099a +packetLen(0x099a, 9) + +// Packet: 0x099b +packetLen(0x099b, 8) + +// Packet: 0x099c +packetLen(0x099c, 6) + +// Packet: 0x099d +packetLen(0x099d, -1) + +// Packet: 0x099e +packetLen(0x099e, 12) + +// Packet: 0x099f +packetLen(0x099f, -1) + +// Packet: 0x09a0 +packetLen(0x09a0, 6) + +// Packet: 0x09a1 +packetLen(0x09a1, 2) + +// Packet: 0x09a2 +packetLen(0x09a2, 6) + +// Packet: 0x09a3 +packetLen(0x09a3, -1) + +// Packet: 0x09a4 +packetLen(0x09a4, 18) + +// Packet: 0x09a5 +packetLen(0x09a5, 7) + +// Packet: 0x09a6 +packetLen(0x09a6, 12) + +// Packet: 0x09a7 +packetLen(0x09a7, 10) + +// Packet: 0x09a8 +packetLen(0x09a8, 16) + +// Packet: 0x09a9 +packetLen(0x09a9, 10) + +// Packet: 0x09aa +packetLen(0x09aa, 16) + +// Packet: 0x09ab +packetLen(0x09ab, 6) + +// Packet: 0x09ac +packetLen(0x09ac, -1) + +// Packet: 0x09ad +packetLen(0x09ad, 12) + +// Packet: 0x09ae +packetLen(0x09ae, 19) + +// Packet: 0x09af +packetLen(0x09af, 4) + +// Packet: 0x09b0 +packetLen(0x09b0, 10) + +// Packet: 0x09b1 +packetLen(0x09b1, 4) + +// Packet: 0x09b2 +packetLen(0x09b2, 10) + +// Packet: 0x09b3 +packetLen(0x09b3, 6) + +// Packet: 0x09b4 +packetLen(0x09b4, 6) + +// Packet: 0x09b5 +packetLen(0x09b5, 2) + +// Packet: 0x09b6 +packetLen(0x09b6, 6) + +// Packet: 0x09b7 +packetLen(0x09b7, 4) + +// Packet: 0x09b8 +packetLen(0x09b8, 6) + +// Packet: 0x09b9 +packetLen(0x09b9, 4) + +// Packet: 0x09ba +packetLen(0x09ba, 2) + +// Packet: 0x09bb +packetLen(0x09bb, 6) + +// Packet: 0x09bc +packetLen(0x09bc, 6) + +// Packet: 0x09bd +packetLen(0x09bd, 2) + +// Packet: 0x09be +packetLen(0x09be, 2) + +// Packet: 0x09bf +packetLen(0x09bf, 4) + +// Packet: 0x09c1 +packetLen(0x09c1, 10) + +// Packet: 0x09c2 +packetLen(0x09c2, -1) + +// Packet: 0x09c3 +packetLen(0x09c3, 10) + +// Packet: 0x09c4 +packetLen(0x09c4, 10) + +// Packet: 0x09c5 +packetLen(0x09c5, 1042) + +// Packet: 0x09c6 +packetLen(0x09c6, -1) + +// Packet: 0x09c7 +packetLen(0x09c7, 18) + +// Packet: 0x09c8 +packetLen(0x09c8, -1) + +// Packet: 0x09c9 +packetLen(0x09c9, -1) + +// Packet: 0x09ca +packetLen(0x09ca, -1) + +// Packet: 0x09cb +packetLen(0x09cb, 17) + +// Packet: 0x09cc +packetLen(0x09cc, -1) + +// Packet: 0x09cd +packetLen(0x09cd, 8) + +// Packet: 0x09ce +packetLen(0x09ce, 102) + +// Packet: 0x09cf +packetLen(0x09cf, -1) + +// Packet: 0x09d0 +packetLen(0x09d0, -1) + +// Packet: 0x09d1 +packetLen(0x09d1, 14) + +// Packet: 0x09d2 +packetLen(0x09d2, -1) + +// Packet: 0x09d3 +packetLen(0x09d3, -1) + +// Packet: 0x09d4 +packetLen(0x09d4, 2) + +// Packet: 0x09d5 +packetLen(0x09d5, -1) + +// Packet: 0x09d6 +packetLen(0x09d6, -1) + +// Packet: 0x09d7 +packetLen(0x09d7, -1) + +// Packet: 0x09d8 +packetLen(0x09d8, 2) + +// Packet: 0x09d9 +packetLen(0x09d9, 4) + +// Packet: 0x09da +packetLen(0x09da, -1) + +// Packet: 0x09db +packetLen(0x09db, -1) + +// Packet: 0x09dc +packetLen(0x09dc, -1) + +// Packet: 0x09dd +packetLen(0x09dd, -1) + +// Packet: 0x09de +packetLen(0x09de, -1) + +// Packet: 0x09df +packetLen(0x09df, 7) + +// Packet: 0x09e0 +packetLen(0x09e0, -1) + +// Packet: 0x09e1 +packetLen(0x09e1, 8) + +// Packet: 0x09e2 +packetLen(0x09e2, 8) + +// Packet: 0x09e3 +packetLen(0x09e3, 8) + +// Packet: 0x09e4 +packetLen(0x09e4, 8) + +// Packet: 0x09e5 +packetLen(0x09e5, 18) + +// Packet: 0x09e6 +packetLen(0x09e6, 24) + +// Packet: 0x09e7 +packetLen(0x09e7, 3) + +// Packet: 0x09e8 +packetLen(0x09e8, 11) + +// Packet: 0x09e9 +packetLen(0x09e9, 2) + +// Packet: 0x09ea +packetLen(0x09ea, 11) + +// Packet: 0x09eb +packetLen(0x09eb, -1) + +// Packet: 0x09ec +packetLen(0x09ec, -1) + +// Packet: 0x09ed +packetLen(0x09ed, 3) + +// Packet: 0x09ee +packetLen(0x09ee, 11) + +// Packet: 0x09ef +packetLen(0x09ef, 11) + +// Packet: 0x09f0 +packetLen(0x09f0, -1) + +// Packet: 0x09f1 +packetLen(0x09f1, 11) + +// Packet: 0x09f2 +packetLen(0x09f2, 12) + +// Packet: 0x09f3 +packetLen(0x09f3, 11) + +// Packet: 0x09f4 +packetLen(0x09f4, 12) + +// Packet: 0x09f5 +packetLen(0x09f5, 11) + +// Packet: 0x09f6 +packetLen(0x09f6, 11) + +// Packet: 0x09f7 +packetLen(0x09f7, 77) + +// Packet: 0x09f8 +packetLen(0x09f8, -1) + +// Packet: 0x09f9 +packetLen(0x09f9, 143) + +// Packet: 0x09fa +packetLen(0x09fa, -1) + +// Packet: 0x09fb +packetLen(0x09fb, -1) + +// Packet: 0x09fc +packetLen(0x09fc, 6) + +// Packet: 0x09fd +packetLen(0x09fd, -1) + +// Packet: 0x09fe +packetLen(0x09fe, -1) + +// Packet: 0x09ff +packetLen(0x09ff, -1) + +// Packet: 0x0a00 +packetLen(0x0a00, 269) + +// Packet: 0x0a01 +packetLen(0x0a01, 3) + +// Packet: 0x0a02 +packetLen(0x0a02, 4) + +// Packet: 0x0a03 +packetLen(0x0a03, 2) + +// Packet: 0x0a04 +packetLen(0x0a04, 6) + +// Packet: 0x0a05 +packetLen(0x0a05, 63) + +// Packet: 0x0a06 +packetLen(0x0a06, 6) + +// Packet: 0x0a07 +packetLen(0x0a07, 9) + +// Packet: 0x0a08 +packetLen(0x0a08, 26) + +// Packet: 0x0a09 +packetLen(0x0a09, 55) + +// Packet: 0x0a0a +packetLen(0x0a0a, 57) + +// Packet: 0x0a0b +packetLen(0x0a0b, 57) + +// Packet: 0x0a0c +packetLen(0x0a0c, 66) + +// Packet: 0x0a0d +packetLen(0x0a0d, -1) + +// Packet: 0x0a0e +packetLen(0x0a0e, 14) + +// Packet: 0x0a0f +packetLen(0x0a0f, -1) + +// Packet: 0x0a10 +packetLen(0x0a10, -1) + +// Packet: 0x0a11 +packetLen(0x0a11, -1) + +// Packet: 0x0a12 +packetLen(0x0a12, 27) + +// Packet: 0x0a13 +packetLen(0x0a13, 26) + +// Packet: 0x0a14 +packetLen(0x0a14, 10) + +// Packet: 0x0a15 +packetLen(0x0a15, 12) + +// Packet: 0x0a16 +packetLen(0x0a16, 26) + +// Packet: 0x0a17 +packetLen(0x0a17, 6) + +// Packet: 0x0a18 +packetLen(0x0a18, 14) + +// Packet: 0x0a19 +packetLen(0x0a19, 2) + +// Packet: 0x0a1a +packetLen(0x0a1a, 25) + +// Packet: 0x0a1b +packetLen(0x0a1b, 2) + +// Packet: 0x0a1c +packetLen(0x0a1c, -1) + +// Packet: 0x0a1d +packetLen(0x0a1d, 2) + +// Packet: 0x0a1e +packetLen(0x0a1e, 3) + +// Packet: 0x0a1f +packetLen(0x0a1f, 2) + +// Packet: 0x0a20 +packetLen(0x0a20, 23) + +// Packet: 0x0a21 +packetLen(0x0a21, 3) + +// Packet: 0x0a22 +packetLen(0x0a22, 7) + +// Packet: 0x0a23 +packetLen(0x0a23, -1) + +// Packet: 0x0a24 +packetLen(0x0a24, 66) + +// Packet: 0x0a25 +packetLen(0x0a25, 6) + +// Packet: 0x0a26 +packetLen(0x0a26, 7) + +// Packet: 0x0a27 +packetLen(0x0a27, 8) + +// Packet: 0x0a28 +packetLen(0x0a28, 3) + +// Packet: 0x0a29 +packetLen(0x0a29, 6) + +// Packet: 0x0a2a +packetLen(0x0a2a, 6) + +// Packet: 0x0a2b +packetLen(0x0a2b, 14) + +// Packet: 0x0a2c +packetLen(0x0a2c, 12) + +// Packet: 0x0a2d +packetLen(0x0a2d, -1) + +// Packet: 0x0a2e +packetLen(0x0a2e, 6) + +// Packet: 0x0a2f +packetLen(0x0a2f, 7) + +// Packet: 0x0a30 +packetLen(0x0a30, 106) + +// Packet: 0x0a31 +packetLen(0x0a31, -1) + +// Packet: 0x0a32 +packetLen(0x0a32, 2) + +// Packet: 0x0a33 +packetLen(0x0a33, 7) + +// Packet: 0x0a34 +packetLen(0x0a34, 6) + +// Packet: 0x0a35 +packetLen(0x0a35, 4) + +// Packet: 0x0a36 +packetLen(0x0a36, 7) + +// Packet: 0x0a37 +packetLen(0x0a37, 69) + +// Packet: 0x0a38 +packetLen(0x0a38, 3) + +// Packet: 0x0a39 +packetLen(0x0a39, 36) + +// Packet: 0x0a3a +packetLen(0x0a3a, 12) + +// Packet: 0x0a3b +packetLen(0x0a3b, -1) + +// Packet: 0x0a3c +packetLen(0x0a3c, -1) + +// Packet: 0x0a3d +packetLen(0x0a3d, 20) + +// Packet: 0x0a3e +packetLen(0x0a3e, -1) + +// Packet: 0x0a3f +packetLen(0x0a3f, 11) + +// Packet: 0x0a40 +packetLen(0x0a40, 11) + +// Packet: 0x0a41 +packetLen(0x0a41, 18) + +// Packet: 0x0a42 +packetLen(0x0a42, 43) + +// Packet: 0x0a43 +packetLen(0x0a43, 85) + +// Packet: 0x0a44 +packetLen(0x0a44, -1) + +// Packet: 0x0a46 +packetLen(0x0a46, 14) + +// Packet: 0x0a47 +packetLen(0x0a47, 3) + +// Packet: 0x0a48 +packetLen(0x0a48, 2) + +// Packet: 0x0a49 +packetLen(0x0a49, 22) + +// Packet: 0x0a4a +packetLen(0x0a4a, 6) + +// Packet: 0x0a4b +packetLen(0x0a4b, 22) + +// Packet: 0x0a4c +packetLen(0x0a4c, 28) + +// Packet: 0x0a4d +packetLen(0x0a4d, -1) + +// Packet: 0x0a4e +packetLen(0x0a4e, 6) + +// Packet: 0x0a4f +packetLen(0x0a4f, -1) + +// Packet: 0x0a50 +packetLen(0x0a50, 4) + +// Packet: 0x0a51 +packetLen(0x0a51, 34) + +// Packet: 0x0a52 +packetLen(0x0a52, 20) + +// Packet: 0x0a53 +packetLen(0x0a53, 10) + +// Packet: 0x0a54 +packetLen(0x0a54, -1) + +// Packet: 0x0a55 +packetLen(0x0a55, 2) + +// Packet: 0x0a56 +packetLen(0x0a56, 6) + +// Packet: 0x0a57 +packetLen(0x0a57, 6) + +// Packet: 0x0a58 +packetLen(0x0a58, 8) + +// Packet: 0x0a59 +packetLen(0x0a59, -1) + +// Packet: 0x0a5a +packetLen(0x0a5a, 2) + +// Packet: 0x0a5b +packetLen(0x0a5b, 7) + +// Packet: 0x0a5c +packetLen(0x0a5c, 18) + +// Packet: 0x0a5d +packetLen(0x0a5d, 6) + +// Packet: 0x0a68 +packetLen(0x0a68, 3) + +// Packet: 0x0a69 +packetLen(0x0a69, 6) + +// Packet: 0x0a6a +packetLen(0x0a6a, 12) + +// Packet: 0x0a6b +packetLen(0x0a6b, -1) + +// Packet: 0x0a6c +packetLen(0x0a6c, 7) + +// Packet: 0x0a6d +packetLen(0x0a6d, -1) + +// Packet: 0x0a6e +packetLen(0x0a6e, -1) + +// Packet: 0x0a6f +packetLen(0x0a6f, -1) + +// Packet: 0x0a70 +packetLen(0x0a70, 2) + +// Packet: 0x0a71 +packetLen(0x0a71, -1) + +// Packet: 0x0a72 +packetLen(0x0a72, 61) + +// Packet: 0x0a73 +packetLen(0x0a73, 2) + +// Packet: 0x0a74 +packetLen(0x0a74, 8) + +// Packet: 0x0a76 +packetLen(0x0a76, 80) + +// Packet: 0x0a77 +packetLen(0x0a77, 15) + +// Packet: 0x0a78 +packetLen(0x0a78, 15) + +// Packet: 0x0a79 +packetLen(0x0a79, -1) + +// Packet: 0x0a7b +packetLen(0x0a7b, -1) + +// Packet: 0x0a7c +packetLen(0x0a7c, -1) + +// Packet: 0x0a7d +packetLen(0x0a7d, -1) + +// Packet: 0x0a7e +packetLen(0x0a7e, -1) + +// Packet: 0x0a7f +packetLen(0x0a7f, -1) + +// Packet: 0x0a80 +packetLen(0x0a80, 6) + +// Packet: 0x0a81 +packetLen(0x0a81, 4) + +// Packet: 0x0a82 +packetLen(0x0a82, 46) + +// Packet: 0x0a83 +packetLen(0x0a83, 46) + +// Packet: 0x0a84 +packetLen(0x0a84, 94) + +// Packet: 0x0a85 +packetLen(0x0a85, 82) + +// Packet: 0x0a86 +packetLen(0x0a86, -1) + +// Packet: 0x0a87 +packetLen(0x0a87, -1) + +// Packet: 0x0a88 +packetLen(0x0a88, 2) + +// Packet: 0x0a89 +packetLen(0x0a89, 61) + +// Packet: 0x0a8a +packetLen(0x0a8a, 6) + +// Packet: 0x0a8b +packetLen(0x0a8b, 2) + +// Packet: 0x0a8c +packetLen(0x0a8c, 2) + +// Packet: 0x0a8d +packetLen(0x0a8d, -1) + +// Packet: 0x0a8e +packetLen(0x0a8e, 2) + +// Packet: 0x0a8f +packetLen(0x0a8f, 2) + +// Packet: 0x0a90 +packetLen(0x0a90, 3) + +// Packet: 0x0a91 +packetLen(0x0a91, -1) + +// Packet: 0x0a92 +packetLen(0x0a92, -1) + +// Packet: 0x0a93 +packetLen(0x0a93, 3) + +// Packet: 0x0a94 +packetLen(0x0a94, 2) + +// Packet: 0x0a95 +packetLen(0x0a95, 4) + +// Packet: 0x0a96 +packetLen(0x0a96, 61) + +// Packet: 0x0a97 +packetLen(0x0a97, 8) + +// Packet: 0x0a98 +packetLen(0x0a98, 10) + +// Packet: 0x0a99 +packetLen(0x0a99, 4) + +// Packet: 0x0a9a +packetLen(0x0a9a, 10) + +// Packet: 0x0a9b +packetLen(0x0a9b, -1) + +// Packet: 0x0a9c +packetLen(0x0a9c, 2) + +// Packet: 0x0a9d +packetLen(0x0a9d, 4) + +// Packet: 0x0a9e +packetLen(0x0a9e, 2) + +// Packet: 0x0a9f +packetLen(0x0a9f, 2) + +// Packet: 0x0aa0 +packetLen(0x0aa0, 2) + +// Packet: 0x0aa1 +packetLen(0x0aa1, 4) + +// Packet: 0x0aa2 +packetLen(0x0aa2, -1) + +// Packet: 0x0aa3 +packetLen(0x0aa3, 9) + +// Packet: 0x0aa4 +packetLen(0x0aa4, 2) + +// Packet: 0x0aa5 +packetLen(0x0aa5, -1) + +// Packet: 0x0aa6 +packetLen(0x0aa6, 36) + +// Packet: 0x0aa7 +packetLen(0x0aa7, 6) + +// Packet: 0x0aa8 +packetLen(0x0aa8, 5) + +// Packet: 0x0aa9 +packetLen(0x0aa9, -1) + +// Packet: 0x0aaa +packetLen(0x0aaa, -1) + +// Packet: 0x0aab +packetLen(0x0aab, -1) + +// Packet: 0x0aac +packetLen(0x0aac, 69) + +// Packet: 0x0aad +packetLen(0x0aad, 51) + +// Packet: 0x0aae +packetLen(0x0aae, 2) + +// Packet: 0x0aaf +packetLen(0x0aaf, 6) + +// Packet: 0x0ab0 +packetLen(0x0ab0, 6) + +// Packet: 0x0ab1 +packetLen(0x0ab1, 14) + +// Packet: 0x0ab2 +packetLen(0x0ab2, 7) + +// Packet: 0x0ab3 +packetLen(0x0ab3, 19) + +// Packet: 0x0ab4 +packetLen(0x0ab4, 6) + +// Packet: 0x0ab5 +packetLen(0x0ab5, 2) + +// Packet: 0x0ab6 +packetLen(0x0ab6, 8) + +// Packet: 0x0ab7 +packetLen(0x0ab7, 4) + +// Packet: 0x0ab8 +packetLen(0x0ab8, 2) + +// Packet: 0x0ab9 +packetLen(0x0ab9, 47) + +// Packet: 0x0aba +packetLen(0x0aba, 2) + +// Packet: 0x0abb +packetLen(0x0abb, 2) + +// Packet: 0x0abc +packetLen(0x0abc, -1) + +// Packet: 0x0abd +packetLen(0x0abd, 10) + +// Packet: 0x0abe +packetLen(0x0abe, -1) + +// Packet: 0x0abf +packetLen(0x0abf, -1) + +// Packet: 0x0ac0 +packetLen(0x0ac0, 26) + +// Packet: 0x0ac1 +packetLen(0x0ac1, 26) + +// Packet: 0x0ac2 +packetLen(0x0ac2, -1) + +// Packet: 0x0ac3 +packetLen(0x0ac3, 2) + +// Packet: 0x0ac4 +packetLen(0x0ac4, -1) + +// Packet: 0x0ac5 +packetLen(0x0ac5, 156) + +// Packet: 0x0ac6 +packetLen(0x0ac6, 156) + +// Packet: 0x0ac7 +packetLen(0x0ac7, 156) + +// Packet: 0x0ac8 +packetLen(0x0ac8, 2) + +// Packet: 0x0ac9 +packetLen(0x0ac9, -1) + +// Packet: 0x0aca +packetLen(0x0aca, 3) + +// Packet: 0x0acb +packetLen(0x0acb, 12) + +// Packet: 0x0acc +packetLen(0x0acc, 18) + +// Packet: 0x0acd +packetLen(0x0acd, 23) + +// Packet: 0x0ace +packetLen(0x0ace, 4) + +// Packet: 0x0acf +packetLen(0x0acf, 68) + +// Packet: 0x0ad0 +packetLen(0x0ad0, 11) + +// Packet: 0x0ad1 +packetLen(0x0ad1, -1) + +// Packet: 0x0ad2 +packetLen(0x0ad2, 30) + +// Packet: 0x0ad3 +packetLen(0x0ad3, -1) + +// Packet: 0x0ad4 +packetLen(0x0ad4, -1) + +// Packet: 0x0ad5 +packetLen(0x0ad5, 2) + +// Packet: 0x0ad6 +packetLen(0x0ad6, 2) + +// Packet: 0x0ad7 +packetLen(0x0ad7, 8) + +// Packet: 0x0ad8 +packetLen(0x0ad8, 8) + +// Packet: 0x0ad9 +packetLen(0x0ad9, -1) + +// Packet: 0x0ada +packetLen(0x0ada, 32) + +// Packet: 0x0adb +packetLen(0x0adb, -1) + +// Packet: 0x0adc +packetLen(0x0adc, 6) + +// Packet: 0x0add +packetLen(0x0add, 24) + +// Packet: 0x0ade +packetLen(0x0ade, 6) + +// Packet: 0x0adf +packetLen(0x0adf, 58) + +// Packet: 0x0ae0 +packetLen(0x0ae0, 30) + +// Packet: 0x0ae1 +packetLen(0x0ae1, 28) + +// Packet: 0x0ae2 +packetLen(0x0ae2, 7) + +// Packet: 0x0ae3 +packetLen(0x0ae3, -1) + +// Packet: 0x0ae4 +packetLen(0x0ae4, 89) + +// Packet: 0x0ae5 +packetLen(0x0ae5, -1) + +// Packet: 0x0ae6 +packetLen(0x0ae6, 10) + +// Packet: 0x0ae7 +packetLen(0x0ae7, 38) + +// Packet: 0x0ae8 +packetLen(0x0ae8, 2) + +// Packet: 0x0ae9 +packetLen(0x0ae9, 13) + +// Packet: 0x0aec +packetLen(0x0aec, 2) + +// Packet: 0x0aed +packetLen(0x0aed, 2) + +// Packet: 0x0aee +packetLen(0x0aee, 2) + +// Packet: 0x0aef +packetLen(0x0aef, 2) + +// Packet: 0x0af0 +packetLen(0x0af0, 10) + +// Packet: 0x0af2 +packetLen(0x0af2, 40) + +// Packet: 0x0af3 +packetLen(0x0af3, -1) + +// Packet: 0x0af4 +packetLen(0x0af4, 11) + +// Packet: 0x0af5 +packetLen(0x0af5, 3) + +// Packet: 0x0af6 +packetLen(0x0af6, 88) + +// Packet: 0x0af7 +packetLen(0x0af7, 32) + +// Packet: 0x0af8 +packetLen(0x0af8, 11) + +// Packet: 0x0af9 +packetLen(0x0af9, 6) + +// Packet: 0x0afa +packetLen(0x0afa, 58) + +// Packet: 0x0afb +packetLen(0x0afb, -1) + +// Packet: 0x0afc +packetLen(0x0afc, 16) + +// Packet: 0x0afd +packetLen(0x0afd, -1) + +// Packet: 0x0afe +packetLen(0x0afe, -1) + +// Packet: 0x0aff +packetLen(0x0aff, -1) + +// Packet: 0x0b00 +packetLen(0x0b00, 8) + +// Packet: 0x0b01 +packetLen(0x0b01, 56) + +// Packet: 0x0b02 +packetLen(0x0b02, 26) + +// Packet: 0x0b03 +packetLen(0x0b03, -1) + +// Packet: 0x0b04 +packetLen(0x0b04, 90) + +// Packet: 0x0b05 +packetLen(0x0b05, 63) + +// Packet: 0x0b07 +packetLen(0x0b07, -1) + +// Packet: 0x0b08 +packetLen(0x0b08, -1) + +// Packet: 0x0b09 +packetLen(0x0b09, -1) + +// Packet: 0x0b0a +packetLen(0x0b0a, -1) + +// Packet: 0x0b0b +packetLen(0x0b0b, 4) + +// Packet: 0x0b0c +packetLen(0x0b0c, 155) + +// Packet: 0x0b0d +packetLen(0x0b0d, 10) + +// Packet: 0x0b0e +packetLen(0x0b0e, -1) + +// Packet: 0x0b0f +packetLen(0x0b0f, -1) + +// Packet: 0x0b10 +packetLen(0x0b10, 10) + +// Packet: 0x0b11 +packetLen(0x0b11, 4) + +// Packet: 0x0b12 +packetLen(0x0b12, 2) + +// Packet: 0x0b13 +packetLen(0x0b13, 48) + +// Packet: 0x0b14 +packetLen(0x0b14, 2) + +// Packet: 0x0b15 +packetLen(0x0b15, 7) + +// Packet: 0x0b16 +packetLen(0x0b16, 2) + +// Packet: 0x0b17 +packetLen(0x0b17, 3) + +// Packet: 0x0b18 +packetLen(0x0b18, 4) + +// Packet: 0x0b19 +packetLen(0x0b19, 2) + +// Packet: 0x0b1a +packetLen(0x0b1a, 29) + +// Packet: 0x0b1b +packetLen(0x0b1b, 2) + +// Packet: 0x0b1c +packetLen(0x0b1c, 2) + +// Packet: 0x0b1d +packetLen(0x0b1d, 2) + +// Packet: 0x0b1e +packetLen(0x0b1e, 14) + +// Packet: 0x0b1f +packetLen(0x0b1f, 14) + +// Packet: 0x0b20 +packetLen(0x0b20, 271) + +// Packet: 0x0b21 +packetLen(0x0b21, 13) + +// Packet: 0x0b22 +packetLen(0x0b22, 5) + +// Packet: 0x0b23 +packetLen(0x0b23, 6) + +// Packet: 0x0b24 +packetLen(0x0b24, 6) + +// Packet: 0x0b25 +packetLen(0x0b25, 6) + +// Packet: 0x0b27 +packetLen(0x0b27, -1) + +// Packet: 0x0b28 +packetLen(0x0b28, 3) + +// Packet: 0x0b2b +packetLen(0x0b2b, 11) + +// Packet: 0x0b2c +packetLen(0x0b2c, 3) + +// Packet: 0x0b2d +packetLen(0x0b2d, 11) + +// Packet: 0x0b2e +packetLen(0x0b2e, 4) + +// Packet: 0x0b2f +packetLen(0x0b2f, 73) + +// Packet: 0x0b30 +packetLen(0x0b30, -1) + +// Packet: 0x0b31 +packetLen(0x0b31, 17) + +// Packet: 0x0b32 +packetLen(0x0b32, -1) + +// Packet: 0x0b33 +packetLen(0x0b33, 17) + +// Packet: 0x0b34 +packetLen(0x0b34, 50) + +// Packet: 0x0b35 +packetLen(0x0b35, 3) + +// Packet: 0x0b36 +packetLen(0x0b36, -1) + +// Packet: 0x0b37 +packetLen(0x0b37, -1) + +// Packet: 0x0b39 +packetLen(0x0b39, -1) + +// Packet: 0x0b3c +packetLen(0x0b3c, 4) + +// Packet: 0x0b3d +packetLen(0x0b3d, -1) + +// Packet: 0x0b3e +packetLen(0x0b3e, -1) + +// Packet: 0x0b3f +packetLen(0x0b3f, 64) + +// Packet: 0x0b40 +packetLen(0x0b40, -1) + +// Packet: 0x0b41 +packetLen(0x0b41, 70) + +// Packet: 0x0b42 +packetLen(0x0b42, 62) + +// Packet: 0x0b43 +packetLen(0x0b43, 48) + +// Packet: 0x0b44 +packetLen(0x0b44, 58) + +// Packet: 0x0b45 +packetLen(0x0b45, 58) + +// Packet: 0x0b46 +packetLen(0x0b46, 10) + +// Packet: 0x0b47 +packetLen(0x0b47, 14) + +// Packet: 0x0b48 +packetLen(0x0b48, 18) + +// Packet: 0x0b49 +packetLen(0x0b49, 4) + +// Packet: 0x0b4a +packetLen(0x0b4a, 6) + +// Packet: 0x0b4b +packetLen(0x0b4b, 4) + +// Packet: 0x0b4c +packetLen(0x0b4c, 2) + +// Packet: 0x0b4d +packetLen(0x0b4d, -1) + +// Packet: 0x0b4e +packetLen(0x0b4e, -1) + +// Packet: 0x0b4f +packetLen(0x0b4f, 2) + +// Packet: 0x0b50 +packetLen(0x0b50, 2) + +// Packet: 0x0b51 +packetLen(0x0b51, 2) + +// Packet: 0x0b52 +packetLen(0x0b52, 2) + +// Packet: 0x0b53 +packetLen(0x0b53, 52) + +// Packet: 0x0b54 +packetLen(0x0b54, 8) + +// Packet: 0x0b55 +packetLen(0x0b55, -1) + +// Packet: 0x0b56 +packetLen(0x0b56, -1) + +// Packet: 0x0b57 +packetLen(0x0b57, -1) + +// Packet: 0x0b58 +packetLen(0x0b58, 2) + +// Packet: 0x0b59 +packetLen(0x0b59, 4) + +// Packet: 0x0b5a +packetLen(0x0b5a, -1) + +// Packet: 0x0b5b +packetLen(0x0b5b, 14) + +// Packet: 0x0b5c +packetLen(0x0b5c, 2) + +// Packet: 0x0b5d +packetLen(0x0b5d, 10) + +// Packet: 0x0b5e +packetLen(0x0b5e, 33) + +// Packet: 0x0b5f +packetLen(0x0b5f, -1) + +// Packet: 0x0b60 +packetLen(0x0b60, -1) + +// Packet: 0x0b61 +packetLen(0x0b61, -1) + +// Packet: 0x0b62 +packetLen(0x0b62, -1) + +// Packet: 0x0b63 +packetLen(0x0b63, -1) + +// Packet: 0x0b64 +packetLen(0x0b64, -1) + +// Packet: 0x0b65 +packetLen(0x0b65, -1) + +// Packet: 0x0b66 +packetLen(0x0b66, 26) + +// Packet: 0x0b67 +packetLen(0x0b67, 33) + +// Packet: 0x0b68 +packetLen(0x0b68, 12) + +// Packet: 0x0b69 +packetLen(0x0b69, 18) + +// Packet: 0x0b6a +packetLen(0x0b6a, -1) + +// Packet: 0x0b6b +packetLen(0x0b6b, 14) + +// Packet: 0x0b6c +packetLen(0x0b6c, 12) + +// Packet: 0x0b6d +packetLen(0x0b6d, 6) + +// Packet: 0x0b6e +packetLen(0x0b6e, 14) + +// Packet: 0x0b6f +#if PACKETVER >= 20200129 +packetLen(0x0b6f, 177) +#endif + +// Packet: 0x0b70 +#if PACKETVER >= 20200129 +packetLen(0x0b70, 8) +#endif + +// Packet: 0x0b71 +#if PACKETVER >= 20200129 +packetLen(0x0b71, 177) +#endif + +// Packet: 0x0b72 +#if PACKETVER >= 20200129 +packetLen(0x0b72, 4) +#endif + +// Packet: 0x0b73 +#if PACKETVER >= 20200212 +packetLen(0x0b73, 8) +#endif + +// Packet: 0x0b74 +#if PACKETVER >= 20200304 +packetLen(0x0b74, 1026) +#endif + +// Packet: 0x0b75 +#if PACKETVER >= 20200304 +packetLen(0x0b75, 1026) +#endif + + +#endif /* COMMON_PACKETS2020_LEN_ZERO_H */ diff --git a/src/common/packets/packets_len_zero.h b/src/common/packets/packets_len_zero.h index 1385c80ee..c07f89e3f 100644 --- a/src/common/packets/packets_len_zero.h +++ b/src/common/packets/packets_len_zero.h @@ -24,7 +24,9 @@ /* This file is autogenerated, please do not commit manual changes */ -#if PACKETVER >= 20190000 +#if PACKETVER >= 20200000 +#include "common/packets/packets2020_len_zero.h" +#elif PACKETVER >= 20190000 #include "common/packets/packets2019_len_zero.h" #elif PACKETVER >= 20180000 #include "common/packets/packets2018_len_zero.h" diff --git a/src/common/utils.c b/src/common/utils.c index 48ce539b6..084080df7 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -132,7 +132,7 @@ void findfile(const char *p, const char *pat, void (func)(const char *, void *co { WIN32_FIND_DATAA FindFileData; HANDLE hFind; - char tmppath[MAX_PATH+1]; + char tmppath[MAX_DIR_PATH + 1]; const char *path = (p ==NULL)? "." : p; const char *pattern = (pat==NULL)? "" : pat; @@ -166,9 +166,26 @@ void findfile(const char *p, const char *pat, void (func)(const char *, void *co } return; } -#else -#define MAX_DIR_PATH 2048 +/** + * Checks if the passed path points to a file. + * + * @param path The path which should be checked. + * @return true if the passed path points to a file, otherwise false. + * + **/ +bool is_file(const char *path) +{ + nullpo_retr(false, path); + + char path_tmp[MAX_DIR_PATH + 1]; + + checkpath(path_tmp, path); + + return ((GetFileAttributesA(path_tmp) & FILE_ATTRIBUTE_DIRECTORY) == 0); +} + +#else static char *checkpath(char *path, const char *srcpath) { @@ -235,6 +252,27 @@ void findfile(const char *p, const char *pat, void (func)(const char *, void *co closedir(dir); } + +/** + * Checks if the passed path points to a file. + * + * @param path The path which should be checked. + * @return true if the passed path points to a file, otherwise false. + * + **/ +bool is_file(const char *path) +{ + nullpo_retr(false, path); + + char path_tmp[MAX_DIR_PATH + 1]; + + checkpath(path_tmp, path); + + struct stat path_stat; + + return (stat(path_tmp, &path_stat) == 0 && S_ISREG(path_stat.st_mode)); +} + #endif bool exists(const char *filename) diff --git a/src/common/utils.h b/src/common/utils.h index a0590db7f..3e0d73e40 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -31,6 +31,14 @@ /* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */ #define HCACHE_KEY 'k' +#ifndef MAX_DIR_PATH +#ifdef WIN32 +#define MAX_DIR_PATH MAX_PATH +#else +#define MAX_DIR_PATH 2048 +#endif +#endif + //Caps values to min/max #define cap_value(a, min, max) (((a) >= (max)) ? (max) : ((a) <= (min)) ? (min) : (a)) @@ -40,6 +48,7 @@ void WriteDump(FILE* fp, const void* buffer, size_t length); void ShowDump(const void* buffer, size_t length); void findfile(const char *p, const char *pat, void (func)(const char *, void *), void *context); +bool is_file(const char *path); bool exists(const char* filename); /// calculates the value of A / B, in percent (rounded down) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 3cd26079d..410cd7af7 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4123,16 +4123,36 @@ ACMD(mapinfo) for (i = 0; i < map->list[m_id].npc_num;) { struct npc_data *nd = map->list[m_id].npc[i]; switch(nd->dir) { - case 0: strcpy(direction, msg_fd(fd,1101)); break; // North - case 1: strcpy(direction, msg_fd(fd,1102)); break; // North West - case 2: strcpy(direction, msg_fd(fd,1103)); break; // West - case 3: strcpy(direction, msg_fd(fd,1104)); break; // South West - case 4: strcpy(direction, msg_fd(fd,1105)); break; // South - case 5: strcpy(direction, msg_fd(fd,1106)); break; // South East - case 6: strcpy(direction, msg_fd(fd,1107)); break; // East - case 7: strcpy(direction, msg_fd(fd,1108)); break; // North East - case 9: strcpy(direction, msg_fd(fd,1109)); break; // North - default: strcpy(direction, msg_fd(fd,1110)); break; // Unknown + case UNIT_DIR_NORTH: + strcpy(direction, msg_fd(fd, 1101)); // North + break; + case UNIT_DIR_NORTHWEST: + strcpy(direction, msg_fd(fd, 1102)); // North West + break; + case UNIT_DIR_WEST: + strcpy(direction, msg_fd(fd, 1103)); // West + break; + case UNIT_DIR_SOUTHWEST: + strcpy(direction, msg_fd(fd, 1104)); // South West + break; + case UNIT_DIR_SOUTH: + strcpy(direction, msg_fd(fd, 1105)); // South + break; + case UNIT_DIR_SOUTHEAST: + strcpy(direction, msg_fd(fd, 1106)); // South East + break; + case UNIT_DIR_EAST: + strcpy(direction, msg_fd(fd, 1107)); // East + break; + case UNIT_DIR_NORTHEAST: + strcpy(direction, msg_fd(fd, 1108)); // North East + break; + case 9: // is this actually used? [skyleo] + strcpy(direction, msg_fd(fd, 1109)); // North + break; + default: + strcpy(direction, msg_fd(fd, 1110)); // Unknown + break; } if(strcmp(nd->name,nd->exname) == 0) safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,1111), // NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d @@ -4212,12 +4232,19 @@ ACMD(mount_peco) return true; } if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { + int mtype = MADO_ROBOT; + if (!*message) + sscanf(message, "%d", &mtype); + if (mtype < MADO_ROBOT || mtype >= MADO_MAX) { + clif->message(fd, msg_fd(fd, 173)); // Please enter a valid madogear type. + return false; + } if (!pc_ismadogear(sd)) { clif->message(sd->fd,msg_fd(fd,1123)); // You have mounted your Mado Gear. - pc->setmadogear(sd, true); + pc->setmadogear(sd, true, (enum mado_type)mtype); } else { clif->message(sd->fd,msg_fd(fd,1124)); // You have released your Mado Gear. - pc->setmadogear(sd, false); + pc->setmadogear(sd, false, (enum mado_type)mtype); } return true; } @@ -4483,59 +4510,90 @@ ACMD(loadnpc) return true; } +/** + * Unloads a specific NPC. + * + * @code{.herc} + * @unloadnpc <NPC_name> {<flag>} + * @endcode + * + **/ ACMD(unloadnpc) { - struct npc_data *nd; - char NPCname[NAME_LENGTH+1]; - - memset(NPCname, '\0', sizeof(NPCname)); + char npc_name[NAME_LENGTH + 1] = {'\0'}; + int flag = 1; - if (!*message || sscanf(message, "%24[^\n]", NPCname) < 1) { - clif->message(fd, msg_fd(fd,1133)); // Please enter a NPC name (usage: @npcoff <NPC_name>). + if (*message == '\0' || sscanf(message, "%24s %1d", npc_name, &flag) < 1) { + clif->message(fd, msg_fd(fd, 1133)); /// Please enter a NPC name (Usage: @unloadnpc <NPC_name> {<flag>}). return false; } - - if ((nd = npc->name2id(NPCname)) == NULL) { - clif->message(fd, msg_fd(fd,111)); // This NPC doesn't exist. + + struct npc_data *nd = npc->name2id(npc_name); + + if (nd == NULL) { + clif->message(fd, msg_fd(fd, 111)); /// This NPC doesn't exist. return false; } - npc->unload_duplicates(nd); - npc->unload(nd,true); + npc->unload_duplicates(nd, (flag != 0)); + npc->unload(nd, true, (flag != 0)); npc->read_event_script(); - clif->message(fd, msg_fd(fd,112)); // Npc Disabled. + clif->message(fd, msg_fd(fd, 112)); /// Npc Disabled. return true; } -/// Unload existing NPC within the NPC file and reload it. -/// Usage: @reloadnpc npc/sample_npc.txt +/** + * Unloads a script file and reloads it. + * Note: Be aware that some changes made by NPC are not reverted on unload. See doc/atcommands.txt for details. + * + * @code{.herc} + * @reloadnpc <path> {<flag>} + * @endcode + * + **/ ACMD(reloadnpc) { - if (!*message) { - clif->message(fd, msg_fd(fd, 1385)); // Usage: @unloadnpcfile <file name> + char format[20]; + + snprintf(format, sizeof(format), "%%%ds %%1d", MAX_DIR_PATH); + + char file_path[MAX_DIR_PATH + 1] = {'\0'}; + int flag = 1; + + if (*message == '\0' || (sscanf(message, format, file_path, &flag) < 1)) { + clif->message(fd, msg_fd(fd, 1516)); /// Usage: @reloadnpc <path> {<flag>} return false; - } else if (npc->unloadfile(message) == true) { - clif->message(fd, msg_fd(fd, 1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed. + } - FILE *fp = fopen(message, "r"); - // check if script file exists - if (fp == NULL) { - clif->message(fd, msg_fd(fd, 261)); - return false; - } - fclose(fp); + if (!exists(file_path)) { + clif->message(fd, msg_fd(fd, 1387)); /// File not found. + return false; + } - // add to list of script sources and run it - npc->addsrcfile(message); - npc->parsesrcfile(message, true); - npc->read_event_script(); + if (!is_file(file_path)) { + clif->message(fd, msg_fd(fd, 1518)); /// Not a file. + return false; + } - clif->message(fd, msg_fd(fd, 262)); - } else { - clif->message(fd, msg_fd(fd, 1387)); // File not found. + FILE *fp = fopen(file_path, "r"); + + if (fp == NULL) { + clif->message(fd, msg_fd(fd, 1519)); /// Can't open file. return false; } + fclose(fp); + + if (!npc->unloadfile(file_path, (flag != 0))) { + clif->message(fd, msg_fd(fd, 1517)); /// Script could not be unloaded. + return false; + } + + clif->message(fd, msg_fd(fd, 1386)); /// File unloaded. Be aware that... + npc->addsrcfile(file_path); + npc->parsesrcfile(file_path, true); + npc->read_event_script(); + clif->message(fd, msg_fd(fd, 262)); /// Script loaded. return true; } @@ -6576,47 +6634,52 @@ ACMD(reset) /*========================================== * *------------------------------------------*/ + +/** + * Spawns mobs which treats the invoking as its master. + * + * @code{.herc} + * @summon <monster name/ID> {<duration>} + * @endcode + * + **/ ACMD(summon) { - char name[NAME_LENGTH]; - int mob_id = 0; + char name[NAME_LENGTH + 1] = {'\0'}; int duration = 0; - struct mob_data *md; - int64 tick=timer->gettick(); - if (!*message || sscanf(message, "%23s %12d", name, &duration) < 1) - { - clif->message(fd, msg_fd(fd,1225)); // Please enter a monster name (usage: @summon <monster name> {duration}). + if (*message == '\0' || sscanf(message, "%24s %12d", name, &duration) < 1) { + clif->message(fd, msg_fd(fd, 1225)); /// Please enter a monster name (usage: @summon <monster name> {duration}). return false; } - if (duration < 1) - duration =1; - else if (duration > 60) - duration =60; + int mob_id = atoi(name); - if ((mob_id = atoi(name)) == 0) + if (mob_id == 0) mob_id = mob->db_searchname(name); - if(mob_id == 0 || mob->db_checkid(mob_id) == 0) - { - clif->message(fd, msg_fd(fd,40)); // Invalid monster ID or name. + + if (mob_id == 0 || mob->db_checkid(mob_id) == 0) { + clif->message(fd, msg_fd(fd, 40)); /// Invalid monster ID or name. return false; } - md = mob->once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, DEFAULT_MOB_JNAME, mob_id, "", SZ_SMALL, AI_NONE); + struct mob_data *md = mob->once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, DEFAULT_MOB_JNAME, mob_id, "", + SZ_SMALL, AI_NONE, 0); - if(!md) + if (md == NULL) return false; md->master_id = sd->bl.id; md->special_state.ai = AI_ATTACK; - md->deletetimer = timer->add(tick+(duration*60000),mob->timer_delete,md->bl.id,0); - clif->specialeffect(&md->bl,344,AREA); - mob->spawn(md); - sc_start4(NULL,&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); - clif->message(fd, msg_fd(fd,39)); // All monster summoned! + const int64 tick = timer->gettick(); + + md->deletetimer = timer->add(tick + (int64)cap_value(duration, 1, 60) * 60000, mob->timer_delete, md->bl.id, 0); + clif->specialeffect(&md->bl, 344, AREA); + mob->spawn(md); + sc_start4(NULL, &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); + clif->message(fd, msg_fd(fd, 39)); /// All monster summoned! return true; } @@ -6856,7 +6919,7 @@ ACMD(identify) } } } - + if (num == 0) clif->message(fd,msg_fd(fd,1238)); // There are no items to appraise. else if (!identifyall) @@ -8048,10 +8111,11 @@ ACMD(duel) return false; } - if (!duel->checktime(sd)) { + int64 diff = duel->difftime(sd); + if (diff > 0) { char output[CHAT_SIZE_MAX]; - // "Duel: You can take part in duel only one time per %d minutes." - sprintf(output, msg_fd(fd,356), battle_config.duel_time_interval); + // "Duel: You can take part in duel again after %d secconds." + sprintf(output, msg_fd(fd,356), (int)diff); clif->message(fd, output); return false; } @@ -8101,10 +8165,11 @@ ACMD(leave) ACMD(accept) { - if (!duel->checktime(sd)) { + int64 diff = duel->difftime(sd); + if (diff > 0) { char output[CHAT_SIZE_MAX]; - // "Duel: You can take part in duel only one time per %d minutes." - sprintf(output, msg_fd(fd,356), battle_config.duel_time_interval); + // "Duel: You can take part in duel again after %d seconds." + sprintf(output, msg_fd(fd,356), (int)diff); clif->message(fd, output); return false; } @@ -9007,19 +9072,54 @@ ACMD(addperm) return true; } +/** + * Unloads a script file. + * Note: Be aware that some changes made by NPC are not reverted on unload. See doc/atcommands.txt for details. + * + * @code{.herc} + * @unloadnpcfile <path> {<flag>} + * @endcode + * + **/ ACMD(unloadnpcfile) { - if (!*message) { - clif->message(fd, msg_fd(fd,1385)); // Usage: @unloadnpcfile <file name> + char format[20]; + + snprintf(format, sizeof(format), "%%%ds %%1d", MAX_DIR_PATH); + + char file_path[MAX_DIR_PATH + 1] = {'\0'}; + int flag = 1; + + if (*message == '\0' || (sscanf(message, format, file_path, &flag) < 1)) { + clif->message(fd, msg_fd(fd, 1385)); /// Usage: @unloadnpcfile <path> {<flag>} return false; } - if (npc->unloadfile(message)) { - clif->message(fd, msg_fd(fd,1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed. - } else { - clif->message(fd, msg_fd(fd,1387)); // File not found. + if (!exists(file_path)) { + clif->message(fd, msg_fd(fd, 1387)); /// File not found. + return false; + } + + if (!is_file(file_path)) { + clif->message(fd, msg_fd(fd, 1518)); /// Not a file. return false; } + + FILE *fp = fopen(file_path, "r"); + + if (fp == NULL) { + clif->message(fd, msg_fd(fd, 1519)); /// Can't open file. + return false; + } + + fclose(fp); + + if (!npc->unloadfile(file_path, (flag != 0))) { + clif->message(fd, msg_fd(fd, 1517)); /// Script could not be unloaded. + return false; + } + + clif->message(fd, msg_fd(fd, 1386)); /// File unloaded. Be aware that... return true; } diff --git a/src/map/atcommand.h b/src/map/atcommand.h index f3b1be51b..66827b3b2 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -41,7 +41,7 @@ struct config_setting_t; * Defines **/ #define ATCOMMAND_LENGTH 50 -#define MAX_MSG 1516 +#define MAX_MSG 1520 #define msg_txt(idx) atcommand->msg(idx) #define msg_sd(sd,msg_number) atcommand->msgsd((sd),(msg_number)) #define msg_fd(fd,msg_number) atcommand->msgfd((fd),(msg_number)) diff --git a/src/map/battle.c b/src/map/battle.c index 0b88f17c9..985d2bca4 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3231,12 +3231,11 @@ static int64 battle_calc_damage(struct block_list *src, struct block_list *bl, s if (!damage) return 0; if( (sce = sc->data[SC_LIGHTNINGWALK]) && flag&BF_LONG && rnd()%100 < sce->val1 ) { - int dx[8]={0,-1,-1,-1,0,1,1,1}; - int dy[8]={1,1,0,-1,-1,-1,0,1}; - uint8 dir = map->calc_dir(bl, src->x, src->y); - if( unit->movepos(bl, src->x-dx[dir], src->y-dy[dir], 1, 1) ) { - clif->slide(bl,src->x-dx[dir],src->y-dy[dir]); - unit->setdir(bl, dir); + enum unit_dir dir = map->calc_dir(bl, src->x, src->y); + Assert_ret(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); + if (unit->movepos(bl, src->x - dirx[dir], src->y - diry[dir], 1, 1)) { + clif->slide(bl, src->x - dirx[dir], src->y - diry[dir]); + unit->set_dir(bl, dir); } d->dmg_lv = ATK_DEF; status_change_end(bl, SC_LIGHTNINGWALK, INVALID_TIMER); @@ -4977,6 +4976,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl switch (sd->weapontype) { case W_BOW: case W_REVOLVER: + case W_RIFLE: case W_GATLING: case W_SHOTGUN: case W_GRENADE: @@ -5857,10 +5857,10 @@ static void battle_reflect_damage(struct block_list *target, struct block_list * if( wd->flag & BF_SHORT ) { if( !is_boss(src) ) { if( sc->data[SC_DEATHBOUND] && skill_id != WS_CARTTERMINATION ) { - uint8 dir = map->calc_dir(target,src->x,src->y), - t_dir = unit->getdir(target); + enum unit_dir dir = map->calc_dir(target, src->x, src->y); + enum unit_dir t_dir = unit->getdir(target); - if( !map->check_dir(dir,t_dir) ) { + if (map->check_dir(dir, t_dir) == 0) { int64 rd1 = damage * sc->data[SC_DEATHBOUND]->val2 / 100; // Amplify damage. trdamage += rdamage = rd1 - (damage = rd1 * 30 / 100); // not normalized as intended. @@ -6228,10 +6228,10 @@ static enum damage_lv battle_weapon_attack(struct block_list *src, struct block_ status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER); } if( tsc && tsc->data[SC_AUTOCOUNTER] && status->check_skilluse(target, src, KN_AUTOCOUNTER, 1) ) { - uint8 dir = map->calc_dir(target,src->x,src->y); - int t_dir = unit->getdir(target); + enum unit_dir dir = map->calc_dir(target, src->x, src->y); + enum unit_dir t_dir = unit->getdir(target); int dist = distance_bl(src, target); - if(dist <= 0 || (!map->check_dir(dir,t_dir) && dist <= tstatus->rhw.range+1)) { + if(dist <= 0 || (map->check_dir(dir, t_dir) == 0 && dist <= tstatus->rhw.range + 1)) { uint16 skill_lv = tsc->data[SC_AUTOCOUNTER]->val1; clif->skillcastcancel(target); //Remove the casting bar. [Skotlex] clif->damage(src, target, sstatus->amotion, 1, 0, 1, BDT_NORMAL, 0); //Display MISS. @@ -6600,10 +6600,6 @@ static int battle_check_target(struct block_list *src, struct block_list *target m = target->m; - if (flag & BCT_ENEMY && (map->getcell(m, src, src->x, src->y, CELL_CHKBASILICA) || map->getcell(m, src, target->x, target->y, CELL_CHKBASILICA))) { - return -1; - } - //t_bl/s_bl hold the 'master' of the attack, while src/target are the actual //objects involved. if( (t_bl = battle->get_master(target)) == NULL ) @@ -6612,6 +6608,11 @@ static int battle_check_target(struct block_list *src, struct block_list *target if( (s_bl = battle->get_master(src)) == NULL ) s_bl = src; + if ((flag & BCT_ENEMY) != 0 && (status_get_mode(s_bl) & MD_BOSS) == 0 && (map->getcell(m, src, src->x, src->y, CELL_CHKBASILICA) != 0 + || map->getcell(m, src, target->x, target->y, CELL_CHKBASILICA) != 0)) { + return -1; + } + if (s_bl->type == BL_PC) { const struct map_session_data *s_sd = BL_UCCAST(BL_PC, s_bl); switch (t_bl->type) { diff --git a/src/map/clif.c b/src/map/clif.c index 3dff01523..a8b6ea768 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4032,51 +4032,58 @@ static void clif_misceffect(struct block_list *bl, int type) /// 0229 <id>.L <body state>.W <health state>.W <effect state>.L <pk mode>.B (ZC_STATE_CHANGE3) static void clif_changeoption(struct block_list *bl) { - unsigned char buf[32]; - struct status_change *sc; - struct map_session_data* sd; - nullpo_retv(bl); - if ( !(sc = status->get_sc(bl)) && bl->type != BL_NPC ) return; //How can an option change if there's no sc? + struct status_change *sc = status->get_sc(bl); - sd = BL_CAST(BL_PC, bl); + if (sc == NULL && bl->type != BL_NPC) // How can an option change if there's no sc? + return; -#if PACKETVER >= 7 - WBUFW(buf,0) = 0x229; - WBUFL(buf,2) = bl->id; - WBUFW(buf,6) = (sc) ? sc->opt1 : 0; - WBUFW(buf,8) = (sc) ? sc->opt2 : 0; - WBUFL(buf,10) = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - WBUFB(buf,14) = (sd)? sd->status.karma : 0; + struct map_session_data *sd = BL_CAST(BL_PC, bl); + struct PACKET_ZC_STATE_CHANGE p; + p.packetType = HEADER_ZC_STATE_CHANGE; + p.AID = bl->id; + p.bodyState = (sc != NULL) ? sc->opt1 : 0; + p.healthState = (sc != NULL) ? sc->opt2 : 0; + p.effectState = (sc != NULL) ? sc->option : BL_UCCAST(BL_NPC, bl)->option; + p.isPKModeON = (sd != NULL) ? sd->status.karma : 0; if (clif->isdisguised(bl)) { - clif->send(buf,packet_len(0x229),bl,AREA_WOS); - WBUFL(buf,2) = -bl->id; - clif->send(buf,packet_len(0x229),bl,SELF); - WBUFL(buf,2) = bl->id; - WBUFL(buf,10) = OPTION_INVISIBLE; - clif->send(buf,packet_len(0x229),bl,SELF); + clif->send(&p, sizeof(p), bl, AREA_WOS); + p.AID = -bl->id; + clif->send(&p, sizeof(p), bl, SELF); + p.AID = bl->id; + p.effectState = OPTION_INVISIBLE; + clif->send(&p, sizeof(p), bl, SELF); } else { - clif->send(buf,packet_len(0x229),bl,AREA); + clif->send(&p, sizeof(p), bl, AREA); } -#else - WBUFW(buf,0) = 0x119; - WBUFL(buf,2) = bl->id; - WBUFW(buf,6) = (sc) ? sc->opt1 : 0; - WBUFW(buf,8) = (sc) ? sc->opt2 : 0; - WBUFL(buf,10) = (sc != NULL) ? sc->option : ((bl->type == BL_NPC) ? BL_UCCAST(BL_NPC, bl)->option : 0); - WBUFB(buf,12) = (sd)? sd->status.karma : 0; +} + +static void clif_changeoption_target(struct block_list *bl, struct block_list *target_bl, enum send_target target) +{ + nullpo_retv(bl); + nullpo_retv(target_bl); + + struct status_change *sc = status->get_sc(bl); + + if (sc == NULL && bl->type != BL_NPC) // How can an option change if there's no sc? + return; + + struct map_session_data *sd = BL_CAST(BL_PC, bl); + struct PACKET_ZC_STATE_CHANGE p; + p.packetType = HEADER_ZC_STATE_CHANGE; + p.AID = bl->id; + p.bodyState = (sc != NULL) ? sc->opt1 : 0; + p.healthState = (sc != NULL) ? sc->opt2 : 0; + p.effectState = (sc != NULL) ? sc->option : BL_UCCAST(BL_NPC, bl)->option; + p.isPKModeON = (sd != NULL) ? sd->status.karma : 0; if (clif->isdisguised(bl)) { - clif->send(buf,packet_len(0x119),bl,AREA_WOS); - WBUFL(buf,2) = -bl->id; - clif->send(buf,packet_len(0x119),bl,SELF); - WBUFL(buf,2) = bl->id; - WBUFW(buf,10) = OPTION_INVISIBLE; - clif->send(buf,packet_len(0x119),bl,SELF); - } else { - clif->send(buf,packet_len(0x119),bl,AREA); + p.AID = -bl->id; + clif->send(&p, sizeof(p), target_bl, target); + p.AID = bl->id; + p.effectState = OPTION_INVISIBLE; } -#endif + clif->send(&p, sizeof(p), target_bl, target); } /// Displays status change effects on NPCs/monsters (ZC_NPC_SHOWEFST_UPDATE). @@ -4893,7 +4900,7 @@ static int clif_damage(struct block_list *src, struct block_list *dst, int sdela } if(src == dst) { - unit->setdir(src,unit->getdir(src)); + unit->set_dir(src, unit->getdir(src)); } //Return adjusted can't walk delay for further processing. @@ -6747,21 +6754,28 @@ static void clif_item_refine_list(struct map_session_data *sd) /// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B static void clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { - int fd; - nullpo_retv(sd); - fd=sd->fd; - WFIFOHEAD(fd,packet_len(0x147)); - WFIFOW(fd, 0)=0x147; - WFIFOW(fd, 2)=skill_id; - WFIFOL(fd, 4)=skill->get_inf(skill_id); - WFIFOW(fd, 8)=skill_lv; - WFIFOW(fd,10)=skill->get_sp(skill_id,skill_lv); - WFIFOW(fd,12)=skill->get_range2(&sd->bl, skill_id,skill_lv); - safestrncpy(WFIFOP(fd,14),skill->get_name(skill_id),NAME_LENGTH); - WFIFOB(fd,38)=0; - WFIFOSET(fd,packet_len(0x147)); + int fd = sd->fd; + + WFIFOHEAD(fd, sizeof(struct PACKET_ZC_AUTORUN_SKILL)); + + struct PACKET_ZC_AUTORUN_SKILL *p = WFIFOP(fd, 0); + int type = skill->get_inf(skill_id); + + if (sd->state.itemskill_castonself == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) + type = INF_SELF_SKILL; + + p->packetType = HEADER_ZC_AUTORUN_SKILL; + p->skill_id = skill_id; + p->skill_type = type; + p->skill_lv = skill_lv; + p->skill_sp = skill->get_sp(skill_id, skill_lv); + p->skill_range = skill->get_range2(&sd->bl, skill_id, skill_lv); + safestrncpy(p->skill_name, skill->get_name(skill_id), NAME_LENGTH); + p->up_flag = 0; + + WFIFOSET(fd, sizeof(struct PACKET_ZC_AUTORUN_SKILL)); } /// Adds an item to character's cart. @@ -11116,7 +11130,7 @@ static void clif_parse_WalkToXY(int fd, struct map_session_data *sd) //Set last idle time... [Skotlex] pc->update_idle_time(sd, BCIDLE_WALK); - unit->walktoxy(&sd->bl, x, y, 4); + unit->walk_toxy(&sd->bl, x, y, 4); } /// Notification about the result of a disconnect request (ZC_ACK_REQ_DISCONNECT). @@ -11334,15 +11348,7 @@ static void clif_parse_MapMove(int fd, struct map_session_data *sd) /// 0 = straight /// 1 = turned CW /// 2 = turned CCW -/// dir: -/// 0 = north -/// 1 = northwest -/// 2 = west -/// 3 = southwest -/// 4 = south -/// 5 = southeast -/// 6 = east -/// 7 = northeast +/// dir: @see enum unit_dir static void clif_changed_dir(struct block_list *bl, enum send_target target) { unsigned char buf[64]; @@ -12919,6 +12925,7 @@ static void clif_parse_UseSkillMap(int fd, struct map_session_data *sd) pc->delinvincibletimer(sd); skill->castend_map(sd,skill_id,map_name); + pc->itemskill_clear(sd); } static void clif_parse_RequestMemo(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -15273,8 +15280,8 @@ static void clif_parse_GMKick(int fd, struct map_session_data *sd) clif->GM_kickack(sd, 0); return; } - npc->unload_duplicates(nd); - npc->unload(nd,true); + npc->unload_duplicates(nd, true); + npc->unload(nd, true, true); npc->read_event_script(); } break; @@ -16444,7 +16451,7 @@ static void clif_parse_HomMoveToMaster(int fd, struct map_session_data *sd) unit->calc_pos(bl, sd->bl.x, sd->bl.y, sd->ud.dir); ud = unit->bl2ud(bl); - unit->walktoxy(bl, ud->to_x, ud->to_y, 4); + unit->walk_toxy(bl, ud->to_x, ud->to_y, 4); } static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -16468,7 +16475,7 @@ static void clif_parse_HomMoveTo(int fd, struct map_session_data *sd) else return; - unit->walktoxy(bl, x, y, 4); + unit->walk_toxy(bl, x, y, 4); } static void clif_parse_HomAttack(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); @@ -20028,7 +20035,7 @@ static void clif_cashShopOpen(int fd, struct map_session_data *sd, int tab) p->packetType = HEADER_ZC_SE_CASHSHOP_OPEN; p->cashPoints = sd->cashPoints; //[Ryuuzaki] - switched positions to reflect proper values p->kafraPoints = sd->kafraPoints; -#if PACKETVER_ZERO_NUM >= 20191224 +#if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224 p->tab = tab; #endif WFIFOSET(fd, sizeof(struct PACKET_ZC_SE_CASHSHOP_OPEN)); @@ -23209,6 +23216,121 @@ static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) #endif } +static void clif_parse_npc_expanded_barter_closed(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_npc_expanded_barter_closed(int fd, struct map_session_data *sd) +{ +} + +#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127 +#define NEXT_EXPANDED_BARTER_ITEM(var, count) \ + var = (struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub *)((char*)item + \ + sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub) - \ + sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2) + \ + count * sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2)) +#endif + +static void clif_npc_expanded_barter_open(struct map_session_data *sd, struct npc_data *nd) +{ +#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127 + nullpo_retv(sd); + nullpo_retv(nd); + struct npc_item_list *shop = nd->u.scr.shop->item; + const int shop_size = nd->u.scr.shop->items; + + int items_count = 0; + int currencies_count = 0; + struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN *packet = (struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN*)&packet_buf[0]; + STATIC_ASSERT(sizeof(packet_buf) > sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN), "packet_buf size too small"); + int buf_left = sizeof(packet_buf) - sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN); + packet->packetType = HEADER_ZC_NPC_EXPANDED_BARTER_OPEN; + struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub *item = &packet->items[0]; + + // Workaround for fix Visual Studio bug (error C2233) + // Here should be sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub) + const int ptr_size = sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub) - + sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2); + for (int i = 0; i < shop_size && buf_left >= ptr_size; i++) { + if (shop[i].nameid) { + struct item_data *id = itemdb->exists(shop[i].nameid); + if (id == NULL) + continue; + + item->nameid = shop[i].nameid; + item->type = itemtype(id->type); + item->amount = shop[i].qty; + item->weight = id->weight * 10; + item->index = i; + item->zeny = shop[i].value; + item->currency_count = 0; + buf_left -= ptr_size; + items_count ++; + int count = shop[i].value2; + if (buf_left < sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2) * count) { + NEXT_EXPANDED_BARTER_ITEM(item, 0); + break; + } + for (int j = 0; j < count; j ++) { + struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 *packet_currency = &item->currencies[j]; + struct npc_barter_currency *currency = &shop[i].currency[j]; + struct item_data *id2 = itemdb->exists(currency->nameid); + if (id2 == NULL) + continue; + packet_currency->nameid = currency->nameid; + if (currency->refine == -1) + packet_currency->refine_level = 0; + else + packet_currency->refine_level = currency->refine; + packet_currency->amount = currency->amount; + packet_currency->type = itemtype(id2->type); + currencies_count ++; + item->currency_count ++; + } + NEXT_EXPANDED_BARTER_ITEM(item, item->currency_count); + } + } + + packet->items_count = items_count; + packet->packetLength = sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN) + + ptr_size * items_count + + sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2) * currencies_count; + clif->send(packet, packet->packetLength, &sd->bl, SELF); +#endif +} + +#undef NEXT_EXPANDED_BARTER_ITEM + +static void clif_parse_npc_expanded_barter_purchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_npc_expanded_barter_purchase(int fd, struct map_session_data *sd) +{ +#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828 + if (sd->state.trading || pc_isdead(sd) || pc_isvending(sd)) + return; + + const struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE *const p = RP2PTR(fd); + int count = (p->packetLength - sizeof(struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE)) / sizeof p->list[0]; + struct barteritemlist item_list; + + Assert_retv(count >= 0 && count <= sd->status.inventorySize); + + VECTOR_INIT(item_list); + VECTOR_ENSURE(item_list, count, 1); + + for (int i = 0; i < count; i++) { + struct barter_itemlist_entry entry = { 0 }; + entry.addId = p->list[i].itemId; + entry.addAmount = p->list[i].amount; + entry.removeIndex = -1; + entry.shopIndex = p->list[i].shopIndex; + VECTOR_PUSH(item_list, entry); + } + + int response = npc->expanded_barter_buylist(sd, &item_list); + clif->npc_buy_result(sd, response); + + VECTOR_CLEAR(item_list); +#endif +} + static void clif_parse_clientVersion(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); static void clif_parse_clientVersion(int fd, struct map_session_data *sd) { @@ -24102,6 +24224,7 @@ void clif_defaults(void) /* visual effects client-side */ clif->misceffect = clif_misceffect; clif->changeoption = clif_changeoption; + clif->changeoption_target = clif_changeoption_target; clif->changeoption2 = clif_changeoption2; clif->emotion = clif_emotion; clif->talkiebox = clif_talkiebox; @@ -24766,6 +24889,9 @@ void clif_defaults(void) clif->npc_barter_open = clif_npc_barter_open; clif->pNPCBarterClosed = clif_parse_NPCBarterClosed; clif->pNPCBarterPurchase = clif_parse_NPCBarterPurchase; + clif->npc_expanded_barter_open = clif_npc_expanded_barter_open; + clif->pNPCExpandedBarterPurchase = clif_parse_npc_expanded_barter_purchase; + clif->pNPCExpandedBarterClosed = clif_parse_npc_expanded_barter_closed; clif->pClientVersion = clif_parse_clientVersion; clif->pPing = clif_parse_ping; clif->ping = clif_ping; diff --git a/src/map/clif.h b/src/map/clif.h index b61772bba..25ac65af5 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1006,6 +1006,7 @@ struct clif_interface { /* visual effects client-side */ void (*misceffect) (struct block_list* bl,int type); void (*changeoption) (struct block_list* bl); + void (*changeoption_target) (struct block_list *bl, struct block_list *target_bl, enum send_target target); void (*changeoption2) (struct block_list* bl); void (*emotion) (struct block_list *bl,int type); void (*talkiebox) (struct block_list* bl, const char* talkie); @@ -1663,6 +1664,9 @@ struct clif_interface { void (*npc_barter_open) (struct map_session_data *sd, struct npc_data *nd); void (*pNPCBarterClosed) (int fd, struct map_session_data *sd); void (*pNPCBarterPurchase) (int fd, struct map_session_data *sd); + void (*pNPCExpandedBarterClosed) (int fd, struct map_session_data *sd); + void (*pNPCExpandedBarterPurchase) (int fd, struct map_session_data *sd); + void (*npc_expanded_barter_open) (struct map_session_data *sd, struct npc_data *nd); void (*pClientVersion) (int fd, struct map_session_data *sd); void (*pPing) (int fd, struct map_session_data *sd); void (*ping) (struct map_session_data *sd); diff --git a/src/map/duel.c b/src/map/duel.c index dca040f83..c66fd6fc2 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -41,27 +41,12 @@ struct duel_interface *duel; *------------------------------------------*/ static void duel_savetime(struct map_session_data *sd) { - time_t clock; - struct tm *t; - - time(&clock); - t = localtime(&clock); - - pc_setglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME"), t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min); + pc_setglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME"), (int)time(NULL)); } -static int duel_checktime(struct map_session_data *sd) +static int64 duel_difftime(struct map_session_data *sd) { - int diff; - time_t clock; - struct tm *t; - - time(&clock); - t = localtime(&clock); - - diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME") ); - - return !(diff >= 0 && diff < battle_config.duel_time_interval); + return (pc_readglobalreg(sd, script->add_variable("PC_LAST_DUEL_TIME")) + battle_config.duel_time_interval - (int)time(NULL)); } static int duel_showinfo_sub(struct map_session_data *sd, va_list va) @@ -233,7 +218,7 @@ void duel_defaults(void) duel->reject = duel_reject; duel->leave = duel_leave; duel->showinfo = duel_showinfo; - duel->checktime = duel_checktime; + duel->difftime = duel_difftime; duel->init = do_init_duel; duel->final = do_final_duel; diff --git a/src/map/duel.h b/src/map/duel.h index 4e8985b96..1620ca891 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -52,7 +52,7 @@ struct duel_interface { void (*reject) (const unsigned int did, struct map_session_data* sd); void (*leave) (const unsigned int did, struct map_session_data* sd); void (*showinfo) (const unsigned int did, struct map_session_data* sd); - int (*checktime) (struct map_session_data* sd); + int64 (*difftime) (struct map_session_data* sd); void (*init) (bool minimal); void (*final) (void); diff --git a/src/map/elemental.c b/src/map/elemental.c index 1c1d98634..f176bb9e2 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -788,8 +788,8 @@ static int elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_ return 0; //Already walking to him if( DIFF_TICK(tick, ed->ud.canmove_tick) < 0 ) return 0; //Can't move yet. - if( map->search_freecell(&ed->bl, sd->bl.m, &x, &y, MIN_ELEDISTANCE, MIN_ELEDISTANCE, 1) - && unit->walktoxy(&ed->bl, x, y, 0) ) + if (map->search_freecell(&ed->bl, sd->bl.m, &x, &y, MIN_ELEDISTANCE, MIN_ELEDISTANCE, 1) != 0 + && unit->walk_toxy(&ed->bl, x, y, 0) == 0) return 0; } diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 189cf29e4..65c457283 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -179,7 +179,7 @@ static int homunculus_vaporize(struct map_session_data *sd, enum homun_state sta nullpo_ret(sd); hd = sd->hd; - if (!hd || hd->homunculus.vaporize != HOM_ST_ACTIVE) + if (hd == NULL || hd->bl.prev == NULL || hd->homunculus.vaporize != HOM_ST_ACTIVE) return 0; if (status->isdead(&hd->bl)) diff --git a/src/map/instance.c b/src/map/instance.c index 90f2217b1..1104b7e88 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -446,7 +446,7 @@ static int instance_cleanup_sub(struct block_list *bl, va_list ap) map->quit(BL_UCAST(BL_PC, bl)); break; case BL_NPC: - npc->unload(BL_UCAST(BL_NPC, bl), true); + npc->unload(BL_UCAST(BL_NPC, bl), true, true); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); diff --git a/src/map/itemdb.h b/src/map/itemdb.h index d2592af4e..5f0790b10 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -95,6 +95,8 @@ enum item_itemid { ITEMID_ALOEBERA = 606, ITEMID_SPECTACLES = 611, ITEMID_POISON_BOTTLE = 678, + ITEMID_EARTH_SCROLL_1_3 = 686, + ITEMID_EARTH_SCROLL_1_5 = 687, ITEMID_EMPTY_BOTTLE = 713, ITEMID_EMPERIUM = 714, ITEMID_YELLOW_GEMSTONE = 715, diff --git a/src/map/map.c b/src/map/map.c index afdc2ed41..defa56b2e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -531,10 +531,12 @@ static struct skill_unit *map_find_skill_unit_oncell(struct block_list *target, return NULL; } -/** @name Functions for block_list search and manipulation +/** + * @name Functions for block_list search and manipulation + * + * @{ */ -/* @{ */ /** * Applies func to every block_list in bl_list starting with bl_list[blockcount]. * Sets bl_list_count back to blockcount. @@ -638,9 +640,12 @@ static int map_foreachinmap(int (*func)(struct block_list*, va_list), int16 m, i static int map_forcountinmap(int (*func)(struct block_list*, va_list), int16 m, int count, int type, ...) { - int returnCount; + int returnCount = 0; va_list ap; + if (m < 0) + return returnCount; + va_start(ap, type); returnCount = map->vforcountinarea(func, m, 0, 0, map->list[m].xs, map->list[m].ys, count, type, ap); va_end(ap); @@ -1665,7 +1670,7 @@ static int map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *------------------------------------------*/ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag) { - uint8 dir = 6; + enum unit_dir dir = UNIT_DIR_EAST; int16 tx; int16 ty; int costrange = 10; @@ -1684,7 +1689,7 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, short dy = diry[dir]; //Linear search - if(dir%2 == 0 && costrange%MOVE_COST == 0) { + if (!unit_is_diagonal_dir(dir) && (costrange % MOVE_COST) == 0) { tx = *x+dx*(costrange/MOVE_COST); ty = *y+dy*(costrange/MOVE_COST); if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) { @@ -1694,7 +1699,7 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, } } //Full diagonal search - else if(dir%2 == 1 && costrange%MOVE_DIAGONAL_COST == 0) { + else if (unit_is_diagonal_dir(dir) && (costrange % MOVE_DIAGONAL_COST) == 0) { tx = *x+dx*(costrange/MOVE_DIAGONAL_COST); ty = *y+dy*(costrange/MOVE_DIAGONAL_COST); if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) { @@ -1704,16 +1709,24 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, } } //One cell diagonal, rest linear (TODO: Find a better algorithm for this) - else if(dir%2 == 1 && costrange%MOVE_COST == 4) { - tx = *x+dx*((dir%4==3)?(costrange/MOVE_COST):1); - ty = *y+dy*((dir%4==1)?(costrange/MOVE_COST):1); + else if (unit_is_diagonal_dir(dir) && (costrange % MOVE_COST) == 4) { + tx = *x + dx; + ty = *y + dy; + if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST)) + tx *= costrange / MOVE_COST; + if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST)) + ty *= costrange / MOVE_COST; if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) { *x = tx; *y = ty; return true; } - tx = *x+dx*((dir%4==1)?(costrange/MOVE_COST):1); - ty = *y+dy*((dir%4==3)?(costrange/MOVE_COST):1); + tx = *x + dx; + ty = *y + dy; + if (unit_is_dir_or_opposite(dir, UNIT_DIR_NORTHWEST)) + tx *= costrange / MOVE_COST; + if (unit_is_dir_or_opposite(dir, UNIT_DIR_SOUTHWEST)) + ty *= costrange / MOVE_COST; if (!map->count_oncell(m, tx, ty, type, flag) && map->getcell(m, bl, tx, ty, CELL_CHKPASS)) { *x = tx; *y = ty; @@ -1722,17 +1735,17 @@ static bool map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, } //Get next direction - if (dir == 5) { + if (dir == UNIT_DIR_SOUTHEAST) { //Diagonal search complete, repeat with higher cost range if(costrange == 14) costrange += 6; else if(costrange == 28 || costrange >= 38) costrange += 2; else costrange += 4; - dir = 6; - } else if (dir == 4) { + dir = UNIT_DIR_EAST; + } else if (dir == UNIT_DIR_SOUTH) { //Linear search complete, switch to diagonal directions - dir = 7; + dir = UNIT_DIR_NORTHEAST; } else { - dir = (dir+2)%8; + dir = unit_get_ccw90_dir(dir); } } @@ -2840,63 +2853,70 @@ static int map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) return 0; } -/*========================================== +/** * Checks if both dirs point in the same direction. - *------------------------------------------*/ -static int map_check_dir(int s_dir, int t_dir) + * @param s_dir: direction source is facing + * @param t_dir: direction target is facing + * @return 0: success(both face the same direction), 1: failure + **/ +static int map_check_dir(enum unit_dir s_dir, enum unit_dir t_dir) { - if(s_dir == t_dir) + if (s_dir == t_dir || ((t_dir + UNIT_DIR_MAX - 1) % UNIT_DIR_MAX) == s_dir + || ((t_dir + UNIT_DIR_MAX + 1) % UNIT_DIR_MAX) == s_dir) return 0; - switch(s_dir) { - case 0: if(t_dir == 7 || t_dir == 1 || t_dir == 0) return 0; break; - case 1: if(t_dir == 0 || t_dir == 2 || t_dir == 1) return 0; break; - case 2: if(t_dir == 1 || t_dir == 3 || t_dir == 2) return 0; break; - case 3: if(t_dir == 2 || t_dir == 4 || t_dir == 3) return 0; break; - case 4: if(t_dir == 3 || t_dir == 5 || t_dir == 4) return 0; break; - case 5: if(t_dir == 4 || t_dir == 6 || t_dir == 5) return 0; break; - case 6: if(t_dir == 5 || t_dir == 7 || t_dir == 6) return 0; break; - case 7: if(t_dir == 6 || t_dir == 0 || t_dir == 7) return 0; break; - } return 1; } -/*========================================== +/** * Returns the direction of the given cell, relative to 'src' - *------------------------------------------*/ -static uint8 map_calc_dir(struct block_list *src, int16 x, int16 y) + * @param src: object to put in relation between coordinates + * @param x: x-coordinate of cell + * @param y: y-coordinate of cell + * @return the direction of the given cell, relative to 'src' + **/ +static enum unit_dir map_calc_dir(const struct block_list *src, int16 x, int16 y) { - uint8 dir = 0; - int dx, dy; - - nullpo_ret(src); + nullpo_retr(UNIT_DIR_NORTH, src); + enum unit_dir dir = UNIT_DIR_NORTH; - dx = x-src->x; - dy = y-src->y; + int dx = x - src->x; + int dy = y - src->y; if (dx == 0 && dy == 0) { // both are standing on the same spot. // aegis-style, makes knockback default to the left. // athena-style, makes knockback default to behind 'src'. - dir = (battle_config.knockback_left ? 6 : unit->getdir(src)); - } else if (dx >= 0 && dy >=0) { - // upper-right - if( dx*2 < dy || dx == 0 ) dir = 0; // up - else if( dx > dy*2+1 || dy == 0 ) dir = 6; // right - else dir = 7; // up-right + if (battle_config.knockback_left != 0) + dir = UNIT_DIR_EAST; + else + dir = unit->getdir(src); + } else if (dx >= 0 && dy >= 0) { + if (dx * 2 < dy || dx == 0) + dir = UNIT_DIR_NORTH; + else if (dx > dy * 2 + 1 || dy == 0) + dir = UNIT_DIR_EAST; + else + dir = UNIT_DIR_NORTHEAST; } else if (dx >= 0 && dy <= 0) { - // lower-right - if( dx*2 < -dy || dx == 0 ) dir = 4; // down - else if( dx > -dy*2+1 || dy == 0 ) dir = 6; // right - else dir = 5; // down-right + if (dx * 2 < -dy || dx == 0) + dir = UNIT_DIR_SOUTH; + else if (dx > -dy * 2 + 1 || dy == 0) + dir = UNIT_DIR_EAST; + else + dir = UNIT_DIR_SOUTHEAST; } else if (dx <= 0 && dy <= 0) { - // lower-left - if( dx*2 > dy || dx == 0 ) dir = 4; // down - else if( dx < dy*2-1 || dy == 0 ) dir = 2; // left - else dir = 3; // down-left + if (dx * 2 > dy || dx == 0 ) + dir = UNIT_DIR_SOUTH; + else if (dx < dy * 2 + 1 || dy == 0) + dir = UNIT_DIR_WEST; + else + dir = UNIT_DIR_SOUTHWEST; } else { - // upper-left - if( -dx*2 < dy || dx == 0 ) dir = 0; // up - else if( -dx > dy*2+1 || dy == 0) dir = 2; // left - else dir = 1; // up-left + if (-dx * 2 < dy || dx == 0 ) + dir = UNIT_DIR_NORTH; + else if (-dx > dy * 2 + 1 || dy == 0) + dir = UNIT_DIR_WEST; + else + dir = UNIT_DIR_NORTHWEST; } return dir; } @@ -2924,11 +2944,11 @@ static int map_random_dir(struct block_list *bl, int16 *x, int16 *y) if (dist < 1) dist =1; do { - int j = 1 + 2*(rnd()%4); //Pick a random diagonal direction + enum unit_dir dir = unit_get_rnd_diagonal_dir(); short segment = 1+(rnd()%dist); //Pick a random interval from the whole vector in that direction - xi = bl->x + segment*dirx[j]; + xi = bl->x + segment * dirx[dir]; segment = (short)sqrt((float)(dist2 - segment*segment)); //The complement of the previously picked segment - yi = bl->y + segment*diry[j]; + yi = bl->y + segment * diry[dir]; } while ((map->getcell(bl->m, bl, xi, yi, CELL_CHKNOPASS) || !path->search(NULL, bl, bl->m, bl->x, bl->y, xi, yi, 1, CELL_CHKNOREACH)) && (++i)<100); @@ -4452,6 +4472,7 @@ static bool inter_config_read_database_names(const char *filename, const struct libconfig->setting_lookup_mutable_string(setting, "autotrade_data_db", map->autotrade_data_db, sizeof(map->autotrade_data_db)); libconfig->setting_lookup_mutable_string(setting, "npc_market_data_db", map->npc_market_data_db, sizeof(map->npc_market_data_db)); libconfig->setting_lookup_mutable_string(setting, "npc_barter_data_db", map->npc_barter_data_db, sizeof(map->npc_barter_data_db)); + libconfig->setting_lookup_mutable_string(setting, "npc_expanded_barter_data_db", map->npc_expanded_barter_data_db, sizeof(map->npc_expanded_barter_data_db)); if (!mapreg->config_read(filename, setting, imported)) retval = false; @@ -6091,7 +6112,7 @@ static int cleanup_sub(struct block_list *bl, va_list ap) map->quit(BL_UCAST(BL_PC, bl)); break; case BL_NPC: - npc->unload(BL_UCAST(BL_NPC, bl), false); + npc->unload(BL_UCAST(BL_NPC, bl), false, true); break; case BL_MOB: unit->free(bl,CLR_OUTSIGHT); @@ -6749,6 +6770,7 @@ int do_init(int argc, char *argv[]) npc->event_do_oninit( false ); // Init npcs (OnInit) npc->market_fromsql(); /* after OnInit */ npc->barter_fromsql(); /* after OnInit */ + npc->expanded_barter_fromsql(); /* after OnInit */ if (battle_config.pk_mode) ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n"); diff --git a/src/map/map.h b/src/map/map.h index 78f1a3c89..a876539d0 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -27,6 +27,7 @@ #include "common/db.h" #include "common/mapindex.h" #include "common/mmo.h" +#include "map/unitdefines.h" // enum unit_dir #include <stdio.h> #include <stdarg.h> @@ -1056,6 +1057,7 @@ struct map_interface { char autotrade_data_db[32]; char npc_market_data_db[32]; char npc_barter_data_db[32]; + char npc_expanded_barter_data_db[32]; char default_codepage[32]; char default_lang_str[64]; @@ -1215,8 +1217,8 @@ END_ZEROED_BLOCK; // reload config file looking only for npcs void (*reloadnpc) (bool clear); - int (*check_dir) (int s_dir,int t_dir); - uint8 (*calc_dir) (struct block_list *src,int16 x,int16 y); + int (*check_dir) (enum unit_dir s_dir, enum unit_dir t_dir); + enum unit_dir (*calc_dir) (const struct block_list *src, int16 x, int16 y); int (*random_dir) (struct block_list *bl, short *x, short *y); // [Skotlex] int (*cleanup_sub) (struct block_list *bl, va_list ap); diff --git a/src/map/messages_main.h b/src/map/messages_main.h index b2b67f08c..9f5a17662 100644 --- a/src/map/messages_main.h +++ b/src/map/messages_main.h @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20200108 +Latest version: 20200304 */ enum clif_messages { @@ -22464,6 +22464,154 @@ Search */ MSG_ID_EC1 = 0xec1, #endif +#if PACKETVER >= 20200122 +/*20200122 to latest +리서치 리포트 상태가 됩니다. +*/ + MSG_ID_EC2 = 0xec2, +/*20200122 to latest +리서치 리포트 상태가 해제됩니다. +*/ + MSG_ID_EC3 = 0xec3, +/*20200122 to latest +제조에 성공 했습니다. +*/ + MSG_ID_EC4 = 0xec4, +/*20200122 to latest +제조에 실패 했습니다. +*/ + MSG_ID_EC5 = 0xec5, +/*20200122 to latest +쉐도우 장비가 파괴 및 해제에서 보호됩니다. +*/ + MSG_ID_EC6 = 0xec6, +/*20200122 to latest +풀 쉐도우 프로텍션이 해제됩니다. +*/ + MSG_ID_EC7 = 0xec7, +/*20200122 to latest +식물형, 무형 몬스터에게 주는 데미지가 증가합니다. +*/ + MSG_ID_EC8 = 0xec8, +/*20200122 to latest +지옥 나무의 가루효과가 사라집니다. +*/ + MSG_ID_EC9 = 0xec9, +#endif +#if PACKETVER >= 20200129 +/*20200129 to latest +공격 장치가 활성화되었습니다. +*/ + MSG_ID_ECA = 0xeca, +/*20200129 to latest +공격 장치가 해제되었습니다. +*/ + MSG_ID_ECB = 0xecb, +/*20200129 to latest +물리 방어력 및 물리 저항력이 증가되었습니다. +*/ + MSG_ID_ECC = 0xecc, +/*20200129 to latest +방어 장치가 해제되었습니다. +*/ + MSG_ID_ECD = 0xecd, +/*20200129 to latest +검색 +Search +*/ + MSG_ID_ECE = 0xece, +#endif +#if PACKETVER >= 20200212 +/*20200212 to latest +합주를 혼자 사용할 수 있습니다. +*/ + MSG_ID_ECF = 0xecf, +/*20200212 to latest +크바시르의 지혜가 사라집니다. +*/ + MSG_ID_ED0 = 0xed0, +/*20200212 to latest +미스틱 심포니의 효과가 부여됩니다. +*/ + MSG_ID_ED1 = 0xed1, +/*20200212 to latest +미스틱 심포니의 효과가 사라집니다. +*/ + MSG_ID_ED2 = 0xed2, +/*20200212 to latest +마법 저항력이 감소했습니다. +*/ + MSG_ID_ED3 = 0xed3, +/*20200212 to latest +게페니아 녹턴의 효과가 해제 되었습니다. +*/ + MSG_ID_ED4 = 0xed4, +/*20200212 to latest +물리 저항력이 감소했습니다. +*/ + MSG_ID_ED5 = 0xed5, +/*20200212 to latest +마인워커 랩소디 상태가 해제되었습니다. +*/ + MSG_ID_ED6 = 0xed6, +/*20200212 to latest +물리 저항력이 증가했습니다. +*/ + MSG_ID_ED7 = 0xed7, +/*20200212 to latest +뮤지컬 인터루드 상태가 해제되었습니다. +*/ + MSG_ID_ED8 = 0xed8, +/*20200212 to latest +특성 마법 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_ED9 = 0xed9, +/*20200212 to latest +저녁 노을의 세레나데 효과가 해제되었습니다. +*/ + MSG_ID_EDA = 0xeda, +/*20200212 to latest +특성 물리 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_EDB = 0xedb, +/*20200212 to latest + 프론테라의 행진곡 효과가 해제되었습니다. +*/ + MSG_ID_EDC = 0xedc, +/*20200212 to latest +바람의 분노가 시전자에게 흘러 들어옵니다. +*/ + MSG_ID_EDD = 0xedd, +/*20200212 to latest +캘러미티 가일 상태가 해제되었습니다. +*/ + MSG_ID_EDE = 0xede, +/*20200212 to latest +바람에 의해 약점과 모습이 드러납니다. +*/ + MSG_ID_EDF = 0xedf, +/*20200212 to latest +윈드 사인 효과가 사라집니다. +*/ + MSG_ID_EE0 = 0xee0, +#endif +#if PACKETVER >= 20200304 +/*20200304 to latest +E X P : %.1f%% ( basic 100.0%% %s %.1f%%) +EXP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE1 = 0xee1, +/*20200304 to latest +DROP : %.1f%% ( basic 100.0%% %s %.1f%%) +DROP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE2 = 0xee2, +/*20200304 to latest +DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) +DEATH: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE3 = 0xee3, +#endif }; #endif /* MAP_MESSAGES_MAIN_H */ diff --git a/src/map/messages_re.h b/src/map/messages_re.h index 8cb3b6624..e32f6b275 100644 --- a/src/map/messages_re.h +++ b/src/map/messages_re.h @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20200108 +Latest version: 20200304 */ enum clif_messages { @@ -21941,6 +21941,154 @@ Search */ MSG_ID_EC1 = 0xec1, #endif +#if PACKETVER >= 20200122 +/*20200122 to latest +리서치 리포트 상태가 됩니다. +*/ + MSG_ID_EC2 = 0xec2, +/*20200122 to latest +리서치 리포트 상태가 해제됩니다. +*/ + MSG_ID_EC3 = 0xec3, +/*20200122 to latest +제조에 성공 했습니다. +*/ + MSG_ID_EC4 = 0xec4, +/*20200122 to latest +제조에 실패 했습니다. +*/ + MSG_ID_EC5 = 0xec5, +/*20200122 to latest +쉐도우 장비가 파괴 및 해제에서 보호됩니다. +*/ + MSG_ID_EC6 = 0xec6, +/*20200122 to latest +풀 쉐도우 프로텍션이 해제됩니다. +*/ + MSG_ID_EC7 = 0xec7, +/*20200122 to latest +식물형, 무형 몬스터에게 주는 데미지가 증가합니다. +*/ + MSG_ID_EC8 = 0xec8, +/*20200122 to latest +지옥 나무의 가루효과가 사라집니다. +*/ + MSG_ID_EC9 = 0xec9, +#endif +#if PACKETVER >= 20200205 +/*20200205 to latest +공격 장치가 활성화되었습니다. +*/ + MSG_ID_ECA = 0xeca, +/*20200205 to latest +공격 장치가 해제되었습니다. +*/ + MSG_ID_ECB = 0xecb, +/*20200205 to latest +물리 방어력 및 물리 저항력이 증가되었습니다. +*/ + MSG_ID_ECC = 0xecc, +/*20200205 to latest +방어 장치가 해제되었습니다. +*/ + MSG_ID_ECD = 0xecd, +/*20200205 to latest +검색 +Search +*/ + MSG_ID_ECE = 0xece, +#endif +#if PACKETVER >= 20200212 +/*20200212 to latest +합주를 혼자 사용할 수 있습니다. +*/ + MSG_ID_ECF = 0xecf, +/*20200212 to latest +크바시르의 지혜가 사라집니다. +*/ + MSG_ID_ED0 = 0xed0, +/*20200212 to latest +미스틱 심포니의 효과가 부여됩니다. +*/ + MSG_ID_ED1 = 0xed1, +/*20200212 to latest +미스틱 심포니의 효과가 사라집니다. +*/ + MSG_ID_ED2 = 0xed2, +/*20200212 to latest +마법 저항력이 감소했습니다. +*/ + MSG_ID_ED3 = 0xed3, +/*20200212 to latest +게페니아 녹턴의 효과가 해제 되었습니다. +*/ + MSG_ID_ED4 = 0xed4, +/*20200212 to latest +물리 저항력이 감소했습니다. +*/ + MSG_ID_ED5 = 0xed5, +/*20200212 to latest +마인워커 랩소디 상태가 해제되었습니다. +*/ + MSG_ID_ED6 = 0xed6, +/*20200212 to latest +물리 저항력이 증가했습니다. +*/ + MSG_ID_ED7 = 0xed7, +/*20200212 to latest +뮤지컬 인터루드 상태가 해제되었습니다. +*/ + MSG_ID_ED8 = 0xed8, +/*20200212 to latest +특성 마법 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_ED9 = 0xed9, +/*20200212 to latest +저녁 노을의 세레나데 효과가 해제되었습니다. +*/ + MSG_ID_EDA = 0xeda, +/*20200212 to latest +특성 물리 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_EDB = 0xedb, +/*20200212 to latest + 프론테라의 행진곡 효과가 해제되었습니다. +*/ + MSG_ID_EDC = 0xedc, +/*20200212 to latest +바람의 분노가 시전자에게 흘러 들어옵니다. +*/ + MSG_ID_EDD = 0xedd, +/*20200212 to latest +캘러미티 가일 상태가 해제되었습니다. +*/ + MSG_ID_EDE = 0xede, +/*20200212 to latest +바람에 의해 약점과 모습이 드러납니다. +*/ + MSG_ID_EDF = 0xedf, +/*20200212 to latest +윈드 사인 효과가 사라집니다. +*/ + MSG_ID_EE0 = 0xee0, +#endif +#if PACKETVER >= 20200304 +/*20200304 to latest +E X P : %.1f%% ( basic 100.0%% %s %.1f%%) +EXP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE1 = 0xee1, +/*20200304 to latest +DROP : %.1f%% ( basic 100.0%% %s %.1f%%) +DROP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE2 = 0xee2, +/*20200304 to latest +DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) +DEATH: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE3 = 0xee3, +#endif }; #endif /* MAP_MESSAGES_RE_H */ diff --git a/src/map/messages_zero.h b/src/map/messages_zero.h index 18aed7d5b..babe9384c 100644 --- a/src/map/messages_zero.h +++ b/src/map/messages_zero.h @@ -24,7 +24,7 @@ /* This file is autogenerated, please do not commit manual changes -Latest version: 20191224 +Latest version: 20200304 */ enum clif_messages { @@ -6734,9 +6734,11 @@ The Memorial Dungeon's entry time limit expired; it has been destroyed. The Memorial Dungeon has been removed. */ MSG_MEMORIAL_DUN_DESTROY_REQUEST = 0x544, -/*20171018 to latest +/*20171018 to 20191224 메모리얼 던전에 시스템 오류가 발생하였습니다. 정상적인 게임 진행을 위해 재접속을 해주십시오. A system error has occurred in the Memorial Dungeon. Please relog in to the game to continue playing. +20200115 to latest +메모리얼 던전에 통신 장애가 발생하였습니다. 정상적인 게임 진행을 위해 잠시 후, 재접속을 해주십시오. */ MSG_MEMORIAL_DUN_ERROR = 0x545, /*20171018 to latest @@ -18319,8 +18321,10 @@ VTC 인증에 실패하였습니다. 가나다 정렬 */ MSG_ID_E8A = 0xe8a, -/*20191113 to latest +/*20191113 to 20191224 기본 결과물은 %s %d개 이나, 낮은 확률로 최대 %d개까지 생성될 수 있습니다. +20200115 to latest +※[%s] %d~%d개 제작 */ MSG_ID_E8B = 0xe8b, /*20191113 to latest @@ -18536,6 +18540,167 @@ https://member.gnjoy.com.tw/billing.aspx */ MSG_ID_EBE = 0xebe, #endif +#if PACKETVER >= 20200115 +/*20200115 to latest +역순 정렬 +*/ + MSG_ID_EBF = 0xebf, +/*20200115 to latest +검색 내용 입력 +*/ + MSG_ID_EC0 = 0xec0, +/*20200115 to latest +검색 +Search +*/ + MSG_ID_EC1 = 0xec1, +/*20200115 to latest +리서치 리포트 상태가 됩니다. +*/ + MSG_ID_EC2 = 0xec2, +/*20200115 to latest +리서치 리포트 상태가 해제됩니다. +*/ + MSG_ID_EC3 = 0xec3, +/*20200115 to latest +제조에 성공 했습니다. +*/ + MSG_ID_EC4 = 0xec4, +/*20200115 to latest +제조에 실패 했습니다. +*/ + MSG_ID_EC5 = 0xec5, +/*20200115 to latest +쉐도우 장비가 파괴 및 해제에서 보호됩니다. +*/ + MSG_ID_EC6 = 0xec6, +/*20200115 to latest +풀 쉐도우 프로텍션이 해제됩니다. +*/ + MSG_ID_EC7 = 0xec7, +/*20200115 to latest +식물형, 무형 몬스터에게 주는 데미지가 증가합니다. +*/ + MSG_ID_EC8 = 0xec8, +/*20200115 to latest +지옥 나무의 가루효과가 사라집니다. +*/ + MSG_ID_EC9 = 0xec9, +#endif +#if PACKETVER >= 20200129 +/*20200129 to latest +공격 장치가 활성화되었습니다. +*/ + MSG_ID_ECA = 0xeca, +/*20200129 to latest +공격 장치가 해제되었습니다. +*/ + MSG_ID_ECB = 0xecb, +/*20200129 to latest +물리 방어력 및 물리 저항력이 증가되었습니다. +*/ + MSG_ID_ECC = 0xecc, +/*20200129 to latest +방어 장치가 해제되었습니다. +*/ + MSG_ID_ECD = 0xecd, +#endif +#if PACKETVER >= 20200212 +/*20200212 to latest +검색 +Search +*/ + MSG_ID_ECE = 0xece, +/*20200212 to latest +합주를 혼자 사용할 수 있습니다. +*/ + MSG_ID_ECF = 0xecf, +/*20200212 to latest +크바시르의 지혜가 사라집니다. +*/ + MSG_ID_ED0 = 0xed0, +/*20200212 to latest +미스틱 심포니의 효과가 부여됩니다. +*/ + MSG_ID_ED1 = 0xed1, +/*20200212 to latest +미스틱 심포니의 효과가 사라집니다. +*/ + MSG_ID_ED2 = 0xed2, +/*20200212 to latest +마법 저항력이 감소했습니다. +*/ + MSG_ID_ED3 = 0xed3, +/*20200212 to latest +게페니아 녹턴의 효과가 해제 되었습니다. +*/ + MSG_ID_ED4 = 0xed4, +/*20200212 to latest +물리 저항력이 감소했습니다. +*/ + MSG_ID_ED5 = 0xed5, +/*20200212 to latest +마인워커 랩소디 상태가 해제되었습니다. +*/ + MSG_ID_ED6 = 0xed6, +/*20200212 to latest +물리 저항력이 증가했습니다. +*/ + MSG_ID_ED7 = 0xed7, +/*20200212 to latest +뮤지컬 인터루드 상태가 해제되었습니다. +*/ + MSG_ID_ED8 = 0xed8, +/*20200212 to latest +특성 마법 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_ED9 = 0xed9, +/*20200212 to latest +저녁 노을의 세레나데 효과가 해제되었습니다. +*/ + MSG_ID_EDA = 0xeda, +/*20200212 to latest +특성 물리 공격력과 이동 속도가 증가합니다. +*/ + MSG_ID_EDB = 0xedb, +/*20200212 to latest + 프론테라의 행진곡 효과가 해제되었습니다. +*/ + MSG_ID_EDC = 0xedc, +/*20200212 to latest +바람의 분노가 시전자에게 흘러 들어옵니다. +*/ + MSG_ID_EDD = 0xedd, +/*20200212 to latest +캘러미티 가일 상태가 해제되었습니다. +*/ + MSG_ID_EDE = 0xede, +/*20200212 to latest +바람에 의해 약점과 모습이 드러납니다. +*/ + MSG_ID_EDF = 0xedf, +/*20200212 to latest +윈드 사인 효과가 사라집니다. +*/ + MSG_ID_EE0 = 0xee0, +#endif +#if PACKETVER >= 20200304 +/*20200304 to latest +E X P : %.1f%% ( basic 100.0%% %s %.1f%%) +EXP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE1 = 0xee1, +/*20200304 to latest +DROP : %.1f%% ( basic 100.0%% %s %.1f%%) +DROP: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE2 = 0xee2, +/*20200304 to latest +DEATH : %.1f%% ( basic 100.0%% %s %.1f%%) +DEATH: %.1f%% (basic: 100.0%%, %s: %.1f%%) +*/ + MSG_ID_EE3 = 0xee3, +#endif }; #endif /* MAP_MESSAGES_ZERO_H */ diff --git a/src/map/mob.c b/src/map/mob.c index 4b74abc8f..51a32abd9 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -337,15 +337,23 @@ static int mob_parse_dataset(struct spawn_data *data) return 1; } -/*========================================== - * Generates the basic mob data using the spawn_data provided. - *------------------------------------------*/ -static struct mob_data *mob_spawn_dataset(struct spawn_data *data) + +/** + * Generates basic mob data by using the passed spawn data. + * + * @param data The mobs spawn data. + * @param npc_id If spawned by NPC script, this holds the ID of the invoking NPC. + * @return The generated mob data, later used to spawn the mob. + * + **/ +static struct mob_data *mob_spawn_dataset(struct spawn_data *data, int npc_id) { - struct mob_data *md = NULL; nullpo_retr(NULL, data); - CREATE(md, struct mob_data, 1); - md->bl.id= npc->get_new_npc_id(); + + struct mob_data *md = (struct mob_data *)aCalloc(1, sizeof(struct mob_data)); + + memcpy(md->name, data->name, NAME_LENGTH); + md->bl.id = npc->get_new_npc_id(); md->bl.type = BL_MOB; md->bl.m = data->m; md->bl.x = data->x; @@ -353,24 +361,29 @@ static struct mob_data *mob_spawn_dataset(struct spawn_data *data) md->class_ = data->class_; md->state.boss = data->state.boss; md->db = mob->db(md->class_); + md->npc_id = npc_id; + md->spawn_timer = INVALID_TIMER; + md->deletetimer = INVALID_TIMER; + md->skill_idx = -1; + if (data->level > 0 && data->level <= MAX_LEVEL) md->level = data->level; - memcpy(md->name, data->name, NAME_LENGTH); - if (data->state.ai) + + if (data->state.ai > 0) md->special_state.ai = data->state.ai; - if (data->state.size) + + if (data->state.size > 0) md->special_state.size = data->state.size; - if (data->eventname[0] && strlen(data->eventname) >= 4) + + if (data->eventname[0] != '\0' && strlen(data->eventname) >= 4) memcpy(md->npc_event, data->eventname, 50); - if(md->db->status.mode&MD_LOOTER) - md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE,sizeof(struct item)); - md->spawn_timer = INVALID_TIMER; - md->deletetimer = INVALID_TIMER; - md->skill_idx = -1; + + if ((md->db->status.mode & MD_LOOTER) == MD_LOOTER) + md->lootitem = (struct item *)aCalloc(LOOTITEM_SIZE, sizeof(struct item)); + status->set_viewdata(&md->bl, md->class_); status->change_init(&md->bl); unit->dataset(&md->bl); - map->addiddb(&md->bl); return md; } @@ -503,7 +516,24 @@ static bool mob_ksprotected(struct block_list *src, struct block_list *target) return false; } -static struct mob_data *mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) +/** + * Prepares a mob's spawn data. + * + * @param bl The invoking character's block list. + * @param m The ID of the map where the mob should be spawned. + * @param x The x coordinate where the mob should be spawned. + * @param y The y coordinate where the mob should be spawned. + * @param mobname The mob's display name. + * @param class_ The mob's ID in database. + * @param event The name of the event which should be executed when the mob is killed. + * @param size The mob's size. + * @param ai The mob's AI. + * @param npc_id If spawned by NPC script, this holds the ID of the invoking NPC. + * @return The mob data generated by mob->spawn_dataset(). + * + **/ +static struct mob_data *mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, + const char *event, unsigned int size, unsigned int ai, int npc_id) { struct spawn_data data; @@ -521,76 +551,100 @@ static struct mob_data *mob_once_spawn_sub(struct block_list *bl, int16 m, int16 else strcpy(data.name, DEFAULT_MOB_JNAME); - if (event) + if (event != NULL) safestrncpy(data.eventname, event, sizeof(data.eventname)); - // Locate spot next to player. - if (bl && (x < 0 || y < 0)) + /** Locate spot next to player. **/ + if (bl != NULL && (x < 0 || y < 0)) map->search_freecell(bl, m, &x, &y, 1, 1, 0); - // if none found, pick random position on map + /** If none found, pick random position on map. **/ if (x <= 0 || x >= map->list[m].xs || y <= 0 || y >= map->list[m].ys) map->search_freecell(NULL, m, &x, &y, -1, -1, 1); data.x = x; data.y = y; - if (!mob->parse_dataset(&data)) + if (mob->parse_dataset(&data) == 0) return NULL; - return mob->spawn_dataset(&data); + return mob->spawn_dataset(&data, npc_id); } -/*========================================== - * Spawn a single mob on the specified coordinates. - *------------------------------------------*/ -static int mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai) +/** + * Spawns a given amount of mobs. + * + * @param sd The invoking character. + * @param m The ID of the map where the mob should be spawned. + * @param x The x coordinate where the mob should be spawned. + * @param y The y coordinate where the mob should be spawned. + * @param mobname The mob's display name. + * @param class_ The mob's ID in database. + * @param amount The amount of mobs to spawn. + * @param event The name of the event which should be executed when the mob is killed. + * @param size The mob's size. + * @param ai The mob's AI. + * @return The last spawned mob's GID, or 0 if spawning failed. + * + **/ +static int mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, + int amount, const char *event, unsigned int size, unsigned int ai) { - struct mob_data* md = NULL; - int count, lv; bool no_guardian_data = false; - if( ai && ai&0x200 ) { + if (ai > 0 && (ai & 0x200) == 0x200) { no_guardian_data = true; - ai &=~ 0x200; + ai &= ~0x200; } if (m < 0 || amount <= 0) - return 0; // invalid input + return 0; - lv = (sd) ? sd->status.base_level : 255; + struct mob_data *md = NULL; - for (count = 0; count < amount; count++) { - int c = (class_ >= 0) ? class_ : mob->get_random_id(-class_ - 1, (battle_config.random_monster_checklv) ? 3 : 1, lv); - md = mob->once_spawn_sub((sd) ? &sd->bl : NULL, m, x, y, mobname, c, event, size, ai); + for (int i = 0; i < amount; i++) { + int mob_id = class_; - if (!md) + if (mob_id < 0) { + mob_id = mob->get_random_id(-class_ - 1, (battle_config.random_monster_checklv == 1) ? 3 : 1, + (sd != NULL) ? sd->status.base_level : 255); + } + + md = mob->once_spawn_sub((sd != NULL) ? &sd->bl : NULL, m, x, y, mobname, mob_id, event, size, ai, + (sd != NULL) ? sd->npc_id : 0); + + if (md == NULL) continue; if (class_ == MOBID_EMPELIUM && !no_guardian_data) { - struct guild_castle* gc = guild->mapindex2gc(map_id2index(m)); - struct guild* g = (gc) ? guild->search(gc->guild_id) : NULL; - if( gc ) { + struct guild_castle *gc = guild->mapindex2gc(map_id2index(m)); + + if (gc != NULL) { + struct guild *g = guild->search(gc->guild_id); + md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data)); md->guardian_data->castle = gc; md->guardian_data->number = MAX_GUARDIANS; - if( g ) + + if (g != NULL) md->guardian_data->g = g; - else if( gc->guild_id ) //Guild not yet available, retry in 5. - timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,gc->guild_id); + else if (gc->guild_id > 0) /// Guild not yet available, retry in 5s. + timer->add(timer->gettick() + 5000, mob->spawn_guardian_sub, md->bl.id, + gc->guild_id); } - } // end addition [Valaris] + } mob->spawn(md); - 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(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE|MD_CANATTACK|MD_CANMOVE|MD_ANGRY, 0, 60000); + if (class_ < 0 && battle_config.dead_branch_active == 1) { + /// Behold Aegis' masterful decisions yet again... + /// "I understand the "Aggressive" part, but the "Can Move" and "Can Attack" is just stupid" [Poki] + sc_start4(NULL, &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 + return (md != NULL) ? md->bl.id : 0; /// ID of last spawned mob. } /*========================================== @@ -649,196 +703,236 @@ static int mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, i } /** - * Sets a guardian's guild data and liberates castle if couldn't retrieve guild data - * @param data (int)guild_id - * @retval Always 0 + * Sets a guardian's guild data and liberates castle if couldn't retrieve guild data. + * Required because the guild data may not be available at guardian spawn time. + * + * @param tid Required parameter for timer functions. Unused inside the function. + * @param tick Required parameter for timer functions. Unused inside the function. + * @param id The guardian mob's GID. + * @param data The guild ID. + * @return 1 on success, 0 on failure. + * * @author Skotlex + * **/ static int mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { - //Needed because the guild data may not be available at guardian spawn time. - struct block_list* bl = map->id2bl(id); - struct mob_data* md; - struct guild* g; + struct block_list *bl = map->id2bl(id); - if( bl == NULL ) //It is possible mob was already removed from map when the castle has no owner. [Skotlex] + if (bl == NULL || bl->type != BL_MOB) /// It is possible mob was already removed from map when the castle has no owner. [Skotlex] return 0; - Assert_ret(bl->type == BL_MOB); - md = BL_UCAST(BL_MOB, bl); + struct mob_data *md = BL_UCAST(BL_MOB, bl); + + if (md->guardian_data == NULL) + return 0; - nullpo_ret(md->guardian_data); - g = guild->search((int)data); + struct guild *g = guild->search((int)data); - if( g == NULL ) { //Liberate castle, if the guild is not found this is an error! [Skotlex] + if (g == NULL) { /// Liberate castle, if the guild is not found this is an error! [Skotlex] ShowError("mob_spawn_guardian_sub: Couldn't load guild %d!\n", (int)data); - //Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on. - if (md->class_ == MOBID_EMPELIUM && md->guardian_data) { + + /// Not sure this is the best way, but otherwise we'd be invoking this for ALL guardians spawned later on. + if (md->class_ == MOBID_EMPELIUM) { md->guardian_data->g = NULL; - if( md->guardian_data->castle->guild_id ) {//Free castle up. - ShowNotice("Clearing ownership of castle %d (%s)\n", md->guardian_data->castle->castle_id, md->guardian_data->castle->castle_name); + + if (md->guardian_data->castle->guild_id > 0) { /// Free castle up. + ShowNotice("mob_spawn_guardian_sub: Clearing ownership of castle %d (%s).\n", + md->guardian_data->castle->castle_id, + md->guardian_data->castle->castle_name); guild->castledatasave(md->guardian_data->castle->castle_id, 1, 0); } } else { - if( md->guardian_data && md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS - && md->guardian_data->castle->guardian[md->guardian_data->number].visible ) - guild->castledatasave(md->guardian_data->castle->castle_id, 10+md->guardian_data->number,0); + if (md->guardian_data->number >= 0 && md->guardian_data->number < MAX_GUARDIANS && + md->guardian_data->castle->guardian[md->guardian_data->number].visible == 1) + guild->castledatasave(md->guardian_data->castle->castle_id, + 10 + md->guardian_data->number, 0); - unit->free(&md->bl,CLR_OUTSIGHT); // Remove guardian. + unit->free(&md->bl, CLR_OUTSIGHT); /// Remove guardian. } + return 0; } - if( guild->checkskill(g,GD_GUARDUP) ) - status_calc_mob(md, SCO_NONE); // Give bonuses. + if (guild->checkskill(g, GD_GUARDUP) > 0) + status_calc_mob(md, SCO_NONE); /// Give bonuses. - return 0; + return 1; } -/*========================================== - * Summoning Guardians [Valaris] - *------------------------------------------*/ -static int mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) +/** + * Summons a castle guardian mob. + * + * @param mapname The name of the map where the guardian should be spawned. + * @param x The x coordinate where the guardian should be spawned. + * @param y The y coordinate where the guardian should be spawned. + * @param mobname The guardian's display name. + * @param class_ The guardian's mob ID in database. + * @param event The name of the event which should be executed when the guardian is killed. + * @param guardian The guardian's index. + * @param has_index If false, the guardian will be temporarily. + * @param npc_id If spawned by NPC script, this holds the ID of the invoking NPC. + * @return The spawned guardian's GID, or 0 if spawning failed. + * + * @author Valaris + * + **/ +static int mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, + int guardian, bool has_index, int npc_id) { - struct mob_data *md=NULL; - struct spawn_data data; - struct guild *g=NULL; - struct guild_castle *gc; - int16 m; - nullpo_ret(mapname); nullpo_ret(mobname); nullpo_ret(event); - memset(&data, 0, sizeof(struct spawn_data)); - data.num = 1; - - m=map->mapname2mapid(mapname); + const int map_id = map->mapname2mapid(mapname); - if(m<0) - { + if (map_id == INDEX_NOT_FOUND) { ShowWarning("mob_spawn_guardian: Map [%s] not found.\n", mapname); return 0; } - data.m = m; - data.num = 1; - if(class_<=0) { - class_ = mob->get_random_id(-class_-1, 1, 99); - if (!class_) return 0; + + if ((x <= 0 || y <= 0) && map->search_freecell(NULL, map_id, &x, &y, -1, -1, 1) == 0) { + ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) on castle map %s.\n", + class_, guardian, mapname); + return 0; } - data.class_ = class_; + if (class_ <= 0 && (class_ = mob->get_random_id(-class_ - 1, 1, 99)) == 0) + return 0; - if( !has_index ) { + if (!has_index) { guardian = -1; - } else if( guardian < 0 || guardian >= MAX_GUARDIANS ) { - ShowError("mob_spawn_guardian: Invalid guardian index %d for guardian %d (castle map %s)\n", guardian, class_, map->list[m].name); + } else if (guardian < 0 || guardian >= MAX_GUARDIANS) { + ShowError("mob_spawn_guardian: Invalid guardian index %d for guardian %d on castle map %s.\n", + guardian, class_, mapname); return 0; } - if((x<=0 || y<=0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1)) { - ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, map->list[m].name); - return 0; - } + struct spawn_data data; + + memset(&data, 0, sizeof(struct spawn_data)); + data.num = 1; + data.m = map_id; + data.class_ = class_; data.x = x; data.y = y; safestrncpy(data.name, mobname, sizeof(data.name)); safestrncpy(data.eventname, event, sizeof(data.eventname)); - if (!mob->parse_dataset(&data)) + + if (mob->parse_dataset(&data) == 0) return 0; - gc=guild->mapname2gc(map->list[m].name); + struct guild_castle *gc = guild->mapname2gc(mapname); + if (gc == NULL) { - ShowError("mob_spawn_guardian: No castle set at map %s\n", map->list[m].name); + ShowError("mob_spawn_guardian: No castle set on map %s.\n", mapname); return 0; } - if (!gc->guild_id) - ShowWarning("mob_spawn_guardian: Spawning guardian %d on a castle with no guild (castle map %s)\n", class_, map->list[m].name); + + struct guild *g = NULL; + + if (gc->guild_id == 0) + ShowWarning("mob_spawn_guardian: Spawning guardian %d on a castle map %s with no guild.\n", + class_, mapname); else g = guild->search(gc->guild_id); - if( has_index && gc->guardian[guardian].id ) { - //Check if guardian already exists, refuse to spawn if so. - struct block_list *bl2 = map->id2bl(gc->guardian[guardian].id); // TODO: Why does this not use map->id2md? - struct mob_data *md2 = BL_CAST(BL_MOB, bl2); - if (md2 != NULL && md2->guardian_data != NULL && md2->guardian_data->number == guardian) { - ShowError("mob_spawn_guardian: Attempted to spawn guardian in position %d which already has a guardian (castle map %s)\n", guardian, map->list[m].name); + if (has_index && gc->guardian[guardian].id != 0) { /// Check if guardian already exists, refuse to spawn if so. + struct mob_data *md = map->id2md(gc->guardian[guardian].id); + + if (md != NULL && md->guardian_data != NULL && md->guardian_data->number == guardian) { + ShowError("mob_spawn_guardian: Attempted to spawn guardian in position %d which already has a guardian on castle map %s.\n", + guardian, mapname); return 0; } } - md = mob->spawn_dataset(&data); + struct mob_data *md = mob->spawn_dataset(&data, npc_id); + md->guardian_data = (struct guardian_data*)aCalloc(1, sizeof(struct guardian_data)); md->guardian_data->number = guardian; md->guardian_data->castle = gc; - if( has_index ) - {// permanent guardian + + if (has_index) { /// Permanent guardian. gc->guardian[guardian].id = md->bl.id; - } - else - {// temporary guardian + } else { /// Temporary guardian. int i; + ARR_FIND(0, gc->temp_guardians_max, i, gc->temp_guardians[i] == 0); - if( i == gc->temp_guardians_max ) - { + + if (i == gc->temp_guardians_max) { ++(gc->temp_guardians_max); RECREATE(gc->temp_guardians, int, gc->temp_guardians_max); } + gc->temp_guardians[i] = md->bl.id; } - if( g ) + + if (g != NULL) md->guardian_data->g = g; - else if( gc->guild_id ) - timer->add(timer->gettick()+5000,mob->spawn_guardian_sub,md->bl.id,gc->guild_id); - mob->spawn(md); + else if (gc->guild_id > 0) + timer->add(timer->gettick() + 5000, mob->spawn_guardian_sub, md->bl.id, gc->guild_id); + mob->spawn(md); return md->bl.id; } -/*========================================== - * Summoning BattleGround [Zephyrus] - *------------------------------------------*/ -static int mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) +/** + * Spawn a mob with allegiance to the given battle group. + * + * @param mapname The name of the map where the mob should be spawned. + * @param x The x coordinate where the mob should be spawned. + * @param y The y coordinate where the mob should be spawned. + * @param mobname The mob's display name. + * @param class_ The mob's mob ID in database. + * @param event The name of the event which should be executed when the mob is killed. + * @param bg_id The battle group ID. + * @param npc_id If spawned by NPC script, this holds the ID of the invoking NPC. + * @return The spawned mob's GID, or 0 if spawning failed. + * + * @author Zephyrus + * + **/ +static int mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, + unsigned int bg_id, int npc_id) { - struct mob_data *md = NULL; - struct spawn_data data; - int16 m; - nullpo_ret(mapname); nullpo_ret(mobname); nullpo_ret(event); - if( (m = map->mapname2mapid(mapname)) < 0 ) { + const int map_id = map->mapname2mapid(mapname); + + if (map_id == INDEX_NOT_FOUND) { ShowWarning("mob_spawn_bg: Map [%s] not found.\n", mapname); return 0; } - memset(&data, 0, sizeof(struct spawn_data)); - data.m = m; - data.num = 1; - if( class_ <= 0 ) - { - class_ = mob->get_random_id(-class_-1,1,99); - if( !class_ ) return 0; + if ((x <= 0 || y <= 0) && map->search_freecell(NULL, map_id, &x, &y, -1, -1, 1) == 0) { + ShowWarning("mob_spawn_bg: Couldn't locate a spawn cell for guardian class %d (bg_id %u) on map %s.\n", class_, bg_id, mapname); + return 0; } - data.class_ = class_; - if( (x <= 0 || y <= 0) && !map->search_freecell(NULL, m, &x, &y, -1,-1, 1) ) { - ShowWarning("mob_spawn_bg: Couldn't locate a spawn cell for guardian class %d (bg_id %u) at map %s\n", class_, bg_id, map->list[m].name); + if (class_ <= 0 && (class_ = mob->get_random_id(-class_ - 1, 1, 99)) == 0) return 0; - } + struct spawn_data data; + + memset(&data, 0, sizeof(struct spawn_data)); + data.num = 1; + data.m = map_id; + data.class_ = class_; data.x = x; data.y = y; safestrncpy(data.name, mobname, sizeof(data.name)); safestrncpy(data.eventname, event, sizeof(data.eventname)); - if( !mob->parse_dataset(&data) ) + + if (mob->parse_dataset(&data) == 0) return 0; - md = mob->spawn_dataset(&data); - mob->spawn(md); - md->bg_id = bg_id; // BG Team ID + struct mob_data *md = mob->spawn_dataset(&data, npc_id); + mob->spawn(md); + md->bg_id = bg_id; return md->bl.id; } @@ -1368,7 +1462,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) // If master is BL_MOB and in battle, lock & chase to master's target instead, unless configured not to. if ((battle_config.slave_chase_masters_chasetarget == 0 || (m_md != NULL && !mob->is_in_battle_state(m_md))) && map->search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1) - && unit->walktoxy(&md->bl, x, y, 0)) + && unit->walk_toxy(&md->bl, x, y, 0) == 0) return 1; } } else if (bl->m != md->bl.m && map_flag_gvg(md->bl.m)) { @@ -1450,7 +1544,7 @@ static int mob_unlocktarget(struct mob_data *md, int64 tick) unit->set_target(&md->ud, 0); } if(battle_config.official_cell_stack_limit && map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { - unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8); + unit->walk_toxy(&md->bl, md->bl.x, md->bl.y, 8); } return 0; @@ -1482,9 +1576,9 @@ static int mob_randomwalk(struct mob_data *md, int64 tick) x+=md->bl.x; y+=md->bl.y; - if (((x != md->bl.x) || (y != md->bl.y)) && map->getcell(md->bl.m, &md->bl, x, y, CELL_CHKPASS) && unit->walktoxy(&md->bl, x, y, 8)) { + if ((x != md->bl.x || y != md->bl.y) && map->getcell(md->bl.m, &md->bl, x, y, CELL_CHKPASS) != 0 + && unit->walk_toxy(&md->bl, x, y, 8) == 0) break; - } } if(i==retrycount){ md->move_fail_count++; @@ -3100,18 +3194,25 @@ static int mob_countslave(struct block_list *bl) return map->foreachinmap(mob->countslave_sub, bl->m, BL_MOB,bl->id); } -/*========================================== - * Summons amount slaves contained in the value[5] array using round-robin. [adapted by Skotlex] - *------------------------------------------*/ +/** + * Summons amount slaves contained in the value[5] array using round-robin. + * + * @param md2 The mob which summons the slaves. + * @param value Array with slave mob IDs. + * @param amount The amount of slaves to spawn. + * @param skill_id The Id of the skill which summons the slaves. + * @return 1 on success, 0 on failure. + * + * @author Skotlex + * + **/ static int mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { - struct mob_data *md; - struct spawn_data data; - int count = 0,k=0,hp_rate=0; - nullpo_ret(md2); nullpo_ret(value); + struct spawn_data data; + memset(&data, 0, sizeof(struct spawn_data)); data.m = md2->bl.m; data.x = md2->bl.x; @@ -3120,31 +3221,42 @@ static int mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 data.state.size = md2->special_state.size; data.state.ai = md2->special_state.ai; - if(mob->db_checkid(value[0]) == 0) + if (mob->db_checkid(value[0]) == 0) return 0; - /** - * Flags this monster is able to summon; saves a worth amount of memory upon deletion - **/ - md2->can_summon = 1; - while(count < 5 && mob->db_checkid(value[count])) count++; - if(count < 1) return 0; - if (amount > 0 && amount < count) { //Do not start on 0, pick some random sub subset [Skotlex] - k = rnd()%count; - amount+=k; //Increase final value by same amount to preserve total number to summon. + md2->can_summon = 1; /// Flags this monster is able to summon; saves a worth amount of memory upon deletion. + + int count = 0; + + while (count < 5 && mob->db_checkid(value[count]) != 0) + count++; + + if (count < 1) + return 0; + + int k = 0; + + if (amount > 0 && amount < count) { /// Do not start on 0, pick some random sub subset. [Skotlex] + k = rnd() % count; + amount += k; /// Increase final value by same amount to preserve total number to summon. } - if (!battle_config.monster_class_change_recover && - (skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS)) + int hp_rate = 0; + + if ((skill_id == NPC_TRANSFORMATION || skill_id == NPC_METAMORPHOSIS) && + battle_config.monster_class_change_recover == 0) hp_rate = get_percentage(md2->status.hp, md2->status.max_hp); - for(;k<amount;k++) { - short x,y; - data.class_ = value[k%count]; //Summon slaves in round-robin fashion. [Skotlex] + for (; k < amount; k++) { + data.class_ = value[k % count]; /// Summon slaves in round-robin fashion. [Skotlex] + if (mob->db_checkid(data.class_) == 0) continue; - if (map->search_freecell(&md2->bl, 0, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 0)) { + short x; + short y; + + if (map->search_freecell(&md2->bl, 0, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 0) != 0) { data.x = x; data.y = y; } else { @@ -3152,49 +3264,52 @@ static int mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 data.y = md2->bl.y; } - //These two need to be loaded from the db for each slave. if (battle_config.override_mob_names == 1) strcpy(data.name, DEFAULT_MOB_NAME); else strcpy(data.name, DEFAULT_MOB_JNAME); - if (!mob->parse_dataset(&data)) + if (mob->parse_dataset(&data) == 0) continue; - md= mob->spawn_dataset(&data); - if(skill_id == NPC_SUMMONSLAVE){ - md->master_id=md2->bl.id; + struct mob_data *md = mob->spawn_dataset(&data, 0); + + if (skill_id == NPC_SUMMONSLAVE) { + md->master_id = md2->bl.id; md->special_state.ai = md2->special_state.ai; } + mob->spawn(md); - if (hp_rate) //Scale HP - md->status.hp = md->status.max_hp*hp_rate/100; + if (hp_rate > 0) /// Scale HP. + md->status.hp = md->status.max_hp * hp_rate / 100; - //Inherit the aggressive mode of the master. - if (battle_config.slaves_inherit_mode && md->master_id) { + /** Inherit the aggressive mode of the master. **/ + if (battle_config.slaves_inherit_mode > 0 && md->master_id > 0) { switch (battle_config.slaves_inherit_mode) { - case 1: //Always aggressive - if (!(md->status.mode&MD_AGGRESSIVE)) - sc_start4(NULL, &md->bl, SC_MODECHANGE, 100,1,0, MD_AGGRESSIVE, 0, 0); + case 1: /// Always aggressive. + if ((md->status.mode & MD_AGGRESSIVE) == 0) + sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 0); + break; - case 2: //Always passive - if (md->status.mode&MD_AGGRESSIVE) - sc_start4(NULL, &md->bl, SC_MODECHANGE, 100,1,0, 0, MD_AGGRESSIVE, 0); + case 2: /// Always passive. + if ((md->status.mode & MD_AGGRESSIVE) == MD_AGGRESSIVE) + sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, 0, MD_AGGRESSIVE, 0); + break; - default: //Copy master. - if (md2->status.mode&MD_AGGRESSIVE) - sc_start4(NULL, &md->bl, SC_MODECHANGE, 100,1,0, MD_AGGRESSIVE, 0, 0); + default: /// Copy master. + if ((md2->status.mode & MD_AGGRESSIVE) == MD_AGGRESSIVE) + sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 0); else - sc_start4(NULL, &md->bl, SC_MODECHANGE, 100,1,0, 0, MD_AGGRESSIVE, 0); + sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, 0, MD_AGGRESSIVE, 0); break; } } - clif->skill_nodamage(&md->bl,&md->bl,skill_id,amount,1); + clif->skill_nodamage(&md->bl, &md->bl, skill_id, amount, 1); } - return 0; + return 1; } /*========================================== @@ -3588,211 +3703,239 @@ static int mob_is_clone(int class_) return class_; } -//Flag values: -//&1: Set special AI (fight mobs, not players) -//If mode is not passed, a default aggressive mode is used. -//If master_id is passed, clone is attached to him. -//Returns: ID of newly crafted copy. -static int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 mode, int flag, unsigned int duration) +/** + * Spawns a mob which is a clone of another character. + * + * @param sd The character which should be cloned. + * @param m The ID of the map where the clone should be spawned. + * @param x The x coordinate where the clone should be spawned. + * @param y The y coordinate where the clone should be spawned. + * @param event The name of the event which should be executed when the clone is killed. + * @param master_id If passed, the clone will be attached to this account ID. + * @param mode The clone's mob mode(s). (Defaults to MD_CANMOVE|MD_AGGRESSIVE|MD_ASSIST|MD_CANATTACK.) + * @param flag 0 - target characters; 1 - target mobs. + * @param duration How long the clone will live before it is auto-removed. (ms) + * @return The spawned clone's GID, or 0 if spawning failed. + * + **/ +static int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, + uint32 mode, int flag, unsigned int duration) { - int class_; - int i,j,h,inf, fd; - struct mob_data *md; - struct mob_skill *ms; - struct mob_db* db; - struct status_data *mstatus; - nullpo_ret(sd); - if(pc_isdead(sd) && master_id && flag&1) + if (pc_isdead(sd) && master_id != 0 && flag == 1) return 0; - ARR_FIND( MOB_CLONE_START, MOB_CLONE_END, class_, mob->db_data[class_] == NULL ); - if(class_ < 0 || class_ >= MOB_CLONE_END) + int class_; + + ARR_FIND(MOB_CLONE_START, MOB_CLONE_END, class_, mob->db_data[class_] == NULL); + + if (class_ < 0 || class_ >= MOB_CLONE_END) return 0; - db = mob->db_data[class_]=(struct mob_db*)aCalloc(1, sizeof(struct mob_db)); - mstatus = &db->status; - strcpy(db->sprite,sd->status.name); - strcpy(db->name,sd->status.name); - strcpy(db->jname,sd->status.name); - db->lv=status->get_lv(&sd->bl); + mob->db_data[class_] = (struct mob_db*)aCalloc(1, sizeof(struct mob_db)); + + struct mob_db *db = mob->db_data[class_]; + struct status_data *mstatus = &db->status; + + strcpy(db->sprite, sd->status.name); + strcpy(db->name, sd->status.name); + strcpy(db->jname, sd->status.name); + db->lv = status->get_lv(&sd->bl); + db->dmg_taken_rate = 100; memcpy(mstatus, &sd->base_status, sizeof(struct status_data)); - mstatus->rhw.atk2= mstatus->dex + mstatus->rhw.atk + mstatus->rhw.atk2; //Max ATK - mstatus->rhw.atk = mstatus->dex; //Min ATK - if (mstatus->lhw.atk) { - mstatus->lhw.atk2= mstatus->dex + mstatus->lhw.atk + mstatus->lhw.atk2; //Max ATK - mstatus->lhw.atk = mstatus->dex; //Min ATK + mstatus->rhw.atk2 = mstatus->dex + mstatus->rhw.atk + mstatus->rhw.atk2; /// Max ATK. + mstatus->rhw.atk = mstatus->dex; /// Min ATK. + + if (mstatus->lhw.atk > 0) { + mstatus->lhw.atk2 = mstatus->dex + mstatus->lhw.atk + mstatus->lhw.atk2; /// Max ATK. + mstatus->lhw.atk = mstatus->dex; /// Min ATK. } - if (mode != MD_NONE) //User provided mode. + + if (mode != MD_NONE) /// User provided mode. mstatus->mode = mode; - else if (flag&1) //Friendly Character, remove looting. + else if (flag == 1) /// Friendly Character, remove looting. mstatus->mode &= ~MD_LOOTER; + mstatus->hp = mstatus->max_hp; mstatus->sp = mstatus->max_sp; memcpy(&db->vd, &sd->vd, sizeof(struct view_data)); - db->base_exp=1; - db->job_exp=1; - db->range2=AREA_SIZE; //Let them have the same view-range as players. - db->range3=AREA_SIZE; //Min chase of a screen. - db->option=sd->sc.option; + db->base_exp = 1; + db->job_exp = 1; + db->range2 = AREA_SIZE; /// Let them have the same view-range as players. + db->range3 = AREA_SIZE; /// Min chase of a screen. + db->option = sd->sc.option; - //Skill copy [Skotlex] - ms = &db->skill[0]; + const int fd = sd->fd; - /** - * We temporarily disable sd's fd so it doesn't receive the messages from skill_check_condition_castbegin - **/ - fd = sd->fd; - sd->fd = 0; - - //Go Backwards to give better priority to advanced skills. - for (i=0,j = MAX_SKILL_TREE-1;j>=0 && i< MAX_MOBSKILL ;j--) { - int idx = pc->skill_tree[pc->class2idx(sd->status.class)][j].idx; - int skill_id = pc->skill_tree[pc->class2idx(sd->status.class)][j].id; - if (!skill_id || sd->status.skill[idx].lv < 1 || - (skill->dbs->db[idx].inf2&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL)) - ) + sd->fd = 0; /// Temporarily disable sd's fd so it doesn't receive the messages from skill_check_condition_castbegin. + + struct mob_skill *mob_skills = &db->skill[0]; + + /// Go Backwards to give better priority to advanced skills. + for (int i = 0, j = MAX_SKILL_TREE - 1; j >= 0 && i < MAX_MOBSKILL; j--) { + const int idx = pc->skill_tree[pc->class2idx(sd->status.class)][j].idx; + const int skill_id = pc->skill_tree[pc->class2idx(sd->status.class)][j].id; + + if (skill_id == 0 || sd->status.skill[idx].lv < 1 || + (skill->dbs->db[idx].inf2 & (INF2_WEDDING_SKILL | INF2_GUILD_SKILL)) > 0) continue; - for(h = 0; h < map->list[sd->bl.m].zone->disabled_skills_count; h++) { - if( skill_id == map->list[sd->bl.m].zone->disabled_skills[h]->nameid && map->list[sd->bl.m].zone->disabled_skills[h]->subtype == MZS_CLONE ) { + + int h; + + for (h = 0; h < map->list[sd->bl.m].zone->disabled_skills_count; h++) { + if (skill_id == map->list[sd->bl.m].zone->disabled_skills[h]->nameid && + map->list[sd->bl.m].zone->disabled_skills[h]->subtype == MZS_CLONE) break; - } } - if( h < map->list[sd->bl.m].zone->disabled_skills_count ) + + if (h < map->list[sd->bl.m].zone->disabled_skills_count) continue; - //Normal aggressive mob, disable skills that cannot help them fight - //against players (those with flags UF_NOMOB and UF_NOPC are specific - //to always aid players!) [Skotlex] - if (!(flag&1) && - skill->get_unit_id(skill_id, 0) && - skill->get_unit_flag(skill_id)&(UF_NOMOB|UF_NOPC)) + + /// Normal aggressive mob. Disable skills that cannot help fighting against players. (Those with flags UF_NOMOB and UF_NOPC are specific to always aid players!) [Skotlex] + if (flag == 0 && skill->get_unit_id(skill_id, 0) != 0 && + (skill->get_unit_flag(skill_id) & (UF_NOMOB | UF_NOPC)) > 0) continue; - /** - * The clone should be able to cast the skill (e.g. have the required weapon) bugreport:5299) - **/ - if( !skill->check_condition_castbegin(sd,skill_id,sd->status.skill[idx].lv) ) + + /// The clone should be able to cast the skill. (E.g. have the required weapon.) [bugreport:5299] + if (skill->check_condition_castbegin(sd, skill_id, sd->status.skill[idx].lv) == 0) continue; - memset (&ms[i], 0, sizeof(struct mob_skill)); - ms[i].skill_id = skill_id; - ms[i].skill_lv = sd->status.skill[idx].lv; - ms[i].state = MSS_ANY; - ms[i].permillage = 500*battle_config.mob_skill_rate/100; //Default chance of all skills: 5% - ms[i].emotion = -1; - ms[i].cancel = 0; - ms[i].casttime = skill->cast_fix(&sd->bl,skill_id, ms[i].skill_lv); - ms[i].delay = 5000+skill->delay_fix(&sd->bl,skill_id, ms[i].skill_lv); - - inf = skill->dbs->db[idx].inf; - if (inf&INF_ATTACK_SKILL) { - ms[i].target = MST_TARGET; - ms[i].cond1 = MSC_ALWAYS; - if (skill->get_range(skill_id, ms[i].skill_lv) > 3) - ms[i].state = MSS_ANYTARGET; + memset(&mob_skills[i], 0, sizeof(struct mob_skill)); + mob_skills[i].skill_id = skill_id; + mob_skills[i].skill_lv = sd->status.skill[idx].lv; + mob_skills[i].state = MSS_ANY; + mob_skills[i].permillage = 500 * battle_config.mob_skill_rate / 100; /// Default chance of all skills: 5% + mob_skills[i].emotion = -1; + mob_skills[i].cancel = 0; + mob_skills[i].casttime = skill->cast_fix(&sd->bl, skill_id, mob_skills[i].skill_lv); + mob_skills[i].delay = 5000 + skill->delay_fix(&sd->bl, skill_id, mob_skills[i].skill_lv); + + const int inf = skill->dbs->db[idx].inf; + + if ((inf & INF_ATTACK_SKILL) == INF_ATTACK_SKILL) { + mob_skills[i].target = MST_TARGET; + mob_skills[i].cond1 = MSC_ALWAYS; + + if (skill->get_range(skill_id, mob_skills[i].skill_lv) > 3) + mob_skills[i].state = MSS_ANYTARGET; else - ms[i].state = MSS_BERSERK; - } else if(inf&INF_GROUND_SKILL) { - if (skill->get_inf2(skill_id)&INF2_TRAP) { //Traps! - ms[i].state = MSS_IDLE; - ms[i].target = MST_AROUND2; - ms[i].delay = 60000; - } else if (skill->get_unit_target(skill_id) == BCT_ENEMY) { //Target Enemy - ms[i].state = MSS_ANYTARGET; - ms[i].target = MST_TARGET; - ms[i].cond1 = MSC_ALWAYS; - } else { //Target allies - ms[i].target = MST_FRIEND; - ms[i].cond1 = MSC_FRIENDHPLTMAXRATE; - ms[i].cond2 = 95; + mob_skills[i].state = MSS_BERSERK; + } else if ((inf & INF_GROUND_SKILL) == INF_GROUND_SKILL) { + if ((skill->get_inf2(skill_id) & INF2_TRAP) == INF2_TRAP) { /// Traps! + mob_skills[i].state = MSS_IDLE; + mob_skills[i].target = MST_AROUND2; + mob_skills[i].delay = 60000; + } else if (skill->get_unit_target(skill_id) == BCT_ENEMY) { /// Target Enemy. + mob_skills[i].state = MSS_ANYTARGET; + mob_skills[i].target = MST_TARGET; + mob_skills[i].cond1 = MSC_ALWAYS; + } else { /// Target allies. + mob_skills[i].target = MST_FRIEND; + mob_skills[i].cond1 = MSC_FRIENDHPLTMAXRATE; + mob_skills[i].cond2 = 95; } - } else if (inf&INF_SELF_SKILL) { - if (skill->get_inf2(skill_id)&INF2_NO_TARGET_SELF) { //auto-select target skill. - ms[i].target = MST_TARGET; - ms[i].cond1 = MSC_ALWAYS; - if (skill->get_range(skill_id, ms[i].skill_lv) > 3) { - ms[i].state = MSS_ANYTARGET; - } else { - ms[i].state = MSS_BERSERK; - } - } else { //Self skill - ms[i].target = MST_SELF; - ms[i].cond1 = MSC_MYHPLTMAXRATE; - ms[i].cond2 = 90; - ms[i].permillage = 2000; - //Delay: Remove the stock 5 secs and add half of the support time. - ms[i].delay += -5000 +(skill->get_time(skill_id, ms[i].skill_lv) + skill->get_time2(skill_id, ms[i].skill_lv))/2; - if (ms[i].delay < 5000) - ms[i].delay = 5000; //With a minimum of 5 secs. + } else if ((inf & INF_SELF_SKILL) == INF_SELF_SKILL) { + if ((skill->get_inf2(skill_id) & INF2_NO_TARGET_SELF) == INF2_NO_TARGET_SELF) { /// Auto-select target skill. + mob_skills[i].target = MST_TARGET; + mob_skills[i].cond1 = MSC_ALWAYS; + + if (skill->get_range(skill_id, mob_skills[i].skill_lv) > 3) + mob_skills[i].state = MSS_ANYTARGET; + else + mob_skills[i].state = MSS_BERSERK; + } else { /// Self skill. + mob_skills[i].target = MST_SELF; + mob_skills[i].cond1 = MSC_MYHPLTMAXRATE; + mob_skills[i].cond2 = 90; + mob_skills[i].permillage = 2000; + + const int time1 = skill->get_time(skill_id, mob_skills[i].skill_lv); + const int time2 = skill->get_time2(skill_id, mob_skills[i].skill_lv); + + /** Delay: Remove the stock 5 secs and add half of the support time. **/ + mob_skills[i].delay += -5000 + (time1 + time2) / 2; + + if (mob_skills[i].delay < 5000) + mob_skills[i].delay = 5000; /// With a minimum of 5 seconds. } - } else if (inf&INF_SUPPORT_SKILL) { - ms[i].target = MST_FRIEND; - ms[i].cond1 = MSC_FRIENDHPLTMAXRATE; - ms[i].cond2 = 90; + } else if ((inf & INF_SUPPORT_SKILL) == INF_SUPPORT_SKILL) { + mob_skills[i].target = MST_FRIEND; + mob_skills[i].cond1 = MSC_FRIENDHPLTMAXRATE; + mob_skills[i].cond2 = 90; + if (skill_id == AL_HEAL) - ms[i].permillage = 5000; //Higher skill rate usage for heal. + mob_skills[i].permillage = 5000; /// Higher skill rate usage for heal. else if (skill_id == ALL_RESURRECTION) - ms[i].cond2 = 1; - //Delay: Remove the stock 5 secs and add half of the support time. - ms[i].delay += -5000 +(skill->get_time(skill_id, ms[i].skill_lv) + skill->get_time2(skill_id, ms[i].skill_lv))/2; - if (ms[i].delay < 2000) - ms[i].delay = 2000; //With a minimum of 2 secs. - - if (i+1 < MAX_MOBSKILL) { //duplicate this so it also triggers on self. - memcpy(&ms[i+1], &ms[i], sizeof(struct mob_skill)); + mob_skills[i].cond2 = 1; + + const int time1 = skill->get_time(skill_id, mob_skills[i].skill_lv); + const int time2 = skill->get_time2(skill_id, mob_skills[i].skill_lv); + + /** Delay: Remove the stock 5 secs and add half of the support time. **/ + mob_skills[i].delay += -5000 + (time1 + time2) / 2; + + if (mob_skills[i].delay < 2000) + mob_skills[i].delay = 2000; /// With a minimum of 2 seconds. + + if (i + 1 < MAX_MOBSKILL) { /// Duplicate this so it also triggers on self. + memcpy(&mob_skills[i + 1], &mob_skills[i], sizeof(struct mob_skill)); db->maxskill = ++i; - ms[i].target = MST_SELF; - ms[i].cond1 = MSC_MYHPLTMAXRATE; + mob_skills[i].target = MST_SELF; + mob_skills[i].cond1 = MSC_MYHPLTMAXRATE; } } else { - switch (skill_id) { //Certain Special skills that are passive, and thus, never triggered. - case MO_TRIPLEATTACK: - case TF_DOUBLE: - case GS_CHAINACTION: - ms[i].state = MSS_BERSERK; - ms[i].target = MST_TARGET; - ms[i].cond1 = MSC_ALWAYS; - ms[i].permillage = skill_id==MO_TRIPLEATTACK?(3000-ms[i].skill_lv*100):(ms[i].skill_lv*500); - ms[i].delay -= 5000; //Remove the added delay as these could trigger on "all hits". - break; - default: //Untreated Skill - continue; + switch (skill_id) { /// Certain special skills that are passive, and thus, never triggered. + case MO_TRIPLEATTACK: + FALLTHROUGH + case TF_DOUBLE: + FALLTHROUGH + case GS_CHAINACTION: + mob_skills[i].state = MSS_BERSERK; + mob_skills[i].target = MST_TARGET; + mob_skills[i].cond1 = MSC_ALWAYS; + + if (skill_id == MO_TRIPLEATTACK) + mob_skills[i].permillage = 3000 - mob_skills[i].skill_lv * 100; + else + mob_skills[i].permillage = mob_skills[i].skill_lv * 500; + + mob_skills[i].delay -= 5000; /// Remove the added delay as these could trigger on "all hits". + break; + default: /// Untreated skill. + continue; } } - if (battle_config.mob_skill_rate!= 100) - ms[i].permillage = ms[i].permillage*battle_config.mob_skill_rate/100; - if (battle_config.mob_skill_delay != 100) - ms[i].delay = ms[i].delay*battle_config.mob_skill_delay/100; + mob_skills[i].permillage *= battle_config.mob_skill_rate / 100; + mob_skills[i].delay *= battle_config.mob_skill_delay / 100; db->maxskill = ++i; } - /** - * We grant the session it's fd value back. - **/ - sd->fd = fd; + sd->fd = fd; /// We grant the session it's fd value back. + + /// Finally spawn it. + struct mob_data *md = mob->once_spawn_sub(&sd->bl, m, x, y, DEFAULT_MOB_NAME, class_, event, SZ_SMALL, AI_NONE, 0); - //Finally, spawn it. - md = mob->once_spawn_sub(&sd->bl, m, x, y, DEFAULT_MOB_NAME, class_, event, SZ_SMALL, AI_NONE); - if (!md) return 0; //Failed? + if (md == NULL) + return 0; /// Failed? md->special_state.clone = 1; - if (master_id || flag || duration) { //Further manipulate crafted char. - if (flag&1) //Friendly Character - md->special_state.ai = AI_ATTACK; - if (master_id) //Attach to Master - md->master_id = master_id; - if (duration) //Auto Delete after a while. - { - if( md->deletetimer != INVALID_TIMER ) - timer->delete(md->deletetimer, mob->timer_delete); - md->deletetimer = timer->add(timer->gettick() + duration, mob->timer_delete, md->bl.id, 0); - } + if (flag == 1) /// Friendly character. + md->special_state.ai = AI_ATTACK; + + if (master_id != 0) /// Attach to master. + md->master_id = master_id; + + if (duration > 0) { /// Auto delete after a while. + if (md->deletetimer != INVALID_TIMER) + timer->delete(md->deletetimer, mob->timer_delete); + + md->deletetimer = timer->add(timer->gettick() + duration, mob->timer_delete, md->bl.id, 0); } mob->spawn(md); - return md->bl.id; } @@ -4206,8 +4349,12 @@ static void mob_read_db_viewdata_sub(struct mob_db *entry, struct config_setting entry->vd.head_mid = libconfig->setting_get_int(it); if ((it = libconfig->setting_get_member(t, "HeadLowId")) != NULL) entry->vd.head_bottom = libconfig->setting_get_int(it); + if ((it = libconfig->setting_get_member(t, "HairStyleId")) != NULL) entry->vd.hair_style = libconfig->setting_get_int(it); + else + entry->vd.hair_style = 1; + if ((it = libconfig->setting_get_member(t, "BodyStyleId")) != NULL) entry->vd.body_style = libconfig->setting_get_int(it); if ((it = libconfig->setting_get_member(t, "HairColorId")) != NULL) diff --git a/src/map/mob.h b/src/map/mob.h index 8fd16f191..8839809f2 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -255,6 +255,7 @@ struct mob_data { int areanpc_id; //Required in OnTouchNPC (to avoid multiple area touchs) unsigned int bg_id; // BattleGround System int clan_id; // Clan System + int npc_id; // NPC ID if spawned with monster/areamonster/guardian/bg_monster/atcommand("@monster xy") (Used to kill mob on NPC unload.) int64 next_walktime, last_thinktime, last_linktime, last_pcneartime, dmgtick; short move_fail_count; @@ -507,14 +508,14 @@ struct mob_interface { int (*db_checkid) (const int id); struct view_data* (*get_viewdata) (int class_); int (*parse_dataset) (struct spawn_data *data); - struct mob_data* (*spawn_dataset) (struct spawn_data *data); + struct mob_data* (*spawn_dataset) (struct spawn_data *data, int npc_id); int (*get_random_id) (int type, int flag, int lv); bool (*ksprotected) (struct block_list *src, struct block_list *target); - struct mob_data* (*once_spawn_sub) (struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai); + struct mob_data* (*once_spawn_sub) (struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai, int npc_id); int (*once_spawn) (struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai); int (*once_spawn_area) (struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai); - int (*spawn_guardian) (const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index); - int (*spawn_bg) (const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id); + int (*spawn_guardian) (const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id); + int (*spawn_bg) (const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id); int (*can_reach) (struct mob_data *md, struct block_list *bl, int range, int state); int (*linksearch) (struct block_list *bl, va_list ap); int (*delayspawn) (int tid, int64 tick, int id, intptr_t data); diff --git a/src/map/npc.c b/src/map/npc.c index cc588e52c..2ac99948b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1335,53 +1335,68 @@ static int npc_click(struct map_session_data *sd, struct npc_data *nd) return 0; } -/*========================================== +/** + * Validates a character's script related data and (re-)runs the script if validation was successful. * - *------------------------------------------*/ + * Is called when: + * - The Next/Close button was clicked. + * - A menu option was selected. + * - A value was entered by input() script command. + * - A progress bar has reached 100%. + * - The character timed out because of idling. + * + * @param sd The character's session data. + * @param id The NPC ID. + * @param closing Whether the script is closing, or not. + * @return 0 on success, otherwise 1. + * +**/ static int npc_scriptcont(struct map_session_data *sd, int id, bool closing) { - struct block_list *target = map->id2bl(id); nullpo_retr(1, sd); - if( id != sd->npc_id ){ - struct npc_data *nd_sd = map->id2nd(sd->npc_id); - struct npc_data *nd = BL_CAST(BL_NPC, target); - ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", - nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id, - nd?(char*)nd->name:"'Unknown NPC'", (int)id); - return 1; + struct block_list *target = map->id2bl(id); + +#ifdef SECURE_NPCTIMEOUT + if (sd->npc_idle_timer != INVALID_TIMER) { /// Not yet timed out. +#endif + if (id != sd->npc_id) { + struct npc_data *nd_sd = map->id2nd(sd->npc_id); + struct npc_data *nd = BL_CAST(BL_NPC, target); + + ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", + (nd_sd != NULL) ? nd_sd->name : "'Unknown NPC'", sd->npc_id, + (nd != NULL) ? nd->name : "'Unknown NPC'", id); + + return 1; + } +#ifdef SECURE_NPCTIMEOUT } +#endif - if (id != npc->fake_nd->bl.id) { // Not item script + if (id != npc->fake_nd->bl.id) { /// Not an item script. if (sd->state.npc_unloaded != 0) { sd->state.npc_unloaded = 0; - } else if ((npc->checknear(sd,target)) == NULL) { - ShowWarning("npc_scriptcont: failed npc->checknear test.\n"); + } else if (npc->checknear(sd, target) == NULL) { + ShowWarning("npc_scriptcont: Failed npc->checknear test.\n"); return 1; } } - /** - * For the Secure NPC Timeout option (check config/Secure.h) [RR] - **/ + #ifdef SECURE_NPCTIMEOUT - /** - * Update the last NPC iteration - **/ - sd->npc_idle_tick = timer->gettick(); + sd->npc_idle_tick = timer->gettick(); /// Update the last NPC iteration. #endif - /** - * WPE can get to this point with a progressbar; we deny it. - **/ - if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,timer->gettick()) > 0 ) + /// WPE can get to this point with a progressbar; we deny it. + if (sd->progressbar.npc_id != 0 && DIFF_TICK(sd->progressbar.timeout, timer->gettick()) > 0) return 1; - if( !sd->st ) { + if (sd->st == NULL) { sd->npc_id = 0; return 1; } - if( closing && sd->st->state == CLOSE ) + if (closing && sd->st->state == CLOSE) sd->st->state = END; script->run_main(sd->st); @@ -1457,7 +1472,11 @@ static int npc_cashshop_buylist(struct map_session_data *sd, int points, struct return ERROR_TYPE_NPC; if( nd->subtype != CASHSHOP ) { - if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) { + if (nd->subtype == SCRIPT && nd->u.scr.shop && + nd->u.scr.shop->type != NST_ZENY && + nd->u.scr.shop->type != NST_MARKET && + nd->u.scr.shop->type != NST_BARTER && + nd->u.scr.shop->type != NST_EXPANDED_BARTER) { shop = nd->u.scr.shop->item; shop_size = nd->u.scr.shop->items; } else { @@ -1623,7 +1642,7 @@ static void npc_market_tosql(struct npc_data *nd, int index) { nullpo_retv(nd); Assert_retv(index >= 0 && index < nd->u.scr.shop->items); - if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%u')", + if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s','%d','%d')", map->npc_market_data_db, nd->exname, nd->u.scr.shop->item[index].nameid, nd->u.scr.shop->item[index].qty)) Sql_ShowDebug(map->mysql_handle); } @@ -1716,7 +1735,9 @@ static void npc_barter_tosql(struct npc_data *nd, int index) nullpo_retv(nd); Assert_retv(index >= 0 && index < nd->u.scr.shop->items); const struct npc_item_list *const item = &nd->u.scr.shop->item[index]; - if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s', '%d', '%u', '%u', '%d')", + if (item->qty == -1) + return; + if (SQL_ERROR == SQL->Query(map->mysql_handle, "REPLACE INTO `%s` VALUES ('%s', '%d', '%d', '%u', '%d')", map->npc_barter_data_db, nd->exname, item->nameid, item->qty, item->value, item->value2)) { Sql_ShowDebug(map->mysql_handle); } @@ -1753,6 +1774,178 @@ static void npc_barter_delfromsql(struct npc_data *nd, int index) } } + +/** + * Loads persistent NPC Expanded Barter Data from SQL + **/ +static void npc_expanded_barter_fromsql(void) +{ + struct SqlStmt *stmt = SQL->StmtMalloc(map->mysql_handle); + char name[NAME_LENGTH + 1]; + int itemid; + int amount; + int zeny; + StringBuf buf; + + StrBuf->Init(&buf); + StrBuf->AppendStr(&buf, "SELECT `name`, `itemId`, `amount`, `zeny`"); + for (int k = 1; k < 11; k ++) { + StrBuf->Printf(&buf, ", `currencyId%d`, `currencyAmount%d`, `currencyRefine%d`", k, k, k); + } + StrBuf->Printf(&buf, " FROM `%s`", map->npc_expanded_barter_data_db); + + if (SQL_ERROR == SQL->StmtPrepareStr(stmt, StrBuf->Value(&buf)) + || SQL_ERROR == SQL->StmtExecute(stmt) + ) { + SqlStmt_ShowDebug(stmt); + SQL->StmtFree(stmt); + return; + } + + struct npc_barter_currency tempCurrency[10]; + SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name, sizeof name, NULL, NULL); + SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, sizeof itemid, NULL, NULL); + SQL->StmtBindColumn(stmt, 2, SQLDT_UINT32, &amount, sizeof amount, NULL, NULL); + SQL->StmtBindColumn(stmt, 3, SQLDT_UINT32, &zeny, sizeof zeny, NULL, NULL); + for (int k = 0; k < 10; k ++) { + SQL->StmtBindColumn(stmt, k * 3 + 4, SQLDT_INT, &tempCurrency[k].nameid, sizeof tempCurrency[k].nameid, NULL, NULL); + SQL->StmtBindColumn(stmt, k * 3 + 5, SQLDT_INT, &tempCurrency[k].amount, sizeof tempCurrency[k].amount, NULL, NULL); + SQL->StmtBindColumn(stmt, k * 3 + 6, SQLDT_INT, &tempCurrency[k].refine, sizeof tempCurrency[k].refine, NULL, NULL); + } + + while (SQL_SUCCESS == SQL->StmtNextRow(stmt)) { + struct npc_data *nd = NULL; + unsigned short i; + + if ((nd = npc->name2id(name)) == NULL) { + ShowError("npc_expanded_barter_fromsql: NPC '%s' not found! skipping...\n",name); + npc->expanded_barter_delfromsql_sub(name, INT_MAX, 0, 0, NULL); + continue; + } else if (nd->subtype != SCRIPT || nd->u.scr.shop == NULL || nd->u.scr.shop->items == 0 || nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + ShowError("npc_expanded_barter_fromsql: NPC '%s' is not proper for barter, skipping...\n",name); + npc->expanded_barter_delfromsql_sub(name, INT_MAX, 0, 0, NULL); + continue; + } + + for (i = 0; i < nd->u.scr.shop->items; i++) { + struct npc_item_list *const item = &nd->u.scr.shop->item[i]; + if (item->nameid == itemid && item->value == zeny) { + int count = nd->u.scr.shop->item[i].value2; + if (count > 10) + count = 10; + int curIndex; + for (curIndex = 0; curIndex < count; curIndex ++) { + struct npc_barter_currency *currency = &nd->u.scr.shop->item[i].currency[curIndex]; + struct npc_barter_currency *currency2 = &tempCurrency[curIndex]; + if (currency->nameid != currency2->nameid || + currency->amount != currency2->amount || + currency->refine != currency2->refine) { + break; + } + } + if (curIndex == count) { + item->qty = amount; + break; + } + } + } + + if (i == nd->u.scr.shop->items) { + ShowError("npc_expanded_barter_fromsql: NPC '%s' does not sell item %d (qty %d), deleting...\n", name, itemid, amount); + npc->expanded_barter_delfromsql_sub(name, itemid, zeny, 10, &tempCurrency[0]); + continue; + } + } + SQL->StmtFree(stmt); + StrBuf->Destroy(&buf); +} + +/** + * Saves persistent NPC Expanded Barter Data into SQL + **/ +static void npc_expanded_barter_tosql(struct npc_data *nd, int index) +{ + nullpo_retv(nd); + Assert_retv(index >= 0 && index < nd->u.scr.shop->items); + const struct npc_item_list *const item = &nd->u.scr.shop->item[index]; + if (item->qty == -1) + return; + + npc->expanded_barter_delfromsql(nd, index); + + StringBuf buf; + StrBuf->Init(&buf); + StrBuf->Printf(&buf, "INSERT INTO `%s` VALUES ('%s', '%d', '%d', '%u'", map->npc_expanded_barter_data_db, nd->exname, item->nameid, item->qty, item->value); + int currencyCount = item->value2; + if (currencyCount > 10) + currencyCount = 10; + int k; + for (k = 0; k < currencyCount; k++) { + struct npc_barter_currency *currency = &item->currency[k]; + StrBuf->Printf(&buf, ", '%d', '%d', '%d'", currency->nameid, currency->amount, currency->refine); + } + for (; k < 10; k ++) { + StrBuf->Printf(&buf, ", '0', '0', '0'"); + } + StrBuf->AppendStr(&buf, ")"); + + if (SQL_ERROR == SQL->QueryStr(map->mysql_handle, StrBuf->Value(&buf))) { + Sql_ShowDebug(map->mysql_handle); + } + StrBuf->Destroy(&buf); +} + +/** + * Removes persistent NPC Expanded Barter Data from SQL + */ +static void npc_expanded_barter_delfromsql_sub(const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency* currency) +{ + if (itemId == INT_MAX) { + if (SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `name`='%s'", map->npc_expanded_barter_data_db, npcname)) + Sql_ShowDebug(map->mysql_handle); + } else { + StringBuf buf; + + StrBuf->Init(&buf); + StrBuf->Printf(&buf, "DELETE FROM `%s` WHERE `name`='%s' AND `itemId`='%d' AND `zeny`='%d'", + map->npc_expanded_barter_data_db, npcname, itemId, zeny); + int k = 0; + if (currencyCount > 10) + currencyCount = 10; + for (k = 0; k < currencyCount; k++) { + struct npc_barter_currency *currency1 = ¤cy[k]; + StrBuf->Printf(&buf, " AND currencyId%d='%d' and currencyAmount%d='%d' and currencyRefine%d='%d'", + k + 1, currency1->nameid, k + 1, currency1->amount, k + 1, currency1->refine); + } + for (; k < 10; k ++) { + StrBuf->Printf(&buf, " AND currencyId%d='0' and currencyAmount%d='0' and currencyRefine%d='0'", + k + 1, k + 1, k + 1); + } + StrBuf->AppendStr(&buf, " LIMIT 1"); + + if (SQL_ERROR == SQL->QueryStr(map->mysql_handle, StrBuf->Value(&buf))) { + Sql_ShowDebug(map->mysql_handle); + } + StrBuf->Destroy(&buf); + } +} + + +/** + * Removes persistent NPC Expanded Barter Data from SQL + **/ +static void npc_expanded_barter_delfromsql(struct npc_data *nd, int index) +{ + nullpo_retv(nd); + if (index == INT_MAX) { + npc->expanded_barter_delfromsql_sub(nd->exname, INT_MAX, 0, 0, NULL); + } else { + Assert_retv(index >= 0 && index < nd->u.scr.shop->items); + const struct npc_item_list *const item = &nd->u.scr.shop->item[index]; + npc->expanded_barter_delfromsql_sub(nd->exname, item->nameid, item->value, item->value2, &item->currency[0]); + } +} + /** * Judges whether to allow and spawn a trader's window. **/ @@ -1788,6 +1981,9 @@ static bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) case NST_BARTER: clif->npc_barter_open(sd, nd); break; + case NST_EXPANDED_BARTER: + clif->npc_expanded_barter_open(sd, nd); + break; default: clif->cashshop_show(sd,nd); break; @@ -1914,7 +2110,11 @@ static int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, return ERROR_TYPE_ITEM_ID; // Invalid Item if( nd->subtype != CASHSHOP ) { - if (nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type != NST_ZENY && nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) { + if (nd->subtype == SCRIPT && nd->u.scr.shop && + nd->u.scr.shop->type != NST_ZENY && + nd->u.scr.shop->type != NST_MARKET && + nd->u.scr.shop->type != NST_BARTER && + nd->u.scr.shop->type != NST_EXPANDED_BARTER) { shop = nd->u.scr.shop->item; shop_size = nd->u.scr.shop->items; } else { @@ -2262,6 +2462,9 @@ static int npc_barter_buylist(struct map_session_data *sd, struct barteritemlist if (n < 0 || n >= sd->status.inventorySize) return 11; // wrong inventory index + if (entry->addAmount <= 0) + return 14; // not enough item amount in inventory + int removeId = sd->status.inventory[n].nameid; const int j = entry->shopIndex; if (j < 0 || j >= shop_size) @@ -2355,6 +2558,152 @@ static int npc_barter_buylist(struct map_session_data *sd, struct barteritemlist return 12; } + +/** + * Processes incoming npc expanded barter purchase list + **/ +static int npc_expanded_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) +{ + nullpo_retr(1, sd); + nullpo_retr(1, item_list); + + struct npc_data* nd = npc->checknear(sd, map->id2bl(sd->npc_shopid)); + + if (nd == NULL || nd->subtype != SCRIPT || VECTOR_LENGTH(*item_list) == 0 || + !nd->u.scr.shop || nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + return 11; + } + + struct npc_item_list *shop = nd->u.scr.shop->item; + unsigned short shop_size = nd->u.scr.shop->items; + int w = 0; + int new_ = 0; + int64 z = 0; + int items[MAX_INVENTORY] = { 0 }; + + // process entries in buy list, one by one + for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) { + struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); + + if (entry->addAmount <= 0) + return 14; // not enough item amount in inventory + + const int j = entry->shopIndex; + if (j < 0 || j >= shop_size) + return 13; // no such item in shop + if (entry->addId != shop[j].nameid && entry->addId != itemdb_viewid(shop[j].nameid)) + return 13; // no such item in shop + entry->addId = shop[j].nameid; // item_avail replacement + if (!itemdb->exists(entry->addId)) + return 13; // item no longer in itemdb + + if ((int)shop[j].qty != -1 && entry->addAmount > (int)shop[j].qty) + return 14; // not enough item amount in shop + + int currencyCount = shop[j].value2; + for (int currencyIndex = 0; currencyIndex < currencyCount; currencyIndex ++) { + struct npc_barter_currency *currency = &shop[j].currency[currencyIndex]; + const int currencyItemId = currency->nameid; + const int currencyRefine = currency->refine; + int removeAmount = currency->amount * entry->addAmount; + if (removeAmount <= 0) + continue; + for (int n = 0; n < sd->status.inventorySize && removeAmount > 0; ++n) { + // check item id and existing amount + if (sd->status.inventory[n].nameid == currencyItemId && sd->status.inventory[n].amount > 0) { + // check item refine level + if (currencyRefine != -1 && sd->status.inventory[n].refine != currencyRefine) + continue; + if (sd->status.inventory[n].amount >= removeAmount) { + items[n] += removeAmount; + removeAmount = 0; + w -= itemdb_weight(currencyItemId) * removeAmount; + break; + } else { + items[n] += sd->status.inventory[n].amount; + removeAmount -= sd->status.inventory[n].amount; + w -= itemdb_weight(currencyItemId) * sd->status.inventory[n].amount; + } + } + if (items[n] > sd->status.inventory[n].amount) + return 14; // not enough item amount in inventory + } + if (removeAmount != 0) { + return 14; // not enough item amount in inventory + } + } + + entry->addId = shop[j].nameid; //item_avail replacement + + npc_market_qty[i] = j; + + if (!itemdb->isstackable(entry->addId) && entry->addAmount > 1) { + //Exploit? You can't buy more than 1 of equipment types o.O + ShowWarning("Player %s (%d:%d) sent a hexed packet trying to buy %d of non-stackable item %d!\n", + sd->status.name, sd->status.account_id, sd->status.char_id, entry->addAmount, entry->addId); + entry->addAmount = 1; + } + + switch (pc->checkadditem(sd, entry->addId, entry->addAmount)) { + case ADDITEM_EXIST: + break; + case ADDITEM_NEW: + new_++; + break; + case ADDITEM_OVERAMOUNT: /* TODO find official response for this */ + return 1; + } + + z += (int64)shop[j].value * entry->addAmount; + w += itemdb_weight(entry->addId) * entry->addAmount; + } + + if (z > sd->status.zeny) + return 3; // Not enough Zeny + + if ((int64)w + sd->weight > sd->max_weight) + return 2; // Too heavy + + if (pc->inventoryblank(sd) < new_) + return 3; // Not enough space to store items + + for (int i = 0; i < sd->status.inventorySize; ++i) { + const int removeAmountTotal = items[i]; + if (removeAmountTotal == 0) + continue; + if (pc->delitem(sd, i, removeAmountTotal, 0, DELITEM_SOLD, LOG_TYPE_NPC) != 0) { + return 11; // unknown exploit + } + } + + pc->payzeny(sd, (int)z, LOG_TYPE_NPC, NULL); + + for (int i = 0; i < VECTOR_LENGTH(*item_list); ++i) { + struct barter_itemlist_entry *entry = &VECTOR_INDEX(*item_list, i); + const int shopIdx = npc_market_qty[i]; + + if ((int)shop[shopIdx].qty != -1) { + if (entry->addAmount > (int)shop[shopIdx].qty) /* wohoo someone tampered with the packet. */ + return 14; + shop[shopIdx].qty -= entry->addAmount; + } + + npc->expanded_barter_tosql(nd, shopIdx); + + if (itemdb_type(entry->addId) == IT_PETEGG) { + pet->create_egg(sd, entry->addId); + } else { + struct item item_tmp; + memset(&item_tmp, 0, sizeof(item_tmp)); + item_tmp.nameid = entry->addId; + item_tmp.identify = 1; + pc->additem(sd, &item_tmp, entry->addAmount, LOG_TYPE_NPC); + } + } + + return 12; +} + /// npc_selllist for script-controlled shops static int npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { @@ -2601,121 +2950,193 @@ static int npc_unload_ev_label(union DBKey key, struct DBData *data, va_list ap) return 0; } -//Chk if npc matches src_id, then unload. -//Sub-function used to find duplicates. +/** + * Unloads a NPC if it's a duplicate of the passed one. + * + * @param nd The NPC to check. + * @param args List of arguments. + * @return Always 0. + * + **/ static int npc_unload_dup_sub(struct npc_data *nd, va_list args) { - int src_id; - nullpo_ret(nd); - src_id = va_arg(args, int); + + const int src_id = va_arg(args, int); + const int unload_mobs = va_arg(args, int); + if (nd->src_id == src_id) - npc->unload(nd, true); + npc->unload(nd, true, (unload_mobs == 1)); + return 0; } -//Removes all npcs that are duplicates of the passed one. [Skotlex] -static void npc_unload_duplicates(struct npc_data *nd) +/** + * Unloads all NPCs which are duplicates of the passed one. + * + * @param nd The source NPC. + * @param unload_mobs If true, mobs spawned by duplicates will be removed. + * + * @author Skotlex + * + **/ +static void npc_unload_duplicates(struct npc_data *nd, bool unload_mobs) { nullpo_retv(nd); - map->foreachnpc(npc->unload_dup_sub,nd->bl.id); + + map->foreachnpc(npc->unload_dup_sub, nd->bl.id, unload_mobs); } -//Removes an npc from map and db. -//Single is to free name (for duplicates). -static int npc_unload(struct npc_data *nd, bool single) +/** + * Removes a mob, which was spawned by a NPC (monster/areamonster/guardian/bg_monster/atcommand("@monster xy")). + * + * @param md The mob to remove. + * @param args List of arguments. + * @return 1 on success, 0 on failure. + * + * @author Kenpachi + * + **/ +static int npc_unload_mob(struct mob_data *md, va_list args) +{ + nullpo_ret(md); + + const int npc_id = va_arg(args, int); + + if (md->npc_id == npc_id) { + md->state.npc_killmonster = 1; + status_kill(&md->bl); + return 1; + } + + return 0; +} + +/** + * Removes a NPC from map and database. + * + * @param nd The NPC which should be removed. + * @param single If true, names are freed. (For duplicates.) + * @param unload_mobs If true, mobs spawned by the NPC will be removed. + * @return Always 0. + * + **/ +static int npc_unload(struct npc_data *nd, bool single, bool unload_mobs) { nullpo_ret(nd); - if( nd->ud && nd->ud != &npc->base_ud ) { + if (nd->ud != NULL && nd->ud != &npc->base_ud) skill->clear_unitgroup(&nd->bl); - } npc->remove_map(nd); map->deliddb(&nd->bl); - if( single ) + + if (single) strdb_remove(npc->name_db, nd->exname); - if (nd->chat_id) // remove npc chatroom object and kick users + if (nd->chat_id != 0) /// Remove NPC chatroom object and kick users. chat->delete_npc_chat(nd); - npc_chat->finalize(nd); // deallocate npc PCRE data structures + npc_chat->finalize(nd); /// Deallocate NPC PCRE data structures. if (single && nd->path != NULL) { npc->releasepathreference(nd->path); nd->path = NULL; } - if (single && nd->bl.m != -1) + if (single && nd->bl.m != INDEX_NOT_FOUND) map->remove_questinfo(nd->bl.m, nd); + npc->questinfo_clear(nd); - if (nd->src_id == 0 && ( nd->subtype == SHOP || nd->subtype == CASHSHOP)) { - //src check for duplicate shops [Orcao] - aFree(nd->u.shop.shop_item); + if (nd->src_id == 0 && (nd->subtype == SHOP || nd->subtype == CASHSHOP)) { + aFree(nd->u.shop.shop_item); /// src check for duplicate shops. [Orcao] } else if (nd->subtype == SCRIPT) { - struct s_mapiterator *iter; - struct map_session_data *sd = NULL; + char evname[EVENT_NAME_LENGTH]; + + snprintf(evname, ARRAYLENGTH(evname), "%s::OnNPCUnload", nd->exname); + + struct event_data *ev = strdb_get(npc->ev_db, evname); + + if (ev != NULL) + script->run_npc(nd->u.scr.script, ev->pos, 0, nd->bl.id); /// Run OnNPCUnload. - if( single ) { - npc->ev_db->foreach(npc->ev_db,npc->unload_ev,nd->exname); //Clean up all events related - npc->ev_label_db->foreach(npc->ev_label_db,npc->unload_ev_label,nd); + if (single) { + npc->ev_db->foreach(npc->ev_db, npc->unload_ev, nd->exname); /// Clean up all related events. + npc->ev_label_db->foreach(npc->ev_label_db, npc->unload_ev_label, nd); } - iter = mapit_geteachpc(); - for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { - if (sd->npc_timer_id != INVALID_TIMER ) { + struct s_mapiterator *iter = mapit_geteachpc(); + struct map_session_data *sd = BL_UCAST(BL_PC, mapit->first(iter)); + + for (; mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { + if (sd->npc_timer_id != INVALID_TIMER) { const struct TimerData *td = timer->get(sd->npc_timer_id); - if( td && td->id != nd->bl.id ) + if (td != NULL && td->id != nd->bl.id) continue; - if( td && td->data ) + if (td != NULL && td->data != 0) ers_free(npc->timer_event_ers, (void*)td->data); + timer->delete(sd->npc_timer_id, npc->timerevent); sd->npc_timer_id = INVALID_TIMER; } } + mapit->free(iter); if (nd->u.scr.timerid != INVALID_TIMER) { - const struct TimerData *td; - td = timer->get(nd->u.scr.timerid); - if (td && td->data) + const struct TimerData *td = timer->get(nd->u.scr.timerid); + + if (td != NULL && td->data != 0) ers_free(npc->timer_event_ers, (void*)td->data); + timer->delete(nd->u.scr.timerid, npc->timerevent); } - if (nd->u.scr.timer_event) + + if (nd->u.scr.timer_event != NULL) aFree(nd->u.scr.timer_event); + if (nd->src_id == 0) { - if(nd->u.scr.script) { + if (nd->u.scr.script != NULL) { script->free_code(nd->u.scr.script); nd->u.scr.script = NULL; } - if (nd->u.scr.label_list) { + + if (nd->u.scr.label_list != NULL) { aFree(nd->u.scr.label_list); nd->u.scr.label_list = NULL; nd->u.scr.label_list_num = 0; } - if(nd->u.scr.shop) { - if(nd->u.scr.shop->item) + + if (nd->u.scr.shop != NULL) { + if (nd->u.scr.shop->item != NULL) { + for (int i = 0; i < nd->u.scr.shop->items; i ++) { + if (nd->u.scr.shop->item[i].currency != NULL) + aFree(nd->u.scr.shop->item[i].currency); + } aFree(nd->u.scr.shop->item); + } + aFree(nd->u.scr.shop); } } - if( nd->u.scr.guild_id ) + + if (nd->u.scr.guild_id > 0) guild->flag_remove(nd); } - if( nd->ud && nd->ud != &npc->base_ud ) { + if (nd->ud != NULL && nd->ud != &npc->base_ud) { aFree(nd->ud); nd->ud = NULL; } - HPM->data_store_destroy(&nd->hdata); + if (unload_mobs) + map->foreachmob(npc->unload_mob, nd->bl.id); + HPM->data_store_destroy(&nd->hdata); aFree(nd); - return 0; } @@ -2970,7 +3391,7 @@ static bool npc_viewisid(const char *viewid) * @param class_ The NPC view class. * @return A pointer to the created NPC data (ownership passed to the caller). */ -static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) +static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_) { struct npc_data *nd; @@ -4092,18 +4513,23 @@ static const char *npc_parse_function(const char *w1, const char *w2, const char return end; } -/*========================================== - * Parse Mob 1 - Parse mob list into each map - * Parse Mob 2 - Actually Spawns Mob - * [Wizputer] - *------------------------------------------*/ +/** + * Spawns a mob by using the passed spawn data. (Permanent mob spawns.) + * npc_parse_mob() - Parses mob list into each map. + * npc_parse_mob2() - Actually spawns mob. + * + * @param mobspawn The mobs spawn data. + * + * @author Wizputer + * + **/ static void npc_parse_mob2(struct spawn_data *mobspawn) { - int i; - nullpo_retv(mobspawn); - for( i = mobspawn->active; i < mobspawn->num; ++i ) { - struct mob_data* md = mob->spawn_dataset(mobspawn); + + for (int i = mobspawn->active; i < mobspawn->num; ++i) { + struct mob_data *md = mob->spawn_dataset(mobspawn, 0); + md->spawn = mobspawn; md->spawn->active++; mob->spawn(md); @@ -5160,128 +5586,143 @@ static void npc_process_files(int npc_min) npc->npc_id - npc_min, npc->npc_warp, npc->npc_shop, npc->npc_script, npc->npc_mob, npc->npc_cache_mob, npc->npc_delay_mob); } -//Clear then reload npcs files +/** + * Clears and then reloads all NPC files. + * + * @return Always 0. + * + **/ static int npc_reload(void) { - int npc_new_min = npc->npc_id; - struct s_mapiterator* iter; - struct block_list* bl; - - if (map->retval == EXIT_FAILURE) - map->retval = EXIT_SUCCESS; // Clear return status in case something failed before. - - /* clear guild flag cache */ - guild->flags_clear(); + if (map->retval == EXIT_FAILURE) /// Clear return status in case something failed before. + map->retval = EXIT_SUCCESS; + guild->flags_clear(); /// Clear guild flag cache. npc->path_db->clear(npc->path_db, npc->path_db_clear_sub); - db_clear(npc->name_db); db_clear(npc->ev_db); npc->ev_label_db->clear(npc->ev_label_db, npc->ev_label_db_clear_sub); - npc->npc_last_npd = NULL; npc->npc_last_path = NULL; npc->npc_last_ref = NULL; + + const int npc_new_min = npc->npc_id; + struct s_mapiterator *iter = mapit_geteachiddb(); - //Remove all npcs/mobs. [Skotlex] - iter = mapit_geteachiddb(); - for (bl = mapit->first(iter); mapit->exists(iter); bl = mapit->next(iter)) { - switch(bl->type) { - case BL_NPC: - if( bl->id != npc->fake_nd->bl.id )// don't remove fake_nd - npc->unload(BL_UCAST(BL_NPC, bl), false); - break; - case BL_MOB: - unit->free(bl,CLR_OUTSIGHT); - break; + /** Remove all NPCs/mobs. [Skotlex] **/ + for (struct block_list *bl = mapit->first(iter); mapit->exists(iter); bl = mapit->next(iter)) { + switch (bl->type) { + case BL_NPC: + if (bl->id != npc->fake_nd->bl.id) /// Don't remove fake_nd. + npc->unload(BL_UCAST(BL_NPC, bl), false, false); + + break; + case BL_MOB: + unit->free(bl, CLR_OUTSIGHT); + break; + default: + break; } } + mapit->free(iter); - if(battle_config.dynamic_mobs) {// dynamic check by [random] - int16 m; - for (m = 0; m < map->count; m++) { - int16 i; - for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) { + if (battle_config.dynamic_mobs) { /// Dynamic check. [random] + for (int m = 0; m < map->count; m++) { + for (int i = 0; i < MAX_MOB_LIST_PER_MAP; i++) { if (map->list[m].moblist[i] != NULL) { aFree(map->list[m].moblist[i]); map->list[m].moblist[i] = NULL; } - if( map->list[m].mob_delete_timer != INVALID_TIMER ) - { // Mobs were removed anyway,so delete the timer [Inkfish] + + if (map->list[m].mob_delete_timer != INVALID_TIMER) { /// Mobs were removed anyway, so delete the timer. [Inkfish] timer->delete(map->list[m].mob_delete_timer, map->removemobs_timer); map->list[m].mob_delete_timer = INVALID_TIMER; } } + if (map->list[m].npc_num > 0) - ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map->list[m].npc_num, map->list[m].name); + ShowWarning("npc_reload: %d NPCs weren't removed from map %s!\n", + map->list[m].npc_num, map->list[m].name); } } - // clear mob spawn lookup index mob->clear_spawninfo(); - - npc->npc_warp = npc->npc_shop = npc->npc_script = 0; - npc->npc_mob = npc->npc_cache_mob = npc->npc_delay_mob = 0; - - // reset mapflags + npc->npc_warp = 0; + npc->npc_shop = 0; + npc->npc_script = 0; + npc->npc_mob = 0; + npc->npc_cache_mob = 0; + npc->npc_delay_mob = 0; map->zone_reload(); map->flags_init(); - - // Reprocess npc files and reload constants itemdb->name_constants(); clan->set_constants(); - npc_process_files( npc_new_min ); - + npc_process_files(npc_new_min); instance->reload(); - map->zone_init(); - - npc->motd = npc->name2id("HerculesMOTD"); /* [Ind/Hercules] */ - - //Re-read the NPC Script Events cache. + npc->motd = npc->name2id("HerculesMOTD"); /// [Ind/Hercules] npc->read_event_script(); - // Execute main initialisation events - // The correct initialisation order is: - // OnInit -> OnInterIfInit -> OnInterIfInitOnce -> OnAgitInit -> OnAgitInit2 - npc->event_do_oninit( true ); + /** + * Execute main initialization events + * The correct initialization order is: + * OnInit -> OnInterIfInit -> OnInterIfInitOnce -> OnAgitInit -> OnAgitInit2 + * + **/ + npc->event_do_oninit(true); + npc->market_fromsql(); npc->barter_fromsql(); - // Execute rest of the startup events if connected to char-server. [Lance] - // Executed when connection is established with char-server in chrif_connectack - if( !intif->CheckForCharServer() ) { - ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInit")); - ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc->event_doall("OnInterIfInitOnce")); - } - // Refresh guild castle flags on both woe setups - // These events are only executed after receiving castle information from char-server + npc->expanded_barter_fromsql(); + + /* + * Execute rest of the startup events if connected to char-server. [Lance] + * Executed when connection is established with char-server in chrif_connectack(). + */ + if (intif->CheckForCharServer() == 0) { + ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", + npc->event_doall("OnInterIfInit")); + ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", + npc->event_doall("OnInterIfInitOnce")); + } + + /* + * Refresh guild castle flags on both WoE setups. + * These events are only executed after receiving castle information from char-server. + */ npc->event_doall("OnAgitInit"); npc->event_doall("OnAgitInit2"); return 0; } -//Unload all npc in the given file -static bool npc_unloadfile(const char *filepath) +/** + * Unloads all NPCs in the given file. + * + * @param filepath Path to the file which should be unloaded. + * @param unload_mobs If true, mobs spawned by NPCs in the file will be removed. + * @return true if at least one NPC was unloaded, otherwise false. + * + **/ +static bool npc_unloadfile(const char *filepath, bool unload_mobs) { + nullpo_retr(false, filepath); + struct DBIterator *iter = db_iterator(npc->name_db); - struct npc_data* nd = NULL; bool found = false; - nullpo_retr(false, filepath); - - for( nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter) ) { - if( nd->path && strcasecmp(nd->path,filepath) == 0 ) { // FIXME: This can break in case-sensitive file systems + for (struct npc_data *nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter)) { + if (nd->path != NULL && strcasecmp(nd->path, filepath) == 0) { // FIXME: This can break in case-sensitive file systems. found = true; - npc->unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */ - npc->unload(nd, true); + npc->unload_duplicates(nd, unload_mobs); /// Unload any NPC which could duplicate this but be in a different file. + npc->unload(nd, true, unload_mobs); } } dbi_destroy(iter); - if( found ) /* refresh event cache */ + if (found) /// Refresh event cache. npc->read_event_script(); return found; @@ -5514,6 +5955,7 @@ void npc_defaults(void) npc->unload_ev_label = npc_unload_ev_label; npc->unload_dup_sub = npc_unload_dup_sub; npc->unload_duplicates = npc_unload_duplicates; + npc->unload_mob = npc_unload_mob; npc->unload = npc_unload; npc->clearsrcfile = npc_clearsrcfile; npc->addsrcfile = npc_addsrcfile; @@ -5567,6 +6009,7 @@ void npc_defaults(void) npc->trader_update = npc_trader_update; npc->market_buylist = npc_market_buylist; npc->barter_buylist = npc_barter_buylist; + npc->expanded_barter_buylist = npc_expanded_barter_buylist; npc->trader_open = npc_trader_open; npc->market_fromsql = npc_market_fromsql; npc->market_tosql = npc_market_tosql; @@ -5576,6 +6019,10 @@ void npc_defaults(void) npc->barter_tosql = npc_barter_tosql; npc->barter_delfromsql = npc_barter_delfromsql; npc->barter_delfromsql_sub = npc_barter_delfromsql_sub; + npc->expanded_barter_fromsql = npc_expanded_barter_fromsql; + npc->expanded_barter_tosql = npc_expanded_barter_tosql; + npc->expanded_barter_delfromsql = npc_expanded_barter_delfromsql; + npc->expanded_barter_delfromsql_sub = npc_expanded_barter_delfromsql_sub; npc->db_checkid = npc_db_checkid; npc->refresh = npc_refresh; npc->questinfo_clear = npc_questinfo_clear; diff --git a/src/map/npc.h b/src/map/npc.h index c5f44f0e0..1585a2bc8 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -48,6 +48,7 @@ enum npc_shop_types { NST_MARKET, /* official npc market type */ NST_CUSTOM, NST_BARTER, /* official npc barter type */ + NST_EXPANDED_BARTER, /* official npc expanded barter type */ /* */ NST_MAX, }; @@ -60,17 +61,25 @@ struct npc_label_list { int pos; }; +struct npc_barter_currency { + int nameid; + int refine; + int amount; +}; + struct npc_item_list { int nameid; unsigned int value; // price or barter currency item id - int value2; // barter currency item amount - unsigned int qty; + int value2; // barter currency item amount / expanded barter currency size + int qty; + struct npc_barter_currency *currency; }; struct npc_shop_data { unsigned char type;/* what am i */ struct npc_item_list *item;/* list */ unsigned int items;/* total */ + int shop_last_index; // only for NST_EXPANDED_BARTER }; struct npc_parse; struct npc_data { @@ -86,7 +95,7 @@ struct npc_data { int chat_id; int touching_id; int64 next_walktime; - uint8 dir; + enum unit_dir dir; uint8 area_size; int clan_id; @@ -261,8 +270,9 @@ struct npc_interface { int (*unload_ev) (union DBKey key, struct DBData *data, va_list ap); int (*unload_ev_label) (union DBKey key, struct DBData *data, va_list ap); int (*unload_dup_sub) (struct npc_data *nd, va_list args); - void (*unload_duplicates) (struct npc_data *nd); - int (*unload) (struct npc_data *nd, bool single); + void (*unload_duplicates) (struct npc_data *nd, bool unload_mobs); + int (*unload_mob) (struct mob_data *md, va_list args); + int (*unload) (struct npc_data *nd, bool single, bool unload_mobs); void (*clearsrcfile) (void); void (*addsrcfile) (const char *name); void (*delsrcfile) (const char *name); @@ -271,7 +281,7 @@ struct npc_interface { void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath); bool (*viewisid) (const char *viewid); - struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); + struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_); struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); const char *(*parse_warp) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); @@ -304,7 +314,7 @@ struct npc_interface { int (*path_db_clear_sub) (union DBKey key, struct DBData *data, va_list args); int (*ev_label_db_clear_sub) (union DBKey key, struct DBData *data, va_list args); int (*reload) (void); - bool (*unloadfile) (const char *filepath); + bool (*unloadfile) (const char *filepath, bool unload_mobs); void (*do_clear_npc) (void); void (*debug_warps_sub) (struct npc_data *nd); void (*debug_warps) (void); @@ -314,6 +324,7 @@ struct npc_interface { void (*trader_update) (int master); enum market_buy_result (*market_buylist) (struct map_session_data *sd, struct itemlist *item_list); int (*barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list); + int (*expanded_barter_buylist) (struct map_session_data *sd, struct barteritemlist *item_list); bool (*trader_open) (struct map_session_data *sd, struct npc_data *nd); void (*market_fromsql) (void); void (*market_tosql) (struct npc_data *nd, int index); @@ -323,6 +334,10 @@ struct npc_interface { void (*barter_tosql) (struct npc_data *nd, int index); void (*barter_delfromsql) (struct npc_data *nd, int index); void (*barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2); + void (*expanded_barter_fromsql) (void); + void (*expanded_barter_tosql) (struct npc_data *nd, int index); + void (*expanded_barter_delfromsql) (struct npc_data *nd, int index); + void (*expanded_barter_delfromsql_sub) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency* currency); bool (*db_checkid) (const int id); void (*refresh) (struct npc_data* nd); void (*questinfo_clear) (struct npc_data *nd); diff --git a/src/map/packets.h b/src/map/packets.h index 90b9beeb7..1e6dc71bc 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -1983,6 +1983,11 @@ packet(0x96e,clif->ackmergeitems); packet(0x0b4c,clif->pCashShopLimitedReq); #endif +#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828 + packet(0x0b57,clif->pNPCExpandedBarterPurchase); + packet(0x0b58,clif->pNPCExpandedBarterClosed); +#endif + #if PACKETVER >= 20191224 packet(0x0b6d,clif->pCashShopOpen2); #endif diff --git a/src/map/packets_keys_main.h b/src/map/packets_keys_main.h index 1d5f96ee9..5fddf9eaf 100644 --- a/src/map/packets_keys_main.h +++ b/src/map/packets_keys_main.h @@ -37,7 +37,7 @@ packetKeys(0x49357d72,0x22c370a1,0x5f836591); #endif -// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE, 2019-12-18bRagexe, 2019-12-18bRagexeRE, 2019-12-24aRagexe, 2019-12-24aRagexeRE, 2019-12-24bRagexe, 2019-12-24bRagexeRE, 2020-01-08aRagexe, 2020-01-08bRagexeRE +// 2010-11-23aRagexeRE, 2010-11-24aRagexeRE, 2010-11-24bRagexeRE, 2010-11-25aRagexeRE, 2010-11-26aRagexeRE, 2010-11-30aRagexeRE, 2010-12-07aRagexeRE, 2010-12-14aRagexeRE, 2010-12-21aRagexeRE, 2010-12-23aRagexeRE, 2010-12-28aRagexeRE, 2011-01-04aRagexeRE, 2011-01-05aRagexeRE, 2011-01-11aRagexeRE, 2011-01-18aRagexeRE, 2011-01-25aRagexeRE, 2011-01-26aRagexeRE, 2011-01-26bRagexeRE, 2011-01-31aRagexeRE, 2011-01-31bRagexeRE, 2011-01-31cRagexeRE, 2011-02-08aRagexeRE, 2011-02-15aRagexeRE, 2011-02-22aRagexeRE, 2011-02-23aRagexeRE, 2011-02-23bRagexeRE, 2011-02-24aRagexeRE, 2011-02-25aRagexeRE, 2011-02-28aRagexeRE, 2011-03-08aRagexeRE, 2011-03-09aRagexeRE, 2011-03-09bRagexeRE, 2011-03-09cRagexeRE, 2011-03-09dRagexeRE, 2011-03-15aRagexeRE, 2011-03-22aRagexeRE, 2011-03-29aRagexeRE, 2011-03-30aRagexeRE, 2011-03-30cRagexeRE, 2011-04-05aRagexeRE, 2011-04-12aRagexeRE, 2011-04-19aRagexeRE, 2011-04-20aRagexeRE, 2011-04-26aRagexeRE, 2011-04-27aRagexeRE, 2011-05-03aRagexeRE, 2011-05-11aRagexeRE, 2011-05-17bRagexeRE, 2011-05-24aRagexeRE, 2011-05-26aRagexeRE, 2011-05-31aRagexeRE, 2011-06-07aRagexeRE, 2011-06-08aRagexeRE, 2011-06-08bRagexeRE, 2011-06-08cRagexeRE, 2011-06-09aRagexeRE, 2011-06-14bRagexeRE, 2011-06-22aRagexeRE, 2011-06-28aRagexeRE, 2011-07-06aRagexeRE, 2011-07-13aRagexeRE, 2011-07-13bRagexeRE, 2011-07-13cRagexeRE, 2011-07-19aRagexeRE, 2011-07-26aRagexeRE, 2011-08-03aRagexeRE, 2011-08-03bRagexeRE, 2011-08-10aRagexeRE, 2013-12-23aRagexeRE, 2014-05-08aRagexe, 2014-05-08aRagexeRE, 2014-06-11eRagexe, 2015-02-25hRagexe, 2018-03-15aRagexe, 2018-03-21aRagexe, 2018-03-21aRagexeRE, 2018-03-28bRagexe, 2018-03-28bRagexeRE, 2018-04-04bRagexe, 2018-04-04cRagexeRE, 2018-04-18aRagexe, 2018-04-18bRagexeRE, 2018-04-25cRagexe, 2018-04-25cRagexeRE, 2018-05-02bRagexe, 2018-05-02bRagexeRE, 2018-05-02dRagexeRE, 2018-05-09aRagexe, 2018-05-16cRagexe, 2018-05-16cRagexeRE, 2018-05-23aRagexe, 2018-05-23aRagexeRE, 2018-05-30aRagexe, 2018-05-30bRagexeRE, 2018-05-30cRagexeRE, 2018-06-05bRagexe, 2018-06-05bRagexeRE, 2018-06-12aRagexeRE, 2018-06-12bRagexeRE, 2018-06-20cRagexe, 2018-06-20dRagexeRE, 2018-06-20eRagexe, 2018-06-20eRagexeRE, 2018-06-21aRagexe, 2018-06-21aRagexeRE, 2018-07-04aRagexe, 2018-07-04aRagexeRE, 2018-07-11aRagexeRE, 2018-07-18bRagexe, 2018-07-18bRagexeRE, 2018-07-18bRagexeRE1, 2018-07-18cRagexe, 2018-07-18cRagexeRE, 2018-08-01cRagexe, 2018-08-01cRagexeRE, 2018-08-08bRagexe, 2018-08-08bRagexeRE, 2018-08-22cRagexe, 2018-08-22cRagexeRE, 2018-08-29aRagexe, 2018-08-29aRagexeRE, 2018-08-29bRagexeRE, 2018-08-31aRagexe, 2018-09-12dRagexe, 2018-09-12dRagexeRE, 2018-09-19aRagexe, 2018-09-19aRagexeRE, 2018-10-02aRagexe, 2018-10-02aRagexeRE, 2018-10-02bRagexe, 2018-10-02bRagexeRE, 2018-10-17_02aRagexe, 2018-10-17_02aRagexeRE, 2018-10-17_03aRagexe, 2018-10-17_03aRagexeRE, 2018-10-17bRagexe, 2018-10-17bRagexeRE, 2018-10-24bRagexe, 2018-10-31aRagexe, 2018-10-31bRagexe, 2018-10-31cRagexeRE, 2018-11-07aRagexe, 2018-11-07aRagexeRE, 2018-11-14cRagexe, 2018-11-14cRagexeRE, 2018-11-14dRagexe, 2018-11-14dRagexeRE, 2018-11-21bRagexe, 2018-11-21cRagexeRE, 2018-11-28aRagexe, 2018-11-28aRagexeRE, 2018-11-28bRagexe, 2018-11-28cRagexe, 2018-12-05aRagexe, 2018-12-05bRagexeRE, 2018-12-12aRagexe, 2018-12-12aRagexeRE, 2018-12-12bRagexe, 2018-12-12bRagexeRE, 2018-12-19bRagexe, 2018-12-19bRagexeRE, 2018-12-26aRagexe, 2018-12-26aRagexeRE, 2019-01-09aRagexe, 2019-01-09bRagexeRE, 2019-01-16bRagexe, 2019-01-16bRagexeRE, 2019-01-16cRagexe, 2019-01-16cRagexeRE, 2019-01-23dRagexe, 2019-01-23dRagexeRE, 2019-02-13IRagexeRE, 2019-02-13bRagexe, 2019-02-13eRagexe, 2019-02-20aRagexeRE, 2019-02-27aRagexe, 2019-02-27bRagexeRE, 2019-02-28aRagexe, 2019-02-28aRagexeRE, 2019-03-06bRagexe, 2019-03-06bRagexeRE, 2019-03-06cRagexe, 2019-03-06cRagexeRE, 2019-03-13aRagexe, 2019-03-20aRagexe, 2019-03-20aRagexeRE, 2019-03-22aRagexe, 2019-03-22aRagexeRE, 2019-03-27bRagexe, 2019-03-27bRagexeRE, 2019-04-03aRagexe, 2019-04-03bRagexeRE, 2019-04-03cRagexeRE, 2019-04-17aRagexe, 2019-04-17cRagexeRE, 2019-04-18aRagexe, 2019-04-18aRagexeRE, 2019-05-08cRagexe, 2019-05-08dRagexeRE, 2019-05-08eRagexeRE, 2019-05-22bRagexe, 2019-05-22bRagexeRE, 2019-05-22cRagexe, 2019-05-22cRagexeRE, 2019-05-23aRagexe, 2019-05-29aRagexe, 2019-05-29bRagexeRE, 2019-05-29cRagexe, 2019-05-29cRagexeRE, 2019-05-30aRagexe, 2019-05-30aRagexeRE, 2019-06-05JRagexeRE, 2019-06-05KRagexe, 2019-06-05LRagexeRE, 2019-06-05fRagexe, 2019-06-05hRagexeRE, 2019-06-19bRagexe, 2019-06-19cRagexeRE, 2019-06-19eRagexe, 2019-06-19hRagexe, 2019-06-26bRagexeRE, 2019-07-03aRagexe, 2019-07-03bRagexeRE, 2019-07-17aRagexe, 2019-07-17cRagexeRE, 2019-07-17dRagexe, 2019-07-17dRagexeRE, 2019-07-24aRagexe, 2019-07-24bRagexeRE, 2019-07-31bRagexe, 2019-07-31bRagexeRE, 2019-08-02aRagexe, 2019-08-02aRagexeRE, 2019-08-07aRagexe, 2019-08-07dRagexeRE, 2019-08-21aRagexe, 2019-08-21cRagexeRE, 2019-08-21dRagexeRE, 2019-08-28aRagexe, 2019-08-28aRagexeRE, 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-04bRagexeRE, 2019-09-18bRagexe, 2019-09-18cRagexeRE, 2019-09-25aRagexe, 2019-09-25aRagexeRE, 2019-09-25bRagexe, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexe, 2019-10-16fRagexeRE, 2019-10-16gRagexe, 2019-10-16gRagexeRE, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-06bRagexeRE, 2019-11-07aRagexe, 2019-11-07aRagexeRE, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-13eRagexeRE, 2019-11-20aRagexe, 2019-11-20cRagexeRE, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27aRagexeRE, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04aRagexeRE, 2019-12-04bRagexe, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11aRagexe, 2019-12-11fRagexeRE, 2019-12-18bRagexe, 2019-12-18bRagexeRE, 2019-12-24aRagexe, 2019-12-24aRagexeRE, 2019-12-24bRagexe, 2019-12-24bRagexeRE, 2020-01-08aRagexe, 2020-01-08bRagexeRE, 2020-01-22cRagexe, 2020-01-22cRagexeRE, 2020-01-29bRagexe, 2020-01-30aRagexe, 2020-02-05aRagexe, 2020-02-05aRagexeRE, 2020-02-06aRagexe, 2020-02-12aRagexe, 2020-02-12aRagexeRE, 2020-02-19dRagexe, 2020-02-19eRagexeRE, 2020-03-04aRagexe, 2020-03-04aRagexeRE #if PACKETVER == 20101123 || \ PACKETVER == 20101124 || \ PACKETVER == 20101125 || \ @@ -181,7 +181,15 @@ PACKETVER == 20191211 || \ PACKETVER == 20191218 || \ PACKETVER == 20191224 || \ - PACKETVER >= 20200108 + PACKETVER == 20200108 || \ + PACKETVER == 20200122 || \ + PACKETVER == 20200129 || \ + PACKETVER == 20200130 || \ + PACKETVER == 20200205 || \ + PACKETVER == 20200206 || \ + PACKETVER == 20200212 || \ + PACKETVER == 20200219 || \ + PACKETVER >= 20200304 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_keys_zero.h b/src/map/packets_keys_zero.h index d4c96beca..facf0e151 100644 --- a/src/map/packets_keys_zero.h +++ b/src/map/packets_keys_zero.h @@ -30,7 +30,7 @@ /* This file is autogenerated, please do not commit manual changes */ -// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero +// 2017-10-18aRagexe_zero, 2017-10-19aRagexe_zero, 2017-10-23aRagexe_zero, 2017-10-23bRagexe_zero, 2017-10-23cRagexe_zero, 2017-10-24aRagexe_2_zero, 2017-10-24aRagexe_zero, 2017-10-25bRagexe_zero, 2017-10-27aRagexe_zero, 2017-10-27bRagexe_zero, 2017-10-30aRagexe_zero, 2017-10-31aRagexe_zero, 2017-11-09aRagexe_zero, 2017-11-13aRagexe_zero, 2017-11-13bRagexe_zero, 2018-03-15aRagexe_zero, 2018-03-21aRagexe_zero, 2018-03-21bRagexe_zero, 2018-03-28_1aRagexe_zero, 2018-03-28cRagexe_zero, 2018-04-11aRagexe_zero, 2018-04-25_3aRagexe_zero, 2018-05-09_3aRagexe_zero, 2018-05-23aRagexe_zero, 2018-06-05bRagexe_zero, 2018-06-05cRagexe_zero, 2018-06-27aRagexe_zero, 2018-07-03aRagexe_zero, 2018-07-11_2aRagexe_zero, 2018-07-25_2aRagexe_zero, 2018-08-01aRagexe_zero, 2018-08-08_2aRagexe_zero, 2018-08-22aRagexe_zero, 2018-08-29aRagexe_zero, 2018-09-05aRagexe_zero, 2018-09-12aRagexe_zero, 2018-09-19aRagexe_zero, 2018-09-28aRagexe_zero, 2018-10-10_2aRagexe_zero, 2018-10-24_2aRagexe_zero, 2018-11-14aRagexe_zero, 2018-11-20aRagexe_zero, 2018-11-28aRagexe_zero, 2018-12-12aRagexe_zero, 2018-12-19aRagexe_zero, 2018-12-26_2aRagexe_zero, 2019-01-16_2aRagexe_zero, 2019-01-17_1aRagexe_zero, 2019-01-30_2aRagexe_zero, 2019-02-13aRagexe_zero, 2019-02-20aRagexe_zero, 2019-02-27aRagexe_zero, 2019-03-13aRagexe_zero, 2019-03-27_2aRagexe_zero, 2019-03-27_3aRagexe_zero, 2019-04-03aRagexe_zero, 2019-04-10bRagexe_zero, 2019-04-24aRagexe_zero, 2019-05-02aRagexe_zero, 2019-05-08_2aRagexe_zero, 2019-05-08aRagexe_zero, 2019-05-15aRagexe_zero, 2019-05-29aRagexe_zero, 2019-05-30aRagexe_zero, 2019-06-05_2aRagexe_zero, 2019-06-26_2aRagexe_zero, 2019-06-26_3aRagexe_zero, 2019-07-09aRagexe_zero, 2019-07-10_3aRagexe_zero, 2019-07-17aRagexe_zero, 2019-07-24aRagexe_zero, 2019-08-14_3aRagexe_zero, 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero, 2020-01-15_2aRagexe_zero, 2020-01-15aRagexe_zero, 2020-01-29_2aRagexe_zero, 2020-01-29aRagexe_zero, 2020-02-12aRagexe_zero, 2020-02-26aRagexe_zero, 2020-02-26bRagexe_zero, 2020-03-04aRagexe_zero #if PACKETVER == 20171018 || \ PACKETVER == 20171019 || \ PACKETVER == 20171023 || \ @@ -103,7 +103,12 @@ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ PACKETVER == 20191211 || \ - PACKETVER >= 20191224 + PACKETVER == 20191224 || \ + PACKETVER == 20200115 || \ + PACKETVER == 20200129 || \ + PACKETVER == 20200212 || \ + PACKETVER == 20200226 || \ + PACKETVER >= 20200304 packetKeys(0x00000000,0x00000000,0x00000000); #endif diff --git a/src/map/packets_shuffle_main.h b/src/map/packets_shuffle_main.h index 83a9107f2..25024c9f9 100644 --- a/src/map/packets_shuffle_main.h +++ b/src/map/packets_shuffle_main.h @@ -9794,7 +9794,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe, 2019-12-18bRagexe, 2019-12-24aRagexe, 2019-12-24bRagexe, 2020-01-08aRagexe +// 2019-09-04aRagexe, 2019-09-04bRagexe, 2019-09-18bRagexe, 2019-09-25aRagexe, 2019-09-25bRagexe, 2019-10-02cRagexe, 2019-10-02dRagexe, 2019-10-16fRagexe, 2019-10-16gRagexe, 2019-10-18aRagexe, 2019-10-23aRagexe, 2019-10-30cRagexe, 2019-11-06aRagexe, 2019-11-07aRagexe, 2019-11-13cRagexe, 2019-11-13eRagexe, 2019-11-20aRagexe, 2019-11-20dRagexe, 2019-11-27aRagexe, 2019-11-27bRagexe, 2019-12-04aRagexe, 2019-12-04bRagexe, 2019-12-11aRagexe, 2019-12-18bRagexe, 2019-12-24aRagexe, 2019-12-24bRagexe, 2020-01-08aRagexe, 2020-01-22cRagexe, 2020-01-29bRagexe, 2020-01-30aRagexe, 2020-02-05aRagexe, 2020-02-06aRagexe, 2020-02-12aRagexe, 2020-02-19dRagexe, 2020-03-04aRagexe #if PACKETVER == 20190904 || \ PACKETVER == 20190918 || \ PACKETVER == 20190925 || \ @@ -9812,7 +9812,15 @@ PACKETVER == 20191211 || \ PACKETVER == 20191218 || \ PACKETVER == 20191224 || \ - PACKETVER == 20200108 + PACKETVER == 20200108 || \ + PACKETVER == 20200122 || \ + PACKETVER == 20200129 || \ + PACKETVER == 20200130 || \ + PACKETVER == 20200205 || \ + PACKETVER == 20200206 || \ + PACKETVER == 20200212 || \ + PACKETVER == 20200219 || \ + PACKETVER == 20200304 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_shuffle_re.h b/src/map/packets_shuffle_re.h index 9c9df85ed..490d517fd 100644 --- a/src/map/packets_shuffle_re.h +++ b/src/map/packets_shuffle_re.h @@ -9744,7 +9744,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE, 2019-12-18bRagexeRE, 2019-12-24aRagexeRE, 2019-12-24bRagexeRE, 2020-01-08bRagexeRE +// 2019-09-04bRagexeRE, 2019-09-18cRagexeRE, 2019-09-25aRagexeRE, 2019-09-25bRagexeRE, 2019-10-02bRagexeRE, 2019-10-02dRagexeRE, 2019-10-02dRagexeRE_2, 2019-10-16fRagexeRE, 2019-10-16gRagexeRE, 2019-10-23aRagexeRE, 2019-10-30bRagexeRE, 2019-11-06bRagexeRE, 2019-11-07aRagexeRE, 2019-11-13eRagexeRE, 2019-11-20cRagexeRE, 2019-11-27aRagexeRE, 2019-12-04aRagexeRE, 2019-12-04bRagexeRE, 2019-12-04cRagexeRE, 2019-12-11fRagexeRE, 2019-12-18bRagexeRE, 2019-12-24aRagexeRE, 2019-12-24bRagexeRE, 2020-01-08bRagexeRE, 2020-01-22cRagexeRE, 2020-02-05aRagexeRE, 2020-02-12aRagexeRE, 2020-02-19eRagexeRE, 2020-03-04aRagexeRE #if PACKETVER == 20190904 || \ PACKETVER == 20190918 || \ PACKETVER == 20190925 || \ @@ -9761,7 +9761,12 @@ PACKETVER == 20191211 || \ PACKETVER == 20191218 || \ PACKETVER == 20191224 || \ - PACKETVER == 20200108 + PACKETVER == 20200108 || \ + PACKETVER == 20200122 || \ + PACKETVER == 20200205 || \ + PACKETVER == 20200212 || \ + PACKETVER == 20200219 || \ + PACKETVER == 20200304 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_shuffle_zero.h b/src/map/packets_shuffle_zero.h index 91b0c1e89..b7c26dbe7 100644 --- a/src/map/packets_shuffle_zero.h +++ b/src/map/packets_shuffle_zero.h @@ -803,7 +803,7 @@ packet(0x083c,clif->pSearchStoreInfoListItemClick,2,6,10); // CZ_SSILIST_ITEM_CLICK // 14 #endif -// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero +// 2019-08-28_2aRagexe_zero, 2019-08-28_3aRagexe_zero, 2019-09-11aRagexe_zero, 2019-09-18_2aRagexe_zero, 2019-09-18aRagexe_zero, 2019-09-25_3aRagexe_zero, 2019-09-25_5aRagexe_zero, 2019-10-08_2aRagexe_zero, 2019-10-23_2aRagexe_zero, 2019-11-06aRagexe_zero, 2019-11-13aRagexe_zero, 2019-11-27_2aRagexe_zero, 2019-11-27aRagexe_zero, 2019-12-04aRagexe_zero, 2019-12-11_2aRagexe_zero, 2019-12-24_4aRagexe_zero, 2019-12-24_5aRagexe_zero, 2020-01-15_2aRagexe_zero, 2020-01-15aRagexe_zero, 2020-01-29_2aRagexe_zero, 2020-01-29aRagexe_zero, 2020-02-12aRagexe_zero, 2020-02-26aRagexe_zero, 2020-02-26bRagexe_zero, 2020-03-04aRagexe_zero #if PACKETVER == 20190828 || \ PACKETVER == 20190911 || \ PACKETVER == 20190918 || \ @@ -815,7 +815,12 @@ PACKETVER == 20191127 || \ PACKETVER == 20191204 || \ PACKETVER == 20191211 || \ - PACKETVER == 20191224 + PACKETVER == 20191224 || \ + PACKETVER == 20200115 || \ + PACKETVER == 20200129 || \ + PACKETVER == 20200212 || \ + PACKETVER == 20200226 || \ + PACKETVER == 20200304 packet(0x0202,clif->pFriendsListAdd,2); // CZ_ADD_FRIENDS // 26 packet(0x022d,clif->pHomMenu,2,4); // CZ_COMMAND_MER // 5 packet(0x023b,clif->pStoragePassword,0); // CZ_ACK_STORE_PASSWORD // 36 diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 0fa602ba5..71f986a90 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3770,7 +3770,7 @@ struct PACKET_CZ_SE_CASHSHOP_LIMITED_REQ { DEFINE_PACKET_HEADER(CZ_SE_CASHSHOP_LIMITED_REQ, 0x0b4c); #endif -#if PACKETVER_ZERO_NUM >= 20191224 +#if PACKETVER_MAIN_NUM >= 20200129 || PACKETVER_RE_NUM >= 20200205 || PACKETVER_ZERO_NUM >= 20191224 struct PACKET_ZC_SE_CASHSHOP_OPEN { int16 packetType; uint32 cashPoints; @@ -3788,6 +3788,109 @@ struct PACKET_ZC_SE_CASHSHOP_OPEN { DEFINE_PACKET_HEADER(ZC_SE_CASHSHOP_OPEN, 0x0845); #endif +#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828 +struct PACKET_CZ_NPC_EXPANDED_BARTER_CLOSE { + int16 packetType; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_CLOSE, 0x0b58); +#endif + +#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 || PACKETVER_ZERO_NUM >= 20191127 +struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 { +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + uint32 nameid; +#else + uint16 nameid; +#endif + uint16 refine_level; + uint32 amount; + uint16 type; +} __attribute__((packed)); + +struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub { +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + uint32 nameid; +#else + uint16 nameid; +#endif + uint16 type; + uint32 amount; + uint32 weight; + uint32 index; + uint32 zeny; + uint32 currency_count; + // Workaround for fix Visual Studio bug (error C2233). Here should be currencies[] + struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2 currencies[1]; +} __attribute__((packed)); + +// Workaround check for Visual Studio bug (error C2233) +STATIC_ASSERT(sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2[1]) == + sizeof(struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub2), + "Wrong PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub size"); + +struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN { + int16 packetType; + int16 packetLength; + int32 items_count; + struct PACKET_ZC_NPC_EXPANDED_BARTER_OPEN_sub items[]; +} __attribute__((packed)); + +DEFINE_PACKET_HEADER(ZC_NPC_EXPANDED_BARTER_OPEN, 0x0b56); +#endif + +#if PACKETVER_MAIN_NUM >= 20190904 || PACKETVER_RE_NUM >= 20190904 || PACKETVER_ZERO_NUM >= 20190828 +struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub { +#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 + uint32 itemId; +#else + uint16 itemId; +#endif + uint32 shopIndex; + uint32 amount; +} __attribute__((packed)); + +struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE { + int16 packetType; + int16 packetLength; + struct PACKET_CZ_NPC_EXPANDED_BARTER_PURCHASE_sub list[]; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_NPC_EXPANDED_BARTER_PURCHASE, 0x0b57); +#endif + +#if PACKETVER >= 7 +struct PACKET_ZC_STATE_CHANGE { + int16 packetType; + uint32 AID; + int16 bodyState; + int16 healthState; + int32 effectState; + int8 isPKModeON; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0229); +#else +struct PACKET_ZC_STATE_CHANGE { + int16 PacketType; + uint32 AID; + int16 bodyState; + int16 healthState; + int16 effectState; + int8 isPKModeON; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0119); +#endif + +struct PACKET_ZC_AUTORUN_SKILL { + int16 packetType; + uint16 skill_id; + uint32 skill_type; + uint16 skill_lv; + uint16 skill_sp; + uint16 skill_range; + char skill_name[NAME_LENGTH]; + char up_flag; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_AUTORUN_SKILL, 0x0147); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris diff --git a/src/map/pc.c b/src/map/pc.c index c4f9d8be0..c96e957c7 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5257,6 +5257,14 @@ static int pc_useitem(struct map_session_data *sd, int n) #endif if( battle_config.item_restricted_consumption_type && sd->status.inventory[n].expire_time == 0 ) { clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true); + + // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, there is a chance to don't consume the scroll. [Kenpachi] + if ((nameid == ITEMID_EARTH_SCROLL_1_3 || nameid == ITEMID_EARTH_SCROLL_1_5) + && sd->sc.count > 0 && sd->sc.data[SC_EARTHSCROLL] != NULL + && rnd() % 100 > sd->sc.data[SC_EARTHSCROLL]->val2) { + return 0; + } + pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME); } return 0; @@ -5302,11 +5310,37 @@ static int pc_useitem(struct map_session_data *sd, int n) script->run_use_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id); script->potion_flag = 0; + // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, there is a chance to don't consume the scroll. [Kenpachi] + if ((nameid == ITEMID_EARTH_SCROLL_1_3 || nameid == ITEMID_EARTH_SCROLL_1_5) && sd->sc.count > 0 + && sd->sc.data[SC_EARTHSCROLL] != NULL && rnd() % 100 > sd->sc.data[SC_EARTHSCROLL]->val2) { + removeItem = false; + } + if (removeItem) pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME); return 1; } +/** + * Sets state flags and helper variables, used by itemskill() script command, to 0. + * + * @param sd The character's session data. + * @return 0 if parameter sd is NULL, otherwise 1. + */ +static int pc_itemskill_clear(struct map_session_data *sd) +{ + nullpo_ret(sd); + + sd->itemskill_id = 0; + sd->itemskill_lv = 0; + sd->state.itemskill_conditions_checked = 0; + sd->state.itemskill_no_conditions = 0; + sd->state.itemskill_no_casttime = 0; + sd->state.itemskill_castonself = 0; + + return 1; +} + /*========================================== * Add item on cart for given index. * Return: @@ -8417,8 +8451,12 @@ static int64 pc_readparam(const struct map_session_data *sd, int type) case SP_FLEE1: val = sd->battle_status.flee; break; case SP_FLEE2: val = sd->battle_status.flee2; break; case SP_DEFELE: val = sd->battle_status.def_ele; break; -#ifndef RENEWAL_CAST case SP_VARCASTRATE: +#ifdef RENEWAL_CAST + val = sd->bonus.varcastrate; + break; +#else + FALLTHROUGH #endif case SP_CASTRATE: val = sd->castrate; @@ -8504,7 +8542,6 @@ static int64 pc_readparam(const struct map_session_data *sd, int type) case SP_FIXCASTRATE: val = sd->bonus.fixcastrate; break; case SP_ADD_FIXEDCAST: val = sd->bonus.add_fixcast; break; #ifdef RENEWAL_CAST - case SP_VARCASTRATE: val = sd->bonus.varcastrate; break; case SP_ADD_VARIABLECAST:val = sd->bonus.add_varcast; break; #endif } @@ -9345,15 +9382,23 @@ static void pc_setridingpeco(struct map_session_data *sd, bool flag) * * @param sd Target player. * @param flag New state. + * @param mtype Type of the mado gear. **/ -static void pc_setmadogear(struct map_session_data *sd, bool flag) +static void pc_setmadogear(struct map_session_data *sd, bool flag, enum mado_type mtype) { nullpo_retv(sd); + Assert_retv(mtype >= MADO_ROBOT && mtype < MADO_MAX); + if (flag) { - if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) + if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { pc->setoption(sd, sd->sc.option|OPTION_MADOGEAR); +#if PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 + sc_start(&sd->bl, &sd->bl, SC_MADOGEAR, 100, (int)mtype, INFINITE_DURATION); +#endif + } } else if (pc_ismadogear(sd)) { pc->setoption(sd, sd->sc.option&~OPTION_MADOGEAR); + // pc->setoption resets status effects when changing mado, no need to re do it here. } } @@ -12637,6 +12682,7 @@ void pc_defaults(void) pc->unequipitem_pos = pc_unequipitem_pos; pc->checkitem = pc_checkitem; pc->useitem = pc_useitem; + pc->itemskill_clear = pc_itemskill_clear; pc->skillatk_bonus = pc_skillatk_bonus; pc->skillheal_bonus = pc_skillheal_bonus; diff --git a/src/map/pc.h b/src/map/pc.h index f4f0044a9..e940c3310 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -240,6 +240,10 @@ struct map_session_data { unsigned int refine_ui : 1; unsigned int npc_unloaded : 1; ///< The player is talking with an unloaded NPCs (respawned tombstones) unsigned int lapine_ui : 1; + unsigned int itemskill_conditions_checked : 1; // Used by itemskill() script command, to prevent second check of conditions after target was selected. + unsigned int itemskill_no_conditions : 1; // Used by itemskill() script command, to ignore skill conditions and don't consume them. + unsigned int itemskill_no_casttime : 1; // Used by itemskill() script command, to cast skill instantaneously. + unsigned int itemskill_castonself : 1; // Used by itemskill() script command, to forcefully cast skill on invoking character. } state; struct { unsigned char no_weapon_damage, no_magic_damage, no_misc_damage; @@ -643,6 +647,15 @@ END_ZEROED_BLOCK; bool achievements_received; // Title VECTOR_DECL(int) title_ids; + + /* + * itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. + * If a skill, casted by itemskill() script command, is aborted while target selection, + * the map server gets no notification where these states could be unset. + * Thus we need this helper variables to prevent abusing these states for next skill cast. + */ + int itemskill_id; + int itemskill_lv; }; #define EQP_WEAPON EQP_HAND_R @@ -1021,6 +1034,7 @@ END_ZEROED_BLOCK; /* End */ void (*unequipitem_pos) (struct map_session_data *sd, int n, int pos); int (*checkitem) (struct map_session_data *sd); int (*useitem) (struct map_session_data *sd,int n); + int (*itemskill_clear) (struct map_session_data *sd); int (*skillatk_bonus) (struct map_session_data *sd, uint16 skill_id); int (*skillheal_bonus) (struct map_session_data *sd, uint16 skill_id); @@ -1037,7 +1051,7 @@ END_ZEROED_BLOCK; /* End */ int (*setcart) (struct map_session_data* sd, int type); void (*setfalcon) (struct map_session_data *sd, bool flag); void (*setridingpeco) (struct map_session_data *sd, bool flag); - void (*setmadogear) (struct map_session_data *sd, bool flag); + void (*setmadogear) (struct map_session_data *sd, bool flag, enum mado_type mtype); void (*setridingdragon) (struct map_session_data *sd, unsigned int type); void (*setridingwug) (struct map_session_data *sd, bool flag); int (*changelook) (struct map_session_data *sd,int type,int val); diff --git a/src/map/pet.c b/src/map/pet.c index f20de2650..aeb372c05 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -891,7 +891,8 @@ static int pet_randomwalk(struct pet_data *pd, int64 tick) int r=rnd(); int x=pd->bl.x+r%(d*2+1)-d; int y=pd->bl.y+r/(d*2+1)%(d*2+1)-d; - if(map->getcell (pd->bl.m, &pd->bl, x, y, CELL_CHKPASS) && unit->walktoxy(&pd->bl, x, y, 0)) { + if (map->getcell(pd->bl.m, &pd->bl, x, y, CELL_CHKPASS) != 0 + && unit->walk_toxy(&pd->bl, x, y, 0) == 0) { pd->move_fail_count=0; break; } @@ -991,7 +992,7 @@ static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int return 0; //Already walking to him unit->calc_pos(&pd->bl, sd->bl.x, sd->bl.y, sd->ud.dir); - if(!unit->walktoxy(&pd->bl,pd->ud.to_x,pd->ud.to_y,0)) + if (unit->walk_toxy(&pd->bl, pd->ud.to_x, pd->ud.to_y, 0) != 0) pet->randomwalk(pd,tick); return 0; diff --git a/src/map/script.c b/src/map/script.c index 755a099ec..0cfd6da73 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10694,6 +10694,7 @@ static BUILDIN(checkmount) /** * Mounts or dismounts a combat mount. * + * setmount <flag>, <mtype>; * setmount <flag>; * setmount; * @@ -10712,6 +10713,8 @@ static BUILDIN(checkmount) * If an invalid value or no flag is specified, the appropriate mount is * auto-detected. As a result of this, there is no need to specify a flag at * all, unless it is a dragon color other than green. + * + * In newer clients you can specify the mado gear type though the mtype argument. */ static BUILDIN(setmount) { @@ -10724,6 +10727,12 @@ static BUILDIN(setmount) if (script_hasdata(st,2)) flag = script_getnum(st,2); + enum mado_type mtype = script_hasdata(st, 3) ? script_getnum(st, 3) : MADO_ROBOT; + if (mtype < MADO_ROBOT || mtype >= MADO_MAX) { + ShowError("script_setmount: Invalid mado type has been passed (%d).\n", flag); + return false; + } + // Color variants for Rune Knight dragon mounts. if (flag != SETMOUNT_TYPE_NONE) { if (flag < SETMOUNT_TYPE_AUTODETECT || flag >= SETMOUNT_TYPE_MAX) { @@ -10750,7 +10759,7 @@ static BUILDIN(setmount) } else if ((sd->job & MAPID_THIRDMASK) == MAPID_MECHANIC) { // Mechanic (Mado Gear) if (pc->checkskill(sd, NC_MADOLICENCE)) - pc->setmadogear(sd, true); + pc->setmadogear(sd, true, mtype); } else { // Knight / Crusader (Peco Peco) if (pc->checkskill(sd, KN_RIDING)) @@ -10764,7 +10773,7 @@ static BUILDIN(setmount) pc->setridingwug(sd, false); } if (pc_ismadogear(sd)) { - pc->setmadogear(sd, false); + pc->setmadogear(sd, false, mtype); } if (pc_isridingpeco(sd)) { pc->setridingpeco(sd, false); @@ -10976,33 +10985,51 @@ static BUILDIN(guildopenstorage) return true; } -/*========================================== - * Make player use a skill trought item usage - *------------------------------------------*/ -/// itemskill <skill id>,<level>{,flag -/// itemskill "<skill name>",<level>{,flag +/** + * Makes the attached character use a skill by using an item. + * + * @code{.herc} + * itemskill(<skill id>, <skill level>{, <flag>}); + * itemskill("<skill name>", <skill level>{, <flag>}); + * @endcode + * + */ static BUILDIN(itemskill) { - int id; - int lv; struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL || sd->ud.skilltimer != INVALID_TIMER) return true; - id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) ); - lv = script_getnum(st,3); -/* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ -#if 0 - if( !script_hasdata(st, 4) ) { - if( !skill->check_condition_castbegin(sd,id,lv) || !skill->check_condition_castend(sd,id,lv) ) + sd->skillitem = script_isstringtype(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2); + sd->skillitemlv = script_getnum(st, 3); + sd->state.itemskill_conditions_checked = 0; // Skill casting items will check the conditions prior to the target selection in AEGIS. Thus we need a flag to prevent checking them twice. + + int flag = script_hasdata(st, 4) ? script_getnum(st, 4) : ISF_NONE; + + sd->state.itemskill_no_conditions = ((flag & ISF_IGNORECONDITIONS) == ISF_IGNORECONDITIONS) ? 1 : 0; // Unset in pc_itemskill_clear(). + + if (sd->state.itemskill_no_conditions == 0) { + if (skill->check_condition_castbegin(sd, sd->skillitem, sd->skillitemlv) == 0 + || skill->check_condition_castend(sd, sd->skillitem, sd->skillitemlv) == 0) { return true; + } + + sd->state.itemskill_conditions_checked = 1; // Unset in pc_itemskill_clear(). } -#endif - sd->skillitem=id; - sd->skillitemlv=lv; - clif->item_skill(sd,id,lv); + + sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; // Unset in pc_itemskill_clear(). + sd->state.itemskill_castonself = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF) ? 1 : 0; // Unset in pc_itemskill_clear(). + + // itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. Unset in pc_itemskill_clear(). + sd->itemskill_id = sd->skillitem; + sd->itemskill_lv = sd->skillitemlv; + + clif->item_skill(sd, sd->skillitem, sd->skillitemlv); + return true; } + /*========================================== * Attempt to create an item *------------------------------------------*/ @@ -11775,6 +11802,13 @@ static BUILDIN(getunits) const char *mapname = script_getstr(st, 5); int16 m = map->mapname2mapid(mapname); + if (m == -1) { + ShowError("script:getunits: Invalid map(%s) provided.\n", mapname); + script->reportdata(data); + st->state = END; + return false; + } + if (script_hasdata(st, 9)) { int16 x1 = script_getnum(st, 6); int16 y1 = script_getnum(st, 7); @@ -12489,6 +12523,56 @@ static BUILDIN(hideonnpc) npc->enable(str,4); return true; } +/*========================================== + *------------------------------------------*/ +static BUILDIN(cloakonnpc) +{ + struct npc_data *nd = npc->name2id(script_getstr(st, 2)); + if (nd == NULL) { + ShowError("buildin_cloakonnpc: invalid npc name '%s'.\n", script_getstr(st, 2)); + return false; + } + + if (script_hasdata(st, 3)) { + struct map_session_data *sd = map->id2sd(script_getnum(st, 3)); + if (sd == NULL) + return false; + + uint32 val = nd->option; + nd->option |= OPTION_CLOAK; + clif->changeoption_target(&nd->bl, &sd->bl, SELF); + nd->option = val; + } else { + nd->option |= OPTION_CLOAK; + clif->changeoption(&nd->bl); + } + return true; +} +/*========================================== + *------------------------------------------*/ +static BUILDIN(cloakoffnpc) +{ + struct npc_data *nd = npc->name2id(script_getstr(st, 2)); + if (nd == NULL) { + ShowError("buildin_cloakoffnpc: invalid npc name '%s'.\n", script_getstr(st, 2)); + return false; + } + + if (script_hasdata(st, 3)) { + struct map_session_data *sd = map->id2sd(script_getnum(st, 3)); + if (sd == NULL) + return false; + + uint32 val = nd->option; + nd->option &= ~OPTION_CLOAK; + clif->changeoption_target(&nd->bl, &sd->bl, SELF); + nd->option = val; + } else { + nd->option &= ~OPTION_CLOAK; + clif->changeoption(&nd->bl); + } + return true; +} /* Starts a status effect on the target unit or on the attached player. * @@ -14526,47 +14610,53 @@ static BUILDIN(strmobinfo) return true; } -/*========================================== - * Summon guardians [Valaris] - * guardian("<map name>",<x>,<y>,"<name to show>",<mob id>{,"<event label>"}{,<guardian index>}) -> <id> - *------------------------------------------*/ +/** + * Summons a castle guardian mob. + * + * @code{.herc} + * guardian("<map name>", <x>, <y>, "<name to show>", <mob id>{, <guardian index>}); + * guardian("<map name>", <x>, <y>, "<name to show>", <mob id>{, "<event label>"{, <guardian index>}}); + * @endcode + * + * @author Valaris + * + **/ static BUILDIN(guardian) { - int class_ = 0, x = 0, y = 0, guardian = 0; - const char *str, *mapname, *evt=""; bool has_index = false; + int guardian = 0; + const char *event = ""; - mapname = script_getstr(st,2); - x = script_getnum(st,3); - y = script_getnum(st,4); - str = script_getstr(st,5); - class_ = script_getnum(st,6); - - if( script_hasdata(st,8) ) - {// "<event label>",<guardian index> - evt=script_getstr(st,7); - guardian=script_getnum(st,8); + if (script_hasdata(st, 8)) { /// "<event label>", <guardian index> + event = script_getstr(st, 7); + script->check_event(st, event); + guardian = script_getnum(st, 8); has_index = true; - } else if( script_hasdata(st,7) ) { - struct script_data *data = script_getdata(st,7); - script->get_val(st,data); // Dereference if it's a variable - if( data_isstring(data) ) { - // "<event label>" - evt=script_getstr(st,7); - } else if( data_isint(data) ) { - // <guardian index> - guardian=script_getnum(st,7); + } else if (script_hasdata(st, 7)) { + struct script_data *data = script_getdata(st, 7); + + script->get_val(st, data); /// Dereference if it's a variable. + + if (data_isstring(data)) { /// "<event label>" + event = script_getstr(st, 7); + script->check_event(st, event); + } else if (data_isint(data)) { /// <guardian index> + guardian = script_getnum(st, 7); has_index = true; } else { - ShowError("script:guardian: invalid data type for argument #6 (from 1)\n"); + ShowError("script:guardian: Invalid data type for argument #6!\n"); script->reportdata(data); return false; } } - script->check_event(st, evt); - script_pushint(st, mob->spawn_guardian(mapname,x,y,str,class_,evt,guardian,has_index)); + const char *mapname = script_getstr(st, 2); + const char *name = script_getstr(st, 5); + const int x = script_getnum(st, 3); + const int y = script_getnum(st, 4); + const int mob_id = script_getnum(st, 6); + script_pushint(st, mob->spawn_guardian(mapname, x, y, name, mob_id, event, guardian, has_index, st->oid)); return true; } /*========================================== @@ -16468,7 +16558,7 @@ static BUILDIN(npcwalkto) } else { status_calc_npc(nd, SCO_NONE); } - unit->walktoxy(&nd->bl, x, y, 0); + unit->walk_toxy(&nd->bl, x, y, 0); } return true; @@ -16894,38 +16984,54 @@ static BUILDIN(logmes) return true; } +/** + * Summons a mob which will act as a slave for the invoking character. + * + * @code{.herc} + * summon("mob name", <mob id>{, <timeout>{, "event label"}}); + * @endcode + * + * @author Celest + * + **/ static BUILDIN(summon) { - int class_, timeout=0; - const char *str,*event=""; - struct mob_data *md; - int64 tick = timer->gettick(); struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; - str = script_getstr(st,2); - class_ = script_getnum(st,3); - if( script_hasdata(st,4) ) - timeout=script_getnum(st,4); - if( script_hasdata(st,5) ) { - event=script_getstr(st,5); + const int64 tick = timer->gettick(); + + clif->skill_poseffect(&sd->bl, AM_CALLHOMUN, 1, sd->bl.x, sd->bl.y, tick); + + const char *event = ""; + + if (script_hasdata(st, 5)) { + event = script_getstr(st, 5); script->check_event(st, event); } - clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick); + const char *name = script_getstr(st, 2); + const int mob_id = script_getnum(st, 3); + struct mob_data *md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, name, mob_id, event, + SZ_SMALL, AI_NONE, 0); - md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_SMALL, AI_NONE); - if (md) { - md->master_id=sd->bl.id; + if (md != NULL) { + md->master_id = sd->bl.id; md->special_state.ai = AI_ATTACK; - if( md->deletetimer != INVALID_TIMER ) + + if (md->deletetimer != INVALID_TIMER) timer->delete(md->deletetimer, mob->timer_delete); - md->deletetimer = timer->add(tick+(timeout>0?timeout*1000:60000),mob->timer_delete,md->bl.id,0); - mob->spawn (md); //Now it is ready for spawning. - clif->specialeffect(&md->bl,344,AREA); + + const int timeout = script_hasdata(st, 4) ? script_getnum(st, 4) * 1000 : 60000; + + md->deletetimer = timer->add(tick + ((timeout == 0) ? 60000 : timeout), mob->timer_delete, md->bl.id, 0); + mob->spawn(md); + clif->specialeffect(&md->bl, 344, AREA); sc_start4(NULL, &md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000); } + return true; } @@ -19574,7 +19680,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -19621,7 +19727,7 @@ static BUILDIN(setunitdata) clif->changelook(bl, LOOK_WEAPON, val); break; case UDT_LOOKDIR: - unit->setdir(bl, (uint8) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_CANMOVETICK: md->ud.canmove_tick = val; @@ -19745,7 +19851,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -19753,7 +19859,7 @@ static BUILDIN(setunitdata) status->calc_misc(bl, &hd->base_status, hd->homunculus.level); break; case UDT_LOOKDIR: - unit->setdir(bl, (unsigned char) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_CANMOVETICK: hd->ud.canmove_tick = val; @@ -19884,7 +19990,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -19892,7 +19998,7 @@ static BUILDIN(setunitdata) status->calc_misc(bl, &pd->status, pd->pet.level); break; case UDT_LOOKDIR: - unit->setdir(bl, (unsigned char) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_CANMOVETICK: pd->ud.canmove_tick = val; @@ -20017,7 +20123,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -20025,7 +20131,7 @@ static BUILDIN(setunitdata) status->calc_misc(bl, &mc->base_status, mc->db->lv); break; case UDT_LOOKDIR: - unit->setdir(bl, (unsigned char) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_CANMOVETICK: mc->ud.canmove_tick = val; @@ -20151,7 +20257,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -20159,7 +20265,7 @@ static BUILDIN(setunitdata) status->calc_misc(bl, &ed->base_status, ed->db->lv); break; case UDT_LOOKDIR: - unit->setdir(bl, (unsigned char) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_CANMOVETICK: ed->ud.canmove_tick = val; @@ -20280,7 +20386,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walk_toxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_CLASS: @@ -20291,7 +20397,7 @@ static BUILDIN(setunitdata) status->calc_misc(bl, &nd->status, nd->level); break; case UDT_LOOKDIR: - unit->setdir(bl, (unsigned char) val); + unit->set_dir(bl, (enum unit_dir)val); break; case UDT_STR: nd->status.str = (unsigned short) val; @@ -21015,7 +21121,10 @@ static BUILDIN(unitwalk) if (script_hasdata(st, 4)) { int x = script_getnum(st, 3); int y = script_getnum(st, 4); - script_pushint(st, unit->walktoxy(bl, x, y, 0));// We'll use harder calculations. + if (unit->walk_toxy(bl, x, y, 0) == 0) // We'll use harder calculations. + script_pushint(st, 1); + else + script_pushint(st, 0); } else { int target_id = script_getnum(st, 3); @@ -22251,6 +22360,23 @@ static BUILDIN(achievement_progress) return true; } +static BUILDIN(achievement_iscompleted) +{ + struct map_session_data *sd = script_hasdata(st, 3) ? map->id2sd(script_getnum(st, 3)) : script->rid2sd(st); + if (sd == NULL) + return false; + + int aid = script_getnum(st, 2); + const struct achievement_data *ad = achievement->get(aid); + if (ad == NULL) { + ShowError("buildin_achievement_iscompleted: Invalid Achievement %d provided.\n", aid); + return false; + } + + script_pushint(st, achievement->check_complete(sd, ad)); + return true; +} + /*========================================== * BattleGround System *------------------------------------------*/ @@ -22372,20 +22498,31 @@ static BUILDIN(bg_warp) return true; } +/** + * Spawns a mob with allegiance to the given battle group. + * + * @code{.herc} + * bg_monster(<battle group>, "<map name>", <x>, <y>, "<name to show>", <mob id>{, "<event label>"}); + * @endcode + * + **/ static BUILDIN(bg_monster) { - int class_ = 0, x = 0, y = 0, bg_id = 0; - const char *str, *mapname, *evt=""; + const char *event = ""; + + if (script_hasdata(st, 8)) { + event = script_getstr(st, 8); + script->check_event(st, event); + } - bg_id = script_getnum(st,2); - mapname = script_getstr(st,3); - x = script_getnum(st,4); - y = script_getnum(st,5); - str = script_getstr(st,6); - class_ = script_getnum(st,7); - if( script_hasdata(st,8) ) evt = script_getstr(st,8); - script->check_event(st, evt); - script_pushint(st, mob->spawn_bg(mapname,x,y,str,class_,evt,bg_id)); + const char *mapname = script_getstr(st, 3); + const char *name = script_getstr(st, 6); + const int bg_id = script_getnum(st, 2); + const int x = script_getnum(st, 4); + const int y = script_getnum(st, 5); + const int mob_id = script_getnum(st, 7); + + script_pushint(st, mob->spawn_bg(mapname, x, y, name, mob_id, event, bg_id, st->oid)); return true; } @@ -23148,7 +23285,6 @@ static BUILDIN(progressbar_unit) } static BUILDIN(pushpc) { - uint8 dir; int cells, dx, dy; struct map_session_data* sd; @@ -23157,14 +23293,14 @@ static BUILDIN(pushpc) return true; } - dir = script_getnum(st,2); - cells = script_getnum(st,3); + enum unit_dir dir = script_getnum(st, 2); + cells = script_getnum(st,3); - if (dir > 7) { + if (dir >= UNIT_DIR_MAX) { ShowWarning("buildin_pushpc: Invalid direction %d specified.\n", dir); script->reportsrc(st); - dir%= 8; // trim spin-over + dir %= UNIT_DIR_MAX; // trim spin-over } if(!cells) @@ -23173,10 +23309,11 @@ static BUILDIN(pushpc) } else if(cells<0) {// pushing backwards - dir = (dir+4)%8; // turn around - cells = -cells; + dir = unit_get_opposite_dir(dir); + cells = -cells; } + Assert_retr(false, dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); dx = dirx[dir]; dy = diry[dir]; @@ -24709,6 +24846,133 @@ static BUILDIN(openshop) return true; } +static bool script_sellitemcurrency_add(struct npc_data *nd, struct script_state* st, int argIndex) +{ + nullpo_retr(false, nd); + nullpo_retr(false, st); + + if (!script_hasdata(st, argIndex + 1)) + return false; + + int id = script_getnum(st, argIndex); + struct item_data *it; + if (!(it = itemdb->exists(id))) { + ShowWarning("buildin_sellitemcurrency: unknown item id '%d'!\n", id); + return false; + } + int qty = 0; + if ((qty = script_getnum(st, argIndex + 1)) <= 0) { + ShowError("buildin_sellitemcurrency: invalid 'qty'!\n"); + return false; + } + int refine_level = -1; + if (script_hasdata(st, argIndex + 2)) { + refine_level = script_getnum(st, argIndex + 2); + } + int items = nd->u.scr.shop->items; + if (nd->u.scr.shop == NULL || items == 0) { + ShowWarning("buildin_sellitemcurrency: shop not have items!\n"); + return false; + } + if (nd->u.scr.shop->shop_last_index >= items || nd->u.scr.shop->shop_last_index < 0) { + ShowWarning("buildin_sellitemcurrency: wrong selected shop index!\n"); + return false; + } + + struct npc_item_list *item_list = &nd->u.scr.shop->item[nd->u.scr.shop->shop_last_index]; + int index = item_list->value2; + if (item_list->currency == NULL) { + CREATE(item_list->currency, struct npc_barter_currency, 1); + item_list->value2 ++; + } else { + RECREATE(item_list->currency, struct npc_barter_currency, ++item_list->value2); + } + struct npc_barter_currency *currency = &item_list->currency[index]; + currency->nameid = id; + currency->refine = refine_level; + currency->amount = qty; + return true; +} + +/** + * @call sellitemcurrency <Item_ID>,qty{,refine}}; + * + * adds <Item_ID> to last item in expanded barter shop + **/ +static BUILDIN(sellitemcurrency) +{ + struct npc_data *nd; + if ((nd = map->id2nd(st->oid)) == NULL) { + ShowWarning("buildin_sellitemcurrency: trying to run without a proper NPC!\n"); + return false; + } + if (nd->u.scr.shop == NULL || nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + ShowWarning("buildin_sellitemcurrency: this command can be used only with expanded barter shops!\n"); + return false; + } + + script->sellitemcurrency_add(nd, st, 2); + return true; +} + +/** + * @call endsellitem; + * + * complete sell item in expanded barter shop (NST_EXPANDED_BARTER) + **/ +static BUILDIN(endsellitem) +{ + struct npc_data *nd; + if ((nd = map->id2nd(st->oid)) == NULL) { + ShowWarning("buildin_endsellitem: trying to run without a proper NPC!\n"); + return false; + } + if (nd->u.scr.shop == NULL || nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + ShowWarning("buildin_endsellitem: this command can be used only with expanded barter shops!\n"); + return false; + } + + int newIndex = nd->u.scr.shop->shop_last_index; + const struct npc_item_list *const newItem = &nd->u.scr.shop->item[newIndex]; + int i = 0; + for (i = 0; i < nd->u.scr.shop->items - 1; i++) { + const struct npc_item_list *const item = &nd->u.scr.shop->item[i]; + if (item->nameid != newItem->nameid || item->value != newItem->value) + continue; + if (item->value2 != newItem->value2) + continue; + bool found = true; + for (int k = 0; k < item->value2; k ++) { + struct npc_barter_currency *currency = &item->currency[k]; + struct npc_barter_currency *newCurrency = &newItem->currency[k]; + if (currency->nameid != newCurrency->nameid || + currency->amount != newCurrency->amount || + currency->refine != newCurrency->refine) { + found = false; + break; + } + } + if (!found) + continue; + break; + } + + if (i != nd->u.scr.shop->items - 1) { + if (nd->u.scr.shop->item[i].qty != -1) { + nd->u.scr.shop->item[i].qty += nd->u.scr.shop->item[newIndex].qty; + npc->expanded_barter_tosql(nd, i); + } + nd->u.scr.shop->shop_last_index --; + nd->u.scr.shop->items--; + if (nd->u.scr.shop->item[newIndex].currency != NULL) { + aFree(nd->u.scr.shop->item[newIndex].currency); + nd->u.scr.shop->item[newIndex].currency = NULL; + } + } + + return true; +} + /** * @call sellitem <Item_ID>,{,price{,qty}}; * @@ -24732,30 +24996,65 @@ static BUILDIN(sellitem) return false; } - if (!nd->u.scr.shop) { + const bool have_shop = (nd->u.scr.shop != NULL); + if (!have_shop) { npc->trader_update(nd->src_id ? nd->src_id : nd->bl.id); - if (nd->u.scr.shop->type == NST_BARTER) { - if (!script_hasdata(st, 5)) { - ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n"); - return false; - } - value = script_getnum(st, 4); - value2 = script_getnum(st, 5); + } + + if (nd->u.scr.shop->type != NST_BARTER) { + value = script_hasdata(st, 3) ? script_getnum(st, 3) : it->value_buy; + if (value == -1) + value = it->value_buy; + } + + if (nd->u.scr.shop->type == NST_BARTER) { + if (!script_hasdata(st, 5)) { + ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n"); + return false; + } + value = script_getnum(st, 4); + value2 = script_getnum(st, 5); + } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) { + if (!script_hasdata(st, 4)) { + ShowError("buildin_sellitem: invalid number of parameters for expanded barter type shop!\n"); + return false; + } + if ((qty = script_getnum(st, 4)) <= 0 && qty != -1) { + ShowError("buildin_sellitem: invalid 'qty' for expanded barter type shop!\n"); + return false; } - } else {/* no need to run this if its empty */ + } + + if (have_shop) { if (nd->u.scr.shop->type == NST_BARTER) { - if (!script_hasdata(st, 5)) { - ShowError("buildin_sellitem: invalid number of parameters for barter-type shop!\n"); - return false; - } - value = script_getnum(st, 4); - value2 = script_getnum(st, 5); for (i = 0; i < nd->u.scr.shop->items; i++) { const struct npc_item_list *const item = &nd->u.scr.shop->item[i]; if (item->nameid == id && item->value == value && item->value2 == value2) { break; } } + } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) { + for (i = 0; i < nd->u.scr.shop->items; i++) { + const struct npc_item_list *const item = &nd->u.scr.shop->item[i]; + if (item->nameid != id || item->value != value) + continue; + if (item->value2 != (script_lastdata(st) - 4) / 3) + continue; + bool found = true; + for (int k = 0; k < item->value2; k ++) { + const int scriptOffset = k * 3 + 5; + struct npc_barter_currency *currency = &item->currency[k]; + if (currency->nameid != script_getnum(st, scriptOffset) || + currency->amount != script_getnum(st, scriptOffset + 1) || + currency->refine != script_getnum(st, scriptOffset + 2)) { + found = false; + break; + } + } + if (!found) + continue; + break; + } } else { for (i = 0; i < nd->u.scr.shop->items; i++) { if (nd->u.scr.shop->item[i].nameid == id) { @@ -24765,12 +25064,6 @@ static BUILDIN(sellitem) } } - if (nd->u.scr.shop->type != NST_BARTER) { - value = script_hasdata(st,3) ? script_getnum(st, 3) : it->value_buy; - if( value == -1 ) - value = it->value_buy; - } - if( nd->u.scr.shop->type == NST_MARKET ) { if( !script_hasdata(st,4) || ( qty = script_getnum(st, 4) ) <= 0 ) { ShowError("buildin_sellitem: invalid 'qty' for market-type shop!\n"); @@ -24791,7 +25084,8 @@ static BUILDIN(sellitem) } } - if (i != nd->u.scr.shop->items) { + bool foundInShop = (i != nd->u.scr.shop->items); + if (foundInShop) { nd->u.scr.shop->item[i].value = value; nd->u.scr.shop->item[i].qty = qty; if (nd->u.scr.shop->type == NST_MARKET) /* has been manually updated, make it reflect on sql */ @@ -24817,8 +25111,84 @@ static BUILDIN(sellitem) nd->u.scr.shop->item[i].value = value; nd->u.scr.shop->item[i].value2 = value2; nd->u.scr.shop->item[i].qty = qty; + nd->u.scr.shop->item[i].currency = NULL; + } + nd->u.scr.shop->shop_last_index = i; + + if (!foundInShop) { + for (int k = 5; k <= script_lastdata(st); k += 3) { + script->sellitemcurrency_add(nd, st, k); + } } + if (foundInShop) { + if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) { /* has been manually updated, make it reflect on sql */ + npc->expanded_barter_tosql(nd, i); + } + } + return true; +} + +/** + * @call startsellitem <Item_ID>,{,price{,qty}}; + * + * Starts adding item into expanded barter shop (NST_EXPANDED_BARTER) + **/ +static BUILDIN(startsellitem) +{ + struct npc_data *nd; + struct item_data *it; + int i = 0, id = script_getnum(st,2); + int value2 = 0; + int qty = 0; + + if (!(nd = map->id2nd(st->oid))) { + ShowWarning("buildin_startsellitem: trying to run without a proper NPC!\n"); + return false; + } else if (!(it = itemdb->exists(id))) { + ShowWarning("buildin_startsellitem: unknown item id '%d'!\n", id); + return false; + } + + const bool have_shop = (nd->u.scr.shop != NULL); + if (!have_shop) { + npc->trader_update(nd->src_id ? nd->src_id : nd->bl.id); + } + + if (nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + ShowWarning("script_startsellitem: can works only for NST_EXPANDED_BARTER shops"); + return false; + } + + int value = script_hasdata(st, 3) ? script_getnum(st, 3) : it->value_buy; + if (value == -1) + value = it->value_buy; + + if ((qty = script_getnum(st, 4)) <= 0 && qty != -1) { + ShowError("buildin_startsellitem: invalid 'qty' for expanded barter type shop!\n"); + return false; + } + + for (i = 0; i < nd->u.scr.shop->items; i++) { + if (nd->u.scr.shop->item[i].nameid == 0) + break; + } + + if (i == nd->u.scr.shop->items) { + if (nd->u.scr.shop->items == USHRT_MAX) { + ShowWarning("buildin_startsellitem: Can't add %s (%s/%s), shop list is full!\n", it->name, nd->exname, nd->path); + return false; + } + i = nd->u.scr.shop->items; + RECREATE(nd->u.scr.shop->item, struct npc_item_list, ++nd->u.scr.shop->items); + } + + nd->u.scr.shop->item[i].nameid = it->nameid; + nd->u.scr.shop->item[i].value = value; + nd->u.scr.shop->item[i].value2 = value2; + nd->u.scr.shop->item[i].qty = qty; + nd->u.scr.shop->item[i].currency = NULL; + nd->u.scr.shop->shop_last_index = i; return true; } @@ -24852,6 +25222,18 @@ static BUILDIN(stopselling) break; } } + } else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) { + if (!script_hasdata(st, 3)) { + ShowError("buildin_stopselling: called with wrong number of arguments\n"); + return false; + } + const int price = script_getnum(st, 3); + for (i = 0; i < nd->u.scr.shop->items; i++) { + const struct npc_item_list *const item = &nd->u.scr.shop->item[i]; + if (item->nameid == id && item->value == price) { + break; + } + } } else { for (i = 0; i < nd->u.scr.shop->items; i++) { if (nd->u.scr.shop->item[i].nameid == id) { @@ -24865,13 +25247,19 @@ static BUILDIN(stopselling) if (nd->u.scr.shop->type == NST_MARKET) npc->market_delfromsql(nd, i); - if (nd->u.scr.shop->type == NST_BARTER) + else if (nd->u.scr.shop->type == NST_BARTER) npc->barter_delfromsql(nd, i); + else if (nd->u.scr.shop->type == NST_EXPANDED_BARTER) + npc->expanded_barter_delfromsql(nd, i); nd->u.scr.shop->item[i].nameid = 0; nd->u.scr.shop->item[i].value = 0; nd->u.scr.shop->item[i].value2 = 0; nd->u.scr.shop->item[i].qty = 0; + if (nd->u.scr.shop->item[i].currency != NULL) { + aFree(nd->u.scr.shop->item[i].currency); + nd->u.scr.shop->item[i].currency = NULL; + } for (i = 0, cursor = 0; i < nd->u.scr.shop->items; i++) { if (nd->u.scr.shop->item[i].nameid == 0) @@ -24882,14 +25270,18 @@ static BUILDIN(stopselling) nd->u.scr.shop->item[cursor].value = nd->u.scr.shop->item[i].value; nd->u.scr.shop->item[cursor].value2 = nd->u.scr.shop->item[i].value2; nd->u.scr.shop->item[cursor].qty = nd->u.scr.shop->item[i].qty; + nd->u.scr.shop->item[cursor].currency = nd->u.scr.shop->item[i].currency; } cursor++; } + nd->u.scr.shop->items--; + nd->u.scr.shop->item[nd->u.scr.shop->items].currency = NULL; script_pushint(st, 1); - } else + } else { script_pushint(st, 0); + } return true; } @@ -24948,6 +25340,7 @@ static BUILDIN(tradertype) } npc->market_delfromsql(nd, INT_MAX); npc->barter_delfromsql(nd, INT_MAX); + npc->expanded_barter_delfromsql(nd, INT_MAX); } #if PACKETVER < 20131223 @@ -24962,6 +25355,12 @@ static BUILDIN(tradertype) script->reportsrc(st); } #endif +#if PACKETVER_MAIN_NUM < 20191120 && PACKETVER_RE_NUM < 20191106 && PACKETVER_ZERO_NUM < 20191127 + if (type == NST_EXPANDED_BARTER) { + ShowWarning("buildin_tradertype: NST_EXPANDED_BARTER is only available with PACKETVER_ZERO_NUM 20191127 or PACKETVER_MAIN_NUM 20191120 or PACKETVER_RE_NUM 20191106 or newer!\n"); + script->reportsrc(st); + } +#endif if( nd->u.scr.shop ) nd->u.scr.shop->type = type; @@ -25005,8 +25404,8 @@ static BUILDIN(shopcount) } else if ( !nd->u.scr.shop || !nd->u.scr.shop->items ) { ShowWarning("buildin_shopcount(%d): trying to use without any items!\n",id); return false; - } else if (nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER) { - ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET and non-NST_BARTER shop!\n",id); + } else if (nd->u.scr.shop->type != NST_MARKET && nd->u.scr.shop->type != NST_BARTER && nd->u.scr.shop->type != NST_EXPANDED_BARTER) { + ShowWarning("buildin_shopcount(%d): trying to use on a non-NST_MARKET and non-NST_BARTER and non-NST_EXPANDED_BARTER shop!\n",id); return false; } @@ -26395,7 +26794,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(checkcart,""), BUILDIN_DEF(setfalcon,"?"), BUILDIN_DEF(checkfalcon,""), - BUILDIN_DEF(setmount,"?"), + BUILDIN_DEF(setmount,"??"), BUILDIN_DEF(checkmount,""), BUILDIN_DEF(checkwug,""), BUILDIN_DEF(savepoint,"sii"), @@ -26442,6 +26841,8 @@ static void script_parse_builtin(void) BUILDIN_DEF(disablenpc,"s"), BUILDIN_DEF(hideoffnpc,"s"), BUILDIN_DEF(hideonnpc,"s"), + BUILDIN_DEF(cloakonnpc,"s?"), + BUILDIN_DEF(cloakoffnpc,"s?"), BUILDIN_DEF(sc_start,"iii???"), BUILDIN_DEF2(sc_start,"sc_start2","iiii???"), BUILDIN_DEF2(sc_start,"sc_start4","iiiiii???"), @@ -26725,6 +27126,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(agitcheck2,""), // Achievements [Smokexyz/Hercules] BUILDIN_DEF(achievement_progress, "iiii?"), + BUILDIN_DEF(achievement_iscompleted, "i?"), // BattleGround BUILDIN_DEF(waitingroom2bg,"siiss?"), BUILDIN_DEF(waitingroom2bg_single,"isiis"), @@ -26836,7 +27238,10 @@ static void script_parse_builtin(void) /* New Shop Support */ BUILDIN_DEF(openshop,"?"), - BUILDIN_DEF(sellitem,"i???"), + BUILDIN_DEF(sellitem, "i???*"), + BUILDIN_DEF(sellitemcurrency, "ii?"), + BUILDIN_DEF(startsellitem, "iii"), + BUILDIN_DEF(endsellitem, ""), BUILDIN_DEF(stopselling,"i??"), BUILDIN_DEF(setcurrency,"i?"), BUILDIN_DEF(tradertype,"i"), @@ -27397,6 +27802,7 @@ static void script_hardcoded_constants(void) script->set_constant("NST_MARKET", NST_MARKET, false, false); script->set_constant("NST_CUSTOM", NST_CUSTOM, false, false); script->set_constant("NST_BARTER", NST_BARTER, false, false); + script->set_constant("NST_EXPANDED_BARTER", NST_EXPANDED_BARTER, false, false); script->constdb_comment("script unit data types"); script->set_constant("UDT_TYPE", UDT_TYPE, false, false); @@ -27482,6 +27888,23 @@ static void script_hardcoded_constants(void) script->set_constant("GUILDINFO_MASTER_NAME", GUILDINFO_MASTER_NAME, false, false); script->set_constant("GUILDINFO_MASTER_CID", GUILDINFO_MASTER_CID, false, false); + script->constdb_comment("madogear types"); + script->set_constant("MADO_ROBOT", MADO_ROBOT, false, false); + script->set_constant("MADO_SUITE", MADO_SUITE, false, false); + + script->constdb_comment("itemskill option flags"); + script->set_constant("ISF_NONE", ISF_NONE, false, false); + script->set_constant("ISF_IGNORECONDITIONS", ISF_IGNORECONDITIONS, false, false); + script->set_constant("ISF_INSTANTCAST", ISF_INSTANTCAST, false, false); + script->set_constant("ISF_CASTONSELF", ISF_CASTONSELF, false, false); + + script->constdb_comment("Item Bound Types"); + script->set_constant("IBT_ANY", IBT_NONE, false, false); // for *checkbound() + script->set_constant("IBT_ACCOUNT", IBT_ACCOUNT, false, false); + script->set_constant("IBT_GUILD", IBT_GUILD, false, false); + script->set_constant("IBT_PARTY", IBT_PARTY, false, false); + script->set_constant("IBT_CHARACTER", IBT_CHARACTER, false, false); + script->constdb_comment("Renewal"); #ifdef RENEWAL script->set_constant("RENEWAL", 1, false, false); @@ -27845,4 +28268,6 @@ void script_defaults(void) script->run_item_rental_start_script = script_run_item_rental_start_script; script->run_item_rental_end_script = script_run_item_rental_end_script; script->run_item_lapineddukddak_script = script_run_item_lapineddukddak_script; + + script->sellitemcurrency_add = script_sellitemcurrency_add; } diff --git a/src/map/script.h b/src/map/script.h index d652f2155..857d22c61 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -553,6 +553,28 @@ enum siege_type { }; /** + * Types of MadoGear + */ +enum mado_type { + MADO_ROBOT = 0x00, + // unused = 0x01, + MADO_SUITE = 0x02, +#ifndef MADO_MAX + MADO_MAX +#endif +}; + +/** + * Option flags for itemskill() script command. + **/ +enum itemskill_flag { + ISF_NONE = 0x00, + ISF_IGNORECONDITIONS = 0x01, // Ignore skill conditions and don't consume them. + ISF_INSTANTCAST = 0x02, // Cast skill instantaneously. + ISF_CASTONSELF = 0x04, // Forcefully cast skill on invoking character without showing the target selection cursor. +}; + +/** * Structures **/ @@ -1054,6 +1076,7 @@ struct script_interface { void (*run_item_rental_end_script) (struct map_session_data *sd, struct item_data *data, int oid); void (*run_item_rental_start_script) (struct map_session_data *sd, struct item_data *data, int oid); void (*run_item_lapineddukddak_script) (struct map_session_data *sd, struct item_data *data, int oid); + bool (*sellitemcurrency_add) (struct npc_data *nd, struct script_state* st, int argIndex); }; #ifdef HERCULES_CORE diff --git a/src/map/skill.c b/src/map/skill.c index 4579b2ea7..b3ed46fbd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -67,20 +67,6 @@ #define SKILLUNITTIMER_INTERVAL 100 -// ranges reserved for mapping skill ids to skilldb offsets -#define HM_SKILLRANGEMIN 750 -#define HM_SKILLRANGEMAX (HM_SKILLRANGEMIN + MAX_HOMUNSKILL) -#define MC_SKILLRANGEMIN (HM_SKILLRANGEMAX + 1) -#define MC_SKILLRANGEMAX (MC_SKILLRANGEMIN + MAX_MERCSKILL) -#define EL_SKILLRANGEMIN (MC_SKILLRANGEMAX + 1) -#define EL_SKILLRANGEMAX (EL_SKILLRANGEMIN + MAX_ELEMENTALSKILL) -#define GD_SKILLRANGEMIN (EL_SKILLRANGEMAX + 1) -#define GD_SKILLRANGEMAX (GD_SKILLRANGEMIN + MAX_GUILDSKILL) - -#if GD_SKILLRANGEMAX > 999 - #error GD_SKILLRANGEMAX is greater than 999 -#endif - static struct skill_interface skill_s; static struct s_skill_dbs skilldbs; @@ -110,41 +96,55 @@ static int skill_name2id(const char *name) /// Returns the skill's array index, or 0 (Unknown Skill). static int skill_get_index(int skill_id) { - // avoid ranges reserved for mapping guild/homun/mercenary skills - if( (skill_id >= GD_SKILLRANGEMIN && skill_id <= GD_SKILLRANGEMAX) - || (skill_id >= HM_SKILLRANGEMIN && skill_id <= HM_SKILLRANGEMAX) - || (skill_id >= MC_SKILLRANGEMIN && skill_id <= MC_SKILLRANGEMAX) - || (skill_id >= EL_SKILLRANGEMIN && skill_id <= EL_SKILLRANGEMAX) ) + int skillRange[] = { NV_BASIC, NPC_LEX_AETERNA, + KN_CHARGEATK, SA_ELEMENTWIND, + RK_ENCHANTBLADE, AB_SILENTIUM, + WL_WHITEIMPRISON, SC_FEINTBOMB, + LG_CANNONSPEAR, SR_GENTLETOUCH_REVITALIZE, + WA_SWING_DANCE, WA_MOONLIT_SERENADE, + MI_RUSH_WINDMILL, MI_HARMONIZE, + WM_LESSON, WM_UNLIMITED_HUMMING_VOICE, + SO_FIREWALK, SO_EARTH_INSIGNIA, + GN_TRAINING_SWORD, GN_SLINGITEM_RANGEMELEEATK, + AB_SECRAMENT, LG_OVERBRAND_PLUSATK, + ALL_ODINS_RECALL, ALL_LIGHTGUARD, + RL_GLITTERING_GREED, RL_GLITTERING_GREED_ATK, + KO_YAMIKUMO, OB_AKAITSUKI, + ECL_SNOWFLIP, ALL_THANATOS_RECALL, + GC_DARKCROW, NC_MAGMA_ERUPTION_DOTDAMAGE, + SU_BASIC_SKILL, SU_SPIRITOFSEA, + HLIF_HEAL, MH_VOLCANIC_ASH, + MS_BASH, MER_INVINCIBLEOFF2, + EL_CIRCLE_OF_FIRE, EL_STONE_RAIN, + GD_APPROVAL, GD_DEVELOPMENT + CUSTOM_SKILL_RANGES}; + int length = sizeof(skillRange) / sizeof(int); + STATIC_ASSERT(sizeof(skillRange) / sizeof(int) % 2 == 0, "skill_get_index: skillRange should be multiple of 2"); + + + if (skill_id < skillRange[0] || skill_id > skillRange[length - 1]) { + ShowWarning("skill_get_index: skill id '%d' is not being handled!\n", skill_id); return 0; + } - // map skill id to skill db index - if( skill_id >= GD_SKILLBASE ) - skill_id = GD_SKILLRANGEMIN + skill_id - GD_SKILLBASE; - else if( skill_id >= EL_SKILLBASE ) - skill_id = EL_SKILLRANGEMIN + skill_id - EL_SKILLBASE; - else if( skill_id >= MC_SKILLBASE ) - skill_id = MC_SKILLRANGEMIN + skill_id - MC_SKILLBASE; - else if( skill_id >= HM_SKILLBASE ) - skill_id = HM_SKILLRANGEMIN + skill_id - HM_SKILLBASE; - //[Ind/Hercules] GO GO GO LESS! - http://herc.ws/board/topic/512-skill-id-processing-overhaul/ - else if( skill_id > 1019 && skill_id < 8001 ) { - if( skill_id < 2058 ) // 1020 - 2000 are empty - skill_id = 1020 + skill_id - 2001; - else if( skill_id < 2549 ) // 2058 - 2200 are empty - 1020+57 - skill_id = (1077) + skill_id - 2201; - else if ( skill_id < 3036 ) // 2549 - 3000 are empty - 1020+57+348 - skill_id = (1425) + skill_id - 3001; - else if ( skill_id < 5044 ) // 3036 - 5000 are empty - 1020+57+348+35 - skill_id = (1460) + skill_id - 5001; - else - ShowWarning("skill_get_index: skill id '%d' is not being handled!\n",skill_id); + int skill_idx = 0; + // Map Skill ID to Skill Indexes (in reverse order) + for (int i = 0; i < length; i += 2) { + // Check if SkillID belongs to this range. + if (skill_id <= skillRange[i + 1] && skill_id >= skillRange[i]) { + skill_idx += (skillRange[i + 1] - skill_id); + break; + } + // Add the difference of current range + skill_idx += (skillRange[i + 1] - skillRange[i] + 1); } - // validate result - if (skill_id <= 0|| skill_id >= MAX_SKILL_DB) + if (skill_idx >= MAX_SKILL_DB) { + ShowWarning("skill_get_index: skill id '%d'(idx: %d) is not being handled as it exceeds MAX_SKILL_DB!\n", skill_id, skill_idx); return 0; + } - return skill_id; + return skill_idx; } static const char *skill_get_name(int skill_id) @@ -1180,7 +1180,6 @@ static int skillnotok_mercenary(uint16 skill_id, struct mercenary_data *md) static struct s_skill_unit_layout *skill_get_unit_layout(uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y) { int pos = skill->get_unit_layout_type(skill_id,skill_lv); - uint8 dir; nullpo_retr(&skill->dbs->unit_layout[0], src); if (pos < -1 || pos >= MAX_SKILL_UNIT_LAYOUT) { @@ -1191,7 +1190,9 @@ static struct s_skill_unit_layout *skill_get_unit_layout(uint16 skill_id, uint16 if (pos != -1) // simple single-definition layout return &skill->dbs->unit_layout[pos]; - dir = (src->x == x && src->y == y) ? 6 : map->calc_dir(src,x,y); // 6 - default aegis direction + enum unit_dir dir = UNIT_DIR_EAST; // default aegis direction + if (src->x != x || src->y != y) + dir = map->calc_dir(src, x, y); if (skill_id == MG_FIREWALL) return &skill->dbs->unit_layout [skill->firewall_unit_pos + dir]; @@ -2626,11 +2627,11 @@ static int skill_strip_equip(struct block_list *bl, unsigned short where, int ra /*========================================================================= * Used to knock back players, monsters, traps, etc * 'count' is the number of squares to knock back - * 'direction' indicates the way OPPOSITE to the knockback direction (or -1 for default behavior) + * 'direction' indicates the way OPPOSITE to the knockback direction (or UNIT_DIR_UNDEFINED for default behavior) * if 'flag&0x1', position update packets must not be sent. * if 'flag&0x2', skill blown ignores players' special_state.no_knockback */ -static int skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) +static int skill_blown(struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag) { int dx = 0, dy = 0; struct status_change *tsc = status->get_sc(target); @@ -2672,10 +2673,10 @@ static int skill_blown(struct block_list *src, struct block_list *target, int co break; } - if (dir == -1) // <optimized>: do the computation here instead of outside + if (dir == UNIT_DIR_UNDEFINED) // <optimized>: do the computation here instead of outside dir = map->calc_dir(target, src->x, src->y); // direction from src to target, reversed - if (dir >= 0 && dir < 8) { + if (dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX) { // take the reversed 'direction' and reverse it dx = -dirx[dir]; dy = -diry[dir]; @@ -3297,7 +3298,7 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li //Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex] //Reflected spells do not bounce back (bl == dsrc since it only happens for direct skills) if (dmg.blewcount > 0 && bl!=dsrc && !status->isdead(bl)) { - int8 dir = -1; // default + enum unit_dir dir = UNIT_DIR_UNDEFINED; // default switch(skill_id) {//direction case MG_FIREWALL: case PR_SANCTUARY: @@ -3310,13 +3311,13 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li // This ensures the storm randomly pushes instead of exactly a cell backwards per official mechanics. case WZ_STORMGUST: if(!battle_config.stormgust_knockback) - dir = rnd()%8; + dir = rnd() % UNIT_DIR_MAX; break; case WL_CRIMSONROCK: dir = map->calc_dir(bl,skill->area_temp[4],skill->area_temp[5]); break; case MC_CARTREVOLUTION: - dir = 6; // Official servers push target to the West + dir = UNIT_DIR_EAST; // Official servers push target to the West break; default: dir = skill->attack_dir_unknown(&attack_type, src, dsrc, bl, &skill_id, &skill_lv, &tick, &flag); @@ -3337,8 +3338,12 @@ static int skill_attack(int attack_type, struct block_list *src, struct block_li case SR_KNUCKLEARROW: if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) && !(flag&4) ) { short dir_x, dir_y; - dir_x = dirx[(dir+4)%8]; - dir_y = diry[(dir+4)%8]; + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } + dir_x = dirx[unit_get_opposite_dir(dir)]; + dir_y = diry[unit_get_opposite_dir(dir)]; if (map->getcell(bl->m, bl, bl->x + dir_x, bl->y + dir_y, CELL_CHKNOPASS) != 0) skill->addtimerskill(src, tick + 300 * ((flag&2) ? 1 : 2), bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag|4); } @@ -3498,10 +3503,12 @@ static int skill_attack_copy_unknown(int *attack_type, struct block_list *src, s static int skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { - return -1; + return UNIT_DIR_UNDEFINED; } -static void skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) +static void skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, + uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, + struct Damage *dmg, int64 *damage, enum unit_dir *dir) { nullpo_retv(bl); nullpo_retv(dmg); @@ -3512,7 +3519,7 @@ static void skill_attack_blow_unknown(int *attack_type, struct block_list *src, if (!dmg->blewcount && bl->type == BL_SKILL && *damage > 0){ struct skill_unit *su = BL_UCAST(BL_SKILL, bl); if (su->group && su->group->skill_id == HT_BLASTMINE) - skill->blown(src, bl, 3, -1, 0); + skill->blown(src, bl, 3, UNIT_DIR_UNDEFINED, 0); } } @@ -4190,6 +4197,11 @@ static void skill_castend_type(int type, struct block_list *src, struct block_li skill->castend_damage_id(src, bl, skill_id, skill_lv, tick, flag); break; } + + struct map_session_data *sd = BL_CAST(BL_PC, src); + + if (sd != NULL) + pc->itemskill_clear(sd); } /*========================================== @@ -4401,7 +4413,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl case KN_CHARGEATK: { bool path_exists = path->search_long(NULL, src, src->m, src->x, src->y, bl->x, bl->y,CELL_CHKWALL); unsigned int dist = distance_bl(src, bl); - uint8 dir = map->calc_dir(bl, src->x, src->y); + enum unit_dir dir = map->calc_dir(bl, src->x, src->y); // teleport to target (if not on WoE grounds) if( !map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground && unit->movepos(src, bl->x, bl->y, 0, 1) ) @@ -4413,7 +4425,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl skill->blown(src, bl, dist, dir, 0); //HACK: since knockback officially defaults to the left, the client also turns to the left... therefore, // make the caster look in the direction of the target - unit->setdir(src, (dir+4)%8); + unit->set_dir(src, unit_get_opposite_dir(dir)); } } @@ -4452,12 +4464,13 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl case RG_BACKSTAP: { - uint8 dir = map->calc_dir(src, bl->x, bl->y), t_dir = unit->getdir(bl); - if ((!check_distance_bl(src, bl, 0) && !map->check_dir(dir, t_dir)) || bl->type == BL_SKILL) { + enum unit_dir dir = map->calc_dir(src, bl->x, bl->y); + enum unit_dir t_dir = unit->getdir(bl); + if ((!check_distance_bl(src, bl, 0) && map->check_dir(dir, t_dir) == 0) || bl->type == BL_SKILL) { status_change_end(src, SC_HIDING, INVALID_TIMER); skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); - dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] - unit->setdir(bl,dir); + dir = unit_get_opposite_dir(dir); // change direction [Celest] + unit->set_dir(bl, dir); } else if (sd) clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); @@ -4484,7 +4497,6 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl { short x, y, i = 2; // Move 2 cells for Issen(from target) struct block_list *mbl = bl; - short dir = 0; skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); @@ -4506,13 +4518,13 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl status->set_hp(src, 1, STATUS_HEAL_DEFAULT); #endif // RENEWAL } - dir = map->calc_dir(src,bl->x,bl->y); - if( dir > 0 && dir < 4) x = -i; - else if( dir > 4 ) x = i; - else x = 0; - if( dir > 2 && dir < 6 ) y = -i; - else if( dir == 7 || dir < 2 ) y = i; - else y = 0; + enum unit_dir dir = map->calc_dir(src, bl->x, bl->y); + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } + x = i * dirx[dir]; + y = i * diry[dir]; if ((mbl == src || (!map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground))) { // only NJ_ISSEN don't have slide effect in GVG if (!(unit->movepos(src, mbl->x+x, mbl->y+y, 1, 1))) { // The cell is not reachable (wall, object, ...), move next to the target @@ -4739,12 +4751,12 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl if(idb_exists(skill->bowling_db, bl->id)) break; // Random direction - dir = rnd()%8; + dir = rnd() % UNIT_DIR_MAX; } else { // Create an empty list of already hit targets db_clear(skill->bowling_db); // Direction is walkpath - dir = (unit->getdir(src)+4)%8; + dir = unit_get_opposite_dir(unit->getdir(src)); } // Add current target to the list of already hit targets idb_put(skill->bowling_db, bl->id, bl); @@ -4753,6 +4765,10 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl ty = bl->y; for(i=0;i<c;i++) { // Target coordinates (get changed even if knockback fails) + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } tx -= dirx[dir]; ty -= diry[dir]; // If target cell is a wall then break @@ -4781,18 +4797,24 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl if (bl->id==skill->area_temp[1]) break; if (skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,SD_ANIMATION)) - skill->blown(src,bl,skill->area_temp[2],-1,0); + skill->blown(src, bl, skill->area_temp[2], UNIT_DIR_UNDEFINED, 0); } else { - int x=bl->x,y=bl->y,i,dir; - dir = map->calc_dir(bl,src->x,src->y); + int x = bl->x; + int y = bl->y; + int i; + enum unit_dir dir = map->calc_dir(bl, src->x, src->y); skill->area_temp[1] = bl->id; skill->area_temp[2] = skill->get_blewcount(skill_id,skill_lv); // all the enemies between the caster and the target are hit, as well as the target if (skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,0)) - skill->blown(src,bl,skill->area_temp[2],-1,0); + skill->blown(src, bl, skill->area_temp[2], UNIT_DIR_UNDEFINED, 0); for (i=0;i<4;i++) { map->foreachincell(skill->area_sub,bl->m,x,y,BL_CHAR,src,skill_id,skill_lv, tick,flag|BCT_ENEMY|1,skill->castend_damage_id); + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } x += dirx[dir]; y += diry[dir]; } @@ -5014,7 +5036,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl if(rnd()%100 < (10 + 3*skill_lv)) { if( !sd || pc->checkskill(sd,KN_SPEARBOOMERANG) == 0 ) break; // Spear Boomerang auto cast chance only works if you have mastered Spear Boomerang. - skill->blown(src,bl,6,-1,0); + skill->blown(src, bl, 6, UNIT_DIR_UNDEFINED, 0); skill->addtimerskill(src,tick+800,bl->id,0,0,skill_id,skill_lv,BF_WEAPON,flag); skill->castend_damage_id(src,bl,KN_SPEARBOOMERANG,1,tick,0); } @@ -5022,7 +5044,7 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl case RK_PHANTOMTHRUST: { struct map_session_data *tsd = BL_CAST(BL_PC, bl); - unit->setdir(src,map->calc_dir(src, bl->x, bl->y)); + unit->set_dir(src, map->calc_dir(src, bl->x, bl->y)); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); skill->blown(src,bl,distance_bl(src,bl)-1,unit->getdir(src),0); @@ -5036,16 +5058,13 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl case KO_JYUMONJIKIRI: case GC_DARKILLUSION: { - short x, y; - short dir = map->calc_dir(bl, src->x, src->y); - - if ( dir < 4 ) { - x = bl->x + 2 * (dir > 0) - 3 * (dir > 0); - y = bl->y + 1 - (dir / 2) - (dir > 2); - } else { - x = bl->x + 2 * (dir > 4) - 1 * (dir > 4); - y = bl->y + (dir / 6) - 1 + (dir > 6); + enum unit_dir dir = map->calc_dir(bl, src->x, src->y); + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; } + short x = bl->x + dirx[dir]; + short y = bl->y + diry[dir]; if ( unit->movepos(src, x, y, 1, 1) ) { clif->slide(src, x, y); @@ -5202,14 +5221,16 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl skill->attack(BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag|ELE_DARK); break; case RA_WUGSTRIKE: - if( sd && pc_isridingwug(sd) ){ - short x[8]={0,-1,-1,-1,0,1,1,1}; - short y[8]={1,1,0,-1,-1,-1,0,1}; - uint8 dir = map->calc_dir(bl, src->x, src->y); - - if( unit->movepos(src, bl->x+x[dir], bl->y+y[dir], 1, 1) ) - { - clif->slide(src, bl->x+x[dir], bl->y+y[dir]); + if (sd != NULL && pc_isridingwug(sd)) { + enum unit_dir dir = map->calc_dir(bl, src->x, src->y); + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } + short x = bl->x + dirx[dir]; + short y = bl->y + diry[dir]; + if (unit->movepos(src, x, y, 1, 1) != 0) { + clif->slide(src, x, y); clif->fixpos(src); skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } @@ -5613,6 +5634,8 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) // Use a do so that you can break out of it when the skill fails. do { + bool is_asura = (ud->skill_id == MO_EXTREMITYFIST); + if(!target || target->prev==NULL) break; if(src->m != target->m || status->isdead(src)) break; @@ -5650,8 +5673,9 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) } if(ud->skill_id == RG_BACKSTAP) { - uint8 dir = map->calc_dir(src,target->x,target->y),t_dir = unit->getdir(target); - if(check_distance_bl(src, target, 0) || map->check_dir(dir,t_dir)) { + enum unit_dir dir = map->calc_dir(src, target->x, target->y); + enum unit_dir t_dir = unit->getdir(target); + if (check_distance_bl(src, target, 0) || map->check_dir(dir, t_dir) != 0) { break; } } @@ -5845,8 +5869,9 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) ud->skill_lv = ud->skilltarget = 0; } - if (src->id != target->id) - unit->setdir(src, map->calc_dir(src, target->x, target->y)); + // Asura Strike caster doesn't look to their target in the end + if (src->id != target->id && !is_asura) + unit->set_dir(src, map->calc_dir(src, target->x, target->y)); map->freeblock_unlock(); return 1; @@ -5869,20 +5894,19 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) } if (target && target->m == src->m) { //Move character to target anyway. - int dir, x, y; - dir = map->calc_dir(src,target->x,target->y); - if( dir > 0 && dir < 4) x = -2; - else if( dir > 4 ) x = 2; - else x = 0; - if( dir > 2 && dir < 6 ) y = -2; - else if( dir == 7 || dir < 2 ) y = 2; - else y = 0; - if (unit->movepos(src, src->x+x, src->y+y, 1, 1)) { + enum unit_dir dir = map->calc_dir(src, target->x, target->y); + Assert_ret(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); + int dist = 3; // number of cells that asura caster will walk + int x = dist * dirx[dir]; + int y = dist * diry[dir]; + + if (unit->movepos(src, src->x + x, src->y + y, 1, 1) != 0) { //Display movement + animation. - clif->slide(src,src->x,src->y); + clif->slide(src, src->x, src->y); clif->spiritball(src); } - clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0, 0); + // "Skill Failed" message was already shown when checking that target is invalid + //clif->skill_fail(sd, ud->skill_id, USESKILL_FAIL_LEVEL, 0, 0); } } @@ -7306,27 +7330,34 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; case PR_STRECOVERY: - if(status->isimmune(bl)) { - clif->skill_nodamage(src,bl,skill_id,skill_lv,0); + if (status->isimmune(bl) != 0) { + clif->skill_nodamage(src, bl, skill_id, skill_lv, 0); break; } - if (tsc && tsc->opt1) { - status_change_end(bl, SC_FREEZE, INVALID_TIMER); - status_change_end(bl, SC_STONE, INVALID_TIMER); - status_change_end(bl, SC_SLEEP, INVALID_TIMER); - status_change_end(bl, SC_STUN, INVALID_TIMER); - status_change_end(bl, SC_WHITEIMPRISON, INVALID_TIMER); - } - status_change_end(bl, SC_NETHERWORLD, INVALID_TIMER); - //Is this equation really right? It looks so... special. - if( battle->check_undead(tstatus->race,tstatus->def_ele) ) { - status->change_start(src, bl, SC_BLIND, - 100*(100-(tstatus->int_/2+tstatus->vit/3+tstatus->luk/10)), 1,0,0,0, - skill->get_time2(skill_id, skill_lv) * (100-(tstatus->int_+tstatus->vit)/2)/100,SCFLAG_NONE); + + if (!battle->check_undead(tstatus->race, tstatus->def_ele)) { + if (tsc != NULL && tsc->opt1 != 0) { + status_change_end(bl, SC_FREEZE, INVALID_TIMER); + status_change_end(bl, SC_STONE, INVALID_TIMER); + status_change_end(bl, SC_SLEEP, INVALID_TIMER); + status_change_end(bl, SC_STUN, INVALID_TIMER); + status_change_end(bl, SC_WHITEIMPRISON, INVALID_TIMER); + } + + status_change_end(bl, SC_NETHERWORLD, INVALID_TIMER); + } else { + int rate = 100 * (100 - (tstatus->int_ / 2 + tstatus->vit / 3 + tstatus->luk / 10)); + int duration = skill->get_time2(skill_id, skill_lv); + + duration *= (100 - (tstatus->int_ + tstatus->vit) / 2) / 100; + status->change_start(src, bl, SC_BLIND, rate, 1, 0, 0, 0, duration, SCFLAG_NONE); } - clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - if(dstmd) - mob->unlocktarget(dstmd,tick); + + clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); + + if (dstmd != NULL) + mob->unlocktarget(dstmd, tick); + break; // Mercenary Supportive Skills @@ -7809,7 +7840,9 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case TK_HIGHJUMP: { - int x,y, dir = unit->getdir(src); + int x; + int y; + enum unit_dir dir = unit->getdir(src); //Fails on noteleport maps, except for GvG and BG maps [Skotlex] if( map->list[src->m].flag.noteleport @@ -8058,11 +8091,19 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case NPC_RUN: { - const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}}; - uint8 dir = (bl == src)?unit->getdir(src):map->calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. + enum unit_dir dir; + if (bl == src) //If cast on self, run forward, else run away. + dir = unit->getdir(src); + else + dir = map->calc_dir(src, bl->x, bl->y); + if (Assert_chk(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX)) { + map->freeblock_unlock(); // unblock before assert-returning + return 0; + } unit->stop_attack(src); //Run skillv tiles overriding the can-move check. - if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md) + if (unit->walk_toxy(src, src->x + skill_lv * -dirx[dir], src->y + skill_lv * -diry[dir], 2) == 0 + && md != NULL) md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the AI. } break; @@ -9423,7 +9464,9 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case NC_F_SIDESLIDE: case NC_B_SIDESLIDE: { - uint8 dir = (skill_id == NC_F_SIDESLIDE) ? (unit->getdir(src)+4)%8 : unit->getdir(src); + enum unit_dir dir = unit->getdir(src); + if (skill_id == NC_F_SIDESLIDE) + dir = unit_get_opposite_dir(dir); skill->blown(src,bl,skill->get_blewcount(skill_id,skill_lv),dir,0); clif->slide(src,src->x,src->y); clif->skill_nodamage(src,bl,skill_id,skill_lv,1); @@ -9433,7 +9476,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case NC_SELFDESTRUCTION: if (sd) { if (pc_ismadogear(sd)) - pc->setmadogear(sd, false); + pc->setmadogear(sd, false, MADO_ROBOT); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); skill->castend_damage_id(src, src, skill_id, skill_lv, tick, flag); status->set_sp(src, 0, STATUS_HEAL_DEFAULT); @@ -10403,7 +10446,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * if(sd) { struct mob_data *summon_md; - summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, clif->get_bl_name(src), MOBID_KO_KAGE, "", SZ_SMALL, AI_NONE); + summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, clif->get_bl_name(src), MOBID_KO_KAGE, "", SZ_SMALL, AI_NONE, 0); if( summon_md ) { summon_md->master_id = src->id; summon_md->special_state.ai = AI_ZANZOU; @@ -10586,7 +10629,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * for (i = 0; i < summons[skill_lv-1].quantity; i++) { struct mob_data *summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, clif->get_bl_name(src), - summons[skill_lv-1].mob_id, "", SZ_SMALL, AI_ATTACK); + summons[skill_lv-1].mob_id, "", SZ_SMALL, AI_ATTACK, 0); if (summon_md != NULL) { summon_md->master_id = src->id; if (summon_md->deletetimer != INVALID_TIMER) @@ -10801,7 +10844,7 @@ static int skill_castend_pos(int tid, int64 tick, int id, intptr_t data) if( sd && sd->skillitem != AL_WARP ) // Warp-Portal thru items will clear data in skill_castend_map. [Inkfish] sd->skillitem = sd->skillitemlv = 0; - unit->setdir(src, map->calc_dir(src, ud->skillx, ud->skilly)); + unit->set_dir(src, map->calc_dir(src, ud->skillx, ud->skilly)); if (ud->skilltimer == INVALID_TIMER) { if (md) md->skill_idx = -1; @@ -11369,7 +11412,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill } // Correct info, don't change any of this! [Celest] - md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), class_, "", SZ_SMALL, AI_NONE); + md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), class_, "", SZ_SMALL, AI_NONE, 0); if (md) { md->master_id = src->id; md->special_state.ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA; @@ -11471,7 +11514,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); } else { int mob_id = skill_lv < 2 ? MOBID_BLACK_MUSHROOM + rnd()%2 : MOBID_RED_PLANT + rnd()%6; - struct mob_data *md = mob->once_spawn_sub(src, src->m, x, y, DEFAULT_MOB_JNAME, mob_id, "", SZ_SMALL, AI_NONE); + struct mob_data *md = mob->once_spawn_sub(src, src->m, x, y, DEFAULT_MOB_JNAME, mob_id, "", SZ_SMALL, AI_NONE, 0); int i; if (md == NULL) break; @@ -11580,17 +11623,16 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case WL_EARTHSTRAIN: { - int i, wave = skill_lv + 4, dir = map->calc_dir(src,x,y); + int i; + int wave = skill_lv + 4; + enum unit_dir dir = map->calc_dir(src, x, y); + Assert_ret(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); int sx = x = src->x, sy = y = src->y; // Store first caster's location to avoid glitch on unit setting - for( i = 1; i <= wave; i++ ) - { - switch( dir ){ - case 0: case 1: case 7: sy = y + i; break; - case 3: case 4: case 5: sy = y - i; break; - case 2: sx = x - i; break; - case 6: sx = x + i; break; - } + for (i = 1; i <= wave; i++) { + sy = y + i * diry[dir]; + if (dir == UNIT_DIR_WEST || dir == UNIT_DIR_EAST) + sx = x + i * dirx[dir]; skill->addtimerskill(src,timer->gettick() + (140 * i),0,sx,sy,skill_id,skill_lv,dir,flag&2); } } @@ -11617,7 +11659,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case NC_SILVERSNIPER: { - struct mob_data *md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), MOBID_SILVERSNIPER, "", SZ_SMALL, AI_NONE); + struct mob_data *md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), MOBID_SILVERSNIPER, "", SZ_SMALL, AI_NONE, 0); if (md) { md->master_id = src->id; md->special_state.ai = AI_FLORA; @@ -13809,12 +13851,14 @@ static int skill_check_condition_char_sub(struct block_list *bl, va_list ap) } else { switch(skill_id) { - case PR_BENEDICTIO: { - uint8 dir = map->calc_dir(&sd->bl,tsd->bl.x,tsd->bl.y); - dir = (unit->getdir(&sd->bl) + dir)%8; //This adjusts dir to account for the direction the sd is facing. - if ((tsd->job & MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == 2 || dir == 6) //Must be standing to the left/right of Priest. - && sd->status.sp >= 10) + case PR_BENEDICTIO: + { + enum unit_dir dir = map->calc_dir(&sd->bl, tsd->bl.x, tsd->bl.y); + dir = (unit->getdir(&sd->bl) + dir) % UNIT_DIR_MAX; //This adjusts dir to account for the direction the sd is facing. + if ((tsd->job & MAPID_BASEMASK) == MAPID_ACOLYTE && (dir == UNIT_DIR_WEST || dir == UNIT_DIR_EAST) //Must be standing to the left/right of Priest. + && sd->status.sp >= 10) { p_sd[(*c)++]=tsd->bl.id; + } return 1; } case AB_ADORAMUS: @@ -13968,6 +14012,22 @@ static bool skill_is_combo(int skill_id) return false; } +/** + * Checks if a skill is casted by an item (itemskill() script command). + * + * @param sd The charcater's session data. + * @param skill_id The skill's ID. + * @param skill_lv The skill's level. + * @return true if skill is casted by an item, otherwise false. + */ +static bool skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv) +{ + nullpo_retr(false, sd); + + return (sd->skillitem == skill_id && sd->skillitemlv == skill_lv + && sd->itemskill_id == skill_id && sd->itemskill_lv == skill_lv); +} + static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { struct status_data *st; @@ -13976,9 +14036,17 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s nullpo_ret(sd); + if (skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL) + return 0; + if (sd->chat_id != 0) return 0; + if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1) + && skill->is_item_skill(sd, skill_id, skill_lv)) { + return 1; + } + if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id) { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check. @@ -14020,24 +14088,21 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s if( (i = sd->itemindex) == -1 || sd->status.inventory[i].nameid != sd->itemid || sd->inventory_data[i] == NULL || - !sd->inventory_data[i]->flag.delay_consume || sd->status.inventory[i].amount < 1 ) { //Something went wrong, item exploit? sd->itemid = sd->itemindex = -1; return 0; } + //Consume sd->itemid = sd->itemindex = -1; - if( skill_id == WZ_EARTHSPIKE && sc && sc->data[SC_EARTHSCROLL] && rnd()%100 > sc->data[SC_EARTHSCROLL]->val2 ) // [marquis007] - ; //Do not consume item. - else if( sd->status.inventory[i].expire_time == 0 ) // Rental usable items are not consumed until expiration + if (sd->status.inventory[i].expire_time == 0 && sd->inventory_data[i]->flag.delay_consume == 1) // Rental usable items are not consumed until expiration pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME); } - return 1; } - if( pc_is90overweight(sd) ) { + if (pc_is90overweight(sd) && sd->skillitem != skill_id) { /// Skill casting items ignore the overweight restriction. [Kenpachi] clif->skill_fail(sd, skill_id, USESKILL_FAIL_WEIGHTOVER, 0, 0); return 0; } @@ -14161,9 +14226,6 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s } } - if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL ) - return 0; - require = skill->get_requirement(sd,skill_id,skill_lv); //Can only update state when weapon/arrow info is checked. @@ -14911,7 +14973,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s return 0; } - if( require.sp > 0 && st->sp < (unsigned int)require.sp) { + if (require.sp > 0 && st->sp < (unsigned int)require.sp && sd->skillitem != skill_id) { /// Skill casting items and Hocus-Pocus skills don't consume SP. [Kenpachi] clif->skill_fail(sd, skill_id, USESKILL_FAIL_SP_INSUFFICIENT, 0, 0); return 0; } @@ -14969,6 +15031,11 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski if (sd->chat_id != 0) return 0; + if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1) + && skill->is_item_skill(sd, skill_id, skill_lv)) { + return 1; + } + if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex] sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check. @@ -14996,14 +15063,8 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski return 0; break; } - /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ -#if 0 - if( sd->state.abra_flag ) // Casting finished (Hocus-Pocus) - return 1; -#endif - if( sd->skillitem == skill_id ) - return 1; - if( pc_is90overweight(sd) ) { + + if (pc_is90overweight(sd) && sd->skillitem != skill_id) { /// Skill casting items ignore the overweight restriction. [Kenpachi] clif->skill_fail(sd, skill_id, USESKILL_FAIL_WEIGHTOVER, 0, 0); return 0; } @@ -15176,6 +15237,9 @@ static int skill_consume_requirement(struct map_session_data *sd, uint16 skill_i nullpo_ret(sd); + if (sd->state.itemskill_no_conditions == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) + return 1; + req = skill->get_requirement(sd,skill_id,skill_lv); if (type&1) { @@ -15184,9 +15248,15 @@ static int skill_consume_requirement(struct map_session_data *sd, uint16 skill_i case MC_IDENTIFY: req.sp = 0; break; + case WZ_EARTHSPIKE: + if (sd->sc.count > 0 && sd->sc.data[SC_EARTHSCROLL] != NULL) // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, 10 SP are consumed. [Kenpachi] + req.sp = 10; + + break; default: - if( sd->state.autocast ) + if (sd->state.autocast == 1 || sd->skillitem == skill_id) /// Skill casting items and Hocus-Pocus skills don't consume SP. [Kenpachi] req.sp = 0; + break; } @@ -15264,12 +15334,6 @@ static struct skill_condition skill_get_requirement(struct map_session_data *sd, if( !sd ) return req; -#if 0 /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ - if( sd->state.abra_flag ) -#else // not 0 - if( sd->skillitem == skill_id ) -#endif // 0 - return req; // Hocus-Pocus don't have requirements. sc = &sd->sc; if( !sc->count ) @@ -15930,11 +15994,11 @@ struct square { int val2[5]; }; -static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) +static void skill_brandishspear_first(struct square *tc, enum unit_dir dir, int16 x, int16 y) { nullpo_retv(tc); - if(dir == 0){ + if (dir == UNIT_DIR_NORTH) { tc->val1[0]=x-2; tc->val1[1]=x-1; tc->val1[2]=x; @@ -15945,7 +16009,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]= tc->val2[3]= tc->val2[4]=y-1; - } else if(dir==2){ + } else if (dir == UNIT_DIR_WEST) { tc->val1[0]= tc->val1[1]= tc->val1[2]= @@ -15956,7 +16020,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]=y; tc->val2[3]=y-1; tc->val2[4]=y-2; - } else if(dir==4){ + } else if (dir == UNIT_DIR_SOUTH) { tc->val1[0]=x-2; tc->val1[1]=x-1; tc->val1[2]=x; @@ -15967,7 +16031,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]= tc->val2[3]= tc->val2[4]=y+1; - } else if(dir==6){ + } else if (dir == UNIT_DIR_EAST) { tc->val1[0]= tc->val1[1]= tc->val1[2]= @@ -15978,7 +16042,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]=y; tc->val2[3]=y-1; tc->val2[4]=y-2; - } else if(dir==1){ + } else if (dir == UNIT_DIR_NORTHWEST) { tc->val1[0]=x-1; tc->val1[1]=x; tc->val1[2]=x+1; @@ -15989,7 +16053,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]=y-1; tc->val2[3]=y; tc->val2[4]=y+1; - } else if(dir==3){ + } else if (dir == UNIT_DIR_SOUTHWEST) { tc->val1[0]=x+3; tc->val1[1]=x+2; tc->val1[2]=x+1; @@ -16000,7 +16064,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]=y+1; tc->val2[3]=y+2; tc->val2[4]=y+3; - } else if(dir==5){ + } else if (dir == UNIT_DIR_SOUTHEAST) { tc->val1[0]=x+1; tc->val1[1]=x; tc->val1[2]=x-1; @@ -16011,7 +16075,7 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int tc->val2[2]=y+1; tc->val2[3]=y; tc->val2[4]=y-1; - } else if(dir==7){ + } else if (dir == UNIT_DIR_NORTHEAST) { tc->val1[0]=x-3; tc->val1[1]=x-2; tc->val1[2]=x-1; @@ -16026,36 +16090,27 @@ static void skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int } -static void skill_brandishspear_dir(struct square *tc, uint8 dir, int are) +static void skill_brandishspear_dir(struct square *tc, enum unit_dir dir, int are) { - int c; nullpo_retv(tc); + Assert_retv(dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); - for( c = 0; c < 5; c++ ) { - switch( dir ) { - case 0: tc->val2[c]+=are; break; - case 1: tc->val1[c]-=are; tc->val2[c]+=are; break; - case 2: tc->val1[c]-=are; break; - case 3: tc->val1[c]-=are; tc->val2[c]-=are; break; - case 4: tc->val2[c]-=are; break; - case 5: tc->val1[c]+=are; tc->val2[c]-=are; break; - case 6: tc->val1[c]+=are; break; - case 7: tc->val1[c]+=are; tc->val2[c]+=are; break; - } + for (int c = 0; c < 5; c++) { + tc->val1[c] += dirx[dir] * are; + tc->val2[c] += diry[dir] * are; } } static void skill_brandishspear(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int c,n=4; - uint8 dir; struct square tc; int x, y; nullpo_retv(bl); x = bl->x; y = bl->y; - dir = map->calc_dir(src, x, y); + enum unit_dir dir = map->calc_dir(src, x, y); skill->brandishspear_first(&tc,dir,x,y); skill->brandishspear_dir(&tc,dir,4); skill->area_temp[1] = bl->id; @@ -18779,7 +18834,7 @@ static int skill_magicdecoy(struct map_session_data *sd, int nameid) break; } - md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_SMALL, AI_NONE); + md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_SMALL, AI_NONE, 0); if( md ) { md->master_id = sd->bl.id; md->special_state.ai = AI_FLORA; @@ -21581,6 +21636,7 @@ void skill_defaults(void) skill->cast_fix_sc = skill_castfix_sc; skill->vf_cast_fix = skill_vfcastfix; skill->delay_fix = skill_delay_fix; + skill->is_item_skill = skill_is_item_skill; skill->check_condition_castbegin = skill_check_condition_castbegin; skill->check_condition_castend = skill_check_condition_castend; skill->consume_requirement = skill_consume_requirement; diff --git a/src/map/skill.h b/src/map/skill.h index dbda6470f..c65547181 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -23,6 +23,7 @@ #include "map/map.h" // struct block_list #include "map/status.h" // enum sc_type +#include "map/unitdefines.h" // enum unit_dir #include "common/hercules.h" #include "common/db.h" #include "common/mmo.h" // MAX_SKILL_DB, struct square @@ -59,6 +60,12 @@ struct status_change_entry; #define MAX_SKILLUNITGROUPTICKSET 25 #define MAX_SKILL_NAME_LENGTH 32 +// Custom Skill Ranges is used in skill_get_index, to allocate indexes based on ID and gaps between 2 SkillID +#ifndef CUSTOM_SKILL_RANGES + #define CUSTOM_SKILL_RANGES +#endif // CUSTOM_SKILL_RANGES + + // (Epoque:) To-do: replace this macro with some sort of skill tree check (rather than hard-coded skill names) #define skill_ischangesex(id) ( \ ((id) >= BD_ADAPTATION && (id) <= DC_SERVICEFORYOU) || ((id) >= CG_ARROWVULCAN && (id) <= CG_MARIONETTE) || \ @@ -1996,7 +2003,7 @@ struct skill_interface { int (*addtimerskill) (struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag); int (*additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick); int (*counter_additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick); - int (*blown) (struct block_list* src, struct block_list* target, int count, int8 dir, int flag); + int (*blown) (struct block_list* src, struct block_list* target, int count, enum unit_dir dir, int flag); int (*break_equip) (struct block_list *bl, unsigned short where, int rate, int flag); int (*strip_equip) (struct block_list *bl, unsigned short where, int rate, int lv, int time); struct skill_unit_group* (*id2group) (int group_id); @@ -2013,6 +2020,7 @@ struct skill_interface { int (*cast_fix_sc) ( struct block_list *bl, int time); int (*vf_cast_fix) ( struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv); int (*delay_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv); + bool (*is_item_skill) (struct map_session_data *sd, int skill_id, int skill_lv); int (*check_condition_castbegin) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); int (*check_condition_castend) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); int (*consume_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type); @@ -2078,8 +2086,8 @@ struct skill_interface { bool (*dance_switch) (struct skill_unit* su, int flag); int (*check_condition_char_sub) (struct block_list *bl, va_list ap); int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap); - void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y); - void (*brandishspear_dir) (struct square* tc, uint8 dir, int are); + void (*brandishspear_first) (struct square *tc, enum unit_dir dir, int16 x, int16 y); + void (*brandishspear_dir) (struct square* tc, enum unit_dir dir, int are); int (*get_fixed_cast) (int skill_id, int skill_lv); int (*sit_count) (struct block_list *bl, va_list ap); int (*sit_in) (struct block_list *bl, va_list ap); @@ -2156,7 +2164,7 @@ struct skill_interface { void (*attack_display_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); int (*attack_copy_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); int (*attack_dir_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - void (*attack_blow_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + void (*attack_blow_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); void (*attack_post_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); bool (*timerskill_dead_unknown) (struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); void (*timerskill_target_unknown) (int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); diff --git a/src/map/status.c b/src/map/status.c index 3b99b99b8..4d798b606 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -801,21 +801,21 @@ static void initChangeTables(void) set_sc_with_vfx( GN_ILLUSIONDOPING , SC_ILLUSIONDOPING , SCB_HIT ); // Storing the target job rather than simply SC_SOULLINK simplifies code later on. - status->dbs->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST, - status->dbs->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK, - status->dbs->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR, - status->dbs->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE, - status->dbs->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER, - status->dbs->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE, - status->dbs->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT, - status->dbs->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD, - status->dbs->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST, - status->dbs->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER, - status->dbs->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE, - status->dbs->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN, - status->dbs->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH, - status->dbs->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER, - status->dbs->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER, + status->dbs->Skill2SCTable[skill->get_index(SL_ALCHEMIST)] = (sc_type)MAPID_ALCHEMIST, + status->dbs->Skill2SCTable[skill->get_index(SL_MONK)] = (sc_type)MAPID_MONK, + status->dbs->Skill2SCTable[skill->get_index(SL_STAR)] = (sc_type)MAPID_STAR_GLADIATOR, + status->dbs->Skill2SCTable[skill->get_index(SL_SAGE)] = (sc_type)MAPID_SAGE, + status->dbs->Skill2SCTable[skill->get_index(SL_CRUSADER)] = (sc_type)MAPID_CRUSADER, + status->dbs->Skill2SCTable[skill->get_index(SL_SUPERNOVICE)] = (sc_type)MAPID_SUPER_NOVICE, + status->dbs->Skill2SCTable[skill->get_index(SL_KNIGHT)] = (sc_type)MAPID_KNIGHT, + status->dbs->Skill2SCTable[skill->get_index(SL_WIZARD)] = (sc_type)MAPID_WIZARD, + status->dbs->Skill2SCTable[skill->get_index(SL_PRIEST)] = (sc_type)MAPID_PRIEST, + status->dbs->Skill2SCTable[skill->get_index(SL_BARDDANCER)] = (sc_type)MAPID_BARDDANCER, + status->dbs->Skill2SCTable[skill->get_index(SL_ROGUE)] = (sc_type)MAPID_ROGUE, + status->dbs->Skill2SCTable[skill->get_index(SL_ASSASIN)] = (sc_type)MAPID_ASSASSIN, + status->dbs->Skill2SCTable[skill->get_index(SL_BLACKSMITH)] = (sc_type)MAPID_BLACKSMITH, + status->dbs->Skill2SCTable[skill->get_index(SL_HUNTER)] = (sc_type)MAPID_HUNTER, + status->dbs->Skill2SCTable[skill->get_index(SL_SOULLINKER)] = (sc_type)MAPID_SOUL_LINKER, // Other SC which are not necessarily associated to skills. status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] |= SCB_ASPD; @@ -9798,6 +9798,9 @@ static int status_get_val_flag(enum sc_type type) case SC_DAILYSENDMAILCNT: val_flag |= 1 | 2; break; + case SC_MADOGEAR: + val_flag |= 1; + break; } return val_flag; } diff --git a/src/map/status.h b/src/map/status.h index ecf27d411..ada18bc0a 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -853,6 +853,7 @@ typedef enum sc_type { SC_RESIST_PROPERTY_FIRE, SC_RESIST_PROPERTY_WIND, SC_CLIENT_ONLY_EQUIP_ARROW, + SC_MADOGEAR, #ifndef SC_MAX SC_MAX, //Automatically updated max, used in for's to check we are within bounds. #endif diff --git a/src/map/unit.c b/src/map/unit.c index 482440978..99682e2d3 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -57,6 +57,7 @@ #include "common/showmsg.h" #include "common/socket.h" #include "common/timer.h" +#include "common/utils.h" #include <stdio.h> #include <stdlib.h> @@ -71,20 +72,65 @@ struct unit_interface *unit; /** * Returns the unit_data for the given block_list. If the object is using * shared unit_data (i.e. in case of BL_NPC), it returns the shared data. - * @param bl block_list to process + * + * __Warning:__ if bl->type is not known or NULL, + * an assertion will be triggered and NULL returned. + * @param bl block_list to process, it is expected to be not NULL. * @return a pointer to the given object's unit_data **/ static struct unit_data *unit_bl2ud(struct block_list *bl) { - if (bl == NULL) return NULL; - if (bl->type == BL_PC) return &BL_UCAST(BL_PC, bl)->ud; - if (bl->type == BL_MOB) return &BL_UCAST(BL_MOB, bl)->ud; - if (bl->type == BL_PET) return &BL_UCAST(BL_PET, bl)->ud; - if (bl->type == BL_NPC) return BL_UCAST(BL_NPC, bl)->ud; - if (bl->type == BL_HOM) return &BL_UCAST(BL_HOM, bl)->ud; - if (bl->type == BL_MER) return &BL_UCAST(BL_MER, bl)->ud; - if (bl->type == BL_ELEM) return &BL_UCAST(BL_ELEM, bl)->ud; - return NULL; + Assert_retr(NULL, bl != NULL); + switch (bl->type) { + case BL_PC: + return &BL_UCAST(BL_PC, bl)->ud; + case BL_MOB: + return &BL_UCAST(BL_MOB, bl)->ud; + case BL_PET: + return &BL_UCAST(BL_PET, bl)->ud; + case BL_NPC: + return BL_UCAST(BL_NPC, bl)->ud; + case BL_HOM: + return &BL_UCAST(BL_HOM, bl)->ud; + case BL_MER: + return &BL_UCAST(BL_MER, bl)->ud; + case BL_ELEM: + return &BL_UCAST(BL_ELEM, bl)->ud; + default: + Assert_retr(NULL, false); + } +} + +/** + * Returns the const unit_data for the given const block_list. If the object is using + * shared unit_data (i.e. in case of BL_NPC), it returns the shared data. + * + * __Warning:__ if bl->type is not known or NULL, + * an assertion will be triggered and NULL returned. + * @param bl block_list to process, it is expected to be not NULL. + * @return a pointer to the given object's unit_data + **/ +static const struct unit_data *unit_cbl2ud(const struct block_list *bl) +{ + Assert_retr(NULL, bl != NULL); + switch (bl->type) { + case BL_PC: + return &BL_UCCAST(BL_PC, bl)->ud; + case BL_MOB: + return &BL_UCCAST(BL_MOB, bl)->ud; + case BL_PET: + return &BL_UCCAST(BL_PET, bl)->ud; + case BL_NPC: + return BL_UCCAST(BL_NPC, bl)->ud; + case BL_HOM: + return &BL_UCCAST(BL_HOM, bl)->ud; + case BL_MER: + return &BL_UCCAST(BL_MER, bl)->ud; + case BL_ELEM: + return &BL_UCCAST(BL_ELEM, bl)->ud; + default: + Assert_retr(NULL, false); + } } /** @@ -105,42 +151,46 @@ static struct unit_data *unit_bl2ud2(struct block_list *bl) return unit->bl2ud(bl); } -static int unit_walktoxy_sub(struct block_list *bl) +/** + * TODO: understand purpose of this function + * @param bl block_list to process + * @return 0: success, 1: fail, 2: nullpointer + */ +static int unit_walk_toxy_sub(struct block_list *bl) { - int i; - struct walkpath_data wpd; - struct unit_data *ud = NULL; - - nullpo_retr(1, bl); - ud = unit->bl2ud(bl); - if(ud == NULL) return 0; + nullpo_retr(2, bl); + struct unit_data *ud = unit->bl2ud(bl); + if (ud == NULL) + return 2; - memset(&wpd, 0, sizeof(wpd)); + struct walkpath_data wpd = {0}; - if( !path->search(&wpd,bl,bl->m,bl->x,bl->y,ud->to_x,ud->to_y,ud->state.walk_easy,CELL_CHKNOPASS) ) - return 0; + if (!path->search(&wpd, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, ud->state.walk_easy, CELL_CHKNOPASS)) + return 1; #ifdef OFFICIAL_WALKPATH - if( !path->search_long(NULL, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, CELL_CHKNOPASS) // Check if there is an obstacle between - && wpd.path_len > 14 // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] - && (bl->type != BL_NPC) ) // If type is a NPC, please disregard. - return 0; + if (bl->type != BL_NPC // If type is an NPC, disregard. + && !path->search_long(NULL, bl, bl->m, bl->x, bl->y, ud->to_x, ud->to_y, CELL_CHKNOPASS) // Check if there is an obstacle between + && wpd.path_len > 14) { // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] + return 1; + } #endif - memcpy(&ud->walkpath,&wpd,sizeof(wpd)); + ud->walkpath = wpd; - if (ud->target_to && ud->chaserange>1) { - //Generally speaking, the walk path is already to an adjacent tile - //so we only need to shorten the path if the range is greater than 1. + if (ud->target_to != 0 && ud->chaserange > 1) { + // Generally speaking, the walk path is already to an adjacent tile + // so we only need to shorten the path if the range is greater than 1. - //Trim the last part of the path to account for range, - //but always move at least one cell when requested to move. - for (i = (ud->chaserange*10)-10; i > 0 && ud->walkpath.path_len>1;) { - uint8 dir; + // Trim the last part of the path to account for range, + // but always move at least one cell when requested to move. + for (int i = ud->chaserange * 10 - 10; i > 0 && ud->walkpath.path_len > 1;) { + enum unit_dir dir; ud->walkpath.path_len--; dir = ud->walkpath.path[ud->walkpath.path_len]; - if (dir&1) - i -= MOVE_COST*20; //When chasing, units will target a diamond-shaped area in range [Playtester] + Assert_retr(1, dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); + if (unit_is_diagonal_dir(dir)) + i -= MOVE_COST * 20; // When chasing, units will target a diamond-shaped area in range [Playtester] else i -= MOVE_COST; ud->to_x -= dirx[dir]; @@ -148,7 +198,7 @@ static int unit_walktoxy_sub(struct block_list *bl) } } - ud->state.change_walk_target=0; + ud->state.change_walk_target = 0; if (bl->type == BL_PC) { struct map_session_data *sd = BL_UCAST(BL_PC, bl); @@ -157,15 +207,17 @@ static int unit_walktoxy_sub(struct block_list *bl) } clif->move(ud); - if(ud->walkpath.path_pos>=ud->walkpath.path_len) - i = -1; - else if(ud->walkpath.path[ud->walkpath.path_pos]&1) - i = status->get_speed(bl)*MOVE_DIAGONAL_COST/MOVE_COST; + int timer_delay; + if (ud->walkpath.path_pos >= ud->walkpath.path_len) + timer_delay = -1; + else if ((ud->walkpath.path[ud->walkpath.path_pos] & 1) != 0) + timer_delay = status->get_speed(bl) * MOVE_DIAGONAL_COST / MOVE_COST; else - i = status->get_speed(bl); - if( i > 0) - ud->walktimer = timer->add(timer->gettick()+i,unit->walktoxy_timer,bl->id,i); - return 1; + timer_delay = status->get_speed(bl); + + if (timer_delay > 0) + ud->walktimer = timer->add(timer->gettick() + timer_delay, unit->walk_toxy_timer, bl->id, 0); //TODO: check if unit->walk_toxy_timer uses any intptr data + return 0; } /** @@ -173,289 +225,278 @@ static int unit_walktoxy_sub(struct block_list *bl) * @param tid: Timer ID * @param tick: Unused * @param id: ID of bl to do the action - * @param data: Not used - * @return 1: Success 0: Fail (No valid bl) + * @param data: Unused + * @return 0: success, 1: fail, 2: nullpointer */ -static int unit_step_timer(int tid, int64 tick, int id, intptr_t data) +static int unit_steptimer(int tid, int64 tick, int id, intptr_t data) { - struct block_list *bl; - struct unit_data *ud; - int target_id; - - bl = map->id2bl(id); - - if (!bl || bl->prev == NULL) - return 0; - - ud = unit->bl2ud(bl); - - if(!ud) - return 0; + struct block_list *bl = map->id2bl(id); + if (bl == NULL || bl->prev == NULL) + return 2; + struct unit_data *ud = unit->bl2ud(bl); + if (ud == NULL) + return 2; - if(ud->steptimer != tid) { - ShowError("unit_step_timer mismatch %d != %d\n",ud->steptimer,tid); - return 0; + if (ud->steptimer != tid) { + ShowError("unit_steptimer mismatch %d != %d\n", ud->steptimer, tid); + return 1; } ud->steptimer = INVALID_TIMER; - if(!ud->stepaction) - return 0; + if (!ud->stepaction) + return 1; - //Set to false here because if an error occurs, it should not be executed again + // Set to false here because if an error occurs, it should not be executed again ud->stepaction = false; - if(!ud->target_to) - return 0; + if (ud->target_to == 0) + return 1; - //Flush target_to as it might contain map coordinates which should not be used by other functions - target_id = ud->target_to; + // Flush target_to as it might contain map coordinates which should not be used by other functions + int target_id = ud->target_to; ud->target_to = 0; - //If stepaction is set then we remembered a client request that should be executed on the next step - //Execute request now if target is in attack range - if(ud->stepskill_id && skill->get_inf(ud->stepskill_id) & INF_GROUND_SKILL) { - //Execute ground skill + // If stepaction is set then we remembered a client request that should be executed on the next step + // Execute request now if target is in attack range + if (ud->stepskill_id != 0 && (skill->get_inf(ud->stepskill_id) & INF_GROUND_SKILL) != 0) { + // Execute ground skill struct map_data *md = &map->list[bl->m]; - unit->skilluse_pos(bl, target_id%md->xs, target_id/md->xs, ud->stepskill_id, ud->stepskill_lv); + unit->skilluse_pos(bl, target_id % md->xs, target_id / md->xs, ud->stepskill_id, ud->stepskill_lv); } else { - //If a player has target_id set and target is in range, attempt attack + // If a player has target_id set and target is in range, attempt attack struct block_list *tbl = map->id2bl(target_id); - if (!tbl || !status->check_visibility(bl, tbl)) { - return 0; - } - if(ud->stepskill_id == 0) { - //Execute normal attack - unit->attack(bl, tbl->id, (ud->state.attack_continue) + 2); - } else { - //Execute non-ground skill - unit->skilluse_id(bl, tbl->id, ud->stepskill_id, ud->stepskill_lv); - } + nullpo_retr(2, tbl); + if (status->check_visibility(bl, tbl) == 0) // Target not visible + return 1; + if (ud->stepskill_id == 0) + unit->attack(bl, tbl->id, ud->state.attack_continue + 2); // Execute normal attack + else + unit->skilluse_id(bl, tbl->id, ud->stepskill_id, ud->stepskill_lv); // Execute non-ground skill } - return 1; + return 0; } -static int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) +/** + * Warps homunculus or mercenary towards his master in case he's too far away for 3 seconds. + * @param master_bl: block_list of master + * @param slave_bl: block_list of homunculus/mercenary master owns + * @return 0: success, 1: fail + */ +static int unit_warpto_master(struct block_list *master_bl, struct block_list *slave_bl) { - int i; - int x,y,dx,dy; - unsigned char icewall_walk_block; - uint8 dir; - struct block_list *bl; - struct map_session_data *sd; - struct mob_data *md; - struct unit_data *ud; - struct mercenary_data *mrd; + nullpo_retr(1, master_bl); + nullpo_retr(1, slave_bl); + int64 *masterteleport_timer; + struct homun_data *hd = BL_CAST(BL_HOM, slave_bl); + struct mercenary_data *md = BL_CAST(BL_MER, slave_bl); + + bool check = true; + if (hd != NULL) { + masterteleport_timer = &hd->masterteleport_timer; + check = homun_alive(hd); + } else if (md != NULL) { + masterteleport_timer = &md->masterteleport_timer; + } else { + return 1; + } - bl = map->id2bl(id); - if(bl == NULL) - return 0; - sd = BL_CAST(BL_PC, bl); - md = BL_CAST(BL_MOB, bl); - mrd = BL_CAST(BL_MER, bl); - ud = unit->bl2ud(bl); + if (check && !check_distance_bl(master_bl, slave_bl, MAX_MER_DISTANCE)) { + if (*masterteleport_timer == 0) { + *masterteleport_timer = timer->gettick(); + return 0; + } else if (DIFF_TICK(timer->gettick(), *masterteleport_timer) > 3000) { + unit->warp(slave_bl, master_bl->m, master_bl->x, master_bl->y, CLR_TELEPORT); + } + } + *masterteleport_timer = 0; // resets tick in case he isn't far anymore. - if(ud == NULL) return 0; + return 0; +} - if(ud->walktimer != tid){ +/** + * Timer for walking to target coordinates or object. + * @param tid: timer id + * @param tick: tick + * @param id: id of bl to do the action + * @param data: unused + * @return 0: success, 1: fail + */ +static int unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) +{ + struct block_list *bl = map->id2bl(id); + if (bl == NULL || bl->prev == NULL) // Stop moved because it is missing from the block_list + return 1; + struct unit_data *ud = unit->bl2ud(bl); + if (ud == NULL) + return 1; + + if (ud->walktimer != tid) { ShowError("unit_walk_timer mismatch %d != %d\n",ud->walktimer,tid); - return 0; + return 1; } ud->walktimer = INVALID_TIMER; - if (bl->prev == NULL) return 0; // Stop moved because it is missing from the block_list - if(ud->walkpath.path_pos>=ud->walkpath.path_len) - return 0; - - if(ud->walkpath.path[ud->walkpath.path_pos]>=8) + if (ud->walkpath.path_pos >= ud->walkpath.path_len) return 1; - x = bl->x; - y = bl->y; - dir = ud->walkpath.path[ud->walkpath.path_pos]; + enum unit_dir dir = ud->walkpath.path[ud->walkpath.path_pos]; + Assert_retr(1, dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); + int x = bl->x; + int y = bl->y; + ud->dir = dir; - dx = dirx[(int)dir]; - dy = diry[(int)dir]; + int dx = dirx[dir]; + int dy = diry[dir]; - //Get icewall walk block depending on boss mode (players can't be trapped) - if(md && md->status.mode&MD_BOSS) - icewall_walk_block = battle_config.boss_icewall_walk_block; - else if(md) - icewall_walk_block = battle_config.mob_icewall_walk_block; - else - icewall_walk_block = 0; + // Get icewall walk block depending on boss mode (players can't be trapped) + unsigned char icewall_walk_block = 0; + struct mob_data *md = BL_CAST(BL_MOB, bl); + if (md != NULL) { + if ((md->status.mode & MD_BOSS) != 0) + icewall_walk_block = battle_config.boss_icewall_walk_block; + else + icewall_walk_block = battle_config.mob_icewall_walk_block; + } - //Monsters will walk into an icewall from the west and south if they already started walking + // Monsters will walk into an icewall from the west and south if they already started walking if (map->getcell(bl->m, bl, x + dx, y + dy, CELL_CHKNOPASS) && (icewall_walk_block == 0 || !map->getcell(bl->m, bl, x + dx, y + dy, CELL_CHKICEWALL) || dx < 0 || dy < 0)) - return unit->walktoxy_sub(bl); + return unit->walk_toxy_sub(bl); - //Monsters can only leave icewalls to the west and south - //But if movement fails more than icewall_walk_block times, they can ignore this rule - if (md && md->walktoxy_fail_count < icewall_walk_block && map->getcell(bl->m, bl, x, y, CELL_CHKICEWALL) && (dx > 0 || dy > 0)) { - //Needs to be done here so that rudeattack skills are invoked + // Monsters can only leave icewalls to the west and south + // But if movement fails more than icewall_walk_block times, they can ignore this rule + if (md != NULL && md->walktoxy_fail_count < icewall_walk_block && map->getcell(bl->m, bl, x, y, CELL_CHKICEWALL) != 0 && (dx > 0 || dy > 0)) { + // Needs to be done here so that rudeattack skills are invoked md->walktoxy_fail_count++; clif->fixpos(bl); - //Monsters in this situation first use a chase skill, then unlock target and then use an idle skill - if (!(++ud->walk_count%WALK_SKILL_INTERVAL)) + // Monsters in this situation first use a chase skill, then unlock target and then use an idle skill + if ((++ud->walk_count % WALK_SKILL_INTERVAL) == 0) mob->skill_use(md, tick, -1); mob->unlocktarget(md, tick); - if (!(++ud->walk_count%WALK_SKILL_INTERVAL)) + if ((++ud->walk_count % WALK_SKILL_INTERVAL) != 0) mob->skill_use(md, tick, -1); - return 0; + return 1; } + struct map_session_data *sd = BL_CAST(BL_PC, bl); //Refresh view for all those we lose sight - map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->outsight, bl, AREA_SIZE, dx, dy, (sd != NULL ? BL_ALL : BL_PC), bl); x += dx; y += dy; map->moveblock(bl, x, y, tick); - ud->walk_count++; //walked cell counter, to be used for walk-triggered skills. [Skotlex] + ud->walk_count++; // walked cell counter, to be used for walk-triggered skills. [Skotlex] status_change_end(bl, SC_ROLLINGCUTTER, INVALID_TIMER); //If you move, you lose your counters. [malufett] if (bl->x != x || bl->y != y || ud->walktimer != INVALID_TIMER) - return 0; //map->moveblock has altered the object beyond what we expected (moved/warped it) + return 1; // map->moveblock has altered the object beyond what we expected (moved/warped it) ud->walktimer = -2; // arbitrary non-INVALID_TIMER value to make the clif code send walking packets - map->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, sd?BL_ALL:BL_PC, bl); + map->foreachinmovearea(clif->insight, bl, AREA_SIZE, -dx, -dy, (sd != NULL ? BL_ALL : BL_PC), bl); ud->walktimer = INVALID_TIMER; - if(sd) { - if( sd->touching_id ) - npc->touchnext_areanpc(sd,false); + struct mercenary_data *mrd = BL_CAST(BL_MER, bl); + if (sd != NULL) { + if (sd->touching_id != 0) + npc->touchnext_areanpc(sd, false); if (map->getcell(bl->m, bl, x, y, CELL_CHKNPC)) { - npc->touch_areanpc(sd,bl->m,x,y); + npc->touch_areanpc(sd, bl->m, x, y); if (bl->prev == NULL) //Script could have warped char, abort remaining of the function. return 0; - } else + } else { npc->untouch_areanpc(sd, bl->m, x, y); - - if( sd->md ) { // mercenary should be warped after being 3 seconds too far from the master [greenbox] - if( !check_distance_bl(&sd->bl, &sd->md->bl, MAX_MER_DISTANCE) ) { - if (sd->md->masterteleport_timer == 0) - sd->md->masterteleport_timer = timer->gettick(); - else if (DIFF_TICK(timer->gettick(), sd->md->masterteleport_timer) > 3000) { - sd->md->masterteleport_timer = 0; - unit->warp( &sd->md->bl, sd->bl.m, sd->bl.x, sd->bl.y, CLR_TELEPORT ); - } - } else // reset the tick, he is not far anymore - sd->md->masterteleport_timer = 0; - } - if( sd->hd ) { - if( homun_alive(sd->hd) && !check_distance_bl(&sd->bl, &sd->hd->bl, MAX_MER_DISTANCE) ) { - if (sd->hd->masterteleport_timer == 0) - sd->hd->masterteleport_timer = timer->gettick(); - else if (DIFF_TICK(timer->gettick(), sd->hd->masterteleport_timer) > 3000) { - sd->hd->masterteleport_timer = 0; - unit->warp( &sd->hd->bl, sd->bl.m, sd->bl.x, sd->bl.y, CLR_TELEPORT ); - } - } else - sd->hd->masterteleport_timer = 0; } + + if (sd->md != NULL) // mercenary should be warped after being 3 seconds too far from the master [greenbox] + unit->warpto_master(bl, &sd->md->bl); + if (sd->hd != NULL) + unit->warpto_master(bl, &sd->hd->bl); } else if (md) { - //Movement was successful, reset walktoxy_fail_count + // Movement was successful, reset walktoxy_fail_count md->walktoxy_fail_count = 0; - if (map->getcell(bl->m, bl, x, y, CELL_CHKNPC)) { - if( npc->touch_areanpc2(md) ) return 0; // Warped - } else + + if (map->getcell(bl->m, bl, x, y, CELL_CHKNPC) != 0 && npc->touch_areanpc2(md)) + return 0; // Warped + else md->areanpc_id = 0; - if (md->min_chase > md->db->range3) md->min_chase--; - //Walk skills are triggered regardless of target due to the idle-walk mob state. - //But avoid triggering on stop-walk calls. - if (tid != INVALID_TIMER - && !(ud->walk_count%WALK_SKILL_INTERVAL) - && map->list[bl->m].users > 0 - && mob->skill_use(md, tick, -1) - ) { + + if (md->min_chase > md->db->range3) + md->min_chase--; + // Walk skills are triggered regardless of target due to the idle-walk mob state. + // But avoid triggering on stop-walk calls. + if (tid != INVALID_TIMER && (ud->walk_count % WALK_SKILL_INTERVAL) == 0 + && map->list[bl->m].users > 0 && mob->skill_use(md, tick, -1) == 1) { + // Walk skills are supposed to be used while walking if (!(ud->skill_id == NPC_SELFDESTRUCTION && ud->skilltimer != INVALID_TIMER) - && md->state.skillstate != MSS_WALK //Walk skills are supposed to be used while walking - ) { - //Skill used, abort walking - clif->fixpos(bl); //Fix position as walk has been canceled. - return 0; + && md->state.skillstate != MSS_WALK) { + // Skill used, abort walking + clif->fixpos(bl); // Fix position as walk has been canceled. + return 1; } - //Resend walk packet for proper Self Destruction display. + // Resend walk packet for proper Self Destruction display. clif->move(ud); } - } - else if( mrd && mrd->master ) - { - if (!check_distance_bl(&mrd->master->bl, bl, MAX_MER_DISTANCE)) - { - // mercenary should be warped after being 3 seconds too far from the master [greenbox] - if (mrd->masterteleport_timer == 0) - { - mrd->masterteleport_timer = timer->gettick(); - } - else if (DIFF_TICK(timer->gettick(), mrd->masterteleport_timer) > 3000) - { - mrd->masterteleport_timer = 0; - unit->warp( bl, mrd->master->bl.m, mrd->master->bl.x, mrd->master->bl.y, CLR_TELEPORT ); - } - } - else - { - mrd->masterteleport_timer = 0; - } + } else if (mrd != NULL && mrd->master != NULL) { + unit->warpto_master(&mrd->master->bl, bl); } - if(tid == INVALID_TIMER) //A directly invoked timer is from battle_stop_walking, therefore the rest is irrelevant. + if(tid == INVALID_TIMER) // A directly invoked timer is from battle_stop_walking, therefore the rest is irrelevant. return 0; - //If stepaction is set then we remembered a client request that should be executed on the next step - if (ud->stepaction && ud->target_to) { - //Delete old stepaction even if not executed yet, the latest command is what counts - if(ud->steptimer != INVALID_TIMER) { - timer->delete(ud->steptimer, unit->step_timer); + // If stepaction is set then we remembered a client request that should be executed on the next step + if (ud->stepaction && ud->target_to != 0) { + // Delete old stepaction even if not executed yet, the latest command is what counts + if (ud->steptimer != INVALID_TIMER) { + timer->delete(ud->steptimer, unit->steptimer); ud->steptimer = INVALID_TIMER; } - //Delay stepactions by half a step (so they are executed at full step) - if(ud->walkpath.path[ud->walkpath.path_pos]&1) - i = status->get_speed(bl)*14/20; + // Delay stepactions by half a step (so they are executed at full step) + int timer_delay; + if ((ud->walkpath.path[ud->walkpath.path_pos] & 1) != 0) + timer_delay = status->get_speed(bl) * 14 / 20; else - i = status->get_speed(bl)/2; - ud->steptimer = timer->add(tick+i, unit->step_timer, bl->id, 0); + timer_delay = status->get_speed(bl) / 2; + ud->steptimer = timer->add(tick + timer_delay, unit->steptimer, bl->id, 0); } - if(ud->state.change_walk_target) { - if(unit->walktoxy_sub(bl)) { - return 1; - } else { - clif->fixpos(bl); + if (ud->state.change_walk_target) { + if (unit->walk_toxy_sub(bl) == 0) return 0; - } + clif->fixpos(bl); + return 1; } + int timer_delay; ud->walkpath.path_pos++; if(ud->walkpath.path_pos>=ud->walkpath.path_len) - i = -1; - else if(ud->walkpath.path[ud->walkpath.path_pos]&1) - i = status->get_speed(bl)*14/10; + timer_delay = -1; + else if ((ud->walkpath.path[ud->walkpath.path_pos] & 1) != 0) + timer_delay = status->get_speed(bl) * 14 / 10; else - i = status->get_speed(bl); + timer_delay = status->get_speed(bl); - if(i > 0) { - ud->walktimer = timer->add(tick+i,unit->walktoxy_timer,id,i); - if( md && DIFF_TICK(tick,md->dmgtick) < 3000 )//not required not damaged recently + if (timer_delay > 0) { + ud->walktimer = timer->add(tick + timer_delay, unit->walk_toxy_timer, id, 0); + if (md != NULL && DIFF_TICK(tick, md->dmgtick) < 3000) // not required not damaged recently clif->move(ud); - } else if(ud->state.running) { - //Keep trying to run. - if ( !(unit->run(bl, NULL, SC_RUN) || unit->run(bl, sd, SC_WUGDASH)) ) + } else if (ud->state.running != 0) { + // Keep trying to run. + if (!(unit->run(bl, NULL, SC_RUN) || unit->run(bl, sd, SC_WUGDASH))) ud->state.running = 0; - } else if (!ud->stepaction && ud->target_to) { - //Update target trajectory. + } else if (!ud->stepaction && ud->target_to != 0) { + // Update target trajectory. struct block_list *tbl = map->id2bl(ud->target_to); - if (!tbl || !status->check_visibility(bl, tbl)) { - //Cancel chase. + if (tbl == NULL || status->check_visibility(bl, tbl) == 0) { // not visible + // Cancel chase. ud->to_x = bl->x; ud->to_y = bl->y; - if (tbl && bl->type == BL_MOB && mob->warpchase(BL_UCAST(BL_MOB, bl), tbl)) + if (tbl != NULL && bl->type == BL_MOB && mob->warpchase(BL_UCAST(BL_MOB, bl), tbl) != 0) return 0; ud->target_to = 0; - return 0; + return 1; } if (tbl->m == bl->m && check_distance_bl(bl, tbl, ud->chaserange)) { //Reached destination. @@ -466,81 +507,106 @@ static int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) clif->fixpos(bl); unit->attack(bl, tbl->id, ud->state.attack_continue); } - } else { //Update chase-path - unit->walktobl(bl, tbl, ud->chaserange, ud->state.walk_easy|(ud->state.attack_continue? 1 : 0)); + } else { // Update chase-path + unit->walktobl(bl, tbl, ud->chaserange, ud->state.walk_easy | ud->state.attack_continue); return 0; } } else { - //Stopped walking. Update to_x and to_y to current location [Skotlex] + // Stopped walking. Update to_x and to_y to current location [Skotlex] ud->to_x = bl->x; ud->to_y = bl->y; - if (battle_config.official_cell_stack_limit && map->count_oncell(bl->m, x, y, BL_CHAR|BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { - //Walked on occupied cell, call unit_walktoxy again - if(ud->steptimer != INVALID_TIMER) { - //Execute step timer on next step instead - timer->delete(ud->steptimer, unit->step_timer); + if (battle_config.official_cell_stack_limit != 0 && map->count_oncell(bl->m, x, y, BL_CHAR | BL_NPC, 0x1 | 0x2) > battle_config.official_cell_stack_limit) { + // Walked on occupied cell, call unit->walk_toxy again + if (ud->steptimer != INVALID_TIMER) { + // Execute step timer on next step instead + timer->delete(ud->steptimer, unit->steptimer); ud->steptimer = INVALID_TIMER; } - return unit->walktoxy(bl, x, y, 8); + return unit->walk_toxy(bl, x, y, 8); } } return 0; } -static int unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) +/** + * Timer for delayed execution of unit->walk_toxy once triggered + * @param tid: Timer ID, unused + * @param tick: Tick, unused + * @param id: ID of block_list to execute the action + * @param data: uint32 data cast to intptr_t with x-coord in lowest 16 bits and y-coord in highest 16 bits + * @return 0: success, 1: failure + */ +static int unit_delay_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = map->id2bl(id); - - if (!bl || bl->prev == NULL) - return 0; - unit->walktoxy(bl, (short)((data>>16)&0xffff), (short)(data&0xffff), 0); - return 1; + if (bl == NULL || bl->prev == NULL) + return 1; + short x = (short)GetWord((uint32)data, 0); + short y = (short)GetWord((uint32)data, 1); + unit->walk_toxy(bl, x, y, 0); + return 0; } -//flag parameter: -//&1 -> 1/0 = easy/hard -//&2 -> force walking -//&4 -> Delay walking if the reason you can't walk is the canwalk delay -//&8 -> Search for an unoccupied cell and cancel if none available -static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) +/** + * Makes a unit walk to (x, y) coordinates + * @param bl: block_list of unit to move + * @param x: x-coordinate + * @param y: y-coordinate + * @param flag: flag paramater with following options: + * - `& 1` -> 1/0 = easy / hard + * - `& 2` -> Force walking + * - `& 4` -> Delay walking, if the reason you can't walk is the `canwalk delay` + * - `& 8` -> Search for an unoccupied cell and cancel if none available + * . + * @return 0: success, 1: failure + */ +static int unit_walk_toxy(struct block_list *bl, short x, short y, int flag) { + // TODO: change flag to enum? [skyleo] struct unit_data* ud = NULL; struct status_change* sc = NULL; struct walkpath_data wpd; - nullpo_ret(bl); + nullpo_retr(1, bl); ud = unit->bl2ud(bl); - if( ud == NULL) return 0; + if (ud == NULL) + return 1; - if (battle_config.check_occupied_cells && (flag&8) && !map->closest_freecell(bl->m, bl, &x, &y, BL_CHAR|BL_NPC, 1)) //This might change x and y - return 0; + if ((flag & 8) != 0 && battle_config.check_occupied_cells != 0) { + if (!map->closest_freecell(bl->m, bl, &x, &y, BL_CHAR | BL_NPC, 1)) // This might change x and y + return 1; + } - if (!path->search(&wpd, bl, bl->m, bl->x, bl->y, x, y, flag&1, CELL_CHKNOPASS)) // Count walk path cells - return 0; + if (!path->search(&wpd, bl, bl->m, bl->x, bl->y, x, y, flag & 1, CELL_CHKNOPASS)) // Count walk path cells + return 1; + if (bl->type != BL_NPC) { #ifdef OFFICIAL_WALKPATH - if( !path->search_long(NULL, bl, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) // Check if there is an obstacle between - && (wpd.path_len > (battle_config.max_walk_path/17)*14) // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] - && (bl->type != BL_NPC) ) // If type is a NPC, please disregard. - return 0; + // Check if there is an obstacle between + // Official number of walkable cells is 14 if and only if there is an obstacle between. [malufett] + if (!path->search_long(NULL, bl, bl->m, bl->x, bl->y, x, y, CELL_CHKNOPASS) + && (wpd.path_len > (battle_config.max_walk_path / 17) * 14)) + return 1; #endif - if ((wpd.path_len > battle_config.max_walk_path) && (bl->type != BL_NPC)) - return 0; + if (wpd.path_len > battle_config.max_walk_path) + return 1; + } - if (flag&4 && DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0 && - DIFF_TICK(ud->canmove_tick, timer->gettick()) < 2000) { + if ((flag & 4) != 0 && DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0 + && DIFF_TICK(ud->canmove_tick, timer->gettick()) < 2000) { // Delay walking command. [Skotlex] - timer->add(ud->canmove_tick+1, unit->delay_walktoxy_timer, bl->id, (x<<16)|(y&0xFFFF)); - return 1; + timer->add(ud->canmove_tick + 1, unit->delay_walk_toxy_timer, bl->id, + (intptr_t)MakeDWord((uint16)x, (uint16)y)); + return 0; } - if(!(flag&2) && (!(status_get_mode(bl)&MD_CANMOVE) || !unit->can_move(bl))) - return 0; + if ((flag & 2) == 0 && ((status_get_mode(bl) & MD_CANMOVE) == 0 || unit->can_move(bl) == 0)) + return 1; - ud->state.walk_easy = flag&1; + ud->state.walk_easy = flag & 1; ud->to_x = x; ud->to_y = y; unit->stop_attack(bl); //Sets target to 0 @@ -548,44 +614,63 @@ static int unit_walktoxy(struct block_list *bl, short x, short y, int flag) unit->stop_stepaction(bl); // unit->walktoxy removes any remembered stepaction and resets ud->target_to sc = status->get_sc(bl); - if( sc ) { - if( sc->data[SC_CONFUSION] || sc->data[SC__CHAOS] ) //Randomize the target position + if (sc != NULL) { + if (sc->data[SC_CONFUSION] != NULL || sc->data[SC__CHAOS] != NULL) // Randomize the target position map->random_dir(bl, &ud->to_x, &ud->to_y); - if( sc->data[SC_COMBOATTACK] ) + if (sc->data[SC_COMBOATTACK] != NULL) status_change_end(bl, SC_COMBOATTACK, INVALID_TIMER); } - if(ud->walktimer != INVALID_TIMER) { + if (ud->walktimer != INVALID_TIMER) { // When you come to the center of the grid because the change of destination while you're walking right now - // Call a function from a timer unit->walktoxy_sub + // Call a function from a timer unit->walk_toxy_sub ud->state.change_walk_target = 1; - return 1; + return 0; } - return unit->walktoxy_sub(bl); + return unit->walk_toxy_sub(bl); } -//To set Mob's CHASE/FOLLOW states (shouldn't be done if there's no path to reach) -static inline void set_mobstate(struct block_list *bl, int flag) +/** + * Sets CHASE / FOLLOW states, in case bl is a mob. + * WARNING: This shouldn't be done if there's no path to reach + * @param bl: block_list of mob + */ +static inline void set_mobstate(struct block_list *bl) { - struct mob_data* md = BL_CAST(BL_MOB,bl); + struct mob_data* md = BL_CAST(BL_MOB, bl); - if( md && flag ) - md->state.skillstate = md->state.aggressive ? MSS_FOLLOW : MSS_RUSH; + if (md != NULL) { + if (md->state.aggressive != 0) + md->state.skillstate = MSS_FOLLOW; + else + md->state.skillstate = MSS_RUSH; + } } -static int unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) +/** + * Timer used for when a unit can't walk towards its target yet due to it's canmove_tick, + * keeps retrying until it works or target changes. + * @param tid: Timer ID, unused + * @param tick: Tick, unused + * @param id: ID of block_list to execute the action + * @param data: ID of block_list to walk towards + * @return 0: success, 1: failure + */ +static int unit_walktobl_timer(int tid, int64 tick, int id, intptr_t data) { struct block_list *bl = map->id2bl(id); - struct unit_data *ud = bl?unit->bl2ud(bl):NULL; - - if (ud && ud->walktimer == INVALID_TIMER && ud->target == data) { - if (DIFF_TICK(ud->canmove_tick, tick) > 0) //Keep waiting? - timer->add(ud->canmove_tick+1, unit->walktobl_sub, id, data); - else if (unit->can_move(bl)) { - if (unit->walktoxy_sub(bl)) - set_mobstate(bl, ud->state.attack_continue); - } + if (bl == NULL) + return 1; + struct unit_data *ud = unit->bl2ud(bl); + if (ud == NULL) + return 1; + + if (ud->walktimer == INVALID_TIMER && ud->target == data) { + if (DIFF_TICK(ud->canmove_tick, tick) > 0) // Keep waiting? + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, id, data); + else if (unit->can_move(bl) != 0 && unit->walk_toxy_sub(bl) == 0 && ud->state.attack_continue != 0) + set_mobstate(bl); } return 0; } @@ -629,22 +714,23 @@ static int unit_walktobl(struct block_list *bl, struct block_list *tbl, int rang if(ud->walktimer != INVALID_TIMER) { ud->state.change_walk_target = 1; - set_mobstate(bl, flag&2); + if ((flag & 2) != 0) + set_mobstate(bl); return 1; } if (DIFF_TICK(ud->canmove_tick, timer->gettick()) > 0) { //Can't move, wait a bit before invoking the movement. - timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, bl->id, ud->target); return 1; } if(!unit->can_move(bl)) return 0; - if (unit->walktoxy_sub(bl)) { - set_mobstate(bl, flag&2); - return 1; + if (unit->walk_toxy_sub(bl) == 0 && (flag & 2) != 0) { + set_mobstate(bl); + return 0; } return 0; } @@ -732,14 +818,14 @@ static bool unit_run(struct block_list *bl, struct map_session_data *sd, enum sc return false; } - if( unit->walktoxy(bl, to_x, to_y, 1) ) + if (unit->walk_toxy(bl, to_x, to_y, 1) == 0) return true; //There must be an obstacle nearby. Attempt walking one cell at a time. do { to_x -= dir_x; to_y -= dir_y; - } while (--i > 0 && !unit->walktoxy(bl, to_x, to_y, 1)); + } while (--i > 0 && unit->walk_toxy(bl, to_x, to_y, 1) != 0); if ( i == 0 ) { unit->run_hit(bl, sc, sd, type); @@ -752,19 +838,21 @@ static bool unit_run(struct block_list *bl, struct map_session_data *sd, enum sc //Makes bl attempt to run dist cells away from target. Uses hard-paths. static int unit_escape(struct block_list *bl, struct block_list *target, short dist) { - uint8 dir; nullpo_ret(bl); - dir = map->calc_dir(target, bl->x, bl->y); + enum unit_dir dir = map->calc_dir(target, bl->x, bl->y); + Assert_retr(1, dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); while (dist > 0 && map->getcell(bl->m, bl, bl->x + dist * dirx[dir], bl->y + dist * diry[dir], CELL_CHKNOREACH)) dist--; - return ( dist > 0 && unit->walktoxy(bl, bl->x + dist*dirx[dir], bl->y + dist*diry[dir], 0) ); + if (dist > 0 && unit->walk_toxy(bl, bl->x + dist * dirx[dir], bl->y + dist * diry[dir], 0) == 0) + return 1; + else + return 0; } //Instant warp function. static int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) { short dx,dy; - uint8 dir; struct unit_data *ud = NULL; struct map_session_data *sd = NULL; @@ -783,7 +871,7 @@ static int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int eas ud->to_x = dst_x; ud->to_y = dst_y; - dir = map->calc_dir(bl, dst_x, dst_y); + enum unit_dir dir = map->calc_dir(bl, dst_x, dst_y); ud->dir = dir; dx = dst_x - bl->x; @@ -825,12 +913,18 @@ static int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int eas return 1; } -static int unit_setdir(struct block_list *bl, unsigned char dir) +/** + * Sets the facing direction of a unit + * @param bl: unit to modify + * @param dir: the facing direction @see enum unit_dir + * @return 0: success, 1: failure + */ +static int unit_set_dir(struct block_list *bl, enum unit_dir dir) { - struct unit_data *ud; - nullpo_ret(bl ); - ud = unit->bl2ud(bl); - if (!ud) return 0; + nullpo_retr(1, bl); + struct unit_data *ud = unit->bl2ud(bl); + if (ud == NULL) + return 1; ud->dir = dir; if (bl->type == BL_PC) BL_UCAST(BL_PC, bl)->head_dir = 0; @@ -838,15 +932,20 @@ static int unit_setdir(struct block_list *bl, unsigned char dir) return 0; } -static uint8 unit_getdir(struct block_list *bl) +/** + * Get the facing direction of a unit + * @param bl: unit to request data from + * @return the facing direction @see enum unit_dir + */ +static enum unit_dir unit_getdir(const struct block_list *bl) { - struct unit_data *ud; - nullpo_ret(bl); + nullpo_retr(UNIT_DIR_NORTH, bl); - if( bl->type == BL_NPC ) + if (bl->type == BL_NPC) return BL_UCCAST(BL_NPC, bl)->dir; - ud = unit->bl2ud(bl); - if (!ud) return 0; + const struct unit_data *ud = unit->cbl2ud(bl); + if (ud == NULL) + return UNIT_DIR_NORTH; return ud->dir; } @@ -1010,7 +1109,7 @@ static int unit_stop_walking(struct block_list *bl, int flag) //timer->delete function does not messes with it. If the function's //behavior changes in the future, this code could break! td = timer->get(ud->walktimer); - timer->delete(ud->walktimer, unit->walktoxy_timer); + timer->delete(ud->walktimer, unit->walk_toxy_timer); ud->walktimer = INVALID_TIMER; ud->state.change_walk_target = 0; tick = timer->gettick(); @@ -1018,7 +1117,7 @@ static int unit_stop_walking(struct block_list *bl, int flag) || (flag&STOPWALKING_FLAG_NEXTCELL && td && DIFF_TICK(td->tick, tick) <= td->data/2) //Enough time has passed to cover half-cell ) { ud->walkpath.path_len = ud->walkpath.path_pos+1; - unit->walktoxy_timer(INVALID_TIMER, tick, bl->id, ud->walkpath.path_pos); + unit->walk_toxy_timer(INVALID_TIMER, tick, bl->id, ud->walkpath.path_pos); } if(flag&STOPWALKING_FLAG_FIXPOS) @@ -1041,11 +1140,15 @@ static int unit_stop_walking(struct block_list *bl, int flag) static int unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv) { - return unit->skilluse_id2( - src, target_id, skill_id, skill_lv, - skill->cast_fix(src, skill_id, skill_lv), - skill->get_castcancel(skill_id) - ); + int casttime = skill->cast_fix(src, skill_id, skill_lv); + int castcancel = skill->get_castcancel(skill_id); + int ret = unit->skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel); + struct map_session_data *sd = BL_CAST(BL_PC, src); + + if (sd != NULL) + pc->itemskill_clear(sd); + + return ret; } static int unit_is_walking(struct block_list *bl) @@ -1231,7 +1334,7 @@ static int unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int } else { unit->stop_walking(bl, STOPWALKING_FLAG_NEXTCELL); if (ud->target) - timer->add(ud->canmove_tick+1, unit->walktobl_sub, bl->id, ud->target); + timer->add(ud->canmove_tick + 1, unit->walktobl_timer, bl->id, ud->target); } } } @@ -1418,15 +1521,8 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill } } - if (sd) { - /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */ -#if 0 - if (sd->skillitem != skill_id && !skill->check_condition_castbegin(sd, skill_id, skill_lv)) -#else - if (!skill->check_condition_castbegin(sd, skill_id, skill_lv)) -#endif - return 0; - } + if (sd != NULL && skill->check_condition_castbegin(sd, skill_id, skill_lv) == 0) + return 0; if (src->type == BL_MOB) { const struct mob_data *src_md = BL_UCCAST(BL_MOB, src); @@ -1453,7 +1549,7 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill ud->target_to = target_id; ud->stepskill_id = skill_id; ud->stepskill_lv = skill_lv; - return 0; // Attacking will be handled by unit_walktoxy_timer in this case + return 0; // Attacking will be handled by unit_walk_toxy_timer in this case } //Check range when not using skill on yourself or is a combo-skill during attack @@ -1609,6 +1705,9 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill if (!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026 unit->stop_walking(src, STOPWALKING_FLAG_FIXPOS);// even though this is not how official works but this will do the trick. bugreport:6829 + if (sd != NULL && sd->state.itemskill_no_casttime == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) + casttime = 0; + // in official this is triggered even if no cast time. clif->useskill(src, src->id, target_id, 0,0, skill_id, skill_lv, casttime); if( casttime > 0 || temp ) @@ -1663,7 +1762,7 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill if( casttime > 0 ) { if (src->id != target->id) // self-targeted skills shouldn't show different direction - unit->setdir(src, map->calc_dir(src, target->x, target->y)); + unit->set_dir(src, map->calc_dir(src, target->x, target->y)); ud->skilltimer = timer->add( tick+casttime, skill->castend_id, src->id, 0 ); if (sd && (pc->checkskill(sd, SA_FREECAST) > 0 || skill_id == LG_EXEEDBREAK || (skill->get_inf2(ud->skill_id) & INF2_FREE_CAST_REDUCED) != 0)) status_calc_bl(&sd->bl, SCB_SPEED|SCB_ASPD); @@ -1678,11 +1777,15 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill static int unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv) { - return unit->skilluse_pos2( - src, skill_x, skill_y, skill_id, skill_lv, - skill->cast_fix(src, skill_id, skill_lv), - skill->get_castcancel(skill_id) - ); + int casttime = skill->cast_fix(src, skill_id, skill_lv); + int castcancel = skill->get_castcancel(skill_id); + int ret = unit->skilluse_pos2(src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel); + struct map_session_data *sd = BL_CAST(BL_PC, src); + + if (sd != NULL) + pc->itemskill_clear(sd); + + return ret; } static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel) @@ -1753,7 +1856,7 @@ static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill ud->target_to = (skill_x + skill_y*md->xs); ud->stepskill_id = skill_id; ud->stepskill_lv = skill_lv; - return 0; // Attacking will be handled by unit_walktoxy_timer in this case + return 0; // Attacking will be handled by unit_walk_toxy_timer in this case } if( skill->get_state(ud->skill_id) == ST_MOVE_ENABLE ) { @@ -1807,10 +1910,14 @@ static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill } unit->stop_walking(src, STOPWALKING_FLAG_FIXPOS); + + if (sd != NULL && sd->state.itemskill_no_casttime == 1 && skill->is_item_skill(sd, skill_id, skill_lv)) + casttime = 0; + // in official this is triggered even if no cast time. clif->useskill(src, src->id, 0, skill_x, skill_y, skill_id, skill_lv, casttime); if( casttime > 0 ) { - unit->setdir(src, map->calc_dir(src, skill_x, skill_y)); + unit->set_dir(src, map->calc_dir(src, skill_x, skill_y)); ud->skilltimer = timer->add( tick+casttime, skill->castend_pos, src->id, 0 ); if ((sd && pc->checkskill(sd, SA_FREECAST) > 0) || skill_id == LG_EXEEDBREAK || (skill->get_inf2(ud->skill_id) & INF2_FREE_CAST_REDUCED) != 0) { status_calc_bl(&sd->bl, SCB_SPEED|SCB_ASPD); @@ -1889,7 +1996,7 @@ static void unit_stop_stepaction(struct block_list *bl) return; //Clear timer - timer->delete(ud->steptimer, unit->step_timer); + timer->delete(ud->steptimer, unit->steptimer); ud->steptimer = INVALID_TIMER; } @@ -1973,7 +2080,7 @@ static int unit_attack(struct block_list *src, int target_id, int continuous) ud->target_to = ud->target; ud->stepskill_id = 0; ud->stepskill_lv = 0; - return 0; // Attacking will be handled by unit_walktoxy_timer in this case + return 0; // Attacking will be handled by unit_walk_toxy_timer in this case } if(DIFF_TICK(ud->attackabletime, timer->gettick()) > 0) @@ -2074,14 +2181,13 @@ static bool unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int /*========================================== * Calculates position of Pet/Mercenary/Homunculus/Elemental *------------------------------------------*/ -static int unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) +static int unit_calc_pos(struct block_list *bl, int tx, int ty, enum unit_dir dir) { int dx, dy, x, y; struct unit_data *ud = unit->bl2ud(bl); nullpo_ret(ud); - if(dir > 7) - return 1; + Assert_retr(1, dir >= UNIT_DIR_FIRST && dir < UNIT_DIR_MAX); ud->to_x = tx; ud->to_y = ty; @@ -2098,7 +2204,7 @@ static int unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) if (!unit->can_reach_pos(bl, x, y, 0)) { int i; for (i = 0; i < 12; i++) { - int k = rnd()%8; // Pick a Random Dir + enum unit_dir k = rnd() % UNIT_DIR_MAX; // Pick a Random Dir dx = -dirx[k] * 2; dy = -diry[k] * 2; x = tx + dx; @@ -2264,7 +2370,7 @@ static int unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) } if(ud->state.attack_continue) { - unit->setdir(src, map->calc_dir(src, target->x, target->y)); + unit->set_dir(src, map->calc_dir(src, target->x, target->y)); if( src->type == BL_PC ) pc->update_idle_time(sd, BCIDLE_ATTACK); ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); @@ -2961,10 +3067,10 @@ static int do_init_unit(bool minimal) return 0; timer->add_func_list(unit->attack_timer, "unit_attack_timer"); - timer->add_func_list(unit->walktoxy_timer,"unit_walktoxy_timer"); - timer->add_func_list(unit->walktobl_sub, "unit_walktobl_sub"); - timer->add_func_list(unit->delay_walktoxy_timer,"unit_delay_walktoxy_timer"); - timer->add_func_list(unit->step_timer,"unit_step_timer"); + timer->add_func_list(unit->walk_toxy_timer, "unit_walk_toxy_timer"); + timer->add_func_list(unit->walktobl_timer, "unit_walktobl_timer"); + timer->add_func_list(unit->delay_walk_toxy_timer, "unit_delay_walk_toxy_timer"); + timer->add_func_list(unit->steptimer, "unit_steptimer"); return 0; } @@ -2982,26 +3088,28 @@ void unit_defaults(void) unit->final = do_final_unit; /* */ unit->bl2ud = unit_bl2ud; + unit->cbl2ud = unit_cbl2ud; unit->bl2ud2 = unit_bl2ud2; unit->init_ud = unit_init_ud; unit->attack_timer = unit_attack_timer; - unit->walktoxy_timer = unit_walktoxy_timer; - unit->walktoxy_sub = unit_walktoxy_sub; - unit->delay_walktoxy_timer = unit_delay_walktoxy_timer; - unit->walktoxy = unit_walktoxy; - unit->walktobl_sub = unit_walktobl_sub; + unit->walk_toxy_timer = unit_walk_toxy_timer; + unit->walk_toxy_sub = unit_walk_toxy_sub; + unit->delay_walk_toxy_timer = unit_delay_walk_toxy_timer; + unit->walk_toxy = unit_walk_toxy; + unit->walktobl_timer = unit_walktobl_timer; unit->walktobl = unit_walktobl; unit->run = unit_run; unit->run_hit = unit_run_hit; unit->escape = unit_escape; unit->movepos = unit_movepos; - unit->setdir = unit_setdir; + unit->set_dir = unit_set_dir; unit->getdir = unit_getdir; unit->blown = unit_blown; unit->warp = unit_warp; + unit->warpto_master = unit_warpto_master; unit->stop_walking = unit_stop_walking; unit->skilluse_id = unit_skilluse_id; - unit->step_timer = unit_step_timer; + unit->steptimer = unit_steptimer; unit->stop_stepaction = unit_stop_stepaction; unit->is_walking = unit_is_walking; unit->can_move = unit_can_move; diff --git a/src/map/unit.h b/src/map/unit.h index 5437a172a..3f288e0d3 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -24,6 +24,7 @@ #include "map/clif.h" // clr_type #include "map/path.h" // struct walkpath_data #include "map/skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "map/unitdefines.h" // enum unit_dir #include "common/hercules.h" struct map_session_data; @@ -67,7 +68,7 @@ struct unit_data { int64 attackabletime; int64 canact_tick; int64 canmove_tick; - uint8 dir; + enum unit_dir dir; unsigned char walk_count; unsigned char target_count; struct { @@ -102,26 +103,28 @@ struct unit_interface { int (*final) (void); /* */ struct unit_data* (*bl2ud) (struct block_list *bl); + const struct unit_data* (*cbl2ud) (const struct block_list *bl); struct unit_data* (*bl2ud2) (struct block_list *bl); void (*init_ud) (struct unit_data *ud); int (*attack_timer) (int tid, int64 tick, int id, intptr_t data); - int (*walktoxy_timer) (int tid, int64 tick, int id, intptr_t data); - int (*walktoxy_sub) (struct block_list *bl); - int (*delay_walktoxy_timer) (int tid, int64 tick, int id, intptr_t data); - int (*walktoxy) (struct block_list *bl, short x, short y, int flag); - int (*walktobl_sub) (int tid, int64 tick, int id, intptr_t data); + int (*walk_toxy_timer) (int tid, int64 tick, int id, intptr_t data); + int (*walk_toxy_sub) (struct block_list *bl); + int (*delay_walk_toxy_timer) (int tid, int64 tick, int id, intptr_t data); + int (*walk_toxy) (struct block_list *bl, short x, short y, int flag); + int (*walktobl_timer) (int tid, int64 tick, int id, intptr_t data); int (*walktobl) (struct block_list *bl, struct block_list *tbl, int range, int flag); bool (*run) (struct block_list *bl, struct map_session_data *sd, enum sc_type type); void (*run_hit) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type); int (*escape) (struct block_list *bl, struct block_list *target, short dist); int (*movepos) (struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath); - int (*setdir) (struct block_list *bl, unsigned char dir); - uint8 (*getdir) (struct block_list *bl); + int (*set_dir) (struct block_list *bl, enum unit_dir dir); + enum unit_dir (*getdir) (const struct block_list *bl); int (*blown) (struct block_list *bl, int dx, int dy, int count, int flag); int (*warp) (struct block_list *bl, short m, short x, short y, enum clr_type type); + int (*warpto_master) (struct block_list *master_bl, struct block_list *slave_bl); int (*stop_walking) (struct block_list *bl, int type); int (*skilluse_id) (struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv); - int (*step_timer) (int tid, int64 tick, int id, intptr_t data); + int (*steptimer) (int tid, int64 tick, int id, intptr_t data); void (*stop_stepaction) (struct block_list *bl); int (*is_walking) (struct block_list *bl); int (*can_move) (struct block_list *bl); @@ -137,7 +140,7 @@ struct unit_interface { int (*cancel_combo) (struct block_list *bl); bool (*can_reach_pos) (struct block_list *bl, int x, int y, int easy); bool (*can_reach_bl) (struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y); - int (*calc_pos) (struct block_list *bl, int tx, int ty, uint8 dir); + int (*calc_pos) (struct block_list *bl, int tx, int ty, enum unit_dir dir); int (*attack_timer_sub) (struct block_list *src, int tid, int64 tick); int (*skillcastcancel) (struct block_list *bl, int type); void (*dataset) (struct block_list *bl); diff --git a/src/map/unitdefines.h b/src/map/unitdefines.h new file mode 100644 index 000000000..0ee30998c --- /dev/null +++ b/src/map/unitdefines.h @@ -0,0 +1,58 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2012-2019 Hercules Dev Team + * Copyright (C) Athena Dev Teams + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef MAP_UNITDEFINES_H +#define MAP_UNITDEFINES_H + +/** + * Used for directions, @see unit_data.dir + */ +enum unit_dir { + UNIT_DIR_UNDEFINED = -1, + UNIT_DIR_FIRST = 0, + UNIT_DIR_NORTH = 0, + UNIT_DIR_NORTHWEST = 1, + UNIT_DIR_WEST = 2, + UNIT_DIR_SOUTHWEST = 3, + UNIT_DIR_SOUTH = 4, + UNIT_DIR_SOUTHEAST = 5, + UNIT_DIR_EAST = 6, + UNIT_DIR_NORTHEAST = 7, + UNIT_DIR_MAX = 8, + /* IMPORTANT: Changing the order would break the above macros + * and several usages of directions anywhere */ +}; + +/* Returns the opposite of the facing direction */ +#define unit_get_opposite_dir(dir) ( ((dir) + 4) % UNIT_DIR_MAX ) + +/* Returns true when direction is diagonal/combined (ex. UNIT_DIR_NORTHWEST, UNIT_DIR_SOUTHWEST, ...) */ +#define unit_is_diagonal_dir(dir) ( ((dir) % 2) == UNIT_DIR_NORTHWEST ) + +/* Returns true if direction equals val or the opposite direction of val */ +#define unit_is_dir_or_opposite(dir, val) ( ((dir) % 4) == (val) ) + +/* Returns the next direction after 90° CCW on a compass */ +#define unit_get_ccw90_dir(dir) ( ((dir) + 2) % UNIT_DIR_MAX ) + +/* Returns a random diagonal direction */ +#define unit_get_rnd_diagonal_dir() ( UNIT_DIR_NORTHWEST + 2 * (rnd() % 4) ) + +#endif /* MAP_UNITDEFINES_H */ diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 1f34dfdd4..28f81b97f 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -1514,6 +1514,8 @@ typedef void (*HPMHOOK_pre_clif_misceffect) (struct block_list **bl, int *type); typedef void (*HPMHOOK_post_clif_misceffect) (struct block_list *bl, int type); typedef void (*HPMHOOK_pre_clif_changeoption) (struct block_list **bl); typedef void (*HPMHOOK_post_clif_changeoption) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_changeoption_target) (struct block_list **bl, struct block_list **target_bl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_changeoption_target) (struct block_list *bl, struct block_list *target_bl, enum send_target target); typedef void (*HPMHOOK_pre_clif_changeoption2) (struct block_list **bl); typedef void (*HPMHOOK_post_clif_changeoption2) (struct block_list *bl); typedef void (*HPMHOOK_pre_clif_emotion) (struct block_list **bl, int *type); @@ -2712,6 +2714,12 @@ typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_d typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCExpandedBarterClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCExpandedBarterClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCExpandedBarterPurchase) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCExpandedBarterPurchase) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_npc_expanded_barter_open) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_npc_expanded_barter_open) (struct map_session_data *sd, struct npc_data *nd); typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pPing) (int *fd, struct map_session_data **sd); @@ -2844,8 +2852,8 @@ typedef void (*HPMHOOK_pre_duel_leave) (const unsigned int *did, struct map_sess typedef void (*HPMHOOK_post_duel_leave) (const unsigned int did, struct map_session_data *sd); typedef void (*HPMHOOK_pre_duel_showinfo) (const unsigned int *did, struct map_session_data **sd); typedef void (*HPMHOOK_post_duel_showinfo) (const unsigned int did, struct map_session_data *sd); -typedef int (*HPMHOOK_pre_duel_checktime) (struct map_session_data **sd); -typedef int (*HPMHOOK_post_duel_checktime) (int retVal___, struct map_session_data *sd); +typedef int64 (*HPMHOOK_pre_duel_difftime) (struct map_session_data **sd); +typedef int64 (*HPMHOOK_post_duel_difftime) (int64 retVal___, struct map_session_data *sd); typedef void (*HPMHOOK_pre_duel_init) (bool *minimal); typedef void (*HPMHOOK_post_duel_init) (bool minimal); typedef void (*HPMHOOK_pre_duel_final) (void); @@ -3532,10 +3540,14 @@ typedef bool (*HPMHOOK_post_inter_mercenary_delete) (bool retVal___, int merc_id #ifdef CHAR_INT_PARTY_H /* inter_party */ typedef int (*HPMHOOK_pre_inter_party_check_lv) (struct party_data **p); typedef int (*HPMHOOK_post_inter_party_check_lv) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_is_family_party) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_is_family_party) (int retVal___, struct party_data *p); typedef void (*HPMHOOK_pre_inter_party_calc_state) (struct party_data **p); typedef void (*HPMHOOK_post_inter_party_calc_state) (struct party_data *p); typedef int (*HPMHOOK_pre_inter_party_tosql) (struct party **p, int *flag, int *index); typedef int (*HPMHOOK_post_inter_party_tosql) (int retVal___, struct party *p, int flag, int index); +typedef int (*HPMHOOK_pre_inter_party_del_nonexistent_party) (int *party_id); +typedef int (*HPMHOOK_post_inter_party_del_nonexistent_party) (int retVal___, int party_id); typedef struct party_data* (*HPMHOOK_pre_inter_party_fromsql) (int *party_id); typedef struct party_data* (*HPMHOOK_post_inter_party_fromsql) (struct party_data* retVal___, int party_id); typedef int (*HPMHOOK_pre_inter_party_sql_init) (void); @@ -3562,8 +3574,8 @@ typedef bool (*HPMHOOK_pre_inter_party_add_member) (int *party_id, const struct typedef bool (*HPMHOOK_post_inter_party_add_member) (bool retVal___, int party_id, const struct party_member *member); typedef bool (*HPMHOOK_pre_inter_party_change_option) (int *party_id, int *account_id, int *exp, int *item, int *map_fd); typedef bool (*HPMHOOK_post_inter_party_change_option) (bool retVal___, int party_id, int account_id, int exp, int item, int map_fd); -typedef bool (*HPMHOOK_pre_inter_party_change_map) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); -typedef bool (*HPMHOOK_post_inter_party_change_map) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); +typedef bool (*HPMHOOK_pre_inter_party_change_map) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, int *lv); +typedef bool (*HPMHOOK_post_inter_party_change_map) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, int lv); typedef bool (*HPMHOOK_pre_inter_party_disband) (int *party_id); typedef bool (*HPMHOOK_post_inter_party_disband) (bool retVal___, int party_id); typedef bool (*HPMHOOK_pre_inter_party_change_leader) (int *party_id, int *account_id, int *char_id); @@ -4722,10 +4734,10 @@ typedef uint32 (*HPMHOOK_pre_map_race_id2mask) (int *race); typedef uint32 (*HPMHOOK_post_map_race_id2mask) (uint32 retVal___, int race); typedef void (*HPMHOOK_pre_map_reloadnpc) (bool *clear); typedef void (*HPMHOOK_post_map_reloadnpc) (bool clear); -typedef int (*HPMHOOK_pre_map_check_dir) (int *s_dir, int *t_dir); -typedef int (*HPMHOOK_post_map_check_dir) (int retVal___, int s_dir, int t_dir); -typedef uint8 (*HPMHOOK_pre_map_calc_dir) (struct block_list **src, int16 *x, int16 *y); -typedef uint8 (*HPMHOOK_post_map_calc_dir) (uint8 retVal___, struct block_list *src, int16 x, int16 y); +typedef int (*HPMHOOK_pre_map_check_dir) (enum unit_dir *s_dir, enum unit_dir *t_dir); +typedef int (*HPMHOOK_post_map_check_dir) (int retVal___, enum unit_dir s_dir, enum unit_dir t_dir); +typedef enum unit_dir (*HPMHOOK_pre_map_calc_dir) (const struct block_list **src, int16 *x, int16 *y); +typedef enum unit_dir (*HPMHOOK_post_map_calc_dir) (enum unit_dir retVal___, const struct block_list *src, int16 x, int16 y); typedef int (*HPMHOOK_pre_map_random_dir) (struct block_list **bl, short **x, short **y); typedef int (*HPMHOOK_post_map_random_dir) (int retVal___, struct block_list *bl, short *x, short *y); typedef int (*HPMHOOK_pre_map_cleanup_sub) (struct block_list **bl, va_list ap); @@ -5324,22 +5336,22 @@ typedef struct view_data* (*HPMHOOK_pre_mob_get_viewdata) (int *class_); typedef struct view_data* (*HPMHOOK_post_mob_get_viewdata) (struct view_data* retVal___, int class_); typedef int (*HPMHOOK_pre_mob_parse_dataset) (struct spawn_data **data); typedef int (*HPMHOOK_post_mob_parse_dataset) (int retVal___, struct spawn_data *data); -typedef struct mob_data* (*HPMHOOK_pre_mob_spawn_dataset) (struct spawn_data **data); -typedef struct mob_data* (*HPMHOOK_post_mob_spawn_dataset) (struct mob_data* retVal___, struct spawn_data *data); +typedef struct mob_data* (*HPMHOOK_pre_mob_spawn_dataset) (struct spawn_data **data, int *npc_id); +typedef struct mob_data* (*HPMHOOK_post_mob_spawn_dataset) (struct mob_data* retVal___, struct spawn_data *data, int npc_id); typedef int (*HPMHOOK_pre_mob_get_random_id) (int *type, int *flag, int *lv); typedef int (*HPMHOOK_post_mob_get_random_id) (int retVal___, int type, int flag, int lv); typedef bool (*HPMHOOK_pre_mob_ksprotected) (struct block_list **src, struct block_list **target); typedef bool (*HPMHOOK_post_mob_ksprotected) (bool retVal___, struct block_list *src, struct block_list *target); -typedef struct mob_data* (*HPMHOOK_pre_mob_once_spawn_sub) (struct block_list **bl, int16 *m, int16 *x, int16 *y, const char **mobname, int *class_, const char **event, unsigned int *size, unsigned int *ai); -typedef struct mob_data* (*HPMHOOK_post_mob_once_spawn_sub) (struct mob_data* retVal___, struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai); +typedef struct mob_data* (*HPMHOOK_pre_mob_once_spawn_sub) (struct block_list **bl, int16 *m, int16 *x, int16 *y, const char **mobname, int *class_, const char **event, unsigned int *size, unsigned int *ai, int *npc_id); +typedef struct mob_data* (*HPMHOOK_post_mob_once_spawn_sub) (struct mob_data* retVal___, struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai, int npc_id); typedef int (*HPMHOOK_pre_mob_once_spawn) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y, const char **mobname, int *class_, int *amount, const char **event, unsigned int *size, unsigned int *ai); typedef int (*HPMHOOK_post_mob_once_spawn) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai); typedef int (*HPMHOOK_pre_mob_once_spawn_area) (struct map_session_data **sd, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, const char **mobname, int *class_, int *amount, const char **event, unsigned int *size, unsigned int *ai); typedef int (*HPMHOOK_post_mob_once_spawn_area) (int retVal___, struct map_session_data *sd, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, const char *mobname, int class_, int amount, const char *event, unsigned int size, unsigned int ai); -typedef int (*HPMHOOK_pre_mob_spawn_guardian) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index); -typedef int (*HPMHOOK_post_mob_spawn_guardian) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index); -typedef int (*HPMHOOK_pre_mob_spawn_bg) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id); -typedef int (*HPMHOOK_post_mob_spawn_bg) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id); +typedef int (*HPMHOOK_pre_mob_spawn_guardian) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index, int *npc_id); +typedef int (*HPMHOOK_post_mob_spawn_guardian) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id); +typedef int (*HPMHOOK_pre_mob_spawn_bg) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id, int *npc_id); +typedef int (*HPMHOOK_post_mob_spawn_bg) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id); typedef int (*HPMHOOK_pre_mob_can_reach) (struct mob_data **md, struct block_list **bl, int *range, int *state); typedef int (*HPMHOOK_post_mob_can_reach) (int retVal___, struct mob_data *md, struct block_list *bl, int range, int state); typedef int (*HPMHOOK_pre_mob_linksearch) (struct block_list **bl, va_list ap); @@ -5674,10 +5686,12 @@ typedef int (*HPMHOOK_pre_npc_unload_ev_label) (union DBKey *key, struct DBData typedef int (*HPMHOOK_post_npc_unload_ev_label) (int retVal___, union DBKey key, struct DBData *data, va_list ap); typedef int (*HPMHOOK_pre_npc_unload_dup_sub) (struct npc_data **nd, va_list args); typedef int (*HPMHOOK_post_npc_unload_dup_sub) (int retVal___, struct npc_data *nd, va_list args); -typedef void (*HPMHOOK_pre_npc_unload_duplicates) (struct npc_data **nd); -typedef void (*HPMHOOK_post_npc_unload_duplicates) (struct npc_data *nd); -typedef int (*HPMHOOK_pre_npc_unload) (struct npc_data **nd, bool *single); -typedef int (*HPMHOOK_post_npc_unload) (int retVal___, struct npc_data *nd, bool single); +typedef void (*HPMHOOK_pre_npc_unload_duplicates) (struct npc_data **nd, bool *unload_mobs); +typedef void (*HPMHOOK_post_npc_unload_duplicates) (struct npc_data *nd, bool unload_mobs); +typedef int (*HPMHOOK_pre_npc_unload_mob) (struct mob_data **md, va_list args); +typedef int (*HPMHOOK_post_npc_unload_mob) (int retVal___, struct mob_data *md, va_list args); +typedef int (*HPMHOOK_pre_npc_unload) (struct npc_data **nd, bool *single, bool *unload_mobs); +typedef int (*HPMHOOK_post_npc_unload) (int retVal___, struct npc_data *nd, bool single, bool unload_mobs); typedef void (*HPMHOOK_pre_npc_clearsrcfile) (void); typedef void (*HPMHOOK_post_npc_clearsrcfile) (void); typedef void (*HPMHOOK_pre_npc_addsrcfile) (const char **name); @@ -5694,8 +5708,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid); typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid); -typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); -typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); +typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_); +typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_); typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); @@ -5760,8 +5774,8 @@ typedef int (*HPMHOOK_pre_npc_ev_label_db_clear_sub) (union DBKey *key, struct D typedef int (*HPMHOOK_post_npc_ev_label_db_clear_sub) (int retVal___, union DBKey key, struct DBData *data, va_list args); typedef int (*HPMHOOK_pre_npc_reload) (void); typedef int (*HPMHOOK_post_npc_reload) (int retVal___); -typedef bool (*HPMHOOK_pre_npc_unloadfile) (const char **filepath); -typedef bool (*HPMHOOK_post_npc_unloadfile) (bool retVal___, const char *filepath); +typedef bool (*HPMHOOK_pre_npc_unloadfile) (const char **filepath, bool *unload_mobs); +typedef bool (*HPMHOOK_post_npc_unloadfile) (bool retVal___, const char *filepath, bool unload_mobs); typedef void (*HPMHOOK_pre_npc_do_clear_npc) (void); typedef void (*HPMHOOK_post_npc_do_clear_npc) (void); typedef void (*HPMHOOK_pre_npc_debug_warps_sub) (struct npc_data **nd); @@ -5778,6 +5792,8 @@ typedef enum market_buy_result (*HPMHOOK_pre_npc_market_buylist) (struct map_ses typedef enum market_buy_result (*HPMHOOK_post_npc_market_buylist) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); +typedef int (*HPMHOOK_pre_npc_expanded_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); +typedef int (*HPMHOOK_post_npc_expanded_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd); typedef bool (*HPMHOOK_post_npc_trader_open) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); typedef void (*HPMHOOK_pre_npc_market_fromsql) (void); @@ -5796,6 +5812,14 @@ typedef void (*HPMHOOK_pre_npc_barter_delfromsql) (struct npc_data **nd, int *in typedef void (*HPMHOOK_post_npc_barter_delfromsql) (struct npc_data *nd, int index); typedef void (*HPMHOOK_pre_npc_barter_delfromsql_sub) (const char **npcname, int *itemId, int *itemId2, int *amount2); typedef void (*HPMHOOK_post_npc_barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2); +typedef void (*HPMHOOK_pre_npc_expanded_barter_fromsql) (void); +typedef void (*HPMHOOK_post_npc_expanded_barter_fromsql) (void); +typedef void (*HPMHOOK_pre_npc_expanded_barter_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_expanded_barter_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_expanded_barter_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_expanded_barter_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_expanded_barter_delfromsql_sub) (const char **npcname, int *itemId, int *zeny, int *currencyCount, struct npc_barter_currency **currency); +typedef void (*HPMHOOK_post_npc_expanded_barter_delfromsql_sub) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency); typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); @@ -6160,6 +6184,8 @@ typedef int (*HPMHOOK_pre_pc_checkitem) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkitem) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_useitem) (struct map_session_data **sd, int *n); typedef int (*HPMHOOK_post_pc_useitem) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_itemskill_clear) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_itemskill_clear) (int retVal___, struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_skillatk_bonus) (struct map_session_data **sd, uint16 *skill_id); typedef int (*HPMHOOK_post_pc_skillatk_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id); typedef int (*HPMHOOK_pre_pc_skillheal_bonus) (struct map_session_data **sd, uint16 *skill_id); @@ -6188,8 +6214,8 @@ typedef void (*HPMHOOK_pre_pc_setfalcon) (struct map_session_data **sd, bool *fl typedef void (*HPMHOOK_post_pc_setfalcon) (struct map_session_data *sd, bool flag); typedef void (*HPMHOOK_pre_pc_setridingpeco) (struct map_session_data **sd, bool *flag); typedef void (*HPMHOOK_post_pc_setridingpeco) (struct map_session_data *sd, bool flag); -typedef void (*HPMHOOK_pre_pc_setmadogear) (struct map_session_data **sd, bool *flag); -typedef void (*HPMHOOK_post_pc_setmadogear) (struct map_session_data *sd, bool flag); +typedef void (*HPMHOOK_pre_pc_setmadogear) (struct map_session_data **sd, bool *flag, enum mado_type *mtype); +typedef void (*HPMHOOK_post_pc_setmadogear) (struct map_session_data *sd, bool flag, enum mado_type mtype); typedef void (*HPMHOOK_pre_pc_setridingdragon) (struct map_session_data **sd, unsigned int *type); typedef void (*HPMHOOK_post_pc_setridingdragon) (struct map_session_data *sd, unsigned int type); typedef void (*HPMHOOK_pre_pc_setridingwug) (struct map_session_data **sd, bool *flag); @@ -7110,6 +7136,8 @@ typedef void (*HPMHOOK_pre_script_run_item_rental_start_script) (struct map_sess typedef void (*HPMHOOK_post_script_run_item_rental_start_script) (struct map_session_data *sd, struct item_data *data, int oid); typedef void (*HPMHOOK_pre_script_run_item_lapineddukddak_script) (struct map_session_data **sd, struct item_data **data, int *oid); typedef void (*HPMHOOK_post_script_run_item_lapineddukddak_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef bool (*HPMHOOK_pre_script_sellitemcurrency_add) (struct npc_data **nd, struct script_state **st, int *argIndex); +typedef bool (*HPMHOOK_post_script_sellitemcurrency_add) (bool retVal___, struct npc_data *nd, struct script_state *st, int argIndex); #endif // MAP_SCRIPT_H #ifdef MAP_SEARCHSTORE_H /* searchstore */ typedef bool (*HPMHOOK_pre_searchstore_open) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); @@ -7270,8 +7298,8 @@ typedef int (*HPMHOOK_pre_skill_additional_effect) (struct block_list **src, str typedef int (*HPMHOOK_post_skill_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick); typedef int (*HPMHOOK_pre_skill_counter_additional_effect) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); typedef int (*HPMHOOK_post_skill_counter_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick); -typedef int (*HPMHOOK_pre_skill_blown) (struct block_list **src, struct block_list **target, int *count, int8 *dir, int *flag); -typedef int (*HPMHOOK_post_skill_blown) (int retVal___, struct block_list *src, struct block_list *target, int count, int8 dir, int flag); +typedef int (*HPMHOOK_pre_skill_blown) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag); +typedef int (*HPMHOOK_post_skill_blown) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag); typedef int (*HPMHOOK_pre_skill_break_equip) (struct block_list **bl, unsigned short *where, int *rate, int *flag); typedef int (*HPMHOOK_post_skill_break_equip) (int retVal___, struct block_list *bl, unsigned short where, int rate, int flag); typedef int (*HPMHOOK_pre_skill_strip_equip) (struct block_list **bl, unsigned short *where, int *rate, int *lv, int *time); @@ -7304,6 +7332,8 @@ typedef int (*HPMHOOK_pre_skill_vf_cast_fix) (struct block_list **bl, double *ti typedef int (*HPMHOOK_post_skill_vf_cast_fix) (int retVal___, struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv); typedef int (*HPMHOOK_pre_skill_delay_fix) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_skill_delay_fix) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv); +typedef bool (*HPMHOOK_pre_skill_is_item_skill) (struct map_session_data **sd, int *skill_id, int *skill_lv); +typedef bool (*HPMHOOK_post_skill_is_item_skill) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv); typedef int (*HPMHOOK_pre_skill_check_condition_castbegin) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_skill_check_condition_castbegin) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); typedef int (*HPMHOOK_pre_skill_check_condition_castend) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); @@ -7434,10 +7464,10 @@ typedef int (*HPMHOOK_pre_skill_check_condition_char_sub) (struct block_list **b typedef int (*HPMHOOK_post_skill_check_condition_char_sub) (int retVal___, struct block_list *bl, va_list ap); typedef int (*HPMHOOK_pre_skill_check_condition_mob_master_sub) (struct block_list **bl, va_list ap); typedef int (*HPMHOOK_post_skill_check_condition_mob_master_sub) (int retVal___, struct block_list *bl, va_list ap); -typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, uint8 *dir, int16 *x, int16 *y); -typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y); -typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, uint8 *dir, int *are); -typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, uint8 dir, int are); +typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y); +typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, enum unit_dir dir, int16 x, int16 y); +typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, enum unit_dir *dir, int *are); +typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, enum unit_dir dir, int are); typedef int (*HPMHOOK_pre_skill_get_fixed_cast) (int *skill_id, int *skill_lv); typedef int (*HPMHOOK_post_skill_get_fixed_cast) (int retVal___, int skill_id, int skill_lv); typedef int (*HPMHOOK_pre_skill_sit_count) (struct block_list **bl, va_list ap); @@ -7578,8 +7608,8 @@ typedef int (*HPMHOOK_pre_skill_attack_copy_unknown) (int **attack_type, struct typedef int (*HPMHOOK_post_skill_attack_copy_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef int (*HPMHOOK_pre_skill_attack_dir_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); typedef int (*HPMHOOK_post_skill_attack_dir_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); -typedef void (*HPMHOOK_pre_skill_attack_blow_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, int8 **dir); -typedef void (*HPMHOOK_post_skill_attack_blow_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); +typedef void (*HPMHOOK_pre_skill_attack_blow_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir); +typedef void (*HPMHOOK_post_skill_attack_blow_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); typedef void (*HPMHOOK_pre_skill_attack_post_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); typedef void (*HPMHOOK_post_skill_attack_post_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef bool (*HPMHOOK_pre_skill_timerskill_dead_unknown) (struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); @@ -8258,22 +8288,24 @@ typedef int (*HPMHOOK_pre_unit_final) (void); typedef int (*HPMHOOK_post_unit_final) (int retVal___); typedef struct unit_data* (*HPMHOOK_pre_unit_bl2ud) (struct block_list **bl); typedef struct unit_data* (*HPMHOOK_post_unit_bl2ud) (struct unit_data* retVal___, struct block_list *bl); +typedef const struct unit_data* (*HPMHOOK_pre_unit_cbl2ud) (const struct block_list **bl); +typedef const struct unit_data* (*HPMHOOK_post_unit_cbl2ud) (const struct unit_data* retVal___, const struct block_list *bl); typedef struct unit_data* (*HPMHOOK_pre_unit_bl2ud2) (struct block_list **bl); typedef struct unit_data* (*HPMHOOK_post_unit_bl2ud2) (struct unit_data* retVal___, struct block_list *bl); typedef void (*HPMHOOK_pre_unit_init_ud) (struct unit_data **ud); typedef void (*HPMHOOK_post_unit_init_ud) (struct unit_data *ud); typedef int (*HPMHOOK_pre_unit_attack_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_unit_attack_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef int (*HPMHOOK_pre_unit_walktoxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); -typedef int (*HPMHOOK_post_unit_walktoxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef int (*HPMHOOK_pre_unit_walktoxy_sub) (struct block_list **bl); -typedef int (*HPMHOOK_post_unit_walktoxy_sub) (int retVal___, struct block_list *bl); -typedef int (*HPMHOOK_pre_unit_delay_walktoxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); -typedef int (*HPMHOOK_post_unit_delay_walktoxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); -typedef int (*HPMHOOK_pre_unit_walktoxy) (struct block_list **bl, short *x, short *y, int *flag); -typedef int (*HPMHOOK_post_unit_walktoxy) (int retVal___, struct block_list *bl, short x, short y, int flag); -typedef int (*HPMHOOK_pre_unit_walktobl_sub) (int *tid, int64 *tick, int *id, intptr_t *data); -typedef int (*HPMHOOK_post_unit_walktobl_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_walk_toxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy_sub) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_walk_toxy_sub) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_delay_walk_toxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_delay_walk_toxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy) (struct block_list **bl, short *x, short *y, int *flag); +typedef int (*HPMHOOK_post_unit_walk_toxy) (int retVal___, struct block_list *bl, short x, short y, int flag); +typedef int (*HPMHOOK_pre_unit_walktobl_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_walktobl_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_unit_walktobl) (struct block_list **bl, struct block_list **tbl, int *range, int *flag); typedef int (*HPMHOOK_post_unit_walktobl) (int retVal___, struct block_list *bl, struct block_list *tbl, int range, int flag); typedef bool (*HPMHOOK_pre_unit_run) (struct block_list **bl, struct map_session_data **sd, enum sc_type *type); @@ -8284,20 +8316,22 @@ typedef int (*HPMHOOK_pre_unit_escape) (struct block_list **bl, struct block_lis typedef int (*HPMHOOK_post_unit_escape) (int retVal___, struct block_list *bl, struct block_list *target, short dist); typedef int (*HPMHOOK_pre_unit_movepos) (struct block_list **bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); typedef int (*HPMHOOK_post_unit_movepos) (int retVal___, struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath); -typedef int (*HPMHOOK_pre_unit_setdir) (struct block_list **bl, unsigned char *dir); -typedef int (*HPMHOOK_post_unit_setdir) (int retVal___, struct block_list *bl, unsigned char dir); -typedef uint8 (*HPMHOOK_pre_unit_getdir) (struct block_list **bl); -typedef uint8 (*HPMHOOK_post_unit_getdir) (uint8 retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_set_dir) (struct block_list **bl, enum unit_dir *dir); +typedef int (*HPMHOOK_post_unit_set_dir) (int retVal___, struct block_list *bl, enum unit_dir dir); +typedef enum unit_dir (*HPMHOOK_pre_unit_getdir) (const struct block_list **bl); +typedef enum unit_dir (*HPMHOOK_post_unit_getdir) (enum unit_dir retVal___, const struct block_list *bl); typedef int (*HPMHOOK_pre_unit_blown) (struct block_list **bl, int *dx, int *dy, int *count, int *flag); typedef int (*HPMHOOK_post_unit_blown) (int retVal___, struct block_list *bl, int dx, int dy, int count, int flag); typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type); typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type); +typedef int (*HPMHOOK_pre_unit_warpto_master) (struct block_list **master_bl, struct block_list **slave_bl); +typedef int (*HPMHOOK_post_unit_warpto_master) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl); typedef int (*HPMHOOK_pre_unit_stop_walking) (struct block_list **bl, int *type); typedef int (*HPMHOOK_post_unit_stop_walking) (int retVal___, struct block_list *bl, int type); typedef int (*HPMHOOK_pre_unit_skilluse_id) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv); typedef int (*HPMHOOK_post_unit_skilluse_id) (int retVal___, struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv); -typedef int (*HPMHOOK_pre_unit_step_timer) (int *tid, int64 *tick, int *id, intptr_t *data); -typedef int (*HPMHOOK_post_unit_step_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_steptimer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_steptimer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef void (*HPMHOOK_pre_unit_stop_stepaction) (struct block_list **bl); typedef void (*HPMHOOK_post_unit_stop_stepaction) (struct block_list *bl); typedef int (*HPMHOOK_pre_unit_is_walking) (struct block_list **bl); @@ -8328,8 +8362,8 @@ typedef bool (*HPMHOOK_pre_unit_can_reach_pos) (struct block_list **bl, int *x, typedef bool (*HPMHOOK_post_unit_can_reach_pos) (bool retVal___, struct block_list *bl, int x, int y, int easy); typedef bool (*HPMHOOK_pre_unit_can_reach_bl) (struct block_list **bl, struct block_list **tbl, int *range, int *easy, short **x, short **y); typedef bool (*HPMHOOK_post_unit_can_reach_bl) (bool retVal___, struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y); -typedef int (*HPMHOOK_pre_unit_calc_pos) (struct block_list **bl, int *tx, int *ty, uint8 *dir); -typedef int (*HPMHOOK_post_unit_calc_pos) (int retVal___, struct block_list *bl, int tx, int ty, uint8 dir); +typedef int (*HPMHOOK_pre_unit_calc_pos) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir); +typedef int (*HPMHOOK_post_unit_calc_pos) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir dir); typedef int (*HPMHOOK_pre_unit_attack_timer_sub) (struct block_list **src, int *tid, int64 *tick); typedef int (*HPMHOOK_post_unit_attack_timer_sub) (int retVal___, struct block_list *src, int tid, int64 tick); typedef int (*HPMHOOK_pre_unit_skillcastcancel) (struct block_list **bl, int *type); diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index a9a83511e..20f57dcb9 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -674,10 +674,14 @@ struct { struct HPMHookPoint *HP_inter_mercenary_delete_post; struct HPMHookPoint *HP_inter_party_check_lv_pre; struct HPMHookPoint *HP_inter_party_check_lv_post; + struct HPMHookPoint *HP_inter_party_is_family_party_pre; + struct HPMHookPoint *HP_inter_party_is_family_party_post; struct HPMHookPoint *HP_inter_party_calc_state_pre; struct HPMHookPoint *HP_inter_party_calc_state_post; struct HPMHookPoint *HP_inter_party_tosql_pre; struct HPMHookPoint *HP_inter_party_tosql_post; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_pre; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_post; struct HPMHookPoint *HP_inter_party_fromsql_pre; struct HPMHookPoint *HP_inter_party_fromsql_post; struct HPMHookPoint *HP_inter_party_sql_init_pre; @@ -2295,10 +2299,14 @@ struct { int HP_inter_mercenary_delete_post; int HP_inter_party_check_lv_pre; int HP_inter_party_check_lv_post; + int HP_inter_party_is_family_party_pre; + int HP_inter_party_is_family_party_post; int HP_inter_party_calc_state_pre; int HP_inter_party_calc_state_post; int HP_inter_party_tosql_pre; int HP_inter_party_tosql_post; + int HP_inter_party_del_nonexistent_party_pre; + int HP_inter_party_del_nonexistent_party_post; int HP_inter_party_fromsql_pre; int HP_inter_party_fromsql_post; int HP_inter_party_sql_init_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index 7f52ebe46..e8e211f8b 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -368,8 +368,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_mercenary->delete, HP_inter_mercenary_delete) }, /* inter_party_interface */ { HP_POP(inter_party->check_lv, HP_inter_party_check_lv) }, + { HP_POP(inter_party->is_family_party, HP_inter_party_is_family_party) }, { HP_POP(inter_party->calc_state, HP_inter_party_calc_state) }, { HP_POP(inter_party->tosql, HP_inter_party_tosql) }, + { HP_POP(inter_party->del_nonexistent_party, HP_inter_party_del_nonexistent_party) }, { HP_POP(inter_party->fromsql, HP_inter_party_fromsql) }, { HP_POP(inter_party->sql_init, HP_inter_party_sql_init) }, { HP_POP(inter_party->sql_final, HP_inter_party_sql_final) }, diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index d5297c29c..a022abb54 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -8712,6 +8712,33 @@ int HP_inter_party_check_lv(struct party_data *p) { } return retVal___; } +int HP_inter_party_is_family_party(struct party_data *p) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_is_family_party_pre > 0) { + int (*preHookFunc) (struct party_data **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_is_family_party_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.is_family_party(p); + } + if (HPMHooks.count.HP_inter_party_is_family_party_post > 0) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_is_family_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} void HP_inter_party_calc_state(struct party_data *p) { int hIndex = 0; if (HPMHooks.count.HP_inter_party_calc_state_pre > 0) { @@ -8765,6 +8792,33 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { } return retVal___; } +int HP_inter_party_del_nonexistent_party(int party_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_pre > 0) { + int (*preHookFunc) (int *party_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.del_nonexistent_party(party_id); + } + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_post > 0) { + int (*postHookFunc) (int retVal___, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id); + } + } + return retVal___; +} struct party_data* HP_inter_party_fromsql(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; @@ -9115,11 +9169,11 @@ bool HP_inter_party_change_option(int party_id, int account_id, int exp, int ite } return retVal___; } -bool HP_inter_party_change_map(int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) { +bool HP_inter_party_change_map(int party_id, int account_id, int char_id, unsigned short map, int online, int lv) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_party_change_map_pre > 0) { - bool (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); + bool (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, int *lv); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_map_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_change_map_pre[hIndex].func; @@ -9134,7 +9188,7 @@ bool HP_inter_party_change_map(int party_id, int account_id, int char_id, unsign retVal___ = HPMHooks.source.inter_party.change_map(party_id, account_id, char_id, map, online, lv); } if (HPMHooks.count.HP_inter_party_change_map_post > 0) { - bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); + bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, int lv); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_map_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_change_map_post[hIndex].func; retVal___ = postHookFunc(retVal___, party_id, account_id, char_id, map, online, lv); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index eccf2a277..f94606bab 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -1104,6 +1104,8 @@ struct { struct HPMHookPoint *HP_clif_misceffect_post; struct HPMHookPoint *HP_clif_changeoption_pre; struct HPMHookPoint *HP_clif_changeoption_post; + struct HPMHookPoint *HP_clif_changeoption_target_pre; + struct HPMHookPoint *HP_clif_changeoption_target_post; struct HPMHookPoint *HP_clif_changeoption2_pre; struct HPMHookPoint *HP_clif_changeoption2_post; struct HPMHookPoint *HP_clif_emotion_pre; @@ -2302,6 +2304,12 @@ struct { struct HPMHookPoint *HP_clif_pNPCBarterClosed_post; struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre; struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterClosed_pre; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterClosed_post; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterPurchase_pre; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterPurchase_post; + struct HPMHookPoint *HP_clif_npc_expanded_barter_open_pre; + struct HPMHookPoint *HP_clif_npc_expanded_barter_open_post; struct HPMHookPoint *HP_clif_pClientVersion_pre; struct HPMHookPoint *HP_clif_pClientVersion_post; struct HPMHookPoint *HP_clif_pPing_pre; @@ -2422,8 +2430,8 @@ struct { struct HPMHookPoint *HP_duel_leave_post; struct HPMHookPoint *HP_duel_showinfo_pre; struct HPMHookPoint *HP_duel_showinfo_post; - struct HPMHookPoint *HP_duel_checktime_pre; - struct HPMHookPoint *HP_duel_checktime_post; + struct HPMHookPoint *HP_duel_difftime_pre; + struct HPMHookPoint *HP_duel_difftime_post; struct HPMHookPoint *HP_duel_init_pre; struct HPMHookPoint *HP_duel_init_post; struct HPMHookPoint *HP_duel_final_pre; @@ -4272,6 +4280,8 @@ struct { struct HPMHookPoint *HP_npc_unload_dup_sub_post; struct HPMHookPoint *HP_npc_unload_duplicates_pre; struct HPMHookPoint *HP_npc_unload_duplicates_post; + struct HPMHookPoint *HP_npc_unload_mob_pre; + struct HPMHookPoint *HP_npc_unload_mob_post; struct HPMHookPoint *HP_npc_unload_pre; struct HPMHookPoint *HP_npc_unload_post; struct HPMHookPoint *HP_npc_clearsrcfile_pre; @@ -4374,6 +4384,8 @@ struct { struct HPMHookPoint *HP_npc_market_buylist_post; struct HPMHookPoint *HP_npc_barter_buylist_pre; struct HPMHookPoint *HP_npc_barter_buylist_post; + struct HPMHookPoint *HP_npc_expanded_barter_buylist_pre; + struct HPMHookPoint *HP_npc_expanded_barter_buylist_post; struct HPMHookPoint *HP_npc_trader_open_pre; struct HPMHookPoint *HP_npc_trader_open_post; struct HPMHookPoint *HP_npc_market_fromsql_pre; @@ -4392,6 +4404,14 @@ struct { struct HPMHookPoint *HP_npc_barter_delfromsql_post; struct HPMHookPoint *HP_npc_barter_delfromsql_sub_pre; struct HPMHookPoint *HP_npc_barter_delfromsql_sub_post; + struct HPMHookPoint *HP_npc_expanded_barter_fromsql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_fromsql_post; + struct HPMHookPoint *HP_npc_expanded_barter_tosql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_tosql_post; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_post; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_sub_pre; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; struct HPMHookPoint *HP_npc_refresh_pre; @@ -4744,6 +4764,8 @@ struct { struct HPMHookPoint *HP_pc_checkitem_post; struct HPMHookPoint *HP_pc_useitem_pre; struct HPMHookPoint *HP_pc_useitem_post; + struct HPMHookPoint *HP_pc_itemskill_clear_pre; + struct HPMHookPoint *HP_pc_itemskill_clear_post; struct HPMHookPoint *HP_pc_skillatk_bonus_pre; struct HPMHookPoint *HP_pc_skillatk_bonus_post; struct HPMHookPoint *HP_pc_skillheal_bonus_pre; @@ -5644,6 +5666,8 @@ struct { struct HPMHookPoint *HP_script_run_item_rental_start_script_post; struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_pre; struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_post; + struct HPMHookPoint *HP_script_sellitemcurrency_add_pre; + struct HPMHookPoint *HP_script_sellitemcurrency_add_post; struct HPMHookPoint *HP_searchstore_open_pre; struct HPMHookPoint *HP_searchstore_open_post; struct HPMHookPoint *HP_searchstore_query_pre; @@ -5832,6 +5856,8 @@ struct { struct HPMHookPoint *HP_skill_vf_cast_fix_post; struct HPMHookPoint *HP_skill_delay_fix_pre; struct HPMHookPoint *HP_skill_delay_fix_post; + struct HPMHookPoint *HP_skill_is_item_skill_pre; + struct HPMHookPoint *HP_skill_is_item_skill_post; struct HPMHookPoint *HP_skill_check_condition_castbegin_pre; struct HPMHookPoint *HP_skill_check_condition_castbegin_post; struct HPMHookPoint *HP_skill_check_condition_castend_pre; @@ -6760,22 +6786,24 @@ struct { struct HPMHookPoint *HP_unit_final_post; struct HPMHookPoint *HP_unit_bl2ud_pre; struct HPMHookPoint *HP_unit_bl2ud_post; + struct HPMHookPoint *HP_unit_cbl2ud_pre; + struct HPMHookPoint *HP_unit_cbl2ud_post; struct HPMHookPoint *HP_unit_bl2ud2_pre; struct HPMHookPoint *HP_unit_bl2ud2_post; struct HPMHookPoint *HP_unit_init_ud_pre; struct HPMHookPoint *HP_unit_init_ud_post; struct HPMHookPoint *HP_unit_attack_timer_pre; struct HPMHookPoint *HP_unit_attack_timer_post; - struct HPMHookPoint *HP_unit_walktoxy_timer_pre; - struct HPMHookPoint *HP_unit_walktoxy_timer_post; - struct HPMHookPoint *HP_unit_walktoxy_sub_pre; - struct HPMHookPoint *HP_unit_walktoxy_sub_post; - struct HPMHookPoint *HP_unit_delay_walktoxy_timer_pre; - struct HPMHookPoint *HP_unit_delay_walktoxy_timer_post; - struct HPMHookPoint *HP_unit_walktoxy_pre; - struct HPMHookPoint *HP_unit_walktoxy_post; - struct HPMHookPoint *HP_unit_walktobl_sub_pre; - struct HPMHookPoint *HP_unit_walktobl_sub_post; + struct HPMHookPoint *HP_unit_walk_toxy_timer_pre; + struct HPMHookPoint *HP_unit_walk_toxy_timer_post; + struct HPMHookPoint *HP_unit_walk_toxy_sub_pre; + struct HPMHookPoint *HP_unit_walk_toxy_sub_post; + struct HPMHookPoint *HP_unit_delay_walk_toxy_timer_pre; + struct HPMHookPoint *HP_unit_delay_walk_toxy_timer_post; + struct HPMHookPoint *HP_unit_walk_toxy_pre; + struct HPMHookPoint *HP_unit_walk_toxy_post; + struct HPMHookPoint *HP_unit_walktobl_timer_pre; + struct HPMHookPoint *HP_unit_walktobl_timer_post; struct HPMHookPoint *HP_unit_walktobl_pre; struct HPMHookPoint *HP_unit_walktobl_post; struct HPMHookPoint *HP_unit_run_pre; @@ -6786,20 +6814,22 @@ struct { struct HPMHookPoint *HP_unit_escape_post; struct HPMHookPoint *HP_unit_movepos_pre; struct HPMHookPoint *HP_unit_movepos_post; - struct HPMHookPoint *HP_unit_setdir_pre; - struct HPMHookPoint *HP_unit_setdir_post; + struct HPMHookPoint *HP_unit_set_dir_pre; + struct HPMHookPoint *HP_unit_set_dir_post; struct HPMHookPoint *HP_unit_getdir_pre; struct HPMHookPoint *HP_unit_getdir_post; struct HPMHookPoint *HP_unit_blown_pre; struct HPMHookPoint *HP_unit_blown_post; struct HPMHookPoint *HP_unit_warp_pre; struct HPMHookPoint *HP_unit_warp_post; + struct HPMHookPoint *HP_unit_warpto_master_pre; + struct HPMHookPoint *HP_unit_warpto_master_post; struct HPMHookPoint *HP_unit_stop_walking_pre; struct HPMHookPoint *HP_unit_stop_walking_post; struct HPMHookPoint *HP_unit_skilluse_id_pre; struct HPMHookPoint *HP_unit_skilluse_id_post; - struct HPMHookPoint *HP_unit_step_timer_pre; - struct HPMHookPoint *HP_unit_step_timer_post; + struct HPMHookPoint *HP_unit_steptimer_pre; + struct HPMHookPoint *HP_unit_steptimer_post; struct HPMHookPoint *HP_unit_stop_stepaction_pre; struct HPMHookPoint *HP_unit_stop_stepaction_post; struct HPMHookPoint *HP_unit_is_walking_pre; @@ -7949,6 +7979,8 @@ struct { int HP_clif_misceffect_post; int HP_clif_changeoption_pre; int HP_clif_changeoption_post; + int HP_clif_changeoption_target_pre; + int HP_clif_changeoption_target_post; int HP_clif_changeoption2_pre; int HP_clif_changeoption2_post; int HP_clif_emotion_pre; @@ -9147,6 +9179,12 @@ struct { int HP_clif_pNPCBarterClosed_post; int HP_clif_pNPCBarterPurchase_pre; int HP_clif_pNPCBarterPurchase_post; + int HP_clif_pNPCExpandedBarterClosed_pre; + int HP_clif_pNPCExpandedBarterClosed_post; + int HP_clif_pNPCExpandedBarterPurchase_pre; + int HP_clif_pNPCExpandedBarterPurchase_post; + int HP_clif_npc_expanded_barter_open_pre; + int HP_clif_npc_expanded_barter_open_post; int HP_clif_pClientVersion_pre; int HP_clif_pClientVersion_post; int HP_clif_pPing_pre; @@ -9267,8 +9305,8 @@ struct { int HP_duel_leave_post; int HP_duel_showinfo_pre; int HP_duel_showinfo_post; - int HP_duel_checktime_pre; - int HP_duel_checktime_post; + int HP_duel_difftime_pre; + int HP_duel_difftime_post; int HP_duel_init_pre; int HP_duel_init_post; int HP_duel_final_pre; @@ -11117,6 +11155,8 @@ struct { int HP_npc_unload_dup_sub_post; int HP_npc_unload_duplicates_pre; int HP_npc_unload_duplicates_post; + int HP_npc_unload_mob_pre; + int HP_npc_unload_mob_post; int HP_npc_unload_pre; int HP_npc_unload_post; int HP_npc_clearsrcfile_pre; @@ -11219,6 +11259,8 @@ struct { int HP_npc_market_buylist_post; int HP_npc_barter_buylist_pre; int HP_npc_barter_buylist_post; + int HP_npc_expanded_barter_buylist_pre; + int HP_npc_expanded_barter_buylist_post; int HP_npc_trader_open_pre; int HP_npc_trader_open_post; int HP_npc_market_fromsql_pre; @@ -11237,6 +11279,14 @@ struct { int HP_npc_barter_delfromsql_post; int HP_npc_barter_delfromsql_sub_pre; int HP_npc_barter_delfromsql_sub_post; + int HP_npc_expanded_barter_fromsql_pre; + int HP_npc_expanded_barter_fromsql_post; + int HP_npc_expanded_barter_tosql_pre; + int HP_npc_expanded_barter_tosql_post; + int HP_npc_expanded_barter_delfromsql_pre; + int HP_npc_expanded_barter_delfromsql_post; + int HP_npc_expanded_barter_delfromsql_sub_pre; + int HP_npc_expanded_barter_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; int HP_npc_refresh_pre; @@ -11589,6 +11639,8 @@ struct { int HP_pc_checkitem_post; int HP_pc_useitem_pre; int HP_pc_useitem_post; + int HP_pc_itemskill_clear_pre; + int HP_pc_itemskill_clear_post; int HP_pc_skillatk_bonus_pre; int HP_pc_skillatk_bonus_post; int HP_pc_skillheal_bonus_pre; @@ -12489,6 +12541,8 @@ struct { int HP_script_run_item_rental_start_script_post; int HP_script_run_item_lapineddukddak_script_pre; int HP_script_run_item_lapineddukddak_script_post; + int HP_script_sellitemcurrency_add_pre; + int HP_script_sellitemcurrency_add_post; int HP_searchstore_open_pre; int HP_searchstore_open_post; int HP_searchstore_query_pre; @@ -12677,6 +12731,8 @@ struct { int HP_skill_vf_cast_fix_post; int HP_skill_delay_fix_pre; int HP_skill_delay_fix_post; + int HP_skill_is_item_skill_pre; + int HP_skill_is_item_skill_post; int HP_skill_check_condition_castbegin_pre; int HP_skill_check_condition_castbegin_post; int HP_skill_check_condition_castend_pre; @@ -13605,22 +13661,24 @@ struct { int HP_unit_final_post; int HP_unit_bl2ud_pre; int HP_unit_bl2ud_post; + int HP_unit_cbl2ud_pre; + int HP_unit_cbl2ud_post; int HP_unit_bl2ud2_pre; int HP_unit_bl2ud2_post; int HP_unit_init_ud_pre; int HP_unit_init_ud_post; int HP_unit_attack_timer_pre; int HP_unit_attack_timer_post; - int HP_unit_walktoxy_timer_pre; - int HP_unit_walktoxy_timer_post; - int HP_unit_walktoxy_sub_pre; - int HP_unit_walktoxy_sub_post; - int HP_unit_delay_walktoxy_timer_pre; - int HP_unit_delay_walktoxy_timer_post; - int HP_unit_walktoxy_pre; - int HP_unit_walktoxy_post; - int HP_unit_walktobl_sub_pre; - int HP_unit_walktobl_sub_post; + int HP_unit_walk_toxy_timer_pre; + int HP_unit_walk_toxy_timer_post; + int HP_unit_walk_toxy_sub_pre; + int HP_unit_walk_toxy_sub_post; + int HP_unit_delay_walk_toxy_timer_pre; + int HP_unit_delay_walk_toxy_timer_post; + int HP_unit_walk_toxy_pre; + int HP_unit_walk_toxy_post; + int HP_unit_walktobl_timer_pre; + int HP_unit_walktobl_timer_post; int HP_unit_walktobl_pre; int HP_unit_walktobl_post; int HP_unit_run_pre; @@ -13631,20 +13689,22 @@ struct { int HP_unit_escape_post; int HP_unit_movepos_pre; int HP_unit_movepos_post; - int HP_unit_setdir_pre; - int HP_unit_setdir_post; + int HP_unit_set_dir_pre; + int HP_unit_set_dir_post; int HP_unit_getdir_pre; int HP_unit_getdir_post; int HP_unit_blown_pre; int HP_unit_blown_post; int HP_unit_warp_pre; int HP_unit_warp_post; + int HP_unit_warpto_master_pre; + int HP_unit_warpto_master_post; int HP_unit_stop_walking_pre; int HP_unit_stop_walking_post; int HP_unit_skilluse_id_pre; int HP_unit_skilluse_id_post; - int HP_unit_step_timer_pre; - int HP_unit_step_timer_post; + int HP_unit_steptimer_pre; + int HP_unit_steptimer_post; int HP_unit_stop_stepaction_pre; int HP_unit_stop_stepaction_post; int HP_unit_is_walking_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index b8d5f3482..a360b3f53 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -576,6 +576,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->quitsave, HP_clif_quitsave) }, { HP_POP(clif->misceffect, HP_clif_misceffect) }, { HP_POP(clif->changeoption, HP_clif_changeoption) }, + { HP_POP(clif->changeoption_target, HP_clif_changeoption_target) }, { HP_POP(clif->changeoption2, HP_clif_changeoption2) }, { HP_POP(clif->emotion, HP_clif_emotion) }, { HP_POP(clif->talkiebox, HP_clif_talkiebox) }, @@ -1175,6 +1176,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) }, { HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) }, { HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) }, + { HP_POP(clif->pNPCExpandedBarterClosed, HP_clif_pNPCExpandedBarterClosed) }, + { HP_POP(clif->pNPCExpandedBarterPurchase, HP_clif_pNPCExpandedBarterPurchase) }, + { HP_POP(clif->npc_expanded_barter_open, HP_clif_npc_expanded_barter_open) }, { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) }, { HP_POP(clif->pPing, HP_clif_pPing) }, { HP_POP(clif->ping, HP_clif_ping) }, @@ -1241,7 +1245,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(duel->reject, HP_duel_reject) }, { HP_POP(duel->leave, HP_duel_leave) }, { HP_POP(duel->showinfo, HP_duel_showinfo) }, - { HP_POP(duel->checktime, HP_duel_checktime) }, + { HP_POP(duel->difftime, HP_duel_difftime) }, { HP_POP(duel->init, HP_duel_init) }, { HP_POP(duel->final, HP_duel_final) }, /* elemental_interface */ @@ -2188,6 +2192,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->unload_ev_label, HP_npc_unload_ev_label) }, { HP_POP(npc->unload_dup_sub, HP_npc_unload_dup_sub) }, { HP_POP(npc->unload_duplicates, HP_npc_unload_duplicates) }, + { HP_POP(npc->unload_mob, HP_npc_unload_mob) }, { HP_POP(npc->unload, HP_npc_unload) }, { HP_POP(npc->clearsrcfile, HP_npc_clearsrcfile) }, { HP_POP(npc->addsrcfile, HP_npc_addsrcfile) }, @@ -2239,6 +2244,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->trader_update, HP_npc_trader_update) }, { HP_POP(npc->market_buylist, HP_npc_market_buylist) }, { HP_POP(npc->barter_buylist, HP_npc_barter_buylist) }, + { HP_POP(npc->expanded_barter_buylist, HP_npc_expanded_barter_buylist) }, { HP_POP(npc->trader_open, HP_npc_trader_open) }, { HP_POP(npc->market_fromsql, HP_npc_market_fromsql) }, { HP_POP(npc->market_tosql, HP_npc_market_tosql) }, @@ -2248,6 +2254,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->barter_tosql, HP_npc_barter_tosql) }, { HP_POP(npc->barter_delfromsql, HP_npc_barter_delfromsql) }, { HP_POP(npc->barter_delfromsql_sub, HP_npc_barter_delfromsql_sub) }, + { HP_POP(npc->expanded_barter_fromsql, HP_npc_expanded_barter_fromsql) }, + { HP_POP(npc->expanded_barter_tosql, HP_npc_expanded_barter_tosql) }, + { HP_POP(npc->expanded_barter_delfromsql, HP_npc_expanded_barter_delfromsql) }, + { HP_POP(npc->expanded_barter_delfromsql_sub, HP_npc_expanded_barter_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, { HP_POP(npc->refresh, HP_npc_refresh) }, { HP_POP(npc->questinfo_clear, HP_npc_questinfo_clear) }, @@ -2430,6 +2440,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) }, { HP_POP(pc->checkitem, HP_pc_checkitem) }, { HP_POP(pc->useitem, HP_pc_useitem) }, + { HP_POP(pc->itemskill_clear, HP_pc_itemskill_clear) }, { HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) }, { HP_POP(pc->skillheal_bonus, HP_pc_skillheal_bonus) }, { HP_POP(pc->skillheal2_bonus, HP_pc_skillheal2_bonus) }, @@ -2888,6 +2899,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->run_item_rental_end_script, HP_script_run_item_rental_end_script) }, { HP_POP(script->run_item_rental_start_script, HP_script_run_item_rental_start_script) }, { HP_POP(script->run_item_lapineddukddak_script, HP_script_run_item_lapineddukddak_script) }, + { HP_POP(script->sellitemcurrency_add, HP_script_sellitemcurrency_add) }, /* searchstore_interface */ { HP_POP(searchstore->open, HP_searchstore_open) }, { HP_POP(searchstore->query, HP_searchstore_query) }, @@ -2985,6 +2997,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->cast_fix_sc, HP_skill_cast_fix_sc) }, { HP_POP(skill->vf_cast_fix, HP_skill_vf_cast_fix) }, { HP_POP(skill->delay_fix, HP_skill_delay_fix) }, + { HP_POP(skill->is_item_skill, HP_skill_is_item_skill) }, { HP_POP(skill->check_condition_castbegin, HP_skill_check_condition_castbegin) }, { HP_POP(skill->check_condition_castend, HP_skill_check_condition_castend) }, { HP_POP(skill->consume_requirement, HP_skill_consume_requirement) }, @@ -3462,26 +3475,28 @@ struct HookingPointData HookingPoints[] = { { HP_POP(unit->init, HP_unit_init) }, { HP_POP(unit->final, HP_unit_final) }, { HP_POP(unit->bl2ud, HP_unit_bl2ud) }, + { HP_POP(unit->cbl2ud, HP_unit_cbl2ud) }, { HP_POP(unit->bl2ud2, HP_unit_bl2ud2) }, { HP_POP(unit->init_ud, HP_unit_init_ud) }, { HP_POP(unit->attack_timer, HP_unit_attack_timer) }, - { HP_POP(unit->walktoxy_timer, HP_unit_walktoxy_timer) }, - { HP_POP(unit->walktoxy_sub, HP_unit_walktoxy_sub) }, - { HP_POP(unit->delay_walktoxy_timer, HP_unit_delay_walktoxy_timer) }, - { HP_POP(unit->walktoxy, HP_unit_walktoxy) }, - { HP_POP(unit->walktobl_sub, HP_unit_walktobl_sub) }, + { HP_POP(unit->walk_toxy_timer, HP_unit_walk_toxy_timer) }, + { HP_POP(unit->walk_toxy_sub, HP_unit_walk_toxy_sub) }, + { HP_POP(unit->delay_walk_toxy_timer, HP_unit_delay_walk_toxy_timer) }, + { HP_POP(unit->walk_toxy, HP_unit_walk_toxy) }, + { HP_POP(unit->walktobl_timer, HP_unit_walktobl_timer) }, { HP_POP(unit->walktobl, HP_unit_walktobl) }, { HP_POP(unit->run, HP_unit_run) }, { HP_POP(unit->run_hit, HP_unit_run_hit) }, { HP_POP(unit->escape, HP_unit_escape) }, { HP_POP(unit->movepos, HP_unit_movepos) }, - { HP_POP(unit->setdir, HP_unit_setdir) }, + { HP_POP(unit->set_dir, HP_unit_set_dir) }, { HP_POP(unit->getdir, HP_unit_getdir) }, { HP_POP(unit->blown, HP_unit_blown) }, { HP_POP(unit->warp, HP_unit_warp) }, + { HP_POP(unit->warpto_master, HP_unit_warpto_master) }, { HP_POP(unit->stop_walking, HP_unit_stop_walking) }, { HP_POP(unit->skilluse_id, HP_unit_skilluse_id) }, - { HP_POP(unit->step_timer, HP_unit_step_timer) }, + { HP_POP(unit->steptimer, HP_unit_steptimer) }, { HP_POP(unit->stop_stepaction, HP_unit_stop_stepaction) }, { HP_POP(unit->is_walking, HP_unit_is_walking) }, { HP_POP(unit->can_move, HP_unit_can_move) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index e24b00f78..592279cc4 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -14402,6 +14402,32 @@ void HP_clif_changeoption(struct block_list *bl) { } return; } +void HP_clif_changeoption_target(struct block_list *bl, struct block_list *target_bl, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_changeoption_target_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct block_list **target_bl, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changeoption_target_pre[hIndex].func; + preHookFunc(&bl, &target_bl, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changeoption_target(bl, target_bl, target); + } + if (HPMHooks.count.HP_clif_changeoption_target_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct block_list *target_bl, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changeoption_target_post[hIndex].func; + postHookFunc(bl, target_bl, target); + } + } + return; +} void HP_clif_changeoption2(struct block_list *bl) { int hIndex = 0; if (HPMHooks.count.HP_clif_changeoption2_pre > 0) { @@ -30003,6 +30029,84 @@ void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) { } return; } +void HP_clif_pNPCExpandedBarterClosed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterClosed_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCExpandedBarterClosed(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterClosed_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pNPCExpandedBarterPurchase(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterPurchase_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCExpandedBarterPurchase(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterPurchase_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_npc_expanded_barter_open(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npc_expanded_barter_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_expanded_barter_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npc_expanded_barter_open_pre[hIndex].func; + preHookFunc(&sd, &nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_expanded_barter_open(sd, nd); + } + if (HPMHooks.count.HP_clif_npc_expanded_barter_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_expanded_barter_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npc_expanded_barter_open_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} void HP_clif_pClientVersion(int fd, struct map_session_data *sd) { int hIndex = 0; if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) { @@ -31601,14 +31705,14 @@ void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { } return; } -int HP_duel_checktime(struct map_session_data *sd) { +int64 HP_duel_difftime(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if (HPMHooks.count.HP_duel_checktime_pre > 0) { - int (*preHookFunc) (struct map_session_data **sd); + int64 retVal___ = 0; + if (HPMHooks.count.HP_duel_difftime_pre > 0) { + int64 (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_duel_checktime_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_difftime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_duel_difftime_pre[hIndex].func; retVal___ = preHookFunc(&sd); } if (*HPMforce_return) { @@ -31617,12 +31721,12 @@ int HP_duel_checktime(struct map_session_data *sd) { } } { - retVal___ = HPMHooks.source.duel.checktime(sd); + retVal___ = HPMHooks.source.duel.difftime(sd); } - if (HPMHooks.count.HP_duel_checktime_post > 0) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_duel_checktime_post[hIndex].func; + if (HPMHooks.count.HP_duel_difftime_post > 0) { + int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_difftime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_duel_difftime_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } @@ -48180,11 +48284,11 @@ void HP_map_reloadnpc(bool clear) { } return; } -int HP_map_check_dir(int s_dir, int t_dir) { +int HP_map_check_dir(enum unit_dir s_dir, enum unit_dir t_dir) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_map_check_dir_pre > 0) { - int (*preHookFunc) (int *s_dir, int *t_dir); + int (*preHookFunc) (enum unit_dir *s_dir, enum unit_dir *t_dir); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_check_dir_pre[hIndex].func; @@ -48199,7 +48303,7 @@ int HP_map_check_dir(int s_dir, int t_dir) { retVal___ = HPMHooks.source.map.check_dir(s_dir, t_dir); } if (HPMHooks.count.HP_map_check_dir_post > 0) { - int (*postHookFunc) (int retVal___, int s_dir, int t_dir); + int (*postHookFunc) (int retVal___, enum unit_dir s_dir, enum unit_dir t_dir); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_check_dir_post[hIndex].func; retVal___ = postHookFunc(retVal___, s_dir, t_dir); @@ -48207,11 +48311,11 @@ int HP_map_check_dir(int s_dir, int t_dir) { } return retVal___; } -uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { +enum unit_dir HP_map_calc_dir(const struct block_list *src, int16 x, int16 y) { int hIndex = 0; - uint8 retVal___ = 0; + enum unit_dir retVal___ = UNIT_DIR_UNDEFINED; if (HPMHooks.count.HP_map_calc_dir_pre > 0) { - uint8 (*preHookFunc) (struct block_list **src, int16 *x, int16 *y); + enum unit_dir (*preHookFunc) (const struct block_list **src, int16 *x, int16 *y); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_calc_dir_pre[hIndex].func; @@ -48226,7 +48330,7 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { retVal___ = HPMHooks.source.map.calc_dir(src, x, y); } if (HPMHooks.count.HP_map_calc_dir_post > 0) { - uint8 (*postHookFunc) (uint8 retVal___, struct block_list *src, int16 x, int16 y); + enum unit_dir (*postHookFunc) (enum unit_dir retVal___, const struct block_list *src, int16 x, int16 y); for (hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_calc_dir_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, x, y); @@ -51949,15 +52053,15 @@ int HP_mob_parse_dataset(struct spawn_data *data) { } return retVal___; } -struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { +struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data, int npc_id) { int hIndex = 0; struct mob_data* retVal___ = NULL; if (HPMHooks.count.HP_mob_spawn_dataset_pre > 0) { - struct mob_data* (*preHookFunc) (struct spawn_data **data); + struct mob_data* (*preHookFunc) (struct spawn_data **data, int *npc_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_spawn_dataset_pre[hIndex].func; - retVal___ = preHookFunc(&data); + retVal___ = preHookFunc(&data, &npc_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -51965,13 +52069,13 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { } } { - retVal___ = HPMHooks.source.mob.spawn_dataset(data); + retVal___ = HPMHooks.source.mob.spawn_dataset(data, npc_id); } if (HPMHooks.count.HP_mob_spawn_dataset_post > 0) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data); + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data, int npc_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_spawn_dataset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, data); + retVal___ = postHookFunc(retVal___, data, npc_id); } } return retVal___; @@ -52030,15 +52134,15 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { } return retVal___; } -struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai) { +struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai, int npc_id) { int hIndex = 0; struct mob_data* retVal___ = NULL; if (HPMHooks.count.HP_mob_once_spawn_sub_pre > 0) { - struct mob_data* (*preHookFunc) (struct block_list **bl, int16 *m, int16 *x, int16 *y, const char **mobname, int *class_, const char **event, unsigned int *size, unsigned int *ai); + struct mob_data* (*preHookFunc) (struct block_list **bl, int16 *m, int16 *x, int16 *y, const char **mobname, int *class_, const char **event, unsigned int *size, unsigned int *ai, int *npc_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_pre[hIndex].func; - retVal___ = preHookFunc(&bl, &m, &x, &y, &mobname, &class_, &event, &size, &ai); + retVal___ = preHookFunc(&bl, &m, &x, &y, &mobname, &class_, &event, &size, &ai, &npc_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -52046,13 +52150,13 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, } } { - retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai); + retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai, npc_id); } if (HPMHooks.count.HP_mob_once_spawn_sub_post > 0) { - struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai); + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct block_list *bl, int16 m, int16 x, int16 y, const char *mobname, int class_, const char *event, unsigned int size, unsigned int ai, int npc_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_once_spawn_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, m, x, y, mobname, class_, event, size, ai); + retVal___ = postHookFunc(retVal___, bl, m, x, y, mobname, class_, event, size, ai, npc_id); } } return retVal___; @@ -52111,15 +52215,15 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 } return retVal___; } -int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index) { +int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_mob_spawn_guardian_pre > 0) { - int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index); + int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index, int *npc_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_spawn_guardian_pre[hIndex].func; - retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &guardian, &has_index); + retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &guardian, &has_index, &npc_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -52127,26 +52231,26 @@ int HP_mob_spawn_guardian(const char *mapname, short x, short y, const char *mob } } { - retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); + retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index, npc_id); } if (HPMHooks.count.HP_mob_spawn_guardian_post > 0) { - int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index); + int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_spawn_guardian_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, guardian, has_index); + retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, guardian, has_index, npc_id); } } return retVal___; } -int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id) { +int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_mob_spawn_bg_pre > 0) { - int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id); + int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id, int *npc_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_spawn_bg_pre[hIndex].func; - retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &bg_id); + retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &bg_id, &npc_id); } if (*HPMforce_return) { *HPMforce_return = false; @@ -52154,13 +52258,13 @@ int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, } } { - retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); + retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id, npc_id); } if (HPMHooks.count.HP_mob_spawn_bg_post > 0) { - int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id); + int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_spawn_bg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, bg_id); + retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, bg_id, npc_id); } } return retVal___; @@ -56707,14 +56811,14 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { } return retVal___; } -void HP_npc_unload_duplicates(struct npc_data *nd) { +void HP_npc_unload_duplicates(struct npc_data *nd, bool unload_mobs) { int hIndex = 0; if (HPMHooks.count.HP_npc_unload_duplicates_pre > 0) { - void (*preHookFunc) (struct npc_data **nd); + void (*preHookFunc) (struct npc_data **nd, bool *unload_mobs); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func; - preHookFunc(&nd); + preHookFunc(&nd, &unload_mobs); } if (*HPMforce_return) { *HPMforce_return = false; @@ -56722,26 +56826,59 @@ void HP_npc_unload_duplicates(struct npc_data *nd) { } } { - HPMHooks.source.npc.unload_duplicates(nd); + HPMHooks.source.npc.unload_duplicates(nd, unload_mobs); } if (HPMHooks.count.HP_npc_unload_duplicates_post > 0) { - void (*postHookFunc) (struct npc_data *nd); + void (*postHookFunc) (struct npc_data *nd, bool unload_mobs); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; - postHookFunc(nd); + postHookFunc(nd, unload_mobs); } } return; } -int HP_npc_unload(struct npc_data *nd, bool single) { +int HP_npc_unload_mob(struct mob_data *md, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_unload_mob_pre > 0) { + int (*preHookFunc) (struct mob_data **md, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_mob_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_unload_mob_pre[hIndex].func; + retVal___ = preHookFunc(&md, args___copy); + va_end(args___copy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + va_list args___copy; va_copy(args___copy, args); + retVal___ = HPMHooks.source.npc.unload_mob(md, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_npc_unload_mob_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_mob_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_unload_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_npc_unload(struct npc_data *nd, bool single, bool unload_mobs) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_npc_unload_pre > 0) { - int (*preHookFunc) (struct npc_data **nd, bool *single); + int (*preHookFunc) (struct npc_data **nd, bool *single, bool *unload_mobs); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func; - retVal___ = preHookFunc(&nd, &single); + retVal___ = preHookFunc(&nd, &single, &unload_mobs); } if (*HPMforce_return) { *HPMforce_return = false; @@ -56749,13 +56886,13 @@ int HP_npc_unload(struct npc_data *nd, bool single) { } } { - retVal___ = HPMHooks.source.npc.unload(nd, single); + retVal___ = HPMHooks.source.npc.unload(nd, single, unload_mobs); } if (HPMHooks.count.HP_npc_unload_post > 0) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, bool single); + int (*postHookFunc) (int retVal___, struct npc_data *nd, bool single, bool unload_mobs); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unload_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, single); + retVal___ = postHookFunc(retVal___, nd, single, unload_mobs); } } return retVal___; @@ -56971,11 +57108,11 @@ bool HP_npc_viewisid(const char *viewid) { } return retVal___; } -struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) { +struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_) { int hIndex = 0; struct npc_data* retVal___ = NULL; if (HPMHooks.count.HP_npc_create_npc_pre > 0) { - struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); + struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; @@ -56990,7 +57127,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_); } if (HPMHooks.count.HP_npc_create_npc_post > 0) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_); @@ -57870,15 +58007,15 @@ int HP_npc_reload(void) { } return retVal___; } -bool HP_npc_unloadfile(const char *filepath) { +bool HP_npc_unloadfile(const char *filepath, bool unload_mobs) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_npc_unloadfile_pre > 0) { - bool (*preHookFunc) (const char **filepath); + bool (*preHookFunc) (const char **filepath, bool *unload_mobs); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func; - retVal___ = preHookFunc(&filepath); + retVal___ = preHookFunc(&filepath, &unload_mobs); } if (*HPMforce_return) { *HPMforce_return = false; @@ -57886,13 +58023,13 @@ bool HP_npc_unloadfile(const char *filepath) { } } { - retVal___ = HPMHooks.source.npc.unloadfile(filepath); + retVal___ = HPMHooks.source.npc.unloadfile(filepath, unload_mobs); } if (HPMHooks.count.HP_npc_unloadfile_post > 0) { - bool (*postHookFunc) (bool retVal___, const char *filepath); + bool (*postHookFunc) (bool retVal___, const char *filepath, bool unload_mobs); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filepath); + retVal___ = postHookFunc(retVal___, filepath, unload_mobs); } } return retVal___; @@ -58055,9 +58192,8 @@ void HP_npc_trader_update(int master) { return; } enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { -/* Unknown return type 'enum market_buy_result'. Initializing to '0'. */ int hIndex = 0; - enum market_buy_result retVal___ = 0; + enum market_buy_result retVal___ = MARKET_BUY_RESULT_ERROR; if (HPMHooks.count.HP_npc_market_buylist_pre > 0) { enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; @@ -58109,6 +58245,33 @@ int HP_npc_barter_buylist(struct map_session_data *sd, struct barteritemlist *it } return retVal___; } +int HP_npc_expanded_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_expanded_barter_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct barteritemlist **item_list); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_buylist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_buylist_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_list); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.expanded_barter_buylist(sd, item_list); + } + if (HPMHooks.count.HP_npc_expanded_barter_buylist_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_buylist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_list); + } + } + return retVal___; +} bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; @@ -58344,6 +58507,110 @@ void HP_npc_barter_delfromsql_sub(const char *npcname, int itemId, int itemId2, } return; } +void HP_npc_expanded_barter_fromsql(void) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_fromsql_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_fromsql_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_fromsql(); + } + if (HPMHooks.count.HP_npc_expanded_barter_fromsql_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_fromsql_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_expanded_barter_tosql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_tosql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_tosql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_tosql(nd, index); + } + if (HPMHooks.count.HP_npc_expanded_barter_tosql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_tosql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_expanded_barter_delfromsql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_delfromsql(nd, index); + } + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_expanded_barter_delfromsql_sub(const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_pre > 0) { + void (*preHookFunc) (const char **npcname, int *itemId, int *zeny, int *currencyCount, struct npc_barter_currency **currency); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_sub_pre[hIndex].func; + preHookFunc(&npcname, &itemId, &zeny, ¤cyCount, ¤cy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_delfromsql_sub(npcname, itemId, zeny, currencyCount, currency); + } + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_post > 0) { + void (*postHookFunc) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_sub_post[hIndex].func; + postHookFunc(npcname, itemId, zeny, currencyCount, currency); + } + } + return; +} bool HP_npc_db_checkid(const int id) { int hIndex = 0; bool retVal___ = false; @@ -63092,6 +63359,33 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { } return retVal___; } +int HP_pc_itemskill_clear(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_itemskill_clear_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_itemskill_clear_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.itemskill_clear(sd); + } + if (HPMHooks.count.HP_pc_itemskill_clear_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_itemskill_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; @@ -63465,14 +63759,14 @@ void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { } return; } -void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { +void HP_pc_setmadogear(struct map_session_data *sd, bool flag, enum mado_type mtype) { int hIndex = 0; if (HPMHooks.count.HP_pc_setmadogear_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, bool *flag); + void (*preHookFunc) (struct map_session_data **sd, bool *flag, enum mado_type *mtype); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; - preHookFunc(&sd, &flag); + preHookFunc(&sd, &flag, &mtype); } if (*HPMforce_return) { *HPMforce_return = false; @@ -63480,13 +63774,13 @@ void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { } } { - HPMHooks.source.pc.setmadogear(sd, flag); + HPMHooks.source.pc.setmadogear(sd, flag, mtype); } if (HPMHooks.count.HP_pc_setmadogear_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, bool flag); + void (*postHookFunc) (struct map_session_data *sd, bool flag, enum mado_type mtype); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func; - postHookFunc(sd, flag); + postHookFunc(sd, flag, mtype); } } return; @@ -75306,6 +75600,33 @@ void HP_script_run_item_lapineddukddak_script(struct map_session_data *sd, struc } return; } +bool HP_script_sellitemcurrency_add(struct npc_data *nd, struct script_state *st, int argIndex) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_script_sellitemcurrency_add_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, struct script_state **st, int *argIndex); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sellitemcurrency_add_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_sellitemcurrency_add_pre[hIndex].func; + retVal___ = preHookFunc(&nd, &st, &argIndex); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.sellitemcurrency_add(nd, st, argIndex); + } + if (HPMHooks.count.HP_script_sellitemcurrency_add_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct script_state *st, int argIndex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sellitemcurrency_add_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_sellitemcurrency_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, st, argIndex); + } + } + return retVal___; +} /* searchstore_interface */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; @@ -77383,11 +77704,11 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list } return retVal___; } -int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int8 dir, int flag) { +int HP_skill_blown(struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_skill_blown_pre > 0) { - int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, int8 *dir, int *flag); + int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_blown_pre[hIndex].func; @@ -77402,7 +77723,7 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, retVal___ = HPMHooks.source.skill.blown(src, target, count, dir, flag); } if (HPMHooks.count.HP_skill_blown_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int count, int8 dir, int flag); + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_blown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, target, count, dir, flag); @@ -77842,6 +78163,33 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) } return retVal___; } +bool HP_skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_skill_is_item_skill_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_is_item_skill_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.is_item_skill(sd, skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_is_item_skill_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_is_item_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); + } + } + return retVal___; +} int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; @@ -79686,10 +80034,10 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { } return retVal___; } -void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) { +void HP_skill_brandishspear_first(struct square *tc, enum unit_dir dir, int16 x, int16 y) { int hIndex = 0; if (HPMHooks.count.HP_skill_brandishspear_first_pre > 0) { - void (*preHookFunc) (struct square **tc, uint8 *dir, int16 *x, int16 *y); + void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_brandishspear_first_pre[hIndex].func; @@ -79704,7 +80052,7 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y HPMHooks.source.skill.brandishspear_first(tc, dir, x, y); } if (HPMHooks.count.HP_skill_brandishspear_first_post > 0) { - void (*postHookFunc) (struct square *tc, uint8 dir, int16 x, int16 y); + void (*postHookFunc) (struct square *tc, enum unit_dir dir, int16 x, int16 y); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_brandishspear_first_post[hIndex].func; postHookFunc(tc, dir, x, y); @@ -79712,10 +80060,10 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y } return; } -void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { +void HP_skill_brandishspear_dir(struct square *tc, enum unit_dir dir, int are) { int hIndex = 0; if (HPMHooks.count.HP_skill_brandishspear_dir_pre > 0) { - void (*preHookFunc) (struct square **tc, uint8 *dir, int *are); + void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int *are); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_pre[hIndex].func; @@ -79730,7 +80078,7 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { HPMHooks.source.skill.brandishspear_dir(tc, dir, are); } if (HPMHooks.count.HP_skill_brandishspear_dir_post > 0) { - void (*postHookFunc) (struct square *tc, uint8 dir, int are); + void (*postHookFunc) (struct square *tc, enum unit_dir dir, int are); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_brandishspear_dir_post[hIndex].func; postHookFunc(tc, dir, are); @@ -81647,10 +81995,10 @@ int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct } return retVal___; } -void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) { +void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir) { int hIndex = 0; if (HPMHooks.count.HP_skill_attack_blow_unknown_pre > 0) { - void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, int8 **dir); + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func; @@ -81665,7 +82013,7 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } if (HPMHooks.count.HP_skill_attack_blow_unknown_post > 0) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); @@ -90458,6 +90806,33 @@ struct unit_data* HP_unit_bl2ud(struct block_list *bl) { } return retVal___; } +const struct unit_data* HP_unit_cbl2ud(const struct block_list *bl) { + int hIndex = 0; + const struct unit_data* retVal___ = NULL; + if (HPMHooks.count.HP_unit_cbl2ud_pre > 0) { + const struct unit_data* (*preHookFunc) (const struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_cbl2ud_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_cbl2ud_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.cbl2ud(bl); + } + if (HPMHooks.count.HP_unit_cbl2ud_post > 0) { + const struct unit_data* (*postHookFunc) (const struct unit_data* retVal___, const struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_cbl2ud_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_cbl2ud_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} struct unit_data* HP_unit_bl2ud2(struct block_list *bl) { int hIndex = 0; struct unit_data* retVal___ = NULL; @@ -90538,14 +90913,14 @@ int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { } return retVal___; } -int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_walktoxy_timer_pre > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } if (*HPMforce_return) { @@ -90554,25 +90929,25 @@ int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.walk_toxy_timer(tid, tick, id, data); } - if (HPMHooks.count.HP_unit_walktoxy_timer_post > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -int HP_unit_walktoxy_sub(struct block_list *bl) { +int HP_unit_walk_toxy_sub(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_walktoxy_sub_pre > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_sub_pre > 0) { int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_sub_pre[hIndex].func; retVal___ = preHookFunc(&bl); } if (*HPMforce_return) { @@ -90581,25 +90956,25 @@ int HP_unit_walktoxy_sub(struct block_list *bl) { } } { - retVal___ = HPMHooks.source.unit.walktoxy_sub(bl); + retVal___ = HPMHooks.source.unit.walk_toxy_sub(bl); } - if (HPMHooks.count.HP_unit_walktoxy_sub_post > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_sub_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_walktoxy_sub_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_delay_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_delay_walktoxy_timer_pre > 0) { + if (HPMHooks.count.HP_unit_delay_walk_toxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walk_toxy_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_delay_walk_toxy_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } if (*HPMforce_return) { @@ -90608,25 +90983,25 @@ int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.delay_walk_toxy_timer(tid, tick, id, data); } - if (HPMHooks.count.HP_unit_delay_walktoxy_timer_post > 0) { + if (HPMHooks.count.HP_unit_delay_walk_toxy_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walk_toxy_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_delay_walk_toxy_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { +int HP_unit_walk_toxy(struct block_list *bl, short x, short y, int flag) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_walktoxy_pre > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_pre > 0) { int (*preHookFunc) (struct block_list **bl, short *x, short *y, int *flag); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_walktoxy_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_pre[hIndex].func; retVal___ = preHookFunc(&bl, &x, &y, &flag); } if (*HPMforce_return) { @@ -90635,25 +91010,25 @@ int HP_unit_walktoxy(struct block_list *bl, short x, short y, int flag) { } } { - retVal___ = HPMHooks.source.unit.walktoxy(bl, x, y, flag); + retVal___ = HPMHooks.source.unit.walk_toxy(bl, x, y, flag); } - if (HPMHooks.count.HP_unit_walktoxy_post > 0) { + if (HPMHooks.count.HP_unit_walk_toxy_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, short x, short y, int flag); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_walktoxy_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, x, y, flag); } } return retVal___; } -int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_walktobl_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_walktobl_sub_pre > 0) { + if (HPMHooks.count.HP_unit_walktobl_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walktobl_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } if (*HPMforce_return) { @@ -90662,12 +91037,12 @@ int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.walktobl_timer(tid, tick, id, data); } - if (HPMHooks.count.HP_unit_walktobl_sub_post > 0) { + if (HPMHooks.count.HP_unit_walktobl_timer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_walktobl_sub_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walktobl_timer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } @@ -90807,14 +91182,14 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b } return retVal___; } -int HP_unit_setdir(struct block_list *bl, unsigned char dir) { +int HP_unit_set_dir(struct block_list *bl, enum unit_dir dir) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_setdir_pre > 0) { - int (*preHookFunc) (struct block_list **bl, unsigned char *dir); + if (HPMHooks.count.HP_unit_set_dir_pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum unit_dir *dir); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_dir_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_set_dir_pre[hIndex].func; retVal___ = preHookFunc(&bl, &dir); } if (*HPMforce_return) { @@ -90823,22 +91198,22 @@ int HP_unit_setdir(struct block_list *bl, unsigned char dir) { } } { - retVal___ = HPMHooks.source.unit.setdir(bl, dir); + retVal___ = HPMHooks.source.unit.set_dir(bl, dir); } - if (HPMHooks.count.HP_unit_setdir_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned char dir); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_setdir_post[hIndex].func; + if (HPMHooks.count.HP_unit_set_dir_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum unit_dir dir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_dir_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_set_dir_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, dir); } } return retVal___; } -uint8 HP_unit_getdir(struct block_list *bl) { +enum unit_dir HP_unit_getdir(const struct block_list *bl) { int hIndex = 0; - uint8 retVal___ = 0; + enum unit_dir retVal___ = UNIT_DIR_UNDEFINED; if (HPMHooks.count.HP_unit_getdir_pre > 0) { - uint8 (*preHookFunc) (struct block_list **bl); + enum unit_dir (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func; @@ -90853,7 +91228,7 @@ uint8 HP_unit_getdir(struct block_list *bl) { retVal___ = HPMHooks.source.unit.getdir(bl); } if (HPMHooks.count.HP_unit_getdir_post > 0) { - uint8 (*postHookFunc) (uint8 retVal___, struct block_list *bl); + enum unit_dir (*postHookFunc) (enum unit_dir retVal___, const struct block_list *bl); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_getdir_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); @@ -90915,6 +91290,33 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type } return retVal___; } +int HP_unit_warpto_master(struct block_list *master_bl, struct block_list *slave_bl) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_unit_warpto_master_pre > 0) { + int (*preHookFunc) (struct block_list **master_bl, struct block_list **slave_bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_warpto_master_pre[hIndex].func; + retVal___ = preHookFunc(&master_bl, &slave_bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.warpto_master(master_bl, slave_bl); + } + if (HPMHooks.count.HP_unit_warpto_master_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_warpto_master_post[hIndex].func; + retVal___ = postHookFunc(retVal___, master_bl, slave_bl); + } + } + return retVal___; +} int HP_unit_stop_walking(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; @@ -90969,14 +91371,14 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, } return retVal___; } -int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_steptimer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if (HPMHooks.count.HP_unit_step_timer_pre > 0) { + if (HPMHooks.count.HP_unit_steptimer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++) { - preHookFunc = HPMHooks.list.HP_unit_step_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_steptimer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_steptimer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } if (*HPMforce_return) { @@ -90985,12 +91387,12 @@ int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { } } { - retVal___ = HPMHooks.source.unit.step_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.steptimer(tid, tick, id, data); } - if (HPMHooks.count.HP_unit_step_timer_post > 0) { + if (HPMHooks.count.HP_unit_steptimer_post > 0) { int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); - for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++) { - postHookFunc = HPMHooks.list.HP_unit_step_timer_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_steptimer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_steptimer_post[hIndex].func; retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } @@ -91399,11 +91801,11 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran } return retVal___; } -int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { +int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, enum unit_dir dir) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_unit_calc_pos_pre > 0) { - int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, uint8 *dir); + int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_calc_pos_pre[hIndex].func; @@ -91418,7 +91820,7 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { retVal___ = HPMHooks.source.unit.calc_pos(bl, tx, ty, dir); } if (HPMHooks.count.HP_unit_calc_pos_post > 0) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int tx, int ty, uint8 dir); + int (*postHookFunc) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir dir); for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_calc_pos_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, tx, ty, dir); diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index 35c83f367..cd4f10e2a 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -244,6 +244,10 @@ sub parse($$) { $rtinit = ' = DB_OPT_BASE'; } elsif ($x =~ /^enum\s+thread_priority$/) { # Known enum thread_priority $rtinit = ' = THREADPRIO_NORMAL'; + } elsif ($x =~ /^enum\s+market_buy_result$/) { # Known enum market_buy_result + $rtinit = ' = MARKET_BUY_RESULT_ERROR'; + } elsif ($x =~ /^enum\s+unit_dir$/) { # Known enum unit_dir + $rtinit = ' = UNIT_DIR_UNDEFINED'; } elsif ($x eq 'DBComparator' or $x eq 'DBHasher' or $x eq 'DBReleaser') { # DB function pointers $rtinit = ' = NULL'; } elsif ($x =~ /^(?:struct|union)\s+.*$/) { # Structs and unions diff --git a/tools/HPMHookGen/doxygen.conf b/tools/HPMHookGen/doxygen.conf index c302f7f2f..ead1deeca 100644 --- a/tools/HPMHookGen/doxygen.conf +++ b/tools/HPMHookGen/doxygen.conf @@ -282,12 +282,10 @@ GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = NO EXTERNAL_PAGES = YES -PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -MSCGEN_PATH = DIA_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO diff --git a/tools/mobdbconverter.py b/tools/mobdbconverter.py index 2073d083c..8a220b08d 100755 --- a/tools/mobdbconverter.py +++ b/tools/mobdbconverter.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # -*- coding: utf8 -*- # # This file is part of Hercules. @@ -141,6 +141,24 @@ def isHaveData(fields, start, cnt): return True return False +def convertToSize(size): + sizes = ["Size_Small", "Size_Medium", "Size_Large"] + if (size >= len(sizes)): + return size + return f'"{sizes[size]}"' + +def convertToRace(race): + races = ["RC_Formless", "RC_Undead", "RC_Brute", "RC_Plant", "RC_Insect", "RC_Fish", "RC_Demon", "RC_DemiHuman", "RC_Angel", "RC_Dragon"] + if (race >= len(races)): + return race + return f'"{races[race]}"' + +def convertToElement(element): + elements = ["Ele_Neutral", "Ele_Water", "Ele_Earth", "Ele_Fire", "Ele_Wind", "Ele_Poison", "Ele_Holy", "Ele_Dark", "Ele_Ghost", "Ele_Undead"] + if (element >= len(elements)): + return element + return f'"{elements[element]}"' + def convertFile(inFile, itemDb): if inFile != "" and not os.path.exists(inFile): return @@ -186,9 +204,9 @@ def convertFile(inFile, itemDb): endGroup() printField("ViewRange", fields[20]) printField("ChaseRange", fields[21]) - printField("Size", fields[22]) - printField("Race", fields[23]) - print("\tElement: ({0}, {1})".format(int(fields[24]) % 10, int(int(fields[24]) / 20))); + printField("Size", convertToSize(int(fields[22]))) + printField("Race", convertToRace(int(fields[23]))) + print("\tElement: ({0}, {1})".format(convertToElement(int(fields[24]) % 10), int(int(fields[24]) / 20))); mode = int(fields[25], 0) if mode != 0: startGroup("Mode") @@ -277,13 +295,13 @@ def readItemDB(inFile, itemDb): return itemDb if len(sys.argv) != 4 and len(sys.argv) != 3: - printHelp(); + printHelp() exit(1) startPath = sys.argv[2] if len(sys.argv) == 4: sourceFile = sys.argv[3] else: - sourceFile = ""; + sourceFile = "" itemDb = dict() if sys.argv[1] == "re": @@ -293,7 +311,7 @@ elif sys.argv[1] == "pre-re": itemDb = readItemDB(startPath + "/db/pre-re/item_db.conf", itemDb) itemDb = readItemDB(startPath + "/db/item_db2.conf", itemDb) else: - printHelp(); + printHelp() exit(1) convertFile(sourceFile, itemDb) |