diff options
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 94 |
1 files changed, 68 insertions, 26 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 8308f4771..3b77aeb2c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3277,6 +3277,7 @@ Example: --------------------------------------- *getiteminfo(<item ID>, <type>) +*getiteminfo("<item name>", <type>) *setiteminfo(<item ID>, <type>, <value>) This function will look up the item with the specified ID number in the @@ -3285,6 +3286,9 @@ It will return -1 if there is no such item. Valid types are: + ITEMINFO_ID - Item ID (getiteminfo() only!) + ITEMINFO_AEGISNAME - Unique name to reference the item (getiteminfo() only!) + ITEMINFO_NAME - Display name (getiteminfo() only!) ITEMINFO_BUYPRICE - Buy Price ITEMINFO_SELLPRICE - Sell Price ITEMINFO_TYPE - Item Type @@ -5273,11 +5277,11 @@ bound to the target character as specified by the bound type. All items created in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in some cases cannot be traded or stored. -Valid bound types are: - 1 - Account Bound - 2 - Guild Bound - 3 - Party Bound - 4 - Character Bound +Valid item bound types are: + 1 - IBT_ACCOUNT - Account Bound + 2 - IBT_GUILD - Guild Bound + 3 - IBT_PARTY - Party Bound + 4 - IBT_CHARACTER - Character Bound --------------------------------------- @@ -5318,12 +5322,12 @@ If a bound type is not specified or a bound type of 0 is used, it will search th of any type, so long as the other parameters match. In all cases, this command will return the bound type of the item found, or 0 if the specified item was not found. -Valid bound types are: - 0 - All Bound types. - 1 - Account Bound - 2 - Guild Bound - 3 - Party Bound - 4 - Character Bound +Valid item bound types are: + 0 - IBT_ANY - Any Bound + 1 - IBT_ACCOUNT - Account Bound + 2 - IBT_GUILD - Guild Bound + 3 - IBT_PARTY - Party Bound + 4 - IBT_CHARACTER - Character Bound Optional Parameters: bound_type - checks to see if the item has the specified bound type. @@ -5341,7 +5345,7 @@ Example: close(); // This will also check if you have a bound (any type) 1205 (Cutter). - if (checkbound(Cutter, 0)) { + if (checkbound(Cutter, IBT_ANY)) { mes("You have a bound Cutter"); } else { mes("You do not have a bound Cutter"); @@ -5356,8 +5360,8 @@ Example: } close(); - // This will check if the item found, has a bound type of 2 (guild_bound) - if (checkbound(Cutter) == 2) { + // This will check if the item found, has a bound type of IBT_GUILD + if (checkbound(Cutter) == IBT_GUILD) { mes("You have a guild_bound Cutter"); } else { mes("You do not have a guild_bound Cutter."); @@ -5365,7 +5369,7 @@ Example: close(); // This will check if you have a 'guild_bound' +7 1205 (Cutter). - if (checkbound(Cutter, 2, 7)) { + if (checkbound(Cutter, IBT_GUILD, 7)) { mes("You have a +7 guild_bound Cutter."); } else { mes("You don't have the required item."); @@ -5659,18 +5663,20 @@ usable items. It will not work properly if there is a visible dialog window or menu. If the skill is self or auto-targeting, it will be used immediately. Otherwise, a target cursor is shown. -Optional value <flag> is a bitmask to manipulate how the skill is casted. +By default, all skill requirements are ignored. +Optional argument <flag> is a bitmask to manipulate how the skill is cast. Since <flag> is a bitmask, the flags can be summed up. Possible flags are: - - 0x00 - ISF_NONE - Skill is casted as if has been used from skill tree. + - 0x00 - ISF_NONE - Skill is cast as if it has been used from skill tree. (Same like <flag> was omitted.) - - 0x01 - ISF_IGNORECONDITIONS - Skill requirements are ignored and not consumed - - 0x02 - ISF_INSTANTCAST - Skill is casted instantaneously. - - 0x04 - ISF_CASTONSELF - Skill is forcefully casted on invoking character, + - 0x01 - ISF_CHECKCONDITIONS - Skill requirements are checked and consumed. + (SP are never checked/consumed.) + - 0x02 - ISF_INSTANTCAST - Skill is cast instantaneously. + - 0x04 - ISF_CASTONSELF - Skill is forcefully cast on invoking character, without showing the target selection cursor. Important: Items which use itemskill() should be of type IT_USABLE. - If the item type is IT_DELAYCONSUME and ISF_IGNORECONDITIONS is set, + If the item type is IT_DELAYCONSUME and ISF_CHECKCONDITIONS isn't set, the item won't be consumed when using the item! // When Anodyne is used, it will cast Endure, Level 1, as if the actual skill @@ -5678,8 +5684,8 @@ Important: Items which use itemskill() should be of type IT_USABLE. itemskill(SM_ENDURE, 1); // Instantaneously cast Level 10 Increase Agility on invoking character, -// without checking/consuming skill requirements. - itemskill(AL_INCAGI, 10, ISF_IGNORECONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF); +// with checking/consuming skill requirements (15 HP). + itemskill(AL_INCAGI, 10, ISF_CHECKCONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF); // Instaed of using the constants, one could also do it like this: itemskill(AL_INCAGI, 10, 7); @@ -6569,17 +6575,22 @@ Examples: --------------------------------------- -*setpcblock(<type>,<option>) -*checkpcblock() +*setpcblock(<type>, <option>{, <account id>}) +*checkpcblock({<account id>}) -Prevents the player from doing the following action. +Prevents a character from doing the following action. For setpcblock, when the <option> is true(1) will block them, and false(0) will allow those actions again. +The setpcblock command returns 1 on success or 0 if no character was attached. + The checkpcblock command returned value is a bit mask of the currently enabled block flags (or PCBLOCK_NONE when none is set). +Parameter <account id> is optional for both commands. +If omitted, the currently attached character is used. + The <type> listed are a bit mask of the following: PCBLOCK_NONE (only used by checkpcblock) PCBLOCK_MOVE @@ -6987,6 +6998,37 @@ Examples: --------------------------------------- +*unitiswalking({<GID>}) + +This command checks, if a unit is walking or not. +If <GID> is omitted, the currently attached character is used. +Returns 1 if the unit is walking, 0 if the unit is not walking and -1 on error. + +Note: There's no differentiation between script and client initiated walking. + +Example: + +prontera,155,185,5 script Check Walking 1_F_MARIA,{ + mes("Enter character name."); + mes(""); + input(.@name$); + .@GID = getcharid(CHAR_ID_ACCOUNT, .@name$); + if (.@GID != 0) { + .@iswalking = unitiswalking(.@GID); + if (.@iswalking == 1) + mesf("%s is walking.", .@name$); + else if (.@iswalking == 0) + mesf("%s is not walking.", .@name$); + else + mesf("Can't get %s's walking state.", .@name$); + } else { + mesf("%s not found!", .@name$); + } + close(); +} + +--------------------------------------- + *unitkill(<GID>) *unitwarp(<GID>, <Mapname>, <x>, <y>) *unitattack(<GID>, <Target ID>) |