Ir para conteúdo

[Script] Sistema Teleport


amoxicilinaaaa

Posts Recomendados

Tipo eu quero Um script de teleport com o pokemon que nem do svke

Exeplo: Eu uso o abra Ai me teletrans porto para outra cidade mais gostaria um igual o do pokemon SVKE que quando você se teleporta o pokemon vem junto com o boneco e faz um efeito Tenteu :thumbsupsmiley:

Link para o comentário
Compartilhar em outros sites

o MatheusMkalo já fez o script,ta ai:

 

 

local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr.mime', 'Porygon'}
local etele = 9499
local cdtele = 1800
function onSay(cid, words, param)

if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "You need a pokemon to use teleport.")
return true
end
if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then
doPlayerSendCancel(cid, "Sorry, this pokemon can\'t cast teleport.")
return true
end
if exhaustion.get(cid, etele) then
tempo = (exhaustion.get(cid, etele)) / 60
min = math.floor(tempo)
doPlayerSendCancel(cid, "Your pokemon is tired, you have to wait more "..min.." minutes to cast teleport again.")
return true
end

local config = {
pz = false, -- players precisam estar em protection zone para usar? (true or false)
battle = true, -- players deve estar sem battle (true or false)
custo = false, -- se os teleport irão custa (true or false)
need_level = false, -- se os teleport irão precisar de level (true or false)
premium = false -- se precisa ser premium account (true or false)
}


local lugar = {
["falador"] = {
pos = {x=1032, y=1025, z=7},level = 5,price = 1000,n="Falador"},
["sendas"] = {
pos = {x=949, y=953, z=7},level = 10, price = 2000,n="Sendas"},
["furbridge"] = {
pos = {x=1100, y=1122, z=7},level = 15,price = 3000,n="Furbridge"},
["spenzel"] = {
pos = {x=1206, y=1116, z=6},level = 15,price = 3000,n="Spenzel"},
["mesten"] ={
pos = {x=931, y=1066, z=7},level = 20,price = 4000,n="Mesten"}
}
if (param == '') then
local str = ""
str = str .. "Places to go :\n\nHouse\nFalador\nSendas\nFurbridge\nMesten\nSpenzel"
doShowTextDialog(cid, 7416, str)
return TRUE
end

if string.lower(param) == "house" then
if getHouseByPlayerGUID(getPlayerGUID(cid)) then
nome = getCreatureName(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 29)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))))
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(getThingPos(cid), 29)
doCreatureSay(cid, ""..nome..", teleport to our home!", 1)
local item = getPlayerSlotItem(cid, 8)
doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))
local pk = getCreatureSummons(cid)[1]
registerCreatureEvent(cid, "PlayerPokeDeath")
registerCreatureEvent(pk, "DiePoke")
registerCreatureEvent(pk, "Exp")
setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))
doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))
doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))
doCreatureSay(getCreatureSummons(cid)[1], "TELEPORT!", TALKTYPE_MONSTER)
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), CONST_ME_TELEPORT)
exhaustion.set(cid, etele, cdtele)
   doRemoveCondition(cid, CONDITION_OUTFIT)
   setPlayerStorageValue(cid, 10, 0)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")
end
return true
end

local a = lugar[string.lower(param)]
if not(a) then
doPlayerSendTextMessage(cid, 22, "This place doesn\'t exist.")
return TRUE
elseif config.premium == true and not isPremium(cid) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only premium members can use this skill.")
return TRUE
elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your pokemon can\'t concentrate during fights.")
return TRUE
end
nome = getCreatureName(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 29)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, a.pos)
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(a.pos, 29)
doCreatureSay(cid, ""..nome..", teleport to "..lugar[string.lower(param)].n.."!", 1)
local item = getPlayerSlotItem(cid, 8)
doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))
doTeleportThing(getCreatureSummons(cid)[1], pos2, false)
local pk = getCreatureSummons(cid)[1]
registerCreatureEvent(cid, "PlayerPokeDeath")
registerCreatureEvent(pk, "DiePoke")
registerCreatureEvent(pk, "Exp")
setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))
doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))
doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))
doCreatureSay(getCreatureSummons(cid)[1], "TELEPORT!", TALKTYPE_MONSTER)
doSendMagicEffect(pos2, CONST_ME_TELEPORT)
exhaustion.set(cid, etele, cdtele)
   doRemoveCondition(cid, CONDITION_OUTFIT)
   setPlayerStorageValue(cid, 10, 0)
return TRUE
end

Link para o comentário
Compartilhar em outros sites

Eu Editer Assim

 

 

local poke ={'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr.mime', 'Porygon'}

local etele = 9499

local cdtele = 1800

function onSay(cid, words, param)

 

if #getCreatureSummons(cid) == 0 then

doPlayerSendCancel(cid, "You need a pokemon to use teleport.")

return true

end

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

