|
You last visited: Today at 15:13
Advertisement
[HELP]Reset Command
Discussion on [HELP]Reset Command within the CO2 Private Server forum part of the Conquer Online 2 category.
09/14/2008, 01:36
|
#1
|
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
|
|
|
09/14/2008, 02:59
|
#2
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by DragonStar
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=<
|
|
|
09/14/2008, 03:31
|
#3
|
elite*gold: 0
Join Date: Sep 2008
Posts: 142
Received Thanks: 89
|
Quote:
Originally Posted by tao4229
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
|
|
|
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
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.
|
|
|
09/14/2008, 03:41
|
#5
|
elite*gold: 0
Join Date: Sep 2008
Posts: 142
Received Thanks: 89
|
Quote:
Originally Posted by tao4229
Too bad you didn't read my Edit.
|
oh sorry, my fault.
|
|
|
09/14/2008, 04:17
|
#6
|
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
|
Quote:
Originally Posted by tao4229
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
|
|
|
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);
}
}
|
|
|
09/14/2008, 08:39
|
#8
|
elite*gold: 0
Join Date: Jun 2007
Posts: 286
Received Thanks: 409
|
Quote:
Originally Posted by kinshi88
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
|
|
|
09/14/2008, 08:58
|
#9
|
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
|
|
|
09/14/2008, 10:56
|
#10
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by DragonStar
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);
}
}
}
|
|
|
|
09/14/2008, 11:36
|
#11
|
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
|
|
|
09/14/2008, 11:47
|
#12
|
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
|
Quote:
Originally Posted by DragonStar
@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
|
|
|
09/20/2008, 01:48
|
#13
|
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
|
|
|
09/20/2008, 02:28
|
#14
|
elite*gold: 0
Join Date: Nov 2007
Posts: 306
Received Thanks: 75
|
Quote:
Originally Posted by © Haydz
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
|
|
|
09/20/2008, 05:44
|
#15
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,884
|
Quote:
Originally Posted by Rechocto
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 ****.
|
|
|
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.
|
|