Ir para conteúdo
  • Cadastre-se

(Resolvido)Erro no Login


Ir para solução Resolvido por Nogard,

Posts Recomendados

Ola, eu ja tente de tudo mas nao consigo arrumar esse erro

Alguém poderia me ajudar?

 

Erro:

Zaine has logged in.

 

Zaine has logged in.

 
[22/10/2014 00:04:52] [Error - CreatureScript Interface] 
[22/10/2014 00:04:52] data/creaturescripts/scripts/login.lua:onLogin
[22/10/2014 00:04:52] Description: 
[22/10/2014 00:04:52] data/lib/IconSys.lua:269: attempt to index local 'x' (a nil value)
[22/10/2014 00:04:52] stack traceback:
[22/10/2014 00:04:52]  data/lib/IconSys.lua:269: in function 'doPlayerChangeModeIcon'
[22/10/2014 00:04:52]  data/creaturescripts/scripts/login.lua:280: in function <data/creaturescripts/scripts/login.lua:6>
[22/10/2014 00:04:52] Zaine has logged out.
[22/10/2014 00:05:03] Dinhoz has logged out.

 

 
Me Login

 

local config = {

loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
 
function onLogin(cid)
 
if getPlayerStorageValue(cid, 181625) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181622) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181627) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181626) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181624) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181628) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181629) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181623) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
elseif getPlayerStorageValue(cid, 181621) >= 1 then
setPlayerStorageValue(cid, 862281, 5)
end
 
if getPlayerStorageValue(cid, 54669) == 0 or getPlayerStorageValue(cid, 54669) == nil then
 
setPlayerStorageValue(cid, 54669, 1)
 
doPlayerAddItem(cid, 12344, 10, false)
doPlayerAddItem(cid, 2160, 1, false)
doPlayerAddItem(cid, 12347, 30, false)
doPlayerAddItem(cid, 2392, 30, false)
end
 
if getPlayerStorageValue(cid, 54663) >= 1 then
setPlayerStorageValue(cid, 54663, 0)
end
if getPlayerStorageValue(cid, 54664) >= 1 then
setPlayerStorageValue(cid, 54664, 0)
end
 
if getPlayerStorageValue(cid, 990) >= 1 then
setPlayerStorageValue(cid, 990, 0)
end
if getPlayerStorageValue(cid, 52481) >= 1 then
setPlayerStorageValue(cid, 52481, 0)
end
 
local accountManager = getPlayerAccountManager(cid)
   if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 80 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 90)
doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 81 and getPlayerLevel(cid) <= 149 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
doCreatureSetDropLoot(cid, false)
end
   if getPlayerLevel(cid) >= 150 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 75)
doCreatureSetDropLoot(cid, false)
end
 
if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str
end
 
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 
elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end
 
if getCreatureName(cid) == "Account Manager" then
local outfit = {}
if accountManagerRandomPokemonOutfit then
outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
else
outfit = accountManagerOutfit
end
 
doSetCreatureOutfit(cid, outfit, -1)
return true
end
 
if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end
 
local outfit = {}
 
if getPlayerVocation(cid) == 0 then
doPlayerSetMaxCapacity(cid, 0)
doPlayerSetVocation(cid, 1)
setCreatureMaxMana(cid, 6)
doPlayerAddSoul(cid, -getPlayerSoul(cid))
setPlayerStorageValue(cid, 19898, 0)
if getCreatureOutfit(cid).lookType == 128 then
outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
elseif getCreatureOutfit(cid).lookType == 136 then
outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
end
doCreatureChangeOutfit(cid, outfit)
end
 
registerCreatureEvent(cid, "dropStone")
    registerCreatureEvent(cid, "ShowPokedex") --alterado v1.6
    registerCreatureEvent(cid, "ClosePokedex") --alterado v1.6 
