Postado Março 28, 2017 8 anos Autor Em 15/03/2017 ás 16:04, arthurmgoncalves disse: Vlw, man pelo script script da shiny stone: local evo = { ["Gengar"] = {"Shiny Gengar", 1}, } local balls = { [11826] = {newBall = 11826}, [11832] = {newBall = 11832}, [11835] = {newBall = 11835}, [11829] = {newBall = 11829}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then local monster = getCreatureName(itemEx.uid) if evo[monster] then if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then doPlayerSendTextMessage(cid, 27, "Parabens! Seu "..getPokeName(itemEx.uid).." evoluiu para "..evo[monster][1].."!") doSendMagicEffect(getThingPos(itemEx.uid), 18) doRemoveCreature(itemEx.uid) doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1) doRemoveItem(item.uid, 1) doSummonMonster(cid,evo[monster][1]) local pokeball = getPlayerSlotItem(cid, 8) doItemSetAttribute(pokeball.uid, "poke", evo[monster][1]) doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "happy", 110) local pk = getCreatureSummons(cid)[1] local oldpos = getThingPos(itemEx.uid) local oldlod = getCreatureLookDir(itemEx.uid) local oldlvl = getPokemonLevel(itemEx.uid) doTeleportThing(pk, oldpos, false) doCreatureSetLookDir(pk, oldlod) sendFinishEvolutionEffect(pk, true) addEvent(sendFinishEvolutionEffect, 550, pk, true) addEvent(sendFinishEvolutionEffect, 1050, pk) local status = getPokemonStatus(getCreatureName(pk)) local off = status.off local def = status.def local agi = status.agi local spatk = status.spatk local vit = status.vit doPlayerSendTextMessage(cid, 27, "Evolution bonus: • Offense: +"..doMathDecimal(off).." • Defense: +"..doMathDecimal(def).." • Spc. Atk: +"..doMathDecimal(spatk).." • Agility: +"..doMathDecimal(agi).." • Vitality: +"..doMathDecimal(vit).."") adjustStatus(pk, pokeball.uid, true, false) return TRUE else return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!") end end end return FALSE end @luangop com esse ai acho que tem que fazer varias modificaçoes mas com esse outro script funciona normal, mas nao tem o valor de quantas stones precisa, so usa uma shiny stone tem como configurar o valor de quantas stones posso usar pra ter o shiny o script: function onUse(cid, item, frompos, item2, topos) local cfg = { eff_one = 15, --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no pokémon) eff_two = 18, --Efeito que irá sair ao evoluir o pokémon (esse efeito aparecerá no player) proibidos = false, --Terá pokémons proibidos para evoluir? [true/sim] [false/não] } local can_not = {} if cfg.proibidos == true then can_not = {"Espeon", "Umbreon", "Magneton"} --Pokémons que não podem evoluir. end if not isMonster(item2.uid) or not isSummon(item2.uid) then return true end if not pokes["Shiny "..getCreatureName(item2.uid)] then return doPlayerSendCancel(cid, "Esse pokémon não possui uma forma shiny.") end local minlevel = pokes["Shiny "..getCreatureName(item2.uid)].level if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then return doPlayerSendCancel(cid, "Você só pode evoluir seu próprio pokémon.") end if getPlayerLevel(cid) < minlevel then return doPlayerSendCancel(cid, "Você não tem o level necessário para evoluir esse pokémon. ("..minlevel..").") end if isInArray(can_not, getCreatureName(item2.uid)) then return doPlayerSendCancel(cid, "Você não pode evoluir esse pokémon!") end local nome = "Shiny "..getCreatureName(item2.uid) local owner = getCreatureMaster(item2.uid) local pokeball = getPlayerSlotItem(cid, 8) local description = "Contains a "..nome.."." local pct = getCreatureHealth(item2.uid) / getCreatureMaxHealth(item2.uid) doItemSetAttribute(pokeball.uid, "hp", pct) doItemSetAttribute(pokeball.uid, "poke", nome) doItemSetAttribute(pokeball.uid, "description", "Contains a "..nome..".") doPlayerSendTextMessage(cid, 27, "Parabéns! Seu "..getPokeName(item2.uid).." se transformou em um "..nome.."!") doSendMagicEffect(getThingPos(item2.uid), cfg.eff_one) doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[nome]) doSendMagicEffect(getThingPos(cid), cfg.eff_two) local oldpos = getThingPos(item2.uid) local oldlod = getCreatureLookDir(item2.uid) doRemoveCreature(item2.uid) doSummonMonster(cid, nome) local pk = getCreatureSummons(cid)[1] doTeleportThing(pk, oldpos, false) doCreatureSetLookDir(pk, oldlod) doRemoveItem(item.uid, 1) doAddPokemonInOwnList(cid, nome) local happy = getItemAttribute(pokeball.uid, "happy") doItemSetAttribute(pokeball.uid, "happy", happy + happyGainedOnEvolution) if happy + happyGainedOnEvolution > 255 then doItemSetAttribute(pokeball.uid, "happy", 255) end adjustStatus(pk, pokeball.uid, true, false) if useKpdoDlls then doUpdateMoves(cid) end return true Editado Março 31, 2017 8 anos por arthurmgoncalves (veja o histórico de edições)
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.