Opa, depois quando tiver tempo eu testo, pois já tenho um ditto system no meu ot que modifiquei para poder ter Slots de memoria pro ditto, tenho medo de ter que perder o memory system pra por o shiny ditto
Acho que tem um erro, na parte do status do ditto e shiny ditto, acho que está invertido, não?
if (getItemAttribute(item, "ehditto") == 1) then setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level")) setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense") + bonusoffense * 0.75) setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense") + bonusdefense * 0.75) setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed") + bonusagility * 0.75) setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack") + bonussattack * 0.75) elseif (getItemAttribute(item, "ehshinyditto") == 1) then setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level")) setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense") + bonusoffense * 0.50) setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense") + bonusdefense * 0.50) setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed") + bonusagility * 0.50) setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack") + bonussattack * 0.50) else setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level")) setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense") + bonusoffense) setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense") + bonusdefense) setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed") + bonusagility) setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack") + bonussattack) end








info
Grupo: Conde
Registrado: 14/04/15
Posts: 956
Reputação: +333
Gênero: Masculino
Eae pessoal blz?? eu peguei o ditto system postado pelo Wend e feito pelo Gabrielbsales(Featzen), então só mudei algumas tags e modifiquei um pouco e dei umas melhorias, bem pequenas só que vão ajudar, creio eu
Então vamos parar de blábláblá em começar o tutorial!
Primeiramente vá em Data/actions/scripts/order.lua e Procure por:
Apague tudo aqui dentro, até o:
Ai dentro ditto coloque isto:
if (getCreatureName(mysum) == "Ditto") and getItemAttribute(thisball.uid, "ehditto") ~= -1 and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then local m = getCreatureMaster(cid) local p = getPlayerSlotItem(m, 8) local proibidossempre = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew", "Shiny Rhydon", "Shiny Ariados", "Shiny Magneton", "Shiny Ninetales", "Shiny Politoed", "Shiny Stantler", "Shiny Dodrio", "Shiny Espeon", "Shiny Umbreon"} -- Nunca permitir local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50 local boost = getItemAttribute(thisball.uid, "boost") or 0 if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.") markPos(mysum, unfix) return true end if isInArray(proibidossempre, getCreatureName(item2.uid)) then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then doPlayerSendCancel(cid, "Your ditto is already transformed into that pokemon.") markPos(mysum, unfix) return true end markPos(mysum, unfix) local name = getCreatureName(item2.uid) setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid)) doItemSetAttribute(thisball.uid, "ehditto", 1) doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid)) doUpdateMoves(cid) doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1) doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER) doFaceCreature(mysum, getThingPos(item2.uid)) doSendMagicEffect(getThingPos(mysum), 184) doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", 1) return true end ----------------------------- -------- TRANSFORM Shiny Ditto ---------- --alterado v1.7 if (getCreatureName(mysum) == "Shiny Ditto") and getItemAttribute(thisball.uid, "ehshinyditto") ~= -1 and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then local m = getCreatureMaster(cid) local p = getPlayerSlotItem(m, 8) local proibidossempre = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew", "Shiny Rhydon", "Shiny Ariados", "Shiny Magneton", "Shiny Ninetales", "Shiny Politoed", "Shiny Stantler", "Shiny Dodrio", "Shiny Espeon", "Shiny Umbreon"} -- Nunca permitir local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50 local boost = getItemAttribute(thisball.uid, "boost") or 0 if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.") markPos(mysum, unfix) return true end if isInArray(proibidossempre, getCreatureName(item2.uid)) then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.") markPos(mysum, unfix) return true end if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then doPlayerSendCancel(cid, "Your ditto is already transformed into that pokemon.") markPos(mysum, unfix) return true end markPos(mysum, unfix) local name = getCreatureName(item2.uid) setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid)) doItemSetAttribute(thisball.uid, "ehshinyditto", 1) doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid)) doUpdateMoves(cid) doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1) doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER) doFaceCreature(mysum, getThingPos(item2.uid)) doSendMagicEffect(getThingPos(mysum), 184) --doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", 1) doCreatureSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", TALKTYPE_ORANGE_1) return true endPronto Agora esta transformando e copiando as habilidades e tudo! Agora Para o ditto e shiny ditto reverter a transformação .
Crie um arquivo chamado dittorevert.lua em data/talkactions e coloque isto dentro:
e em talkactions.xml coloque isto:
Pronto sistema 100% só que ele está com nome, poder, força tudo igual! para resolver isto vamos em lib/level system.lua
abra e procure por isto:
e substitua por isto:
Pronto Agora o Shiny ditto ta com 75% de força do poke transformado e o ditto com 50% de força do pokemon transformado
Agora para identificar que é um ditto/shiny ditto vamos em creaturescript/scripts/look.lua, abra e procure por:
substitua por:
Em actions/scripts/goback.lua procure por:
if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited local left = getItemAttribute(item.uid, "transLeft") local name = getItemAttribute(item.uid, "transName") if left and left > 0 then setPlayerStorageValue(pk, 1010, name) doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn")) doItemSetAttribute(item.uid, "transBegin", os.clock()) else setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited end ende apague!
em lib/Some Functions.lua procure por:
function doAppear(cid) --Faz um poke q tava invisivel voltar a ser visivel... if not isCreature(cid) then return true end doRemoveCondition(cid, CONDITION_INVISIBLE) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureSetHideHealth(cid, false) if getCreatureName(cid) == "Ditto" and pokes[getPlayerStorageValue(cid, 1010)] and getPlayerStorageValue(cid, 1010) ~= "Ditto" then if isSummon(cid) then local item = getPlayerSlotItem(getCreatureMaster(cid), 8) doSetCreatureOutfit(cid, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) --alterado v1.6.1 end end ende substitua por:
Ainda em Some functions procure por:
e apague
e para finalizar procure por:
e Apague!!!!!!!
Pronto Agora sim Sistema 100% Esta Copiando Habilidades, força diminuida do pokemon normal e identificação do Ditto e Shiny Ditto! Acredito que vai ajudar a muitos!
Créditos
Gabrielbsales Por criar o Script
Wend por fazer um tutorial mais completo
Zet0N0Murmurou (Summer Slyer) por adaptar e melhorar o script para o Shiny Ditto!
UP
Editado Julho 7 por Zet0N0Murmurouu