registerCreatureEvent(cid, "WatchTv")
registerCreatureEvent(cid, "StopWatchingTv")
registerCreatureEvent(cid, "WalkTv")
registerCreatureEvent(cid, "RecordTv")
registerCreatureEvent(cid, "PlayerLogout")
registerCreatureEvent(cid, "WildAttack")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "PokemonIdle")
registerCreatureEvent(cid, "EffectOnAdvance")
registerCreatureEvent(cid, "GeneralConfiguration")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "LookSystem")
registerCreatureEvent(cid, "T1")
registerCreatureEvent(cid, "T2")
registerCreatureEvent(cid, "task_count")
registerCreatureEvent(cid, "pokemons")
 
 
addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "Bem Vindo!!", COLOR_BURN)
 
if getPlayerStorageValue(cid, 99284) == 1 then
setPlayerStorageValue(cid, 99284, -1)
end
 
    if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
       setPlayerStorageValue(cid, 6598754, -1)
       setPlayerStorageValue(cid, 6598755, -1)
       doRemoveCondition(cid, CONDITION_OUTFIT)             --alterado v1.9 \/
       doTeleportThing(cid, posBackPVP, false)
       doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
    end
    
doChangeSpeed(cid, -(getCreatureSpeed(cid)))
 
--///////////////////////////////////////////////////////////////////////////--
    local storages = {17000, 63215, 17001, 13008, 5700}
    for s = 1, #storages do
        if not tonumber(getPlayerStorageValue(cid, storages)) then
           if s == 3 then
              setPlayerStorageValue(cid, storages, 1)
           elseif s == 4 then
              setPlayerStorageValue(cid, storages, -1)
           else   
              if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
                 setPlayerStorageValue(cid, storages, 1)                 
              else
                 setPlayerStorageValue(cid, storages, -1) 
              end
           end
           doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
        end
    end
    --/////////////////////////////////////////////////////////////////////////--
if getPlayerStorageValue(cid, 17000) >= 1 then -- fly
        
 
if getFlyingMarkedPos(cid) == nil then
setPlayerStorageValue(cid, 17000, 0)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
doRegainSpeed(cid)
else
local apos = getFlyingMarkedPos(cid)
    apos.stackpos = 0
 
local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")
doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
doRemoveCondition(cid, CONDITION_OUTFIT)
doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)
 
if getTileThingByPos(apos).itemid <= 2 then
doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
doCreateItem(460, 1, getFlyingMarkedPos(cid))
end 
 
doTeleportThing(cid, apos, false)
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
       sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])
                     --alterado v1.8
    end  
 
    local posicao = getTownTemplePosition(getPlayerTown(cid))
    markFlyingPos(cid, posicao)
end
    
elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf
 
local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")
doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
           sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
        end 
 
elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride
        
local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")
 
 
if rides[poke] then
  doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
  doRemoveCondition(cid, CONDITION_OUTFIT)
  doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
  if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then   
              sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")])                     --alterado v1.8
           end 
else
  setPlayerStorageValue(cid, 17001, -1)
  doRegainSpeed(cid)   
end
 
   local posicao2 = getTownTemplePosition(getPlayerTown(cid))
        markFlyingPos(cid, posicao2)
        
elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
       if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
setPlayerStorageValue(cid, 13008, 0)
doRegainSpeed(cid)              
doRemoveCondition(cid, CONDITION_OUTFIT)
return true
end   
          
       if getPlayerSex(cid) == 1 then
          doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       else
          doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
       end
       doChangeSpeed(cid, 800)
 
     elseif getPlayerStorageValue(cid, 5700) > 0 then   --bike
        doChangeSpeed(cid, -getCreatureSpeed(cid))
        doChangeSpeed(cid, getPlayerStorageValue(cid, 5700))  --alterado v1.8
        if getPlayerSex(cid) == 1 then
           doSetCreatureOutfit(cid, {lookType = 1394}, -1)
        else
           doSetCreatureOutfit(cid, {lookType = 1393}, -1)
        end
     
     elseif getPlayerStorageValue(cid, 75846) >= 1 then     --alterado v1.9 \/
        doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)  
        setPlayerStorageValue(cid, 75846, -1)
        sendMsgToPlayer(cid, 20, "You have been moved to your town!")
else
doRegainSpeed(cid)  
end
 
if getPlayerStorageValue(cid, 22545) >= 1 then
  setPlayerStorageValue(cid, 22545, -1)              
  doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
       setPlayerRecordWaves(cid)     
    end
    
