Bom galera, pra quem esta montando seu servidor ai e não sabe como deixar os items inicias unique, aqui vai um tutorial.
OBS: Baseado no Pokemon Pda Slicer, creio que serve para Com e Sem level.
OBS²:Tutorial para quem já tem sistema de unique, e apenas não sabe como deixar os items unique
1º vá no script dos pokemons iniciais, no meu caso
/data/actions/scripts/starter.lua
Procure por
local item = doCreateItemEx(2219)
Nao delete isso, apenas em cima disso coloque
local uniq1 = doPlayerAddItem(cid,2394,20)
doSetItemAttribute(uniq1, "unique", cid)
doSetItemAttribute(uniq1, "description", "It's An Unique item")
Onde:
2394 = id do item
20 = quantidade
It's An Unique item = Descriçao do item
e Caso queira adicionar mais de 1 item apenas va alternando os Uniq1 por uniq2, uniq3.... igual no script abaixo
para os preguiçosos o script ja pronto, (Com Level)
local starterpokes = { ["Weedle"] = {x = 53, y = 70, z = 7}, ["Rattata"] = {x = 51, y = 70, z = 7}, ["Caterpie"] = {x = 49, y = 70, z = 7}, ["Bellsprout"] = {x = 43, y = 70, z = 7}, --alterado 2.7 -soh pegue se for usar o mapa do stigal!- ["Oddish"] = {x = 45, y = 70, z = 7}, ["Sunkern"] = {x = 47, y = 70, z = 7}, ["Pidgey"] = {x = 55, y = 70, z = 7}, } local level = 5 local extrastr = 1.5 local btype = "normal" function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) > 10 then return true end local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(topos, b) then pokemon = a end end if pokemon == "" then return true end --if getPlayerStorageValue(cid, 9658754) ~= 1 then --alterado v2.7 -opicional- --sendMsgToPlayer(cid, 27, "Talk to the Prof. Robert to choose your beginner city first!") --return true --end local gender = getRandomGenderByName(pokemon) local mypoke = getPokemonStatus(pokemon) if not mypoke then return true end local offense = mypoke.off * level * extrastr local defense = mypoke.def * level * extrastr local speed = mypoke.agi * level * extrastr local vit = mypoke.vit * level * extrastr local spatk = mypoke.spatk * level * extrastr local happy = 180 local leveltable = getPokemonExperienceTable(pokemon) local uniq1 = doPlayerAddItem(cid,2394,20) --pb doSetItemAttribute(uniq1, "unique", cid) doSetItemAttribute(uniq1, "description", "It's An Unique Item.") local uniq2 = doPlayerAddItem(cid, 2392, 10) -- ub doSetItemAttribute(uniq2, "unique", cid) doSetItemAttribute(uniq2, "description", "It's An Unique Item.") local uniq3 = doPlayerAddItem(cid, 12222, 30) --pizza doSetItemAttribute(uniq3, "unique", cid) doSetItemAttribute(uniq3, "description", "It's An Unique Item.") local uniq4 = doPlayerAddItem(cid, 12344, 5) --revive doSetItemAttribute(uniq4, "unique", cid) doSetItemAttribute(uniq4, "description", "It's An Unique Item.") local uniq5 = doPlayerAddItem(cid, 12348, 10) --pote doSetItemAttribute(uniq5, "unique", cid) doSetItemAttribute(uniq5, "description", "It's An Unique Item.") local uniq6 = doPlayerAddItem(cid, 11638, 1) --box doSetItemAttribute(uniq6, "unique", cid) doSetItemAttribute(uniq6, "description", "It's An Unique Item.") local item = doCreateItemEx(2219) doItemSetAttribute(item, "poke", pokemon) doItemSetAttribute(item, "hp", 1) doItemSetAttribute(item, "level", level) doItemSetAttribute(item, "exp", leveltable[level]) doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level]) doItemSetAttribute(item, "offense", offense) doItemSetAttribute(item, "defense", defense) doItemSetAttribute(item, "speed", speed) doItemSetAttribute(item, "vitality", vit) doItemSetAttribute(item, "specialattack", spatk) doItemSetAttribute(item, "happy", happy) doItemSetAttribute(item, "gender", gender) doItemSetAttribute(item, "description", "Contains a "..pokemon..".") doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".") doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6 doPlayerAddItemEx(cid, item, true) doTransformItem(item, pokeballs[btype].on) doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.") doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!") doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE end
Espero que tenha ajudado, e que tenham entendido.
Obrigado