diff options
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 55 |
1 files changed, 48 insertions, 7 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 64468ed49..219c71205 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(). --------------------------------------- @@ -3239,6 +3244,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 @@ -8598,6 +8604,18 @@ Example: --------------------------------------- +*data_to_string(<data>) + +Returns a string representation of the given data, similar to the .toString() +method in JavaScript. + +Example: + + data_to_string(DATATYPE_VAR) // "DATATYPE_VAR" + data_to_string(.@foo) // ".@foo" + +--------------------------------------- + *charisalpha("<string>", <position>) This function will return true if the character number Position in the given @@ -9429,6 +9447,7 @@ supported types: values QINFO_HOMUN_LEVEL: min QINFO_HOMUN_TYPE: homunculus_type (0 - regular, 1 - evolved, 2 - S) QINFO_QUEST: quest_id, state // append to the quests list on each use + QINFO_MERCENARY_CLASS: mercenary_class --------------------------------------- @@ -10199,3 +10218,25 @@ camera. Works for 20160525 clients or newer. --------------------------------------- + +*achievement_progress(<ach_id>, <obj_idx>, <progress>, <incremental>{, <account_id>}); + +Make the player progress in the specified achievement. +aid - achievement ID +obj_idx - achievement objective index. +progress - objective progress towards goal. +incremental - (boolean) true to add the progress towards the goal, + false to use the progress only as a comparand. +account_id - (optional) AID to perform on (default to attached player). + +returns progress on success and false on failure + +--------------------------------------- + +*itempreview(<index>) + +Update already opened preview window with item from + inventory with given index. +Works for 20181017 RE and main clients or newer. + +--------------------------------------- |