74 Commits

Author SHA1 Message Date
Jittapan Pluemsumran
f296409ada
Initial Release of Random Option System
* Added basic support for random option system
* Don't forget to import upgrade_20160814.sql and upgrade_20160814_log.sql to make your existing rAthena installation functional!
2016-08-14 22:21:07 +07:00
aleos89
a14e21f4dd Follow up to 15fdc12
* Adjusted the item database parser cast type.
* Adjusted the SQL tables to reflect the increased limit.
2016-06-14 17:37:04 -04:00
Jey
9bd10dacf4 Follow up to 879ddcc1af2600b90420d1c876e28866f68489ef:
Upgrade Script for feeding log.
2016-05-17 02:27:55 +02:00
Napster
d70b1734c8 Add support body style implementation
* This feature require the client support before 2015-05-13 or newer
   Make sure you data&lub support for this

  note : read info to https://rathena.org/board/topic/104205-2015-client-support/

  Special Thanks you to Rytech, @aleos89
2016-01-12 01:55:30 +07:00
Lemongrass3110
09a87306b1 Added a unique index for aegis name to the item tables 2016-01-06 02:13:19 +01:00
marha
fd9251579c Narrow the query results to named items only (card0 IN (254,255)) 2015-11-19 22:18:23 +01:00
marha
f34deb0ebc Fixing upgrade 2014 06 12 losing data when having negative data (e.g. char ids) in card slots. Easiest way to reproduce is on a Wedding Ring. 2015-11-10 00:19:57 +01:00
Vennren
ea1ffb578a Update upgrade_20150619.sql
Fixed 'db_roulette' table in relation to Error Code: 1064.
2015-10-08 05:10:51 +02:00
aleos89
039e1b65a3 Quest System Update
* Added support for the new quests that grant item drops from mobs.
2015-09-17 13:24:42 -04:00
Aleos
6295c77d39 Merge pull request #457 from rathena/feature/script_engine_upgrade
Script Engine Upgrade
* More information here: https://rathena.org/board/topic/102946-script-engine-upgrade/
2015-08-31 14:26:15 -04:00
aleos89
3452b931b9 Small Changes
* Renamed SQL upgrade file.
* Fixed a buffer overflow in 'set' atcommand.
2015-08-31 14:15:30 -04:00
Napster
e444270b0a Follow up to 53868d5
* Fixed #600, Hotkey Rotate Packet Implemented, Thank You @dastgir

Credits : Hercules 2b4b33b06a
2015-08-28 16:32:23 +07:00
Cydh Ramdh
e1b658e462 * Item GUID Updates:
* Removed `ENABLE_ITEM_GUID` from src/config/core.h, after long time introduction it's worth to be enabled by default. Just remove all items with GUID flag if want to remove it generates GUID .
  * Implemented client interface to merge the items. Packet struct credits: 856b6f1feb
  * Edited `mergeitem` script command to use the interface, moved the 'old' `mergeitem` to `mergeitem2`.
  * Fixed the behavior to add GUID'd item to inventory in Cash Shop.
  * Updated item_flag.txt for listing `IT_CASH` items (item type 18).
  * NOTE: `IT_CASH` items which defined in item_flag.txt with flag `4`, cannot be merged.
  * NOTE: Please check the packets for older clients. Tested work on 2012-04-10, 2013-08-07 and 2014-10-22.
  * NOTE: Please import 'upgrade_20150804.sql' for MySQL Log Database.
* Removed duplicate clif functions:
  * `clif_msgtable()` -> `clif_msg()`
  * `clif_msgtable_num()` -> `clif_msg_value()`
* Item DB Updates:
  * Indonesia_Box2 (17079) should gives 5x Wing_Of_Butterfly (602).
  * Changed some item types to 18.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-08-04 20:57:49 +07:00
aleos89
35cd68873b Merged with master 2015-06-26 10:36:40 -04:00
aleos89
9fd34b2439 Bug Fixes
* Fixes #475 - Added missing Roulette packet lengths.
* Fixed a few issues with character gender changes for 20141016 and up. Thanks to @cydh's eagle eyes!
* Fixed a small typo in 'upgrade_20150619_log.sql'.
* Removed an unused variable.
2015-06-22 15:05:18 -04:00
aleos89
b6212a676d Follow up to 3d9c6e7.
* Fixed missing index for Roulette SQL table.
2015-06-19 14:39:49 -04:00
aleos89
3d9c6e7763 2014 Client Support
* Implemented the Roulette Game feature.
* Implemented per-character sex change feature.
* More info: https://rathena.org/board/topic/102247-2014-client-support/
- Special thanks to HerculesWS/Hercules@239d480 for the base.
2015-06-19 14:07:34 -04:00
aleos89
0696125b82 Script Engine Upgrade
* Upgraded the script engine variables to no longer be limited.
* Increased array limit from 127 to 2 billion.
* Improvement in overall speed and storage size.
* All variable types now support arrays.
- Merge from HerculesWS/Hercules@82b583b. Thanks to those who worked on it.
2015-06-11 10:44:13 -04:00
Cydh Ramdh
5ed75dc877 * Merge pull request #294 and its clean up
* Moved Bank Vault from `login` table (login-server level) to `global_reg_value` as #BANKVAULT (char-server level)
  * IMPORTANT: Read & import upgrade_20150408.sql
