tas ligado q o sistema de unique n funciona para itens stackables neh?
e n eh mais facil transformar os itens quando tu da eles pro player?
e achu melhor no caso fazer por onLogin usando talvez o mods/firstitems.xml...
Por ZeNit91, 20 de mar. de 2013 em Tópicos Sem Resposta
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

tas ligado q o sistema de unique n funciona para itens stackables neh?
e n eh mais facil transformar os itens quando tu da eles pro player?
e achu melhor no caso fazer por onLogin usando talvez o mods/firstitems.xml...
info
Grupo: Cavaleiro
Registrado: 08/01/11
Posts: 192
Reputação: +11
Gênero: Masculino

Vlw Slicer, resolvido rs, nao foi do jeito que planejei mais fico lgl.
Quer saber como ficou olhe \/
pokeotgr.sytes.net
RESOLVIDO PODE FEXA
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Cavaleiro
Registrado: 08/01/11
Posts: 192
Reputação: +11
Gênero: Masculino
Eae Galera.
Seguinte, gostaria de uma ajuda para fazer um um piso ou algo auto ativo que quando o player logar, todos os itens dele fiquem unique, mais isso deve ocorrer no instante que ele fizer o primeiro login na conta, apenas o primeiro ou algo que ando ele logar caia encima de um piso que seja ativado e transforme todos os itens do inventario em uniqueitem e o teletransporte para x area,
Se eu nao me engane esse é o codigo para UniqueItem,
function giveBack(item) --alterado v2.8 peguem o script todo!
local cid = getPlayerByName(getItemAttribute(item.uid, "unique"))
local attr = getBallsAttributes(item.uid)
local sendMail = false
---------------------------------- --alterado v2.9.1 \/
if not isCreature(cid) then
doRemoveItem(item.uid, 1)
return true
elseif (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
item2 = doCreateItemEx(item.itemid)
sendMail = true
else
item2 = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, item.itemid, 1)
end
----------------------------------
for a, b in pairs (attr) do
if b then
doItemSetAttribute(item2, a, b)
else
doItemEraseAttribute(item2, a)
end
end
if sendMail then
doPlayerSendMailByName(getItemAttribute(item2, "unique"), item2, 1)
end
doRemoveItem(item.uid, 1)
end
function onAddItem(moveitem, tileitem, position, cid)
if isContainer(moveitem.uid) then
local itens = getItensUniquesInContainer(moveitem.uid)
local sendMsg = false
if #itens >= 1 then
for a = 1, #itens do
if unLock(itens[a].uid) then
else
giveBack(itens[a])
sendMsg = true
end
end
if sendMsg then
doPlayerSendTextMessage(cid, 20, "A item in this container is a Unique Item. You can't throw away this item!")
end
end
else
if getItemAttribute(moveitem.uid, "unique") then
if unLock(moveitem.uid) then
return true
end
giveBack(moveitem)
doPlayerSendTextMessage(cid, 20, "It is a Unique Item, you can't throw away this item!")
end
end
return true
end
function onRemoveItem(moveitem, tileitem, position, cid)
if not moveitem or not moveitem.uid then return true end
--alterado v2.6.1
if moveitem.uid ~= 0 and isContainer(moveitem.uid) then
local itens = getItensUniquesInContainer(moveitem.uid)
local sendMsg = false
if #itens >= 1 then
for a = 1, #itens do --alterado v2.8
if not tonumber(getItemAttribute(itens[a].uid, "unique")) and getItemAttribute(itens[a].uid, "unique") ~= getCreatureName(cid) then
if unLock(itens[a].uid) then
else
giveBack(itens[a])
sendMsg = true
end
end
end
if sendMsg then
doPlayerSendTextMessage(cid, 20, "A item in this container is a Unique Item. This item don't belongs to you! It will be sent to this owner!")
end
end
else
if moveitem.uid ~= 0 and getItemAttribute(moveitem.uid, "boosting") and getItemAttribute(moveitem.uid, "boosting") >= 1 then
return true --alterado v2.9.1
end
if moveitem.uid ~= 0 and getItemAttribute(moveitem.uid, "unique") and not tonumber(getItemAttribute(moveitem.uid, "unique")) and getItemAttribute(moveitem.uid, "unique") ~= getCreatureName(cid) then
if unLock(moveitem.uid) then --alterado v2.8
return true
end
giveBack(moveitem)
doPlayerSendTextMessage(cid, 20, "It is a Unique Item! This item don't belongs to you! It will be sent to this owner!")
end
end
return true
end
Vlw des de ja