Jump to content
  • 0
Sign in to follow this  
tetelbk

Scripting Como criar box que da pokemon do +1 ao +10 e etc..

Question

tetelbk    0
tetelbk

Ola boa noite eu estou com uma duvida que esta me matando eu gostaria de criar algumas quests que o premio seriam box que daria um poke aleatório dentro de uma pokeball, mais eu preciso criar novas boxs alguem saberia como me ajudar ? Estou a muito tempo sem mecher com server voltei meio perdido 
A minha divida e que n sei onde seria a id da box e onde seria a id da pokeball. vou deixar o script da box 
Obrigado desde já.

Rep++ pra quem ajudar.


Server de poketibia 8.54.

Script Box

Spoiler

local a = {
[13192] = {balltype = "ultra", ballid = 11829,
        pokemons = {"Entei", "Suicune", "Raikou"}}
}

local extrastrength = 1.1        

function onUse(cid, item, frompos, item2, topos)
         local b = a[item.itemid]                                    
               if not b then return true end
         local pokemon = b.pokemons[math.random(#b.pokemons)] --alterado v1.3
         local btype = b.balltype
               if not pokeballs[btype] then return true end
         local gender = getRandomGenderByName(pokemon)
         local happy = 220
         local leveltable = getPokemonExperienceTable(pokemon)
         
         local ball = 0
         local sendToDepot = false                                              --alterado v1.6          
         if getCreatureMana(cid) >= 6 or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
               sendToDepot = true
               ball = doCreateItemEx(b.ballid)    --alterado v1.3
         else
               ball = item.uid
         end  
         
           doItemSetAttribute(ball, "poke", pokemon)
           doItemSetAttribute(ball, "hp", 1)
           doItemSetAttribute(ball, "happy", happy)
           doItemSetAttribute(ball, "gender", gender)
           if pokemon == "Hitmonchan" or pokemon == "Shiny Hitmonchan" then
              doItemSetAttribute(ball, "hands", 0)
           end
           doItemSetAttribute(ball, "description", "Contains a "..pokemon..".")
           doItemSetAttribute(ball, "fakedesc", "Contains a "..pokemon..".")    
  
         doPlayerSendTextMessage(cid, 27, "Voce Abriu Pokemon Egg"..item.itemid - (11637).."!")
         doPlayerSendTextMessage(cid, 27, "Ooh Nasceu o Pokemon "..pokemon..", Parabens!")
         
         if sendToDepot then
               doPlayerSendMailByName(getCreatureName(cid), ball, 1)  --alterado v1.3
               doPlayerSendTextMessage(cid, 27, "Voce Ja Tem 6 Pokemons, O Seu Novo Pokemon Foi Mandado Ao DEPOT.")
               doRemoveItem(item.uid)
         else
               doTransformItem(ball, pokeballs[btype].on)
         end
         
         doSendMagicEffect(getThingPos(cid), 29)
return true
end

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Majesty    1,759
Majesty
local a = {
[13192] = {balltype = "ultra", ballid = 11829,
        pokemons = {"Entei", "Suicune", "Raikou"}}
}

 

Share this post


Link to post
Share on other sites
  • 0
Majesty    1,759
Majesty

A questão neste tópico de suporte foi respondida e o autor do tópico resolveu a questão. Este tópico está fechado agora. Se você tiver outras perguntas, crie um novo tópico.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×