summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-02-11 22:38:12 +0300
committerAndrei Karas <akaras@inbox.ru>2019-02-11 22:38:12 +0300
commit3d19b9e85c02ab36a7416a45660fb766cb6f8d4a (patch)
treeff60f8af9f971910fbd692f3513d2dbc566460b9
parentf148504b84fde556bec8c181a99c8cd15130f23c (diff)
downloaddocs-3d19b9e85c02ab36a7416a45660fb766cb6f8d4a.tar.gz
docs-3d19b9e85c02ab36a7416a45660fb766cb6f8d4a.tar.bz2
docs-3d19b9e85c02ab36a7416a45660fb766cb6f8d4a.tar.xz
docs-3d19b9e85c02ab36a7416a45660fb766cb6f8d4a.zip
Update script_commands.txt from hercules
-rw-r--r--server/scripts/script_commands.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/scripts/script_commands.txt b/server/scripts/script_commands.txt
index 26a4fbf..db85112 100644
--- a/server/scripts/script_commands.txt
+++ b/server/scripts/script_commands.txt
@@ -5344,6 +5344,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