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

How can I talk with the TFS before the login?

lucas123

New Member
Joined
Jun 6, 2010
Messages
85
Reaction score
4
I wanna send some informations to server before login in my server, like for create a character in client and send name/vocation/sex to server, before enter ingame.

In OTClient Sources, I created a method for send these informations.

Code:
//drakylucas
void ProtocolGame::sendCharacterCreation(std::string m_accountName, std::string m_characterName, uint8 vocation)
{
    OutputMessagePtr msg(new OutputMessage);
    msg->addU8(Proto::ClientCharacterCreation);
    msg->addString(m_accountName);
    msg->addString(m_characterName);
    msg->addU8(vocation);
    send(msg);
}

for call function by lua:
Code:
 g_lua.bindClassMemberFunction<ProtocolGame>("sendCharacterCreation", &ProtocolGame::sendCharacterCreation);

my question is: How can I check for this packet in TFS before player login? All parses in TFS is after player login, and the firstMessage don't verify the packet number. Can someone help me?
 
@up

I'm receiving the messages in TFS when I'm online, but when I'm offline, the client really don't send anything. I created a function in lua like this:

Code:
function CreateCharacter.sendCreateCharacter()
  g_game.getProtocolGame():sendCharacterCreation(G.account,"Luan Santana",2,1) -- account name, character name, vocation, sex
  CreateCharacter.close()
end


function CreateCharacter.close()
  createCharacterWindow:destroy()
  createCharacterWindow = nil
  CharacterList.showAgain()
end
When i'm online, this CreateCharacter.close works fine, but when I'm offline, the script stuck in sendCharacterCreation (with any kind of error)

help please ^^

EDIT: found the error but I don't know how to fix.
Before login, we don't have a protocol to communication with TFS, the protocol is created in the void loginWorld(). I tryed to create the protocol pointer by myself and didn't work, someone can help me?
 
Last edited:
Back
Top