summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-24 21:39:33 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-24 21:39:33 +0300
commit53297980a727d20e55f030cc957a0b731dfe186c (patch)
tree6332e6c771b0fa1857ba64c9271aebd69e7f2566
parent6b4f0354a0f810c4d5dd8c28debc6ac71460b44f (diff)
downloaddocs-53297980a727d20e55f030cc957a0b731dfe186c.tar.gz
docs-53297980a727d20e55f030cc957a0b731dfe186c.tar.bz2
docs-53297980a727d20e55f030cc957a0b731dfe186c.tar.xz
docs-53297980a727d20e55f030cc957a0b731dfe186c.zip
Update to latest hercules.s20170510
Update constants. Update script commands docs.
-rw-r--r--server/scripts/constants.md112
-rw-r--r--server/scripts/script_commands.txt146
2 files changed, 257 insertions, 1 deletions
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index c666512..22521a6 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -3430,6 +3430,50 @@
- `4_F_REBELLION2`: 10201
- `4_F_REBELLION3`: 10202
- `4_M_ILYA`: 10203
+- `4_ELDER`: 10205
+- `4_LUNATIC`: 10206
+- `4_F_NOVICE2`: 10207
+- `4_WICKEDNYMPH`: 10208
+- `4_F_PREMI`: 10209
+- `4_M_COSTELL`: 10210
+- `4_M_YATTWARP`: 10211
+- `4_M_EVOKASCUDI`: 10212
+- `4_M_JOHNNYJAMES`: 10213
+- `4_M_ALBERTFORD`: 10214
+- `4_M_SEANMCCURDY`: 10215
+- `4_M_KARAMPUCCI`: 10216
+- `4_M_CACTUSMAN1`: 10217
+- `4_M_CACTUSMAN2`: 10218
+- `4_M_CACTUSMAN3`: 10219
+- `4_M_CACTUSLADY`: 10220
+- `4_M_GAST`: 10221
+- `4_M_CACTUSCHILD`: 10222
+- `4_KING`: 10223
+- `4_F_BOMI`: 10224
+- `4_M_CACTUSCHIEF`: 10225
+- `4_F_CACTUSCHILD2`: 10226
+- `4_F_CACTUSLADY2`: 10227
+- `4_F_CACTUSLADY3`: 10228
+- `4_M_CACTUS`: 10229
+- `4_M_COWRAIDERS1`: 10230
+- `4_M_COWRAIDERS2`: 10231
+- `4_M_COWRAIDERS3`: 10232
+- `4_F_JP14THEVT`: 10233
+- `4_M_POORSCHOLAR`: 10234
+- `4_M_PEPPERROTI`: 10235
+- `JP_NPC01`: 10236
+- `4_PURPLE_WARP`: 10237
+- `4_F_NARIN`: 10238
+- `4_M_URGENT_MAN`: 10239
+- `4_M_KEEN_SOLDIER`: 10240
+- `4_F_SLOPPY_WOMAN`: 10241
+- `4_F_DRKAFRA01`: 10242
+- `4_M_DRZONDA01`: 10243
+- `4_M_SWD_RENO`: 10244
+- `4_M_KNG_RENO`: 10245
+- `4_M_AC_RUMIN`: 10246
+- `4_M_HIGH_WIZARD`: 10247
+- `4_SYSTEM_BOX`: 10248
### Mercenary IDs
@@ -3613,7 +3657,7 @@
- `MOUNT_DRAGON_BLUE`: 7
- `MOUNT_DRAGON_RED`: 8
-### gettime
+### Gettime Types
- `GETTIME_SECOND`: 1
- `GETTIME_MINUTE`: 2
@@ -3640,6 +3684,14 @@
- `UNITTYPE_MER`: 5
- `UNITTYPE_ELEM`: 6
+### Unit AI Types
+
+- `AI_NONE`: 0
+- `AI_ATTACK`: 1
+- `AI_SPHERE`: 2
+- `AI_FLORA`: 3
+- `AI_ZANZOU`: 4
+
### Colors
- `C_AQUA`: 65535
@@ -3669,6 +3721,64 @@
- `SEX_FEMALE`: 0
- `SEX_MALE`: 1
+### 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
+
## Hardcoded Constants (source)
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index e7a8d77..e4df770 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/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.