summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/constants.md17
-rw-r--r--doc/item_bonus.md6
-rw-r--r--doc/sample/npc_trader_sample.txt8
-rw-r--r--doc/script_commands.txt37
4 files changed, 56 insertions, 12 deletions
diff --git a/doc/constants.md b/doc/constants.md
index a67e476d7..69bb51ea4 100644
--- a/doc/constants.md
+++ b/doc/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
@@ -3998,6 +3991,8 @@
- `MAX_REFINE`: 20
- `MAX_MENU_OPTIONS`: 255
- `MAX_MENU_LENGTH`: 2048
+- `MOB_CLONE_START`: 4001
+- `MOB_CLONE_END`: 5000
### status options
@@ -4414,6 +4409,14 @@
- `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
diff --git a/doc/item_bonus.md b/doc/item_bonus.md
index b9fc17ee4..7c8547456 100644
--- a/doc/item_bonus.md
+++ b/doc/item_bonus.md
@@ -277,7 +277,7 @@ bonus3 bSubEle,`e`,`n`,`bf`; | +n% Damage reduction against element `e`.
bonus2 bAddDamageClass,`c`,`x`; | +n% extra physical damage against monsters of class `c`
bonus2 bAddMagicDamageClass,`c`,`x`; | +n% extra magical damage against monsters of class `c`
bonus2 bAddDefClass,`c`,`x`; | +n% physical damage reduction against monsters of class `c`
-bonus2 bAddMDefClass,`c`,`x`; | +n% magical damage reduction against monsters of class `c`
+bonus2 bAddMdefClass,`c`,`x`; | +n% magical damage reduction against monsters of class `c`
bonus2 bCriticalAddRace,`r`,`n`; | +`n` Critical Against race `r`
Attack/Def | Description
@@ -292,9 +292,9 @@ bonus4 bSetMDefRace,`r`,`n`,`t`,`y`; | Set MDEF to `y` of an enemy of race `r`
Ignore Def | Description
:-------------------------------- | :-------------------------
bonus bIgnoreDefRace,`r`; | Disregard DEF against enemies of race `r`
-bonus bIgnoreMDefRace,`r`; | Disregard MDEF against enemies of race `r`
+bonus bIgnoreMdefRace,`r`; | Disregard MDEF against enemies of race `r`
bonus bIgnoreDefEle,`e`; | Disregard DEF against enemies of element `e`
-bonus bIgnoreMDefEle,`e`; | Disregard MDEF against enemies of element `e`
+bonus bIgnoreMdefEle,`e`; | Disregard MDEF against enemies of element `e`
bonus2 bIgnoreDefRate,`r`,`n`; | Disregard `n`% of the target's DEF if the target belongs to race `r`
bonus2 bIgnoreMdefRate,`r`,`n`; | Disregard `n`% of the target's MDEF if the target belongs to race `r`
bonus bIgnoreMdefRate,`n`; | Disregard `n`% of the target's MDEF
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..55f5a9fe7 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.
@@ -716,6 +718,8 @@ MAX_CHAT_USERS - Maximum Chat users
MAX_REFINE - Maximum Refine level
MAX_MENU_OPTIONS - Maximum NPC menu options
MAX_MENU_LENGTH - Maximum NPC menu string length
+MOB_CLONE_START - Clone ID start from this range
+MOB_CLONE_END - Clone ID end with this range
Send targets and status options are also hard-coded and can be found
in 'doc/constants.md'.
@@ -5342,6 +5346,30 @@ Check getitem2() to understand the arguments of the function.
---------------------------------------
+*countnameditem(<item id>, "<character name>")
+*countnameditem(<item id>, <character ID>)
+*countnameditem("<item name>", "<character name>")
+*countnameditem("<item name>", <character ID>)
+
+This function will return the number of signed items for the specified item ID
+that the invoking character has in their inventory.
+
+ mes("[Item Checker]");
+ if (countnameditem(Apple) > 0) {
+ mes("You have an apple with your name on it!");
+ } else {
+ mes("You do not have an apple with your name on it.");
+ }
+ next();
+ mes("[Item Checker]");
+ mesf("You have %d apples with John's name on it!", countnameditem(Apple, "John"));
+ close();
+
+Like getnameditem(), this function will also accept an 'english name' from the
+database as an argument.
+
+---------------------------------------
+
*groupranditem(<item id>)
Returns the item_id of a random item picked from the item container specified. There
@@ -6306,7 +6334,7 @@ Examples:
setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL, true);
// Re-enables attack, skills and item use
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM, false);
// checkpcblock related checks
if ((checkpcblock() & PCBLOCK_IMMUNE) != 0)
@@ -9951,6 +9979,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 +9988,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
---------------------------------------
@@ -10128,7 +10161,7 @@ Applicable Data types (available as constants) -
UDT_LIFETIME: LifeTime (int) - for summons.
UDT_MERC_KILLCOUNT: Kill count for mercenaries (int).
-returns 0 if value could not be retrieved.
+returns -1 if value could not be retrieved.
---------------------------------------