332 Commits

Author SHA1 Message Date
Daegaladh
ca56c060cf
Added independent idle time and settings for homunculus share (#4761)
* Follow up to 921b3e2c3e9eae36cbf2ca35bcede6e0d73ba074
2020-04-27 20:21:22 +02:00
Aleos
b65443d8f5
Removal of OnPCStatCalcEvent (#4831)
* Fixes #4812.
* This script event can be replaced with the other various player script events.
* The trigger during equipment changing causes headache across other calculation events in source.
2020-04-23 16:53:07 -04:00
Aleos
8716121b4c
Fixes to Battleground script commands (#4764)
* Fixes #4763.
* Cleans up script commands bg_getareausers and bg_get_data.
Thanks to @voyfmyuh and @Lemongrass3110!
2020-04-09 14:18:50 -04:00
Daegaladh
42f695fe8e
Fixed autotraders counting for instance requirements (#4779) 2020-04-09 18:03:18 +02:00
Aleos
06c159c405
Refactored Instances to utilize C++ features (#3163)
* Fixes #3087 and fixes #3095.
* Converts database file to YAML.
* Converts static array to unordered_map which frees up pre-allocated memory that may never be fully used.
* Got rid of all DBMap/ERS features.
* Removes MAX_INSTANCE_DATA in favor of INT_MAX.
* Includes TXT converter.
Thanks to @Lemongrass3110, @secretdataz, @Atemo, @lighta, @InusualZ, @Angelic234, @Normynator, @cydh, and @ecdarreola!
2020-04-08 12:52:45 -04:00
Aleos
2f326bf04a
Converted Quest Database to YAML (#4064)
* Changes TimeLimit format to be human readable.
* Converts title to string.
* Converts objectives and drop items to vectors.
* General clean ups and optimizations.
* Got rid of dummy_quest.
* Added TXT to YAML converter.
Thanks to @Atemo and @Normynator!
Co-authored-by: atemo <capucrath@gmail.com>
2020-03-30 13:17:19 -04:00
Aleos
652d77eb02
Job Improvement Project - Genetic (#3284)
* Fixes #2571.
* Updates Homunculus skills from kRO maintenance: http://ro.gnjoy.com/news/update/View.asp?seq=218&curpage=1
* Updates Genetic skills from kRO maintenance: http://ro.gnjoy.com/news/update/View.asp?seq=246&curpage=1
Thanks to @Tokeiburu, @Badarosk0, @Balferian, and @Haydrich!
2020-03-25 13:26:26 -04:00
Atemo
de80c5aab6
[Suggestion] Implement cloakonnpc/cloakoffnpc (#4688)
* The player can interact with a NPC cloaked by cloakonnpc command (click, mob event..) but the NPC trigger area is disabled (= the OnTouch* part is disabled).
* The changes last until the player leaves the map, logs out, or the npc option is updated by disablenpc/enablenpc/hideonnpc/hideoffnpc/cloakonnpc/cloakoffnpc commands.

Thanks to @aleos89
2020-03-11 22:47:23 +01:00
Lemongrass3110
d165c19b73 Fixed jump_zero for conditions over INT32_MAX
Thanks to @Atemo
2020-02-17 22:50:19 +01:00
Aleos
2931c00bd4
Implemented the Battleground Queue System (#3995)
* Fixes #1310.
* Added a battle config which allows toggling of the Battleground Queue client feature and also toggles between the modes of scripts.
* Added script commands bg_reserve, bg_unbook, and bg_desert.
* Removed old custom Battleground scripts.
Thanks to @Lemongrass3110, @Locien, @secretdataz, @InusualZ, @Normynator, @Atemo, @iubantot, @admkakaroto, and @noobzter003!
2020-02-12 08:26:59 -05:00
aleos
9b6976ea7b Removes some warnings from script command mail
* Follow up to e5c22b3.
* Remove the warnings for refine and bound options as these aren't mandatory fields.
Thanks to @Lemongrass3110!
2020-02-11 17:25:38 -05:00
Jason L
e5c22b360f
Added refine and bound options for mail command (#4272)
* Added refine and bound option for mail script command.
* Made some slight corrections to the script_commands document.
* Note: Any custom scripts that use this command and give some sort of card or random option bonus need to be adjusted as refine and bound come before these options now.
Thanks to @Skormie!
Co-authored-by: Daegaladh <Daegaladh@users.noreply.github.com>
2020-02-11 10:18:59 -05:00
Atemo
ac0d17f4aa
Corrected getfreecell command for flag 2 (#4491)
* Little simplification of the code
* Extends the target type for flag 2 to match the docs (target applicable for player, monster, pet, homunculus)
Thanks to @Lemongrass3110
2020-02-04 19:58:04 +01:00
Lemongrass3110
b86926a7a2
Fixed a compiler warning in script.cpp (#4586)
Fixes #4582

Thanks to @idk-whoami and @aleos89
2020-02-03 14:44:58 +01:00
Sader Fawall
fc1c05aee9 Announce Accept Char id (#4203)
Adjusted script command announce to accept charID
* Fixes #3901.
* Script command announce will now accept a character ID to display locally.
Thanks to @sader1992!
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2020-01-17 21:22:49 -05:00
Lemongrass3110
8f512d8abb Fixed a newly introduced stack bug
Fixes #4537

Thanks to @Triedge
2020-01-14 09:47:28 +01:00
Lemongrass3110
e72c7360cf
Added int64 support to the script engine (#4522)
Added support for signed 64 bit integer value computation into the script engine.
This is required because newer official features require support for bigger numbers inside the scripts.

This also cleans up a lot of messy code and fixes a few issues like script stack corruptions.

Thanks to @aleos89 and everyone who supported me with this.
2020-01-13 14:44:48 +01:00
Aleos
b0119631a4
Allow NPC view data modifications (#4385)
* Fixes #4289.
* Updated script commands setunitdata and getunitdata to support the modification of NPC view data.
* Converted mob_avail database to YAML.
Thanks to @Lemongrass3110, @4144, @exneval, @Balferian, @cahya1992 and @teededung!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2019-12-22 10:27:43 -05:00
Jittapan Pluemsumran
3a7b832906
Threshold for blacksmith refine fame points (#4409)
* Made refine threshold for giving Blacksmith ranking point configurable. Fixes #4408
2019-12-21 16:45:00 +07:00
Sader Fawall
c1079cd44a Fixed script command getunits (#4417)
* Fixes #4416.
* Resolves an issue with script command getunits returning failure on a valid map index.
Thanks to @javirst and @sader1992!
2019-10-24 12:32:01 -04:00
Atemo
b412c4fcab
questinfo requirement update (#4168)
* The <quest ID> is now removed, all the conditions are handled by a <condition> argument. The <condition> is using the achievement_check_condition (like in achievement_db.yml) so any condition (in theory) can be used to display the icon.
* A new script command has been added to refresh the bubble for the given player anytime.

Thanks to @aleos89 and @secretdataz for the review!
2019-10-06 17:15:46 +02:00
Lemongrass3110
f290bc97be
Fixed achievementexists script command (#4379)
Fixes #4378

Thanks to @ecdarreola and @teededung
2019-10-02 08:19:03 +02:00
Atemo
378e44d85d
Removed the option ID requirement for countitem3, rentitem3, getitem3, makeitem3 and delitem3 (#4270)
* These functions now accept the option ID array fill with 0
* They don't throw a warning anymore when the item doesn't have option ID
2019-08-16 14:52:09 +02:00
Atemo
786186f728
Small isequippedcnt script command update (#4229)
* Updated the command to only count the unique ID

Thanks to @cydh, @secretdataz and @aleos89 for the reviews !
2019-08-14 23:27:09 +02:00
Aleos
8050f7c84e
Properly free function script counter (#4269)
* Fixes #3613.
* Script functions will now properly reset the script instance counter when the function terminates the script.
Thanks to @Tokeiburu!
2019-07-29 19:16:07 -04:00
Atemo
5fae7c26c1
convertpcinfo script command (#3924)
Implemented convertpcinfo script command
* The command allows to convert more easily a player data to another.
* It fails silently if the character is not found/online.

Thanks to @aleos89, @Normynator, @cydh !
2019-07-01 21:06:55 +02:00
Atemo
c1975d7ea3
instance_live_info command (#3099)
Implemented instance_live_info script command to retrieve some data of running instances

Thanks to @Jeybla, @cydh, @Lemongrass3110 and @aleos89 for the review !
2019-06-25 21:48:44 +02:00
Sader Fawall
a3fc44ef8a viewpoint command update (#4143)
* Added the optional parameter 'char ID' to the command
2019-05-23 20:11:45 +02:00
Sader Fawall
ddb7d90396 Fix getareaunits coordinates (#4155)
Co-Authored-By: AnnieRuru <annieruru@users.noreply.github.com>
2019-05-20 16:36:16 +02:00
Aleos
21a5854c16
Cleaned up instance script commands (#4090)
* Script command instance_id now supports an instance mode argument. If no mode is given it will return the attached script's instance.
* Script commands instance_destroy, instance_npcname, instance_mapname, instance_announce now attach themselves to the script's instance by default.
* Script commands instance_enter and instance_warpall attach themselves to the player's IM_PARTY instance by default.
* Added getvariableofinstance command (similar to getvariableofnpc) to retrieve the instance variable outside the instance.
* Update documentation to match changes.
Thanks to @vykimo, @Atemo, and @Lemongrass3110!
2019-04-19 09:02:42 -04:00
Atemo
8975682fed
Corrected countitem_sub return value (#4110)
* Corrected countitem_sub return value in case of failure
2019-04-17 17:50:30 +02:00
Aleos
f047a6a510
Cleaned up countitem-type script commands (#3657)
* Fixes #3612.
* Separated the countitem-type script commands into their own functions.
* Created a global count function to be used between them.
Thanks to @kisuka, @Normynator and @Atemo!
2019-04-12 13:13:35 -04:00
Atemo
9aa5f7d834
Added several warning messages (#4062)
* enablenpc / disablenpc / hideoffnpc / hideonnpc now display the npc source when the npc named doesn't exist
* Added the NPC source to status_set_viewdata when no view data has been found
* Added export_deprecated_constant3 to display the constant name replacing the deprecated
* Removed the debug message from `@ warp` when the map name is wrong
* Added clif_name_area to UMOB_LEVEL on setunitdata and a capvalue to UPET_HUNGER
* areamonster now checks if the monster ID exists

Thanks to @Normynator and @aleos89 for the review!
2019-04-10 15:59:42 +02:00
Atemo
7dde174c83
setpcblock script command (#4052)
* Added setpcblock and getpcblock script commands.
'setpcblock' command prevents/allows the player from doing the given type of action.
'getpcblock' command return the bit-mask value of the currently enabled block flags.

The available type are:
	PCBLOCK_MOVE
	PCBLOCK_ATTACK
	PCBLOCK_SKILL
	PCBLOCK_USEITEM
	PCBLOCK_CHAT
	PCBLOCK_IMMUNE
	PCBLOCK_SITSTAND
	PCBLOCK_COMMANDS
	PCBLOCK_NPCCLICK
	PCBLOCK_EMOTION
	PCBLOCK_ALL

Thanks to @sigtus, @secretdataz, @Lemongrass3110 and @aleos89 for the help and reviews !
Credit to https://github.com/HerculesWS/Hercules/pull/842 for the idea.
2019-03-31 18:28:55 +02:00
Sader Fawall
c2abd6d1fe Implementing atcommand_disable_npc config (#4043) 2019-03-29 08:32:07 +01:00
Sader Fawall
ed37a53360 Add some missing Warning (#4044) 2019-03-29 08:09:25 +01:00
Jittapan Pluemsumran
ac558d7c1e
Initial implementation of pet evolution system + Pet DB conversion to YAML (#3544)
* Implemented official pet evolution system
* Added evolved pets to pet database
* Corrected various pet system mechanics
* Migrated pet database to YAML format and the converter from CSV format

Thanks to @Lemongrass3110 @aleos89 and @Atemo for their suggestions and additional fixes
2019-03-26 22:51:57 +07:00
Atemo
e4b41ef7e0
Revert "Added pcblock and checkpcblock script commands. (#3951)" (#4048)
This reverts commit 3e0d3d2fe6b244099d3987b7a21260d6b070512e.
2019-03-26 16:41:14 +01:00
Atemo
3e0d3d2fe6 Added pcblock and checkpcblock script commands. (#3951)
* Added getpcblock and setpcblock script commands.
* Added the docs
* Added the message 'This action is currently blocked.' when the player attempts to perform the following blocked actions
* PCBLOCK_USEITEM
* PCBLOCK_SITSTAND
* PCBLOCK_NPCCLICK
* The actions blocked are saved in state.block_action
* Click to the npc returns the WORK_IN_PROGRESS message when PCBLOCK_NPCCLICK is enabled
* Blocked action and reload script.
The player will return to his/her original state after reload script.

Thanks to @aleos89, @Lemongrass3110, @secretdataz
2019-03-26 22:18:59 +07:00
Aleos
9500c06dab
Corrected unit calculation with setunitdata (#3978)
* Fixes #3953.
* Resolved an issue with monster's class not being properly recalculated when using script command setunitdata. For now, just allow switching between CLASS_NORMAL and CLASS_BOSS.
* Fixed HP and MaxHP adjustment for monster, homunculus, mercenary, elemental, and NPC.
* Fixed MaxSP adjustment for homunculus and elemental.
* Fixed Size adjustment for monster, homunculus, mercenary, and elemental.
* Fixed Race adjustment for monster, homunculus, mercenary, and elemental.
* Fixed the Map ID string check to support all unit types.
Thanks to @teededung and @SeravySensei!
2019-03-23 16:15:28 -04:00
Aleos
78eed02273 Updated the YAML parsing method (#3694)
Synchronized the process of loading and parsing YAML databases.
Provides more robust parse warnings/errors.
Added Header checks to validate database versions.
Adjusted root keys to a standard name of Body.
Adjusted inter-server storages, achievements, and attendance to follow the new format.

Fixes #3483

Thanks to @Lemongrass3110!
2019-02-28 22:19:39 +01:00
Aleos
d649ede46b
Corrected script commands containing arrays (#3932)
* Corrects a potential map-server crash with script commands min, max, getpartymember, getguildmember, getunits, getmapunits, getareaunits, getunitdata, and channel_setgroup when a character variable is used when no character is attached to the script.
Thanks to @Tokeiburu and @Atemo!
2019-02-11 12:23:04 -05:00
Aleos
c5a5c54518
Converted remaining C comments (#3927)
* Converted remaining documentation that references .c or .h files.
2019-02-09 15:08:45 -05:00
Atemo
747781fb89
Fixed bg_get_data script command (#3921)
* In some cases the command didn't return the members ID for 'type 1'
2019-02-07 16:26:06 +01:00
Aleos
5908c0484f
Corrected script command getmapxy (#3922)
* Fixed an issue with floating NPC being on an 'invalid' map and attempting to store the map name.
Thanks to @Atemo!
2019-02-06 12:34:13 -05:00
Atemo
92de3065e2
gvg warning (#3919)
* pvpon, pvpoff, gvgon, gvgoff, gvgon3, gvgoff3 now display a message when the map doesn't exist
* The command don't return SCRIPT_CMD_FAILURE anymore when the mapflag is already in the state
2019-02-06 15:27:04 +01:00
aleos
42b71e6f6e Follow up to 1f97bea
* The skill ID check should only take place on parsing bonus2, bonus3, bonus4, or bonus5.
2019-02-05 22:16:28 -05:00
Aleos
360cc25cc9 Corrected some card combos (#3903)
* Fixes #3492.
* Resolved some item combo cards that transformed the wearer causing the stats to come awry.
* Cleaned up some documentation.
Thanks to @BrOgBr, @raelemagy, @mrjnumber1, and @Everade!
2019-02-05 16:39:06 -08:00
Aleos
1f97beae27
Cleaned up script command argument parsing (#3910)
* Cleaned up the way script commands parse arguments.
* script_isstring and script_isint will now properly check variable references.
* This allows script command arguments to contain variables without having to make source side adjustments.
* Reverted several script commands that reference the data directly.
Thanks to @Lemongrass3110!
2019-02-05 18:50:54 -05:00
Atemo
b032aae30a
Added the battle_config limits (from pc_changelook) to changelook script command (#3899) 2019-02-04 23:30:35 +01:00