765 Commits

Author SHA1 Message Date
Aleos
eccf5ab20c
Adjusts npcskilleffect and skilleffect (#5270)
* Fixes #2156.
* Adjusts the two script commands to take into account the type of skill being used.
* Adjusts documentation to reflect.
* Verify skill and skill level.
Thanks to @Yuchinin and @Lemongrass3110!
2020-08-03 20:57:09 -04:00
Aleos
7bdf67e3d3
Adjusted script command progressbar_npc behavior (#2381)
* Players are no longer detached from the script.
* Players can't walk, attack, use items, or use skills while progress bar is active.

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
2020-07-20 13:34:43 -04:00
Atemo
43ea987ba7
countbound script command update (#5200)
* the command now returns the number of differents type of item found
* the amount by item ID is now save in bound_amount array

Thanks to @Daegaladh
2020-07-14 15:48:21 +02:00
Mark Hester
7d3064c667
script_command example has unmatched ')' (#5177)
Counter productive when copy pasting example for modification
2020-07-04 00:39:12 +07:00
Aleos
b13e4f0fbc
Adds support for object groups and titles (#5171)
* Fixes #4529.
* Adds support for applying groups and titles to non-player objects.
* Expands script command setunitdata and getunitdata to support group ID.
* Adds script commands setunittitle and getunittitle.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2020-07-03 13:25:17 -04:00
Aleos
dbe27fe510
Adds script commands to count rental items (#5080)
* Fixes #5047.
* Adds script commands rentalcountitem, rentalcountitem2, and rentalcountitem3.
* Adjusts Malangdo Culvert and Octopus Cave script to utilize script command rentalcountitem.
Thanks to @reunite-ro and @attackjom!
2020-06-17 21:48:26 -04:00
Aleos
7cc59c6708
Adjusts a few checks for item tradability (#4995)
* Follow up to bfb6972.
* Adds a new return array for script command inventorylist: `@inventorylist_tradable`
* Adjusts script command countitem to not count rental items.
2020-05-25 20:28:11 -04:00
Aleos
14c388b401
Resolves some Battleground issues (#4725)
* Queue data will now be kept available until a Battleground event is over.
* Players can now join an active Battleground.
* Adds a more detailed queue state tracking feature.
* When a battleground is being prepared and not enough players click accept, stop the battleground from beginning.
* When a player logs off or leaves a queue they will now properly be removed from the queue.
* Cleans up MinPlayers and MaxPlayers parsing to not accept values less than 1.
* Resolves players not being able to join an active battleground (up to MaxPlayers) unless someone quit early.
* Adds a team size priority check to avoid adding more players to a larger team.
* Fixes battlechat messages.
* Adds a battle_config to disable the ability for players on maps with MF_NOWARP to join Battlegrounds.
* Adds a new optional ActiveEvent label to the database.
* Fixes a typo in Flavius 2 during unbooking process.
* Cleans up the behavior of the Battle Therapists to use areapercentheal and areawarp.
* Fixes KVM score not properly set on the first Battleground.
* Fixes the global timer checks not ending the main timers on Flavius and Tierra Gorge.
* Added an extra bg_reserve on global timer checks in case someone tries to join the battleground just before it's ended.
* Fixed OnReadyCheck being called on global timer checks, causing the battlegrounds to start when there were no players on the map.
* Fixed a bug on Tierra Gorge where multiple barricade walls could be stacked.
* Fixes Croix also receiving 9 badges when Guillaume wins.
* Adjusts StartDelay default to 0.
* Add a database setting to give the ability to enable or disable joining as an individual, party, or guild.
* Add a database setting to restrict jobs from entering Battlegrounds.
* Better documents script commands bg_reserve and bg_unbook.
* Other fixes and cleanups.
Thanks to @roSBK and @Daegaladh, @admkakaroto, @Artuvazro, and @Atemo!
Co-authored-by: Daegaladh <Daegaladh@users.noreply.github.com>
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
2020-05-25 12:39:36 -04:00
Aleos
18b642c174
Skill Database cleanups (#4902)
* When reloading the skill_db clear out Abra, Magic Mushroom, and Reading Spell Book databases as well.
* Fixes NC_SHAPESHIFT and NC_REPAIR checking an invalid ItemCost slot based on the old implementation.
* Updated a lot of references to the old skill databases.
2020-05-19 15:32:57 -04:00
Sader Fawall
49c4ddf8f9
npctalk script command now accepts color parameter (#4910)
Co-authored-by: Jittapan Pluemsumran <secret@jittapan.app>
Co-authored-by: Lemongrass3110 <lemongrass3110@users.noreply.github.com>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2020-05-10 13:34:00 +07:00
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
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
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
Aleos
1fc4b8de20
Battleground Queue fixes (#4648)
* Fixes #4644.
* Initialize all battleground queues at startup to reduce overhead of creation/deletion during live server.
* Removes lots of duplicate code between team checks.
* Adds missing checks for script commands bg_leave and bg_desert to only warp players out using the Battleground Queue System.
* Adds documentation for script commands bg_leave and bg_desert to state players will be warped out after when using the Battleground Queue System.
* Optimizes join logic to add new players to the end of the queue rather than the front.
* Cleans up the client messages so certain responses are cleared when they need to be.
Thanks to @Balferian and @Lemongrass3110!
2020-02-20 22:25:14 -05: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
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
Lemongrass3110
b0ac1717f2
Added an option to block discount in shop (#4606)
This is required for the correct implementation of #4387
2020-02-07 00:29:33 +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
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
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
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
Cydh Ramdh
0b1184e4ed
Small doc/script_commands.txt correction (#4250) 2019-07-22 22:26:49 +07: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
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
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
66b8273221
Corrected block_action behaviour (#4071)
* Corrected block_action behaviour
* reloadscript command doesn't remove PCBLOCK_IMMUNE anymore
* Corrected a typo on MorseCave.txt

Thanks to @CairoLee and @ElinhoPP !
2019-04-02 18:48:46 +02:00
Atemo
e172c4365d
Added setpcblock to some official scripts (#4067)
* Added setpcblock to official scripts to mimic some npc interaction.
* Clean-up the docs.
* Added the WORK_IN_PROGRESS message when PCBLOCK_USEITEM and PCBLOCK_SKILL are enabled.

Thanks to @aleos89 for the review!
2019-04-02 02:12:10 +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
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
Atemo
7cc8c96467
Clean-up doc script commands (#4038)
* This commit changed the `@var` to `.@var` in the doc as it would promote bad scripting behavior.
2019-03-26 16:09:57 +01:00
Aleos
724bd3bfde
Adjusted death event for Emperium Battleground (#3967)
* Fixes #3956.
* Adjusted the death event so players don't have to wait for the 1 second respawn timer before being revived.
Thanks to @AnnieRuru!
2019-02-22 09:20:02 -05:00
Aleos
47866f6065
Cleaned up cmake output (#3941)
* Follow up to d649ede.
* Renamed svnversion.h to version.hpp.
2019-02-15 23:10:17 -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
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
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
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
Aleos
a7d8fbae14
Corrected atcommand reloadscript and NPC dialogs (#3643)
* Corrected atcommand reloadscript and NPC dialogs
* Fixes #3637.
* Force atcommand reloadscript to send a close button if a NPC dialog is active to any attached players.
* Fixed cutin removal as well.
Thanks to @kukuasir1 and @Lemongrass3110!
2018-11-01 16:08:53 -04: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
Atemo
0b18fe4bed
Update/moro vol npcs (#3002)
Updated npcs from ep 14.3 (official conversion)
* Adjusted permanent monster random spawn: xy are now optional
* TO DO: update questinfo to display the icon when the variable condition are met

Thanks to all the contributors !
Special thanks to https://www.divine-pride.net/ !
2018-10-16 00:33:37 +02: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