[C#]The Arcane Development Thread

10/26/2010 23:13 Xsense#166
Quote:
Originally Posted by kevin_owner View Post
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



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'
I have changed it != wasnt needed anyways.
You can disable with 0 as you said above aswell
but since i just wanted to continue developing i did

Code:
 MsSQL ms = new MsSQL("SELECT * FROM karakterler WHERE account='" + name + "'");
well i can just decrypt it or use an excisting logger for it i suppose :)
Currently checking for item equipped on character screen etc.
While i wait until the server is up so i can start sniffing

[Only registered and activated users can see links. Click Here To Register...]
10/26/2010 23:20 kevin_owner#167
Quote:
Originally Posted by mage200 View Post
ok i can enter game interface but no servers
strange error in loginserver gameserver isnt run
here picture:
[IMG][Only registered and activated users can see links. Click Here To Register...][/IMG]
It ain't a strange error just read it it's your database which isn't correctsee those getInt32 things it wants something from the db which has a int data type

and I would like to remeber the people here that this isn't a problem solving thread but a DEVELOPMENT thread. all the stuff about the server table and user table is available in this thread so search for it and if you don't know how to create a database or creating a table this won't be the thread for you and it'll only take more time to finish this thing.

Google is the best source to solve your problems.

all that stuff about the datareader isn't just this project you can find all the info you need for that on google.

ofcourse there are some real problems you can't find on google for example that file reading problem(well it probably will be at google) but if 5 people post the same error with the same screen and up up up up up it all the time it doesn't solve the problem. problem solving is try try try try...

So the subject of this thread be the development and not how to create a database in sql server how can i add a table.
10/26/2010 23:57 kevin_owner#168
I also got the char creating working at the moment The displaying failed when it tries to load the char_items I think that my char_items table is wrong

My char_items table looks like this:
Code:
id -> int (and auto increment)
itemnumber -> varchar
itemid -> int
owner -> int
plusvalue -> int
slot - > int 
type -> int
quantity -> int
durability -> int
inavatar -> int
could this be correct?
10/27/2010 00:04 Xsense#169
Quote:
Originally Posted by kevin_owner View Post
I also got the char creating working at the moment The displaying failed when it tries to load the char_items I think that my char_items table is wrong

My char_items table looks like this:
Code:
id -> int (and auto increment)
itemnumber -> varchar
itemid -> int
owner -> int
plusvalue -> int
slot - > int 
type -> int
quantity -> int
durability -> int
inavatar -> int
could this be correct?
here you go
Code:
	[id] [int] NULL,
	[itemid] [varchar](50) NULL,
	[plusvalue] [int] NULL,
	[durability] [int] NULL,
	[owner] [int] NULL,
	[itemnumber] [varchar](50) NULL,
	[slot] [tinyint] NULL,
	[type] [bigint] NULL,
	[inavatar] [bigint] NULL,
	[quantity] [bigint] NULL
Btw, you need to recode the .DAT file creation.
Since, it doesnt create the files when creating a character.
10/27/2010 12:39 kevin_owner#170
Hmmm i don't think that your table is correct.


This is the PrivateItemPacket thing which is called twice in the Charlisting function.
But I can't find which column it want's as the 5th and 6th one. I assume that the 3rd column would be the itemid. So the 5th and 6th ones are both byte.

so my question is did anyone find out which column does those things want i've tried my combinations and the client crashes when there is a char_item available so i thinkt that means wrong packet:rolleyes:

UPDATE:
I just got the tables right (see screen) one guy wears a body armor now
[Only registered and activated users can see links. Click Here To Register...]
Code:
id -> int
owner -> int
itemid -> int
quantity -> int
slot -> tinyint
plusvalue -> tinyint
itemnumber -> varchar
durability -> int
type -> bigint
inavatar -> bigint
I don't know if all the columns are in the right position with the right data type but for the char listing this works.

so
GetInt32(2) == itemid
GetByte(4) == slot
GetByte(5) == tinyint

So easy if you think about it the client only needs the item id which slot it is and the plusvalue to show those items correctly xD
10/27/2010 12:56 moldi#171
Quote:
Originally Posted by kevin_owner View Post
Hmmm i don't think that your table is correct.


This is the PrivateItemPacket thing which is called twice in the Charlisting function.
But I can't find which column it want's as the 5th and 6th one. I assume that the 3rd column would be the itemid. So the 5th and 6th ones are both byte.

so my question is did anyone find out which column does those things want i've tried my combinations and the client crashes when there is a char_item available so i thinkt that means wrong packet:rolleyes:
When i press start to enter in game, my client crashes suddenly. Does you know the resolv?

BTW, i have a ideea, Would a moderator create a thread where we can post the errors and problems? Because this thread is for developing not for questions xD.
10/27/2010 13:00 kevin_owner#172
Quote:
Originally Posted by moldi View Post
When i press start to enter in game, my client crashes suddenly. Does you know the resolv?

BTW, i have a ideea, Would a moderator create a thread when we can post the errors and problems? Because this thread is for developing not for questions xD.
Indeed i agree with that btw check my previous post i've updated it the char_items are now displayed.

and yeah it crashes when you press start there is something wrong with one of last packets or some wrong value in the db OR both:rolleyes:

EDIT:
All the char items loads:
[Only registered and activated users can see links. Click Here To Register...]

Only one small problem (or big idk yet) the gameserver displays a item bug found so I'll check that out
10/27/2010 13:15 Xsense#173
Quote:
Originally Posted by kevin_owner View Post
Hmmm i don't think that your table is correct.


This is the PrivateItemPacket thing which is called twice in the Charlisting function.
But I can't find which column it want's as the 5th and 6th one. I assume that the 3rd column would be the itemid. So the 5th and 6th ones are both byte.

so my question is did anyone find out which column does those things want i've tried my combinations and the client crashes when there is a char_item available so i thinkt that means wrong packet:rolleyes:

UPDATE:
I just got the tables right (see screen) one guy wears a body armor now
[Only registered and activated users can see links. Click Here To Register...]
Code:
id -> int
owner -> int
itemid -> int
quantity -> int
slot -> tinyint
plusvalue -> tinyint
itemnumber -> varchar
durability -> int
type -> bigint
inavatar -> bigint
I don't know if all the columns are in the right position with the right data type but for the char listing this works.

so
GetInt32(2) == itemid
GetByte(4) == slot
GetByte(5) == tinyint

So easy if you think about it the client only needs the item id which slot it is and the plusvalue to show those items correctly xD
I am now at spawncheck :)
So making progress

Fixed the table , ive used yours above indeed slot was 5 etc.
But now i need to check spawncheck :) so im past endload

Edit1:

Good job on that table :)
Thanks from me
10/27/2010 13:23 kevin_owner#174
Quote:
Originally Posted by Xsense View Post
I am now at spawncheck :)
So making progress

Fixed the table , ive used yours above indeed slot was 5 etc.
But now i need to check spawncheck :) so im past endload

Edit1:

Good job on that table :)
Thanks from me
Nice I just solved some errors on loading the masterys (wrong data type:rolleyes:) so I'm now done with the playerLoadData or how that function is called so now only the loginscreen return an error so i'll dive into that one to see what's the problem.
10/27/2010 13:27 Xsense#175
Ladies and gentlemen i am ingame :)

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

Can someone give me the default x y z position coords ?
10/27/2010 13:33 kevin_owner#176
nice one You're are just a bit faster than me i'm also ingame. My char_items table still gives some problems so it isn't correct.
btw, My proof:
[Only registered and activated users can see links. Click Here To Register...]
10/27/2010 13:36 Xsense#177
Quote:
Originally Posted by kevin_owner View Post
nice one You're are just a bit faster than me i'm also ingame. My char_items table still gives some problems so it isn't correct.
btw, My proof:
[Only registered and activated users can see links. Click Here To Register...]
Good job kevin :)
Well, doesnt matter who is faster
Aslong as the job gets done.

Btw default coords for spawn location ?
10/27/2010 13:37 kevin_owner#178
xsect = 168
ysect = 98
xpos = 966
ypos = 1090
zpos = 40

I got this from CSREMU this where his default values:P
10/27/2010 13:39 Xsense#179
Quote:
Originally Posted by kevin_owner View Post
xsect = 168
ysect = 98
xpos = 966
ypos = 1090
zpos = 40

I got this from CSREMU this where his default values:P
Thanks for that
Going to set it to default value in database.


Item info
Code:
                    slotItem.dbID = reader.GetInt32(0);
                    slotItem.ID = reader.GetInt32(2);
                    slotItem.PlusValue = reader.GetByte(4);
                    slotItem.Type = reader.GetByte(6);
                    slotItem.Amount = reader.GetInt16(7);
                    slotItem.Durability = reader.GetInt32(8);
                    slotItem.Slot = slot;
10/27/2010 13:59 Xsense#180
Code:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[char_items](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[owner] [int] NULL,
	[itemid] [int] NULL,
	[inavatar] [int] NULL,
	[plusvalue] [tinyint] NULL,
	[itemnumber] [varchar](50) NULL,
	[type] [tinyint] NULL,
	[quantity] [smallint] NULL,
	[durability] [int] NULL,
	[slot] [tinyint] NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
Item table :)