Iris2.de

Iris2-Forum
It is currently Sat Dec 21, 2024 1:26 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Aug 09, 2010 2:57 pm 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
Well, i'm trying to do some macro without client, ( actually, writing my own command line client for simple thing )

I'm not able to connect to server, I'm tryin to do:

Open a socket, and connect to server.
Sending Seed Packet.
Sending Login Packet.
Recieving Server List.
Sending Server Select Packet.
-- Now I'm expecting for character list packet, but server sends me "Server Relay" packet!
* I'm Sending server GameLoginPacket Response for The Relay Packet.

And Then, Character List Packet never arriving to my program.

Where I'm doing wrong guys, help me please :oops:

Regards.

_________________
Programer's Mantra wrote:
If it ain't broke, it doesn't have enough features yet!


Top
 Profile  
 
PostPosted: Mon Aug 09, 2010 3:22 pm 
Offline
iris2-developer
User avatar

Joined: Tue Aug 22, 2006 1:21 pm
Posts: 173
Location: Munich, Germany
I didt look it up but i think the server sends you the connection information of another server and you need to connect to that one.
but there could be an exception if both servers are the same and you perhaps only need to reinit the connection ...

_________________
O-->---


Top
 Profile  
 
PostPosted: Tue Aug 10, 2010 9:26 am 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
Can't get that work..

Server relay packet gives me same ip and port for the server.

_________________
Programer's Mantra wrote:
If it ain't broke, it doesn't have enough features yet!


Top
 Profile  
 
PostPosted: Fri Aug 13, 2010 7:02 pm 
Offline
iris2-developer
User avatar

Joined: Mon Aug 09, 2004 12:20 pm
Posts: 1431
i think you have to compress your Gameserver connection.


Top
 Profile  
 
PostPosted: Sat Aug 14, 2010 5:17 pm 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
i already decompressing recieved packets using huffman when i get server relay packet. Am i need to compress packets that i sent ?

_________________
Programer's Mantra wrote:
If it ain't broke, it doesn't have enough features yet!


Top
 Profile  
 
PostPosted: Sat Aug 21, 2010 10:41 am 
Offline
iris2-developer
User avatar

Joined: Tue Aug 22, 2006 1:21 pm
Posts: 173
Location: Munich, Germany
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.lua
http://zwischenwelt.org/trac/iris/brows ... inmenu.lua
http://zwischenwelt.org/trac/iris/brows ... .login.lua

login 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

_________________
O-->---


Top
 Profile  
 
PostPosted: Tue Aug 31, 2010 10:21 am 
Offline
Power User
User avatar

Joined: Fri Apr 17, 2009 2:32 pm
Posts: 122
Thanks for reply hagish. I'll give it a try in a few days.

Thanks and regards =)

_________________
Programer's Mantra wrote:
If it ain't broke, it doesn't have enough features yet!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group