summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-04-23 03:03:33 +0200
committerGitHub <noreply@github.com>2017-04-23 03:03:33 +0200
commita4e270959babb7f56d7cf216f731a33695ba0adb (patch)
tree78dff9922d9c141b7798498911fb424b35791cce /doc
parent34336519849be37f6082fa272e3fe990def55ab9 (diff)
parenta6ca899ac0aa2be7ce1c04beec847f3d3e703b01 (diff)
downloadhercules-a4e270959babb7f56d7cf216f731a33695ba0adb.tar.gz
hercules-a4e270959babb7f56d7cf216f731a33695ba0adb.tar.bz2
hercules-a4e270959babb7f56d7cf216f731a33695ba0adb.tar.xz
hercules-a4e270959babb7f56d7cf216f731a33695ba0adb.zip
Merge pull request #1584 from Smokexyz/master
Implementation of unit controlling script commands.
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt146
1 files changed, 146 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index e7a8d774f..e4df77051 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -9477,3 +9477,149 @@ to be used within a "OnPayFunds" event of a NST_CUSTOM trader.
Returns the amount of still-available <Item_ID> in the shop (on a NST_MARKET trader).
---------------------------------------
+
+*setunitdata(<GUID>, <DataType>, <Val1> {,<Val2>,<Val3>})
+
+Sets or alters the data in real-time for game objects of the following types -
+NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals.
+
+Applicable Data Types (available as constants) -
+ Data Types Description (parameter type)
+ UDT_SIZE: Unit Size (int)
+ UDT_LEVEL: Level (int)
+ UDT_HP: Current HP (int)
+ UDT_MAXHP: Max HP (int)
+ UDT_SP: SP (int)
+ UDT_MAXSP: MAX SP (int)
+ UDT_MASTERAID: Master Account ID (for Summons) (int)
+ UDT_MASTERCID: Master Char ID (for Summons) (int)
+ UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y)
+ UDT_WALKTOXY: Make a unit walk to certain co-ordinates. (Val1 = (int) x, Val2 = (int) y)
+ UDT_SPEED: Unit Speed. (int)
+ UDT_MODE: Mode (Mobs only) (int)
+ UDT_AI: Unit AI Type (see constants.conf for Unit AI Types)
+ UDT_SCOPTION: Status Options. (see constants.conf for Unit Option Types)
+ UDT_SEX: Gender of the unit. (see constants.conf for Genders)
+ UDT_CLASS: Class of the unit. (Monster ID) (int)
+ UDT_HAIRSTYLE: Hair Style ID. (int)
+ UDT_HAIRCOLOR: Hair Color ID. (int)
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int)
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int)
+ UDT_HEADTOP: Headgear Top Sprite ID. (int)
+ UDT_CLOTHCOLOR: Cloth Color ID. (int)
+ UDT_SHIELD: Shield Sprite ID. (int)
+ UDT_WEAPON: Weapon Sprite ID. (int)
+ UDT_LOOKDIR: Face direction. (int)
+ UDT_CANMOVETICK: Stop a unit from move for n seconds. (int)
+ UDT_STR: Unit STR. (int)
+ UDT_AGI: Unit AGI. (int)
+ UDT_VIT: Unit VIT. (int)
+ UDT_INT: Unit INT. (int)
+ UDT_DEX: Unit DEX. (int)
+ UDT_LUK: Unit LUK. (int)
+ UDT_ATKRANGE: Attack range of a unit. (int)
+ UDT_ATKMIN: Min Atk of a unit. (int)
+ UDT_ATKMAX: Max Atk of a unit. (int)
+ UDT_MATKMIN: Min MATK of a unit. (int)
+ UDT_MATKMAX: Max MATK of a unit. (int)
+ UDT_DEF: DEF. (int)
+ UDT_MDEF: MDEF. (int)
+ UDT_HIT: HIT. (int)
+ UDT_FLEE: FLEE. (int)
+ UDT_PDODGE: Perfect Dodge. (int)
+ UDT_CRIT: Critical Rate. (int)
+ 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_STATADD: Status Points (int) - for NPCs.
+
+returns 0 if value could not be set, 1 if successful.
+
+---------------------------------------
+
+*getunitdata (<GUID>,<DataType>{,<Variable>})
+
+Retrieves real-time data of a game object. For data with multiple return values,
+an array variable may be passed to store the data in.
+
+Applicable Data types (available as constants) -
+ Data Types Description (return type)
+ UDT_SIZE: Unit Size (int)
+ UDT_LEVEL: Level (int)
+ UDT_HP: Current HP (int)
+ UDT_MAXHP: Max HP (int)
+ UDT_SP: SP (int)
+ UDT_MAXSP: MAX SP (int)
+ UDT_MASTERAID: Master Account ID (for Summons) (int)
+ UDT_MASTERCID: Master Char ID (for Summons) (int)
+ UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y)
+ UDT_SPEED: Unit Speed. (int)
+ UDT_MODE: Mode (Mobs only) (int)
+ UDT_AI: Unit AI Type (see constants.conf for Unit AI Types)
+ UDT_SCOPTION: Status Options. (see constants.conf for Unit Option Types)
+ UDT_SEX: Gender of the unit. (see constants.conf for Genders)
+ UDT_CLASS: Class of the unit. (Monster ID) (int)
+ UDT_HAIRSTYLE: Hair Style ID. (int)
+ UDT_HAIRCOLOR: Hair Color ID. (int)
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int)
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int)
+ UDT_HEADTOP: Headgear Top Sprite ID. (int)
+ UDT_CLOTHCOLOR: Cloth Color ID. (int)
+ UDT_SHIELD: Shield Sprite ID. (int)
+ UDT_WEAPON: Weapon Sprite ID. (int)
+ UDT_LOOKDIR: Face direction. (int)
+ UDT_CANMOVETICK: Stop a unit from move for n seconds. (int)
+ UDT_STR: Unit STR. (int)
+ UDT_AGI: Unit AGI. (int)
+ UDT_VIT: Unit VIT. (int)
+ UDT_INT: Unit INT. (int)
+ UDT_DEX: Unit DEX. (int)
+ UDT_LUK: Unit LUK. (int)
+ UDT_ATKRANGE: Attack range of a unit. (int)
+ UDT_ATKMIN: Min Atk of a unit. (int)
+ UDT_ATKMAX: Max Atk of a unit. (int)
+ UDT_MATKMIN: Min MATK of a unit. (int)
+ UDT_MATKMAX: Max MATK of a unit. (int)
+ UDT_DEF: DEF. (int)
+ UDT_MDEF: MDEF. (int)
+ UDT_HIT: HIT. (int)
+ UDT_FLEE: FLEE. (int)
+ UDT_PDODGE: Perfect Dodge. (int)
+ UDT_CRIT: Critical Rate. (int)
+ 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).
+
+returns 0 if value could not be retrieved.
+
+---------------------------------------
+
+*getunitname(<GID>)
+
+Retrieve the name of a unit.
+
+returns "Unknown" if the value could not be retrieved.
+
+---------------------------------------
+
+*setunitname(<GID>, <Name>)
+
+Changes the name of a unit.
+
+Supported Types - [ MOB | HOM | PET ].
+
+returns 1 on success, 0 on failure.