• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

about mount tfs 1.5 8.0

Mateus Robeerto

Excellent OT User
Joined
Jun 5, 2016
Messages
1,337
Solutions
71
Reaction score
697
Location
ლ(ಠ益ಠლ)
Hello, I ask for your help..

1- I already uncommented the source
2- I activated feature in otclient
3- spr and dat 10.98(12x) I made it downgrage in 8.0
4- I got mount.xml from 12x I threw my ot
5- I enter the game, there was an error, nothing worked, when I walk and at the time there was a black screen
6-that symbol icon "assemble and disassemble" you can't click anything
Could it be that I did something wrong? I already looked for a tutorial and I didn't find it, does anyone know where I can find a tutorial or can someone make a tutorial that I appreciate


NOTE: if I deactivate the otclient feature, however, all items, outfit, monsters, etc. work normally, there is no problem with the black screen, I walk normally fine.

follow the imageb3a5d45b-927f-42c3-8ccb-21602ad7bc85.jpg
 
Last edited:
Correct?

game.cpp

C++:
void Game::playerToggleMount(uint32_t playerId, bool mount)
{
    Player* player = getPlayerByID(playerId);
    if (!player) {
        return;
    }

    player->toggleMount(mount);
}

void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit)
{
    if (!g_config.getBoolean(ConfigManager::ALLOW_CHANGEOUTFIT)) {
        return;
    }

    Player* player = getPlayerByID(playerId);
    if (!player) {
        return;
    }

    const Outfit* playerOutfit = Outfits::getInstance().getOutfitByLookType(player->getSex(), outfit.lookType);
    if (!playerOutfit) {
        outfit.lookMount = 0;
    }

    if (outfit.lookMount != 0) {
        Mount* mount = mounts.getMountByClientID(outfit.lookMount);
        if (!mount) {
            return;
        }

        if (!player->hasMount(mount)) {
            return;
        }

        if (player->isMounted()) {
            Mount* prevMount = mounts.getMountByID(player->getCurrentMount());
            if (prevMount) {
                changeSpeed(player, mount->speed - prevMount->speed);
            }

            player->setCurrentMount(mount->id);
        } else {
            player->setCurrentMount(mount->id);
            outfit.lookMount = 0;
        }
    } else if (player->isMounted()) {
        player->dismount();
    }

    if (player->canWear(outfit.lookType, outfit.lookAddons)) {
        player->defaultOutfit = outfit;

        if (player->hasCondition(CONDITION_OUTFIT)) {
            return;
        }

        internalCreatureChangeOutfit(player, outfit);
    }
}

player.cpp

C++:
uint8_t Player::getCurrentMount() const
{
    int32_t value;
    if (getStorageValue(PSTRG_MOUNTS_CURRENTMOUNT, value)) {
        return value;
    }
    return 0;
}

void Player::setCurrentMount(uint8_t mountId)
{
    addStorageValue(PSTRG_MOUNTS_CURRENTMOUNT, mountId);
}

bool Player::toggleMount(bool mount)
{
    if ((OTSYS_TIME() - lastToggleMount) < 3000 && !wasMounted) {
        sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED);
        return false;
    }

    if (mount) {
        if (isMounted()) {
            return false;
        }

        if (!group->access && tile->hasFlag(TILESTATE_PROTECTIONZONE)) {
            sendCancelMessage(RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE);
            return false;
        }

        const Outfit* playerOutfit = Outfits::getInstance().getOutfitByLookType(getSex(), defaultOutfit.lookType);
        if (!playerOutfit) {
            return false;
        }

        uint8_t currentMountId = getCurrentMount();
        if (currentMountId == 0) {
            sendOutfitWindow();
            return false;
        }

        Mount* currentMount = g_game.mounts.getMountByID(currentMountId);
        if (!currentMount) {
            return false;
        }

        if (!hasMount(currentMount)) {
            setCurrentMount(0);
            sendOutfitWindow();
            return false;
        }

        if (currentMount->premium && !isPremium()) {
            sendCancelMessage(RETURNVALUE_YOUNEEDPREMIUMACCOUNT);
            return false;
        }

        if (hasCondition(CONDITION_OUTFIT)) {
            sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);
            return false;
        }

        defaultOutfit.lookMount = currentMount->clientId;

        if (currentMount->speed != 0) {
            g_game.changeSpeed(this, currentMount->speed);
        }
    } else {
        if (!isMounted()) {
            return false;
        }

        dismount();
    }

    g_game.internalCreatureChangeOutfit(this, defaultOutfit);
    lastToggleMount = OTSYS_TIME();
    return true;
}


