Cara da uma vizualizadinha nos meus topicos la quem sabe voce encontra oque ta procurando
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Ajuda Fly System !
3
1.5k
1 mês depois...
info
Grupo: Campones
Registrado: 21/10/10
Posts: 20
Reputação: +1
Char no Tibia: Churros Verde

08 de novembro de 2010 às 15:17
08 de novembro de 2010 às 20:46
@ Up
Tem nao :]
@ Topic
Tem um que veio junto ao pokeserver V4 ( postado aqui no forum )
Ele funciona assim: vc usa x item com seu summon sumonado ._., seu summon irá desaparecer, seu outfit mudará pro do escolhido e sua velocidade também mudará para a escolhida.
Tenta ae manin :
function getPokemonMaxLife(name)
local file = io.open('data/monster/monsters.xml','r')
local arquivo = file:read(-1):lower():match('<monster name="'..name:lower()..'" file="(.-)"/>')
file:close()
local data = io.open('data/monster/'..(arquivo or ''),'r')
if not data then
return 100
end
local maximo = data:read(-1):match('max%s*=%s*"(%d+)"')
data:close()
return maximo
end
function onUse(cid, item, frompos, item2, topos)
local pokes = {
['Moltres'] = {229, 800},
['Articuno'] = {230, 800},
['Zapdos'] = {224, 800},
['Mew'] = {232, 800},
['Mewtwo'] = {233, 800},
['Dragonite'] = {221, 300},
['Pidgeot'] = {222, 350},
['Fearow'] = {226, 400},
['Aerodactyl'] = {227, 490},
['Charizard'] = {216, 590},
['Porygon'] = {316, 800},
['Elder Charizard'] = {295, 800},
}
local idballs = {
[2531] = {"Pokeball"},
[2557] = {"Superball"},
[2524] = {"Greatball"},
[2525] = {"Ultraball"},
[2523] = {"Masterball"},
}
local storage = 9393 -- Não mexa aqui!
local exhaust = 0 -- Tempo para player poder usar o item novamente! (tempo em segundos)
local time = 0 -- Tempo para ficar na montaria! (tempo em segundos)
local old_speed = getCreatureBaseSpeed(cid)
local summons = getCreatureSummons(cid)
if (getPlayerStorageValue(cid, storage) <= os.time()) then
if getPlayerStorageValue(cid, 24000) == 5 then
return doPlayerSendCancel(cid, "You are riding.")
end
if getPlayerStorageValue(cid, 17000) == 10 then
local nome = getItemName(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid)
local balls = idballs[getPlayerSlotItem(cid,8).itemid]
local poke_name = nome:match('(.-) '..balls[1])
local action_id = getItemAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid")
if getSqmId(getCreaturePosition(cid)).itemid == CONST_FLYVOID then
return doPlayerSendCancel(cid,"Desça antes de sair do fly")
end
setPlayerStorageValue(cid, storage, os.time()+exhaust)
doChangeSpeed(cid, -(getCreatureSpeed(cid) - getCreatureBaseSpeed(cid)))
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 17000, 7)
setPlayerStorageValue(cid, 23000, 6)
local monster = doCreateMonster(poke_name, getCreaturePosition(cid))
doConvinceCreature(cid, monster)
doCreatureAddHealth(monster, -(tonumber(getPokemonMaxLife(poke_name) - action_id)))
doPlayerSay(cid, poke_name .. ", I'm tired of flying!", TALKTYPE_SAY)
setPlayerStorageValue(cid, 9999,-1)
setPlayerStorageValue(cid, 8888,-1)
return true
end
if #getCreatureSummons(cid) < 1 then
return doPlayerSendCancel(cid, "Para voar você precisa de um pokemon")
end
if isPremium(cid) == FALSE then
return doPlayerSendCancel(cid, "Você não é premium account.")
end
local name = getCreatureName(getCreatureSummons(cid)[1])
local pokemon = pokes[getCreatureName(getCreatureSummons(cid)[1])]
if not pokes[name] then
return doPlayerSendCancel(cid, "Este pokemon não pode voar.")
end
setPlayerStorageValue(cid, storage, os.time()+exhaust)
doChangeSpeed(cid, pokemon[2])
setPlayerStorageValue(cid, 17000, 10)
setPlayerStorageValue(cid, 23000, 5)
doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
setPlayerStorageValue(cid,9999,pokemon[1])
setPlayerStorageValue(cid,8888,pokemon[2])
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid", getCreatureHealth(getCreatureSummons(cid)[1]))
function getPokemonId(summons)
for _, pid in ipairs(summons) do
return pid
end
end
doRemoveCreature(getPokemonId(summons))
doPlayerSay(cid, name .. ", Vamos voar!", TALKTYPE_SAY)
doPlayerSendTextMessage(cid,27,'Fale \'up\' para subir e \'down\' para descer!.' )
if fly.using(cid) then
local p = getCreaturePosition(cid)
p.stackpos = 0
local f = getTileThingByPos(p)
if fly.del(cid) then
if f.itemid ~= 0 and f.itemid ~= 1 and f.itemid ~= CONST_FLYVOID then
return true
else
setPlayerStorageValue(cid,10941,1)
local p = getCreaturePosition(cid)
setPlayerStorageValue(cid, 102011,p.x)
setPlayerStorageValue(cid, 102012,p.y)
setPlayerStorageValue(cid, 102013,p.z)
return true
end
else
doPlayerSendTextMessage(cid,27,'Você não pode voar neste local.')
end
end
end
return true
end
Tag :
<action itemid="2464" event="script" value="fly.lua"/>



