Ir para conteúdo
  • 0
Raulcdj

Scripting Pokemon nao teleporta

Pergunta

Raulcdj    2
Raulcdj

Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo:

https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/

https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/

Obs: não delete esse formulário pré-definido, preencha-o corretamente para postar o seu tópico!

Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).

Base: base dash

 

Qual é a sua pergunta?

Pokémon não esta teleportado já registrei tudo e mesmo assim não teleporta fala que a cidade não existe mais já registrei no rme e no tele.lua

 

 

Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:

Spoiler

local poke = {"Shiny Exeggutor", "Shiny Mr. Mime", 'Mew', 'Mewtwo', 'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Shiny Abra', 'Shiny Alakazam',
'Shiny Hypno', 'Porygon2', "Jynx", "Shiny Jynx", "Slowking", "Girafarig", "Misdreavus", "Exeggutor", "Shiny Espeon"} --alterado v1.9

local etele = 0
local cdtele = 0

local config = {
premium = false, -- se precisa ser premium account (true or false)
battle = false -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas
}

local places = {
-- Kanto --
[1] = {name = "Saffron", id = 1, sto = 897530},
[2] = {name = "Lavender", id = 2, sto = 897532},
[3] = {name = "Celadon", id = 3, sto = 897534},
[4] = {name = "Vermilion", id = 4, sto = 897538},
[5] = {name = "Fuchsia", id = 5, sto = 897533},
[7] = {name = "Pewter", id = 7, sto = 897536},
[8] = {name = "Viridian", id = 8, sto = 897537},
[9] = {name = "Pallet", id = 9, sto = 897535},
[10] = {name = "Cinnabar", id = 10, sto = 897539},
[11] = {name = "Cerulean", id = 11, sto = 897531},
}

function onSay(cid, words, param)
if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "Você precisa de um pokémon para usar teleport!")
return true
end

if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then
return 0
end

if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then
local tempo = tonumber(exhaustion.get(cid, etele)) or 0
local min = math.floor(tempo)
doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.")
return true
end

if config.premium and not isPremium(cid) then
doPlayerSendCancel(cid, "Apenas membros Premium Account podem teleportar!")
return true
end

if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")
return true
end


local item = getPlayerSlotItem(cid, 8)
local nome = getPokeballName(item.uid)
local summon = getCreatureSummons(cid)[1]
local lastppos = getThingPos(cid)
local lastspos = getThingPos(summon)
local myplace = ""
local townid = 0
local citySto = 0 --alterado v1.7


for x = 1, #places do
if string.find(string.lower(places[x].name), string.lower(param)) then
townid = places[x].id
myplace = places[x].name
citySto = places[x].sto or -1 --alterado v1.7
end
end

if myplace == "" then
doPlayerSendCancel(cid, "That place doesn't exist.")
return true
end


if myplace ~= "" and townid > 0 then
telepos = getTownTemplePosition(townid)
end

if getDistanceBetween(getThingPos(cid), telepos) <= 15 then
doPlayerSendCancel(cid, "You are too near to the place you want to go!")
return true
end


doTeleportThing(cid, telepos, false)

local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH))

doTeleportThing(summon, pos2, false)


doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT)

return true
end

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:

Spoiler

image.png.c2227b4701dc2a258e67d3512a4e75b7.pngimage.png.22e9ffdec12ddfcd897f8613ba31f0c7.png

 

Compartilhar este post


Link para o post

0 respostass a esta questão

Recommended Posts

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×