protocolgame.cpp


C++:
void ProtocolGame::parseToggleMount(NetworkMessage& msg)
{
    bool mount = msg.getByte() != 0;
    addGameTask(&Game::playerToggleMount, player->getID(), mount);
}
 
yes correct, just like you sent, everything is already uncommented
v8 feature
Lua:
if(version >= 800) then
        g_game.enableFeature(GameWritableDate)
         g_game.enableFeature(GamePlayerMounts)

    end
see if it is correct? have more put something? type ilde? and animation 32x?
see the video ;/
maybe something was missing?
 
yes correct, just like you sent, everything is already uncommented
v8 feature
Lua:
if(version >= 800) then
        g_game.enableFeature(GameWritableDate)
         g_game.enableFeature(GamePlayerMounts)

    end
see if it is correct? have more put something? type ilde? and animation 32x?
see the video ;/
maybe something was missing?


Do you have any errors in the log?.
i use this on my server for mount and addons and some custom:

1685926836405.png

on the downgrade of .spr and .dat u already update ur items.otb sync the server with new items on client?
 
I already updated everything yes otb and customer was that you gave me items.otb and spr and dat that I downloaded that you posted there, I just downgraged to 8.0 and entered normally without activating feature of v8

watch the video without activating the v8 feature and it entered normally without bugging the black screen and it has everything from version 12 items
 
I already updated everything yes otb and customer was that you gave me items.otb and spr and dat that I downloaded that you posted there, I just downgraged to 8.0 and entered normally without activating feature of v8

watch the video without activating the v8 feature and it entered normally without bugging the black screen and it has everything from version 12 items


So the problem you have is at the moment of parsing the mounts, something must be missing from the base.

I have to try it to find out what could be missing exactly what I believe I have the same code.
 
So the problem you have is at the moment of parsing the mounts, something must be missing from the base.

I have to try it to find out what could be missing exactly what I believe I have the same code.
I think so just because of the code in the source, very strange, I just went to uncomment that I was commenting and I compiled,,, spr and dat 12x downgrage pro 8.0 and items.otb too...

I'm going to test the client without being spr extended and add a mount to see if it worked,



my colleague added the mounts in the normal spr without being extended, just uncomment , compile , and enable the v8 feature and it worked
 
Last edited:
Hello, I ask for your help..

1- I already uncommented the source
2- I activated feature in otclient
3- spr and dat 10.98(12x) I made it downgrage in 8.0
4- I got mount.xml from 12x I threw my ot
5- I enter the game, there was an error, nothing worked, when I walk and at the time there was a black screen
6-that symbol icon "assemble and disassemble" you can't click anything
Could it be that I did something wrong? I already looked for a tutorial and I didn't find it, does anyone know where I can find a tutorial or can someone make a tutorial that I appreciate


NOTE: if I deactivate the otclient feature, however, all items, outfit, monsters, etc. work normally, there is no problem with the black screen, I walk normally fine.

follow the imageView attachment 75917
can you share what you uncommented in order to see? i have mounts working and i think there's missing things
 
can you share what you uncommented in order to see? i have mounts working and i think there's missing things
It's already resolved. It was necessary to look for where the 'commented' passages were and remove the comments. I believe it was in the files games.cpp, player.cpp, protocolgame.cpp and signal.cpp, but at the moment I'm not sure if it was exactly those that needed to be uncommented.
 
Back
Top