summaryrefslogtreecommitdiff
path: root/src/map/script.h
AgeCommit message (Collapse)AuthorFilesLines
2019-06-02Merge pull request #2221 from carloshenrq/nostorageHaru1-1/+3
Mapflag nostorage and nogstorage
2019-05-05Extend setinitdata and getunitdata with UDT_GROUP flagAndrei Karas1-0/+1
2019-03-12Add constants to *getpetinfo, and add some new fieldsAnnieRuru1-0/+21
2019-03-11Add constants and MERCINFO_GID to *getmercinfo script commandAnnieRuru1-0/+17
2018-12-04Added mapflags 'nostorage' and 'nogstorage'Carlos Henrique1-1/+3
nostorage 1 -- blocks only @storage nostorage 2 -- blocks only openstorage(); nostorage 3 -- blocks @storage and openstorage() nogstorage 1 -- blocks only @gstorage nogstorage 2 -- blocks only guildopenstorage(); nogstorage 3 -- blocks @gstorage and guildopenstorage()
2018-10-22Merge pull request #2279 from Helianthella/promptHaru1-0/+5
deprecate buildin_prompt, bake it into buildin_select
2018-10-21Updated getiteminfo and setiteminfo.Dastgir1-0/+1
Added ITR_TRADE (Trade restriction) for both script commands
2018-10-11add constants for max menu length and optionsgumi1-0/+3
2018-10-11bake buildin_prompt into buildin_select and clarify the difference between ↵gumi1-0/+2
the two
2018-07-30push constants as C_NAME in the script buffergumi1-1/+0
2018-07-30always set the type when doing script->add_strgumi1-0/+1
2018-07-25Merge pull request #2093 from AnnieRuru/47-MAX_ARRAYSIZEHaru1-1/+1
Fix SCRIPT_MAX_ARRAYSIZE
2018-07-24Merge pull request #2130 from mekolat/reloadconstHaru1-1/+1
reload the const db on script reload
2018-07-19Replace item id shorts to int in map server.Andrei Karas1-1/+1
2018-07-13reload the const db on script reloadgumi1-1/+1
2018-06-19Fix SCRIPT_MAX_ARRAYSIZEAnnieRuru1-1/+1
2018-06-02Merge pull request #842 from AnnieRuru/request_6Haru1-0/+16
Add new *pcblock script command
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-04Implementation of Private AirShipAsheraf1-1/+3
2018-05-04Add setpcblock & checkpcblock script commandsAnnieRuru1-0/+16
thanks to @MishimaHaruna for the updated syntax
2018-04-02Rename script->sprintf() to script->sprintf_helper()Haru1-1/+1
This prevents compile errors in HPMHooking in case sprintf is defined as a macro by the C library Fixes #2003 Signed-off-by: Haru <haru@dotalux.com>
2018-02-15expose script_sprintf to pluginsgumi1-0/+1
2017-11-12Add ITEMINFO_VIEWSPRITE support to getiteminfo() / setiteminfo().Haru1-0/+1
Adds the ability to query an item's view sprite, lost with #1828 Fixes #1895 Signed-off-by: Haru <haru@dotalux.com>
2017-11-12Add ITEMINFO_MATK support to getiteminfo() / setiteminfo().Haru1-0/+1
This item info type was documented in commit 315d632e69c60d2996872c9330164133101befdf, but never implemented. Signed-off-by: Haru <haru@dotalux.com>
2017-11-12Add type constants for the getiteminfo()/setiteminfo() buildinsHaru1-0/+23
Replacements are as follows: 0 => ITEMINFO_BUYPRICE 1 => ITEMINFO_SELLPRICE 2 => ITEMINFO_TYPE 3 => ITEMINFO_MAXCHANCE 4 => ITEMINFO_SEX 5 => ITEMINFO_LOC 6 => ITEMINFO_WEIGHT 7 => ITEMINFO_ATK 8 => ITEMINFO_DEF 9 => ITEMINFO_RANGE 10 => ITEMINFO_SLOTS 11 (Subtype, for weapons and ammunitions) => ITEMINFO_SUBTYPE 11 (ViewSprite, for other item types) => ITEMINFO_VIEWSPRITE (NOT AVAILABLE YET) 12 => ITEMINFO_ELV 13 => ITEMINFO_WLV 14 => ITEMINFO_VIEWID 15 => ITEMINFO_MATK (NOT AVAILABLE YET - this was documented but never implemented) Calls to getiteminfo() and setiteminfo() have been replaced with the newly introduced constants. Other constants (such as W_ weapon subtypes) in related code have been replaced as well, to improve code readability. This fixes an issue in the Eden Tutorial script "Tutorial Goal", where ITEMINFO_ATK was accidentally used instead of ITEMINFO_WEIGHT. Note: calls to getiteminfo or setiteminfo with numeric type arguments in third party scripts must be replaced with the respective constants. The use of numeric literals is no longer recommended, and those values may change in the future without notice. See the getiteminfo documentation for details. Signed-off-by: Haru <haru@dotalux.com>
2017-11-04Add into setunitdata/getunitdata new options UDT_ROBE and UDT_BODY2.Andrei Karas1-0/+2
2017-10-22Add NoAutoloot mapflagEmistry Haoyan1-0/+1
- Enable server to disable autoloot settings for certain maps.
2017-06-28Fix a compile error on ARM (Raspberry Pi 3)Haru1-1/+2
According to the C specifications, va_list isn't necessarily a pointer (it can be an array of pointers, or just about anything). As such, we can't cast NULL to va_list. Fixes #1793 Related to 5fd40de233d3a897284f771338cbf8e657182261 Signed-off-by: Haru <haru@dotalux.com>
2017-06-24make buildin_recovery more versatilegumi1-0/+2
2017-05-28add exponentiation operatorgumi1-0/+1
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>