Register for your free account! | Forgot your password?

You last visited: Today at 15:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP]Reset Command

Discussion on [HELP]Reset Command within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
DragonStar's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
[HELP]Reset Command

How would you go about making a reset command like
/resetallpkp <<< would reset all characters in the database pkps to 0
using lotf source
DragonStar is offline  
Old 09/14/2008, 02:59   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by DragonStar View Post
How would you go about making a reset command like
/resetallpkp <<< would reset all characters in the database pkps to 0
using lotf source
My LOTF had /clearpkp in it.. but if you need it here it is...

Code:
                                        if (Splitter[0] == "@clearpkp")
                                        {
                                            MyChar.PKPoints = 0;
                                            MyChar.BlueName = false;
                                            World.UpdateSpawn(MyChar);
                                            SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                        }
Yeah, i use @commands though >.>

Edit::OH, you mean all characters... that's my bad =P
Like, if you want all characters online, you can just run foreach loop, else it'd take some different coding D=<
tao4229 is offline  
Old 09/14/2008, 03:31   #3
 
Mouse>Pro's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 142
Received Thanks: 89
Quote:
Originally Posted by tao4229 View Post
My LOTF had /clearpkp in it.. but if you need it here it is...

Code:
                                        if (Splitter[0] == "@clearpkp")
                                        {
                                            MyChar.PKPoints = 0;
                                            MyChar.BlueName = false;
                                            World.UpdateSpawn(MyChar);
                                            SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                        }
Yeah, i use @commands though >.>

Edit::OH, you mean all characters... that's my bad =P
Like, if you want all characters online, you can just run foreach loop, else it'd take some different coding D=<
nice but i think he means that he want a command that reset all pkps from all characters in lotf
Mouse>Pro is offline  
Old 09/14/2008, 03:38   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by Mouse>Pro View Post
nice but i think he means that he want a command that reset all pkps from all characters in lotf
Too bad you didn't read my Edit.
tao4229 is offline  
Old 09/14/2008, 03:41   #5
 
Mouse>Pro's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 142
Received Thanks: 89
Quote:
Originally Posted by tao4229 View Post
Too bad you didn't read my Edit.
oh sorry, my fault.
Mouse>Pro is offline  
Old 09/14/2008, 04:17   #6
 
DragonStar's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
Quote:
Originally Posted by tao4229 View Post
My LOTF had /clearpkp in it.. but if you need it here it is...

Code:
                                        if (Splitter[0] == "@clearpkp")
                                        {
                                            MyChar.PKPoints = 0;
                                            MyChar.BlueName = false;
                                            World.UpdateSpawn(MyChar);
                                            SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                            MyChar.SendEquips(false);
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                        }
Yeah, i use @commands though >.>

Edit::OH, you mean all characters... that's my bad =P
Like, if you want all characters online, you can just run foreach loop, else it'd take some different coding D=<
trying to get it too do it to all chars in the database regardless if ther online
or offline, still playing around w/the code
DragonStar is offline  
Old 09/14/2008, 08:28   #7
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
Something like this maybe?
Haven't tested it.

Code:
                                            if (Splitter[0] == "/clearallpkp")
                                            {
                                                foreach (DictionaryEntry DE in World.AllChars)
                                                {
                                                    MyChar.PKPoints = 0;
                                                    MyChar.BlueName = false;
                                                    SendPacket(General.MyPackets.Vital(MyChar.UID, 6, MyChar.PKPoints));
                                                    World.UpdateSpawn(MyChar);
                                                    SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                    MyChar.SendEquips(false);
                                                    SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                    World.SpawnMeToOthers(MyChar, true);
                                                }
                                            }
kinshi88 is offline  
Old 09/14/2008, 08:39   #8
 
DragonStar's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
Quote:
Originally Posted by kinshi88 View Post
Something like this maybe?
Haven't tested it.

Code:
                                            if (Splitter[0] == "/clearallpkp")
                                            {
                                                foreach (DictionaryEntry DE in World.AllChars)
                                                {
                                                    MyChar.PKPoints = 0;
                                                    MyChar.BlueName = false;
                                                    SendPacket(General.MyPackets.Vital(MyChar.UID, 6, MyChar.PKPoints));
                                                    World.UpdateSpawn(MyChar);
                                                    SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                    MyChar.SendEquips(false);
                                                    SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                    World.SpawnMeToOthers(MyChar, true);
                                                }
                                            }
