summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/constants.md15
-rw-r--r--doc/sample/getiteminfo.txt9
-rw-r--r--doc/script_commands.txt1
3 files changed, 22 insertions, 3 deletions
diff --git a/doc/constants.md b/doc/constants.md
index 451f2a5fe..1074eb6bc 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -4278,6 +4278,7 @@
- `ITEMINFO_VIEWID`: 14
- `ITEMINFO_MATK`: 15
- `ITEMINFO_VIEWSPRITE`: 16
+- `ITEMINFO_TRADE`: 17
### monster skill states
@@ -4375,6 +4376,20 @@
- `FUNCTION_IS_LOCAL`: 3
- `FUNCTION_IS_LABEL`: 4
+### item trade restrictions
+
+- `ITR_NONE`: 0
+- `ITR_NODROP`: 1
+- `ITR_NOTRADE`: 2
+- `ITR_PARTNEROVERRIDE`: 4
+- `ITR_NOSELLTONPC`: 8
+- `ITR_NOCART`: 16
+- `ITR_NOSTORAGE`: 32
+- `ITR_NOGSTORAGE`: 64
+- `ITR_NOMAIL`: 128
+- `ITR_NOAUCTION`: 256
+- `ITR_ALL`: 511
+
### Renewal
- `RENEWAL`: 1
diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt
index 57407c072..9d5121635 100644
--- a/doc/sample/getiteminfo.txt
+++ b/doc/sample/getiteminfo.txt
@@ -9,12 +9,12 @@
//============================================================
prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{
- mes "Please enter an item ID.";
- input .@value;
+ mes("Please enter an item ID.");
+ input(.@value);
// This line uses an INTERNAL function of your client to show item name by its ID!
// ^nItemID^XXXX -> Item Name
- mes "Item ID: "+.@value+" ^nItemID^"+.@value;
+ mesf("Item ID: %d ^nItemID^%d", .@value, .@value);
mes("Current item info:");
mesf("Buy Price: %d", getiteminfo(.@value, ITEMINFO_BUYPRICE));
@@ -34,5 +34,8 @@ prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{
mesf("View ID: %d", getiteminfo(.@value, ITEMINFO_VIEWID));
mesf("MATK: %d", getiteminfo(.@value, ITEMINFO_MATK));
mesf("View Sprite: %d", getiteminfo(.@value, ITEMINFO_VIEWSPRITE));
+
+ .@trade$ = callfunc("F_GetTradeRestriction", .@value);
+ mesf("Trade Restriction: %s", .@trade$);
close;
}
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 64468ed49..5cba5afc8 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3239,6 +3239,7 @@ Valid types are:
ITEMINFO_VIEWID - View ID ("Sprite" field in the Item DB)
ITEMINFO_MATK - MATK (only relevant if RENEWAL is set)
ITEMINFO_VIEWSPRITE - View Sprite ("ViewSprite" field in the Item DB)
+ ITEMINFO_TRADE - Trade Restriction (see "doc/constant.md": item trade restriction)
Check sample in doc/sample/getiteminfo.txt