[C#]The Arcane Development Thread

10/26/2010 18:22 Xsense#151
Quote:
Originally Posted by dipointed View Post
Actually the client crashes at its own.
The server still runs properly, so I guess the chardata packet will be wrong.

uh yeah btw.
I've seen many of you are posting your character table.
Actually I see there could be some problems as soon as you'll get into the chardata packet.
There are 3 unknown values which I miss in your tables.
Check my dump:


Code:
USE [SREMU]
GO
/*** chartable by dipointed
/****** Objekt:  Table [dbo].[karakterler]    Skriptdatum: 10/26/2010 18:11:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[karakterler](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[account] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
	[name] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
	[chartype] [int] NOT NULL,
	[volume] [tinyint] NOT NULL,
	[level] [tinyint] NOT NULL CONSTRAINT [DF_karakterler_level]  DEFAULT ((1)),
	[strength] [smallint] NOT NULL CONSTRAINT [DF_karakterler_strength]  DEFAULT ((20)),
	[intelligence] [smallint] NOT NULL CONSTRAINT [DF_karakterler_intelligence]  DEFAULT ((20)),
	[attribute] [smallint] NOT NULL CONSTRAINT [DF_karakterler_attribute]  DEFAULT ((0)),
	[hp] [int] NOT NULL CONSTRAINT [DF_karakterler_hp]  DEFAULT ((200)),
	[mp] [int] NOT NULL CONSTRAINT [DF_karakterler_mp]  DEFAULT ((200)),
	[gold] [bigint] NOT NULL CONSTRAINT [DF_karakterler_gold]  DEFAULT ((0)),
	[expirience] [bigint] NOT NULL CONSTRAINT [DF_karakterler_expirience]  DEFAULT ((0)),
	[sbpar] [int] NOT NULL CONSTRAINT [DF_karakterler_sbpar]  DEFAULT ((0)),
	[sp] [int] NOT NULL CONSTRAINT [DF_karakterler_sp]  DEFAULT ((0)),
	[gm] [tinyint] NOT NULL CONSTRAINT [DF_karakterler_gm]  DEFAULT ((0)),
	[xsect] [tinyint] NULL CONSTRAINT [DF_karakterler_xsect]  DEFAULT ((168)),
	[ysect] [tinyint] NULL CONSTRAINT [DF_karakterler_ysect]  DEFAULT ((98)),
	[unknown3] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[xpos] [int] NULL CONSTRAINT [DF_karakterler_xpos]  DEFAULT ((966)),
	[ypos] [int] NULL CONSTRAINT [DF_karakterler_ypos]  DEFAULT ((1090)),
	[zpos] [int] NULL CONSTRAINT [DF_karakterler_zpos]  DEFAULT ((40)),
	[s_hp] [int] NOT NULL CONSTRAINT [DF_karakterler_s_hp]  DEFAULT ((200)),
	[s_mp] [int] NOT NULL CONSTRAINT [DF_karakterler_s_mp]  DEFAULT ((200)),
	[min_phyatk] [int] NULL,
	[max_phyatk] [int] NULL,
	[min_magatk] [int] NULL,
	[max_magatk] [int] NULL,
	[phydef] [smallint] NULL,
	[magdef] [smallint] NULL,
	[hit] [smallint] NULL,
	[parry] [smallint] NULL,
	[unknown] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[walkspeed] [int] NULL CONSTRAINT [DF_karakterler_walkspeed]  DEFAULT ((50)),
	[runspeed] [int] NULL CONSTRAINT [DF_karakterler_runspeed]  DEFAULT ((50)),
	[berserkerspeed] [int] NULL CONSTRAINT [DF_karakterler_berserkerspeed]  DEFAULT ((50)),
	[berserkerbar] [tinyint] NULL CONSTRAINT [DF_karakterler_berserkerbar]  DEFAULT ((0)),
	[unknown2] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
	[mag_absord] [smallint] NULL CONSTRAINT [DF_karakterler_mag_absord]  DEFAULT ((0)),
	[phy_absord] [smallint] NULL CONSTRAINT [DF_karakterler_phy_absord]  DEFAULT ((0)),
	[savearea] [tinyint] NULL CONSTRAINT [DF_karakterler_savearea]  DEFAULT ((1)),
	[title] [tinyint] NULL CONSTRAINT [DF_karakterler_title]  DEFAULT ((1)),
	[deleted] [tinyint] NULL CONSTRAINT [DF_karakterler_deleted]  DEFAULT ((0)),
	[deletedtime] [datetime] NULL CONSTRAINT [DF_karakterler_deletedtime]  DEFAULT ('10.10.2010')
) ON [PRIMARY]
€: oh yeah I forgot.
Does somebody know what is meant with 'savearea'?
I have no clue where this comes from.
Yeah i just noticed the next step i was trying
Which shows the reader reads from cell43
So added another unknown to it.
Savearea, havent seen it there but when i think about savearea
Perhaps its for reverse scrolls or such related.
Guess i have to dig for that one, but meanwhile going back to character listening.

Could be that the packet data is wrong.
But that would mean either update to new client changed opcode's etc
Which is somewhat of a hassle
10/26/2010 18:26 kevin_owner#152
Quote:
Originally Posted by Xsense View Post
Yeah i just noticed the next step i was trying
Which shows the reader reads from cell43
So added another unknown to it.
Savearea, havent seen it there but when i think about savearea
Perhaps its for reverse scrolls or such related.
Guess i have to dig for that one, but meanwhile going back to character listening.

Could be that the packet data is wrong.
But that would mean either update to new client changed opcode's etc
Which is somewhat of a hassle
I thought that the savearea would be something like Jangan the spot where the player is.

btw those GetInt16 things doesn't start with 1 but with 0 so the first column is 0 and and GetDatetime(43) asks for column 44
but i assume that you already know that.

and another very strange thing i've 2 identical records one works and the other doesn't work and when i use those 2 at the same time they both doesn't work xD
10/26/2010 18:40 kevin_owner#153
Quote:
Originally Posted by dipointed View Post
yup.
Mostly the first columnt is known as a primary key (auto_increment).

Can you give me an example of your record-problem?

--dip
I just fixed that problem i messed up my code at least I think.

I can now create a char but there only a little problem I can create a char but if i create a new one the old one doesn't show up. and when i relog they are both gone and it shows a char when i create a new one this could be a bug in the code cuz everything seems to be correct in the db.

excep the chars are still nude while they have items so that can also be a little problem i don't know this emu supports that stuff but i assume it does
10/26/2010 19:17 kevin_owner#154
Quote:
Originally Posted by darkdamp View Post
why do you need a ksro acc? pff
too sniff? doh this emu is created with the ksro client so it seems to be logical to use ksro client to sniff:D

the mayor things could be work with isro only the opcodes are different but i don't know much about that network stuff i'm trying to understand that stuff.


offtopic: Does anyone of you have an advice to start with packet sniffing and those stuff. i know how i can make socket with winsock ect but i've no idea how i can sniff or create my packet sturcture. Is there some kind of reference for those things?
10/26/2010 19:24 Xsense#155
Im almost ingame :)
Completed all the missing folder data

.dat files,
And fixed the full character / skill tables.
Also completed the debug folder / file information that needs to be written

Right now im at this point

Code:
            PlayerQuickBar(reader, Writer);
            reader = new PacketReader(System.IO.File.ReadAllBytes(Environment.CurrentDirectory + @"\player\info\autopot\" + c.Information.Name + ".dat"));
:) To be continued

Ps folder structure in bin
Code:
player\debug\
player\autopot\
player\quickbar\
The debug contains charname.txt
The autopot / quickbar contains c.Information.charname.dat

Edit 2:
Seems random crash now, going to look into the endload data

Edit 3:
Seems the endload opcode is wrong.
Need to get on ksro, or a private server (seems some new ones came out)
And sniff the packet.

(Currently downloading swift, going to sniff there if its online).
If anyone has the opcode allready and packet structure if changed in anyway.
Send me a pm.
Will update this post with more info when i got more news.
10/26/2010 20:29 Xsense#156
Quote:
Originally Posted by penelopee View Post
Could somebody share his db?

@mage200

try this in the Annex ( this is just gameserver + Login server , you must change something i think ^^ but , i hope it is helpfull ) ! I DONT have made this files/programms ! I just found it in this forum , also tryed , but now i only need db ^^. May i can add something .

Greatz: Penelopee
You need more the only the database.
The server misses some functionality.

For example
Character creation, had to be redone.
Due to missing creation of data files for the account.
And the empty null fields that needs to have default values.
Also the magical defense has issues which was a wrong calculation.
And as it looks by right now.
It will also need a new opcode, for (finalizing character loading).
10/26/2010 21:00 xnukex77#157
Quote:
Originally Posted by Xsense View Post
Im almost ingame :)
Completed all the missing folder data

.dat files,
And fixed the full character / skill tables.
Also completed the debug folder / file information that needs to be written

Right now im at this point

Code:
            PlayerQuickBar(reader, Writer);
            reader = new PacketReader(System.IO.File.ReadAllBytes(Environment.CurrentDirectory + @"\player\info\autopot\" + c.Information.Name + ".dat"));
:) To be continued

Ps folder structure in bin
Code:
player\debug\
player\autopot\
player\quickbar\
The debug contains charname.txt
The autopot / quickbar contains c.Information.charname.dat

Edit 2:
Seems random crash now, going to look into the endload data

Edit 3:
Seems the endload opcode is wrong.
Need to get on ksro, or a private server (seems some new ones came out)
And sniff the packet.

(Currently downloading swift, going to sniff there if its online).
If anyone has the opcode allready and packet structure if changed in anyway.
Send me a pm.
Will update this post with more info when i got more news.
share db ? :rolleyes:
10/26/2010 21:04 LastThief#158
now got problem on starting game server don`t send

debug code

Unhandled exception at 0x7c812aeb in 2. GameServer.exe: 0xE0434352: 0xe0434352.

[Only registered and activated users can see links. Click Here To Register...]

as same as mage (its not my snap shot its his snap shot :p)

edit 1:btw i've done big part how to config MSSQL exactly and make the default user sa with admin rights to use login server correctly and how to edit database.ini and server.ini but waiting to solve Game server problem and how to config Edx loader too i will make tut as soon as i fix game server and i complete the db

edit2:kk now i can open the client what is default account for logging ?
10/26/2010 22:22 dipointed#159
Quote:
Originally Posted by Xsense View Post
Im almost ingame :)
Completed all the missing folder data

.dat files,
And fixed the full character / skill tables.
Also completed the debug folder / file information that needs to be written

Right now im at this point

Code:
            PlayerQuickBar(reader, Writer);
            reader = new PacketReader(System.IO.File.ReadAllBytes(Environment.CurrentDirectory + @"\player\info\autopot\" + c.Information.Name + ".dat"));
:) To be continued

Ps folder structure in bin
Code:
player\debug\
player\autopot\
player\quickbar\
The debug contains charname.txt
The autopot / quickbar contains c.Information.charname.dat

Edit 2:
Seems random crash now, going to look into the endload data

Edit 3:
Seems the endload opcode is wrong.
Need to get on ksro, or a private server (seems some new ones came out)
And sniff the packet.

(Currently downloading swift, going to sniff there if its online).
If anyone has the opcode allready and packet structure if changed in anyway.
Send me a pm.
Will update this post with more info when i got more news.
That's exactly where I am.
I didn't had the chance to check the endload opcode till now.
Propably the chardata packet is also wrong. :/
10/26/2010 22:28 kevin_owner#160
Quote:
Originally Posted by dipointed View Post
That's exactly where I am.
I didn't had the chance to check the endload opcode till now.
Propably the chardata packet is also wrong. :/
Yeah when i could see the chars I crashed at the last part which was the EndPlayerLoad() function.

Quote:
Originally Posted by polat2587 View Post
up
Check multiclient on your edx loader and it'll start
10/26/2010 22:33 LastThief#161
@kevin what about me don't send while starting game server Unhandled exception at 0x7c812aeb in 2. GameServer.exe: 0xE0434352: 0xe0434352.

and what the default account for login ?
10/26/2010 22:36 kevin_owner#162
Quote:
Originally Posted by LastThief View Post
@kevin what about me don't send while starting game server Unhandled exception at 0x7c812aeb in 2. GameServer.exe: 0xE0434352: 0xe0434352.

and what the default account for login ?
I have no idea what that could be that the files doesn't load mabye a restart helps? I have no idea

And default account for what? mssql or silkroad
cuz silkroad doesn't have a default login account mssql was username sa and password 1234 OR your windows account & password One of those 2 where default i don't know which one but I could be wrong. So correct me if i'm wrong:)
10/26/2010 22:38 LastThief#163
let me explain i started game server got till loading files then VS (visual studio) started to debug the problems

and default login for silkroad
10/26/2010 22:39 Xsense#164
Quote:
Originally Posted by dipointed View Post
That's exactly where I am.
I didn't had the chance to check the endload opcode till now.
Propably the chardata packet is also wrong. :/

Well i saw that, zelos uses a version just a bit higher.
So, im thinking might as well go for broke and update all opcode's
But their server is still in check.
And the official ksro i cant get on there which is annoying.
Any suggestions are welcome.
10/26/2010 23:01 kevin_owner#165
Quote:
Originally Posted by LastThief View Post
let me explain i started game server got till loading files then VS (visual studio) started to debug the problems

and default login for silkroad
Aha oke but do you run your gameserver in debug mode cuz i'm also having problems with a program in debug mode to read .txt files
and silkroad doesn't have a default login you have to create one in the users table

Quote:
Originally Posted by Xsense View Post
Well i saw that, zelos uses a version just a bit higher.
So, im thinking might as well go for broke and update all opcode's
But their server is still in check.
And the official ksro i cant get on there which is annoying.
Any suggestions are welcome.
Well I don't have any suggestion(cuz I don't know much about opcodes. I'm still trying to figure out how those things work and how i can write a packet reader in c++) but I have a little question. In the Private.cs about line 86 there is this query:
Code:
            MsSQL ms = new MsSQL("SELECT TOP 4 * FROM karakterler WHERE account='" + name + "' AND deleted != '1'");
does this one work for you or did you changed it? cuz i'd to change it to 'deleted = 0'