Ir para conteúdo
  • Cadastre-se

(Resolvido)Como criar Telepor que quando entrar ganha um pokemon.


Ir para solução Resolvido por Noob II,

Posts Recomendados

  • Respostas 9
  • Created
  • Última resposta

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Posts

Vc tem o codigo do starter?

data/movements/scripts crie um arquivo chamado pokeinicial.lua e adicione:     no movements.xml adicione essa tag: <movevent type="StepIn" actionid="8696;8699;8700;8703;8704;8707;" event="script" value="pokeinicial.lua"/>   Abra o RME e adicione o actionid nos portal de acordo com essa parte:    pk = { [8696] = {name="Charmander"}, [8699] = {name="Chimchar"}, [8700] = {name="Bulbasaur"}, [8703] = {name="Turtwig"}, [8704] = {name

Ah é base centurion nem tinha visto, deixa eu editar aqui

Posted Images

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Spoiler

This is an automated message! This topic has been moved to the correct area.
Please read the forum rules.

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites
  • Solução
16 horas atrás, citizen disse:

aguardando

 


pk = {
[8696] = {name="Piplup"},
[8697] = {name="Chimchar"},
[8698] = {name="Turtwig"},
[8699] = {name="Squirtle"},
[8700] = {name="Charmander"},
[8701] = {name="Bulbasaur"},
}

postemple = {x = 1054, y = 1050, z = 7}

function onStepIn(cid, item, position, fromPosition)

    local pokemon = pk[item.actionid].name
    local plevel = 5
    local level = 1.5
    local extrastr = 4
    local btype = "normal"
    local gender = getRandomGenderByName(pokemon)
    local mypoke = getPokemonStatus(pokemon)
    if not mypoke then return true end
    local offense = mypoke.off * level * extrastr
    local defense = mypoke.def * level * extrastr
    local speed = mypoke.agi * level * extrastr
    local vit = mypoke.vit * level * extrastr
    local spatk = mypoke.spatk * level * extrastr
    local happy = 180
    local leveltable = getPokemonExperienceTable(pokemon)
    local item = doCreateItemEx(2219)
    doItemSetAttribute(item, "poke", pokemon)
    doItemSetAttribute(item, "hp", 1)
    doItemSetAttribute(item, "level", plevel)
    doItemSetAttribute(item, "exp", leveltable[plevel])
    doItemSetAttribute(item, "nextlevelexp", leveltable[plevel+1] - leveltable[plevel])
    doItemSetAttribute(item, "offense", offense)
    doItemSetAttribute(item, "defense", defense)
    doItemSetAttribute(item, "speed", speed)
    doItemSetAttribute(item, "vitality", vit)
    doItemSetAttribute(item, "specialattack", spatk)
    doItemSetAttribute(item, "happy", happy)
    doItemSetAttribute(item, "gender", gender)
    doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
    doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
    doItemSetAttribute(item, "firstpoke", getCreatureName(cid))
    doPlayerAddItemEx(cid, item, true)
    doTransformItem(item, pokeballs[btype].on)

    doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
    doPlayerAddItem(cid, 2152, 100)
    doPlayerAddItem(cid, 12344, 3)
    doPlayerAddItem(cid, 2392, 20)
    doPlayerAddItem(cid, 12345, 20)
    doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")
    if #getCreatureSummons(cid) >= 1 then
        doTeleportThing(getCreatureSummons(cid)[1], postemple,false)
    end
    doTeleportThing(cid, postemple,false)
end
 

 

<movevent type="StepIn" actionid="8696;8697;8698;8699;8700;8701;" event="script" value="pokeinicial.lua"/>

 

SÓ ADICIONAR O ACTIONID NOS PORTAL AGORA 

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.

  • Estatísticas dos Fóruns

    96844
    Tópicos
    519606
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo