|
You last visited: Today at 01:52
Advertisement
[C#]The Arcane Development Thread
Discussion on [C#]The Arcane Development Thread within the SRO Coding Corner forum part of the Silkroad Online category.
10/26/2010, 23:13
|
#166
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Quote:
Originally Posted by kevin_owner
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
|
|
|
10/26/2010, 23:20
|
#167
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
Quote:
Originally Posted by mage200
ok i can enter game interface but no servers
strange error in loginserver gameserver isnt run
here picture:
[IMG]  [/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
|
#168
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
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
|
#169
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Quote:
Originally Posted by kevin_owner
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
|
#170
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
Hmmm i don't think that your table is correct.
Code:
public static void PrivateItemPacket(PacketWriter Writer, int id, byte iType, byte max, byte avatar)
{
try
{
List<byte> slots = new List<byte>();
MsSQL ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + id + "' AND type='" + iType + "' AND slot >= '0' AND slot <= '" + max + "' AND inavatar='" + avatar + "'");
using (SqlDataReader reader = ms.Read())
{
int count = ms.Count();
Console.WriteLine(count);
Writer.Byte(count);
while (reader.Read())
{
if (reader.GetInt32(2) != 0)
{
if (!slots.Exists(delegate(byte bk) { return bk == reader.GetByte(5); }))
{
slots.Add(reader.GetByte(5));
Console.WriteLine("I've added slots.add() value = " + reader.GetByte(5));
}
else
{
Console.WriteLine("item bug found::{0}::{1}::{2}::{3}", avatar, reader.GetByte(5), reader.GetInt32(2), id);
}
Writer.DWord(reader.GetInt32(2));
Writer.Byte(reader.GetByte(4));
}
}
}
ms.Close();
}
catch (Exception ex)
{
Console.WriteLine("PrivateItemPacket()::Error..");
deBug.Write(ex);
}
}
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
UPDATE:
I just got the tables right (see screen) one guy wears a body armor now
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
|
#171
|
elite*gold: 0
Join Date: Feb 2008
Posts: 573
Received Thanks: 279
|
Quote:
Originally Posted by kevin_owner
Hmmm i don't think that your table is correct.
Code:
public static void PrivateItemPacket(PacketWriter Writer, int id, byte iType, byte max, byte avatar)
{
try
{
List<byte> slots = new List<byte>();
MsSQL ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + id + "' AND type='" + iType + "' AND slot >= '0' AND slot <= '" + max + "' AND inavatar='" + avatar + "'");
using (SqlDataReader reader = ms.Read())
{
int count = ms.Count();
Console.WriteLine(count);
Writer.Byte(count);
while (reader.Read())
{
if (reader.GetInt32(2) != 0)
{
if (!slots.Exists(delegate(byte bk) { return bk == reader.GetByte(5); }))
{
slots.Add(reader.GetByte(5));
Console.WriteLine("I've added slots.add() value = " + reader.GetByte(5));
}
else
{
Console.WriteLine("item bug found::{0}::{1}::{2}::{3}", avatar, reader.GetByte(5), reader.GetInt32(2), id);
}
Writer.DWord(reader.GetInt32(2));
Writer.Byte(reader.GetByte(4));
}
}
}
ms.Close();
}
catch (Exception ex)
{
Console.WriteLine("PrivateItemPacket()::Error..");
deBug.Write(ex);
}
}
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 
|
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
|
#172
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
Quote:
Originally Posted by moldi
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
EDIT:
All the char items loads:
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
|
#173
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Quote:
Originally Posted by kevin_owner
Hmmm i don't think that your table is correct.
Code:
public static void PrivateItemPacket(PacketWriter Writer, int id, byte iType, byte max, byte avatar)
{
try
{
List<byte> slots = new List<byte>();
MsSQL ms = new MsSQL("SELECT * FROM char_items WHERE owner='" + id + "' AND type='" + iType + "' AND slot >= '0' AND slot <= '" + max + "' AND inavatar='" + avatar + "'");
using (SqlDataReader reader = ms.Read())
{
int count = ms.Count();
Console.WriteLine(count);
Writer.Byte(count);
while (reader.Read())
{
if (reader.GetInt32(2) != 0)
{
if (!slots.Exists(delegate(byte bk) { return bk == reader.GetByte(5); }))
{
slots.Add(reader.GetByte(5));
Console.WriteLine("I've added slots.add() value = " + reader.GetByte(5));
}
else
{
Console.WriteLine("item bug found::{0}::{1}::{2}::{3}", avatar, reader.GetByte(5), reader.GetInt32(2), id);
}
Writer.DWord(reader.GetInt32(2));
Writer.Byte(reader.GetByte(4));
}
}
}
ms.Close();
}
catch (Exception ex)
{
Console.WriteLine("PrivateItemPacket()::Error..");
deBug.Write(ex);
}
}
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
UPDATE:
I just got the tables right (see screen) one guy wears a body armor now
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
|
#174
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
Quote:
Originally Posted by Xsense
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  ) 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
|
#175
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Ladies and gentlemen i am ingame
Can someone give me the default x y z position coords ?
|
|
|
10/27/2010, 13:33
|
#176
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
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:
|
|
|
10/27/2010, 13:36
|
#177
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Quote:
Originally Posted by kevin_owner
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:
|
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
|
#178
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
|
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
|
#179
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
Quote:
Originally Posted by kevin_owner
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
|
#180
|
elite*gold: 0
Join Date: Oct 2010
Posts: 191
Received Thanks: 565
|
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
|
|
|
Similar Threads
|
[Development]Arcane Files
10/22/2010 - SRO Coding Corner - 4 Replies
Hi guys what happened on the other thread and i rlly don`t like this i decided to open new thread without spams flams trolls etc
this is arcane leaked server files but without db we`re trying to make the db any way download from
From Here:MEGAUPLOAD - The leading online storage and file delivery service
Hope you like it
Lets Be Fair and give the real credits
|
[LEAKED] Arcane Source Code [for Development only]
10/22/2010 - SRO Coding Corner - 136 Replies
Hi,
So have fun :) There alot of File which are missed. But you can see all Packets and .. You cant run that files. Because they are incomplete. You can make youre own Emulator you can see all Packets and Importent Informations.
Look at :
Game/Packets/Public.cs
Game/Packets/Private.cs
Loginserver isnt there. I think we dont need Packets from an LoginServer.
|
All times are GMT +1. The time now is 01:54.
|
|