summaryrefslogtreecommitdiff
path: root/src/map/script.h
AgeCommit message (Collapse)AuthorFilesLines
2017-04-23Merge pull request #1584 from Smokexyz/masterHaru1-0/+75
Implementation of unit controlling script commands.
2017-04-12fix a16fbb3 "allow character and account variables to reference another ↵gumi1-0/+4
registry"
2017-04-04Implementation of unit controlling script commands.Smokexyz1-0/+75
Setunitdata <GID>, <DataType>, <Val1> {, <Val2>, <Val3>} Getunitdata <GUID>, <DataType> {, <Variable>} Getunitname <unit id> Setunitname <unit id>, <name> Performs alteration and retrieval of real-time unit data for a game object of the types - NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals. Applicable data types (available as script constants) - UDT_TYPE: Unit Type value (BL_MOB, BL_NPC, BL_PET, BL_ELEM, BL_MER, BL_HOM) UDT_SIZE: Unit Size UDT_LEVEL: Level UDT_HP: Current HP UDT_MAXHP: Max HP UDT_SP: SP UDT_MAXSP: MAX SP UDT_MASTERAID: Master Account ID (for Summons) UDT_MASTERCID: Master Char ID (for Summons) UDT_MAPIDXY: Warp a Unit to a map. UDT_WALKTOXY: Make a unit walk to certain co-ordinates. UDT_SPEED: Unit Speed UDT_MODE: Mode (Mobs) UDT_AI: Unit AI Type UDT_SCOPTION: Status Options. UDT_SEX: mm Sex. UDT_CLASS: Class of the unit. UDT_HAIRSTYLE: Hair Style of the unit. UDT_HAIRCOLOR: Hair Color. UDT_HEADBOTTOM: Headgear Bottom Sprite. UDT_HEADMIDDLE: Headgear Middle Sprite. UDT_HEADTOP: Headegar Top Sprite. UDT_CLOTHCOLOR: Cloth Color. UDT_SHIELD: Shield Sprite. UDT_WEAPON: Weapon Sprite. UDT_LOOKDIR: Face direction. UDT_CANMOVETICK:Stop a unit from move for n seconds. UDT_STR: Unit STR. UDT_AGI: Unit AGI. UDT_VIT: Unit VIT. UDT_INT: Unit INT. UDT_DEX: Unit DEX. UDT_LUK: Unit LUK. UDT_ATKRANGE: Attack range of a unit. UDT_ATKMIN: Min Atk of a unit. UDT_ATKMAX: Max Atk of a unit. UDT_MATKMIN: Min MATK of a unit. UDT_MATKMAX: Max MATK of a unit. UDT_DEF: DEF. UDT_MDEF: MDEF. UDT_HIT: HIT. UDT_FLEE: FLEE. UDT_PDODGE: Perfect Dodge. UDT_CRIT: Critical Rate. UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7). UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0). UDT_ELELEVEL: Element Level (int). UDT_AMOTION: AMotion Rate (int). UDT_ADELAY: ADelay Rate (int). UDT_DMOTION: DMotion Rate (int). UDT_HUNGER: Hunger Rate (int) - for summons. UDT_INTIMACY: Intimacy Rate (int) - for summons. UDT_LIFETIME: LifeTime (int) - for summons. UDT_MERC_KILLCOUNT: Kill count for mercenaries (int). UDT_STATPOINT: Status Points (int) - for npcs. Addition of AI constants as well. Documentation is included. Credits: [rA](https://github.com/rathena/rathena/commit/2cee5b6ff1bf53c4ae53bc1278b09ae84b8a0a76) & [Smokexyz](https://github.com/Smokexyz)
2016-09-12Add script command navigateto. Add packet for this command.Andrei Karas1-0/+11
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-08-19Ported script.conf to libconfigHaru1-4/+4
Ported to modern Hercules and cleaned up from Panikon's commits: a0e4da63ef3afcd896603398e2468876681ac54a, b5f487c2676833492a6d4044b5d1f1bb1e552b04 Signed-off-by: Haru <haru@dotalux.com>
2016-07-10HULD: Improved .po file parser to properly read concatenated stringsHaru1-0/+1
- For compliance with gettext's .po file specifications Signed-off-by: Haru <haru@dotalux.com>
2016-07-04Add one check for possible script issue.Andrei Karas1-1/+1
2016-06-25Added mesf() command (combination of mes() and sprintf())Haru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Added _$() macro to the script engine to mark a translatable string as ↵Haru1-0/+2
format string - Strings passed to sprintf should use the _$() macro instead of _(), to generate the .pot translation template with a directive to correctly handle the % sign. - Strings passed through _() are instead explicitly marked as regular (non format) strings if they contain '%'. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Moved translations template generator to a pluginHaru1-7/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Split translation handling out of parse_simpleexpr_string()Haru1-1/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Split parse_simpleexpr() in specialized sub-functions (HPM compatibility)Haru1-4/+8
- parse_simpleexpr_paren() - parse_simpleexpr_number() - parse_simplexpr_string() - parse_simpleexpr_name() Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Correctly escaped special characters in the generated_translations.potHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Changed script->translation_buf to a VECTORHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced script_code::script_buf with a VECTORHaru1-11/+14
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced script->buf with a VECTORHaru1-4/+9
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Replaced struct script_string_buf definition with a VECTORHaru1-4/+4
- Fixes various signed/unsigned comparisons. Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBMapHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-2/+2
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to the value argument of script->setd_subHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added separate char* and const char* data types to struct script_dataHaru1-11/+16
Used, respectively, by C_STR and C_CONSTSTR Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Changed script->get_val to return a const pointerHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-03-11Hardcore Parameters from constant database to avoid synchronize issues with ↵hemagx1-0/+1
source now defining new parameters in the constants.conf database is deprecated and should be defined in source instead
2016-01-29Merge pull request #1108 from 4144/pcreconfigureHaru1-2/+0
Enable pcre by default in configure and show error if pcre missing.
2016-01-25Added source support for special comments in the constdbHaru1-0/+1
- To be used by the constdb2doc plugin Signed-off-by: Haru <haru@dotalux.com>
2016-01-21Remove unused PCRE_SUPPORT define.Andrei Karas1-2/+0
2016-01-13Added support to mark constants in db/constants.conf as deprecatedHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-5/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Implemented NoViewIDDastgir1-1/+2
(http://herc.ws/board/topic/10020-official-mapflag-to-disable-viewid/) Closes #926 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Add script->id2sd function to throw error properly if player not foundAnnieRuru1-0/+3
- included script->charid2sd and script->nick2sd
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_scriptHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed struct script_queue_iterator::item into a VECTOR and Renamed to ↵Haru1-3/+3
::entries Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed struct script_queue::item into a VECTOR and Renamed to ::entriesHaru1-5/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Renamed hQueue/hQueueIterator/hQueueOpt to latest standardsHaru1-23/+30
Signed-off-by: Haru <haru@dotalux.com>
2015-11-14Changed script->hq and script->hqi into VECTOR typeHaru1-3/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-10-01Split function set_reg and get_val into functions based on variable types.Andrei Karas1-0/+16
2015-08-15HPM compatibility improvementsHaru1-3/+3
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-10Add script interface function run_pet. It do same thing as run.Andrei Karas1-0/+1
2015-08-10Add script interface function run_npc. It do same thing as run.Andrei Karas1-1/+2
2015-08-10Move unequip item script function call into function ↵Andrei Karas1-0/+1
script_run_item_unequip_script.
2015-08-10Move equip item script function call into function script_run_item_equip_script.Andrei Karas1-0/+2
2015-08-10Move use item script function call into function script_run_use_script.Andrei Karas1-0/+1
2015-06-19Removed ".." from include directivesHaru1-7/+7
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-03-15Follow up 330e31cc71ece055908acb1eb967b4009ebc9c46shennetsind1-0/+1
Fixed an issue caused by unescaped characters being written and read out of the .pot unproperly. This commit also causes map server to print the file it wrote to when terminating Signed-off-by: shennetsind <ind@henn.et>
2015-02-23Hercules Ultimate Localization Designshennetsind1-0/+52
Servers can now run on any number of languages, without editing npc files. Designed by Haruna and Ind http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/ Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-0/+2
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2014-12-16Add function what call OnUntouch event.Andrei Karas1-0/+1
2014-11-16Whitespace cleanup (no code changes)Haru1-9/+9
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>