* Follow up cbdc0127, another fix for Point Shop NPC.
* Follow up 022d7289, corrected picklog initial for bound items that removed when member of guild/party or guild/party is broken. Please import upgrade_20150408_log.sql

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-04-09 01:26:17 +07:00
Cydh Ramdh
7d929a06a3 NPC Market Shop support
* New shop script definition: `<map name>,<x>,<y>,<facing>%TAB%marketshop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>:<quantity>{,<itemid>:<price>:<quantity>...}`
* Added script command to update shop NPC: 'npcshopupdate "<name>",<itemid>,<price>{,<stock>}'
* Added NPCMarketDB (DBMap) for market data persistance method.
* Added `market_table` definition for market table in conf/inter_athena.conf.
* Thank to @aleos89, @Lemongrass, @icxbb-xx, merged HerculesWS/Hercules@cf19b26.

NOTES:
* Minimum client needed 2013-12-23 (but this client has bugs there-and-there).
* There's new table, see `upgrade_20150327.sql`.
* Market shop doesn't support discount.
* Added items by script `npcshopitem` or `npchopadditem` will be assumed as persistance items, will be loaded on next script reload or server start even market_shop NPC does't list them (unless NPC is not exists, entries will be removed).

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2015-03-27 21:11:07 +07:00
aleos89
d3625e5c10 Cleaned up merge issues. 2015-02-21 15:43:58 -05:00
Cydh Ramdh
9d3d34205f Skill DB clean ups
* Changed skill_db array to better memory allocation.
* Reduced MAX_SKILL_LEVEL from 100 to 10 (part of Hercules 0f4a50d135), also has changes on skill_get checks for skill level that more than 10.
* Reduced MAX_SKILL from 5020 to 1200 (actually only 1109 skills are used).
* Added macros for checking Homunculus, Guild, Mercenary, & Elemental skill ranges.
* Added skill check & index validation when player logged in and when @reloadskilldb.
* Corrected `enum e_skill_flag` order for SKILL_FLAG_REPLACED_LV_0's sake.
* Merged 'addtoskill' script command just as alias of 'skill' script command.
* Fixed #277
* Changed 'skill' script command flag to constant value

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>

NOTE:
* Decreased memory usage by map-server reduced up to 50 MB.
* Decreased memory for each player because of mmo_charstatus::skill[] only has 1200 array, before is 5020.
* Please use skill_get_index() for accessing sd->status.skill[] or skill_db[], don't reckless use skill_id as array index.
* Please import upgrade_20150211_skillset.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2015-02-12 15:50:50 +07:00
Aleos
0e533fa7ab Revert "Skill DB clean ups" 2015-02-10 09:33:00 -05:00
Cydh Ramdh
72617ac98b Skill DB clean ups
* Changed skill_db array to better memory allocation.
* Reduced MAX_SKILL_LEVEL from 100 to 10 (part of Hercules 0f4a50d135), also has changes on skill_get checks for skill level that more than 10.
* Reduced MAX_SKILL from 5020 to 1200 (actually only 1109 skills are used).
* Added macros for checking Homunculus, Guild, Mercenary, & Elemental skill ranges.
* Added skill check & index validation when player logged in and when @reloadskilldb.
* Corrected `enum e_skill_flag` order for SKILL_FLAG_REPLACED_LV_0's sake.
* Merged 'addtoskill' script command just as alias of 'skill' script command.

Summary:
* Decreased memory usage by map-server reduced up to 50 MB.
* Decreased memory for each player because of mmo_charstatus::skill[] only has 1200 array, before is 5020.
* Please use skill_get_index() for accessing sd->status.skill[] or skill_db[], don't reckless use skill_id as array index.

