summaryrefslogtreecommitdiff
path: root/db
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 /db
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 'db')
-rw-r--r--db/constants.conf68
1 files changed, 66 insertions, 2 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 09c0fa9e4..c349ae152 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -3699,7 +3699,7 @@ constants_db: {
MOUNT_DRAGON_BLUE: 7
MOUNT_DRAGON_RED: 8
- comment__: "gettime"
+ comment__: "Gettime Types"
GETTIME_SECOND: 1
GETTIME_MINUTE: 2
GETTIME_HOUR: 3
@@ -3717,7 +3717,14 @@ constants_db: {
UNITTYPE_HOM: 4
UNITTYPE_MER: 5
UNITTYPE_ELEM: 6
-
+
+ comment__: "Unit AI Types"
+ AI_NONE: 0 //0: Normal mob.
+ AI_ATTACK: 1 //1: Standard summon, attacks mobs.
+ AI_SPHERE: 2 //2: Alchemist Marine Sphere
+ AI_FLORA: 3 //3: Alchemist Summon Flora
+ AI_ZANZOU: 4 //4: Summon Zanzou
+
comment__: "Colors"
C_AQUA: 0x00FFFF
C_BLACK: 0x000000
@@ -3744,4 +3751,61 @@ constants_db: {
comment__: "Genders"
SEX_FEMALE: 0
SEX_MALE: 1
+
+ comment__: "Script Unit Data Types"
+ UDT_TYPE: 0
+ UDT_SIZE: 1
+ UDT_LEVEL: 2
+ UDT_HP: 3
+ UDT_MAXHP: 4
+ UDT_SP: 5
+ UDT_MAXSP: 6
+ UDT_MASTERAID: 7
+ UDT_MASTERCID: 8
+ UDT_MAPIDXY: 9
+ UDT_WALKTOXY: 10
+ UDT_SPEED: 11
+ UDT_MODE: 12
+ UDT_AI: 13
+ UDT_SCOPTION: 14
+ UDT_SEX: 15
+ UDT_CLASS: 16
+ UDT_HAIRSTYLE: 17
+ UDT_HAIRCOLOR: 18
+ UDT_HEADBOTTOM: 19
+ UDT_HEADMIDDLE: 20
+ UDT_HEADTOP: 21
+ UDT_CLOTHCOLOR: 22
+ UDT_SHIELD: 23
+ UDT_WEAPON: 24
+ UDT_LOOKDIR: 25
+ UDT_CANMOVETICK: 26
+ UDT_STR: 27
+ UDT_AGI: 28
+ UDT_VIT: 29
+ UDT_INT: 30
+ UDT_DEX: 31
+ UDT_LUK: 32
+ UDT_ATKRANGE: 33
+ UDT_ATKMIN: 34
+ UDT_ATKMAX: 35
+ UDT_MATKMIN: 36
+ UDT_MATKMAX: 37
+ UDT_DEF: 38
+ UDT_MDEF: 39
+ UDT_HIT: 40
+ UDT_FLEE: 41
+ UDT_PDODGE: 42
+ UDT_CRIT: 43
+ UDT_RACE: 44
+ UDT_ELETYPE: 45
+ UDT_ELELEVEL: 46
+ UDT_AMOTION: 47
+ UDT_ADELAY: 48
+ UDT_DMOTION: 49
+ UDT_HUNGER: 50
+ UDT_INTIMACY: 51
+ UDT_LIFETIME: 52
+ UDT_MERC_KILLCOUNT: 53
+ UDT_STATADD: 54
}