• 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!

C++ Convert from 7.6 to 7.72 debug vip list

qben360

Member
Joined
Feb 20, 2015
Messages
170
Solutions
1
Reaction score
12
Hello guys i convert yurots 7.6 to 7.72, all its work but i have problem with add someone to vip list. If i want add someone to vip list i got debug about packets, same its with change player lvl if i change player level or mlvl i got debug after login. Someone can help me ?

Debug about vip list:
C++:
+---------------------------------------------------------------
Debug Assertion 1.0 Network.cpp 391
Thu Feb 22 13:11:04 2018
Windows Version: 6.2 build 9200 on 2
Graphic Engine: 2
Last Packet Types: 140 030 140 162 160 130 172 210 180 180
Last Packet: 006 000 140 184 043 000 016 100 000 000 000 000 000 000 000 000
Player Position: [142,37,7]
Player.cpp 383: exception occurred, reason:
Network.cpp 885: exception occurred (ErrorCode = 0), reason:
Control.cpp 1280: exception occurred (Type = -1), reason:
Network.cpp 423: exception occurred, reason:
Network.cpp 410: exception occurred, reason:
Network.cpp 391: packet size does not fit to symmetric encryption (PacketSize = 21)
----------------------------------------------------------------

Debug after change lvl or mlvl on player:

C++:
+---------------------------------------------------------------
Debug Assertion 1.0 Creatures.cpp 634
Thu Feb 22 15:08:41 2018
Windows Version: 6.2 build 9200 on 2
Graphic Engine: 2
Last Packet Types: 160 131 100 010 172 100 020 140 160 141
Last Packet: 238 014 172 002 000 010 000 083 101 114 118 101 114 032 076 111
Player Position: [138,37,7]
Player.cpp 383: exception occurred, reason:
Network.cpp 885: exception occurred (ErrorCode = 0), reason:
Control.cpp 1280: exception occurred (Type = 160), reason:
Communication.cpp 2347: exception occurred, reason:
Creatures.cpp 634: assertion failed (Progress = 155), reason:
In(Progress,-1,100) [bug0000038]
----------------------------------------------------------------
 
Hello qben360,

I think you won't find people that support old engines like that, the code is deprecated and probably bad.

Giving us error messages from a client which he don't have a source code for doesn't help at all.

Either you post the whole sources for the Yurots if you want someone to help or you rewrite (probably copy, paste and do small fixes) to the protocol & protocolgame.cpp. Hard if you don't have a clue about programming.

Also go for OTClient as it wont crash and you'll probably be able to get more information about what's going on.

Regards,
Okke
 
Hello qben360,

as I told you, people are more likely not going to help you as the distribution is old and the code is not good / deprecated.

If you want to get your yurots running correctly you could learn a little bit of C++ and kind of check on OTHire's protocol files, those will help you a lot: OTHire/source at master · TwistedScorpio/OTHire · GitHub

Regards,
Okke
 
Someone can check this code? i think its problem with packets? someone know what i need to edit?


C++:
#ifdef ELEM_VIP_LIST
void Protocol76::elemParseAddVip(NetworkMessage &msg)
{
    std::string name = msg.GetString();
    Creature* c = game->getCreatureByName(name.c_str());
    Player* p = dynamic_cast<Player*>(c);

    if (game->isPlayer(name.c_str()))
    {
        bool success = false;
        for (int i = 0; i < MAX_VIPS; i++)
        {
            if (player->vip[i].empty())
            {
                NetworkMessage msgs;
                msgs.AddByte(0xD2);
                msgs.AddU32(i+1);
                msgs.AddString(name);
                if(p)
                    msgs.AddByte(0x01);
                else
                    msgs.AddByte(0x02);

                msgs.WriteToSocket(s);
                player->vip[i] = name;
                success = true;
                break;
            }
        }
        if (!success)
            player->sendCancel("Your VIP list is currently full, please remove some of your VIP's before adding more.");
    }
    else
        player->sendCancel("A player with that name does not exist.");
}

its about add someone to vip list i got automatically debuged
 
Why don't you compare your sources with OTHire's and change what needs to be changed? (packetsizes and whatsoever)?
 
@Okke because othire is otserv 0.6.4 downgraded, and my distro is edited yurots (xml) so othire sources so fcking diffrent bro

p.s: on 7.6 client my distro working perfectly 0 debugs, but if i converted to 7.72 add rsa xtea itp, i think i need to changes packets, but i didint know where in this vip function
 
The 7.72 doesn't handle the information like the 7.6 one.

You'll have to take a look at the OTHire ones and rebuild, there is no other way around.

It should look like this:

C++:
void Protocol76::parseAddVip(NetworkMessage &msg)
{
        std::string vip_name = msg.GetString();
        if(vip_name.size() > 32)
                return;
        game->requestAddVip(player, vip_name);
}

It's a little bit of work but there you go, just take your time.

Regards,
Okke
 
Back
Top