NOTE:
* Please import upgrade_20150131_skillset.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2015-01-31 19:45:52 +07:00
Cydh Ramdh
95705d41be Bonus Script clean up
* Removed fixed array size (MAX_PC_BONUS_SCRIPT) of bonus_script on players.
* Changed fixed script string on player's bonus_script to StringBuf, reduce memory usage for each connected player.
* Added new flags to expand duplicated script and flag to allow duplicate script.
* Reduced buf lenght from 1024 to 512 on bonus_script_data (used for saving/loading bonus_script from char-server). Still, MAX_PC_BONUS_SCRIPT is used to gives limit data can be loaded.

NOTE:
Please import 'upgrade_20150131.sql' for `bonus_script` table changes

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2015-01-31 15:07:13 +07:00
Cydh Ramdh
022d72891e Changed Guild/Party Bound Item Retrieval Methods:
* Bug Fixes bug:9338
* Now resend the list to map-server from char/inter-server to avoid "weird" item allocation on guild storage. Example, previously you will meet stacked item like GUID does, but it shouldn't!
* Also will check the maximum amount that can be store in guild store. If guild storage is full (the slots or item stack limit is reach) the rest value/item will be dropped.
* Account of kicked guild member won't be kicked from server anymore if the player idle on character select window (just prevents player to login when retriving items are in progress)
* Delete guild bound items from guild master when guild is disbanded! Previously, the bound type just changed to NONE. Also for party bound item.
* If kicked guild/party member is trading bound item when be kicked, the trade will be canceled!
* If the guild member is being kicked when open guild storage, storage will be closed first waiting for next item retrieval.
* Now when guild storage is opened, storage_status (changed the var to 'opened') will be used to hold char_id who opens it.
Misc:
* Cleanup guild storage prefix functions, changed them to "gstorage_*"
* Added `picklog` type 'B' for logging deleted bound item because of kicked from guild/party.
* Updated documentation for new used packet 0x3857

NOTE: Please import upgrade-20150103_log.sql
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2015-01-03 20:37:38 +07:00
Cydh Ramdh
9b4d922ef4 Bug Fixes:
* Follow up 2d2991a, remove trailing spaces in inter_athena.conf
* Added `bound` field on `picklog` table (bugreport:9240) Thank @icxbb-xx (Napster)
* Fixed Randomize Spell infinite loop. Failure of skill improvise db reading. (bugreport:9288)
* Added **max_extended_aspd** for caping max ASPD for KO/Rebellion, default is 193. Pointed by @raynra & Ziu
* Mail attachment
  * Added `bound` field on `mail` table, since group with PC_PERM_TRADE_BOUNDED can put bound item into attachment
  * Fixed wrong data type causing wrong zeny amount (bugreport:9291)
* Fixed item color issue for bound item (bugreport:9238)
  * Stackable item shouldn't be displayed as yellow color
  * Equip doesn't shown as yellow after relog or item is moved
* Silence status immunity for Renewal (bugreport:9227)
  * Bleeding (SC_BLEEDING): Vit -> Agi
  * Silence (SC_SILENCE): Vit -> Int
  * Sleep (SC_SLEEP): Int -> Agi
  * Thank @Playtester, @Lilith-, partial merge of Hercules:6f26451
* Fixed status check when cast a skill to hidden target
  * Stone Curse shouldn't be casted to hidden enemy when the caster has intravision (bugreport:9266)
  * Added **INF3_HIT_HIDING** for skills that *maybe* have effect to/can hit the hidden target. Previously, every Earth Element skills *always* had it, doesn't matter ground skill or single-target skill
  * **!TODO: Confirm other skills that have ability for this!**
  * **!FIXME: For now, I rely as the previous check did, I put some Earth Element skills (and) with area/ground effect**
* Correcting Devotion behavior (Hercules:e7be725, 41f28c0)
  * Failing to cast Devotion to the 6th player
  * Only player who devotes other that 'shout' Auto Guard when it active also with the walk delay
  * Status icon that inherited from devoter won't be displayed at devoted player
  * Reflect Damage on devoted player won't reflect normal attack, only melee skill attack
  * Added config **devotion_rdamage_skill_only** for backward compability, ignore the behavior above

**IMPORTANT**
  * Please import sql-files/upgrades/upgrade_20140915_log.sql
  * Please import sql-files/upgrades/upgrade_20140915.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-09-15 18:02:49 +07:00
