summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-23 21:28:53 +0300
committerAndrei Karas <akaras@inbox.ru>2019-01-23 21:28:53 +0300
commitf148504b84fde556bec8c181a99c8cd15130f23c (patch)
tree37890fdf61996a394de9a852ad798ef90a17a9d5
parente36bb4f1b3f70eb3f68ee725256fe37db4dce28a (diff)
downloaddocs-f148504b84fde556bec8c181a99c8cd15130f23c.tar.gz
docs-f148504b84fde556bec8c181a99c8cd15130f23c.tar.bz2
docs-f148504b84fde556bec8c181a99c8cd15130f23c.tar.xz
docs-f148504b84fde556bec8c181a99c8cd15130f23c.zip
Update from hercules.s20190211
-rw-r--r--server/scripts/constants.md37
-rw-r--r--server/scripts/script_commands.txt100
2 files changed, 130 insertions, 7 deletions
diff --git a/server/scripts/constants.md b/server/scripts/constants.md
index 276881a..8b3acbf 100644
--- a/server/scripts/constants.md
+++ b/server/scripts/constants.md
@@ -3650,13 +3650,6 @@
- `IOT_PARTY`: 2
- `IOT_GUILD`: 3
-### tradertype
-
-- `NST_ZENY`: 0
-- `NST_CASH`: 1
-- `NST_MARKET`: 2
-- `NST_CUSTOM`: 3
-
### strcharinfo
- `PC_NAME`: 0
@@ -3969,6 +3962,10 @@
- `ACH_ACHIEVE`: 44
- `ACH_ACHIEVEMENT_RANK`: 45
+### inventory expansion
+
+- `INVENTORY_INCREASE_STEP`: 10
+
## Hardcoded Constants (source)
@@ -3986,6 +3983,7 @@
- `MAX_GUILD_STORAGE`: 600
- `MAX_CART`: 100
- `MAX_INVENTORY`: 100
+- `FIXED_INVENTORY_SIZE`: 100
- `MAX_ZENY`: 2147483647
- `MAX_BANK_ZENY`: 2147483647
- `MAX_BG_MEMBERS`: 30
@@ -4393,6 +4391,30 @@
- `ITR_NOAUCTION`: 256
- `ITR_ALL`: 511
+### inventory expand ack responds
+
+- `EXPAND_INV_ASK_CONFIRMATION`: 0
+- `EXPAND_INV_FAILED`: 1
+- `EXPAND_INV_OTHER_WORK`: 2
+- `EXPAND_INV_MISSING_ITEM`: 3
+- `EXPAND_INV_MAX_SIZE`: 4
+
+### inventory expand final responds
+
+- `EXPAND_INV_RESULT_SUCCESS`: 0
+- `EXPAND_INV_RESULT_FAILED`: 1
+- `EXPAND_INV_RESULT_OTHER_WORK`: 2
+- `EXPAND_INV_RESULT_MISSING_ITEM`: 3
+- `EXPAND_INV_RESULT_MAX_SIZE`: 4
+
+### trader type
+
+- `NST_ZENY`: 0
+- `NST_CASH`: 1
+- `NST_MARKET`: 2
+- `NST_CUSTOM`: 3
+- `NST_BARTER`: 4
+
### Renewal
- `RENEWAL`: 1
@@ -18344,6 +18366,7 @@
- `Unsealing_Token`: 25735
- `GH_Cursed_Crystal`: 25739
- `GH_Cursed_Gemstone`: 25740
+- `Inventory_Extension_Coupon`: 25793
- `Spectral_Spear_IL`: 26007
- `Rebeginer_LG_Lance`: 26015
- `Paradise_Foxtail_Staff_III`: 26101
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index 90d4d77..26a4fbf 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -323,10 +323,12 @@ The types that a trader object can have are the following:
- NST_MARKET (2) Normal NPC Market Shop (where items have limited availability
and need to be refurbished)
- NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample)
+- NST_BARTER (4) Barter Shop (each item with own item currency)
Unless otherwise specified via *tradertype an trader object will be defined as
NST_ZENY.
Note: NST_MARKET is only available with PACKETVER 20131223 or newer.
+Note: NST_BARTER is only available with PACKETVER 20181226 zero or newer.
See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for
more information regarding how to use this NPC type.
@@ -6048,6 +6050,22 @@ Amount can be negative. See statusup().
---------------------------------------
+*needed_status_point(<type>, <val>, {<char_id>});
+
+Returns the number of stat points needed to change the specified stat <type> by <val>.
+If <val> is negative, returns the number of stat points that would be needed to
+raise the specified stat from (current value - <val>) to current value.
+
+List of <type>:
+bStr - Strength
+bVit - Vitality
+bInt - Intelligence
+bAgi - Agility
+bDex - Dexterity
+bLuk - Luck
+
+---------------------------------------
+
*bonus(<bonus type>, <val1>)
*bonus2(<bonus type>, <val1>, <val2>)
*bonus3(<bonus type>, <val1>, <val2>, <val3>)
@@ -9935,6 +9953,7 @@ when the optional NPC_Name param is used.
---------------------------------------
*sellitem(<Item_ID>{, <price>{, <qty>}})
+*sellitem(<Item_ID>, <qty>, <currency_id>, <currency_amount>)
adds (or modifies) <Item_ID> data to the shop,
when <price> is not provided (or when it is -1) itemdb default is used.
@@ -9943,11 +9962,15 @@ qty is only necessary for NST_MARKET trader types.
when <Item_ID> is already in the shop,
the previous data (price/qty), is overwritten with the new.
+currency_id and currency_amount can be used only with shop type NST_BARTER
+
---------------------------------------
*stopselling(<Item_ID>)
+*stopselling(<Item_ID>{, <currency_id>, <currency_amount>})
attempts to remove <Item_ID> from the current shop list.
+currency_id and currency_amount can be used only with shop type NST_BARTER
---------------------------------------
@@ -10237,3 +10260,80 @@ Update already opened preview window with item from
Works for 20181017 RE and main clients or newer.
---------------------------------------
+
+*enchantitem(<equip_pos>, <card_slot>, <card_id>);
+
+Insert card into equipped item in EQI_* slot.
+card_slot - can be 0 to 3.
+card_id - any card item id.
+
+returns true if all parameters correct
+false in other case.
+Works for 20160831 main, 20151118 RE, any zero version
+
+---------------------------------------
+
+*servicemessage("<message>", <color>{, <account_id>})
+*servicemessage("<message>", <color>{, <player_name>})
+
+That command will send a service message to the chat window of the character
+specified by account ID or name, or to connected to npc player.
+It will not be seen by anyone else.
+
+Works for 20170830 RE and main and for any zero clients
+
+---------------------------------------
+
+*expandInventoryAck(<result>{, <itemId>})
+
+Send initial inventory expansion result.
+Normally this function should be called from script label
+inventory_expansion::OnInventoryExpandRequest.
+
+Valid result statuses:
+ EXPAND_INVENTORY_ASK_CONFIRMATION - force client to ask player about inventory expansion
+ EXPAND_INVENTORY_FAILED - other failed reason
+ EXPAND_INVENTORY_OTHER_WORK - failed because player busy with other work
+ EXPAND_INVENTORY_MISSING_ITEM - failed because missing item
+ EXPAND_INVENTORY_MAX_SIZE - failed because inventory size already maximum
+
+ItemId make sense only if result is EXPAND_INVENTORY_ASK_CONFIRMATION
+Works for 20181212 zero clients
+
+---------------------------------------
+
+*expandInventoryResult(<result>)
+
+Send final inventory expansion result.
+Normally this function should be called from script label
+inventory_expansion::OnInventoryExpandConfirmed.
+
+Valid result values:
+ EXPAND_INVENTORY_RESULT_SUCCESS - success message
+ EXPAND_INVENTORY_RESULT_FAILED - other failed reason
+ EXPAND_INVENTORY_RESULT_OTHER_WORK - failed because player busy with other work
+ EXPAND_INVENTORY_RESULT_MISSING_ITEM - failed because missing item
+ EXPAND_INVENTORY_RESULT_MAX_SIZE - failed because inventory size already maximum
+
+Works for 20181212 zero clients
+
+---------------------------------------
+
+*expandInventory(<value>)
+
+Adjust player inventory to given value.
+Maximum inventory size is MAX_INVENTORY.
+Minimum inventory size is FIXED_INVENTORY_SIZE.
+For supported clients it send inventory change packet. For old clients,
+this change is silent.
+Current max inventory size can be read by function getInventorySize().
+
+---------------------------------------
+
+*getInventorySize()
+
+Return current player max inventory size.
+This value always smaller or equal to MAX_INVENTORY.
+Size can be changed by group of functions expandInventory*
+
+---------------------------------------