summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-22 14:49:34 +0200
committerGitHub <noreply@github.com>2018-10-22 14:49:34 +0200
commit239b7eb61eca00ff1ba24999daaa2b001afa736d (patch)
tree4fec54a9a9d5cdb4e99f943f46320b4ab7e60947 /doc/script_commands.txt
parent388359c86183bb779717b6324f6f19c1ee09b2c3 (diff)
parent5c59f230d982a2e0201956a6f9f853253b9f3c5f (diff)
downloadhercules-239b7eb61eca00ff1ba24999daaa2b001afa736d.tar.gz
hercules-239b7eb61eca00ff1ba24999daaa2b001afa736d.tar.bz2
hercules-239b7eb61eca00ff1ba24999daaa2b001afa736d.tar.xz
hercules-239b7eb61eca00ff1ba24999daaa2b001afa736d.zip
Merge pull request #2279 from Helianthella/prompt
deprecate buildin_prompt, bake it into buildin_select
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 4812a2cf2..33d1ee426 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -714,6 +714,8 @@ MAX_BANK_ZENY - Maximum Zeny in the bank
MAX_BG_MEMBERS - Maximum BattleGround members
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
Send targets and status options are also hard-coded and can be found
in 'doc/constants.md'.
@@ -1600,21 +1602,24 @@ perfectly equivalent.
---------------------------------------
*select("<option>"{, "<option>", ...})
-*prompt("<option>"{, "<option>", ...})
This function is a handy replacement for 'menu' that doesn't use a complex
-label structure. It will return the number of menu option picked,
-starting with 1. Like 'menu', it will also set the variable @menu to
-contain the option the user picked.
+label structure. It will return the number of the menu option picked,
+starting with 1. If the player presses cancel, the script is terminated.
- if (select("Yes:No") == 1)
+ if (select("Yes", "No") == 1)
mes("You said yes, I know.");
And like 'menu', the selected option is consistent with grouped options
and empty options.
-'prompt' works almost the same as select, except that when a character
-clicks the Cancel button, this function will return 255 instead.
+---------------------------------------
+
+*prompt("<option>"{, "<option>", ...})
+
+This function behaves exactly like select(), but when a player presses cancel
+it returns MAX_MENU_OPTIONS and the script is not terminated. You almost always
+want to use select() rather than prompt().
---------------------------------------