summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorSmokexyz <sagunkho@hotmail.com>2017-02-22 18:26:14 +0800
committerSmokexyz <sagunkho@hotmail.com>2017-04-04 14:07:08 +0800
commita6ca899ac0aa2be7ce1c04beec847f3d3e703b01 (patch)
treec6e41844f490fc8a1100e2bef7ecebb4f4e38321 /src/map/script.h
parent20145c61053479b9acd8ed50c75a80c2a861e349 (diff)
downloadhercules-a6ca899ac0aa2be7ce1c04beec847f3d3e703b01.tar.gz
hercules-a6ca899ac0aa2be7ce1c04beec847f3d3e703b01.tar.bz2
hercules-a6ca899ac0aa2be7ce1c04beec847f3d3e703b01.tar.xz
hercules-a6ca899ac0aa2be7ce1c04beec847f3d3e703b01.zip
Implementation of unit controlling script commands.
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)
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/map/script.h b/src/map/script.h
index a69000991..7ee6d772b 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -350,6 +350,81 @@ enum navigation_service {
};
/**
+ * Unit Types for script handling.
+ */
+enum script_unit_types {
+ UNIT_PC = 0,
+ UNIT_NPC,
+ UNIT_PET,
+ UNIT_MOB,
+ UNIT_HOM,
+ UNIT_MER,
+ UNIT_ELEM,
+};
+
+/**
+ * Unit Data Types for script handling.
+ */
+enum script_unit_data_types {
+ UDT_TYPE = 0,
+ UDT_SIZE,
+ UDT_LEVEL,
+ UDT_HP,
+ UDT_MAXHP,
+ UDT_SP,
+ UDT_MAXSP,
+ UDT_MASTERAID,
+ UDT_MASTERCID,
+ UDT_MAPIDXY,
+ UDT_WALKTOXY,
+ UDT_SPEED,
+ UDT_MODE,
+ UDT_AI,
+ UDT_SCOPTION,
+ UDT_SEX,
+ UDT_CLASS,
+ UDT_HAIRSTYLE,
+ UDT_HAIRCOLOR,
+ UDT_HEADBOTTOM,
+ UDT_HEADMIDDLE,
+ UDT_HEADTOP,
+ UDT_CLOTHCOLOR,
+ UDT_SHIELD,
+ UDT_WEAPON,
+ UDT_LOOKDIR,
+ UDT_CANMOVETICK,
+ UDT_STR,
+ UDT_AGI,
+ UDT_VIT,
+ UDT_INT,
+ UDT_DEX,
+ UDT_LUK,
+ UDT_ATKRANGE,
+ UDT_ATKMIN,
+ UDT_ATKMAX,
+ UDT_MATKMIN,
+ UDT_MATKMAX,
+ UDT_DEF,
+ UDT_MDEF,
+ UDT_HIT,
+ UDT_FLEE,
+ UDT_PDODGE,
+ UDT_CRIT,
+ UDT_RACE,
+ UDT_ELETYPE,
+ UDT_ELELEVEL,
+ UDT_AMOTION,
+ UDT_ADELAY,
+ UDT_DMOTION,
+ UDT_HUNGER,
+ UDT_INTIMACY,
+ UDT_LIFETIME,
+ UDT_MERC_KILLCOUNT,
+ UDT_STATPOINT,
+ UDT_MAX
+};
+
+/**
* Structures
**/