Postado Maio 26, 2014 11 anos como eu coloco pokemon na dentro da chest pra ficar tipo um kit inicial
Postado Maio 26, 2014 11 anos Você criou três tópicos iguais e ainda postou na seção errada. Os outros dois foram movidos para a lixeira, dá próxima vez você será alertado! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de Servidores Derivados"
Postado Maio 26, 2014 11 anos Cria uma pasta chamada quest100.lua local starterpokes = { ["Nome do Pokemon Letra Inicial Maiuscula"] = {x = cordenada x, y = cordenada y, z = cordenada z}, } 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 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) doPlayerAddItem(cid, 2152, 2) doPlayerAddItem(cid, 2394, 10) doPlayerAddItem(cid, 12344, 2) local balls = doPlayerAddItem(cid, 2394, 10) doItemSetAttribute(balls, "unique", cid) --alterado v2.8 as pokeballs iniciais viram uniques... 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, "Você achou um novo pokemon, boa jornada.") doPlayerSendTextMessage(cid, 27, "Não esqueca de usar a pokedex neste novo pokemon.") doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE end depois vai em actions.xml execula com notped ++ ou bloco de notas e poe em qualquer lugar esse nome no spoiler <action actionid="1000" script="quest100.lua"/> Despois vá no seu rme onde estiver o bau e coloque o action id do bau onde tiver o 0 coloquei 1000 e depois dê ok e salve o mapa e inicie o server e teste se der certo fala e se gostar da +rep Editado Maio 26, 2014 11 anos por Nildson (veja o histórico de edições) Projeto em desenvolvimento ↓↓
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.