Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Primeiramente vá em Data/actions/scripts/order.lua e Procure por:
- -------- TRANSFORM ----------
- Apague tudo aqui dentro, até o:
- -------- LIGHT ------------
- Ai dentro ditto coloque isto:
- [spoiler]
- 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
- end
- [/spoiler]
- Pronto 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:
- [spoiler]
- function onSay(cid, words, param, channel)
- local thisball = getPlayerSlotItem(cid, 8)
- if getItemAttribute(thisball.uid, "ehditto") then
- doItemSetAttribute(thisball.uid, "poke", "Ditto")
- doItemSetAttribute(thisball.uid, "ehditto", 1)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Puxe o ditto para terminar a reversão do ditto.')
- elseif getItemAttribute(thisball.uid, "ehshinyditto") then
- doItemSetAttribute(thisball.uid, "poke", "Shiny Ditto")
- doItemSetAttribute(thisball.uid, "ehshinyditto", 1)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Puxe o Shiny Ditto para terminar a reversão do Shiny Ditto.')
- else
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você Não Está Usando Um Ditto ou Shiny Ditto.')
- end
- end
- [/spoiler]
- e em talkactions.xml coloque isto:
- <talkaction words="!revert" event="script" value="dittorevert.lua"/>
- 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:
- [spoiler]
- 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)
- [/spoiler]
- e substitua por isto:
- [spoiler]
- 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
- [/spoiler]
- 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:
- table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")
- substitua por:
- if getItemAttribute(thing.uid, "ehditto") == 1 then
- table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." (Ditto).\n")
- elseif getItemAttribute(thing.uid, "ehshinyditto") == 1 then
- table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename.." (Shiny Ditto).\n")
- else
- table.insert(str, "\nIt contains "..getArticle(pokename).." "..pokename..".\n")
- end
- Em actions/scripts/goback.lua procure por:
- [spoiler]
- 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
- end
- [/spoiler]
- e apague!
- em lib/Some Functions.lua procure por:
- [spoiler]
- 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
- end
- [/spoiler]
- e substitua 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)
- end
- Ainda em Some functions procure por:
- if getCreatureName(pokemon) == "Ditto" then
- if isTransformed(pokemon) then
- local left = getItemAttribute(pokeball.uid, "transLeft") - (os.clock() - getItemAttribute(pokeball.uid, "transBegin"))
- doItemSetAttribute(pokeball.uid, "transLeft", left)
- end
- end
- e apague
- e para finalizar procure por:
- if getCreatureName(pokemon) == "Shiny Ditto" then
- if isTransformed(pokemon) then
- local left = getItemAttribute(pokeball.uid, "transLeft") - (os.clock() - getItemAttribute(pokeball.uid, "transBegin"))
- doItemSetAttribute(pokeball.uid, "transLeft", left)
- end
- end
- e Apague!!!!!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement