assim.. o sistema de unique tem uma limitaçao... n funciona com itens Stackables... tirando isso...
pokeballs eh soh por..
doSetItemAttribute(item.uid, "unique", getCreatureName(cid))
outros itens tem q por aquilo ali /\ e tb tens q ir em movements/movements.xml e achar isso..
<movevent type="AddItem" itemid="11826-11837;11737-11748;12325-12329;12332;12580;2391;10975-10977" event="script" value="UniqueItem.lua"/> <movevent type="RemoveItem" itemid="11826-11837;11737-11748;12325-12329;12332;12580;2391;10975-10977" event="script" value="UniqueItem.lua"/>
e adicionar os IDs dos itens q tu quer por unique...
e sobre os baus..
function addPokemonToPlayer(cid, pokemon, ball, unique)
if not cid or not isCreature(cid) then return false end
local pokemon = doCorrectString(pokemon)
if not pokes[pokemon] then return false end
local gender = getRandomGenderByName(pokemon)
local btype = (ball and pokeballs[ball]) and ball or "normal"
local happy = 250
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
item = doCreateItemEx(11826)
else
item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)
end
if not item then return false end
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doSetItemAttribute(item, "hands", 0)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
if unique then
doItemSetAttribute(item, "unique", getCreatureName(cid))
end
if getPlayerFreeCap(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
doPlayerSendMailByName(getCreatureName(cid), item, 1)
end
doTransformItem(item, pokeballs[btype].on)
return true
end
local pokes = {
--[action dos baus] = poke q vai ganhar,
[1111] = "Bulbasaur",
[2222] = "Squirtle",
[3333] = "Charmander",
}
local sto = 587899 --storage dos baus...
function onUse(cid, item, frompos, item2, topos)
local pokemon = pokes[item.actionid]
if not pokemon then return true end
if getPlayerStorageValue(cid, sto) >= 1 then
return doPlayerSendTextMessage(cid, 27, "You already get the pokemon!")
end
setPlayerStorageValue(cid, sto, 1)
addPokemonToPlayer(cid, pokemon, "normal", true)
doPlayerSendTextMessage(cid, 27, "Coungradulations you have received ".. getArticle(pokemon) .." "..pokemon..".")
return true
end
tag:
<action actionid="xxxx" event="script" value="yyyy.lua"/>






info
Grupo: Barão
Registrado: 16/11/07
Posts: 200
Reputação: +88
Olá
Não estou conseguindo colocar nenhum Unique Item no PDA pelo sistema que já vem no servidor, seja pokebola, potions ou outra coisa.
Não sei se estou fazendo certo... Queria um script de quest, cada uma para um baú com 3 pokémons e que já viesse unique...
Uso o método ACC/Char por site e ele copia dos Samples, alguém sabe o que fazer para dar certo?
Obrigado.