diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/constants.md | 27 | ||||
-rw-r--r-- | doc/item_db.txt | 11 | ||||
-rw-r--r-- | doc/sample/getiteminfo.txt | 21 | ||||
-rw-r--r-- | doc/sample/npc_test_setitemx.txt | 11 | ||||
-rw-r--r-- | doc/script_commands.txt | 78 |
5 files changed, 111 insertions, 37 deletions
diff --git a/doc/constants.md b/doc/constants.md index 98c22bb3e..7a9e6ea18 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -3543,7 +3543,12 @@ - `QTYPE_EVENT`: 4 - `QTYPE_EVENT2`: 5 - `QTYPE_WARG`: 6 +- `QTYPE_CLICKME`: 6 +- `QTYPE_DAILYQUEST`: 7 - `QTYPE_WARG2`: 8 +- `QTYPE_EVENT3`: 8 +- `QTYPE_JOBQUEST`: 9 +- `QTYPE_JUMPING_PORING`: 10 ### Font weight @@ -3782,6 +3787,8 @@ - `UDT_LIFETIME`: 52 - `UDT_MERC_KILLCOUNT`: 53 - `UDT_STATADD`: 54 +- `UDT_ROBE`: 55 +- `UDT_BODY2`: 56 ## Hardcoded Constants (source) @@ -4073,6 +4080,26 @@ - `MAPINFO_SIZE_Y`: 3 - `MAPINFO_ZONE`: 4 +### set/getiteminfo options + +- `ITEMINFO_BUYPRICE`: 0 +- `ITEMINFO_SELLPRICE`: 1 +- `ITEMINFO_TYPE`: 2 +- `ITEMINFO_MAXCHANCE`: 3 +- `ITEMINFO_SEX`: 4 +- `ITEMINFO_LOC`: 5 +- `ITEMINFO_WEIGHT`: 6 +- `ITEMINFO_ATK`: 7 +- `ITEMINFO_DEF`: 8 +- `ITEMINFO_RANGE`: 9 +- `ITEMINFO_SLOTS`: 10 +- `ITEMINFO_SUBTYPE`: 11 +- `ITEMINFO_ELV`: 12 +- `ITEMINFO_WLV`: 13 +- `ITEMINFO_VIEWID`: 14 +- `ITEMINFO_MATK`: 15 +- `ITEMINFO_VIEWSPRITE`: 16 + ### Renewal - `RENEWAL`: 1 diff --git a/doc/item_db.txt b/doc/item_db.txt index 913ab80e0..16eca2e23 100644 --- a/doc/item_db.txt +++ b/doc/item_db.txt @@ -73,6 +73,8 @@ item_db: ( Delay: Delay to use item (int, defaults to 0) KeepAfterUse: true/false (boolean, defaults to false) DropAnnounce: true/false (boolean, defaults to false) + ShowDropEffect: true/false (boolean, defaults to false) + DropEffectMode: Effect Type (int, default to 0) Trade: { (defaults to no restrictions) override: GroupID (int, defaults to 100) nodrop: true/false (boolean, defaults to false) @@ -368,3 +370,12 @@ OnUnequipScript: Script to execute when the item is unequipped. Inherit: This can be used only in item_db2.conf, and if set to true, and the item already exists in item_db.conf, all the missing fields will be inherited from there rather than using their default values. + +ShowDropEffect: Allow showing an effect when the item dropped by a monster. [ZERO client only] +DropEffectMode: Set attribute for ShowDropEffect. [ZERO client only] + 0 - Client Based (itemInfo EffectID) + 1 - White effect + 2 - Blue effect + 3 - Yellow effect + 4 - Purple effect + 5 - Orange effect diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt index 89f9a66b5..57407c072 100644 --- a/doc/sample/getiteminfo.txt +++ b/doc/sample/getiteminfo.txt @@ -16,8 +16,23 @@ prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{ // ^nItemID^XXXX -> Item Name mes "Item ID: "+.@value+" ^nItemID^"+.@value; - mes "Current item info:"; - for (.@id = 0; .@id < 14; ++.@id) - mes " getiteminfo("+.@value+","+.@id+") = "+getiteminfo(.@value,.@id); + mes("Current item info:"); + mesf("Buy Price: %d", getiteminfo(.@value, ITEMINFO_BUYPRICE)); + mesf("Sell Price: %d", getiteminfo(.@value, ITEMINFO_SELLPRICE)); + mesf("Type: %d", getiteminfo(.@value, ITEMINFO_TYPE)); + mesf("Max drop chance: %d.%02d", getiteminfo(.@value, ITEMINFO_MAXCHANCE) / 100, getiteminfo(.@value, ITEMINFO_MAXCHANCE) % 100); + mesf("Sex: %d", getiteminfo(.@value, ITEMINFO_SEX)); + mesf("Equip location: %d", getiteminfo(.@value, ITEMINFO_LOC)); + mesf("Weight: %d.%d", getiteminfo(.@value, ITEMINFO_WEIGHT) / 10, getiteminfo(.@value, ITEMINFO_WEIGHT) % 10); + mesf("Attack: %d", getiteminfo(.@value, ITEMINFO_ATK)); + mesf("Defense: %d", getiteminfo(.@value, ITEMINFO_DEF)); + mesf("Range: %d", getiteminfo(.@value, ITEMINFO_RANGE)); + mesf("Slots: %d", getiteminfo(.@value, ITEMINFO_SLOTS)); + mesf("Subtype: %d", getiteminfo(.@value, ITEMINFO_SUBTYPE)); + mesf("Equip Level: %d", getiteminfo(.@value, ITEMINFO_ELV)); + mesf("Weapon Level: %d", getiteminfo(.@value, ITEMINFO_WLV)); + mesf("View ID: %d", getiteminfo(.@value, ITEMINFO_VIEWID)); + mesf("MATK: %d", getiteminfo(.@value, ITEMINFO_MATK)); + mesf("View Sprite: %d", getiteminfo(.@value, ITEMINFO_VIEWSPRITE)); close; } diff --git a/doc/sample/npc_test_setitemx.txt b/doc/sample/npc_test_setitemx.txt index a06f0dc9f..519cfa363 100644 --- a/doc/sample/npc_test_setitemx.txt +++ b/doc/sample/npc_test_setitemx.txt @@ -14,15 +14,14 @@ prontera,164,161,5 script Lupus WOLF,{ switch (select("Make Knife[3] Edible", "Make Apple Equippable", "Edible Knife = Full SP", "Knife = Weapon + 3 Notes")) { case 1: mes "Ok. We made Knife[3] edible."; - setiteminfo(Knife, 2, IT_HEALING); //type = 0 : potion + setiteminfo(Knife, ITEIMINFO_TYPE, IT_HEALING); setitemscript(Knife, "{dispbottom \"* You used Knife[3]\";}"); break; case 2: mes "Ok. We made Apple equippable."; - setiteminfo(Apple, 2, IT_ARMOR); //item type -> headgear (type = 5 -> IT_ARMOR) - setiteminfo(Apple, 5, 512); //where to equip to (equip = 512) - setiteminfo(Apple, 11, 256); //set as headgear location (loc = 256) - setiteminfo(Apple, 14, 85); //set Headgear Sprite ID (view id = 85) + setiteminfo(Apple, ITEMINFO_TYPE, IT_ARMOR); + setiteminfo(Apple, ITEMINFO_LOC, EQP_HEAD_MID); //where to equip to (equip = 512) + setiteminfo(Apple, ITEMINFO_VIEWID, 85); //set Headgear Sprite ID (view id = 85) setitemscript(Apple, "{dispbottom \"* Other item's changed\";}", 0); setitemscript(Apple, "{dispbottom \"* Equipped\";}", 1); setitemscript(Apple, "{dispbottom \"* Unequipped\";}", 2); @@ -34,7 +33,7 @@ prontera,164,161,5 script Lupus WOLF,{ break; case 4: mes "Ok. We made Knife a weapon, but added 3 notes."; - setiteminfo(Knife, 2, IT_WEAPON); //type = 4 -> IT_WEAPON + setiteminfo(Knife, ITEIMINFO_TYPE, IT_WEAPON); setitemscript(Knife, "{dispbottom \"* 1 Used\";}", 0); setitemscript(Knife, "{dispbottom \"* 2 Equipped\";}", 1); setitemscript(Knife, "{dispbottom \"* 3 Unequipped\";}", 2); diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 5c730106b..a91a212e7 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -189,6 +189,7 @@ There are two optional fields for monster size and AI. Size can be 0 Alternately, a monster spawned using 'boss_monster' instead of 'monster' is able to be detected on the map with the SC_CASH_BOSS_ALARM status (used by Convex Mirror, item ID# 12214). +A monster spawned using 'miniboss_monster' is spawn monster as mini boss view. ** NPC names @@ -3175,23 +3176,43 @@ Example: --------------------------------------- *getiteminfo(<item ID>, <type>) +*setiteminfo(<item ID>, <type>, <value>) This function will look up the item with the specified ID number in the database and return the info set by TYPE argument. It will return -1 if there is no such item. Valid types are: - 0 - Buy Price; 1 - Sell Price; 2 - Item Type; - 3 - maxchance (Max drop chance of this item e.g. 1 = 0.01% , etc.. + + 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 - 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id - - If RENEWAL is defined, 15 - matk + 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) Check sample in doc/sample/getiteminfo.txt +The setiteminfo function will, instead, set the item's parameters. It returns +the new value on success, or -1 on failure (item_id not found). + +Example: + + setiteminfo(Stone, ITEMINFO_WEIGHT, 9990); // Stone now weighs 999.0 + --------------------------------------- *getequipisenableopt(<equipment slot>) @@ -3232,6 +3253,7 @@ Set an equipment's option index or value for the specified option slot. <equipment_index> For a list of equipment indexes see getequipid(). <option_slot> can range from 1 to MAX_ITEM_OPTIONS <type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf) + removes the equip option if type is 0. <value> The value of the type to be set. returns 0 if value couldn't be set, 1 on success. @@ -6893,6 +6915,7 @@ Examples: --------------------------------------- *progressbar("<color>", <seconds>) +*progressbar_unit("<color>", <seconds>{, <GID>}) This command works almost like sleep2(), but displays a progress bar above the head of the currently attached character (like cast bar). Once the @@ -6901,6 +6924,11 @@ while the progress bar progresses, it is aborted and the script ends. The color format is in RGB (0xRRGGBB). The color is currently ignored by the client and appears always green. +progressbar_unit works only for PACKETVER >= 20130821 +The progressbar will show on the given unit id but it will not +put the unit in timeout (the progressbar would be just an animation). +if GID is not given use the attached player. + --------------------------------------- //===================================== 5.1 - End of Time-related commands @@ -8294,26 +8322,6 @@ Example: --------------------------------------- -*setiteminfo(<item id>, <type>, <value>) - -This function will set some value of an item. -Returns the new value on success, or -1 on fail (item_id not found or -invalid type). - -Valid types are: - 0 - Buy Price; 1 - Sell Price; 2 - Item Type; - 3 - 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 - 4 - sex; 5 - equip; 6 - weight; 7 - atk; 8 - def; 9 - range; - 10 - slot; 11 - subtype; 12 - elv; 13 - wlv; 14 - view id - -Example: - -setiteminfo Stone, 6, 9990; // Stone now weighs 999.0 - ---------------------------------------- - *setitemscript(<item id>, <"{ new item script }">{, <type>}) Set a new script bonus to the Item. Very useful for game events. @@ -9226,7 +9234,14 @@ No Icon : QTYPE_NONE ! Event Icon : QTYPE_EVENT ? Event Icon : QTYPE_EVENT2 Warg : QTYPE_WARG -Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410) +Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315) + +- Only for packetver >= 20170315 +Click Me Icon : QTYPE_CLICKME +! Daily Quest Icon : QTYPE_DAILYQUEST +! Green Event Icon : QTYPE_EVENT3 +! Job Quest Icon : QTYPE_JOBQUEST +Jumping Poring : QTYPE_JUMPING_PORING Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC, the available color values are: @@ -9335,7 +9350,14 @@ Remove Icon : QTYPE_NONE ! Event Icon : QTYPE_EVENT ? Event Icon : QTYPE_EVENT2 Warg : QTYPE_WARG -Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410) +Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315) + +- Only for packetver >= 20170315 +Click Me Icon : QTYPE_CLICKME +! Daily Quest Icon : QTYPE_DAILYQUEST +! Green Event Icon : QTYPE_EVENT3 +! Job Quest Icon : QTYPE_JOBQUEST +Jumping Poring : QTYPE_JUMPING_PORING Mark Color: 0 - No Mark |