diff options
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r-- | doc/script_commands.txt | 125 |
1 files changed, 103 insertions, 22 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index c1b318beb..cb0314ac5 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -324,11 +324,13 @@ The types that a trader object can have are the following: and need to be refurbished) - NST_CUSTOM (3) Custom Shop (any currency, item/var/etca, check sample) - NST_BARTER (4) Barter Shop (each item with own item currency) +- NST_EXPANDED_BARTER (5) Expanded Barter Shop (buy items and spend zeny and items) Unless otherwise specified via *tradertype an trader object will be defined as NST_ZENY. Note: NST_MARKET is only available with PACKETVER 20131223 or newer. -Note: NST_BARTER is only available with PACKETVER 20181226 zero or newer. +Note: NST_BARTER is only available with PACKETVER 20190116 main or 20190116 RE or 20181226 zero or newer. +Note: NST_EXPANDED_BARTER is only available with PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. See '12 - NPC Trader-Related Commands' and /doc/sample/npc_trader_sample.txt for more information regarding how to use this NPC type. @@ -1032,6 +1034,11 @@ will only execute once and will not execute if the map server reconnects to the char server later. Note that all those events will be executed upon scripts reloading. +OnNPCUnload: + +OnNPCUnload will be executed when a NPC is unloaded. +OnNPCUnload is called when @reloadscript, @reloadnpc, @unloadnpc or @unloadnpcfile is used. + OnAgitStart: OnAgitEnd: OnAgitInit: @@ -4378,7 +4385,7 @@ falcon and false if they don't. --------------------------------------- -*setmount({<flag>}) +*setmount({<flag>{, <type>}}) *checkmount() If <flag> is MOUNT_NONE this command will remove the mount from the @@ -4414,6 +4421,12 @@ The following flag values are accepted: Unlike 'setfalcon' and 'setcart' this will not work at all if they aren't of a class which can ride a mount. +For clients PACKETVER_MAIN_NUM >= 20191120 || PACKETVER_RE_NUM >= 20191106 +you can pass a <type> flag which specifies the madogear wanted. +The Available types: + MADO_ROBOT + MADO_SUITE + The accompanying function will return MOUNT_NONE if the invoking character is not on a mount, and a non-zero value (according to the above constants) if they are. @@ -5260,11 +5273,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 --------------------------------------- @@ -5305,12 +5318,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. @@ -5328,7 +5341,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"); @@ -5343,8 +5356,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."); @@ -5352,7 +5365,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."); @@ -5638,21 +5651,38 @@ set with 'disable_items'. --------------------------------------- -*itemskill(<skill id>, <skill level>, {flag}) -*itemskill("<skill name>", <skill level>, {flag}) +*itemskill(<skill id>, <skill level>{, <flag>}) +*itemskill("<skill name>", <skill level>{, <flag>}) This command meant for item scripts to replicate single-use skills in 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. -Flag is a optional param and, when present, the command will not check for -skill requirements. +Optional value <flag> is a bitmask to manipulate how the skill is casted. +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. + (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, + 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, + 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 // has been used from skill tree. 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); +// Instaed of using the constants, one could also do it like this: + itemskill(AL_INCAGI, 10, 7); + --------------------------------------- *itemeffect(<item id>) @@ -7070,6 +7100,18 @@ NPCs talking while hidden then revealing... you can wonder around =P). --------------------------------------- +*cloakonnpc("<NPC object name>"{, <account_id>}) +*cloakoffnpc("<NPC object name>"{, <account_id>}) + +These commands are used to apply the cloaking effect on npcs +this is a visual effect only and it does NOT stop the player +from interacting with the npc. + +If an account_id is specified then the effect will only display to the given id, +otherwise it's displayed to the entire npc area. + +--------------------------------------- + *doevent("<NPC object name>::<event label>") This command will start a new execution thread in a specified NPC object @@ -10321,6 +10363,7 @@ when the optional NPC_Name param is used. *sellitem(<Item_ID>{, <price>{, <qty>}}) *sellitem(<Item_ID>, <qty>, <currency_id>, <currency_amount>) +*sellitem(<Item_ID>, <zeny>, <qty>{, <currency_id1>, <currency_amount1>{, <currency_refine1>}{, ...}}) adds (or modifies) <Item_ID> data to the shop, when <price> is not provided (or when it is -1) itemdb default is used. @@ -10329,7 +10372,37 @@ qty is only necessary for NST_MARKET trader types. when <Item_ID> is already in the shop, the previous data (price/qty), is overwritten with the new. -currency_id and currency_amount can be used only with shop type NST_BARTER +currency_id and currency_amount can be used only with shop type NST_BARTER. +zeny, currency_id1, currency_amount1, currency_refine1, can be used only with +shop type NST_EXPANDED_BARTER. + +--------------------------------------- + +*startsellitem(<Item_ID>, <zeny>, <qty>) + +Starts adding item into expanded barter shop (NST_EXPANDED_BARTER). +Before this command possible to use commands *sellitemcurrency. +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. + +Alternative way for add item to expanded barter shop is *sellitem with +currency parameters. + +--------------------------------------- + +*sellitemcurrency(<Item_ID>, <qty>{, <refine>}) + +adds <Item_ID> as currency into expanded barter shop (NST_EXPANDED_BARTER) +If <refine> set to -1, mean for any refine level. +if <refine> missing used value -1. + +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. + +--------------------------------------- + +*endsellitem() + +Complete adding item into expanded barter shop (NST_EXPANDED_BARTER). +Need PACKETVER 20190904 main or 20190904 RE or 20190828 zero or newer. --------------------------------------- @@ -10620,6 +10693,14 @@ returns progress on success and false on failure --------------------------------------- +*achievement_iscompleted(<ach_id>{, <account_id>}) + +Checks whether the attached player have completed all the given achievement objectives. + +returns true if yes and false if no. + +--------------------------------------- + *itempreview(<index>) Update already opened preview window with item from |