if useKpdoDlls then
  doUpdateMoves(cid)
  doUpdatePokemonsBar(cid)
  onPokeHealthChange(cid)
end
doPlayerChangeModeIcon(cid)
return true
end

 

Agradeço quem poder me ajudar.

Darei +rap

 

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

Link para o post
Compartilhar em outros sites

 

Ola, eu ja tente de tudo mas nao consigo arrumar esse erro

Alguém poderia me ajudar?

 

Erro:

Zaine has logged in.

 

 
Me Login

 

Agradeço quem poder me ajudar.

Darei +rap

 

Mano tem como você postar o seu Iconsys.lua ??? acho que poderia ajudar mais no topico  -.- , Não sou la daqueles scripters mais já vi que tem algo errado que não tenha como já fala no erro '(a nil value)' Ou seja nenhum valor

Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais...

________________________________________________________________________________

Minhas Sprites:

Mega Metagross

Mega Abomasnow

Pack de Shinys

[Posso atualizá-lo com novos shinys a qualquer momento]

Tutoriais:

[Completo] Criando e adicionando um novo Pokémon

[Actions] Criando quest no RME

Editores Lua/Xml/Sync Entre outros:

Editores Win/Mac/Linux

Link para o post
Compartilhar em outros sites

Ok ai esta

 

function doPlayerChangeModeIcon(cid)

if getPlayerStorageValue(cid, 8955) >= 1 then
local x = icons[getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")]
local y = icons[getItemAttribute(getPlayerSlotItem(cid, 3).uid, "poke")]
if x and getPlayerSlotItem(cid, 8).itemid == 11826 then     -- Pokeball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11828 then     -- Pokeball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11827 then     -- Pokeball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11829 then     -- Ultraball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11831 then     -- Ultraball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11830 then     -- Ultraball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11835 then     -- Superball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11837 then     -- Superball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11836 then     -- Superball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11832 then     -- Greatball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11834 then     -- Greatball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11833 then     -- Greatball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 10975 then     -- Saffariball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 10977 then     -- Saffariball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 10976 then     -- Saffariball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12826 then     -- Darkball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12828 then     -- Darkball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12827 then     -- Darkball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11740 then     -- Shiny Greatball
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11742 then     -- Shiny Greatball Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11741 then     -- Shiny Greatball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
 elseif x and getPlayerSlotItem(cid, 8).itemid == 11743 then     -- Shiny Super
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11745 then     -- Shiny Super Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11744 then     -- Shiny Superball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11746 then     -- Shiny Ultra
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11748 then     -- Shiny Ultra Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11747 then     -- Shiny Ultraball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11737 then     -- Shiny Poke
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11739 then     -- Shiny Poke Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 11738 then     -- Shiny Pokeball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12621 then     -- Shiny Saffari
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12623 then     -- Shiny Saffari Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12622 then     -- Shiny Saffariball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12829 then     -- Shiny Dark
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.on)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12831 then     -- Shiny Dark Morta
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.off)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
 
elseif x and getPlayerSlotItem(cid, 8).itemid == 12830 then     -- Shiny Darkball Usada
 doTransformItem(getPlayerSlotItem(cid, 8).uid, x.use)
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "ball", "Icone")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "morta", "no")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "yes")
 doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "shiny", "yes")
end
 
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
local balls = getItemsInContainerById(bp.uid, 11826)  ------ Pokeball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11828) --- Pokeball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "yes")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
--------------------------------
local balls = getItemsInContainerById(bp.uid, 11829)  ------ Ultraball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11831) --- Ultraball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "yes")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
------------------------------
local balls = getItemsInContainerById(bp.uid, 11835)  ------ Superball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11837) --- Superball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "yes")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
-----------------------------
local balls = getItemsInContainerById(bp.uid, 11834)  ------ Greatball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(balll, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11832) --- Greatball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "no")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
-----------------------------
local balls = getItemsInContainerById(bp.uid, 10975)  ------ Saffariball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(balll, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 10977) --- Saffariball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "no")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
-----------------------------
local balls = getItemsInContainerById(bp.uid, 12826)  ------ Darkball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(balll, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 12828) --- Darkball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                 doItemSetAttribute(ball, "ball", "Icone")
                 doItemSetAttribute(ball, "morta", "no")
                 doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
