Drazyn1291

Ditto System in oder.lua

Jan 6th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.56 KB | None | 0 0
  1. if isDitto(mysum) and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then
  2.     local m = getCreatureMaster(cid)
  3.     local p = getPlayerSlotItem(m, 8)
  4.     local proibidosditto = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew"} -- Nunca permitir pro ditto
  5.         local proibidosshinyditto = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew"} -- Nunca permitir pro shiny ditto
  6.     local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50
  7.     local boost = getItemAttribute(thisball.uid, "boost") or 0
  8.     if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then
  9.         doPlayerSendCancel(cid, "Your ".. getPokeName(mysum) .." can't transform into another ".. getCreatureName(item2.uid) ..".")
  10.         markPos(mysum, unfix)
  11.         return true
  12.     end
  13.  
  14.     if isInArray(proibidosditto, getCreatureName(item2.uid)) then --Checa a lista
  15.         doPlayerSendCancel(cid, "Your ".. getPokeName(mysum) .." can't transform into that pokemon.")
  16.         markPos(mysum, unfix)
  17.         return true
  18.     end
  19.  
  20.     if isInArray(proibidosshinyditto, getCreatureName(item2.uid)) then --Checa a lista
  21.         doPlayerSendCancel(cid, "Your ".. getPokeName(mysum) .." can't transform into that pokemon.")
  22.         markPos(mysum, unfix)
  23.         return true
  24.     end
  25.  
  26.     if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista
  27.         doPlayerSendCancel(cid, "Your ".. getPokeName(mysum) .." can't transform into that pokemon.")
  28.         markPos(mysum, unfix)
  29.         return true
  30.     end
  31.  
  32.     if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then
  33.         doPlayerSendCancel(cid, "Your ".. getPokeName(mysum) .." is already transformed into that pokemon.")
  34.         markPos(mysum, unfix)
  35.         return true
  36.     end
  37.     markPos(mysum, unfix)
  38.     setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid))
  39.  
  40.     if getCreatureName(mysum) == "Ditto" then
  41.         doItemSetAttribute(thisball.uid, "ehditto", 1)
  42.     elseif getCreatureName(mysum) == "Shiny Ditto" then
  43.         doItemSetAttribute(thisball.uid, "ehshinyditto", 1)
  44.     end
  45.  
  46.     doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid))
  47.     doUpdateMoves(cid)
  48.     doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1)
  49.     doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER)
  50.     doFaceCreature(mysum, getThingPos(item2.uid))
  51.     doSendMagicEffect(getThingPos(mysum), 184)
  52.     doCreatureSetNick(mysum), getPokeName(mysum))
  53.     doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", 1)
  54.     return true
  55. end
Advertisement
Add Comment
Please, Sign In to add comment