|
You last visited: Today at 03:00
Advertisement
[RELEASE] WORKING Fixed Serverfiles+English gameclient!
Discussion on [RELEASE] WORKING Fixed Serverfiles+English gameclient! within the Dekaron Private Server forum part of the Dekaron category.
01/12/2009, 09:51
|
#706
|
elite*gold: 20
Join Date: Sep 2008
Posts: 695
Received Thanks: 57
|
Quote:
Originally Posted by ocriss
hi guys i am having a problem i made my server and i having an error sayin respons time expired
|
youre internet must suck for it to say that means you cant get in because thier are to many players or youre internet is sucking lol keep trying ....
|
|
|
01/12/2009, 12:58
|
#707
|
elite*gold: 0
Join Date: Jan 2009
Posts: 9
Received Thanks: 0
|
register.php
Code:
<?php
require_once "config.inc.php";
if(isset($_SESSION[step2]) && isset($_POST[step2])) {
$errorStr = formStep3();
if($errorStr!=null){
require_once('register.html');
}else{
require_once('success.html');
$suc=$success;
unset($_SESSION[step2], $_SESSION[step1]);
}}
else {
require_once('register.html');
$_SESSION[step2] = 1; }
function formStep3(){
$errors = array();
$errorStr = null;
$strSql="select * from Tbl_user where user_id='$_POST[username]'";
if ($_POST[ZoneGroup]=="zone1") {
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_name,$db_user,$db_pwd);
} elseif ($_POST[ZoneGroup]=="zone2") {
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_names,$db_user,$db_pwd);
} else {
die ("<p><b>·ÖÇøÑ¡Ôñ´íÎó!</b></p>");
}
$user_array=odbc_do($account_odbc,$strSql);
$array_query=odbc_fetch_row($user_array);
if (odbc_result($user_result,1)!= "") $errors[] = "¸ÃÃû³ÆÒѾ*±»Õ¼Óã¬ÇëÖØÐÂÊäÈë";
if(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST[username])) $errors[]="Ö»ÄÜÓÃÓ¢ÎÄ´óСд×ÖĸÊý×ÖµÄ×éºÏ×÷ΪÓû§Ãû";
if(strlen($_POST[username])<6) $errors[] = "Óû§ÃûµÄ³¤¶È²»ÄÜСÓÚ6λ";
if(strlen($_POST[username])>12) $errors[]= "Óû§ÃûµÄ³¤¶È²»Äܳ¬¹ý12λ";
if(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST[password1])) $errors[]="Ö»ÄÜÓÃÓ¢ÎÄ´óСд×ÖĸÊý×ÖµÄ×éºÏ×÷ΪÃÜÂë";
if(preg_match("/^[0-9]{6,12}$/i",$_POST[password1])) $errors[]="²»¿ÉʹÓô¿Êý×Ö×÷ΪÃÜÂë";
if($_POST[username]==$_POST[password1]) $errors[]= "ÕʺźÍÃÜÂë²»ÄÜÏàͬ";
if(strlen($_POST[password1])<6) $errors[] = "ÃÜÂëµÄ³¤¶È²»ÄÜСÓÚ6λ";
if(strlen($_POST[password1])>12) $errors[] = "ÃÜÂ볤¶È²»ÄÜ´óÓÚ12λ";
if($_POST[password2]!=$_POST[password1]) $errors[] = "ÊäÈëµÄÃÜÂë²»Ò»ÖÂ";
if(strlen($_POST[question])>20) $errors[] = "ÕÒ»ØÃÜÂëÎÊÌâ´óÓÚ20룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[question])<10) $errors[] = "ÕÒ»ØÃÜÂëÎÊÌâСÓÚ10룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[answer])>20) $errors[] = "ÕÒ»ØÃÜÂë´ð°¸´óÓÚ20룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[answer])<10) $errors[] = "ÕÒ»ØÃÜÂë´ð°¸Ð¡ÓÚ10룬Çë·µ»ØÖØÐÂÊäÈë";
if(!preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST[mail])) $errors[]="EmailµØÖ·²»ÕýÈ·£¬ÇëÖØÐÂÊäÈëÕýÈ·µÄEmailµØÖ·";
if(sizeof($errors)>0){
$errorStr .= "<br><font>";
$errorStr .= "ÐÅÏ¢ÊäÈë´íÎó£º";
foreach($errors as $error)
$errorStr .= "<li>$error</li>";
$errorStr .= "</font><br><br>";
}else{
$passwd_user=md5($_POST[password1]);
$dk_time=strftime("%y%m%d%H%M%S");
list($usec1, $sec1) = explode(" ",microtime());
$dk_user_no=$dk_time.substr($usec1,2,2);
$dk_account_query="insert into user_profile(user_no,user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) values('$dk_user_no','$_POST[username]','$passwd_user','801011000000','1','0','Y','01/01/2006 00:00:00',null,null,null,'000')";
$dk_account_query2="insert into Tbl_user(user_no,user_id,user_pwd,user_mail,user_answer,user_question) values('$dk_user_no','$_POST[username]','$_POST[password1]','$_POST[mail]','$_POST[answer]','$_POST[question]')";
$dk_account_result1=odbc_do($account_odbc,$dk_account_query);
$dk_account_result2=odbc_do($account_odbc,$dk_account_query2);
odbc_close($account_odbc);
}
return $errorStr;
}
?>
config.php
Code:
<?php
//¿ªÊ¼session
session_start();
//ÉèÖò»½øÐб¾µØ»º´æ
header('Expires: '.date('D,d M Y H:i:s',mktime(0,0,0,1,1,2000)).' GMT');
header('Last-Modified:'.gmdate('D,d M Y H:i:s').' GMT');
header('Cache-control: private, no-cache,must-revalidate');
header('Pragma: no-cache');
$db_name="account";
$db_names="account2";
$db_host="myhost";
$db_user="user";
$db_pwd="pass";
$dsn = "DRIVER={SQL Server};" .
"CommLinks=tcpip(Host=$db_host);" .
"DatabaseName=$db_name;" .
"uid=$db_user; pwd=$db_pwd";
?>
Previously, complained that he could not find a server and connect to it .. I rewrote the connection ...
Code:
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_name,$db_user,$db_pwd);
But now here gives this error
Quote:
Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Tbl_user'., SQL state S0002 in SQLExecDirect in W:\home\localhost\subdomain\register.php on line 32
Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in W:\home\localhost\subdomain\register.php on line 33
Warning: odbc_result(): supplied argument is not a valid ODBC result resource in W:\home\localhost\subdomain\register.php on line 34
|
I thought that the case in prifix tables .... rewrote ... made "Tbl_" prifix but he still complained = (
Tried to do "odbc_exec ()" is still complaining about ..... 12 hours I can not understand =((((((((
PS
Table Tbl_user is in the database account ....
Just only yesterday found MsSQL)))
Let's finish the site, never mind at the beginning of the road ..
Please =)
Sorry my bad english =)
|
|
|
01/12/2009, 17:56
|
#708
|
elite*gold: 0
Join Date: Sep 2005
Posts: 5
Received Thanks: 0
|
now i have fix my Problem with the Server and all work, but when i want connect:
|
|
|
01/12/2009, 17:57
|
#709
|
elite*gold: 0
Join Date: Jan 2009
Posts: 9
Received Thanks: 0
|
Tell me please ...
Is it possible to unpack the *. pak file in 2MOONSExpedition?
How come the server to the client Expedition?
If not, please tell me what the customer / client is better to use? and, if possible, a direct link =)
3 days downloads will))
|
|
|
01/12/2009, 19:28
|
#710
|
elite*gold: 0
Join Date: Nov 2008
Posts: 156
Received Thanks: 32
|
Quote:
Originally Posted by masterP
now i have fix my Problem with the Server and all work, but when i want connect:

|
I have the same problem. Do you have a router, firewall, anti-virus, etc etc...
Quote:
Originally Posted by CTAPu4OK
Tell me please ...
Is it possible to unpack the *. pak file in 2MOONSExpedition?
How come the server to the client Expedition?
If not, please tell me what the customer / client is better to use? and, if possible, a direct link =)
3 days downloads will))
|
You can unpack the pack.d0x files. Its possible, go back to the 2moons / Dekaron section, select the 2moons link. Not the PServer one. Search for unpackers. There are a few programs that'll allow you to do this. 2moons Expedition is quite different from 2moons: Bad Moon Rising. Instead of having one data.pak, they have 5. pack.d00, pack.d01, pack.d02, pack.03, pack.d04. Each one is specific. You have to unpack all of them.
Hope this answers your question.
|
|
|
01/12/2009, 21:29
|
#711
|
elite*gold: 0
Join Date: Aug 2008
Posts: 2
Received Thanks: 0
|
hey guys, i have 2 questions, hope someone can help me with my problem
1. what is this supposed to mean?
it doesn't seem to do anything, the server is running properly (as far as i know). it only spam the window and it would be nice to know what it is and if i need to fix it (when yes, how? ^^)
2. i can start the server, but when i want to open the game client im always stuck at the p-server connector. i select the server and press the button but then nothing happens..the game doesn't open
anyone know how to fix that?
thanks in advance
|
|
|
01/13/2009, 10:22
|
#712
|
elite*gold: 0
Join Date: Jan 2009
Posts: 9
Received Thanks: 0
|
Quote:
The problem is that you and the server and client run on a single computer =)
Download and becoming a VMware server there =)
Quote:
Thank you, but you can give an accurate reference, simply do not want to be mistaken, because I ride a client entire 3 days =)
Quote:
Download pictures to another place, I will not show =(
|
|
|
01/13/2009, 11:54
|
#713
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1
Received Thanks: 0
|
tyvm for all u guys..i made the game work on 1 pc n 1 os just for playing alone 
Intel Core 2 Duo
OS: Windows XP SP2
RAM: 149Gb RAM
some hints:
-CastServer[1.26.0].exe error
try to change the server network port, star/microsoft sql server/server network utility, in TCP/IP properties change the port to 1433, restart server. there should be no error now.
-SessionServer[1.22.0].exe error
replace [localhost] with [server name] in SN.txt, if in DNS system the driver pointing the correct way there should be no error.
-127.0.0.1 ip dont work while trying the client
try to use hamachi ip in server side & client side.
-hamachi ip dont work while trying the client
dont change ip in data.pack leave it original, only change in p-server connector.exe. instal loop adapter(google how to instal windows loop adapter) after loop adapter being installed, there should be new lan connection..just set the ip in data.pack into that new lan connection.now the client should be working.
havent try with loop adapter but without hamachi..
still trying for map 130 to work
good luck n tyvm again
|
|
|
01/13/2009, 12:07
|
#714
|
elite*gold: 0
Join Date: May 2005
Posts: 218
Received Thanks: 12
|
is it possible to let the hole server work through the lan ip ? That would mean offline no conected in anyway with the internet or hamatchi. Well i knwo you could do that with muonline or ragnarok server just wondering if its possibel for 2 moons too, just for testing something out
|
|
|
01/13/2009, 13:58
|
#715
|
elite*gold: 20
Join Date: Mar 2007
Posts: 2,650
Received Thanks: 4,729
|
Quote:
Originally Posted by CTAPu4OK
register.php
Code:
<?php
require_once "config.inc.php";
if(isset($_SESSION[step2]) && isset($_POST[step2])) {
$errorStr = formStep3();
if($errorStr!=null){
require_once('register.html');
}else{
require_once('success.html');
$suc=$success;
unset($_SESSION[step2], $_SESSION[step1]);
}}
else {
require_once('register.html');
$_SESSION[step2] = 1; }
function formStep3(){
$errors = array();
$errorStr = null;
$strSql="select * from Tbl_user where user_id='$_POST[username]'";
if ($_POST[ZoneGroup]=="zone1") {
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_name,$db_user,$db_pwd);
} elseif ($_POST[ZoneGroup]=="zone2") {
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_names,$db_user,$db_pwd);
} else {
die ("<p><b>·ÖÇøÑ¡Ôñ´íÎó!</b></p>");
}
$user_array=odbc_do($account_odbc,$strSql);
$array_query=odbc_fetch_row($user_array);
if (odbc_result($user_result,1)!= "") $errors[] = "¸ÃÃû³ÆÒѾ*±»Õ¼Óã¬ÇëÖØÐÂÊäÈë";
if(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST[username])) $errors[]="Ö»ÄÜÓÃÓ¢ÎÄ´óСд×ÖĸÊý×ÖµÄ×éºÏ×÷ΪÓû§Ãû";
if(strlen($_POST[username])<6) $errors[] = "Óû§ÃûµÄ³¤¶È²»ÄÜСÓÚ6λ";
if(strlen($_POST[username])>12) $errors[]= "Óû§ÃûµÄ³¤¶È²»Äܳ¬¹ý12λ";
if(!preg_match("/^[0-9a-zA-Z]{6,12}$/i", $_POST[password1])) $errors[]="Ö»ÄÜÓÃÓ¢ÎÄ´óСд×ÖĸÊý×ÖµÄ×éºÏ×÷ΪÃÜÂë";
if(preg_match("/^[0-9]{6,12}$/i",$_POST[password1])) $errors[]="²»¿ÉʹÓô¿Êý×Ö×÷ΪÃÜÂë";
if($_POST[username]==$_POST[password1]) $errors[]= "ÕʺźÍÃÜÂë²»ÄÜÏàͬ";
if(strlen($_POST[password1])<6) $errors[] = "ÃÜÂëµÄ³¤¶È²»ÄÜСÓÚ6λ";
if(strlen($_POST[password1])>12) $errors[] = "ÃÜÂ볤¶È²»ÄÜ´óÓÚ12λ";
if($_POST[password2]!=$_POST[password1]) $errors[] = "ÊäÈëµÄÃÜÂë²»Ò»ÖÂ";
if(strlen($_POST[question])>20) $errors[] = "ÕÒ»ØÃÜÂëÎÊÌâ´óÓÚ20룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[question])<10) $errors[] = "ÕÒ»ØÃÜÂëÎÊÌâСÓÚ10룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[answer])>20) $errors[] = "ÕÒ»ØÃÜÂë´ð°¸´óÓÚ20룬Çë·µ»ØÖØÐÂÊäÈë";
if(strlen($_POST[answer])<10) $errors[] = "ÕÒ»ØÃÜÂë´ð°¸Ð¡ÓÚ10룬Çë·µ»ØÖØÐÂÊäÈë";
if(!preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST[mail])) $errors[]="EmailµØÖ·²»ÕýÈ·£¬ÇëÖØÐÂÊäÈëÕýÈ·µÄEmailµØÖ·";
if(sizeof($errors)>0){
$errorStr .= "<br><font>";
$errorStr .= "ÐÅÏ¢ÊäÈë´íÎó£º";
foreach($errors as $error)
$errorStr .= "<li>$error</li>";
$errorStr .= "</font><br><br>";
}else{
$passwd_user=md5($_POST[password1]);
$dk_time=strftime("%y%m%d%H%M%S");
list($usec1, $sec1) = explode(" ",microtime());
$dk_user_no=$dk_time.substr($usec1,2,2);
$dk_account_query="insert into user_profile(user_no,user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) values('$dk_user_no','$_POST[username]','$passwd_user','801011000000','1','0','Y','01/01/2006 00:00:00',null,null,null,'000')";
$dk_account_query2="insert into Tbl_user(user_no,user_id,user_pwd,user_mail,user_answer,user_question) values('$dk_user_no','$_POST[username]','$_POST[password1]','$_POST[mail]','$_POST[answer]','$_POST[question]')";
$dk_account_result1=odbc_do($account_odbc,$dk_account_query);
$dk_account_result2=odbc_do($account_odbc,$dk_account_query2);
odbc_close($account_odbc);
}
return $errorStr;
}
?>
config.php
Code:
<?php
//¿ªÊ¼session
session_start();
//ÉèÖò»½øÐб¾µØ»º´æ
header('Expires: '.date('D,d M Y H:i:s',mktime(0,0,0,1,1,2000)).' GMT');
header('Last-Modified:'.gmdate('D,d M Y H:i:s').' GMT');
header('Cache-control: private, no-cache,must-revalidate');
header('Pragma: no-cache');
$db_name="account";
$db_names="account2";
$db_host="myhost";
$db_user="user";
$db_pwd="pass";
$dsn = "DRIVER={SQL Server};" .
"CommLinks=tcpip(Host=$db_host);" .
"DatabaseName=$db_name;" .
"uid=$db_user; pwd=$db_pwd";
?>
Previously, complained that he could not find a server and connect to it .. I rewrote the connection ...
Code:
$account_odbc = odbc_connect("Driver={SQL Server};DSN=".$dsn.";Server=".$db_host.";Database=".$db_name,$db_user,$db_pwd);
But now here gives this error
I thought that the case in prifix tables .... rewrote ... made "Tbl_" prifix but he still complained = (
Tried to do "odbc_exec ()" is still complaining about ..... 12 hours I can not understand =((((((((
PS
Table Tbl_user is in the database account ....
Just only yesterday found MsSQL)))
Let's finish the site, never mind at the beginning of the road ..
Please =)
Sorry my bad english =)
|
heya... the first thing you removed was the connection method to the database.
the second one was the table where the registration process writes the account information down!
you MUST keep it like i posted it!
i said, don't forget to lonk a ODBC system-DSN to your account database. use your best friend google, and you will get some tutorials how it should be done.
here's one tutorial:
@mysticzero
the lan-ips also work.
the standard "192.168.5.007" was the lan-ip of my test-server
|
|
|
01/13/2009, 15:07
|
#716
|
elite*gold: 0
Join Date: Aug 2008
Posts: 2
Received Thanks: 0
|
Quote:
Originally Posted by CTAPu4OK
Download pictures to another place, I will not show =(
|
here you are:
|
|
|
01/13/2009, 16:17
|
#717
|
elite*gold: 0
Join Date: Jan 2009
Posts: 9
Received Thanks: 0
|
Quote:
Originally Posted by silkbotter
heya... the first thing you removed was the connection method to the database.
the second one was the table where the registration process writes the account information down!
you MUST keep it like i posted it!
i said, don't forget to lonk a ODBC system-DSN to your account database. use your best friend google, and you will get some tutorials how it should be done.
here's one tutorial:
@mysticzero
the lan-ips also work.
the standard "192.168.5.007" was the lan-ip of my test-server 
|
Does not work = (
Installed DNS, running SQL Manager for server 192.168.0.128 - (my local IP)
And then, as always error
Maybe in the code that you can not then? I do not want to do that? = (
|
|
|
01/13/2009, 17:47
|
#718
|
elite*gold: 0
Join Date: Jun 2008
Posts: 75
Received Thanks: 6
|
must i download the client to if i want to have the new skills?
|
|
|
01/13/2009, 19:02
|
#719
|
elite*gold: 0
Join Date: Feb 2008
Posts: 55
Received Thanks: 9
|
got the new skils now what do i do with them?
|
|
|
01/13/2009, 20:48
|
#720
|
elite*gold: 0
Join Date: Nov 2008
Posts: 156
Received Thanks: 32
|
Quote:
Originally Posted by CTAPu4OK
Does not work = (
Installed DNS, running SQL Manager for server 192.168.0.128 - (my local IP)
And then, as always error
Maybe in the code that you can not then? I do not want to do that? = (

|
You won't need DNS. You need to explain a little better of what your problem is. Are you trying to host the registration page?
Quote:
Originally Posted by Mimo___93
must i download the client to if i want to have the new skills?
|
You will need to tell the client to look for the new skills. I can't baby you through this.
Quote:
Originally Posted by tommy4
got the new skils now what do i do with them?
|
Like I said above, you need to tell the client to Look / load the information. I can't help you with this, hence I'm too busy with tutorial writing, homework, and my own server.
|
|
|
All times are GMT +1. The time now is 03:05.
|
|