|
You last visited: Today at 21:34
Advertisement
[problem]stats
Discussion on [problem]stats within the CO2 Private Server forum part of the Conquer Online 2 category.
08/20/2009, 04:18
|
#1
|
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
|
[problem]stats
stats wont load for me
i made a new file called Stats
Code:
/*
* Created by SharpDevelop.
* User: sams
* Date: 3/18/2009
* Time: 7:31 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
namespace CoEmu_v2_GameServer.Structs
{
/// <summary>
/// Contains a struct for stats
/// </summary>
public partial class Struct
{
public class stats
{
public int Profession;
public int Level;
public int Strength;
public int Vitality;
public int Dexterity;
public int Spirit;
}
}
}
database.cs
Code:
public static void GetStats(Character Client)
{
MySqlCommand Cmd = new MySqlCommand("SELECT * FROM `stats` WHERE `Profession` = " + (int)Client.Class + ", `level` = " + Client.Level + ", `strength` = " + Client.PkPoints + ", `xCord` = " + Client.X + ", `yCord` = " + Client.Y + ", `Map` = " + (int)Client.Map + ", `HairStyle` = " + Client.Hair + ", `Class` = " + (int)Client.Class +", `Str` = " + Client.Strength + ",`Vit` = " + Client.Vitality + ", `Spi` = " + Client.Spirit + ", `Dex` = " + Client.Dexterity + " WHERE `CharID` = " + Client.ID, DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
Code:
public static Dictionary<int, Struct.stats> Stats = new Dictionary<int, Struct.stats>();
in public static void StartServer()
i added
Code:
Database.Database.GetStats();
in DataLoader.cs i added
Code:
public static void LoadStats()
{
Database.Database.GetStats();
}
and the stats still will not load can anyone help me.
|
|
|
08/20/2009, 04:23
|
#2
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Code:
public static void GetStats(Character Client)
{
MySqlCommand Cmd = new MySqlCommand("SELECT * FROM `stats` WHERE `Profession` = " + (int)Client.Class + ", `level` = " + Client.Level + ", `strength` = " + Client.PkPoints + ", `xCord` = " + Client.X + ", `yCord` = " + Client.Y + ", `Map` = " + (int)Client.Map + ", `HairStyle` = " + Client.Hair + ", `Class` = " + (int)Client.Class +", `Str` = " + Client.Strength + ",`Vit` = " + Client.Vitality + ", `Spi` = " + Client.Spirit + ", `Dex` = " + Client.Dexterity + " WHERE `CharID` = " + Client.ID, DatabaseConnection.NewConnection());
Cmd.ExecuteNonQuery();
Cmd.Connection.Close();
Cmd.Connection.Dispose();
Cmd.Dispose();
}
Why you have the HairStyle, xCord, yCord... You use a Client for getting all the stats? Check your function...
|
|
|
08/20/2009, 04:29
|
#3
|
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
|
no i copyed savechar and just edited that for the get stats and guess i never got them all
EDIT:: still not workin
|
|
|
08/20/2009, 04:34
|
#4
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by coreymills
no i copyed savechar and just edited that for the get stats and guess i never got them all
|
You don't understand the MySQL Function, I think... You can't get all the stats with a structure for update...
I have rapidly checked the CoEmu source, check for a load function like GetServerSkills(). The structure will work if you know how to adapt.
|
|
|
08/20/2009, 04:39
|
#5
|
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
|
#request close
|
|
|
08/20/2009, 14:39
|
#6
|
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
|
#Closed
|
|
|
 |
Similar Threads
|
GM max stats
06/29/2011 - Metin2 Private Server - 2 Replies
hi how to make maximum stats on GM account pls :D like str,vit,int and dex
:confused: :mofo: ;) :handsdown: :) :rolleyes: :cool: :confused:
|
char stats, and item stats
01/27/2010 - Lineage 2 - 6 Replies
hi all
today.. on a private server. i made a verry strange exp.....
some clannies called me to come to HS to help for pvp
as i came there i seen mass pvp arround 30 ppl
all hitted 1 person ................
a S dagger
items drago set and AS
i watched it....
he needed for everyone just 1 or 2 hits
beamed arround like hell..
|
[help] trying to add stats in
06/04/2009 - CO2 Private Server - 5 Replies
trying to have it so that class stats load by an ini can someone help me with this please
Thanks in advance
|
Stats help --------------> stats calculator!
02/02/2008 - Kal Online - 3 Replies
Hi.
Can anyone post here any site or program for calculating the stats so if u put points u see how much hp otp and all u have and where u can put what kind stuff u wear.
THX
|
stats generator or stats calculator
08/12/2006 - Conquer Online 2 - 7 Replies
For reborn classes is there calculator or stat generator, which will show what effect would happen if u put #s of attrubites in str,hp,mana, dex.
Thx for help
|
All times are GMT +1. The time now is 21:34.
|
|