lazarus321
Member
- Joined
- May 8, 2017
- Messages
- 222
- Reaction score
- 23
Hi all,
Does anyone know how I could do to present the text with all possible variations if my variable nx1, nx2, nx3, nx4, nx5, nx6 and nx7 is different from 0?
I tried to do this but it's getting too long and it's not getting all the variations.
Does anyone know how I could do to present the text with all possible variations if my variable nx1, nx2, nx3, nx4, nx5, nx6 and nx7 is different from 0?
I tried to do this but it's getting too long and it's not getting all the variations.
LUA:
local t1 = {}
local t2 = {}
local t3 = {}
local t4 = {}
local t5 = {}
local t6 = {}
local t7 = {}
local rx1 = 4
local rx2 = 7
local rx3 = 1
local rx4 = 5
local rx5 = 3
local rx6 = 9
local rx7 = 2
local nx1 = 4
local nx2 = 10
local nx3 = 0
local nx4 = 3
local nx5 = 10
local nx6 = 0
local nx7 = 50
if nx1 ~= 0 then
dt = 0
for i = 1, rx1, 1 do
local i = math.random(1,nx1)
t1[i] = i
dt = dt + t1[i]
end
end
player:sendTextMessage(MESSAGE_ATTENTION, nx1 .. "x" .. nx1 .. " . " .. nx2 .. "x" .. nx2 .. " . " .. nx4 .. "x" .. nx4 .. " . " .. nx5 .. "x" .. nx5 .. " . " .. nx7 .. "x" .. nx7)