|
You last visited: Today at 12:54
Advertisement
question about .chr
Discussion on question about .chr within the CO2 Private Server forum part of the Conquer Online 2 category.
04/09/2010, 01:02
|
#1
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
question about .chr
in game when u do: /recall, /botjail, /goto (normal charname) Doesnt work..
If i do /recall, /botjail, /goto (charname [PM] It does work(ore [VIP] [PM] [ANYHING CAN BE ADD HERE] it will work.
I guess, my loggin/registering, is adding: [ ] behind the char names automaticly so i cannot recall them(not the brackets, only the space)
explenation:
In console i typ:
/accounts
then i click on a acc name.
In the table: status, a [ ] is added( not the brackets, only the Space)
if i delete it, it does work..
now my question  finally to the point 
ive searched my whole source, at the register voids etc, but cant seem to find the problem, dos any 1 know how to find this?
 .. greetz,
(NO flame)
|
|
|
04/09/2010, 01:19
|
#2
|
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
|
Yep its the reg page goto my release thread and use the reg page there and my database.cs and it will work.
|
|
|
04/09/2010, 18:14
|
#3
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
dont u have a fix for it, not feeeling like throwing my work away with otgher DB
|
|
|
04/09/2010, 19:04
|
#4
|
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
|
Just look for the changes in database.cs
|
|
|
04/12/2010, 18:24
|
#5
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
Code:
public static string CreateCharacter(string Account, string Name, ushort Body, byte Job)
{
try
{
if (File.Exists(@"C:\OldCODB\Users\" + Account + ".usr") && !File.Exists(@"C:\OldCODB\Users\Characters\" + Name + ".chr"))
{
try
{
FileStream FS = new FileStream(@"C:\OldCODB\Users\Characters\" + Name + ".chr", FileMode.CreateNew);
BinaryWriter BW = new BinaryWriter(FS);
BW.Write(Account);
BW.Write((uint)Program.Rnd.Next(1000001, 19999999));
if (Body == 1003 || Body == 1004)
BW.Write((ushort)1);//Avatar
else
BW.Write((ushort)201);//Avatar
BW.Write(Body);
BW.Write((ushort)(410 + (Program.Rnd.Next(5) * 100)));//Hair
BW.Write((ushort)1010);//Map
BW.Write((ushort)61);//X
BW.Write((ushort)109);//Y
BW.Write((ushort)0);//Previous Map
BW.Write(Job);
BW.Write((byte)0);//Previous Job, 1st RB
BW.Write((byte)0);//Previous Job, 2st RB
BW.Write((byte)0);//Previous Job, 3st RB
BW.Write((byte)0);//Previous Job, 4st RB
BW.Write((byte)1);//Level
BW.Write((ulong)0);//Experience
ushort Str = 0,Agi = 0, Vit = 0, Spi = 0;
GetInitialStats(Job, ref Str, ref Agi, ref Vit, ref Spi);
BW.Write(Str);
BW.Write(Agi);
BW.Write(Vit);
BW.Write(Spi);
BW.Write((ushort)0);//Stat Points
ushort HP = (ushort)(Vit * 24 + Str * 3 + Agi * 3 + Spi * 3);
BW.Write(HP);
BW.Write((ushort)(Spi * 5));//MP
BW.Write((ulong)0);//Donation
BW.Write((uint)100);//Silvers
BW.Write((uint)0);//CPs
BW.Write((uint)0);//Warehouse Silvers
BW.Write((ulong)0);//Virtue Points
BW.Write((ushort)0);//PK Points
BW.Write((ushort)0);//Guild
BW.Write((uint)0);//Guild Donation
BW.Write((byte)0);//Guild Rank
Game.Equipment Eq = new NewestCOServer.Game.Equipment();
Eq.Open();
Eq.WriteThis(BW);
BW.Write((byte)5);//Inventory Count
#region Beginner Items
if (Job == 100)
{
Game.Item I = new NewestCOServer.Game.Item();
I.ID = 421301;
I.MaxDur = ((DatabaseItem)DatabaseItems[(uint)421301]).Durability;
I.CurDur = I.MaxDur;
I.UID = (uint)Program.Rnd.Next(10000000);
I.WriteThis(BW);
}
else if (Job == 50)
{
Game.Item I = new NewestCOServer.Game.Item();
I.ID = 601301;
I.MaxDur = ((DatabaseItem)DatabaseItems[(uint)601301]).Durability;
I.CurDur = I.MaxDur;
I.UID = (uint)Program.Rnd.Next(10000000);
I.WriteThis(BW);
}
else
{
Game.Item I = new NewestCOServer.Game.Item();
I.ID = 410301;
I.MaxDur = ((DatabaseItem)DatabaseItems[(uint)410301]).Durability;
I.CurDur = I.MaxDur;
I.UID = (uint)Program.Rnd.Next(10000000);
I.WriteThis(BW);
}
Game.Item Armor = new NewestCOServer.Game.Item();
Armor.ID = 132004;
Armor.Color = (Game.Item.ArmorColor)(Program.Rnd.Next(3, 9));
Armor.MaxDur = ((DatabaseItem)DatabaseItems[(uint)132004]).Durability;
Armor.CurDur = Armor.MaxDur;
Armor.UID = (uint)Program.Rnd.Next(10000000);
Armor.WriteThis(BW);
Game.Item Stancher = new NewestCOServer.Game.Item();
Stancher.ID = 1000000;
Stancher.UID = (uint)Program.Rnd.Next(10000000);
Stancher.WriteThis(BW);
Stancher.UID = (uint)Program.Rnd.Next(10000000);
Stancher.WriteThis(BW);
Stancher.UID = (uint)Program.Rnd.Next(10000000);
Stancher.WriteThis(BW);
#endregion
for (int n = 0; n < 5; n++)
{
BW.Write((byte)0);//WH[n] Count
//Warehouse[n]
}
BW.Write((byte)0);//WH[5] Count
//Warehouse[5]
BW.Write((byte)0);//Prof Count
if (Job != 100)
BW.Write((byte)0);//SkillCount
else
{
BW.Write((byte)2);//SkillCount
Game.Skill S = new Game.Skill() { ID = 1000 };
S.WriteThis(BW);
S = new Game.Skill() { ID = 1005 };
S.WriteThis(BW);
}
BW.Write((byte)0);//Friend Count
BW.Write((byte)0);//Enemy Count
BW.Write(false);
BW.Write((int)0);
BW.Write((int)0);
BW.Write((long)0);
BW.Write((int)0);
BW.Write((byte)0);
BW.Write((byte)0);
BW.Write((byte)1);//Merchant
BW.Write(0);//
BW.Write(DateTime.Now.Ticks);
BW.Write((ushort)0);
BW.Write(false);
BW.Write((byte)0);//lottery uses today
BW.Write("0");//WH Pass
BW.Write("None");//Spouse Name
BW.Write((uint)0);//Quiz Pts
BW.Write((int)0);//TopEffect
BW.Write("Default");//Quest
BW.Write((int)0);
BW.Write(false);//EndQuest
BW.Flush();
FS.Flush();
BW.Close();
FS.Close();
FS = new FileStream(@"C:\OldCODB\Users\" + Account + ".usr", FileMode.Append);
BW = new BinaryWriter(FS);
BW.Write((byte)Name.Length);
BW.Write(Encoding.ASCII.GetBytes(Name));
BW.Flush();
FS.Flush();
BW.Close();
FS.Close();
Game.Character C = LoadCharacter(Name, ref Account);
if (C != null)
{
C.UniversityPoints = 0;
SaveCharacter(C, Account);
}
}
catch { return "Error! Try again."; }
return "ANSWER_OK";
}
return "Error: Character already exists!";
}
catch (Exception Exc) { Console.WriteLine(Exc); return "Failed to create the character."; }
}
}
This is my Databse.cs Create char.
Can u find any mistakes then?
|
|
|
04/12/2010, 18:40
|
#6
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Its on Accounts. Not on Chars.
|
|
|
04/12/2010, 22:42
|
#7
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Erg, its the command.
Look at the command and it has a PM check.
Take out that check and its brackets.
|
|
|
04/12/2010, 22:54
|
#8
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
what command?
oo u mean:
/recall
/bann
/goto
/ctele
???
|
|
|
04/13/2010, 00:15
|
#9
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by pintser
what command?
oo u mean:
/recall
/bann
/goto
/ctele
???
|
If you look above /recall there is an if (gc.mychar.authinfo.status == "[PM]) check right there, take it out.
|
|
|
04/16/2010, 06:16
|
#10
|
elite*gold: 0
Join Date: Oct 2007
Posts: 38
Received Thanks: 4
|
lol
no it is the same thing i had
if you do /accounts in the NewestCOServer prompt you will notice a space in the Character Status space and the reason the commands work on [PM]/[GM]/[VIP] is you deleted the space that was there
if this helped please say thankyou!
|
|
|
04/16/2010, 07:48
|
#11
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
Quote:
Originally Posted by eleven
lol
no it is the same thing i had
if you do /accounts in the NewestCOServer prompt you will notice a space in the Character Status space and the reason the commands work on [PM]/[GM]/[VIP] is you deleted the space that was there
if this helped please say thankyou!
|
lol...
i was looking for an Fix, not an explenation...
but ty
@arco:
Quote:
if (Cmd[0] == "/recall")
{
if (Cmd[1] != "all")
{
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null && C != GC.MyChar)
C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
}
else
{
foreach (Game.Character C in Game.World.H_Chars.Values)
C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
}
}
|
this is my /recall...
|
|
|
04/16/2010, 13:26
|
#12
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by pintser
lol...
i was looking for an Fix, not an explenation...
but ty
@arco:
this is my /recall...
|
And whats RIGHT above that?
|
|
|
04/16/2010, 15:48
|
#13
|
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
|
Quote:
Originally Posted by pintser
lol...
i was looking for an Fix, not an explenation...
but ty
@arco:
this is my /recall...
|
its in your registration page, not your source. check your password variable in your registration page, it will be something like: text, "pass " <--see the extra space between the s and the ", remove the space. that space is trying to get the server to create a "Status" on the character, like we would do via console /newacc name pass [PM]
|
|
|
04/16/2010, 17:37
|
#14
|
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
|
Quote:
Originally Posted by HardNotTo
its in your registration page, not your source. check your password variable in your registration page, it will be something like: text, "pass " <--see the extra space between the s and the ", remove the space. that space is trying to get the server to create a "Status" on the character, like we would do via console /newacc name pass [PM]
|
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "C:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
<html>
<body><body bgcolor="#000000">
<body text="#FF0000"
<h1><center>.</center></h1>
<h1><center>.</center></h1>
<?php // New Account?
If (IsSet($_GET["account"]["password"])) {
// Variables
$Account = $_GET["account"];
$Password = $_GET["password"];
$AllRight = True;
// Wrong Chars?
For ($I=0; $I<StrLen(WrongChars); $I++) {
If (StrPos($Account, SubStr(WrongChars,$I,1))) {
Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
$AllRight = False;
}
}
// File Exists?
If (file_exists(AccountFilesPath.$Account.AccountFile sEnding)) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>This Account already exists!</center></FONT></FONT></p>";
$AllRight = False;
}
if($_GET["password"]!=$_GET["password1"]) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>Password don't match</center></FONT></FONT></p>";
$AllRight = False;
}
if(ereg("^[0-9a-zA-Z]{4,4}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{5,5}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{6,6}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{7,7}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{8,8}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{9,9}$",$_GET["password"])) $code = ' '; {
}
if(ereg("^[0-9a-zA-Z]{10,10}$",$_GET["password"])) $code = '
'; {
}
if(ereg("^[0-9a-zA-Z]{11,11}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{12,12}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{13,13}$",$_GET["password"])) $code = '
'; {
}
if(ereg("^[0-9a-zA-Z]{14,14}$",$_GET["password"])) $code = ''; {
}
if(!ereg("^[0-9a-zA-Z]{4,14}$",$_GET["password"])) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>Password only lenght of 4 to 14 characters</center></FONT></FONT></p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text .= "$code$Password (2 spaces here) ";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountF ilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>This Account is created succesfully!</center></FONT></FONT></p>";
}
}
this is a little piece of my reg page, below is what i found:
$Text .= "$code$Password(2 spaces here) ";
willbe:
$Text .= "$code$Password ";
Ore:
$Text .= "$code$Password";
this 1?
|
|
|
04/16/2010, 19:43
|
#15
|
elite*gold: 0
Join Date: Aug 2005
Posts: 96
Received Thanks: 25
|
Quote:
Originally Posted by pintser
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "C:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
<html>
<body><body bgcolor="#000000">
<body text="#FF0000"
<h1><center>.</center></h1>
<h1><center>.</center></h1>
<?php // New Account?
If (IsSet($_GET["account"]["password"])) {
// Variables
$Account = $_GET["account"];
$Password = $_GET["password"];
$AllRight = True;
// Wrong Chars?
For ($I=0; $I<StrLen(WrongChars); $I++) {
If (StrPos($Account, SubStr(WrongChars,$I,1))) {
Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
$AllRight = False;
}
}
// File Exists?
If (file_exists(AccountFilesPath.$Account.AccountFile sEnding)) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>This Account already exists!</center></FONT></FONT></p>";
$AllRight = False;
}
if($_GET["password"]!=$_GET["password1"]) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>Password don't match</center></FONT></FONT></p>";
$AllRight = False;
}
if(ereg("^[0-9a-zA-Z]{4,4}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{5,5}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{6,6}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{7,7}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{8,8}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{9,9}$",$_GET["password"])) $code = ' '; {
}
if(ereg("^[0-9a-zA-Z]{10,10}$",$_GET["password"])) $code = '
'; {
}
if(ereg("^[0-9a-zA-Z]{11,11}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{12,12}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{13,13}$",$_GET["password"])) $code = '
'; {
}
if(ereg("^[0-9a-zA-Z]{14,14}$",$_GET["password"])) $code = ''; {
}
if(!ereg("^[0-9a-zA-Z]{4,14}$",$_GET["password"])) {
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>Password only lenght of 4 to 14 characters</center></FONT></FONT></p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text .= "$code$Password (2 spaces here) ";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountF ilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p><FONT COLOR='#F0F8FF'><FONT SIZE='3'><center>This Account is created succesfully!</center></FONT></FONT></p>";
}
}
this is a little piece of my reg page, below is what i found:
$Text .= "$code$Password(2 spaces here) ";
willbe:
$Text .= "$code$Password ";
Ore:
$Text .= "$code$Password";
this 1?
|
those would be the ones, just remove the extra spaces between the d and the " so it will be
$Text .="$code$Password";
|
|
|
Similar Threads
|
[QUESTION]How do i bypass Xtrap for any private server?[QUESTION]
10/12/2009 - Cabal Online - 3 Replies
Exactly what the title says.
I keep on getting an xTrap error when i try and load ANY private server that uses XTrap and it's driving me absolutely insane.
I cant figure out why it's showing me the error. If anyone has any bypasser for Helix / PaRaDoX
or any other server u know that has xTrap can u either PM me the bypass or post it here pls......this is driving me nuts
Bump.
|
[QUESTION]How do i bypass Xtrap for any private server?[QUESTION]
10/02/2009 - Cabal Private Server - 2 Replies
Exactly what the title says.
I keep on getting an xTrap error when i try and load ANY private server that uses XTrap and it's driving me absolutely insane.
I cant figure out why it's showing me the error. If anyone has any bypasser for Helix / PaRaDoX
or any other server u know that has xTrap can u either PM me the bypass or post it here pls......this is driving me nuts
|
All times are GMT +1. The time now is 12:54.
|
|