diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 0158ace462..71d22d8613 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -378,7 +378,7 @@ Another way would be to right click on a mob, NPC or char as GM sprited char to view the GID. This is mostly used for the new version of skill and the mob control commands -implemented (but NEVER documented by Lance. Shame on you...). +implemented. Item and pet scripts -------------------- @@ -935,7 +935,8 @@ chosen once the triggering character leaves the area. OnTouchNPC: -Similar to OnTouch, but will only trigger for monsters. +Similar to OnTouch, but will only trigger for monsters. For this case, by using +'getattachedrid' will returns GID (ID that returned when use 'monster'). OnPCLoginEvent: OnPCLogoutEvent: @@ -1205,8 +1206,8 @@ of 'end' stops this, and ends the script. --------------------------------------- -*set ,; -*set(,) +*set ,{,}; +*set(,{,}) This command will set a variable to the value that the expression results in. Variables may either be set through this command or directly, much like any @@ -1228,7 +1229,7 @@ Returns the variable reference (since trunk r12870). --------------------------------------- -*setd "",; +*setd "",{,}; Works almost identically as set, except the variable name is identified as a string and can thus be constructed dynamically. @@ -1244,6 +1245,9 @@ Examples: setd ".@" + .@var$ + "123$", "Poporing is cool"; mes .@Poporing123$; // Displays "Poporing is cool". +NOTE: + 'char_id' only works for non-server variables. + --------------------------------------- *getd("") @@ -2231,7 +2235,7 @@ array, shifting all the elements beyond this towards the beginning. ====================================== --------------------------------------- -*strcharinfo() +*strcharinfo({,}) This function will return either the name, party name or guild name for the invoking character. Whatever it returns is determined by type. @@ -2371,9 +2375,9 @@ If an invalid type is given or the NPC does not exist, 0 is returned. --------------------------------------- -*getchildid() -*getmotherid() -*getfatherid() +*getchildid({}) +*getmotherid({}) +*getfatherid({}) These functions return the character ID of the attached player's child, mother, mother, or father, respectively. It returns 0 if no ID is found. @@ -2382,14 +2386,14 @@ mother, mother, or father, respectively. It returns 0 if no ID is found. --------------------------------------- -*ispartneron() +*ispartneron({}) This function returns 1 if the invoking character's marriage partner is currently online and 0 if they are not or if the character has no partner. --------------------------------------- -*getpartnerid() +*getpartnerid({}) This function returns the character ID of the invoking character's marriage partner, if any. If the invoking character is not married, it will return 0, @@ -2400,7 +2404,7 @@ which is a quick way to see if they are married: --------------------------------------- -*getlook() +*getlook({,}) This function will return the number for the current character look value specified by type. See 'setlook' for valid look types. @@ -2410,7 +2414,7 @@ dressed in black. :) --------------------------------------- -*getsavepoint() +*getsavepoint({,}) This function will return information about the invoking character's save point. You can use it to let a character swap between several recorded save points. @@ -2481,7 +2485,7 @@ Counts the spirit ball that player has. \\ --------------------------------------- -*getequipid() +*getequipid({,}) This function returns the item ID of the item equipped in the equipment slot specified on the invoking character. If nothing is equipped there, it returns -1. @@ -2543,7 +2547,7 @@ armor, but also don't want them to equip if after the check, you would do this: --------------------------------------- -*getequipuniqueid() +*getequipuniqueid({,}) This function returns the unique ID (as a string) of the item equipped in the equipment slot specified on the invoking character. If nothing is equipped there, it returns an empty string. @@ -2551,7 +2555,7 @@ See 'getequipid' for a full list of valid equipment slots. --------------------------------------- -*getequipname() +*getequipname({,}) Returns the jname of the item equipped in the specified equipment slot on the invoking character, or an empty string if nothing is equipped in that position. @@ -2574,7 +2578,7 @@ the players would normally see on screen.) --------------------------------------- -*getbrokenid() +*getbrokenid({,}) This function will search the invoking character's inventory for any broken items, and will return their item ID numbers. Since the character may have @@ -2590,7 +2594,7 @@ will return the second one, etc. Will return 0 if no such item is found. --------------------------------------- -*getequipisequiped() +*getequipisequiped({,}) This functions will return 1 if there is an equipment placed on the specified equipment slot and 0 otherwise. For a list of equipment slots @@ -2607,7 +2611,7 @@ see 'getequipid'. Function originally used by the refining NPCs: --------------------------------------- -*getequipisenableref() +*getequipisenableref({,}) Will return 1 if the item equipped on the invoking character in the specified equipment slot is refinable, and 0 if it isn't. For a list of equipment slots @@ -2624,7 +2628,7 @@ see 'getequipid'. --------------------------------------- -*getequiprefinerycnt() +*getequiprefinerycnt({,}) Returns the current number of pluses for the item in the specified equipment slot. For a list of equipment slots see 'getequipid'. @@ -2640,7 +2644,7 @@ this is +10: --------------------------------------- -*getequipweaponlv() +*getequipweaponlv({,}) This function returns the weapon level for the weapon equipped in the specified equipment slot on the invoking character. For a list of equipment slots see @@ -2681,7 +2685,7 @@ Examples: --------------------------------------- -*getequippercentrefinery() +*getequippercentrefinery({,}) This function calculates and returns the percent value chance to successfully refine the item found in the specified equipment slot of the invoking character @@ -2721,7 +2725,7 @@ of possible equipment slots. --------------------------------------- -*getinventorylist; +*getinventorylist {}; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to @@ -2847,8 +2851,8 @@ It's useful for when you want to check whether an item contains cards or if it's --------------------------------------- -*mergeitem({}); -*mergeitem({""}); +*mergeitem({{,}}); +*mergeitem({""{,}}); Merge all stackable items that separated by GUID flags (either by flag 4 item_flag.txt or GUID in item_group). @@ -2919,7 +2923,7 @@ map ID doesn't exist. --------------------------------------- -*getgmlevel() +*getgmlevel({}) This function will return the (GM) level associated with the player group to which the invoking character belongs. If this is somehow executed from a console command, @@ -2932,7 +2936,7 @@ specially when talked to by GMs. --------------------------------------- -*getgroupid() +*getgroupid({}) This function will return the group id to which the invoking player belongs. @@ -3214,7 +3218,7 @@ Example 2: --------------------------------------- -*getskilllist; +*getskilllist({}); This command sets a bunch of arrays with a complete list of skills the invoking character has. Here's what you get: @@ -3319,7 +3323,7 @@ Example: --------------------------------------- -*skillpointcount() +*skillpointcount({}) Returns the total amount of skill points a character possesses (SkillPoint+SP's used in skills) This command can be used to check the currently attached characters total amount of skill points. @@ -3366,6 +3370,12 @@ account ID. --------------------------------------- +*getattachedrid(); + +Returns RID from running script. Script may does not have RID. + +--------------------------------------- + *isloggedin({,}) This function returns 1 if the specified account is logged in and 0 if they @@ -3423,10 +3433,10 @@ things might in some cases be required. --------------------------------------- -*checkoption(