From 7a9133ed8fa1c20063324ad8fe2517e6b6470cc4 Mon Sep 17 00:00:00 2001 From: GmOcean Date: Wed, 3 Dec 2014 18:59:29 -1000 Subject: Modified *checkbound & *equip2 commands in src/map/script.c Modified the corresponding documentation to match source code. --- doc/script_commands.txt | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 380fa72f4..b184444cd 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -4848,36 +4848,63 @@ Example: *checkbound({,{,{,{,{,{,{,}}}}}}}); This command allows you to check whether or not the attached player has the specified bound item in their inventory. +If a bound type is not specified or a bound type of 0 is used, it will search the player's inventory for a bound item +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 Optional Parameters: + bound_type - checks to see if the item has the specified bound type. refine - checks to see if the item is refined to the given number. - attribute - whether the item is broken (1) or not (0) + attribute - whether the item is broken (1) or not (0). card 1,2,3,4 - checks to see if the specified cards are compounded on the item as well. Example: // This will check if you have a bound (any type) 1205 (Cutter). if (checkbound(1205)) { mes "You have a bound Cutter"; - close; } else { mes "You do not have a bound Cutter"; - close; } + close; + + // This will also check if you have a bound (any type) 1205 (Cutter). + if (checkbound(1205,0)) { + mes "You have a bound Cutter"; + } else { + mes "You do not have a bound Cutter"; + } + close; + + // This will check if the player doesn't have a bound 1205 (Cutter). + if (!checkbound(1205)) { + mes "You do not have a bound Cutter"; + } else { + mes "You do have a bound Cutter"; + } + close; + + // This will check if the item found, has a bound type of 2 (guild_bound) + if (checkbound(1205) == 2) { + mes "You have a guild_bound Cutter"; + } else { + mes "You do not have a guild_bound Cutter."; + } + close; // This will check if you have a 'guild_bound' +7 1205 (Cutter). if (checkbound(1205, 2, 7)) { mes "You have a +7 guild_bound Cutter."; - close; } else { mes "You don't have the required item."; - close; } + close; --------------------------------------- *getnameditem ,; @@ -5279,7 +5306,7 @@ like storage or cart. --------------------------------------- *equip ; -*equip2 ,,,,,,{,}; +*equip2 ,,,,,,; *autoequip ,