summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-02-01 21:20:34 +0100
committerGitHub <noreply@github.com>2019-02-01 21:20:34 +0100
commit5182ecdd2649f43644a2e8767ad8f016e62bd8f7 (patch)
tree5fd912ba35ba8c887a17d84e261ca5d136166da6 /doc
parent034e47087595adabace0bf86771bbeba47de5713 (diff)
parent9d582035fc69ffd706077add90e9276550b49565 (diff)
downloadhercules-5182ecdd2649f43644a2e8767ad8f016e62bd8f7.tar.gz
hercules-5182ecdd2649f43644a2e8767ad8f016e62bd8f7.tar.bz2
hercules-5182ecdd2649f43644a2e8767ad8f016e62bd8f7.tar.xz
hercules-5182ecdd2649f43644a2e8767ad8f016e62bd8f7.zip
Merge pull request #2307 from kisuka/checknameditem
Added countnameditem script command.
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 26a4fbfb8..db851128f 100644
--- a/doc/script_commands.txt
+++ b/doc/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