Ir para conteúdo
US
Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em: --
Participar

Featured Replies

Postado

Oi Pessoal, Estão Bem? Espero Que Sim.
Bom, Queria Ajuda De Vocês Para Concertar Um Erro Que Da Ao Usar Surf No Gyarados, Ele Vai Surfa E Tals, Porém Quando Saio Ele Volta Como Monstro e Me Ataca.

Quando Isso Acontece Na Distro Da Um Erro No SurfCancel, Não São Todos Pokemons Que Isso Acontece Até Agora Só Vi Ele.

Utilizo A Base Dash V10 (Revolution)

 

Sistema Surf

Spoiler

local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}

function onStepIn(cid, item, position, fromPosition)
   
    if not isPlayer(cid) and not isPremium(cid) then -- tire o primeiro not, atras do isPlayer para ativar o premium
        doTeleportThing(cid, fromPosition, false)
        doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
    return true
    end
    
    local pokeballInfo = getPokeballInfo(getPlayerSlotItem(cid, 8).uid)

    if getCreatureOutfit(cid).lookType == 316 then
        doSendMagicEffect(fromPosition, 136)
    end
    
    if not isPlayer(cid) then
        doTeleportThing(cid, fromPosition, false)
    return true
    end

    if getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
        if #getCreatureSummons(cid) == 0 then
            doPlayerSendCancel(cid, "You need a pokemon to surf.")
            doTeleportThing(cid, fromPosition, false)
        else
            if (not isInArray(Ability['Surf'], pokeballInfo.name)) then
                doPlayerSendCancel(cid, "This pokemon cannot surf.")
                doTeleportThing(cid, fromPosition, false)
            return true
            end
        end
    end

    if #getCreatureSummons(cid) >= 1 and isInArray(Ability['Surf'], pokeballInfo.name) and getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
        doSetCreatureOutfit(cid, surf[pokeballInfo.name], -1)
        doCreatureSay(cid, ""..pokeballInfo.nick..", lets surf!", 1)
        doChangeSpeed(cid, -(getCreatureSpeed(cid)))
        doChangeSpeed(cid, surf[pokeballInfo.name].speed)
        setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
        setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
        doRemoveCreature(getCreatureSummons(cid)[1])
        doPlayerSendCancel(cid, "@H|Hide")
        doPlayerSendCancel(cid, "@M|hide")
        addEvent(setPlayerStorageValue, 100, cid, 63215, 1)
    end

    if getPlayerStorageValue(cid, 63215) == 1 then
        if getCreatureLookDir(cid) == 0 then
            doSendMagicEffect(fromPosition, 33)
        elseif getCreatureLookDir(cid) == 1 then
            doSendMagicEffect(fromPosition, 49)
        elseif getCreatureLookDir(cid) == 2 then
            doSendMagicEffect(fromPosition, 30)
        elseif getCreatureLookDir(cid) == 3 then
            doSendMagicEffect(fromPosition, 51)
        end
    end
    
    if getPlayerStorageValue(cid, 17000) >= 1 then
        if not isInArray(flie, getTileInfo(fromPosition).itemid) then
        return true
        end

        if getCreatureLookDir(cid) == 0 then
            doSendMagicEffect(fromPosition, 33)
        elseif getCreatureLookDir(cid) == 1 then
            doSendMagicEffect(fromPosition, 49)
        elseif getCreatureLookDir(cid) == 2 then
            doSendMagicEffect(fromPosition, 30)
        elseif getCreatureLookDir(cid) == 3 then
            doSendMagicEffect(fromPosition, 51)
        end
    end
return true
end

function onStepOut(cid, item, position, fromPosition)
if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileThingByPos(getThingPos(cid)).itemid) then
setPlayerGroupId(cid, 1)
end
return true
end

 

Sistema SurfCancel

Spoiler

