• 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++ SendTutorial(tutorialId)

Il Knight

Veteran OT User
Joined
Dec 1, 2014
Messages
676
Solutions
7
Reaction score
350
Location
Spain
Hi otlanders, today im stucked because the function player:sendTutorial(tutorialId) is not working with the latest version of tfs.

that function is to send the windows when you start the tutorial of rookgard or dawnport.
(editing your client.pic, you can change that images and do news tutorials to your custom ot)

Code:
void ProtocolGame::sendTutorial(uint8_t tutorialId)
{
    NetworkMessage msg;
    msg.addByte(0xDC);
    msg.addByte(tutorialId);
    writeToOutputBuffer(msg);
}

github :
SendTutorial(tutorialId) not working since the update of 10.98 protocol. · Issue #2227 · otland/forgottenserver · GitHub

Search · sendTutorial · GitHub

the network communication of the flash

Flash-News/Communication.as at f8758e0e825ad4f4458729ed74b25d7d2a277f91 · comedinha/Flash-News · GitHub

up

Up
 
Last edited by a moderator:
So I checked in 10.99 client packet 0xDC(tutorial) and findout that it doesnt trigger event for tutorialbox.
I managed to add this event by dll. If you want to do this without dll you will need to do it in codecave(about 40 bytes).
code for 10.99 dll:
Code:
typedef void _PrepareHint();
static  _PrepareHint* protoPrepareHint = 0;
typedef void _TriggerHint();
static  _TriggerHint* protoTriggerHint = 0;
void HintsFix(){
    asm("movzx %al, %esi");
    asm("mov %esi, -0xF8(%ebp)");
    asm("lea -0x1(%esi), %eax");
    asm("cmp $0x26, %eax");
    asm("ja skok");
    asm("push %esi");
    protoPrepareHint();
    asm("movb $1, (%eax)");
    asm("skok:");
    asm("push $0");
    asm("push %esi");
    asm("push $0x45");
    protoTriggerHint();
    asm("nop");
}

in DLL_PROCESS_ATTACH:
protoPrepareHint = (_PrepareHint*)(baseAddress + 0x1BBDC0);
protoTriggerHint = (_TriggerHint*)(baseAddress + 0x198050);
HookCall(baseAddress + 0X37267, (DWORD)&HintsFix);
Nop(baseAddress + 0x3726C, 4);
 
Back
Top