2015-01-25 02:28:53 +01:00
|
|
|
MarketMaxAmount = 2000
|
|
|
|
MarketMaxAmountStackable = 64000
|
|
|
|
MarketMaxPrice = 999999999
|
|
|
|
MarketMaxOffers = 100
|
|
|
|
|
2012-07-27 05:53:42 +02:00
|
|
|
MarketAction = {
|
|
|
|
Buy = 0,
|
|
|
|
Sell = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
MarketRequest = {
|
|
|
|
MyOffers = 0xFFFE,
|
|
|
|
MyHistory = 0xFFFF
|
|
|
|
}
|
|
|
|
|
|
|
|
MarketOfferState = {
|
|
|
|
Active = 0,
|
|
|
|
Cancelled = 1,
|
|
|
|
Expired = 2,
|
|
|
|
Accepted = 3,
|
|
|
|
AcceptedEx = 255
|
|
|
|
}
|
|
|
|
|
2012-07-20 20:20:06 +02:00
|
|
|
MarketCategory = {
|
|
|
|
All = 0,
|
|
|
|
Armors = 1,
|
|
|
|
Amulets = 2,
|
|
|
|
Boots = 3,
|
|
|
|
Containers = 4,
|
|
|
|
Decoration = 5,
|
|
|
|
Food = 6,
|
|
|
|
HelmetsHats = 7,
|
|
|
|
Legs = 8,
|
|
|
|
Others = 9,
|
|
|
|
Potions = 10,
|
|
|
|
Rings = 11,
|
|
|
|
Runes = 12,
|
|
|
|
Shields = 13,
|
|
|
|
Tools = 14,
|
|
|
|
Valuables = 15,
|
|
|
|
Ammunition = 16,
|
|
|
|
Axes = 17,
|
|
|
|
Clubs = 18,
|
|
|
|
DistanceWeapons = 19,
|
|
|
|
Swords = 20,
|
|
|
|
WandsRods = 21,
|
|
|
|
PremiumScrolls = 22,
|
|
|
|
MetaWeapons = 255
|
|
|
|
}
|
|
|
|
|
|
|
|
MarketCategory.First = MarketCategory.Armors
|
|
|
|
MarketCategory.Last = MarketCategory.PremiumScrolls
|
|
|
|
|
2012-07-23 17:11:53 +02:00
|
|
|
MarketCategoryWeapons = {
|
|
|
|
[MarketCategory.Ammunition] = { slots = {255} },
|
|
|
|
[MarketCategory.Axes] = { slots = {255, InventorySlotOther, InventorySlotLeft} },
|
|
|
|
[MarketCategory.Clubs] = { slots = {255, InventorySlotOther, InventorySlotLeft} },
|
|
|
|
[MarketCategory.DistanceWeapons] = { slots = {255, InventorySlotOther, InventorySlotLeft} },
|
|
|
|
[MarketCategory.Swords] = { slots = {255, InventorySlotOther, InventorySlotLeft} },
|
|
|
|
[MarketCategory.WandsRods] = { slots = {255, InventorySlotOther, InventorySlotLeft} }
|
|
|
|
}
|
|
|
|
|
2012-07-20 20:20:06 +02:00
|
|
|
MarketCategoryStrings = {
|
|
|
|
[0] = 'All',
|
|
|
|
[1] = 'Armors',
|
|
|
|
[2] = 'Amulets',
|
|
|
|
[3] = 'Boots',
|
|
|
|
[4] = 'Containers',
|
|
|
|
[5] = 'Decoration',
|
|
|
|
[6] = 'Food',
|
|
|
|
[7] = 'Helmets and Hats',
|
|
|
|
[8] = 'Legs',
|
|
|
|
[9] = 'Others',
|
|
|
|
[10] = 'Potions',
|
|
|
|
[11] = 'Rings',
|
|
|
|
[12] = 'Runes',
|
|
|
|
[13] = 'Shields',
|
|
|
|
[14] = 'Tools',
|
|
|
|
[15] = 'Valuables',
|
|
|
|
[16] = 'Ammunition',
|
|
|
|
[17] = 'Axes',
|
|
|
|
[18] = 'Clubs',
|
|
|
|
[19] = 'Distance Weapons',
|
|
|
|
[20] = 'Swords',
|
|
|
|
[21] = 'Wands and Rods',
|
|
|
|
[22] = 'Premium Scrolls',
|
2012-07-23 17:11:53 +02:00
|
|
|
[255] = 'Weapons'
|
2012-07-20 20:20:06 +02:00
|
|
|
}
|
|
|
|
|
2012-07-27 05:53:42 +02:00
|
|
|
function getMarketCategoryName(id)
|
2013-01-29 07:26:32 +01:00
|
|
|
if table.haskey(MarketCategoryStrings, id) then
|
2012-07-27 05:53:42 +02:00
|
|
|
return MarketCategoryStrings[id]
|
|
|
|
end
|
|
|
|
end
|
2012-07-17 16:36:27 +02:00
|
|
|
|
2012-07-27 05:53:42 +02:00
|
|
|
function getMarketCategoryId(name)
|
|
|
|
local id = table.find(MarketCategoryStrings, name)
|
|
|
|
if id then
|
|
|
|
return id
|
|
|
|
end
|
|
|
|
end
|
2012-07-17 16:36:27 +02:00
|
|
|
|
|
|
|
MarketItemDescription = {
|
|
|
|
Armor = 1,
|
|
|
|
Attack = 2,
|
|
|
|
Container = 3,
|
|
|
|
Defense = 4,
|
|
|
|
General = 5,
|
|
|
|
DecayTime = 6,
|
|
|
|
Combat = 7,
|
|
|
|
MinLevel = 8,
|
|
|
|
MinMagicLevel = 9,
|
|
|
|
Vocation = 10,
|
|
|
|
Rune = 11,
|
|
|
|
Ability = 12,
|
|
|
|
Charges = 13,
|
|
|
|
WeaponName = 14,
|
2012-07-19 20:54:24 +02:00
|
|
|
Weight = 15
|
2012-07-17 16:36:27 +02:00
|
|
|
}
|
2012-07-23 17:11:53 +02:00
|
|
|
|
2012-07-19 20:54:24 +02:00
|
|
|
MarketItemDescription.First = MarketItemDescription.Armor
|
|
|
|
MarketItemDescription.Last = MarketItemDescription.Weight
|
2012-07-22 16:02:01 +02:00
|
|
|
|
|
|
|
MarketItemDescriptionStrings = {
|
|
|
|
[1] = 'Armor',
|
|
|
|
[2] = 'Attack',
|
|
|
|
[3] = 'Container',
|
|
|
|
[4] = 'Defense',
|
|
|
|
[5] = 'Description',
|
|
|
|
[6] = 'Use Time',
|
|
|
|
[7] = 'Combat',
|
|
|
|
[8] = 'Min Level',
|
|
|
|
[9] = 'Min Magic Level',
|
|
|
|
[10] = 'Vocation',
|
|
|
|
[11] = 'Rune',
|
|
|
|
[12] = 'Ability',
|
|
|
|
[13] = 'Charges',
|
|
|
|
[14] = 'Weapon Type',
|
|
|
|
[15] = 'Weight'
|
|
|
|
}
|
2012-07-23 17:11:53 +02:00
|
|
|
|
2012-07-27 05:53:42 +02:00
|
|
|
function getMarketDescriptionName(id)
|
2013-01-29 07:26:32 +01:00
|
|
|
if table.haskey(MarketItemDescriptionStrings, id) then
|
2012-07-27 05:53:42 +02:00
|
|
|
return MarketItemDescriptionStrings[id]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function getMarketDescriptionId(name)
|
|
|
|
local id = table.find(MarketItemDescriptionStrings, name)
|
|
|
|
if id then
|
|
|
|
return id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-07-23 17:11:53 +02:00
|
|
|
MarketSlotFilters = {
|
|
|
|
[InventorySlotOther] = "Two-Handed",
|
|
|
|
[InventorySlotLeft] = "One-Handed",
|
|
|
|
[255] = "Any"
|
|
|
|
}
|
|
|
|
|
|
|
|
MarketFilters = {
|
|
|
|
Vocation = 1,
|
|
|
|
Level = 2,
|
2012-08-05 16:42:54 +02:00
|
|
|
Depot = 3,
|
|
|
|
SearchAll = 4
|
2012-07-23 17:11:53 +02:00
|
|
|
}
|
|
|
|
|
2015-01-22 20:38:28 +01:00
|
|
|
MarketFilters.First = MarketFilters.Vocation
|
|
|
|
MarketFilters.Last = MarketFilters.Depot
|
2012-07-27 05:53:42 +02:00
|
|
|
|
|
|
|
function getMarketSlotFilterId(name)
|
|
|
|
local id = table.find(MarketSlotFilters, name)
|
|
|
|
if id then
|
|
|
|
return id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function getMarketSlotFilterName(id)
|
2013-01-29 07:26:32 +01:00
|
|
|
if table.haskey(MarketSlotFilters, id) then
|
2012-07-27 05:53:42 +02:00
|
|
|
return MarketSlotFilters[id]
|
|
|
|
end
|
2013-01-29 07:26:32 +01:00
|
|
|
end
|