function onUse (cid,item,frompos,item2,topos)
UID_DO_BAU = 53440
STORAGE_VALUE = 53437
ID_DO_PREMIO = 2394
ID_DO_PREMIO2 = 2152
ID_DO_PREMIO3 = 12346
ID_DO_PREMIO4 = 12344
if getPlayerLevel(cid) >= 1 then
if item.uid == UID_DO_BAU then
queststatus = getPlayerStorageValue(cid,STORAGE_VALUE)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada")
local item1 = doPlayerAddItem(cid,ID_DO_PREMIO,20)
doItemSetAttribute(item1, "unique", 1)
local item2 = doPlayerAddItem(cid,ID_DO_PREMIO2,10)
doItemSetAttribute(item2, "unique", 1)
local item3 = doPlayerAddItem(cid,ID_DO_PREMIO3,5)
doItemSetAttribute(item3, "unique", 1)
local item4 = doPlayerAddItem(cid,ID_DO_PREMIO4,5)
doItemSetAttribute(item4, "unique", 1)
setPlayerStorageValue(cid,STORAGE_VALUE,1)
else
doPlayerSendTextMessage(cid,22,"Ta Vazio")
end
end
else
doPlayerSendCancel(cid,'Somente LvL 10+')
end
return 1
end




info
Grupo: Artesão
Registrado: 22/07/11
Posts: 101
Reputação: +3
Gênero: Masculino
Char no Tibia: Clode
Preciso de uma ajuda em itens !!
Bom meu server ele tem um bau que da kit inicial pros players iniciantes.
Porem eu queria deixa estes itens como unique.
O formado da script ta como Quest com BAU.
Aii os itens queria deixa eles unique os player que pega os itens do BAU vim unique ^^
SCRIPT
function onUse (cid,item,frompos,item2,topos) UID_DO_BAU = 53440 STORAGE_VALUE = 53437 ID_DO_PREMIO = 2394 ID_DO_PREMIO2 = 2152 ID_DO_PREMIO3 = 12346 ID_DO_PREMIO4 = 12344 if getPlayerLevel(cid) >= 1 then if item.uid == UID_DO_BAU then queststatus = getPlayerStorageValue(cid,STORAGE_VALUE) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"Voce Pegou Seu Kit Inicial, Boa Sorte Na Sua Jornada") doPlayerAddItem(cid,ID_DO_PREMIO,20) doPlayerAddItem(cid,ID_DO_PREMIO2,10) doPlayerAddItem(cid,ID_DO_PREMIO3,5) doPlayerAddItem(cid,ID_DO_PREMIO4,5) setPlayerStorageValue(cid,STORAGE_VALUE,1) else doPlayerSendTextMessage(cid,22,"Ta Vazio") end end else doPlayerSendCancel(cid,'Somente LvL 10+') end return 1 endQuem puder ajudar ^^
Rep+++