aleos89
f077a8eb03 Follow up to c0ed836.
- Optimized SQL structure to better fit uint32 value for uniqueitem_counter. (bugreport:9249)
- Added font and uniqueitem_counter to load when loading character menu on char-server.
2014-08-26 16:35:58 -04:00
aleos89
c0ed836e87 * Changed how the Unique ID System saves and creates IDs for items. (Hercules dd49dbc)
- System is now enabled by default.
- All non-stackable items that previously existed will get unique IDs if items::item_check is enabled.
- Added 'getequipuniqueid' script command to get the unique ID of an equipment on a player.
- Don't forget to apply the SQL update!
* Renamed SQL update file that applied to logs.
2014-08-22 17:52:15 -04:00
Cydh Ramdh
7fd6776194 - SC_BANANA_BOMB_SITDOWN & SC_SITDOWN_FORCE force player to wait unti duration ended before standing. (bugreport:9074) Confirmed by @raynra & reigneil
- Corrected check to finalizing vending/buyingstore autotrader datas, follow up 171e2f2. Thank Stingor
- Autotrade persistance updates: (suggestion from Napster)
--- Kicked player will be removed from vending or buyingstore table. This also avoid 'confusion' lookup when server restarted after the kicked player logged back and does autotrade.
--- feature.autotrade_direction, added -1 value to use last player's direction
--- feature.autotrade_head_direction, added for player's head direction
--- feature.autotrade_sit, added -1 value to use last player's condition (standing/sitting)
--- Please import/execute upgrade_20140723.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-07-23 13:26:04 +07:00
Cydh Ramdh
a8f239fc88 Bug Fixes:
- Client stuck while deleting char (bugreport:9101), thank leke
- Wrong check at pc_is_same_equip_index() triggers double damage for two-handed weapon (bugreport:9124), thank Myskelz & Anacondaqq
- Follow up 3d27b7e, Item avail check for npc_cashshop_buy() (bugreport:9122), thank Napster
- Missing enum 'K' for LOG_TYPE_BANK at `zenylog` (bugreport:9122), thank Napster

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-07-13 12:46:41 +07:00
aleos89
62a2813adc Bug Fixes
* Fixed Concentration ending when Frenzy is used. (bugreport:8942)
* Fixed Hells Plant hitting Ghost element enemies. (bugreport:8799)
* Forced guild notice changes to save immediately. (bugreport:8961)
* Fixed Cart Tornado damage formula. (bugreport:9065)
* Adjust Amistr's Castling to now switch to any target type. Still needs skill switching support. (bugreport:1784)
* Removed hard coded 1 second skill duration reduction for Spore Explosion.
* Fixed the party window not displaying the correct map name when in an instance. (bugreport:7949)
* Fixed hatching a pet causing client disconnections. (bugreport:9059) (Hercules 533ff4f)
* Updated Kagerou/Oboro skill cast times. (bugreport:9035)
* Removed deprecated negative nameid value for getitem/getitem2.
* Renamed incuvate to incubate throughout source and SQL.
* Added skill ID to the error display for battle_calc_attack to help resolve issues. (bugreport:8876)
* Cleaned and corrected some Sorcerer Elemental skills. (bugreport:9058)
* Cleaned up some more compile warnings.
2014-06-27 15:45:35 -04:00
Cydh Ramdh
8cb97785c2 Follow up https://github.com/rathena/rathena/commit/98c6aee#commitcomment-6679748 Thank @CairoLee (err, messed up D:)
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-06-18 04:09:10 +07:00
Cydh Ramdh
98c6aee157 Follow up 7cd82d0, bugreport:9041
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-06-16 17:10:50 +07:00
aleos89
42b29ee81e Follow up to 7cd82d0.
- Fixed SQL queries to convert CARD0_PET to positive value before adjusting table to avoid setting the value to 0.
- Thanks to Cydh.
2014-06-12 12:38:46 -04:00
aleos89
7cd82d00db Increased item ID array size.
- Increased limit from 32,767 to 65,535.
- Still uses same amount of memory with doubled usable size.
- Adjusted CARD0_PET from -256 to 256.
- Please run both SQL files after applying this update to avoid values becoming corrupt.
- Tested and works on clients 2012-04-10 and up thanks to Cydh.
- Removed an unused SQL file.
2014-06-12 11:29:10 -04:00
Cydh Ramdh
28c90bb841 * Item DB Updates:
-- kRO 2013-09-25
-- kRO 2013-10-23
-- kRO 2013-11-06 Bar Cookie Festival
-- kRO 2013-11-20
-- kRO 2013-12-18 Casualties Of The Sepulcher & Xmas Event
-- kRO 2013-12-25 Episode 15.2
-- kRO New Year Event 2014 & Octopus Festival Malangdo
-- kRO 2014-01-08 Jumping Event
-- kRO 2014-01-22
-- kRO 2014-01-29 New Year Day Event
-- kRO 2014-02-05
-- kRO 2014-02-12 San Valentin
-- kRO 2014-02-19
-- kRO 2014-02-26
-- kRO 2014-03-12
-- kRO 2014-03-19
-- kRO 2014-03-26
-- Slot & View ID
* Bug fixes:
-- Removed Rebellion job from dagger type weapon (bugreport:8972)
-- Costume leftover on db/import-tmpl/item_db.txt (bugreport:8895)
-- Invalid flag for 12258,Bombring_Box (bugreport:8997)
-- Wrong combo criteria (bugreport:8984)
-- Wrong values in skill_changematerial_db.txt
Thank's to Kido & Bug Reporters

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-05-29 11:31:36 +07:00
aleos89
7e92017092 Follow up to 6afcdeb to include changes on the character server and SQL update. 2014-05-23 13:38:38 -04:00
CairoLee
9ca5208b59 - Remove "DEFAULT CHARSET=latin1" from sql-files(Maybe has somebody Using utf8 like me) 2014-02-20 10:19:02 +08:00
Lemongrass3110
899f3c117c Follow up b3506fb
Somehow I missed the upgrade file. Sorry guys.
Thanks to @exneval for raising my attention on it.
2014-02-06 12:40:04 +01:00
Lemongrass3110
21eac1da68 Forgot the SQL changes 2014-01-14 22:28:52 +01:00
Cydh Ramdh
be516cb53b * Fixed bugreport http://rathena.org/board/tracker/issue-8408-script-line-931-data-too-long-for-column-atkmatk-at-row-1/
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-01-04 21:51:12 +07:00
lighta
b695ab3f41 Fix compilation issue
Follow up dae81222 (AEGIS class system) fix out of bound issue for
array.
(didn't check the x_ALL option system yet)
Follow up 7a9aa7fb Fix possible mapcrash due to offline player
Follow up 12007fef Fix some invalide string check and remove the
reverted sqlfiles
2013-12-30 15:21:25 -05:00
Cydh Ramdh
e18bf43547 * Revert this 487f84e, please import upgrade_20131231.sql. Thank Lemongrass3110 and Toshiro90
* Follow up 7a9aa7f, enum errors
* Follow up 12007fe, function return type error
* Follow up dae8122, 'skill' to 'skill_learnlv'?

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2013-12-31 01:52:14 +07:00
Cydh Ramdh
487f84ef92 * Changed some item_db's fields on MySQL table to use char types rather than numeric types (those fields are never been used for calculation)
* Added missing config on inter_athena.conf for MySQL database (use_sql_db: yes)
* Please upgrade your MySQL database with upgrade_20131229.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2013-12-29 06:44:48 +07:00
Cydh Ramdh
be05bc399b *Added 'status_icon' param for *bonus_script script, thank QQfoolsorellina for the suggestion (https://github.com/rathena/rathena/commit/99098c1#commitcomment-4558795)
--> bonus_script "<script code>",<duration>{,<flag>{,<type>{,<status_icon>{,<char_id>}}}};
* Please update your sql database (main database) with upgrade_20131227.sql

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2013-12-27 18:17:41 +07:00
lighta
3428ae297a Adding charblock
Update HC 0x20d to send the blocklist value, based on Herc:aee2f631
Revamp ZH 0x2b0e and HA 0x2725 to send difftime instead
year,month,day,minutes,secondes values..
Remove duplicate code for char_ban
Add missing sql_upgrade for vip
2013-11-18 20:38:10 -05:00
Cahyadi Ramadhan Togihon
fef6307cf0 * Follow up to bd2503e and 7355677
-- Modified field data of `equip_locations` to mediumint
-- Updated converter tool for item_db following this update
-- Updated item_db.sql, item_db2.sql, item_db_re.sql, item_db_re2.sql
-- CAUTION: Please update item_db MySQL tables by using 'upgrade_20131115_2.sql'

Signed-off-by: Cahyadi Ramadhan Togihon <house.bad@gmail.com>
2013-11-15 10:51:35 +07:00
Lilith-
bd2503e279 Added Shadow Equipment System support (item type 12) 2013-11-14 16:37:03 -08:00
Cahyadi Ramadhan Togihon
9e8e3cfacc * Follow up to: 99098c1
-- 'bonus_script' is now by default will be store on 'bonus_script' table. CAUTION: Please import 'upgrade_20131111.sql' file or execute the query inside to make `bonus_script` table.
-- Updated bonus_script documentation following flag &8 (BONUS_FLAG_REM_ON_LOGOUT) behavior. By default, bonus_script will be stored when player logs out and will be continued when player logs in.

* And small changes.
2013-11-11 19:59:35 +07:00