L!p3
11-26-2012, 08:42 PM
I would like to know if there's anyway to Random tables with Lua. When the character go deposit items in depot or sell items will not always use the same 'sequence'.
local randomDp = math.random(1,3)
if randomDp == 1 then
Self.DepositItems(order1)
elseif randomDp == 2 then
Self.DepositItems(order2)
elseif randomDp == 3 then
Self.DepositItems(order3)
end
I've been thinking this way but It takes too much time to edit, any suggestions?
local randomDp = math.random(1,3)
if randomDp == 1 then
Self.DepositItems(order1)
elseif randomDp == 2 then
Self.DepositItems(order2)
elseif randomDp == 3 then
Self.DepositItems(order3)
end
I've been thinking this way but It takes too much time to edit, any suggestions?