info
Grupo: Visconde
Registrado: 21/04/08
Posts: 311
Reputação: +257
Olá eu gostária da ajuda no script do forcera esse :
-- !fly by Forcera -- -- Ideia by TheGODMaX -- function onSay(cid, words, param, channel) flypos = getCreaturePosition(cid) npos = {x=flypos.x, y=flypos.y, z=flypos.z - 7} pos = getCreaturePosition(cid) flyoutfit = {lookType = 239, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0} if pos.z == 7 then if doTeleportThing(cid, npos) then doSendMagicEffect(npos, 14) doSetCreatureOutfit(cid, flyoutfit, -1) else return 0 end end return TRUE endEu keria ki ele usasse um summon para poder voar sumisse com o ssumon e depois aparecesse, e dependendo de cada summon ki eu tenhu uma ouflit diferente.
Pode basear nesse teleport , que só funciona se vc tiver tal monstro :
function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end function onSay(cid, words, param) local configs = { needpa = false, needlvl = {true, level = 20}, } local cidades = { ["Holly"] = {x=481,y=474,z=7, pokenames = {"Abra", "Kadabra", "Alakazam"}, time = 1}, } teleport = false if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "You need to be a premmium account to use teleport.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "You need to be level "..configs.needlvl.level.." or higher to use teleport.") end if #getCreatureSummons(cid) <= 0 then return doPlayerSendCancel(cid, "You need to have a monster summoned.") end for i,x in pairs(cidades) do for _,z in pairs(getCreatureSummons(cid)) do if isInArray(x.pokenames, getCreatureName(z)) then if param:lower() == "\"" .. i:lower() then if os.time()-getPlayerStorageValue(cid, 64231) <= x.time*60 then minutes,seconds = getTime(x.time*60-(os.time()-getPlayerStorageValue(cid, 64231))) return doPlayerSendCancel(cid, "You need wait " .. minutes .. " minutes and " .. seconds .. " seconds.") else doTeleportThing(cid, x) doTeleportThing(z, x) setPlayerStorageValue(cid, 64231, os.time()) teleport = TRUE break end end end end end if not teleport then return doPlayerSendCancel(cid, "This city don't exists or not is able to go in there with teleport or this monster don't able to use teleport.") end return TRUE endObrigado deis de já.