Galera hj vim explicar como criar novos teleports com poke igual a svke q seria o camando assim h"e o nome da city
só q isso será por ultimo pra quem ainda n tem em seu ot sever Pokemon vou postar os scripts explicando tudo....
1° abra vá até a pasta data\movements\scripts e crie um arquivo.lua com o nome teleport e deixe isso dentro:
function onStepOut(cid, item, position, fromPosition)
if #getCreatureSummons(cid) >= 1 then
doTeleportThing(getCreatureSummons(cid)[1], getThingPos(cid))
doSendMagicEffect(getThingPos(cid), 21)
end
end
function onStepIn(cid, item, fromPosition, item2, topos)
for x=-1,1 do
for y=-1,1 do
posa = {x=topos.x+x,y=topos.y+y,z=topos.z}
if getTileThingByPos(posa).itemid == 460 then
doRemoveItem(getTileThingByPos(posa).uid, 1)
end
end
end
end
2° vá até a pasta data\movements e abra movements.xml e deixe isso la dentro
<movevent type="StepOut" itemid="383;408;427;432;433;459;469;482;484;1385;1388;1390;1392;1394;1398;1400;1402;1404;3135;3679;3681;3683;3685;4835;4836;4837;5258;5259;5260;6128;6909;6911;6913;6915;8284" event="script" value="teleport.lua"/>
<movevent type="StepIn" itemid="383;408;427;432;433;459;469;482;484;1385;1388;1390;1392;1394;1398;1400;1402;1404;3135;3679;3681;3683;3685;4835;4836;4837;5258;5259;5260;6128;6909;6911;6913;6915;8284" event="script" value="teleport.lua"/>
3° vá até a pasta data\talkactions\scripts em seu ot e crie um arquivo.lua chamado tele e deixe isso dentro:
local poke = {'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr.mime', 'Porygon', 'Mew', 'Mewtwo'}
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 = true, -- se os teleport irão precisar de level (true or false)
premium = false -- se precisa ser premium account (true or false)
}
local lugar = {
["vermilion"] = {
pos = {x=????, y=????, z=?},level = 5,price = 1000,n="Vermilion"},
["cerulean"] = {
pos = {x=????, y=????, z=?},level = 10, price = 2000,n="Cerulean"},
["lavender"] = {
pos = {x=????, y=????, z=?},level = 15,price = 3000,n="Lavender"},
["fuchsia"] = {
pos = {x=????, y=????, z=?},level = 15,price = 3000,n="Fuchsia"},
["saffron"] ={
pos = {x=????, y=????, z=?},level = 20,price = 4000,n="Saffron"},
["viridian"] ={
pos = {x=????, y=????, z=?},level = 20,price = 4000,n="Viridian"},
["pewter"] ={
pos = {x=????, y=????, z=?},level = 30,price = 4000,n="Pewter"},
["cinnabar"] ={
pos = {x=????, y=????, z=?},level = 50,price = 4000,n="Cinnabar"}
}
if (param == '') then
doSendMagicEffect(getPlayerPosition(cid),187)
local str = ""
str = str .. "Places to go :\n\nHouse\nVermilion\nCerulean\nLavender\nFuchsia\nSaffron\nViridian\nPewter\nCinnabar"
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]), 211)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(cid), 211)
doTeleportThing(cid, getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))))
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(getThingPos(cid), 211)
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]), 211)
setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
doRemoveCreature(getCreatureSummons(cid)[1])
doSendMagicEffect(getThingPos(cid), 211)
doTeleportThing(cid, a.pos)
pos2 = {x=getThingPos(cid).x, y=getThingPos(cid).y+1, z=getThingPos(cid).z}
doSendMagicEffect(a.pos, 211)
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
4° vá até a pasta data\talkactions e abra talkactions.xml e deixe isso dentro:
<talkaction words="!h" event="script" value="tele.lua"/>
<talkaction words="/h" event="script" value="tele.lua"/>
<talkaction words="h" event="script" filter="quotation" value="tele.lua"/>
Agora irei explicar como editar e criar um novo local de teleport
localize na pasta data\talkactions\scripts a aquivo tele.lua abra e localize:
local lugar = {
["vermilion"] = {
pos = {x=????, y=????, z=?},level = 5,price = 1000,n="Vermilion"},
o 1° nome ["vermilion"] tem q ser totalmente de letra minuscula e o 2° ["Vermilion"] com a 1° em maiuscula
pos = {x=????, y=????, z=?} o pos = claro q siginifica posição la vc põe a posição q vc pretende q os player se teleportem
no x = será a posição vertical
no z = será a posição horizontal
no z = será por exemplo se o local q vc deseja q os player se teleportem seja na terra plana = normal será 7 subsolo = 8 se for terraço será 6 assim por diante
localize: str = str .. "Places to go :\n\nHouse\hVermilion
esse sera tipo de um livro de quando o player dize /h aparecerá a lista de cidades na qual ele pode se teleportar
pronto é só isso por hj ...bye
Creditos :
89% Pokemon dash
11% Tiagohells por ter editado alguns bugs
Se ajudei REP +++ AE!!! Duvidas Falem ae pessoal !!!..