nah that still only does one char not all
DragonStar is offline  
Old 09/14/2008, 08:58   #9
 
DragonStar's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
well this is just the first part im trying to figure out, wut im trying to do is first figure out
how to reset every1's pkp even if ther offline, then my next step after i figure that out
is to figure out how to make it automatically reset all pkp n the database at a certain time
of day, example 0:00 every day it would reset the pkp
DragonStar is offline  
Old 09/14/2008, 10:56   #10
 
adz06676's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
Quote:
Originally Posted by DragonStar View Post
well this is just the first part im trying to figure out, wut im trying to do is first figure out
how to reset every1's pkp even if ther offline, then my next step after i figure that out
is to figure out how to make it automatically reset all pkp n the database at a certain time
of day, example 0:00 every day it would reset the pkp
its this:
Quote:
if (Splitter[0] == "/clearallpkp")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
{
Char.PKPoints = 0;
Char.BlueName = false;
SendPacket(General.MyPackets.Vital(Char.UID, 6, Char.PKPoints));
World.UpdateSpawn(Char);
SendPacket(General.MyPackets.CharacterInfo(Char));
Char.SendEquips(false);
SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
World.SpawnMeToOthers(Char, true);
}
}
}
adz06676 is offline  
Thanks
1 User
Old 09/14/2008, 11:36   #11
 
DragonStar's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
@adz06676 - tyvm, n i kinda feel dum now lol

next gta try to get it to clear pkp from even the ppl who are offline
DragonStar is offline  
Old 09/14/2008, 11:47   #12
 
adz06676's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
Quote:
Originally Posted by DragonStar View Post
@adz06676 - tyvm, n i kinda feel dum now lol

next gta try to get it to clear pkp from even the ppl who are offline
lol no problem
adz06676 is offline  
Old 09/20/2008, 01:48   #13
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
For all the characters in the database:

i assume your running lotf based database and source so it will be somewhat along the lines of
Code:
MySqlCommand MySqlCmd = new MySqlCommand("UPDATE `characters` SET `PKPoints` = 0", Connection);
MySqlCmd.ExecuteNonQuery();
I am far from a genius with mysql so no doubt that will need correcting
© Haydz is offline  
Old 09/20/2008, 02:28   #14
 
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
Quote:
Originally Posted by © Haydz View Post
For all the characters in the database:

i assume your running lotf based database and source so it will be somewhat along the lines of
Code:
MySqlCommand MySqlCmd = new MySqlCommand("UPDATE `characters` SET `PKPoints` = 0", Connection);
MySqlCmd.ExecuteNonQuery();
I am far from a genius with mysql so no doubt that will need correcting


LMAO, why did it take that long for someone to post this? XD.. it's so dang obvious XDDD -- as soon as I read the first post I had that ready in my mind but had to read other posts so as to make sure not to repost... everyone that gave anything other than this -- it is now plainly obvious that you do nothing but copypaste and minor edits
Rechocto is offline  
Old 09/20/2008, 05:44   #15
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,884
Quote:
Originally Posted by Rechocto View Post
LMAO, why did it take that long for someone to post this? XD.. it's so dang obvious XDDD -- as soon as I read the first post I had that ready in my mind but had to read other posts so as to make sure not to repost... everyone that gave anything other than this -- it is now plainly obvious that you do nothing but copypaste and minor edits
Because nobody honestly gives a ****.
InfamousNoone is offline  
Reply


Similar Threads Similar Threads
kd reset
04/02/2010 - Combat Arms - 19 Replies
Was wird bei einen KD reset alles zurückgesetzt?
reset
08/30/2009 - Metin2 Private Server - 1 Replies
hallo auf dem nonameserver habe ich mich heute eingeloggt und fand keinen char vor obwohl ich gestern einen erstellt habe deswegen meine frage braucht man proxy?
reset yt2
07/21/2009 - Metin2 Private Server - 1 Replies
Also bin im urlaub am pc hab da kein yt2 oder so wurde s1 reset wegen neune chs oder wie und wenn ja auf welche datuum:confused:
name reset
07/01/2008 - Dekaron - 1 Replies
just wondering if there was anyways to change your IGN. ty



All times are GMT +2. The time now is 15:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.