-----------------------------------
local balls = getItemsInContainerById(bp.uid, 11740)  ------ Shiny Great
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
local balls = getItemsInContainerById(bp.uid, 11742)  ------ Shiny Greatball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
local balls = getItemsInContainerById(bp.uid, 11746)  ------ Shiny Ultraball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
local balls = getItemsInContainerById(bp.uid, 11748)  ------ Shiny Ultraball morta
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
 
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11737) -- Shiny Pokeball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11739) -- Shiny Pokeball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                --doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11740) -- Shiny Greatball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11742) -- Shiny Greatball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 11743) -- Shiny Superball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 11745) -- Shiny Super
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 12621) -- Shiny Saffariball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 12623) -- Shiny Saffari
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
---------------------------------------------------
local balls = getItemsInContainerById(bp.uid, 12829) -- Shiny Darkball
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.on)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "no")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
local balls = getItemsInContainerById(bp.uid, 12831) -- Shiny Dark
if #balls >= 1 then 
          for _, ball in pairs (balls) do
          local x = icons[getItemAttribute(ball, "poke")]
                doTransformItem(ball, x.off)
                doItemSetAttribute(ball, "ball", "Icone")
                doItemSetAttribute(ball, "morta", "yes")
                doItemSetAttribute(ball, "Icone", "yes")
          end 
end
else
local pokeball = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ball")
local mortano = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "morta")
local y = icons[getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke")]
if pokeball == "normal" and mortano == "no" then     -- Pokeball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11826)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "normal" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11828)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Pokeball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11829)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11831)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Pokeball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11835)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11837)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Pokeball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11832)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11834)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- saffariball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 10975)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 10977)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- darkball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12826)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12828)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- saffariball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11737)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11739)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Pokeball
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11746)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11748)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Shiny super
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11743)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11745) --- Shiny superr
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Shiny great
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11740)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 11742)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Shiny saffari
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12621)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12623)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "no" then     -- Shiny dark
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12829)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
elseif pokeball == "Icone" and mortano == "yes" then
  doTransformItem(getPlayerSlotItem(cid, 8).uid, 12831)
  doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "Icone", "no")
end
local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
x = { }
for a = 1, #x do
local balls = getItemsInContainerById(bp.uid, x[a])  
          for _, ball in pairs (balls) do
          local pokeball = getItemAttribute(ball, "ball")
          local mortano = getItemAttribute(ball, "morta")
              if getItemAttribute(ball, "ball") == "Icone" and getItemAttribute(ball, "morta") == "no" then -- Ultra ball
                doTransformItem(ball, 11829)
                doItemSetAttribute(ball, "Icone", "no")
              elseif getItemAttribute(ball, "ball") == "Icone" and getItemAttribute(ball, "morta") == "yes" then  -- Ultra ball morta
                doTransformItem(ball, 11831)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11826)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11828)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11835)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11837)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11832)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11834)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 10975)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 10977)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 12826)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 12828)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11737)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11739)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11740)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11742)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11743)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11745)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 11746)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 11748)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 12621)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 12623)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "no" then
                doTransformItem(ball, 12829)
                doItemSetAttribute(ball, "Icone", "no")
              elseif pokeball == "Icone" and mortano == "yes" then
                doTransformItem(ball, 12831)
                doItemSetAttribute(ball, "Icone", "no")
              end 
          end 
end
end
end 

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

Link para o post
Compartilhar em outros sites

Up


UP Up


Up


Up

Ajudei? da um Rep+, não custa nada. ;D:P

 

Servidor de PokeTibia ja online.

Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks

Grupo: https://www.facebook.com/groups/257989224406246/

Site: http://pokexstore.wix.com/pokexstore

Link para o post
Compartilhar em outros sites
  • Solução

Bom, você mesmo reportou o tópico como resolvido, então adicionarei a tag.

 

Na próxima coloque os códigos em spoiler, se possível.

F5MHzGo.gif

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo