• 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!

script error! Unique item

adrianokk

New Member
Joined
Jan 22, 2019
Messages
43
Reaction score
1
I made this script that when a player opens the initial box he wins certain items
but I need all the items in the box to be unique items.
but the items are not coming as unique.
TFS 0.3
pokemon
Lua:
local itens = {
  {2394, 100},
  {12349, 20},
  {17179, 1},
  {17180, 1},
}
local storage = 598
local level = 5
local pos = {x=1000, y=1002, z=7}

function onUse (cid,item,frompos,item2,topos)   
  if getPlayerLevel(cid) >= level then
  if getPlayerStorageValue(cid, storage) == -1 then
     doTeleportThing(cid,pos)
     doPlayerSendTextMessage(cid, 22, "Parabens Voçe Ganhou Sua Box Inicial") -- Msg que ira aparecer
     for i = 1, #itens do
         doPlayerAddItem(cid, itens[i][1], itens[i][2])
     end
     setPlayerStorageValue(cid, storage, 1)
     doSendMagicEffect(getThingPos(cid), 29)
     doPlayerRemoveItem(cid, 10503, 1)
    doSetItemAttribute(item.uid, "unique", itens(cid)) --- ??
  else
     doPlayerSendTextMessage(cid, 22, "Vazio.")
  end
  else
  doPlayerSendCancel(cid,'Voçe Ja Ganhou Sua Box Inicial')
  end
return true
end
 
Back
Top