summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-18Corrected size-related constant names and cleaned up comments (closes #222).Mumbles1-3/+3
2013-11-12Follow up ce6c4c63a3a5c1516780f2eac978d02820a8dc0bshennetsind1-0/+5
Fixed shutdown memory manager warning. Signed-off-by: shennetsind <ind@henn.et>
2013-11-11Fixed MSVC compile error in ce6c4c63a3a5c1516780f2eac978d02820a8dc0bHaru1-2/+3
- Fixed bugreport:7818, thanks to sevenzz23 http://hercules.ws/board/tracker/issue-7818-error-when-compiling/ Signed-off-by: Haru <haru@dotalux.com>
2013-11-11Follow-up to dd05ae388d69e7df1dffcd393cea5e4cdc605e75Haru1-4/+108
- Reduced number of false positives when parsing .@scope variables. - Added correct error source information where it previously said 'source not found'. - Special thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2013-11-10Added deprecation messages for incorrect capitalization in scriptsHaru1-3/+56
- These messages are temporary, only meant to help those with custom scripts to transition them to the correct case-sensitive syntax. If you ignore the deprecation messages you encounter, your scripts may continue to work just as they did until now, but this will no longer be true in the near future, and they may stop working at any time. If you ignore this, and your scripts break, you'll get to keep the pieces :) Signed-off-by: Haru <haru@dotalux.com>
2013-11-09Consolidated commands called in scripts to their lowercase versionHaru1-13/+13
- Added a note about variables and command scripts case sensitivity. Even though the engine still accepts variable, function and command names in a case insensitive way, it is discouraged to rely on such behavior. Please update your custom scripts as soon as possible. Signed-off-by: Haru <haru@dotalux.com>
2013-11-07Merge remote-tracking branch 'upstream/master'shennetsind1-38/+78
2013-11-07Extended script constants to support NPC sprite IDsHaru1-35/+76
- Added support for constants whose name begins with a number. - Follow-up to 124ab2a1cdb344f24170a4d91f7000ebabf39b40. - Replaced calls to setnpcdisplay with hardcoded numeric IDs to constants. - Thanks to Yommy. Signed-off-by: Haru <haru@dotalux.com>
2013-11-07Item Bound Fixes/Adjustments/Improvementsshennetsind1-192/+60
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-11-07Corrected a const pointer being incorrectly initializedHaru1-2/+1
- Fixes bugreport:7804, thanks to kyeme http://hercules.ws/board/tracker/issue-7804-warning-c4090-function Signed-off-by: Haru <haru@dotalux.com>
2013-11-07Fixed equip command failing when another item of the same kind is equippedHaru1-1/+1
- The command now correctly skips the already equipped items, rather than trying to equip them again (and fail during the process). - Special thanks to Poison. Signed-off-by: Haru <haru@dotalux.com>
2013-11-06Merge remote-tracking branch 'origin/master'shennetsind1-3/+226
Signed-off-by: shennetsind <ind@henn.et> Conflicts: conf/messages.conf src/common/mmo.h src/map/pc_groups.c src/map/pc_groups.h
2013-11-06Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-18/+54
2013-11-06Merge pull request #217 from HerculesWS/script-checkershennetsind1-18/+54
Introducing the Hercules Standalone Script Syntax Checker
2013-11-06Fixed Bug 7799shennetsind1-9/+2
SC_MOONSTAR, SC_SUPER_STAR are no longer removeable by sc_end all, and sc clear. Modified sc_config.txt, added a new flag (0x80/128) for such cases. http://hercules.ws/board/tracker/issue-7799-sc-moonstar/ Special Thanks to kyeme. Signed-off-by: shennetsind <ind@henn.et>
2013-11-06Modified status_calc_shennetsind1-9/+9
Replaces the previous 'first' flag with a multi-option flag capable of selectively determining calls where the recalculation must not be hold by delayed damage, and therefore must take place immediately. This fixes issues caused by actions that require immediate recalculation e.g. on-level-up max_hp update, also modified @baselevel where status_calc was being called after the heal and not before, causing it not to be fully healed. Special Thanks to Haruna! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-18/+54
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-11-04Standardized the format of some NPC parse error messagesHaru1-2/+2
- For better machine-parsing of such messages (i.e. in IDEs) Signed-off-by: Haru <haru@dotalux.com>
2013-11-02Fixed Shadow System Bonusesshennetsind1-1/+1
Item in shadow slots are now able to give bonuses properly, thanks to rosfus for pointing it out! Also added the missing constants for script handling. Signed-off-by: shennetsind <ind@henn.et>
2013-10-31No error after compilation, but when logging in at map server it will crash.sevenzz231-3/+226
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-30Official Font Supportshennetsind1-3/+3
Fonts are now relog-persistent. Font items are now toggle-on/off, they no longer go away on use, they go away when their rental duration is over (and the font effect goes back to original). Special Thanks to Yommy for all the data! Signed-off-by: shennetsind <ind@henn.et>
2013-10-27query_sql script command modificationshennetsind1-1/+1
query_sql will now halt the script execution when a invalid query is used. Signed-off-by: shennetsind <ind@henn.et>
2013-10-26Changed 'tick' variables to 64 bitHaru1-6/+6
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-25Merge pull request #202 from kisuka/mastershennetsind1-9/+95
Quest Bubbles (Actually Works Finally)
2013-10-25nocashshop mapflagshennetsind1-0/+3
As requested by the community in http://hercules.ws/board/topic/1477-mapflag-for-cash-shop/ and http://hercules.ws/board/topic/1476-disable-cashshop-in-pvp-woe/ 'nocashshop' mapflag disables the usage of the cashshop button as well as any attempts to purchase (in case the flag is turned on after someone gets the shop open). Signed-off-by: shennetsind <ind@henn.et>
2013-10-25Quest Bubbles Updateshennetsind1-29/+51
- Introduced questinfo cache, memory & processing speed improvement - Fixed mini-map marker support Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-24Quest Bubbles (Actually Works Finally)Kisuka1-8/+72
2013-10-24Fixed nullpo calls in script.c mismatching new macro return typeshennetsind1-8/+8
Thanks to Kisuka. Signed-off-by: shennetsind <ind@henn.et>
2013-10-19Instance Dungeons Updateshennetsind1-0/+71
As requested by the community in http://hercules.ws/board/topic/1702-implement-rathena-npc/ we're merging in the latest of rAthena's dungeons, this includes the rewriting of all instance dungeons and the addition of 4 dungeons that were not present previously (BakonawaLake, BangungotHospital, BuwayaCave and OldGlastHeim). Update also includes the ability for instances to reset (or be destroyed if instance files were disabled/removed) upon @reloadscript, instance scripts are able to control to what stage the instances are to be reset via the instance_set_respawn (reload spawn) script command, OnInstanceInit labels are now triggered when the instance starts via instance_init (and upon reload), they may be used alongside instance variables (which are persistent to @reloadscript) to save players' progress. - NPC Changelog: -- npc/instances/EndlessTower.txt --- 2.2 Instance system rewrite. [Euphy] --- 2.3 Added some missing announcements. [Euphy] --- 2.4 Added GM management function. [Euphy] -- npc/instances/NydhoggsNest.txt --- 1.5 Instance system rewrite. [Euphy] --- 1.6 Added GM management NPCs. [Euphy] -- npc/instances/OrcsMemory.txt --- 1.7 Instance system rewrite. [Euphy] -- npc/instances/SealedShrine.txt --- 2.3 Instance system rewrite. [Euphy] -- npc/other/gm_npcs.txt --- 1.0 First version. [Euphy] -- npc/re/instances/BakonawaLake.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management NPC. [Euphy] -- npc/re/instances/BangungotHospital.txt --- 1.0 First version. [Euphy] --- 1.1 Added GM management function. [Euphy] -- npc/re/instances/BuwayaCave.txt --- 1.0 First version. [Euphy] -- npc/re/instances/HazyForest.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/MalangdoCulvert.txt --- 1.0b Fixed incorrect use of 'close'. [Joseph] --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OctopusCave.txt --- 1.1 Instance system rewrite. [Euphy] -- npc/re/instances/OldGlastHeim.txt --- 1.0 First version. [Euphy] Special Thanks to Haru, Uziel for their contributions to this update, and ossi0110 for helping us debug it. Signed-off-by: shennetsind <ind@henn.et>
2013-10-16Fixed Bug #7771shennetsind1-1/+4
http://hercules.ws/board/tracker/issue-7771-compiling-errors/ Signed-off-by: shennetsind <ind@henn.et>
2013-10-16Fixed Bug#7770malufett1-1/+1
-split 'item_delay.txt'. Follow up @ 9692bc034537693d331148ae8bd15153265c6cf0 -implement PACKET_ZC_SHOWSCRIPT. Special thanks to Kyeme and super awesome Yommy. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Merge branch 'master' of https://github.com/HerculesWS/Herculesmalufett1-2/+2
2013-10-16Follow up @ ↵malufett1-15/+17
https://github.com/HerculesWS/Hercules/commit/9692bc034537693d331148ae8bd15153265c6cf0 -Should now accept mob id. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-16Fixed a variable going out of scope causing an invalid pointer accessHaru1-2/+2
- Follow-up to 20bdc01fa687b174a732be4483ddea4982d67ce9 - The issue was found thanks to gcc 4.7.3 on a 32 bit linux system, where the issue became evident and caused all sorts of parsing errors on argument-less command functions such as 'end', 'close', 'next', etc - Special thanks to Ind for quickly pointing me to the right place! Signed-off-by: Haru <haru@dotalux.com>
2013-10-16Fixed Bug#7374malufett1-0/+75
-Hercules now fully support Monster Transformation. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-10-14Added scriptcommands addmonsterdrop and delmonsterdrop (Missing documentation)EPuncker1-26/+108
[Edit by Haru: This commit has been amended in order for it to work properly in Hercules, and to correct some flaws of the original version, according to what I said in my review of issue #191. Credits to the original author have been moved to an "Original idea by" comment. Commit authorship is preserved. Documentation will be added in a follow-up commit] Signed-off-by: Haru <haru@dotalux.com>
2013-10-10Homun-S Quest Updatedshennetsind1-40/+84
Partial Merge of 0b68607 Quest Changelog: - 1.2 Replaced with official script. [Euphy] Closes #177 Closes #178 Signed-off-by: shennetsind <ind@henn.et>
2013-10-07Added 'consumeitem' as an alias of 'itemeffect'shennetsind1-0/+1
For compatibility purposes, Closes #148 Signed-off-by: shennetsind <ind@henn.et>
2013-10-04downrefitem script command updateshennetsind1-6/+9
Preparation for refiner/hd-ore update; Optional param added, this will allow for the officials 1/3 downgrades as well as for users to customise the value to their liking at script-level. Thanks To Haruna. Signed-off-by: shennetsind <ind@henn.et>
2013-10-02HPM: Map.c Completedshennetsind1-207/+218
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of map within calls to shorten wherever it made sense to. Ladies and Gentleman its my pleasure to announce that with this commit we've revised all of map-server, we've learned a hell lot from this, improved many things on the go and have a number of features to be released thanks to this. *cough* hpm hooking *cough*. Signed-off-by: shennetsind <ind@henn.et>
2013-09-29HPM: Script.c Completedshennetsind1-1140/+1082
Fully Interfaced. Moved missing vars and declarations of interest into the interface, removed duplicate mentions of script within calls to shorten wherever it made sense to. Signed-off-by: shennetsind <ind@henn.et>
2013-09-28HPM: Instance.c Completedshennetsind1-15/+15
Moved missing vars and declarations of interest into the interface. Instance data now available to plugins via instance->list (struct instance_data array) Signed-off-by: shennetsind <ind@henn.et>
2013-09-27HPM: Chat.c Completedshennetsind1-5/+5
Moved missing vars and declarations of interest into the interface, removed duplicate mentions of chat within calls to shorten wherever it made sense to, and renamed some members to ease reading. Signed-off-by: shennetsind <ind@henn.et>
2013-09-27Renamed iMap interface to mapHaru1-550/+416
Signed-off-by: Haru <haru@dotalux.com>
2013-09-27Renamed iStatus interface to statusHaru1-86/+65
Signed-off-by: Haru <haru@dotalux.com>
2013-09-26Renamed variables that would conflict with a rename of iMap to mapHaru1-309/+287
Note to plugin developers: if you were importing the "map", you'll need to change it to "maplist" Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-48/+35
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.
2013-09-25Renamed iTimer interface to timer.shennetsind1-31/+31
Also removed duplicate mentions of timer within calls to shorten.
2013-09-25Renamed local variables that would conflict with a rename of iTimer to timerHaru1-16/+13
Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-30/+21
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>