summaryrefslogtreecommitdiff
path: root/doc/sample/getiteminfo.txt
blob: 316318cb6ae761ed248a9d9597c03593c9a6a6f3 (plain) (blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//===== 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
	mesf("Item ID: %d ^nItemID^%d", .@value, .@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));

	.@trade$ = callfunc("F_GetTradeRestriction", .@value);
	mesf("Trade Restriction: %s", .@trade$);
	
	mesf("Drop delay: %d", getiteminfo(.@value, ITEMINFO_DELAY));
	mesf("Drop effect mode: %d", getiteminfo(.@value, ITEMINFO_DROPEFFECT_MODE));
	mesf("Class base 1: %d", getiteminfo(.@value, ITEMINFO_CLASS_BASE_1));
	mesf("Class base 2: %d", getiteminfo(.@value, ITEMINFO_CLASS_BASE_2));
	mesf("Class base 3: %d", getiteminfo(.@value, ITEMINFO_CLASS_BASE_3));
	mesf("Class Upper: %d", getiteminfo(.@value, ITEMINFO_CLASS_UPPER));
	mesf("No refine flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_NO_REFINE));
	mesf("Delay consume flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_DELAY_CONSUME));
	mesf("Auto equip flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_AUTOEQUIP));
	mesf("Auto favorite flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_AUTO_FAVORITE));
	mesf("Buying store flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_BUYINGSTORE));
	mesf("Bind on equip flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_BINDONEQUIP));
	mesf("Keep after use flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_KEEPAFTERUSE));
	mesf("Force serial flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_FORCE_SERIAL));
	mesf("No random item options flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_NO_OPTIONS));
	mesf("Drop announce flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_DROP_ANNOUNCE));
	mesf("Shopw drop effect flag: %d", getiteminfo(.@value, ITEMINFO_FLAG_SHOWDROPEFFECT));
	mesf("Stack amount: %d", getiteminfo(.@value, ITEMINFO_STACK_AMOUNT));
	mesf("Stack amount flag: %d", getiteminfo(.@value, ITEMINFO_STACK_FLAG));
	mesf("Item usage flag: %d", getiteminfo(.@value, ITEMINFO_ITEM_USAGE_FLAG));
	mesf("Item usage override: %d", getiteminfo(.@value, ITEMINFO_ITEM_USAGE_OVERRIDE));
	mesf("GM Level override: %d", getiteminfo(.@value, ITEMINFO_GM_LV_TRADE_OVERRIDE));
	close;
}