doPlayerSendCancel(cid, "Sorry, this pokemon can\'t cast teleport.")

return true

end

if exhaustion.get(cid, etele) then

tempo = (exhaustion.get(cid, etele)) / 60

min = math.floor(tempo)

doPlayerSendCancel(cid, "Your pokemon is tired, you have to wait more "..min.." minutes to cast teleport again.")

return true

end

 

local config = {

pz = false, -- players precisam estar em protection zone para usar? (true or false)

battle = true, -- players deve estar sem battle (true or false)

custo = false, -- se os teleport irão custa (true or false)

need_level = false, -- se os teleport irão precisar de level (true or false)

premium = false -- se precisa ser premium account (true or false)

}

 

 

local lugar = {

["Enigma"] = {

pos = {x=1058, y=1048, z=7},level = 5,price = 1000,n="Enigma"},

["Rock City"] = {

pos = {x=1095, y=1171, z=7},level = 10, price = 2000,n="Sendas"},

["Ice Land"] = {

pos = {x=890, y=998, z=7},level = 15,price = 3000,n="Furbridge"},

["spenzel"] = {

pos = {x=1206, y=1116, z=6},level = 15,price = 3000,n="Spenzel"},

["Fire City"] ={

pos = {x=1171, y=683, z=7},level = 20,price = 4000,n="Mesten"},

["Elemental City"] ={

pos = {x=1645, y=1244, z=7},level = 20,price = 4000,n="Mesten"}

}

if (param == '') then

local str = ""

str = str .. "Places to go :\n\nHouse\nEnigma\nSendas\nFurbridge\nMesten\nSpenzel"

doShowTextDialog(cid, 7416, str)

return TRUE

end

 

if string.lower(param) == "house" then

if getHouseByPlayerGUID(getPlayerGUID(cid)) then

nome = getCreatureName(getCreatureSummons(cid)[1])

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 29)

setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))

setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))

doRemoveCreature(getCreatureSummons(cid)[1])

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))))

pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}

doSendMagicEffect(getThingPos(cid), 29)

doCreatureSay(cid, ""..nome..", teleport to our home!", 1)

local item = getPlayerSlotItem(cid, 8)

doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(cid, "PlayerPokeDeath")

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))

doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))

doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))

doCreatureSay(getCreatureSummons(cid)[1], "TELEPORT!", TALKTYPE_MONSTER)

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), CONST_ME_TELEPORT)

exhaustion.set(cid, etele, cdtele)

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, 10, 0)

else

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.")

end

return true

end

 

local a = lugar[string.lower(param)]

if not(a) then

doPlayerSendTextMessage(cid, 22, "This place doesn\'t exist.")

return TRUE

elseif config.premium == true and not isPremium(cid) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only premium members can use this skill.")

return TRUE

elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Your pokemon can\'t concentrate during fights.")

return TRUE

end

nome = getCreatureName(getCreatureSummons(cid)[1])

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 29)

setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))

setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))

doRemoveCreature(getCreatureSummons(cid)[1])

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, a.pos)

pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}

doSendMagicEffect(a.pos, 29)

doCreatureSay(cid, ""..nome..", teleport to "..lugar[string.lower(param)].n.."!", 1)

local item = getPlayerSlotItem(cid, 8)

doSummonMonster(cid, getItemAttribute(item.uid, "poke"):match("This is (.-)'s pokeball."))

doTeleportThing(getCreatureSummons(cid)[1], pos2, false)

local pk = getCreatureSummons(cid)[1]

registerCreatureEvent(cid, "PlayerPokeDeath")

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))

doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))

doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))

doCreatureSay(getCreatureSummons(cid)[1], "TELEPORT!", TALKTYPE_MONSTER)

doSendMagicEffect(pos2, CONST_ME_TELEPORT)

exhaustion.set(cid, etele, cdtele)

doRemoveCondition(cid, CONDITION_OUTFIT)

setPlayerStorageValue(cid, 10, 0)

return TRUE

end

 

 

Editado por otrapalhao
Link para o comentário
Compartilhar em outros sites

o nome tem que estar em minusculo :X

 

local lugar = { 
["enigma"] = { 
pos = {x=1058, y=1048, z=7},level = 5,price = 1000,n="Enigma"}, 
["rock city"] = { 
pos = {x=1095, y=1171, z=7},level = 10, price = 2000,n="Sendas"}, 
["ice land"] = { 
pos = {x=890, y=998, z=7},level = 15,price = 3000,n="Furbridge"}, 
["spenzel"] = { 
pos = {x=1206, y=1116, z=6},level = 15,price = 3000,n="Spenzel"}, 
["fire City"] ={ 
pos = {x=1171, y=683, z=7},level = 20,price = 4000,n="Mesten"},
["elemental City"] ={ 
pos = {x=1645, y=1244, z=7},level = 20,price = 4000,n="Mesten"} 
}

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...