summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/constants.md143
-rw-r--r--doc/item_db.txt3
-rw-r--r--doc/script_commands.txt233
3 files changed, 368 insertions, 11 deletions
diff --git a/doc/constants.md b/doc/constants.md
index c6665126c..faf964db6 100644
--- a/doc/constants.md
+++ b/doc/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)
@@ -3687,6 +3797,7 @@
- `MAX_CART`: 100
- `MAX_INVENTORY`: 100
- `MAX_ZENY`: 2147483647
+- `MAX_BANK_ZENY`: 2147483647
- `MAX_BG_MEMBERS`: 30
- `MAX_CHAT_USERS`: 20
- `MAX_REFINE`: 20
@@ -3835,6 +3946,35 @@
- `BL_CHAR`: 539
- `BL_ALL`: 4095
+### Player permissions
+
+- `PERM_TRADE`: 1
+- `PERM_PARTY`: 2
+- `PERM_ALL_SKILL`: 4
+- `PERM_USE_ALL_EQUIPMENT`: 8
+- `PERM_SKILL_UNCONDITIONAL`: 16
+- `PERM_JOIN_ALL_CHAT`: 32
+- `PERM_NO_CHAT_KICK`: 64
+- `PERM_HIDE_SESSION`: 128
+- `PERM_RECEIVE_HACK_INFO`: 512
+- `PERM_WARP_ANYWHERE`: 1024
+- `PERM_VIEW_HPMETER`: 2048
+- `PERM_VIEW_EQUIPMENT`: 4096
+- `PERM_USE_CHECK`: 8192
+- `PERM_USE_CHANGEMAPTYPE`: 16384
+- `PERM_USE_ALL_COMMANDS`: 32768
+- `PERM_RECEIVE_REQUESTS`: 65536
+- `PERM_SHOW_BOSS`: 131072
+- `PERM_DISABLE_PVM`: 262144
+- `PERM_DISABLE_PVP`: 524288
+- `PERM_DISABLE_CMD_DEAD`: 1048576
+- `PERM_HCHSYS_ADMIN`: 2097152
+- `PERM_TRADE_BOUND`: 4194304
+- `PERM_DISABLE_PICK_UP`: 8388608
+- `PERM_DISABLE_STORE`: 16777216
+- `PERM_DISABLE_EXP`: 33554432
+- `PERM_DISABLE_SKILL_USAGE`: 67108864
+
### Renewal
- `RENEWAL`: 1
@@ -3864,6 +4004,7 @@
- `SkillPoint`: [param]
- `Class`: [param]
- `Zeny`: [param]
+- `BankVault`: [param]
- `Sex`: [param]
- `NextBaseExp`: [param]
- `NextJobExp`: [param]
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 6ffc8a52b..86e397636 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -71,6 +71,7 @@ item_db: (
BuyingStore: true/false (boolean, defaults to false)
Delay: Delay to use item (int, defaults to 0)
KeepAfterUse: true/false (boolean, defaults to false)
+ DropAnnounce: true/false (boolean, defaults to false)
Trade: { (defaults to no restrictions)
override: GroupID (int, defaults to 100)
nodrop: true/false (boolean, defaults to false)
@@ -290,6 +291,8 @@ ForceSerial: Whether the item will be given new unique id or not. When the item
BuyingStore: Whether the item can be sold via buyingstore, one must also edit
data\buyingstoreitemlist.txt for client to accept item.
+DropAnnounce: Enables global announcement of the selected item when dropped by monster.
+
Delay: Delay for an item to be used again. Value is in milliseconds.
There is a max concurrent number of entries modifiable in
src/map/itemdb.h as MAX_ITEMDELAYS.
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index e7a8d774f..a27d16e7f 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -540,7 +540,8 @@ allows you to replace lots of numbered arguments for many commands with
easier to read text. The special variables most commonly used are all
permanent character-based variables:
-Zeny - Amount of Zeny.
+Zeny - Amount of Zeny in the inventory.
+BankVault - Amount of Zeny in the bank.
Hp - Current amount of hit points.
MaxHp - Maximum amount of hit points.
Sp - Current spell points.
@@ -707,7 +708,8 @@ MAX_STORAGE - Maximum storage items
MAX_GUILD_STORAGE - Maximum guild storage items
MAX_CART - Maximum cart items
MAX_INVENTORY - Maximum inventory items
-MAX_ZENY - Maximum Zeny
+MAX_ZENY - Maximum Zeny in the inventory
+MAX_BANK_ZENY - Maximum Zeny in the bank
MAX_BG_MEMBERS - Maximum BattleGround members
MAX_CHAT_USERS - Maximum Chat users
MAX_REFINE - Maximum Refine level
@@ -2687,7 +2689,7 @@ Example 2: check party count (with a next() pause), before warping to event
}
// Finally, it's safe to start the event!
- warpparty("event_map", 0, 0, getcharid(CHAR_ID_PARTY));
+ warpparty("event_map", 0, 0, getcharid(CHAR_ID_PARTY), true);
---------------------------------------
@@ -3950,17 +3952,18 @@ things might in some cases be required.
---------------------------------------
-*checkoption(<option number>)
-*checkoption1(<option number>)
-*checkoption2(<option number>)
-*setoption(<option number>{, <flag>});
+*checkoption(<option number>{, <account id>})
+*checkoption1(<option number>{, <account id>})
+*checkoption2(<option number>{, <account id>})
+*setoption(<option number>{, <flag>{, <account id>}});
The setoption() series of functions check for a so-called option that is
set on the invoking character. 'Options' are used to store status
conditions and a lot of other non-permanent character data of the yes-no
kind. For most common cases, it is better to use checkcart(),
checkfalcon(), checkmount() and other similar functions, but there are
-some options which you cannot get at this way.
+some options which you cannot get at this way. If <account id> is given,
+this player will be used instead of the invoking character.
Option numbers valid for the first (option) version of this command are:
@@ -4355,7 +4358,7 @@ See also warp().
---------------------------------------
-*warpparty("<to_mapname>", <x>, <y>, <party_id>, {"<from_mapname>"})
+*warpparty("<to_mapname>", <x>, <y>, <party_id>, "<from_mapname>", <include_leader>)
Warps a party to specified map and coordinate given the party ID, which
you can get with getcharid(CHAR_ID_PARTY). You can also request another party id given
@@ -4375,13 +4378,15 @@ Leader: All party members are warped to the leader's position. The
If you specify a from_mapname, warpparty() will only affect those on
that map.
+You can exclude Party leader from warping, by keeping include_leader option as false.
+
Example:
mes("[Party Warper]");
mes("Here you go!");
close2();
.@id = getcharid(CHAR_ID_PARTY);
- warpparty("prontera", 150, 100, .@id);
+ warpparty("prontera", 150, 100, .@id, true);
close();
---------------------------------------
@@ -7760,6 +7765,68 @@ scripts-atcommands this way.
---------------------------------------
+*can_use_command("<command>"{, <account id>})
+
+Checks if the attached or specified player can use the specified
+atcommand and returns true or false accordingly.
+
+---------------------------------------
+
+*has_permission(<permission>{, <account id>})
+*has_permission("<permission>"{, <account id>})
+
+Check if the attached or specified player has the specified permission
+and returns true or false accordingly. See doc/permissions.txt for
+details about permissions.
+
+Valid <permission> are:
+
+ PERM_TRADE
+ PERM_PARTY
+ PERM_ALL_SKILL
+ PERM_USE_ALL_EQUIPMENT
+ PERM_SKILL_UNCONDITIONAL
+ PERM_JOIN_ALL_CHAT
+ PERM_NO_CHAT_KICK
+ PERM_HIDE_SESSION
+ PERM_WHO_DISPLAY_AID
+ PERM_RECEIVE_HACK_INFO
+ PERM_WARP_ANYWHERE
+ PERM_VIEW_HPMETER
+ PERM_VIEW_EQUIPMENT
+ PERM_USE_CHECK
+ PERM_USE_CHANGEMAPTYPE
+ PERM_USE_ALL_COMMANDS
+ PERM_RECEIVE_REQUESTS
+ PERM_SHOW_BOSS
+ PERM_DISABLE_PVM
+ PERM_DISABLE_PVP
+ PERM_DISABLE_CMD_DEAD
+ PERM_HCHSYS_ADMIN
+ PERM_TRADE_BOUND
+ PERM_DISABLE_PICK_UP
+ PERM_DISABLE_STORE
+ PERM_DISABLE_EXP
+ PERM_DISABLE_SKILL_USAGE
+
+Example:
+
+ if (has_permission(PERM_WARP_ANYWHERE)) {
+ //do something
+ }
+
+It is also possible to pass a string for plugin permissions:
+
+ if (has_permission("show_version")) {
+ //do something
+ }
+
+** Passing a string is slower than passing a constant because
+ the engine has to loop through the array to find the permission.
+ In most cases you should use the PERM_ constants.
+
+---------------------------------------
+
*unitskilluseid(<GID>, <skill id>, <skill lvl>{, <target id>})
*unitskilluseid(<GID>, "<skill name>", <skill lvl>{, <target id>})
*unitskillusepos(<GID>, <skill id>, <skill lvl>, <x>, <y>)
@@ -9477,3 +9544,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.