I'm not sure if i can answer your problem directly so i decided to describe the iris's
login code to you that you can compare you login process with ours.
You can find all packet callbacks in the lua/net directory.
They look like function gPacketHandler.kPacket_PACKETNAME.
lib.packet.lua contains all packet names and their hex numbers.
important files:
http://zwischenwelt.org/trac/iris/brows ... packet.luahttp://zwischenwelt.org/trac/iris/brows ... inmenu.luahttp://zwischenwelt.org/trac/iris/brows ... .login.lualogin procedure:
lib.mainmenu.lua : function MainMenu_SendLogin (user,pass)
connection to Account Server and Login
...
Send_Account_Login_Request(user,pass,gLoginRequestTerminator) -- 0x80 kPacket_Account_Login_Request
net/net.login.lua : function Send_Account_Login_Request (sName,sPassword,iSeed) -- 0x80
sends login data
net/net.login.lua : function gPacketHandler.kPacket_Server_List () -- 0x5E --0xa8 - Recieve Serverlist from LoginServer
retrieve server list
net/net.login.lua : MainMenuShowServerList(serverlist)
displays the list to the user
lib.mainmenu.lua : function MainMenu_SendServer (iServerID)
retrieves the user click and sends the server select
net/net.login.lua : function Send_GameServer_Select(iGameServerID) -- 0xA0
sends server selection packet
net/net.login.lua : function gPacketHandler.kPacket_Server_Redirect () -- 0x8c
handle redirect packet from server
net/net.login.lua : if (gAltenatePostLoginHandling or ClientVersionIsPost7000()) then ...
decides whether to reconnect and how, disconnects and reconnects if necessary
net/net.login.lua : Send_GameServer_PostLogin(gLoginname,gPassword,gameserveraccount)
after establishing the new connection if needed client "resends" account login information
net/net.login.lua : function Send_GameServer_PostLogin(sName,sPassword,iAccount) -- 0x91
-- send postlogin to gameserver kPacket_Post_Login 0x91
-- something is wrong...runuo & wolfpack detects invalid client
-- answered by kPacket_Features 0xB9 and kPacket_Character_List 0xA9
client sends login packet and waits for feature infos or character list
net/net.login.lua : function gPacketHandler.kPacket_Character_List() -- 0xA9
collects character infos and displays them to the user
lib.mainmenu.lua : function MainMenuShowCharList (charlist)
handles charlist menu
lib.mainmenu.lua : function MainMenu_SendSelectChar (charid)
handles character selection
net/lib.login.lua : function Send_Character_Select(iCharacterID,iAccount) -- 0x5D
and send character selection packet
net/lib.login.lua : function gPacketHandler.kPacket_Login_Confirm() -- 0x1B
im not 100% sure but i think the server will answer the with a login confirm packet
which triggers the game start