summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-15 23:57:23 +0000
committerGitHub <noreply@github.com>2019-01-15 23:57:23 +0000
commit85690028a05b76c3423ff5777fd545d7af04cf6d (patch)
tree77c994f19cbd2d1a887e0a711df580048b52d16f /doc
parent21edafad0f74e85c408336274dd1e59db2fe3880 (diff)
parent828cbdc9e761499ba1336a2bb68267a161053d19 (diff)
downloadhercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.gz
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.bz2
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.tar.xz
hercules-85690028a05b76c3423ff5777fd545d7af04cf6d.zip
Merge pull request #2339 from 4144/updatepackets
Update packet up to 2019-01-09
Diffstat (limited to 'doc')
-rw-r--r--doc/sample/npc_trader_sample.txt8
-rw-r--r--doc/script_commands.txt7
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt
index 0d50af8c5..24c53330b 100644
--- a/doc/sample/npc_trader_sample.txt
+++ b/doc/sample/npc_trader_sample.txt
@@ -56,3 +56,11 @@ OnMyResupply:
sellitem Red_Potion,-1,49;
end;
}
+/* demonstrate barter shop */
+prontera,159,284,4 trader Barter Shop#prt 4_M_KID1,{
+OnInit:
+ tradertype(NST_BARTER);
+ sellitem White_Herb, 100, Red_Potion, 2;
+ sellitem Blue_Herb, 200, Orange_Potion, 3;
+ end;
+}
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 57d47b1b5..26a4fbfb8 100644
--- a/doc/script_commands.txt
+++ b/doc/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.
@@ -9951,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.
@@ -9959,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
---------------------------------------