1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//===== Hercules Script =======================================
//= Sample: Getiteminfo
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
//= 20131225
//===== Description: =========================================
//= Demonstrates the 'getiteminfo' command.
//============================================================
prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{
mes "Please enter an item ID.";
input .@value;
// This line uses an INTERNAL function of your client to show item name by its ID!
// ^nItemID^XXXX -> Item Name
mes "Item ID: "+.@value+" ^nItemID^"+.@value;
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;
}
|