summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt406
1 files changed, 244 insertions, 162 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index a08d8a71c..fa35b3a7c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2208,11 +2208,11 @@ Multiple statements can be grouped with { }, curly braces, just like with
the 'if' statement.
Example 1:
- while (switch(select("Yes", "No") == 2))
+ while (select("Yes", "No") == 2)
mes("You picked no.");
Example 2: multiple statements
- while (switch(select("Yes", "No") == 2 )) {
+ while (select("Yes", "No") == 2) {
mes("Why did you pick no?");
mes("You should pick yes instead!");
}
@@ -2999,18 +2999,20 @@ of equipment slots see getequipid().
---------------------------------------
-*getequiprefinerycnt(<equipment slot>)
+*getequiprefinerycnt(<equipment slot>{, <equipment slot>{, <equipment slot>}})
-Returns the current number of pluses for the item in the specified
-equipment slot. For a list of equipment slots see 'getequipid'.
+Returns the total of refine of item equipped in the equipment slots.
+For a list of equipment slots, see 'getequipid'.
-Can be used to check if you have reached a maximum refine value, default
-for this is +10:
-
- if (getequiprefinerycnt(EQI_HEAD_TOP) < 10)
- mes("I will now upgrade your "+getequipname(EQI_HEAD_TOP));
- else
- mes("Sorry, it's not possible to refine hats better than +10");
+For example:
+ if (getequiprefinerycnt(EQI_HEAD_TOP) > 10) {
+ mes("You equipped a headgear (top) with above 10 refine.");
+ }
+
+For example:
+ if (getequiprefinerycnt(EQI_ARMOR, EQI_SHOES) > 20) {
+ mes("Total refine of Armor and Shoes exceed 20.");
+ }
---------------------------------------
@@ -3207,6 +3209,30 @@ runs of getcartinventorylist().
---------------------------------------
+*setfavoriteitemidx(<idx>, <flag>)
+
+This function will set an item in inventory as favorite or not.
+If its favorite item, it will be moved to favorite tab, else move out from favorite tab.
+Note: Cant change favorite flag of an equipped item.
+
+Valid Parameters:
+ <idx> - inventory index, refer *getinventorylist()
+ <flag> - true/false (true = favorite item, false = otherwise)
+
+---------------------------------------
+
+*autofavoriteitem(<item_id>, <flag>)
+
+This function will auto set an item as favorite when <item_id> is obtained.
+If its favorite item, it will be auto moved to favorite tab, else move out from favorite tab.
+This setting affect not only attached player, but also everyone player globally.
+
+Valid Parameters:
+ <item_id> - item ID
+ <flag> - true/false (true = favorite item, false = otherwise)
+
+---------------------------------------
+
*cardscnt()
This function will return the number of cards inserted into the weapon
@@ -3252,26 +3278,49 @@ It will return -1 if there is no such item.
Valid types are:
- ITEMINFO_BUYPRICE - Buy Price
- ITEMINFO_SELLPRICE - Sell Price
- ITEMINFO_TYPE - Item Type
- ITEMINFO_MAXCHANCE - Max drop chance of this item e.g. 1 = 0.01% , etc..
- if = 0, then monsters don't drop it at all (rare or a quest item)
- if = 10000, then this item is sold in NPC shops only
- ITEMINFO_SEX - Sex
- ITEMINFO_LOC - Equip location
- ITEMINFO_WEIGHT - Weight (note: 1/10 of unit)
- ITEMINFO_ATK - Attack
- ITEMINFO_DEF - Defense
- ITEMINFO_RANGE - Range
- ITEMINFO_SLOTS - Slots
- ITEMINFO_SUBTYPE - Item subtype
- ITEMINFO_ELV - Equip min. level
- ITEMINFO_WLV - Weapon level
- 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)
+ ITEMINFO_BUYPRICE - Buy Price
+ ITEMINFO_SELLPRICE - Sell Price
+ ITEMINFO_TYPE - Item Type
+ ITEMINFO_MAXCHANCE - Max drop chance of this item e.g. 1 = 0.01% , etc..
+ if = 0, then monsters don't drop it at all (rare or a quest item)
+ if = 10000, then this item is sold in NPC shops only
+ ITEMINFO_SEX - Sex
+ ITEMINFO_LOC - Equip location
+ ITEMINFO_WEIGHT - Weight (note: 1/10 of unit)
+ ITEMINFO_ATK - Attack
+ ITEMINFO_DEF - Defense
+ ITEMINFO_RANGE - Range
+ ITEMINFO_SLOTS - Slots
+ ITEMINFO_SUBTYPE - Item subtype
+ ITEMINFO_ELV - Equip min. level
+ ITEMINFO_ELV_MAX - Equip max. level
+ ITEMINFO_WLV - Weapon level
+ 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)
+ ITEMINFO_DELAY - Delay
+ ITEMINFO_DROPEFFECT_MODE - Drop effect mode
+ ITEMINFO_CLASS_BASE_1 - Class base 1
+ ITEMINFO_CLASS_BASE_2 - Class base 2
+ ITEMINFO_CLASS_BASE_3 - Class base 3
+ ITEMINFO_CLASS_UPPER - Class Upper
+ ITEMINFO_FLAG_NO_REFINE - No refine flag
+ ITEMINFO_FLAG_DELAY_CONSUME - Delay consume flag
+ ITEMINFO_FLAG_AUTOEQUIP - Auto equip flag
+ ITEMINFO_FLAG_AUTO_FAVORITE - Auto favorite flag
+ ITEMINFO_FLAG_BUYINGSTORE - Buying store flag
+ ITEMINFO_FLAG_BINDONEQUIP - Bind on equip flag
+ ITEMINFO_FLAG_KEEPAFTERUSE - Keep after use flag
+ ITEMINFO_FLAG_FORCE_SERIAL - Force serial flag
+ ITEMINFO_FLAG_NO_OPTIONS - No random item options flag
+ ITEMINFO_FLAG_DROP_ANNOUNCE - Drop announce flag
+ ITEMINFO_FLAG_SHOWDROPEFFECT - Shopw drop effect flag
+ ITEMINFO_STACK_AMOUNT - Stack amount
+ ITEMINFO_STACK_FLAG - Stack amount flag (1: inventory, 2:cart, 4:storage: 8:guildstorage)
+ ITEMINFO_ITEM_USAGE_FLAG - Item usage flag
+ ITEMINFO_ITEM_USAGE_OVERRIDE - Item usage override
+ ITEMINFO_GM_LV_TRADE_OVERRIDE - Min. GM level override trade restriction
Check sample in doc/sample/getiteminfo.txt
@@ -3345,6 +3394,24 @@ This will set a Hat Effect onto the player. The state field allows you to
enable (true) or disable (false) the effect on the player.
---------------------------------------
+
+*identify(<Item ID>)
+
+This function identifies the first <Item ID> item in attached player's inventory.
+
+Returns -2 if an error happens, -1 if no unidentified <Item ID> was found.
+Otherwise, returns the idx of the identified item.
+
+---------------------------------------
+
+*identifyidx(<Inventory Index>)
+
+This will identify item at attached player's <Inventory Index> inventory index.
+
+Returns true if the item was identified, false otherwise.
+Note: If the item was already identified, it returns false.
+
+---------------------------------------
//=====================================
2.1 - End of Item-Related Commands
//=====================================
@@ -3927,29 +3994,30 @@ It will return -1 if there is no such monster (or the type value is
invalid), or "null" if you requested the monster's name.
Valid types are listed in doc/constants.md:
- MOB_NAME 0
- MOB_LV 1
- MOB_MAXHP 2
- MOB_BASEEXP 3
- MOB_JOBEXP 4
- MOB_ATK1 5
- MOB_ATK2 6
- MOB_DEF 7
- MOB_MDEF 8
- MOB_STR 9
- MOB_AGI 10
- MOB_VIT 11
- MOB_INT 12
- MOB_DEX 13
- MOB_LUK 14
- MOB_RANGE 15
- MOB_RANGE2 16
- MOB_RANGE3 17
- MOB_SIZE 18
- MOB_RACE 19
- MOB_ELEMENT 20
- MOB_MODE 21
- MOB_MVPEXP 22
+ MOB_NAME 0
+ MOB_LV 1
+ MOB_MAXHP 2
+ MOB_BASEEXP 3
+ MOB_JOBEXP 4
+ MOB_ATK1 5
+ MOB_ATK2 6
+ MOB_DEF 7
+ MOB_MDEF 8
+ MOB_STR 9
+ MOB_AGI 10
+ MOB_VIT 11
+ MOB_INT 12
+ MOB_DEX 13
+ MOB_LUK 14
+ MOB_RANGE 15
+ MOB_RANGE2 16
+ MOB_RANGE3 17
+ MOB_SIZE 18
+ MOB_RACE 19
+ MOB_ELEMENT 20
+ MOB_MODE 21
+ MOB_MVPEXP 22
+ MOB_DMG_TAKEN_RATE 23
Check sample in doc/sample/getmonsterinfo.txt
@@ -9104,6 +9172,12 @@ currently used font is used, default interface font is used again.
---------------------------------------
+*getfont()
+
+This command return the player's current font.
+if no player is attached it would always return a 0, which is also the default font.
+
+---------------------------------------'
*showdigit(<value>{, <type>})
Displays given numeric 'value' in large digital clock font on top of the
@@ -10198,60 +10272,61 @@ Sets or alters the data in real-time for game objects of the following types -
NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals.
Applicable Data Types (available as constants) -
- Data Types Description (parameter type)
- UDT_SIZE: Unit Size
- UDT_LEVEL: Level
- UDT_HP: Current HP
- UDT_MAXHP: Max HP
- UDT_SP: SP
- UDT_MAXSP: MAX SP
- UDT_MASTERAID: Master Account ID (for Summons)
- UDT_MASTERCID: Master Char ID (for Summons)
- UDT_SPEED: Unit Speed.
- UDT_MODE: Mode (Mobs only)
- UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
- UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
- UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
- UDT_CLASS: Class of the unit. (Monster ID)
- UDT_HAIRSTYLE: Hair Style ID.
- UDT_HAIRCOLOR: Hair Color ID.
- UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
- UDT_HEADMIDDLE: Headgear Middle Sprite ID.
- UDT_HEADTOP: Headgear Top Sprite ID.
- UDT_CLOTHCOLOR: Cloth Color ID.
- UDT_SHIELD: Shield Sprite ID.
- UDT_WEAPON: Weapon Sprite ID.
- UDT_LOOKDIR: Face direction.
- UDT_CANMOVETICK: Stop a unit from move for n seconds.
- UDT_STR: Unit STR.
- UDT_AGI: Unit AGI.
- UDT_VIT: Unit VIT.
- UDT_INT: Unit INT.
- UDT_DEX: Unit DEX.
- UDT_LUK: Unit LUK.
- UDT_ATKRANGE: Attack range of a unit.
- UDT_ATKMIN: Min Atk of a unit.
- UDT_ATKMAX: Max Atk of a unit.
- UDT_MATKMIN: Min MATK of a unit.
- UDT_MATKMAX: Max MATK of a unit.
- UDT_DEF: DEF.
- UDT_MDEF: MDEF.
- UDT_HIT: HIT.
- UDT_FLEE: FLEE.
- UDT_PDODGE: Perfect Dodge.
- UDT_CRIT: Critical Rate.
- UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
- UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
- UDT_ELELEVEL: Element Level.
- UDT_AMOTION: AMotion Rate.
- UDT_ADELAY: ADelay Rate.
- UDT_DMOTION: DMotion Rate.
- UDT_HUNGER: Hunger Rate - for summons.
- UDT_INTIMACY: Intimacy Rate - for summons.
- UDT_LIFETIME: LifeTime - for summons.
- UDT_MERC_KILLCOUNT: Kill count for mercenaries
- UDT_STATADD: Status Points - for NPCs.
- UDT_GROUP: group id
+ Data Types Description (parameter type)
+ UDT_SIZE: Unit Size
+ UDT_LEVEL: Level
+ UDT_HP: Current HP
+ UDT_MAXHP: Max HP
+ UDT_SP: SP
+ UDT_MAXSP: MAX SP
+ UDT_MASTERAID: Master Account ID (for Summons)
+ UDT_MASTERCID: Master Char ID (for Summons)
+ UDT_SPEED: Unit Speed.
+ UDT_MODE: Mode (Mobs only)
+ UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
+ UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
+ UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
+ UDT_CLASS: Class of the unit. (Monster ID)
+ UDT_HAIRSTYLE: Hair Style ID.
+ UDT_HAIRCOLOR: Hair Color ID.
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID.
+ UDT_HEADTOP: Headgear Top Sprite ID.
+ UDT_CLOTHCOLOR: Cloth Color ID.
+ UDT_SHIELD: Shield Sprite ID.
+ UDT_WEAPON: Weapon Sprite ID.
+ UDT_LOOKDIR: Face direction.
+ UDT_CANMOVETICK: Stop a unit from move for n seconds.
+ UDT_STR: Unit STR.
+ UDT_AGI: Unit AGI.
+ UDT_VIT: Unit VIT.
+ UDT_INT: Unit INT.
+ UDT_DEX: Unit DEX.
+ UDT_LUK: Unit LUK.
+ UDT_ATKRANGE: Attack range of a unit.
+ UDT_ATKMIN: Min Atk of a unit.
+ UDT_ATKMAX: Max Atk of a unit.
+ UDT_MATKMIN: Min MATK of a unit.
+ UDT_MATKMAX: Max MATK of a unit.
+ UDT_DEF: DEF.
+ UDT_MDEF: MDEF.
+ UDT_HIT: HIT.
+ UDT_FLEE: FLEE.
+ UDT_PDODGE: Perfect Dodge.
+ UDT_CRIT: Critical Rate.
+ UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
+ UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
+ UDT_ELELEVEL: Element Level.
+ UDT_AMOTION: AMotion Rate.
+ UDT_ADELAY: ADelay Rate.
+ UDT_DMOTION: DMotion Rate.
+ UDT_HUNGER: Hunger Rate - for summons.
+ UDT_INTIMACY: Intimacy Rate - for summons.
+ UDT_LIFETIME: LifeTime - for summons.
+ UDT_MERC_KILLCOUNT: Kill count for mercenaries
+ UDT_STATADD: Status Points - for NPCs.
+ UDT_GROUP: group id
+ UDT_DAMAGE_TAKEN_RATE: damage taken rate of a unit.
returns 0 if value could not be set, 1 if successful.
@@ -10262,59 +10337,60 @@ returns 0 if value could not be set, 1 if successful.
Retrieves real-time data of a game object.
Applicable Data types (available as constants) -
- Data Types Description (return type)
- UDT_SIZE: Unit Size
- UDT_LEVEL: Level
- UDT_HP: Current HP
- UDT_MAXHP: Max HP
- UDT_SP: SP
- UDT_MAXSP: MAX SP
- UDT_MASTERAID: Master Account ID (for Summons)
- UDT_MASTERCID: Master Char ID (for Summons)
- UDT_SPEED: Unit Speed.
- UDT_MODE: Mode (Mobs only)
- UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
- UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
- UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
- UDT_CLASS: Class of the unit. (Monster ID)
- UDT_HAIRSTYLE: Hair Style ID.
- UDT_HAIRCOLOR: Hair Color ID.
- UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
- UDT_HEADMIDDLE: Headgear Middle Sprite ID.
- UDT_HEADTOP: Headgear Top Sprite ID.
- UDT_CLOTHCOLOR: Cloth Color ID.
- UDT_SHIELD: Shield Sprite ID.
- UDT_WEAPON: Weapon Sprite ID.
- UDT_LOOKDIR: Face direction.
- UDT_CANMOVETICK: Stop a unit from move for n seconds.
- UDT_STR: Unit STR.
- UDT_AGI: Unit AGI.
- UDT_VIT: Unit VIT.
- UDT_INT: Unit INT.
- UDT_DEX: Unit DEX.
- UDT_LUK: Unit LUK.
- UDT_ATKRANGE: Attack range of a unit.
- UDT_ATKMIN: Min Atk of a unit.
- UDT_ATKMAX: Max Atk of a unit.
- UDT_MATKMIN: Min MATK of a unit.
- UDT_MATKMAX: Max MATK of a unit.
- UDT_DEF: DEF.
- UDT_MDEF: MDEF.
- UDT_HIT: HIT.
- UDT_FLEE: FLEE.
- UDT_PDODGE: Perfect Dodge.
- UDT_CRIT: Critical Rate.
- UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
- UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
- UDT_ELELEVEL: Element Level.
- UDT_AMOTION: AMotion Rate.
- UDT_ADELAY: ADelay Rate.
- UDT_DMOTION: DMotion Rate.
- UDT_HUNGER: Hunger Rate - for summons.
- UDT_INTIMACY: Intimacy Rate - for summons.
- UDT_LIFETIME: LifeTime - for summons.
- UDT_MERC_KILLCOUNT: Kill count for mercenaries.
- UDT_GROUP: group id
+ Data Types Description (return type)
+ UDT_SIZE: Unit Size
+ UDT_LEVEL: Level
+ UDT_HP: Current HP
+ UDT_MAXHP: Max HP
+ UDT_SP: SP
+ UDT_MAXSP: MAX SP
+ UDT_MASTERAID: Master Account ID (for Summons)
+ UDT_MASTERCID: Master Char ID (for Summons)
+ UDT_SPEED: Unit Speed.
+ UDT_MODE: Mode (Mobs only)
+ UDT_AI: Unit AI Type (see doc/constants.md for Unit AI Types)
+ UDT_SCOPTION: Status Options. (see doc/constants.md for Unit Option Types)
+ UDT_SEX: Gender of the unit. (see doc/constants.md for Genders)
+ UDT_CLASS: Class of the unit. (Monster ID)
+ UDT_HAIRSTYLE: Hair Style ID.
+ UDT_HAIRCOLOR: Hair Color ID.
+ UDT_HEADBOTTOM: Headgear Bottom Sprite ID.
+ UDT_HEADMIDDLE: Headgear Middle Sprite ID.
+ UDT_HEADTOP: Headgear Top Sprite ID.
+ UDT_CLOTHCOLOR: Cloth Color ID.
+ UDT_SHIELD: Shield Sprite ID.
+ UDT_WEAPON: Weapon Sprite ID.
+ UDT_LOOKDIR: Face direction.
+ UDT_CANMOVETICK: Stop a unit from move for n seconds.
+ UDT_STR: Unit STR.
+ UDT_AGI: Unit AGI.
+ UDT_VIT: Unit VIT.
+ UDT_INT: Unit INT.
+ UDT_DEX: Unit DEX.
+ UDT_LUK: Unit LUK.
+ UDT_ATKRANGE: Attack range of a unit.
+ UDT_ATKMIN: Min Atk of a unit.
+ UDT_ATKMAX: Max Atk of a unit.
+ UDT_MATKMIN: Min MATK of a unit.
+ UDT_MATKMAX: Max MATK of a unit.
+ UDT_DEF: DEF.
+ UDT_MDEF: MDEF.
+ UDT_HIT: HIT.
+ UDT_FLEE: FLEE.
+ UDT_PDODGE: Perfect Dodge.
+ UDT_CRIT: Critical Rate.
+ UDT_RACE: Race. (Eg. constants RC_DemiHuman or Integer 7).
+ UDT_ELETYPE: Element. (Eg. constants Ele_Neutral or Integer 0).
+ UDT_ELELEVEL: Element Level.
+ UDT_AMOTION: AMotion Rate.
+ UDT_ADELAY: ADelay Rate.
+ UDT_DMOTION: DMotion Rate.
+ UDT_HUNGER: Hunger Rate - for summons.
+ UDT_INTIMACY: Intimacy Rate - for summons.
+ UDT_LIFETIME: LifeTime - for summons.
+ UDT_MERC_KILLCOUNT: Kill count for mercenaries.
+ UDT_GROUP: group id
+ UDT_DAMAGE_TAKEN_RATE: damage taken rate of a unit.
returns -1 if value could not be retrieved.
@@ -10546,3 +10622,9 @@ Opens refinery user interface for the player
returns true on success and false on failure
---------------------------------------
+*openlapineddukddakboxui(<item_id>)
+
+Opens lapine ddukddak user interface for the player
+returns true on success and false on failure
+
+---------------------------------------