400 Commits

Author SHA1 Message Date
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
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
Atemo
6e8599cd5b
Extra npc checks (#3274)
* Extra checks
- Added some extra check in npcs script to prevent wrong behaviour
2018-07-03 23:24:04 +02:00
Daegaladh
987ec9bdce Fixed turbo track fee and min level in solo mode 2018-03-16 16:58:29 +01:00
Atemo
3bcb37bf86
Workaround to solve issue with news cards in enchants NPCs (#2795)
* Workaround to solve issue with news cards in enchants NPCs

Thanks to @Lemongrass3110, @Everade !
2018-02-09 19:06:21 +01:00
Lemongrass3110
16780638be
Fixed a few name typos with Niflheim (#2782)
Thanks to @Daegaladh for his input
2018-01-09 23:36:20 +01:00
Lemongrass3110
a65e7dbf46 Fixed F_SexMes call
Fixed #2785

Thanks to @insanchen
2018-01-07 21:07:34 +01:00
Atemo
d708fb35d7 * Move close3 function into Global_Functions.txt
* Added mapflag for some instance
2017-11-25 21:42:03 +01:00
Atemo
ea88ea5054
Emoticons constant name (#2527)
This PR change the emoticons constant name to match emoticonlist from client side.
Note: the previous emoticons names are now deprecated.

Additionnally emotion and unitemote scripts commands are being merged together to the new format
-> emotion <emotion number>{,<target>};
Where target use the target Game ID (GID) of the unit (npc, pet, character etc..).

* unitemote is now deprecated.
* Additionnally fixed incorrect variable in quests_brasilis.txt

Thanks to @aleos89 and @Lemongrass3110 !
2017-11-10 18:35:21 +01:00
Jey
c09929aa16 Negative npc input checks for arena_points.
* Related issue: #2557
* Thanks to @mazvi
2017-11-01 22:17:31 +01:00
Maz-V
c76f3675a2 Global_Function: Added "F_GetPlatinumSkills" (#2545)
* Added global function F_GetPlatinumSkills.
* Adjusted the Job Master and Platinum Skills NPCs to use this function.
Thanks to @mazvi!
2017-10-30 10:57:57 -04:00
Aleos
6a2c1229d0 Updated Rebellion class (#1692)
* Updated Rebellion class
* Information based on Rebellion Awakening patch from kRO.
- http://ro.gnjoy.com/news/update/View.asp?seq=183&curpage=1
* Fixes #859 and fixes #1449.
Thanks to @RagnarokNova and Fyrus for their information!
2017-10-12 11:04:03 -04:00
Lemongrass3110
58776da1ac Basic RODEX support (#2186)
Adds basic support for the new mail UI RODEX.

Fixes #1567

Thanks to @RagnarokNova, @Atemo, @aleos89 and everyone else that helped me with this.
Additionally I would like to thank @jezznar and @hazimjauhari90 for their good testing in the pull request.
2017-06-21 00:00:29 +02:00
Lemongrass3110
d0ca637ddd Fixed vip_status command (#2184)
Fixed different return types for the same function call
Also introduced constants for better function usage.

Fixes #2183
Thanks to @anacondaqq
2017-06-20 19:22:46 +02:00
Atemo
1e1d7e54f0 Merged Faceworm Instance from idathena https://github.com/idathena/tr… (#1889)
* Merged Faceworm Instance from idathena 20f71d8c62

Credits to @exneval !
2017-05-09 13:34:19 +02:00
Aleos
10b512b859 Updated Giant Fly Wing behavior (#2098)
* Party members should be recalled to their own positions in a 3x3 area around the party leader.
* Added two missing client messages.
* Adjusted script command warpparty to support range values.
* Adjusted script command warpparty to not warp the party leader if "Leader" is passed as the map.
2017-05-02 20:51:26 -04:00
Atemo
c6ab72207e Horror toy factory (#1813)
* Initial release of Horror Toy Factory instance.
Thanks to @aleos89, @secretdataz, @Lemongrass3110
Took some part from 52f6420abc
Credit @exneval

Todo : implement NPC_HELLBURNING skill
2017-01-18 03:25:12 +01:00
Lemongrass3110
2043c95e66 Refactored hardcoded npc event names (#1767)
While refactoring those events the following other changes were made:

Introducing OnInstanceDestroy event. This event can be used to hook script code right in front of the instance destruction. This can be useful if you have any stored references to an instance id for example.

The script command cmdothernpc will now check if the target event exists and report failures. Therefore it now returns true or false.

All agit(FE,SE,TE) start and end commands from atcommand and script commands have been merged in their respective guild function which now returns a bool value of true for successful actions and false if it did not succeed(if the specific WoE was [not] running).

All global triggered events with mapserver status output now call the same function and therefore have the same mapserver output(including their respective event name of course).

Renamed a few events in the script configuration to match the other names

Added constants for months and weekdays

Additionally added constants for gettime types to make it easier to read.

Replaced all existing usages I found with their proper new syntax or better fitting functions.
2017-01-10 22:58:04 +01:00
Cydh Ramdh
2896d894d1 Official Random Coordinates for Savepoint (#1756)
* Added parameters for `savepoint are range for `x` and `y` for random savepoint coordinates.
* Added documentation for new savepoint params. Credits to @aleos89
* Updated savepoint on script to follow official behaviour (random save in 3x3). All credits to @Atemo
2016-12-20 17:16:42 +07:00
Lemongrass3110
9040613fa6 Added missing empty newlines to a lot of files 2016-11-23 13:54:45 +01:00
Lemongrass3110
9b1b7b1a2b Replaced hardcoded genders with constants (#1730)
* Replaced hardcoded gender codes in source

Introduced a new constant for the account based gender and replaced all hardcoded gender references to code 99 with it.

* Replaced hardcoded gender codes in npcs

Exported the gender constants into the script engine and replaced all usages with references to the constants instead of expecting a value behind them.

* Corrected a typo

Thanks to Machiezmo from Discord.

* Fixed an inverted gender logic

Thanks to @secretdataz
2016-11-22 21:20:03 +01:00
Atemo
d62f422e3d Corrected OnTouch/OnTouch_ in NPC script (#1548)
Some leftover from aegis convertion..

Skipped pre-re folder, I don't have old data.
2016-09-07 21:35:14 +02:00
Jittapan Pluemsumran
eb8ea91f5b
Follow up to 472b885ca83627922d2c2208b46ff6d9b8308a7d
* Added brackets after if
2016-08-22 22:44:13 +07:00
Jittapan Pluemsumran
472b885ca8
Follow up to 021bed5f5de02a9262831ebcb968a627f2ddba26 2016-08-21 18:06:26 +07:00
Jittapan Pluemsumran
021bed5f5d
Implemented status reduction potion support
* New script command `needed_status_point` added.
* The items are not yet implemented.
2016-08-21 14:30:17 +07:00
Lemongrass3110
a87d86cb11 Fixed getinventorylist documentation
Fixes #1497.
Thanks to @Darkelfen for reporting it.

Additionally exported the EQP_* constants into the script engine.
Replaced some hardcoded equip positions with their respective constants.
2016-08-14 00:26:22 +02:00
Lemongrass3110
a855bccfd2 Fixed wrong operator usage in 2 scripts
If those fixes are wrong blame it on me!
2016-08-05 00:29:03 +02:00
Atemo
1a87f90aa9 Structure change of F_getpositionname 2016-04-18 16:48:54 +02:00
Atemo
7d6be7e21e Add F_getpositionname to return the EQI_* name 2016-04-18 15:50:28 +02:00
Jittapan Pluemsumran
bd6539a9ba Follow up to c23688c
Unify all checks into one function.
Suggested by @Cydh.
2016-03-26 10:52:30 +07:00
aleos89
0a77835029 Unit Controller Updates
* Added missing UMOB_CANMOVETICK option.
* Restructured script command getunittype return values to match the order of script command getmapxy to allow for more universal usage.
* Created constants for script commands getmapxy and getunittype.
* Updated NPCs using script command getmapxy to use the new constant values.
* Updated Battleground NPCs to use constant value for script command setunitdata.
2016-02-04 10:47:16 -05:00
Atemo
3a45dd97f9 Another clean-up 2015-12-09 23:09:17 +01:00
Atemo
031c522c8a - Fixed F_CashSiegeTele typo in item_db.
- Moved VIP_Third_Class function from other/CashShop_Functions into other/re/CashShop_Functions (only used in re folder).
- Fixed a mistake in quests/quests_nameless.txt blame me  36f337ea41a876ef471bfbb78128e35fa0d9aa56
- re/quest/quests_eclage clean-up and bug fix

Signed-off-by: Atemo <capucrath@gmail.com>
2015-08-04 15:16:56 +02:00
Capuche
1e8aa4bdc4 Added adven_boards.txt dungeon signposts
Signed-off-by: Capuche <capucrath@gmail.com>
2015-03-28 00:31:36 +01:00
aleos89
d3625e5c10 Cleaned up merge issues. 2015-02-21 15:43:58 -05:00
Capuche
001e6967d4 Fixed some variables issues and cleaned Instructor Boya and Michael
Signed-off-by: Capuche <capucrath@gmail.com>
2015-02-19 01:09:30 +01:00
Cydh Ramdh
9d3d34205f Skill DB clean ups
* 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>
2015-02-12 15:50:50 +07:00
Aleos
0e533fa7ab Revert "Skill DB clean ups" 2015-02-10 09:33:00 -05:00
Cydh Ramdh
72617ac98b Skill DB clean ups
* 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>
2015-01-31 19:45:52 +07:00
Euphy
df6fb01739 Small fixes in Eclage scripts and code style changes.
- Fixed some minor bugs.
- Added GM NPC function.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2015-01-15 13:01:12 -05:00
Euphy
8c3bc4fda4 Changed some hardcoded script values to MAX_LEVEL. (fixes #161)
Fixes various bugs with higher level players not gaining experience.

Also properly fixed Renewal EXP reward in Turbo Track script (incorrectly fixed in be95412).

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-12-31 01:05:33 -05:00
Euphy
3b2762ca3c Enable NPC logging through 'logmes' by default.
- Commented some unnecessary log messages.

Bug fixes:
- M_DOPPELGANGER had too much HP. (Hercules 9cd3ec0)
- Huuma_Swirling_Petal should not have an element. (bugreport:9073)
http://rathena.org/board/tracker/issue-9073-huuma-swirling-petal/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-08-22 16:06:32 -04:00
Euphy
14fddd3790 Added script checks against swapping items using third-party hacks.
- Follow-up to 416f6d7, as further protection against item exploits.

Contains a few other fixes.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-08-22 15:36:23 -04:00
Capuche
ec485afe4c Bug fixes and clean-up :
-- Miscs follow up af266777402e07428388e80db35544fbb9bcbe8e
-- Another clean-up in comodo_gambling.txt (thx @SkittleNugget)
-- Replaced occurrence of PcName and clean-up in tu_magician01.txt

Signed-off-by: Capuche <capucrath@gmail.com>
2014-07-13 21:48:09 +02:00
Capuche
af26677740 Bugfix and clean-up
- Added NPC const
- Added checkdragon() in F_CashReset
- Clean-up books.txt, fortune.txt, card_trader.txt, 3rd_trader.txt, stone_change.txt, quests_brasilis.txt
- Minor fix about Weight in comodo_gambling.txt
- Change to F_GM_NPC function in Mercenary Guild Switch follow up bdab851129ceee57a38ccc9d819b42011ef19fb7
- added Mercenary Switch in gm_npcs.txt list
- change to common green maiden in 2010 Headgear Quests

Signed-off-by: Capuche <capucrath@gmail.com>
2014-07-04 02:14:30 +02:00
Capuche
bdab851129 - Added mercenary guild switch npc from aegis
- Fixed a bug to rent a mercenary in izlude duplicate (it gave a wrong mercenary)
- added a missing delitem in cupet.txt (forgot to delete the 2nd item)
- change the rand part in Mysterious Documents npc in magic_books.txt to match aegis
- little clean up in quests/ninja_quests.txt
- replace the npc id to the constant in theses files

Signed-off-by: Capuche <capucrath@gmail.com>
2014-06-30 17:07:05 +02:00
Euphy
5e261ba415 Minor cleanup of riding script commands.
- The 'checkriding()' function no longer checks for wargs and dragons, ONLY Pecos, Grand Pecos, and Gryphons (as documented). (bugreport:9024)
http://rathena.org/board/tracker/issue-9024-about-renters-from-rathenanpcremerchants/
- Replaced 'checkoption()' warg checks with 'checkwug()'.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-06-10 22:58:09 -04:00
Capuche
be1fd7b1fa - Fixed an issue in dual race (bugreport 8636).
- Optimizated.
2014-05-30 20:48:19 +02:00
Euphy
cad0a57865 Replaced 'getserverdef' command with 'script_hardcoded_constants' function in source. These constants can now be directly accessed in scripts. (Hercules 950e3eb)
- Relocated 'Option_*' constants from 'db/const.txt' to source; added OPTION_COSTUME compound. (Hercules a5728fd)
- Added MAX_CHAT_USERS define. (Hercules 950e3eb)
- Follow-up ca9642a: applied 'Loc' changes to Pre-Renewal database.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-03-01 15:42:49 -05:00
Euphy
957f49563a Added 'preg_match' script command to match regular expressions.
The command is only available if the PCRE library is installed.

Updated indefinite articles in Global_Functions with regex. (credits: Kaivosukeltaja/php-indefinite-article/863f1d5)

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-01-29 16:33:27 -05:00