• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Lua (loop) problem

Hrsha

Member
Joined
May 30, 2010
Messages
450
Reaction score
21
Location
Egypt
Hi guys

how to make this part of script ignor slot (5 and 6) its the hands

Code:
function equip(cid,item,slot) 
local t = {}
if item then
local mm,sinal,qto = getSlotType(getItemName(item.uid))
t[mm] = tonumber(qto)
end
for i=1,9 do 
if i ~= slot then
if getPlayerSlotItem(cid,i).itemid ~= 0 then
local aab = getPlayerSlotItem(cid,i).uid
if aab and check2(cid,i) then
for _ in getItemName(aab):gmatch('(%[.-%])') do
local mm,sinal,qto2 = getSlotType(_)
if mm then
if not t[mm] then
t[mm] = 0
end
t[mm] = t[mm]+tonumber(qto2)
 
t[mm] = t[mm] > 100 and 100 or t[mm]
end
end
end
end
end

its in this line for i=1,9 do but i dont know how to do it

i tried to do somehting like this

for i=1,4 do
for i=7,9 do
but it just work with the last line :S
.
.
.
 
for i=1,4 do
for i=7,9 do

You simply overwrite the variabele i at the 2nd loop then, but it repeats 4 times overall...

just:

for i=1,9 do
if i ~= 5 and i ~= 6 then
......
end
end
 
Back
Top