summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-31Merge pull request #1544 from HerculesWS/1543-fixsmokexyz1-6/+8
getstatus() Update
2017-03-28add gettimer() buildingumi1-0/+95
2017-03-12Merge pull request #1610 from mekolat/timer2Haru1-17/+37
allow the PC timer buildins to run on another player
2017-03-12Minor optimizations for the warpguild implementationHaru1-12/+13
Follow-up to ebb77e29f343531b508f8c37b32826afbb5f240d Signed-off-by: Haru <haru@dotalux.com>
2017-03-12Merge pull request #1496 from Emistry/scriptcommand_warpguildHaru1-28/+33
Updated *warpguild() script command.
2017-03-05allow to use addtimercount on another playergumi1-2/+6
2017-03-05fix code style in buildin_addtimercountgumi1-4/+5
2017-03-05allow to use deltimer on another playergumi1-2/+6
2017-03-05fix code style in buildin_deltimergumi1-2/+3
2017-03-05allow to use addtimer on another playergumi1-2/+6
2017-03-05make addtimer return success or failuregumi1-2/+6
2017-03-05fix code style in buildin_addtimergumi1-4/+6
2017-03-05Merge pull request #1589 from mekolat/strinfo2Haru1-58/+77
allow strcharinfo() and strnpcinfo() to take a GID
2017-03-05Update *warpguild() script command.Emistry Haoyan1-28/+33
- Added optional parameter to warp member from target map. - Update to loop guild member using `g->member[]` data.
2017-02-26add getvariableofpc() buildingumi1-2/+51
2017-02-26allow character and account variables to reference another registrygumi1-15/+59
2017-02-26fix code style in set_reggumi1-19/+32
2017-02-26fix indentation in set_reggumi1-44/+44
2017-02-26fix code style in script_array_srcgumi1-5/+6
2017-02-26fix indentation in script_array_srcgumi1-22/+22
2017-02-26fix code style in get_valgumi1-17/+22
2017-02-26fix indentation in get_valgumi1-52/+52
2017-02-26Revert "allow to get vars of other players with getd"gumi1-210/+96
This reverts commit eb5fc0076764d2f604e6a484fe144988f6e9da9b.
2017-02-26Merge pull request #1586 from mekolat/getd2Ridley1-96/+210
Allow getd to get vars if other players
2017-02-26Added option to show classchange only to one player (#1587)Guilherme G. M1-8/+19
* Added option to show classchange only to one player
2017-02-25allow strcharinfo() and strnpcinfo() to take a GIDgumi1-58/+77
2017-02-25allow to get vars of other players with getdgumi1-96/+210
2017-02-25add chr() and ord() buildinsgumi1-1/+26
2017-01-17Fixes #1543Dastgir Pojee1-6/+8
Infinite Duration status would result in error since there was no timers attached to it. Added a condition to check if status is having infinite duration and return value according to it.
2016-12-03Remove the platform-dependent variables from struct status_dataHaru1-1/+1
`struct status_data::class_` was platform dependent since c30bb75ec50624429bff7b4106db4be0fda366d6 in order to silence some compile warnings (uint32 on 64 bit builds and uint16 on 32 bit builds). It's now been changed to the correct type, int32, on all platforms. Since the change has potential to silently break third party code, the variable was renamed to `class`. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Ensure that pc->addfame() increments the correct fame pointsHaru1-9/+9
The function now takes the rank type as argument, rather than guessing it from the character's class. If the wrong fame point type for the current character is requested, the request is ignored. This fixes some (unofficial) edge cases where a Taekwon or an Alchemist refined a signed item, they could obtain rank points. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (2/2)Haru1-6/+6
This commit ensures that `sd->job` and related variables only contain MapIDs (i.e. the serverside optimized values, where High Novice is MAPID_NOVICE | JOBL_UPPER) and are never checked against the client-based Job Class values. As a rule of thumb, from now on, when a variable is named `job` or `jobid`, it is intended to contain a MapID and not a Job Class ID. The type of such variable shall be an unsigned `uint16` or `uint32`. To ensure that related third party code is also verified when this commit is merged, the variable `struct map_session_data::class_ (i.e. `sd->class_`) is renamed to `job`. Some issues in related lines are also fixed, including: - The atcommand `@mount` would not check properly that the requesting character is a 2nd class Swordsman type. - `pc->addfame()` would silently accept invalid MapIDs, sending unknown values to the client (more on this in a subsequent commit). - `pc->famerank()` would not use the passed job as a bitmask, causing the caller to have to mask it beforehand (more on this in a subsequent commit). - The Soul Linker check in TK_JUMPKICK wasn't future-proof (no harm caused currently). - Gunslingers would be able to be targeted by Spiritual Bestowment (`MO_KITRANSLATION`) and Spiritual Sphere Absorption (`MO_ABSORBSPIRITS`) due to a faulty check introduced when the Rebellion class was implemented (causing unintended interaction with Coins). Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-14/+14
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-12-02Fixed a null-pointer dereference in BUILDIN(makeitem2)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-12-02Merge pull request #1405 from Emistry/scriptcommand_makeitem2Haru1-0/+85
Add *makeitem2 script command.
2016-12-01Fixed areawarp cell checkLemongrass31101-1/+4
The script command areawarp has been checking the wrong target map for ages. It has been checking the mapindex rather than the mapid and therefore returned a wrong result. Original commit: rathena/rathena@ac2ba09
2016-11-20Removed support for apostrophes in constantsHaru1-1/+1
Supporting apostrophes (`'`) inside constants or variables is no longer necessary thanks to the more strict AegisName ruleset we're using now. Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Implemented SC_BITESCAR:Dastgir Pojee1-2/+5
Cannot be reset by dispell. Cannot be healed by item/NPC once in BITESCAR. Heal Skill would end the BiteScar Effect.
2016-10-07Fixed some issues detected by clang's static analyzer (Xcode 8/macOS Sierra)Haru1-2/+0
Signed-off-by: Haru <haru@dotalux.com>
2016-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-2/+2
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-09-12Add script command navigateto. Add packet for this command.Andrei Karas1-0/+55
Based on rAthena commits: commit 4f13007fec7f08c265620a71c3bc4806d186c0f1 Author: Lemongrass3110 <lemongrass@kstp.at> Date: Sun Mar 6 21:48:47 2016 +0100 commit 809f220b9f5ef70ee062ee56ae6e8d5f56cb5d32 Author: aleos89 <aleos89@users.noreply.github.com> Date: Sun Mar 6 16:15:54 2016 -0500 commit 179f73424934d528ebe494dfb66503c182eacb09 Author: aleos89 <aleos89@users.noreply.github.com> Date: Sun Mar 6 16:10:15 2016 -0500
2016-09-11Clarified/rewritten part of script_array_ensure_zero()Haru1-9/+12
- There exists a case where st is NULL, such as when called by script->cleararray_pc(). This documents such possibility. - Fixes Coverity CID 152760 - Follow-up to 0f803e7 Signed-off-by: Haru <haru@dotalux.com>
2016-09-11Changed GD_MAX check to be non-inclusiveHaru1-1/+1
- GD_MAX is not a valid guild skill ID - Fixes Coverity CID 152761 - Follow-up to 0f803e7 Signed-off-by: Haru <haru@dotalux.com>
2016-09-10Add missing checks into script.cAndrei Karas1-60/+208
2016-08-28Update *makeitem2 script commandEmistry Haoyan1-0/+85
- squash commits. - fix conflicts during rebase. - fix travis build warnings.
2016-08-20Re-added HPM support for configuration settingsHaru1-1/+2
Plugin settings should be relative to the the libconfig file root. For example, a configuration setting of type HPCT_CHAR will be relative to the root of conf/char/char-server.conf. In order to add a configuration entry inside the char_configuration block, the full configuration path (slash-delimited) should be passed to addCharConf(), as in the following example: `addCharConf("char_configuration/my_setting", my_parser_function);` Signed-off-by: Haru <haru@dotalux.com>
2016-08-19Ported script.conf to libconfigHaru1-41/+44
Ported to modern Hercules and cleaned up from Panikon's commits: a0e4da63ef3afcd896603398e2468876681ac54a, b5f487c2676833492a6d4044b5d1f1bb1e552b04 Signed-off-by: Haru <haru@dotalux.com>
2016-07-14Changed chat_data::minLvl and chat_data::maxLvl to int and renamed to ↵Haru1-2/+2
min_level and max_level Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-12Interface md5calc.chemagx1-2/+2
2016-07-10HULD: Improved .po file parser to properly read concatenated stringsHaru1-57/+141
- For compliance with gettext's .po file specifications Signed-off-by: Haru <haru@dotalux.com>