summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas1-2/+4
2014-12-26Add script function for change per character gender.Andrei Karas1-10/+35
New script function: changecharsex
2014-12-23Removed deprecated commands checkdragon, setdragonHaru1-54/+0
Follow-up to a852bdd Signed-off-by: Haru <haru@dotalux.com>
2014-12-23Removed deprecated commands setmadogear, checkmadogearHaru1-43/+0
Follow-up to b3aef69 Signed-off-by: Haru <haru@dotalux.com>
2014-12-23Removed deprecated commands setriding, checkridingHaru1-45/+0
Follow-up to c6f102e Signed-off-by: Haru <haru@dotalux.com>
2014-12-17Fixed a compile error on MSVC < 2013Haru1-25/+21
Thanks to Ind, Michieru Signed-off-by: Haru <haru@dotalux.com>
2014-12-16Add function what call OnUntouch event.Andrei Karas1-2/+3
2014-12-16Extend script command getareausers.Andrei Karas1-13/+56
2014-12-16Fix incorrect memory access in script command getareausers.Andrei Karas1-1/+2
2014-12-16Add script command getnpcclass.Andrei Karas1-0/+30
2014-12-16Add getnpcdir and setnpcdir functions.Andrei Karas1-0/+69
2014-12-16Add script command to set npc click/activate instance.Andrei Karas1-0/+11
New script command: setnpcdistance N Where N is distance in tiles from where npc can be clicked. Add setnpcdistance into docs.
2014-12-10Merge pull request #401 from GmOcean/masterHaruna1-14/+199
A few additional commands, with an edit to *getinventorylist;
2014-12-06Removed extra ? in *equip2 code.GmOcean1-1/+1
2014-12-04Edited *changebase command, replaced unnecessary code with it's equivalent ↵GmOcean1-9/+2
through pc->changelook.
2014-12-04Added explicit parenthesis for *checkbound command, during the check for ↵GmOcean1-1/+1
bound type as per suggested by Haruna.
2014-12-03Modified *checkbound & *equip2 commands in src/map/script.cGmOcean1-9/+8
Modified the corresponding documentation to match source code.
2014-12-02Replace some direct methods usage to interfaces.Andrei Karas1-1/+1
2014-12-02Removed checkquest commandHaru1-18/+0
- Follow-up to 3ad4a9d Signed-off-by: Haru <haru@dotalux.com>
2014-12-02Removed petheal commandHaru1-50/+7
- Follow-up to 8bb0078 Signed-off-by: Haru <haru@dotalux.com>
2014-12-02Removed jump_zero commandHaru1-1/+0
- Follow-up to bcf7a77 Signed-off-by: Haru <haru@dotalux.com>
2014-11-29Updated script.c to reflect suggestion by QQfoolsorellina as well as an ↵GmOcean1-16/+6
unused int under equip2.
2014-11-23Fixed whitespaceGmOcean1-39/+39
2014-11-23Added Commands to script_commands.txt and script.cGmOcean1-19/+222
2014-11-15Add support for plugin options in map server config (script.conf).Andrei Karas1-1/+4
2014-11-14Add ability to add deprecated command from scripts and plugins.Andrei Karas1-2/+2
2014-11-10Fix interfaces methods usage.Andrei Karas1-4/+4
In some places was used direct methods.
2014-11-02Marked commands 'enablearena' and 'disablearena' as deprecated.Haru1-2/+2
- Note: The commands will be completely removed after about a month. Custom, third party scripts will require updates, in case they were using these commands. Please see the commands documentation. Signed-off-by: Haru <haru@dotalux.com>
2014-11-02Marked command 'cmdothernpc' as deprecated.Haru1-1/+1
- Note: The command will be completely removed after about a month. Custom, third party scripts will require updates, in case they were using this command. Please see the 'cmdothernpc' documentation. Signed-off-by: Haru <haru@dotalux.com>
2014-11-02Marked command 'save' as deprecated.Haru1-1/+1
- Note: The command will be completely removed after about a month. Custom, third party scripts will require updates, in case they were using this command. Please see the 'save' documentation. Signed-off-by: Haru <haru@dotalux.com>
2014-11-02Added min() and max() script commandsHaru1-0/+32
- Special thanks to Streusel, Xgear Signed-off-by: Haru <haru@dotalux.com>
2014-10-31Fixed some errors pointed out by clang's static analyzerHaru1-2/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-10-29Added 2014 Halloween Event and made status change parameter optional on ↵Taylor Locke1-7/+16
montransform.
2014-10-30Deprecated checkriding and setriding commandsHaru1-2/+2
Replaced their use in scripts with checkmount and setmount, respectively. Signed-off-by: Haru <haru@dotalux.com>
2014-10-30Deprecated checkdragon and setdragon commandsHaru1-2/+2
Replaced their use in scripts with checkmount and setmount, respectively. Signed-off-by: Haru <haru@dotalux.com>
2014-10-30Deprecated checkmadogear and setmadogear commandsHaru1-2/+2
Replaced their use in scripts with checkmount and setmount, respectively. Signed-off-by: Haru <haru@dotalux.com>
2014-10-28Removed some temporary case-check error messages.Haru1-46/+1
- Control flow statements (break, case, continue, default, do, for, if, switch, whilei, else) and sub-function declarations (function) will no longer show a custom error message when they are incorrectly capitalized. - Note: This does not mean that they are no longer case-sensitive. This only means that no special message will be shown in case such an error is detected. The script engine will throw a normal error, as it would with any other kind of typo, rather than treating this as a special case. Enough time was given to update third party scripts, and it is now time to clean up our parsing code and get rid of these special warnings. - Variables, labels and commands will still show a warning for the time being, since the side-effects of silently ignoring it could be quite dangerous. An alternative approach to the case-check will be presented in future. For now, those who want to disable it (and save a bit on execution time and memory use), can simply comment out the #define ENABLE_CASE_CHECK line in script.h, as usual. Signed-off-by: Haru <haru@dotalux.com>
2014-10-28Marked command 'checkquest' as deprecatedHaru1-1/+1
Use questprogress instead. - Note: The command will be completely removed after about a month. Custom, third party scripts will require updates, in case they were using this command. It is recommended to use questprogress instead. Please see the checkquest documentation for more information. Signed-off-by: Haru <haru@dotalux.com>
2014-10-27Marked the petheal command as deprecatedHaru1-1/+1
- The command should be replaced by petskillsupport in any custom scripts. - Updated the custom SOHEE pet skill script to use petskillsupport with level 10 AL_HEAL. Signed-off-by: Haru <haru@dotalux.com>
2014-10-27Removed undocumented setr command. It was never meant to be available.Haru1-17/+17
- The command implementation is kept, with an internal-use prefix, to be used by the script engine (for direct assignment commands). Signed-off-by: Haru <haru@dotalux.com>
2014-10-27Marked command jump_zero as deprecated.Haru1-10/+13
- Added prefixed version for internal use. - Note: The command will be completely removed after about a month. Custom, third party scripts will require updates, in case they were using this command. Please see the jump_zero documentation. Signed-off-by: Haru <haru@dotalux.com>
2014-10-27Added source support to mark script commands as deprecatedHaru1-2/+8
- Commands marked as deprecated will trigger a warning when the script is loaded. (there are currently no commands marked as such, but some will come soon) Signed-off-by: Haru <haru@dotalux.com>
2014-10-25Added some missing variable initializationsHaru1-19/+14
- The issue was caused by memcmp failing because of garbage in structs padding. - Fixes bugreport:8410, special thanks (and credits for the fix) to Garr http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/ - Also reduced scope of some variables, where appropriate. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2014-10-24Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 3)Taylor Locke1-0/+133
Some Quality of Life Changes - setdragon, setmadogear and setriding deprecated; use setmount instead. - checkdragon, checkmadogear, checkriding deprecated; use checkmount instead. Signed-off-by: Haru <haru@dotalux.com>
2014-10-24Renamed ismounting, setmounting, @mount2Haru1-10/+13
To avoid ambiguity: - The script command ismounting is now hascashmount - The script command setmounting is now setcashmount - The at-command @mount2 is now @cashmount Signed-off-by: Haru <haru@dotalux.com>
2014-10-24pc_isriding* / pc_setriding* cleanupHaru1-18/+19
- pc_isriding is now renamed to pc_isridingpeco, since that's what it checks (to avoid confusion). - pc_hasmount is added, to check for any of Peco, Dragon, Mado Gear, Wug Rider. - pc->setridingdragon is added. - pc->setridingwug is added. - pc->setfalcon type is changed. - pc->setmadogear type is changed. - pc->setridign is changed to pc->setridingpeco to avoid confusion. - Changed direct accesses to sd->sd.option to the proper pc_is* accessors, where applicable. - Special thanks to Kisuka. Signed-off-by: Haru <haru@dotalux.com>
2014-10-24Restored ability to differentiate between active and inactive questsHaru1-0/+18
- Added the questactive script command. - While this information may not be needed by official scripts, it was offered by the now deprecated checkquest, and as such it is made available again. Signed-off-by: Haru <haru@dotalux.com>
2014-10-24Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 2)Taylor Locke1-4/+59
Some Quality of Life Changes - checkquest deprecated; Use questprogress instead for a more logical quest log checking command. Signed-off-by: Haru <haru@dotalux.com>
2014-10-24Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 1)Taylor Locke1-0/+24
Some Quality of Life Changes - getbrokencount command added to get amount of broken equipment. Signed-off-by: Haru <haru@dotalux.com>
2014-10-18Renamed DeprecationWarning to DeprecationCaseWarning, since that's what it ↵Haru1-1/+1
is about. Signed-off-by: Haru <haru@dotalux.com>