function onStepIn(cid, item, position, fromPosition)
local player = getCreatureMaster(cid)    
    if getPlayerStorageValue(cid, 17000) >= 1 then
    return true
    end

    if getPlayerStorageValue(cid, 63215) >= 1 then
        doChangeSpeed(cid, -(getCreatureSpeed(cid)))
        doChangeSpeed(cid, 250)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        setPlayerStorageValue(cid, 63215, 0)
 
        local item = getPlayerSlotItem(cid, 8)
        doCreatureSay(cid, "" .. getPokeballInfo(getPlayerSlotItem(player, 8).uid).nick..", Im tired of surfing!", 1)
        pk = doSummonCreature(getPokeballInfo(getPlayerSlotItem(player, 8).uid).name, getThingPos(cid))
        if getPokeballInfo(getPlayerSlotItem(player, 8).uid).nick then
            doUpdateNick(pk, getPokeballInfo(getPlayerSlotItem(cid, 8).uid).nick.."["..getItemAttribute(getPlayerSlotItem(cid, 8).uid, "level").."]")
        end
        
        local gender = getItemAttribute(item.uid, "gender") or 0
        doCreatureSetSkullType(pk, gender)
        
        if getItemAttribute(item.uid, "happy") then
            setPlayerStorageValue(pk, 66604, (getItemAttribute(item.uid, "happy") or 0))
        end

        doUpdateCreature(pk)
        doConvinceCreature(cid, pk)
        registerCreatureEvent(pk, "DiePoke")
        registerCreatureEvent(pk, "Exp")
        setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))
        doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))
        doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))
        doUpdateCds(cid)
    return true
    end
end

 

 

 

 

 

 

Bom Pessoal É Isso, Espero Conseguir Concertar Esse Erro Pois Estou Querendo Posta A Base OpenSoucer Aqui Com Umas Coisas Bem Legais, Aposto Que Vão Gosta... Mais Preciso Da Ajuda De Vocês :)

 

 

 

 

Para Quem Estiver Com Mesmo Erro Eu Conseguir Corrigir (Ebaaa), Bom Então Vou Deixa O Novo Surf E Surfcancel.

 

SURF

Spoiler

local flie = {'4820', '4821', '4822', '4823', '4824', '4825'}

function onStepIn(cid, item, position, fromPosition)
   
    if not isPlayer(cid) and not isPremium(cid) then -- tire o primeiro not, atras do isPlayer para ativar o premium
        doTeleportThing(cid, fromPosition, false)
        doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
    return true
    end
    
    local pokeballInfo = getPokeballInfo(getPlayerSlotItem(cid, 8).uid)

    if getCreatureOutfit(cid).lookType == 316 then
        doSendMagicEffect(fromPosition, 136)
    end
    
    if not isPlayer(cid) then
        doTeleportThing(cid, fromPosition, false)
    return true
    end

    if getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
        if #getCreatureSummons(cid) == 0 then
            doPlayerSendCancel(cid, "You need a pokemon to surf.")
            doTeleportThing(cid, fromPosition, false)
        else
            if (not isInArray(Ability['Surf'], pokeballInfo.name)) then
                doPlayerSendCancel(cid, "This pokemon cannot surf.")
                doTeleportThing(cid, fromPosition, false)
            return true
            end
        end
    end

    if #getCreatureSummons(cid) >= 1 and isInArray(Ability['Surf'], pokeballInfo.name) and getPlayerStorageValue(cid, 63215) ~= 1 and getPlayerStorageValue(cid, 17000) <= 0 then
        doSetCreatureOutfit(cid, surf[pokeballInfo.name], -1)
        doCreatureSay(cid, ""..pokeballInfo.nick..", lets surf!", 1)
        doChangeSpeed(cid, -(getCreatureSpeed(cid)))
        doChangeSpeed(cid, surf[pokeballInfo.name].speed)
        setPlayerStorageValue(cid, 61209, getCreatureMaxHealth(getCreatureSummons(cid)[1]))
        setPlayerStorageValue(cid, 61210, getCreatureHealth(getCreatureSummons(cid)[1]))
        doRemoveCreature(getCreatureSummons(cid)[1])
        doPlayerSendCancel(cid, "@H|Hide")
        doPlayerSendCancel(cid, "@M|hide")
        addEvent(setPlayerStorageValue, 100, cid, 63215, 1)
    end

    if getPlayerStorageValue(cid, 63215) == 1 then
        if getCreatureLookDir(cid) == 0 then
            doSendMagicEffect(fromPosition, 33)
        elseif getCreatureLookDir(cid) == 1 then
            doSendMagicEffect(fromPosition, 49)
        elseif getCreatureLookDir(cid) == 2 then
            doSendMagicEffect(fromPosition, 30)
        elseif getCreatureLookDir(cid) == 3 then
            doSendMagicEffect(fromPosition, 51)
        end
    end
    
    if getPlayerStorageValue(cid, 17000) >= 1 then
        if not isInArray(flie, getTileInfo(fromPosition).itemid) then
        return true
        end

        if getCreatureLookDir(cid) == 0 then
            doSendMagicEffect(fromPosition, 33)
        elseif getCreatureLookDir(cid) == 1 then
            doSendMagicEffect(fromPosition, 49)
        elseif getCreatureLookDir(cid) == 2 then
            doSendMagicEffect(fromPosition, 30)
        elseif getCreatureLookDir(cid) == 3 then
            doSendMagicEffect(fromPosition, 51)
        end
    end
