-
Notifications
You must be signed in to change notification settings - Fork 0
/
item_purchase_lina.lua
49 lines (42 loc) · 1.11 KB
/
item_purchase_lina.lua
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
local tableItemsToBuy = {
"item_tango",
"item_tango",
"item_clarity",
"item_clarity",
"item_branches",
"item_branches",
"item_magic_stick",
"item_circlet",
"item_boots",
"item_energy_booster",
"item_staff_of_wizardry",
"item_ring_of_regen",
"item_recipe_force_staff",
"item_point_booster",
"item_staff_of_wizardry",
"item_ogre_axe",
"item_blade_of_alacrity",
"item_mystic_staff",
"item_ultimate_orb",
"item_void_stone",
"item_staff_of_wizardry",
"item_wind_lace",
"item_void_stone",
"item_recipe_cyclone",
"item_cyclone"
}
----------------------------------------------------------------------------------------------------
function ItemPurchaseThink()
local npcBot = GetBot()
if (#tableItemsToBuy == 0) then
npcBot:SetNextItemPurchaseValue(0)
return
end
local sNextItem = tableItemsToBuy[1]
npcBot:SetNextItemPurchaseValue(GetItemCost(sNextItem))
if (npcBot:GetGold() >= GetItemCost(sNextItem)) then
npcBot:ActionImmediate_PurchaseItem(sNextItem)
table.remove(tableItemsToBuy, 1)
end
end
----------------------------------------------------------------------------------------------------