Ir para conteúdo
  • 0
fhoenix00

pedido scripts Spawn Aleatorio de Megas (Igual os Shinys)

Pergunta

Galera Seguinte, Queria adicionar um Spawn aleatorio de pokemons megas no meu servidor...

Tentei fazer de um jeito que vi aqui no forum só que bugou tudo meu server, os ataques em area dos pokemons selvagens começaram a acertar os outros selvagens...

 

Este é meu Spawn.lua

 

Please login or register to see this spoiler.

 

Pf ajudem ai Rep+++

Compartilhar este post


Link para o post
Compartilhar em outros sites

18 respostass a esta questão

Posts Recomendados

  • 0
local megas = {"Venusaur", "Blastoise"} 
local shinys = {
"Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}                               

local function ShinyName(cid)
if isCreature(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(.*)")          
      doCreatureSetNick(cid, newName)
      if isMonster(cid) then
         doSetCreatureDropLoot(cid, false)  
      end
   end
end
end

local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
        if rate == 0 then
            gender = 3
        elseif rate == 500 then
            gender = 4
        elseif rate == -1 then
            gender = 2
        elseif math.random(1, 500) <= rate then
            gender = 4
        else
            gender = 3
        end
    doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 10.0    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5.8   --1% chance       
else
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

local function doMega(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 100.0    --1% chance        
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

                                                                
function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")
    
    if isSummon(cid) then
        registerCreatureEvent(cid, "SummonDeath")
    return true
    end
    
    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

return true
end

 

Não tenho certeza se vai funcionar, mas testa aí. Adiciona ali os mega que tem. Tá com 100% de chance de spawnar só pra testar, dps vc coloca a chance que vc quiser ai.

Atenção: Siga o prefixo de postagem, primeiro aviso.

 

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
14 minutos atrás, bXnny disse:
local megas = {"Venusaur", "Blastoise"} 
local shinys = {
"Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}                               

local function ShinyName(cid)
if isCreature(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(.*)")          
      doCreatureSetNick(cid, newName)
      if isMonster(cid) then
         doSetCreatureDropLoot(cid, false)  
      end
   end
end
end

local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
        if rate == 0 then
            gender = 3
        elseif rate == 500 then
            gender = 4
        elseif rate == -1 then
            gender = 2
        elseif math.random(1, 500) <= rate then
            gender = 4
        else
            gender = 3
        end
    doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 10.0    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5.8   --1% chance       
else
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

local function doMega(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 100.0    --1% chance        
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

                                                                
function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")
    
    if isSummon(cid) then
        registerCreatureEvent(cid, "SummonDeath")
    return true
    end
    
    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

return true
end

 

Não tenho certeza se vai funcionar, mas testa aí. Adiciona ali os mega que tem. Tá com 100% de chance de spawnar só pra testar, dps vc coloca a chance que vc quiser ai.

Atenção: Siga o prefixo de postagem, primeiro aviso.

 

13 minutos atrás, bXnny disse:
local megas = {"Venusaur", "Blastoise"} 
local shinys = {
"Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}                               

local function ShinyName(cid)
if isCreature(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(.*)")          
      doCreatureSetNick(cid, newName)
      if isMonster(cid) then
         doSetCreatureDropLoot(cid, false)  
      end
   end
end
end

local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
        if rate == 0 then
            gender = 3
        elseif rate == 500 then
            gender = 4
        elseif rate == -1 then
            gender = 2
        elseif math.random(1, 500) <= rate then
            gender = 4
        else
            gender = 3
        end
    doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 10.0    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5.8   --1% chance       
else
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

local function doMega(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 100.0    --1% chance        
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

                                                                
function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")
    
    if isSummon(cid) then
        registerCreatureEvent(cid, "SummonDeath")
    return true
    end
    
    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

return true
end

 

Não tenho certeza se vai funcionar, mas testa aí. Adiciona ali os mega que tem. Tá com 100% de chance de spawnar só pra testar, dps vc coloca a chance que vc quiser ai.

Atenção: Siga o prefixo de postagem, primeiro aviso.

 

Amigo eu testei aqui... Infelizmente não funcionou e ainda apareceu esse erro na distro: 

 

[Error - CreatureScript Interface]
In a timer event called from:
data/creaturescripts/scripts/spawn.lua:onSpawn
Description:
data/creaturescripts/scripts/spawn.lua:82: attempt to perform arithmetic on global 'chance' (a nil value)
stack traceback:
        data/creaturescripts/scripts/spawn.lua:82: in function <data/creaturescripts/scripts/spawn.lua:70>

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0

Erro meu

local megas = {"Venusaur", "Blastoise"} 
local shinys = {
"Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}                               

local function ShinyName(cid)
if isCreature(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(.*)")          
      doCreatureSetNick(cid, newName)
      if isMonster(cid) then
         doSetCreatureDropLoot(cid, false)  
      end
   end
end
end

local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
        if rate == 0 then
            gender = 3
        elseif rate == 500 then
            gender = 4
        elseif rate == -1 then
            gender = 2
        elseif math.random(1, 500) <= rate then
            gender = 4
        else
            gender = 3
        end
    doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 10.0    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5.8   --1% chance       
else
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

local function doMega(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
   local chancemega = 100.0    --1% chance        
   return true
end    
    if math.random(1, 500) <= chancemega*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

                                                                
function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")
    
    if isSummon(cid) then
        registerCreatureEvent(cid, "SummonDeath")
    return true
    end
    
    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

return true
end

 

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
9 minutos atrás, bXnny disse:

Erro meu

local megas = {"Venusaur", "Blastoise"} 
local shinys = {
"Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", 
"Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}                               

local function ShinyName(cid)
if isCreature(cid) then
   if string.find(tostring(getCreatureName(cid)), "Shiny") then
      local newName = tostring(getCreatureName(cid)):match("(.*)")          
      doCreatureSetNick(cid, newName)
      if isMonster(cid) then
         doSetCreatureDropLoot(cid, false)  
      end
   end
end
end

local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
        if rate == 0 then
            gender = 3
        elseif rate == 500 then
            gender = 4
        elseif rate == -1 then
            gender = 2
        elseif math.random(1, 500) <= rate then
            gender = 4
        else
            gender = 3
        end
    doCreatureSetSkullType(cid, gender)
end

local function doShiny(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
   chance = 10.0    --1% chance        
elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
   chance = 5.8   --1% chance       
else
   return true
end    
    if math.random(1, 500) <= chance*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

local function doMega(cid)
if isCreature(cid) then
   if isSummon(cid) then return true end
   if getPlayerStorageValue(cid, 74469) >= 1 then return true end
   if getPlayerStorageValue(cid, 22546) >= 1 then return true end 
   if isNpcSummon(cid) then return true end
   if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9
   
if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
   local chancemega = 100.0    --1% chance        
   return true
end    
    if math.random(1, 500) <= chancemega*10 then  
      doSendMagicEffect(getThingPos(cid), 18)               
      local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
      doRemoveCreature(cid)
      local shi = doCreateMonster(name, pos, false)
      setPlayerStorageValue(shi, 74469, 1)      
   else
       setPlayerStorageValue(cid, 74469, 1)
   end                                        --/\
else                                                            
return true
end
end

                                                                
function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")
    
    if isSummon(cid) then
        registerCreatureEvent(cid, "SummonDeath")
    return true
    end
    
    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

return true
end

começou a dar esse erro sem parar! 

Please login or register to see this attachment.

 

Editado por fhoenix00
[Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/spawn.lua:114: unexpected symbol near '´' [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/spawn.lua) data/creaturescripts/scripts/spawn.lua:114: unexpected

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
local megas = {"Venusaur", "Blastoise"}
local shinys = {
  "Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros",
  "Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

  local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}

  local function ShinyName(cid)
    if isCreature(cid) then
      if string.find(tostring(getCreatureName(cid)), "Shiny") then
        local newName = tostring(getCreatureName(cid)):match("(.*)")
        doCreatureSetNick(cid, newName)
        if isMonster(cid) then
          doSetCreatureDropLoot(cid, false)
        end
      end
    end
  end

  local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
    if rate == 0 then
      gender = 3
    elseif rate == 500 then
      gender = 4
    elseif rate == -1 then
      gender = 2
    elseif math.random(1, 500) <= rate then
      gender = 4
    else
      gender = 3
    end
    doCreatureSetSkullType(cid, gender)
  end

  local function doShiny(cid)
    if isCreature(cid) then
      if isSummon(cid) then return true end
      if getPlayerStorageValue(cid, 74469) >= 1 then return true end
      if getPlayerStorageValue(cid, 22546) >= 1 then return true end
      if isNpcSummon(cid) then return true end
      if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9

      if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
        chance = 10.0    --1% chance
      elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
        chance = 5.8   --1% chance
      else
        return true
      end
      if math.random(1, 500) <= chance*10 then
        doSendMagicEffect(getThingPos(cid), 18)
        local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
        doRemoveCreature(cid)
        local shi = doCreateMonster(name, pos, false)
        setPlayerStorageValue(shi, 74469, 1)
      else
        setPlayerStorageValue(cid, 74469, 1)
      end                                        --/\
    else
      return true
    end
  end

  local function doMega(cid)
    if isCreature(cid) then
      if isSummon(cid) then return true end
      if getPlayerStorageValue(cid, 74469) >= 1 then return true end
      if getPlayerStorageValue(cid, 22546) >= 1 then return true end
      if isNpcSummon(cid) then return true end
      if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9

      if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
        local chancemega = 100.0    --1% chance
        return true
      end
      if math.random(1, 500) <= chancemega*10 then
        doSendMagicEffect(getThingPos(cid), 18)
        local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
        doRemoveCreature(cid)
        local shi = doCreateMonster(name, pos, false)
        setPlayerStorageValue(shi, 74469, 1)
      else
        setPlayerStorageValue(cid, 74469, 1)
      end                                        --/\
    else
      return true
    end
  end


  function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")

    if isSummon(cid) then
      registerCreatureEvent(cid, "SummonDeath")
      return true
    end

    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

    return true
  end

 

Cara, tá achando um caractere que nem tem no script.
Copia do jeito que tá e na hora de jogar no notepad++ da um ctr+a e seleciona essa opção: 

image.png

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
16 minutos atrás, bXnny disse:
local megas = {"Venusaur", "Blastoise"}
local shinys = {
  "Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros",
  "Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode", "Megenium", "Blaziken"}

  local raros = {"Dragonair", "Dratini", "Alakazam", "Gyarados", "Azumarill", "Dragonite", "Salamence", "Mantine", "Gardevoir", "Steelix", "Porygon", "Porygon2", "Shedinja"}

  local function ShinyName(cid)
    if isCreature(cid) then
      if string.find(tostring(getCreatureName(cid)), "Shiny") then
        local newName = tostring(getCreatureName(cid)):match("(.*)")
        doCreatureSetNick(cid, newName)
        if isMonster(cid) then
          doSetCreatureDropLoot(cid, false)
        end
      end
    end
  end

  local function doSetRandomGender(cid)
    if not isCreature(cid) then return true end
    if isSummon(cid) then return true end
    local gender = 0
    local name = getCreatureName(cid)
    if not newpokedex[name] then return true end
    local rate = newpokedex[name].gender
    if rate == 0 then
      gender = 3
    elseif rate == 500 then
      gender = 4
    elseif rate == -1 then
      gender = 2
    elseif math.random(1, 500) <= rate then
      gender = 4
    else
      gender = 3
    end
    doCreatureSetSkullType(cid, gender)
  end

  local function doShiny(cid)
    if isCreature(cid) then
      if isSummon(cid) then return true end
      if getPlayerStorageValue(cid, 74469) >= 1 then return true end
      if getPlayerStorageValue(cid, 22546) >= 1 then return true end
      if isNpcSummon(cid) then return true end
      if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9

      if isInArray(shinys, getCreatureName(cid)) then  --alterado v1.9 \/
        chance = 10.0    --1% chance
      elseif isInArray(raros, getCreatureName(cid)) then   --n coloquem valores menores que 0.1 !!
        chance = 5.8   --1% chance
      else
        return true
      end
      if math.random(1, 500) <= chance*10 then
        doSendMagicEffect(getThingPos(cid), 18)
        local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid)
        doRemoveCreature(cid)
        local shi = doCreateMonster(name, pos, false)
        setPlayerStorageValue(shi, 74469, 1)
      else
        setPlayerStorageValue(cid, 74469, 1)
      end                                        --/\
    else
      return true
    end
  end

  local function doMega(cid)
    if isCreature(cid) then
      if isSummon(cid) then return true end
      if getPlayerStorageValue(cid, 74469) >= 1 then return true end
      if getPlayerStorageValue(cid, 22546) >= 1 then return true end
      if isNpcSummon(cid) then return true end
      if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9

      if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
        local chancemega = 100.0    --1% chance
        return true
      end
      if math.random(1, 500) <= chancemega*10 then
        doSendMagicEffect(getThingPos(cid), 18)
        local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
        doRemoveCreature(cid)
        local shi = doCreateMonster(name, pos, false)
        setPlayerStorageValue(shi, 74469, 1)
      else
        setPlayerStorageValue(cid, 74469, 1)
      end                                        --/\
    else
      return true
    end
  end


  function onSpawn(cid)

    registerCreatureEvent(cid, "Experience")
    registerCreatureEvent(cid, "GeneralConfiguration")
    registerCreatureEvent(cid, "DirectionSystem")
    registerCreatureEvent(cid, "CastSystem")

    if isSummon(cid) then
      registerCreatureEvent(cid, "SummonDeath")
      return true
    end

    addEvent(doShiny, 10, cid)
    addEvent(doMega, 10, cid)
    addEvent(ShinyName, 15, cid)
    addEvent(adjustWildPoke, 5, cid)

    return true
  end

 

Cara, tá achando um caractere que nem tem no script.
Copia do jeito que tá e na hora de jogar no notepad++ da um ctr+a e seleciona essa opção: 

Please login or register to see this link.

 

Nada ainda :( 

 

Please login or register to see this attachment.

19 minutos atrás, Refe disse:

Manda seu creaturescripts.xml

<?xml version="1.0" encoding="UTF-8"?>

<creaturescripts>


    
     <event type="joinchannel" name="ShowPokedex" event="script" value="newpokedex.lua"/>
    <event type="leavechannel" name="ClosePokedex" event="script" value="newpokedex.lua"/>
    <event type="kill" name="pokemons" event="script" value="bosses.lua"/>
    <event type="login" name="aloot_reg" event="script" value="aloot.lua"/>
    <event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>
    <event type="kill" name="dropStone" script="dropStone.lua"/>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
     <event type="login" name="AntiMc" event="script" value="antimc.lua"/>
    <event type="kill" name="ExpBonus" event="script" value="exp.lua"/>
    <event type="login" name="ExpVip" event="script" value="vipexp.lua"/>    
    <event type="logout" name="flylogoutno" registerTo="player" event="script" value="Flylogout.lua"/>
    <event type="logout" name="surflogoutno" registerTo="player" event="script" value="Surflogout.lua"/>
    <event type="logout" name="ridelogoutno" registerTo="player" event="script" value="Ridelogout.lua"/>


        <event type="death" name="ArticunoTeleport" script="tparticuno.lua"/>

       <event type="death" name="tel" event="script" value="tel.lua"/>

    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>

    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    
    <event type="think" name="Idle" event="script" value="idle.lua"/>


    <event type="death" name="Experience" event="script" value="pokeexp.lua"/>

    <event type="spawn" name="Spawn" event="script" value="spawn.lua"/>

    <event type="think" name="t" event="script" value="wildpoke.lua"/>

    <event type="think" name="PokemonIdle" event="script" value="poketele.lua"/>

    <event type="statschange" name="GeneralConfiguration" event="script" value="exp2.0.lua"/>
    <event type="advance" name="EffectOnAdvance" event="script" value="levelup.lua"/>


    <event type="direction" name="DirectionSystem" event="script" value="wildpoke.lua"/>
    <event type="attack" name="AttackSystem" event="script" value="wildpoke.lua"/>
    <event type="cast" name="CastSystem" event="script" value="wildpoke.lua"/>
    <event type="target" name="WildAttack" event="script" value="playerattack.lua"/>
    <event type="death" name="tp1" event="script" value="Tp-Celebi.lua"/>
    <event type="death" name="tp2" event="script" value="Tp-Heatran.lua"/>
    <event type="death" name="tp3" event="script" value="Tp-Keldeo.lua"/>
    <event type="death" name="tp4" event="script" value="Tp-Zekrom.lua"/>
    <event type="death" name="tp5" event="script" value="Tp-Giratina.lua"/>
    <event type="death" name="tp6" event="script" value="Tp-Arceus.lua"/>
    <event type="death" name="tp7" event="script" value="Tp-Cresselia.lua"/>    
    <event type="death" name="tp8" event="script" value="Tp-Terrakion.lua"/>
    <event type="death" name="tp9" event="script" value="Tp-Ho-oh.lua"/>    
    <event type="death" name="tp10" event="script" value="Tp-Cobalion.lua"/>
    <event type="death" name="tp11" event="script" value="Tp-Reshiram.lua"/>
    <event type="death" name="tp12" event="script" value="Tp-Genesect.lua"/>    


    <event type="look" name="LookSystem" event="script" value="look.lua"/>


    <event type="death" name="SummonDeath" event="script" value="goback.lua"/>
    <event type="logout" name="PlayerLogout" event="script" value="goback.lua"/>


    <event type="traderequest" name="T2" event="script" value="trade system.lua"/>

    <event type="tradeaccept" name="T1" event="script" value="trade system.lua"/>
    
    
</creaturescripts>
 

Ta ai 

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
2 minutos atrás, fhoenix00 disse:

 

Nada ainda :( 

 

Please login or register to see this attachment.

<?xml version="1.0" encoding="UTF-8"?>

<creaturescripts>


    
     <event type="joinchannel" name="ShowPokedex" event="script" value="newpokedex.lua"/>
    <event type="leavechannel" name="ClosePokedex" event="script" value="newpokedex.lua"/>
    <event type="kill" name="pokemons" event="script" value="bosses.lua"/>
    <event type="login" name="aloot_reg" event="script" value="aloot.lua"/>
    <event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>
    <event type="kill" name="dropStone" script="dropStone.lua"/>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
     <event type="login" name="AntiMc" event="script" value="antimc.lua"/>
    <event type="kill" name="ExpBonus" event="script" value="exp.lua"/>
    <event type="login" name="ExpVip" event="script" value="vipexp.lua"/>    
    <event type="logout" name="flylogoutno" registerTo="player" event="script" value="Flylogout.lua"/>
    <event type="logout" name="surflogoutno" registerTo="player" event="script" value="Surflogout.lua"/>
    <event type="logout" name="ridelogoutno" registerTo="player" event="script" value="Ridelogout.lua"/>


        <event type="death" name="ArticunoTeleport" script="tparticuno.lua"/>

       <event type="death" name="tel" event="script" value="tel.lua"/>

    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>

    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    
    <event type="think" name="Idle" event="script" value="idle.lua"/>


    <event type="death" name="Experience" event="script" value="pokeexp.lua"/>

    <event type="spawn" name="Spawn" event="script" value="spawn.lua"/>

    <event type="think" name="t" event="script" value="wildpoke.lua"/>

    <event type="think" name="PokemonIdle" event="script" value="poketele.lua"/>

    <event type="statschange" name="GeneralConfiguration" event="script" value="exp2.0.lua"/>
    <event type="advance" name="EffectOnAdvance" event="script" value="levelup.lua"/>


    <event type="direction" name="DirectionSystem" event="script" value="wildpoke.lua"/>
    <event type="attack" name="AttackSystem" event="script" value="wildpoke.lua"/>
    <event type="cast" name="CastSystem" event="script" value="wildpoke.lua"/>
    <event type="target" name="WildAttack" event="script" value="playerattack.lua"/>
    <event type="death" name="tp1" event="script" value="Tp-Celebi.lua"/>
    <event type="death" name="tp2" event="script" value="Tp-Heatran.lua"/>
    <event type="death" name="tp3" event="script" value="Tp-Keldeo.lua"/>
    <event type="death" name="tp4" event="script" value="Tp-Zekrom.lua"/>
    <event type="death" name="tp5" event="script" value="Tp-Giratina.lua"/>
    <event type="death" name="tp6" event="script" value="Tp-Arceus.lua"/>
    <event type="death" name="tp7" event="script" value="Tp-Cresselia.lua"/>    
    <event type="death" name="tp8" event="script" value="Tp-Terrakion.lua"/>
    <event type="death" name="tp9" event="script" value="Tp-Ho-oh.lua"/>    
    <event type="death" name="tp10" event="script" value="Tp-Cobalion.lua"/>
    <event type="death" name="tp11" event="script" value="Tp-Reshiram.lua"/>
    <event type="death" name="tp12" event="script" value="Tp-Genesect.lua"/>    


    <event type="look" name="LookSystem" event="script" value="look.lua"/>


    <event type="death" name="SummonDeath" event="script" value="goback.lua"/>
    <event type="logout" name="PlayerLogout" event="script" value="goback.lua"/>


    <event type="traderequest" name="T2" event="script" value="trade system.lua"/>

    <event type="tradeaccept" name="T1" event="script" value="trade system.lua"/>
    
    
</creaturescripts>
 

Ta ai 

Utilize a opção image.png para postar seus códigos, por favor.

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0

@UP

 

Fui testar o script e no meu server ta dando isso .. 

[24/02/2019 07:52:56] >> Cargando scripts
[24/02/2019 07:52:58] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/spawn.lua:115: unexpected symbol near 'ï'
[24/02/2019 07:52:58] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/spawn.lua)
[24/02/2019 07:52:58] data/creaturescripts/scripts/spawn.lua:115: unexpected symbol near 'ï'
[24/02/2019 07:52:58] >> Cargando chat channels

Esse "symbol near 'i' " aparecia quando eu editava os .lua por bloco de notas, comecei a abrir em Notepad ++ e tinha parado de dar esse error, provavelmente era a formatação do bloco de notas. Mas mesmo no Notepad ++ ta dando esse error, mesmo formatando para ANSI como você @bXnny sugeriu .

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
4 horas atrás, Kooask disse:

@UP

 

Fui testar o script e no meu server ta dando isso .. 

[24/02/2019 07:52:56] >> Cargando scripts
[24/02/2019 07:52:58] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/spawn.lua:115: unexpected symbol near 'ï'
[24/02/2019 07:52:58] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/spawn.lua)
[24/02/2019 07:52:58] data/creaturescripts/scripts/spawn.lua:115: unexpected symbol near 'ï'
[24/02/2019 07:52:58] >> Cargando chat channels

Esse "symbol near 'i' " aparecia quando eu editava os .lua por bloco de notas, comecei a abrir em Notepad ++ e tinha parado de dar esse error, provavelmente era a formatação do bloco de notas. Mas mesmo no Notepad ++ ta dando esse error, mesmo formatando para ANSI como você @bXnny sugeriu .

Me envia a linha 115

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
2 horas atrás, Refe disse:

Me envia a linha 115

Foi falta de curiosidade minha não olhar a linha 115 ... Ela estava assim   

Citar

end

 O problema que deu agora foi exatamente onde o guri ali tinha falado 

 

Citar

  local function doMega(cid)
    if isCreature(cid) then
      if isSummon(cid) then return true end
      if getPlayerStorageValue(cid, 74469) >= 1 then return true end
      if getPlayerStorageValue(cid, 22546) >= 1 then return true end
      if isNpcSummon(cid) then return true end
      if getPlayerStorageValue(cid, 637500) >= 1 then return true end  --alterado v1.9

      if isInArray(megas, getCreatureName(cid)) then  --alterado v1.9 \/
        local chancemega = 100.0    --1% chance                 
        return true
      end
      if math.random(1, 500) <= chancemega*10 then
        doSendMagicEffect(getThingPos(cid), 18)
        local name, pos = "Mega ".. getCreatureName(cid), getThingPos(cid)
        doRemoveCreature(cid)
        local shi = doCreateMonster(name, pos, false)
        setPlayerStorageValue(shi, 74469, 1)
      else
        setPlayerStorageValue(cid, 74469, 1)
      end                                        --/\
    else
      return true
    end
  end

 O problema ta vindo dessa linha 79 e 82 que coloquei em Amarelo. No executável fica mostrando error nesse 'chancemega'

Editado por Kooask

Compartilhar este post


Link para o post
Compartilhar em outros sites
  • 0
4 horas atrás, fhoenix00 disse:

ok vou testar, qualquer coisa eu aviso

Acabei de testar aqui e não funcionou :/

Da algum erro na distro?, oque aconteceu que n funcionou?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Visitante
Responder esta pergunta...

×   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.


  • Conteúdo Similar

    • Por Fawkzz12
      Queria um Movements que seria proibido usar item ou entrar com item em tal area..
    • Por Emooooo
      script para ot de guerra . obrg +rep
    • Por R e d
      Alguem pode me ajudar com um script de um bau que de X pokemon para Um player de tal Clan, exemplo players do seguintes clan vao pegar os seguintes pokemon
      Volcanic -> Shiny magmar
      Seavell -> Shiny CLoyster
      Wingeon -> Shiny Pidgeot
      Malefic -> Shiny Gengar
      Psycraft -> Shiny Alakazam
      Naturia -> Shiny Vileplume
      Raibolt -> Shiny Raiuchu
      etc..
    • Por Joaominorelli
      local addons = { [22903] = {pokemon = "Golem" , looktype = 4095, fly = 0, ride = 0, surf = 0}, [22893] = {pokemon = "Charmander" , looktype = 3976, fly = 0, ride = 0, surf = 0}, [22899] = {pokemon = "Feraligatr" , looktype = 3742, fly = 0, ride = 0, surf = 0}, --[22915] = {pokemon = "Feraligatr" , looktype = 3741, fly = 0, ride = 0, surf = 0}, [22895] = {pokemon = "Snorlax" , looktype = 3752, fly = 0, ride = 0, surf = 0}, [22882] = {pokemon = "Shiny Aggron" , looktype = 3779, fly = 0, ride = 0, surf = 0}, [22914] = {pokemon = "Raichu" , looktype = 3302, fly = 0, ride = 0, surf = 0}, [22894] = {pokemon = "Shiny Snorlax" , looktype = 3310, fly = 0, ride = 0, surf = 0}, [22896] = {pokemon = "Shiny Tangela" , looktype = 3316, fly = 0, ride = 0, surf = 0}, [22897] = {pokemon = "Shiny Tangela" , looktype = 3317, fly = 0, ride = 0, surf = 0}, [22905] = {pokemon = "Shiny Tentacruel" , looktype = 3319, fly = 0, ride = 0, surf = 0}, [22906] = {pokemon = "Shiny Tentacruel" , looktype = 3320, fly = 0, ride = 0, surf = 0}, [22907] = {pokemon = "Shiny Tentacruel" , looktype = 3321, fly = 0, ride = 0, surf = 0}, [22900] = {pokemon = "Marowak" , looktype = 3926, fly = 0, ride = 0, surf = 0}, [22943] = {pokemon = "Garchomp" , looktype = 3674, fly = 0, ride = 0, surf = 0}, [22944] = {pokemon = "Garchomp" , looktype = 3675, fly = 0, ride = 0, surf = 0}, [22945] = {pokemon = "Garchomp" , looktype = 3676, fly = 0, ride = 0, surf = 0}, [22946] = {pokemon = "Garchomp" , looktype = 3677, fly = 0, ride = 0, surf = 0}, [22882] = {pokemon = "Aggron" , looktype = 3777, fly = 0, ride = 0, surf = 0}, [22926] = {pokemon = "Togekiss" , looktype = 3401, fly = 0, ride = 0, surf = 0}, [22926] = {pokemon = "Shiny Togekiss" , looktype = 3403, fly = 3404, ride = 0, surf = 0}, [22927] = {pokemon = "Snorlax" , looktype = 3405, fly = 0, ride = 0, surf = 0}, [22917] = {pokemon = "Shiny Metagross" , looktype = 3907, fly = 0, ride = 0, surf = 0}, [23313] = {pokemon = "Noctowl" , looktype = 3731, fly = 3732, ride = 0, surf = 0}, [23867] = {pokemon = "Sceptile" , looktype = 4593, fly = 0, ride = 0, surf = 0}, [23867] = {pokemon = "Shiny Sceptile" , looktype = 4594, fly = 0, ride = 0, surf = 0} } local function getOldAddon (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end end end function onUse(cid, item, fromPosition, itemEx, toPosition) local numero = addons[item.itemid].looktype local pb = itemEx.uid local pk = addons[item.itemid].pokemon if not isPokeball(itemEx.itemid) then doPlayerSendCancel(cid, "Voce so poder usar este item em uma poke ball.") return true end if getPlayerSlotItem (cid, 8).uid == pb and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) then doPlayerSendCancel (cid, "Desmonte do seu pokémon e volte-o para a poke ball.") return true end if getItemAttribute(pb, "addon") and getItemAttribute(pb, "addon") == numero then doPlayerSendCancel(cid, "Seu pokemon ja esta com este addon.") return true end if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Por favor, volte o seu pokemon para a poke ball.") return true end if getItemAttribute(pb, "poke") ~= pk then doPlayerSendCancel(cid, "Desculpe, voce nao pode adicionar este addon neste pokemon.") return true end if getItemAttribute (pb, "addon") and getItemAttribute (pb, "addon") > 1 then doPlayerSendTextMessage(cid, 27, "Voce substituiu um "..getItemNameById (getOldAddon (getItemAttribute (pb, "addon"))).." por um "..getItemNameById (item.itemid).." addon!") else doPlayerSendTextMessage(cid, 27, "Agora seu pokemon usara este "..getItemNameById (item.itemid).."!") end doRemoveItem(item.uid, 1) doSetItemAttribute(pb, "addon", numero) setPlayerStorageValue(cid, 32000, 1) return true end  
      Entao gente como podem ver eu tenho esse addon system ai, eu queria que o id 23867 pudesse ser usado, tanto no sceptile, quanto no sh sceptile, no sh sceptile ele funciona normal, já no sceptile comum ele nao da, fala que nao pode usar este item (addon) no pokemon, Alguem poderia me ajudar?
          Please login or register to see this link.
       
    • Por guilherme Silva
      Entao eu fizz uma shiny stone ela evoluir tudo certim, mas no configuration.lua eu coloquei para evoluir com 10 stone mas ela so evolui com 2 alguem pode me ajudar? usa PDA base poke hand
×
×
  • Criar Novo...