return true
end

function onStepOut(cid, item, position, fromPosition)
if not isInArray({4820, 4821, 4822, 4823, 4824, 4825}, getTileThingByPos(getThingPos(cid)).itemid) then
setPlayerGroupId(cid, 1)
end
return true
end

 

SURFCANCEL

Spoiler

function onStepIn(cid, item, position, fromPosition)
local player = getCreatureMaster(cid)    
    if getPlayerStorageValue(cid, 17000) >= 1 then
    return true
    end
    if getPlayerStorageValue(cid, 63215) >= 1 then
        doChangeSpeed(cid, -(getCreatureSpeed(cid)))
        doChangeSpeed(cid, 250)
        doRemoveCondition(cid, CONDITION_OUTFIT)
        setPlayerStorageValue(cid, 63215, 0)
 
        local item = getPlayerSlotItem(cid, 8)
        doCreatureSay(cid, "" .. getPokeballInfo(getPlayerSlotItem(player, 8).uid).nick..", Im tired of surfing!", 2)
        pk = doSummonCreature(getPokeballInfo(getPlayerSlotItem(player, 8).uid).name, getThingPos(cid))
        if getPokeballInfo(getPlayerSlotItem(player, 8).uid).nick then
            doUpdateNick(pk, getPokeballInfo(getPlayerSlotItem(cid, 8).uid).nick.."["..getItemAttribute(getPlayerSlotItem(cid, 8).uid, "level").."]")
        end
        
        local gender = getItemAttribute(item.uid, "gender") or 0
        doCreatureSetSkullType(pk, gender)
        
        if getItemAttribute(item.uid, "happy") then
            setPlayerStorageValue(pk, 66604, (getItemAttribute(item.uid, "happy") or 0))
        end
        doUpdateCreature(pk)
        doConvinceCreature(cid, pk)
        registerCreatureEvent(pk, "DiePoke")
        registerCreatureEvent(pk, "Exp")
        setCreatureMaxHealth(pk, (getPlayerStorageValue(cid, 61209)))
        doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61209)))
        doCreatureAddHealth(pk, (getPlayerStorageValue(cid, 61210))-(getPlayerStorageValue(cid, 61209)))
        doUpdateCds(cid)
    return true
    end
end

 

Editado por Mauro Sérgio
Erro De Digitação (veja o histórico de edições)

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.1k
  • Posts 512.4k

Informação Importante

Confirmação de Termo