tokenzz
:thinking:
- Joined
- Feb 2, 2013
- Messages
- 779
- Solutions
- 2
- Reaction score
- 346
Code:
local config = {
[9808] = { -- Common Rusty Armor
[1] = {id = 2464, name = "Chain Armor", chance = 6994},
[2] = {id = 2483, name = "Scale Armor", chance = 3952},
[3] = {id = 2465, name = "Brass Armor", chance = 1502},
[4] = {id = 2463, name = "Plate Armor", chance = 197}
},
[9809] = { -- Semi-rare Rusty Armor
[1] = {id = 2483, name = "Scale Armor", chance = 6437},
[2] = {id = 2464, name = "Chain Armor", chance = 4606},
[3] = {id = 2465, name = "Brass Armor", chance = 3029},
[4] = {id = 2463, name = "Plate Armor", chance = 1559},
[5] = {id = 2476, name = "Knight Armor", chance = 595},
[6] = {id = 8891, name = "Paladin Armor", chance = 283},
[7] = {id = 2487, name = "Crown Armor", chance = 49}
},
[9810] = { -- Rare Rusty Armor
[1] = {id = 2465, name = "Brass Armor", chance = 6681},
[2] = {id = 2463, name = "Plate Armor", chance = 3767},
[3] = {id = 2476, name = "Knight Armor", chance = 1832},
[4] = {id = 2487, name = "Crown Armor", chance = 177},
[5] = {id = 8891, name = "Paladin Armor", chance = 31},
[6] = {id = 2466, name = "Golden Armor", chance = 10}
},
[9811] = { -- Common Rusty Legs
[1] = {id = 2648, name = "Chain Legs", chance = 6949},
[2] = {id = 2468, name = "Studded Legs", chance = 3692},
[3] = {id = 2478, name = "Brass Legs", chance = 1307},
[4] = {id = 2647, name = "Plate Legs", chance = 133}
},
[9812] = { -- Semi-Rare Rusty Legs
[1] = {id = 2468, name = "Studded Legs", chance = 5962},
[2] = {id = 2648, name = "Chain Legs", chance = 4037},
[3] = {id = 2478, name = "Brass Legs", chance = 2174},
[4] = {id = 2647, name = "Plate Legs", chance = 1242},
[5] = {id = 2477, name = "Knight Legs", chance = 186},
},
[9813] = { -- Rare Rusty Legs
[1] = {id = 2478, name = "Brass Legs", chance = 6500},
[2] = {id = 2647, name = "Plate Legs", chance = 3800},
[3] = {id = 2477, name = "Knight Legs", chance = 200},
[4] = {id = 2488, name = "Crown Legs", chance = 52},
[5] = {id = 2470, name = "Golden Legs", chance = 30}
}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local targetItem = config[target.itemid]
if not targetItem then
return true
end
-- rest of the script
Currently learning more about tables, just wish to get some more clarification about the subject as it just doesn't want to go further than the check
Code:
if not targetItem then return true
Last edited: