summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
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
2013-07-29Added intif interfaceSusu1-8/+8
2013-07-29Added chat interfaceSusu1-5/+5
2013-07-26Fixed Bug #7588shennetsind1-1/+1
param mismatching compiler warning http://hercules.ws/board/tracker/issue-7588-srcmapscript/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-25Expanding script.c interfaceshennetsind1-276/+292
Hercules Renewal Phase One. Signed-off-by: shennetsind <ind@henn.et>
2013-07-21Fixed various unit* script commands to work with NPCs (issue #7548)Haru1-34/+25
http://hercules.ws/board/tracker/issue-7548-unitwalk-do-not-work/ Follow-up to 20bdc01. Thanks to Ind for his support and suggestions. Signed-off-by: Haru <haru@dotalux.com>
2013-07-21Fixed Bug #7547shennetsind1-0/+1
str_data[].val was uninitialised and thus using garbage memory on compilers that don't automatically initialize http://hercules.ws/board/tracker/issue-7547-notice-conflicting-itemscript-var/ Also updated guild aura sc_config options (special thanks to kyeme!) Signed-off-by: shennetsind <ind@henn.et>
2013-07-18Fixed Bug #7525shennetsind1-2/+27
Item name constants conflicting with script var names will now result in a map server warning/notice and in the background map server will prioritise the script variable over the item name constant. http://hercules.ws/board/tracker/issue-7525-set-variable-is-not-recognized-causing-freezing/ --- Also followup 586c0f7983f81e97ca70c57712e25d4d51453d6b sc_config.txt update Signed-off-by: shennetsind <ind@henn.et>
2013-07-17Added missing initialization of some functions in the homunculus interfaceHaru1-3/+2
- Fixes issue #7536 (thanks to jTynne for the report) http://hercules.ws/board/tracker/issue-7536-map-crash-july-15th/ - Minor corrections to the other interfaces as well (reordered initialization to follow the definitions, removed duplicate entry in the skill interface initialization, commented out some unused entries) Signed-off-by: Haru <haru@dotalux.com>
2013-07-14Removed the now unused optional 3rd parameter from removemapflagHaru1-5/+2
- The parameter was only used in combination with MF_RESTRICTED, now superseded by MF_ZONE - Follow-up b08910e8, 90f117f6 Signed-off-by: Haru <haru@dotalux.com>
2013-07-09Travis Report Fixesshennetsind1-4/+4
warn_unused_result shielding, dropped unused variables and fixed battle_calc_return_damage delay behavior (pointer was unchaged; resulting in the var afterwards always as 0) Special Thanks to Xgear. Signed-off-by: shennetsind <ind@henn.et>
2013-07-09Fixed missing map id boundary checkingshennetsind1-24/+62
Signed-off-by: shennetsind <ind@henn.et>
2013-07-08Fixed Bug #7485shennetsind1-13/+13
Special Thanks to Igniz http://hercules.ws/board/tracker/issue-7485-crash-on-reloadscript/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-05HCache | Item Packages Updateshennetsind1-2/+4
http://hercules.ws/board/topic/1389-hcache-item-packages-update/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-04Implemented sitting set of script commands: sit(), stand(), issit() as per ↵Matheus Macabu1-0/+59
suggested in topic #1204. See documentation for more information on these commands. Also fixed leftover from db_use_sql split. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-07-04- Added interface iStatus (needed to renamed it because A LOT of variables ↵Susu1-32/+32
are already called 'status')
2013-07-01Fixed Bug #7216shennetsind1-0/+2
Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help! http://hercules.ws/board/index.php?app=tracker&showissue=7216 Signed-off-by: shennetsind <ind@henn.et>
2013-06-30Fixed script timer problemshennetsind1-20/+40
Special Thanks to Igniz for bringing it to my attention, ALSO: over 10% script parsing speed boost!<3. Signed-off-by: shennetsind <ind@henn.et>
2013-06-28BG Queue Testingshennetsind1-8/+101
http://hercules.ws/board/topic/1302-bg-queue-debug/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-28Fixed Bug #7448shennetsind1-7/+13
Queue Iterators now keep a copy of the queue they'll iterate, so the iterator won't break items are removed or added during iteration. Special Thanks to Wend~! http://hercules.ws/board/tracker/issue-7448-queue-memory-leak/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-27Fixed Bug #7439shennetsind1-3/+4
Special Thanks to Wend. http://hercules.ws/board/tracker/issue-7439-queue-system-error/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-27Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-2/+6
2013-06-27Fixed Bug #7444shennetsind1-1/+0
Special Thanks to shenhuyong, Haruna. http://hercules.ws/board/tracker/issue-7444-partymembercount-gone-missing-when-reloaditemdb-is-executed/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-27Merge pull request #48 from CairoLee/mastershennetsind1-1/+5
Implemented notomb Mapflag
2013-06-25- Added chrif interfaceSusu1-1/+1
2013-06-25Implemented notomb MapflagCairoLee1-1/+5
2013-06-24Fixed Bug #7412shennetsind1-9/+15
Special Thanks to shenhuyong http://hercules.ws/board/tracker/issue-7412-create-instancereloadscript-causes-map-server-crash/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-23Fixed Bug #7420shennetsind1-22/+25
http://hercules.ws/board/tracker/issue-7420-killing-the-npc/ Special Thanks to kyeme, frost, ossi0110 Signed-off-by: shennetsind <ind@henn.et>
2013-06-23Official Item Group/Package/Chainshennetsind1-92/+168
http://hercules.ws/board/topic/1244-official-item-grouppackagechain/ Also Further implemented itemdb.c/storage.c interfaces, and a minor update to db2sql plugin. Signed-off-by: shennetsind <ind@henn.et>
2013-06-20Hercules Renewal Phase One: storage.cshennetsind1-6/+4
2 new interfaces: - storage - gstorage http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-17Fixed Bug#7380malufett1-0/+1
-showprogressbar should now work as official.(Thanks Kyeme & Ryuuzaki) Fixed insane damage of Hatred Skills. (http://hercules.ws/board/topic/1110-renewal-attack/ - Thanks Axiom)
2013-06-16Fixed Bug#7381 & #7379malufett1-2/+3
-Reins_of_Mount should now ignore delay(when fail) and sitting condition.
2013-06-15Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-1/+4
2013-06-15Fixed Bug #7367shennetsind1-91/+89
http://hercules.ws/board/tracker/issue-7367-error-vdb-destroy-during-shutting-down-of-server/ Signed-off-by: shennetsind <ind@henn.et>
2013-06-15Forgot to change something.Matheus Macabu1-1/+1
Also added mail interface for HPM. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-06-15- HPM: Added trade interface;Matheus Macabu1-0/+3
- Moved PARTY_RECRUIT definition to mmo.h to avoid segfault; - Check if item is already at maximum refine; - Fixed that @reloadscript with one npc bug (thanks to akinari). Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-06-14Fixed Bug #7365shennetsind1-1/+1
Special Thanks to Axiom http://hercules.ws/board/tracker/issue-7365-scriptc-error/ Also fixed packetKeys order for 2013-06-12 Signed-off-by: shennetsind <ind@henn.et>
2013-06-14Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-3/+3
2013-06-14Updating .sql item db filesshennetsind1-1/+5
Also Introducing the official DB2SQL plugin to quickly update the .sql db files. http://hercules.ws/board/topic/1105-hercules-wpe-free-june-14th-patch Signed-off-by: shennetsind <ind@henn.et>
2013-06-14Fixed Bug#7362, Bug#7363 & Bug#7355malufett1-3/+3
Fixed compilation error and server console error.
2013-06-13Script.c Interface : detach ridshennetsind1-4/+3
Special Thanks to Shizaku for pointing it out! Signed-off-by: shennetsind <ind@henn.et>
2013-06-13Memory Slasher [2] !!" - 17MB Down!shennetsind1-176/+166
Hercules is now even slimmer. Signed-off-by: shennetsind <ind@henn.et>
2013-06-13Performance Update: Script Parsershennetsind1-40/+34
Now 7% faster, at the expense of (at most 11kb) Signed-off-by: shennetsind <ind@henn.et>