-
Re: Dragonball Online Release Source
Alright I found a good solution now
- - - Updated - - -
Quote:
Originally Posted by
ATIDOT3
Anyone have the GameServer.ini :) ?
You need to create by yourself xd
- - - Updated - - -
Quote:
Originally Posted by
Arnie36
do the servers make a connection?
The server couldnt send packet back to client. But I have an other solution which I think might be better.
- - - Updated - - -
@ATIDOT3 you might want to use my current version
http://www.sendspace.com/file/ingyy1
I changed few things and made the char and auth server more clear.
- - - Updated - - -
Now its time to burn my brain and die by the heat while trying to get the mssql library working.
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
Daneos
What is it different than yesterday post ?
Quote:
Originally Posted by
Daneos
- - - Updated - - -
Now its time to burn my brain and die by the heat while trying to get the mssql library working.
MYSQL !! ahahah ^^
-
Re: Dragonball Online Release Source
Can some tell me how to play online ive edited it to my ip but i don know how to do the others can someone give me instructions on how to play online i would be grateful if you could :)
-
Re: Dragonball Online Release Source
MSSQL or Mysql
MSSQL 2008 is good
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
ATIDOT3
What is it different than yesterday post ?
MYSQL !! ahahah ^^
idk how to say. Made the charserver.cpp more clear by moving the "packet" functions to an second cpp file and created a charserver.h and authserver.h file.
No mssql and not mysql. mssql is better for windows & online games. so I will use mssql
- - - Updated - - -
Quote:
Originally Posted by
maximojoni
MSSQL or Mysql
MSSQL 2008 is good
I use mssql 2012 right now.
-
Re: Dragonball Online Release Source
Helpp why??
I enter the normal game
after that choose the character and the game will load to get this message?
http://i.imgur.com/pKIiwh3.jpg
http://i.imgur.com/WgGyhz8.jpg
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
maximojoni
packet exceed allowed size.
If you never read then you will never be able to understand anything.
I already told you 2 times that packet exceed allowed size means, that you have to remove the packet encryption.
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
Daneos
idk how to say. Made the charserver.cpp more clear by moving the "packet" functions to an second cpp file and created a charserver.h and authserver.h file.
No mssql and not mysql. mssql is better for windows & online games. so I will use mssql
- - - Updated - - -
I use mssql 2012 right now.
Just take your source, i'm adding my change on it.
So lets do some msql but i could not help you a lot with this...
-
Re: Dragonball Online Release Source
@Daneos I have read and I already removed
I do not know where I am going wrong now I'll see if I left any backward
need to fix it to work with you in the database
-
Re: Dragonball Online Release Source
Can someone give a guide on how to play online i have the Auth Char and gamer servers all that is needed to play just how to i do it?
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
maximojoni
@
Daneos I have read and I already removed
I do not know where I am going wrong now I'll see if I left any backward
need to fix it to work with you in the database
Check again all files..
- - - Updated - - -
Quote:
Originally Posted by
SSGokug
Can someone give a guide on how to play online i have the Auth Char and gamer servers all that is needed to play just how to i do it?
no. Read all pages
- - - Updated - - -
Quote:
Originally Posted by
ATIDOT3
Just take your source, i'm adding my change on it.
So lets do some msql but i could not help you a lot with this...
I for myself also prefer mysql because Im very used to mysql (Im php developer)
but I read google and in most game developement forum I read that mssql is better.
With mssql I got little experience.. All I need to know is how to run the queries and print the results.. After I know that I can easily write the whole query server.
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
Daneos
Check again all files..
- - - Updated - - -
no. Read all pages
- - - Updated - - -
I for myself also prefer mysql because Im very used to mysql (Im php developer)
but I read google and in most game developement forum I read that mssql is better
Of course msql is better for online game, but lets make the fucking request for get the database value..... i'll kill my and yourself XD.:P:
EDIT:
i got the best idea in the world, like we use msql...
let's make IIS API with it for connect to the database etc ! <--------------------------- never do it.... :adore:
-
Re: Dragonball Online Release Source
Dont know how .. xd
Maybe an experienced user could look into it and tell us how to create queries and print the results.
-
Re: Dragonball Online Release Source
Code:
#include <iostream>
#include <windows.h>
#include <sqltypes.h>
#include <sql.h>
#include <sqlext.h>
using namespace std;
void show_error(unsigned int handletype, const SQLHANDLE& handle){
SQLCHAR sqlstate[1024];
SQLCHAR message[1024];
if(SQL_SUCCESS == SQLGetDiagRec(handletype, handle, 1, sqlstate, NULL, message, 1024, NULL))
cout<<"Message: "<<message<<"nSQLSTATE: "<<sqlstate<<endl;
}
int main(){
SQLHANDLE sqlenvhandle;
SQLHANDLE sqlconnectionhandle;
SQLHANDLE sqlstatementhandle;
SQLRETURN retcode;
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlenvhandle))
goto FINISHED;
if(SQL_SUCCESS!=SQLSetEnvAttr(sqlenvhandle,SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0))
goto FINISHED;
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_DBC, sqlenvhandle, &sqlconnectionhandle))
goto FINISHED;
SQLCHAR retconstring[1024];
switch(SQLDriverConnect (sqlconnectionhandle,
NULL,
(SQLCHAR*)"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=MyDatabase;UID=sa;PWD=Admin-123;",
SQL_NTS,
retconstring,
1024,
NULL,
SQL_DRIVER_NOPROMPT)){
case SQL_SUCCESS_WITH_INFO:
show_error(SQL_HANDLE_DBC, sqlconnectionhandle);
break;
case SQL_INVALID_HANDLE:
case SQL_ERROR:
show_error(SQL_HANDLE_DBC, sqlconnectionhandle);
goto FINISHED;
default:
break;
}
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_STMT, sqlconnectionhandle, &sqlstatementhandle))
goto FINISHED;
if(SQL_SUCCESS!=SQLExecDirect(sqlstatementhandle, (SQLCHAR*)"select * from testtable", SQL_NTS)){
show_error(SQL_HANDLE_STMT, sqlstatementhandle);
goto FINISHED;
}
else{
char name[64];
char address[64];
int id;
while(SQLFetch(sqlstatementhandle)==SQL_SUCCESS){
SQLGetData(sqlstatementhandle, 1, SQL_C_ULONG, &id, 0, NULL);
SQLGetData(sqlstatementhandle, 2, SQL_C_CHAR, name, 64, NULL);
SQLGetData(sqlstatementhandle, 3, SQL_C_CHAR, address, 64, NULL);
cout<<id<<" "<<name<<" "<<address<<endl;
}
}
FINISHED:
SQLFreeHandle(SQL_HANDLE_STMT, sqlstatementhandle );
SQLDisconnect(sqlconnectionhandle);
SQLFreeHandle(SQL_HANDLE_DBC, sqlconnectionhandle);
SQLFreeHandle(SQL_HANDLE_ENV, sqlenvhandle);
}
Found on google
-
Re: Dragonball Online Release Source
[Client Accept]
Address=192.168.0.2
Port=30001
[Server Accept]
Address=192.168.0.2
Port=30002
[Server Connect]
Address=192.168.0.2
Port=10001
[ChatServer Connect]
Address=192.168.0.2
Port=40001 What do i change here?
-
Re: Dragonball Online Release Source
Quote:
Originally Posted by
ATIDOT3
Code:
#include <iostream>
#include <windows.h>
#include <sqltypes.h>
#include <sql.h>
#include <sqlext.h>
using namespace std;
void show_error(unsigned int handletype, const SQLHANDLE& handle){
SQLCHAR sqlstate[1024];
SQLCHAR message[1024];
if(SQL_SUCCESS == SQLGetDiagRec(handletype, handle, 1, sqlstate, NULL, message, 1024, NULL))
cout<<"Message: "<<message<<"nSQLSTATE: "<<sqlstate<<endl;
}
int main(){
SQLHANDLE sqlenvhandle;
SQLHANDLE sqlconnectionhandle;
SQLHANDLE sqlstatementhandle;
SQLRETURN retcode;
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &sqlenvhandle))
goto FINISHED;
if(SQL_SUCCESS!=SQLSetEnvAttr(sqlenvhandle,SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0))
goto FINISHED;
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_DBC, sqlenvhandle, &sqlconnectionhandle))
goto FINISHED;
SQLCHAR retconstring[1024];
switch(SQLDriverConnect (sqlconnectionhandle,
NULL,
(SQLCHAR*)"DRIVER={SQL Server};SERVER=localhost, 1433;DATABASE=MyDatabase;UID=sa;PWD=Admin-123;",
SQL_NTS,
retconstring,
1024,
NULL,
SQL_DRIVER_NOPROMPT)){
case SQL_SUCCESS_WITH_INFO:
show_error(SQL_HANDLE_DBC, sqlconnectionhandle);
break;
case SQL_INVALID_HANDLE:
case SQL_ERROR:
show_error(SQL_HANDLE_DBC, sqlconnectionhandle);
goto FINISHED;
default:
break;
}
if(SQL_SUCCESS!=SQLAllocHandle(SQL_HANDLE_STMT, sqlconnectionhandle, &sqlstatementhandle))
goto FINISHED;
if(SQL_SUCCESS!=SQLExecDirect(sqlstatementhandle, (SQLCHAR*)"select * from testtable", SQL_NTS)){
show_error(SQL_HANDLE_STMT, sqlstatementhandle);
goto FINISHED;
}
else{
char name[64];
char address[64];
int id;
while(SQLFetch(sqlstatementhandle)==SQL_SUCCESS){
SQLGetData(sqlstatementhandle, 1, SQL_C_ULONG, &id, 0, NULL);
SQLGetData(sqlstatementhandle, 2, SQL_C_CHAR, name, 64, NULL);
SQLGetData(sqlstatementhandle, 3, SQL_C_CHAR, address, 64, NULL);
cout<<id<<" "<<name<<" "<<address<<endl;
}
}
FINISHED:
SQLFreeHandle(SQL_HANDLE_STMT, sqlstatementhandle );
SQLDisconnect(sqlconnectionhandle);
SQLFreeHandle(SQL_HANDLE_DBC, sqlconnectionhandle);
SQLFreeHandle(SQL_HANDLE_ENV, sqlenvhandle);
}
Found on google
Dont need it. We already have everything we need inside "NtlDatabase"
Code:
// Connect MSSQL
int rc = NTL_SUCCESS;
HDATABASE hDB = INVALID_HDATABASE;
CSampleSqlUnitHelper sqlUnitHelper(MAX_SQL_ID);
CNtlDatabaseManager databaseManager;
rc = databaseManager.Create(&sqlUnitHelper, 10);
if( NTL_SUCCESS != rc )
{
printf("failed to create database manager");
return -1;
}
rc = databaseManager.Open("dbo2", "sa", "password", &hDB, 10);
if( NTL_SUCCESS != rc )
{
printf("failed to connect to database");
return -1;
}
databaseManager.Start();
and to do a query
Quote:
databaseManager.Query( hDB, new CQuery_Account(TEXT("tester2"), "1234") );
here is a query
Code:
BEGIN_DECLARE_SQLUNIT2( SP_AccountSelect )
//DEFINE_QUERY( "Select UserID, UserPW from Account where AccountID = ?" )
DEFINE_QUERY( "Select AccountID, UserPW from Account where Username = ?" )
BEGIN_VARIABLE()
DWORD m_dwAccountID;
char m_szUserID[MAX_SIZE_USER_ID + 1];
char m_szUserPW[MAX_SIZE_USER_PW + 1];
END_VARIABLE()
// ¼ø¼¿¡ ÁÖÀÇ
BEGIN_COLUMN(2)
COLUMN_ENTRY(m_dwAccountID)
COLUMN_ENTRY_STR(m_szUserPW)
END_PARAM()
// ¼ø¼¿¡ ÁÖÀÇ
BEGIN_PARAM(1)
PARAM_ENTRY_STR(SQL_PARAM_INPUT, m_szUserID)
END_PARAM()
END_DECLARE_SQLUNIT()
but I dont really understand
-
Re: Dragonball Online Release Source
DEFINE_QUERY( "Select AccountID, UserPW from Account where Username = ?" )
i think you get the username with packet,
char* myquery = strcat("Select AccountID, UserPW from Account where Username = ", username);
but the DEFINE_QUERY is :thumbdown:, i think we should make #define getuserDB "Select AccountID, UserPW from Account where Username = "
What is you mssql version 2012 ?
express entreprise etc... ?
-
Re: Dragonball Online Release Source
express
- - - Updated - - -
Quote:
Originally Posted by
ATIDOT3
DEFINE_QUERY( "Select AccountID, UserPW from Account where Username = ?" )
i think you get the username with packet,
[/FONT]
what? That query get the account id and password from the database where the username -> packet
would look like this
databaseManager.Query( hDB, new CQuery_Account(TEXT(req->accountId)) );
req->accountId = Username which client sent to auth server
-
Re: Dragonball Online Release Source
Huuuum yes i think it's like this.
-
Re: Dragonball Online Release Source
@Daneos
good I had to reread to "calm" every page now worked
but because it came from "nothing" as I do not use more "virtualSv" where I'll edit?
[IMG]http://i.imgur.com/uDlUNCF.jpg[/IMG]
-
Re: Dragonball Online Release Source
http://s7.directupload.net/images/140613/98glxqp5.jpg
... Now I have to understand on how to echo the result.
- - - Updated - - -
Quote:
Originally Posted by
maximojoni
@
Daneos
good I had to reread to "calm" every page now worked
but because it came from "nothing" as I do not use more "virtualSv" where I'll edit?
[IMG]
http://i.imgur.com/uDlUNCF.jpg[/IMG]
What is wrong?
-
Re: Dragonball Online Release Source
@Daneos Now to activate things is based on correct data?
MSSQL 2012 which do you use? ultimate?
I'll start thinking about it
-
Re: Dragonball Online Release Source
How do you call the database manager ?
-
Re: Dragonball Online Release Source
Quote:
// Connect MSSQL
int rc = NTL_SUCCESS;
HDATABASE hDB = INVALID_HDATABASE;
CSampleSqlUnitHelper sqlUnitHelper(MAX_SQL_ID);
CNtlDatabaseManager databaseManager;
rc = databaseManager.Create(&sqlUnitHelper, 10);
if( NTL_SUCCESS != rc )
{
printf("failed to create database manager");
return -1;
}
rc = databaseManager.Open("dbo2", "sa", "password", &hDB, 10);
if( NTL_SUCCESS != rc )
{
printf("failed to connect to database");
return -1;
}
databaseManager.Start();
databaseManager.Query( hDB, new CQuery_Account(TEXT("Daneos")) );
added that to the main file from query server. So when I start the query server he will connect to database and run query
-
Re: Dragonball Online Release Source
Ok ty, now let's find how to print the table value correcly ;).