114 Commits

Author SHA1 Message Date
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
Aleos
26720f041a
Updated script command getmapxy parameters (#3890)
* Fixes #3100.
* Script command getmapxy will now allow integer values for the search value.
* Deprecated UNITTYPE constants as they were replaced by BL.
* Defaulted BL_PC as the target for script command getmapxpy.
* Updated script command getunittype return value to return BL constants.
* Updated scripts to new BL constants.
Thanks to @pajodex's suggestion and @Lemongrass3110!
2019-01-30 17:10:33 -05:00
Lemongrass3110
db3267a868
Fixed a crash from MVP Ladder Warper (#3888)
Fixed a bug where 3 scripts would be running at the same time on the same character.

Fixes #3881

Thanks to @bgamez23
2019-01-24 20:10:53 +01:00
Lemongrass3110
4706115d5b
Refactored achievement conditions (#3831)
They now use the normal script engine and not a duplicated portion of code of it.
This is required for another pending update.

This also fixes atcommands not triggering status achievements.

Thanks to @aleos89 and @RadianFord
2019-01-13 17:26:25 +01:00
Lemongrass3110
01f61cfa4f
Added support for 64bit ticks (#3768)
Fixes #3017

Thanks to Hercules for the idea and their implementation of it.

This deprecates Windows XP support. If you want to use it to run your server on it, you have to forcefully enable it now.
Since 64bit ticks do not exist on XP, you might encounter some issues that are already fixed on other OS.
2018-12-21 00:02:19 +01:00
Lemongrass3110
4944491228
Added support for viewpointvalue command (#3754)
Additionally added a script command to update the player's camera.
Added a new atcommand camerainfo for this, which is limited to admins.

Credits to @4144 for finding /setcamera
2018-12-20 19:26:02 +01:00
Lemongrass3110
016d15b79a
Unified infinite tick usage (#3755)
Introducing a new constant INFINITE_TICK
Changed current usages in items, npcs and source to use the new and correct constant.
Replaced some invalid usages of INVALID_TIMER and replaced them with the new constant.
2018-12-18 17:46:56 +01:00
Aleos
c71ef92fb0
Refactored item bonuses to utilize C++ features (#3235)
* Fixes #996 and fixes #3152.
* Refactored MAX_PC_BONUS item bonuses from static arrays to vectors.
* Increased MAX_PC_BONUS to 50.
* Frees up memory from players that may not ever utilize all their static MAX_PC_BONUS item bonuses.
* Expanded bonus ResEff to not be restricted to SC_COMMON* statuses.
* Removed old ERS usages.
* Removed code redundancy and general cleanups.
Thanks to @Angelic234, @Atemo, @Lemongrass3110, and @Everade!
2018-11-28 21:50:43 -05:00
Aleos
24dca1117e
Corrected Reins of Mount interaction with hiding (#3621)
* Fixes #3614.
* Reins of Mount should not be applied to players who are in some sort of hidden state.
* Item delay is still applied.
Thanks to @admkakaroto and @cydh!
2018-11-16 09:17:42 -05:00
Aleos
404973f621
Corrected script command setunitdata HP/Max HP (#3669)
* Fixes #3668.
* Resolves an issue with adjusting HP/Max HP not properly applying it to the proper unit status.
Thanks to @Joao1905!
2018-11-13 09:33:58 -05:00
Aleos
7045d585e4
Added constants for Castle Data manipulation (#3531)
* Fixes #3530.
* Added constants for script commands getcastledata and setcastledata.
* Adjusted the guardian constants to adjust based on MAX_GUARDIANS define value.
* Updated scripts to reflect changes.
Thanks to @keitenai, @Atemo, and @Lemongrass3110!
2018-11-08 16:27:03 -05:00
Atemo
78edf851a0
Suggestion of implementation of is_party_leader and is_guild_leader script commands. (#3617)
* Implemented is_party_leader and is_guild_leader script commands.

Thanks to @cydh !
2018-11-06 16:28:09 +01:00
Lemongrass3110
c0793a8072
Adding LGTM to CI tools (#3636)
Thanks to @aleos89 for his help.
2018-10-29 21:25:36 +01:00
Jittapan Pluemsumran
84b4f09874 Added skill_duration mapflag. (#2171)
* Added skill_duration mapflag.
* This mapflag sets a skill unit time limit to n% of original duration.
* Implemented mapflags for Hunter's Traps in GVG, BG, and Novice Guild maps.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2018-10-26 08:52:49 -04:00
Lemongrass3110
55acdb9863
Initial release of the guild storage log (#3365)
Thanks to @aleos89 and @Everade
2018-10-10 17:51:49 +02:00
Sader Fawall
10e7035beb Added script command getunits (#3389)
* Closes #3159.
* Adds script commands getunits, getmapunits, and getareaunits.
* Replacement for script commands getusers, getmapusers, getareausers. (In a future commit)
Thanks to @sader1992, @Atemo, and @anacondaqq!
2018-10-10 10:33:01 -04:00
Aleos
048de6c90a
Cleaned up map property functions (#3460)
* Follow up to da83e61.
* Stop players from attacking when disabling PvP/GvG from script commands.
* Removes redundancy.
2018-08-31 18:42:18 -04:00
Atemo
fd4f7ccd5c Suggestion: identifyall script command (#3419)
* Implemented script command identifyall.
Thanks to @secretdataz for suggestions!
2018-08-30 10:03:03 -04:00
Lemongrass3110
f42696bfd7 Added new quest info icons
Fixes #3374

Thanks to @Balferian
2018-08-18 00:08:20 +02:00