Ir para conteúdo
Propaganda

Posts Recomendados

Boa noite, alguem poderia me ajudar com um "bug", não sei como corrigir, os pokemons estão andando sobre a agua como se fosse um chão normal, o meu jogador não consegue andar na agua, fica bloqueado, porem os pokemons selvagens e o meu summon eles andam na agua normalmente, alguem poderia dar um help ?

  • Like 1
Link para o comentário
https://tibiadevs.com/forums/topic/1400-pokemon-andando-sobre-a-agua/
Compartilhar em outros sites

1 hora atrás, morduk disse:

Qual TFS? Vc pode corrigir usando o script de surf 

é o que você disponibilizou, o pokehash, algo assim 

edit: corrigi, era outro arquivo, mas tinha alguma coisa haver com surf

  • Like 1
Link para o comentário
https://tibiadevs.com/forums/topic/1400-pokemon-andando-sobre-a-agua/#findComment-7171
Compartilhar em outros sites

para quem usar e tiver com esse problema, vai na pasta data/movements/scripts/swimming.lua
substitua por essa versão:

 

local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(-1)

local WATER_ENTRY_EFFECT = 1468

local WATER_SPLASH_EFFECT = {

    [DIRECTION_NORTH] = {x = 0, y = 1, effect = 31},
    
    [DIRECTION_EAST]  = {x = -1, y = 0, effect = 50},
    
    [DIRECTION_SOUTH] = {x = 0, y = -1, effect = 31},
    
    [DIRECTION_WEST]  = {x = 1, y = 0, effect = 52}
}

function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then 
        creature:teleportTo(fromPosition, false)
        return false
    end
    
    if creature:getStorageValue(storageBike) > 0 then
        creature:sendCancelMessage("Sorry, not possible while on bicycle.")
        creature:teleportTo(fromPosition, false)
        return false
    end
    
    local outfit = 267
    
    if hasSummons(creature) then
        local summon = creature:getSummon()
        local summonName = summon:getName()
        local summonSpeed = summon:getTotalSpeed()
        local monsterType = MonsterType(summonName)
        local surfOutfit = monsterType:isSurfable()
        
        if surfOutfit > 0 then
            if surfOutfit > 1 then outfit = surfOutfit end
            creature:changeSpeed(summonSpeed)
            creature:setStorageValue(storageSurf, outfit)
            condition:setOutfit({lookType = outfit})
            creature:addCondition(condition)
            doRemoveSummon(creature:getId(), false, nil, false)
            creature:say(summonName .. ", let's surf!", TALKTYPE_ORANGE_1)
        else
            creature:sendCancelMessage("Sorry, not possible. Your summon cannot surf.")
            creature:teleportTo(fromPosition, false)
            return false
        end
    else
        if creature:getStorageValue(storageSurf) == -1 then
            creature:sendCancelMessage("Sorry, not possible. You need a summon to surf.")
            creature:teleportTo(fromPosition, false)
            return false
        else
            local surfOutfit = creature:getStorageValue(storageSurf)
            condition:setOutfit({lookType = surfOutfit})
            creature:addCondition(condition)
        end
    end
    
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not creature:isPlayer() then return false end
    
    local tile = Tile(creature:getPosition())
    if not tile or not tile:getGround() then return false end
    
    local tileId = tile:getGround():getId()
    if (not isInArray(waterIds, tileId) and position == fromPosition) or (creature:getStorageValue(storageDive) > 0) then
        creature:changeSpeed(creature:getBaseSpeed() - creature:getSpeed())
        creature:setStorageValue(storageSurf, -1)
        creature:setStorageValue(storageSurfEffect, -1)
        doReleaseSummon(creature:getId(), creature:getPosition(), false, false)
        creature:say("Thanks!", TALKTYPE_ORANGE_1)
    end
    
    if not (creature:getStorageValue(storageRide) > 0 or 
            creature:getStorageValue(storageFly) > 0 or 
            creature:getStorageValue(storageBike) > 0 or 
            creature:getStorageValue(storageDive) > 0) then
        creature:removeCondition(CONDITION_OUTFIT)
    end
    
    return true
end
 

Link para o comentário
https://tibiadevs.com/forums/topic/1400-pokemon-andando-sobre-a-agua/#findComment-7193
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar Agora
×
  • Criar Novo...