* Follow up 9d389f4de42840b8d05244ad48c214100c7c7d05
* Reduce the succes rate for 19020 combos and 18934. Because of misread the autobonus doc.
* Completed bonus for 18934,Fox_Ears_Bell_Ribbon (the critical and long ranged attack bonus)
* Fixed item bonus for 18857,Curupira_Hat, somehow it was using 18856,W_King_Tiger_Doll_Hat effect.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
* Added `bonus2 bSubSkill,sk,n;` -> Reduces n% damage received from skill sk.
* Added `bonus bHPGainAttack,n;` -> Heals +n HP with a normal attack.
* Added `bonus bSPGainAttack,n;` -> Heals +n SP with a normal attack.
* Added `bonus bHPGainAttackRate,n;` -> Heals +n% HP of inflicted damage on every hit when attacking an enemy.
* Added `bonus bSPGainAttackRate,n;` -> Heals +n% SP of inflicted damage on every hit when attacking an enemy.
* Added `bonus2 bHPGainAttackRate,n,x;` -> Has chance x/10% to heals +n% HP of inflicted damage on every hit when attacking an enemy.
* Added `bonus2 bSPGainAttackRate,n,x;` -> Has chance x/10% to heals +n% SP of inflicted damage on every hit when attacking an enemy.
* Replaced `bonus2 bHPDrainValue,n,x;` for x = 0 to `bonus bHPGainAttack,n;`. Since x = 1 is same as `bonus bHPDrainValue,n;` and if there are items with bonus with 'x' is different, the value will be sum'd but the type switched.
* Replaced `bonus2 bSPDrainValue,n,x;` for x = 0 to `bonus bSPGainAttack,n;`. Since x = 1 is same as `bonus bSPDrainValue,n;` and if there are items with bonus with 'x' is different, the value will be sum'd but the type switched.
* Replaced `bonus3 bSPDrainRate,n,x,y;` for y = 0 to `bonus2 bSPGainAttackRate,n,x;`. Since y = 1 is same as `bonus2 bSPDrainRate,x,n;` and if there are items with bonus with 'x' is different, the value will be sum'd but the type switched.
* Updated the documentations.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
* `bonus2 bHPGainRaceAttackRate,r,n;`: Heals +n% HP of inflicted damage on every hit when attacking an enemy of race r
* `bonus2 bSPGainRaceAttackRate,r,n;`: Heals +n% SP of inflicted damage on every hit when attacking an enemy of race r
* `bonus bAbsorbDmgMaxHP,n;`: If the damage received is more than n% of Max HP, the damage received is [TotalDamage] - [n% of MaxHP]
* Thank @nanakiwurtz.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
* Follow up df2f850c, correcting `class_idx` usage that should be compared with `enum e_job` in `pc_calc_basesp` and also in `pc_calc_basehp`
* Follow up 308c4779, fixed typo fix
* Makes `instance_id()` doesn't show debug message when it return 0 for instance id
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
- Changed "ACTIVEPATHSEARCH" to only work with real walls and not walls you can shoot through
* Seems the position lag for which I have implemented this no longer occurs on my client (was something changed?)
* Previous implementation prevented monsters from attacking you through shootable walls
* Special thanks to Michi for notifying me about this issue
Credit @Playtester
* Replacing 'rand()' leftwover with 'rnd()' of mt19937ar
* Cleaned up script commands related with item group: 'groupranditem', 'getrandgroupitem', 'getgroupitem'
* Corrected item scripts that are using 'getrandgroupitem'
* Updated script command and item group doc
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
* 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>
* 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>
* Updated setunitdata to recalculate the object's information and update the client immediately.
* For setunitdata, map name can also be passed in as a valid value instead of map ID.
* Added mapid2name script command.
* Added status_set_maxhp and status_set_maxsp functions.
* Updated documentation to reflect changes.
* Added getunitname, setunitname, getunitdata, and setunitdata script commands.
- getunitdata and setunitdata are open to suggestions for more values.
* Split unitstop to unitstopattack and unitstopwalk.
* Expanded unitskilluseid and unitskillusepos to be able to adjust casttime of skill.
* Added two new monster modes: MD_NORANDOM_WALK and MD_NOCAST_SKILL.
* The areamonster script command now saves spawned monster game IDs in an array called $@mobid[].
* Adjusted other monster spawning script commands to return game ID.
* Updated documentation to reflect changes.
* Fixed#119 - Corrected Flash Combo weapon ATK and to cancel skill cast when target is more than 2 cells away.
* Fixed#148 - Corrected Kings Grace to only cast on guild members in versus type maps and added missing effects. Updated cooldown from 60 to 90 seconds.
* Fixed#341 - Offertorium and Magnificat now cancel each other out (Mimics Kyrie Eleison and Assumptio).
* Follow up to 5a0f8dc. Added missing monster transformation bonuses.
* Updated the Status Icon list with newer icons.
* Moved hardcoded `DEFAULT_MAP`, `DEFAULT_MAP_X`, and `DEFAULT_MAP_Y` definition to conf/char_athena.conf: `default_map`, `default_map_x`, and `default_map_y` for `DEFAULT_MAP`
* Default map existance check only will be checked once, after map_index finished load by char-server, previously map-server also do a check that maybe cause unnecessary debug message
* `instance_start` value should be init'd with `map_num` not by `map_num + 1`. I was causing send extra 1 empty map to char-server.
* A little clean up in `chmapif_parse_getmapname()` and `doc/packet_interserv.txt`
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
Bonus HP/SP Vanish updates:
* Added 'bonus3 bHPVanishRaceRate,r,n,x' (2074) and 'bonus3 bSPVanishRaceRate,r,n,x' (2075)
* Corrected documentation about 'bHPVanishRate' and 'bSPVanishRate', rate should be n/100%, 10000 for 100%
* 'bHPVanishRate' and 'bSPVanishRate' applied regardless the target's Race and map (before, if target is player bHPVanishRate only works in PVP/GVG maps)
* Changed Velum item scripts:
* (1294) Velum_Scare to 'bonus3 bSPVanishRaceRate,RC_Player,10000,10;'
* (1395) Velum_Buster to 'bonus3 bSPVanishRaceRate,RC_Player,10000,10;'
* (18113) Velum_Arbalest to 'bonus3 bSPVanishRaceRate,RC_Player,10000,4;'
* (21002) Velum_Katzbalger to 'bonus3 bHPVanishRaceRate,RC_Player,10000,8;'
* Added 'bonus3 bHPVanishRaceRate,r,n,x' (2074) and 'bonus3 bSPVanishRaceRate,r,n,x' (2075)
* Corrected documentation about 'bHPVanishRate' and 'bSPVanishRate', rate should be n/100%, 10000 for 100%
* 'bHPVanishRate' and 'bSPVanishRate' applied regardless the target's Race and map (before, if target is player bHPVanishRate only works in PVP/GVG maps)
* Changed Velum item scripts:
* (1294) Velum_Scare to 'bonus3 bSPVanishRaceRate,RC_Player,10000,10;'
* (1395) Velum_Buster to 'bonus3 bSPVanishRaceRate,RC_Player,10000,10;'
* (18113) Velum_Arbalest to 'bonus3 bSPVanishRaceRate,RC_Player,10000,4;'
* (21002) Velum_Katzbalger to 'bonus3 bHPVanishRaceRate,RC_Player,10000,8;'
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* 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>
* 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>
* 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>
* Max level to equip item now works for Pre-Renewal too, since the field is optional. 0 means no max level limit.
* Fixed fail message on clif_equipitemack when item cannot be equipped because level limitation
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed Guild/Party Bound Item Retrieval Methods:
- Fixes bugreport: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 any more if the player idle on character select window (just prevents player to login when retrieving 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 cancelled!
- 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
* 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>
* Separated pet_db for Renewal & Pre-Renewal to avoid non-existant monster in different mode.
* Cleaned script command in pet_db.txt file, just point it to doc/script_commands.txt. Read them there!
* Separated damage value for petskillattack2 to its own var 'damage', that previously use 'lv' var to store the value.
* Added config 'pet_ignore_infinite_def' in conf/battle/pet.conf,
* If disabled (val:"no"), fixed damage from pet script 'petskillattack2' will be adjusted to 1. Example, just like player attacks Shining Plant.
* Enabled by default. Previously, fixed damage ignore the infinite defense, that's why it's enabled by default.
* TODO: Correcting the logic and maybe also confirm the correct behavior!
* Added validation for pet script commands,
* Skill for petskillattack, petskillattack2, & petskillsupport
* SC range for petrecovery.
* Cleaned up some source documentation.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* GUID
- `guid` field in official PackageItem.lua supposed to make item will be separated even item is stackable item.
- Currently `guid` usage is using item Unique ID that generated when item with GUID flag is appear from package.
- Some item containers in official PackageItem.lua are also separated, not stacked when player obtain it. Example when using atcommand "@item Xmas_Bless". For current implementation, the items are flagged in item_flag.txt (db folder) with flag 4.
- `isNamed` field in item group is replaced by `GUID` and move the `isNamed` as new additional field. See doc/item_group.txt or db/re/item_package.txt.
* NPC:
- Enabled npc/re/other/item_merge.txt and it's now usable.
* Script Command:
- Added `mergeitem` to merge separated items in player's inventory. See doc/script_commands.txt.
* Misc:
- Changed how to broadcast the item that obtained from package with flag `isAnnounced` to intif_broadcast, so it will be announced to all connected map-servers.
- Added some items that flagged as 'item group container' in db/re/item_flag.txt
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Moved additive bonuses (reducing/increasing) to first calculation before the rate adjustment
* Corrected bFixedCastrate, shouldn't be stacked. Example between Puente_Robe (15012) is -3% and +10 Rafini_Staff (1649) is -10%, only -10% will be used not -13%.
* Reversed some value assignment, `-=` to `+=` and other part that affected by this changes.
* Also as follow up c3e488e & 4f4d8fe, fixed `bonus2 bFixedCastrate,"sk",rate;`
* Corrected `bFixedCastrate` for Krieger_Knuckle2 (1827) only for skill MO_EXTREMITYFIST
* Moved default the 20% of fixed cast rate to conf/battle/skill.conf `default_fixed_castrate`
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Now inter-server always asking to login-server for account info instead using direct query to `login` table. Merged from HerculesWS/Hercules@da233d5
* Inter-server packet usage: HA 0x2720 & AH 0x2721
* Additional changes from inter-server to map-server to parse the account info result with type 1 by using packet 0x3808 for clif_account_name(). Just some changes from @lighta at his old diff
* Moved some messages to char_msg.conf
* Updated inter-server packet documentation
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed `mr` values to use constantan value
* Added check for IT_SHADOWGEAR's script restriction before executing it
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>