summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2013-09-21Corrected invalid values assigned to enum homun_type variablesHaru1-3/+3
- Fixes a warning in clang-5.0.0 (and a potentially incorrect/undefined behavior of the related code) Signed-off-by: Haru <haru@dotalux.com>
2013-09-17Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-4/+4
2013-09-17HPM: Battleground.c Interfaceshennetsind1-18/+18
Fully Integrated. Closes #97 Signed-off-by: shennetsind <ind@henn.et>
2013-09-17HPM: Itemdb.c Interfaceshennetsind1-10/+10
Fully Integrated. Closes #110 Signed-off-by: shennetsind <ind@henn.et>
2013-09-17Fixed bugreport:7710Haru1-4/+4
Follow-up to eb10f35. Thanks to bgamez23 http://hercules.ws/board/tracker/issue-7710-bc-blue-announce-bug/ Signed-off-by: Haru <haru@dotalux.com>
2013-09-16HPM: Quest.c Interfaceshennetsind1-5/+5
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Pet.c Interfaceshennetsind1-20/+20
Fully Integrated. Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mapreg_sql.c Interfaceshennetsind1-19/+19
Fully Integrated Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Npc.c Interfaceshennetsind1-58/+58
Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Unit.c Interfaceshennetsind1-22/+22
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Mob.c Interfaceshennetsind1-53/+53
Fully Interfaced Signed-off-by: shennetsind <ind@henn.et>
2013-09-14Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-18/+17
2013-09-14Hello World.shennetsind1-0/+1
nevermind, testing something. Signed-off-by: shennetsind <ind@henn.et>
2013-09-11Fixed announce script command support for bc_blue and bc_woeHaru1-18/+17
- Fixes an issue where it wasn't possible to use bc_blue or bc_woe at the same time as bc_map, bc_area or bc_self. (this partly works around bugreport:7693 - http://hercules.ws/board/tracker/issue-7693-character-with-name ) - Replaced bc_* related values from various places through the sources with constants. Signed-off-by: Haru <haru@dotalux.com>
2013-09-06Fixing script constants with 'shennetsind1-1/+1
made possible thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-08-28Fixed an error with the '+=' operator on string variablesHaru1-1/+2
When attempting to concatenate and assign to a previously empty string with +=, it'd throw a memory manager error. Follow-up to 22d2718. Signed-off-by: Haru <haru@dotalux.com>
2013-08-27Silenced a MSVC warning about int64->int32 conversionHaru1-1/+1
Follow-up to 8351881. Thanks to Takkun for the report Signed-off-by: Haru <haru@dotalux.com>
2013-08-26Added support for non-fatal error messages from the script parserHaru1-15/+46
- Changed overflow errors to be non-fatal. The value will now be capped to INT_MAX or INT_MIN. - Follow-up to 8351881 Signed-off-by: Haru <haru@dotalux.com>
2013-08-26Added an integer overflow check on literal values in the script parserHaru1-2/+9
- When attempting to use a value greater than INT_MAX or smaller than INT_MIN (about +/- 2 billions), an error message will be shown and script execution will be aborted. - Corrected some scripts that were attempting to use such values. - Fixed some possible issues when using literal negative values in scripts. Thanks to Ind for his help on this issue (figuring it out and fixing it) Signed-off-by: Haru <haru@dotalux.com>
2013-08-26Fixed Bug#7584malufett1-1/+1
-Where HW_SOULDRAIN should work only in single target. Fixed Bug#7670 -Where PA_GOSPEL is not working properly. Fixed Bug#7668 -Bonus 'bLongAtkRate' is not working properly. Fixed Bug#7512 -Bonus 'bCritAtkRate' is not working properly. Fixed Bug#7515 -Fixed MO_EXTREMITYFIST animation. -Fixed RE armor/weapon storage tab positioning. -Fixed HW_MAGICPOWER cast time. -Fixed '/item' '/monster' aegis command where it not working properly in some item names or monsters. -Added NC_DISJOINT cast time hidden modifier. -Updated RE ATK for post damage modifier. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-08-14Fixed Bug #7646shennetsind1-4/+4
Fixed changing map zones/flag of a instance map crashing, also added IOT_ (Instance Owner Type) constants to db/const.txt Special Thanks to purityz for all the help and test scenarios. http://hercules.ws/board/tracker/issue-7646-bg-mapflag-instance-reloadscript-mapserver-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-08-07Fixed Bug #7633shennetsind1-2/+20
unitskillusepos/unitskilluseid script commands werent functioning because the npc's status weren't properly measured. Special Thanks to purityz http://hercules.ws/board/tracker/issue-7633-unitskillusepos-unitskilluseid/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-31New 'close2' warningshennetsind1-1/+7
When attempting to use this command without a prior dialog window it now will throw a warning and skip halting the script. Special Thanks to j-tkay, Gepard. Signed-off-by: shennetsind <ind@henn.et>
2013-07-31Merge pull request #71 from HerculesWS/permission-cache-fixPiotr Hałaczkiewicz1-16/+14
Permission cache overhaul * Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2013-07-29BG Queue Fixesshennetsind1-41/+48
Cleared 3 out of 5, #69 Support for the cancel button, for pre-game position to return afterwards and fix to the queue position problem after first game. Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Permission cache overhaulPiotr Hałaczkiewicz1-16/+14
* Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2013-07-29Fixed Bug #7597 / Follow up b7171479a47490ff80bf04849f763158d6d96facshennetsind1-2/+2
http://hercules.ws/board/tracker/issue-7597-server-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-29Added mercenary interfaceSusu1-6/+6