* Removed hardcoded message that displayed clif_showscript for `transform` script, replaced its usage for item script by using `showscript`.
* Changed unittalk usage on `F_Cat_Hard_Biscuit` and `F_Rice_Weevil_Bug` function in quests_malangdo.txt.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
* 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.
* Fixes#158 - Implemented 'getvar' script command to avoid blindly attaching players and messing up their NPC progress.
* Fixes#449 - Fixed 'unitskilluseid' and 'unitskillusepos' not casting skills that require stat info when the NPC's status wasn't loaded.
* Implemented 'getunittype' script command to return the object type of the given GID.
* Adjusted 'unitwalk' to support an Event Label which is executed when the object reaches the target.
* Added 'unitwalkto' when giving a target GID rather than coordinates. Also supports Event Labels.
- Thanks to @cydh.
* 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>
* 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>
* 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.
* 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>
* 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>
- 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.
* Fixed mouse cursor displaying incorrectly for PvP scenarios. Thanks to Napster. (bugreport:8605)
* Fixed summons getting stuck when master gets too far off screen or changes maps. (bugreport:9152)
* Added a battle_config 'spawn_direction' for keeping a character's face direction when teleporting/changing maps/logging in. Default is always North (official). (bugreport:8754)
* Cast sensor mobs should always target the caster whenever any skill is used. (bugreport:8555)
* Added a packet version check to char_del_option based on client date. (bugreport:8521)
* Script command query_sql will now return -1 on an empty result or failed result. (bugreport:5937)
* 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.
* 'bonus_script' improvement:
-- Added flag values (partial merge from sc_config branch):
-- * 16 : Removeable by Banishing Buster.
-- * 32 : Removable by Refresh.
-- * 128 : Removable by Luxanima.
-- * 256 : Remove when Madogear is activated or deactivated.
-- * 512 : Remove when receive damage.
-- * 1024: Script is permanent, cannot be cleared by bonus_script_clear
-- Added 'bonus_script_clear' command to remove active bonus_script from player (works like sc_end) Thank Napster to mention this. (bugreport:9042)
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
-- Map crashed because empty item_combo script (bugreport:8959)
-- Wrong MATK calculation of Distort Crescent/Zangetsu effect (SC_ZANGETSU) (bugreport:8998)
-- Wrong damage reduction of Sera's Pain Killer effect (SC_PAIN_KILLER) (bugreport:8994)
-- Fixed Shape Shift (NC_SHAPESHIFT) wrong requirement (bugreport:9002)
-- @itembound, getitembound usage. Not, now allowed for unspecified bound_type (thank Ceejay Abne! http://rathena.org/board/index.php?showtopic=94726)
-- Change check behavior for skill requirement level-dependent check.
-- Removed NC_REPAIR hardcoded requirement.
-- Moved the required equipped item to 'RequiredEquipment' on skill_require_db.txt.
-- Missing "Option_Ruwach" as contantan.
-- Corrected Chasewalk STR bonus, it's SC_CHASEWALK2, different with SC_INCSTR.
-- Corrected some Rebellion skill's effects.
-- USESKILL_FAIL_MADOGEAR message for failed skill that needs player has Madogear.
-- Changed skill name and description length to 31 chars.
-- Some documentation updates.
-- Follow up 0f2dd7f. (Well, using empty password in import file, won't works, if you want, empty the original conf file. Fix this later, related on 'sscanf' for those files)
-- Follow up 28c90bb, thank @julia40124009
-- Misc. :P
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>