Register for your free account! | Forgot your password?

You last visited: Today at 17:37

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

Advertisement



[Release] ResetChar into game

Discussion on [Release] ResetChar into game within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2008
Posts: 77
Received Thanks: 63
Talking [Release] ResetChar into game

In Character.cs Under public void ReBorn2(byte ToJob) Add :

Code:
public void ResetChar()
        {
            try
            {
                

                Level = 1;
                Exp = 0;
               
                DataBase.GetStats(this);
                GetEquipStats(1, true);
                GetEquipStats(2, true);
                GetEquipStats(3, true);
                GetEquipStats(4, true);
                GetEquipStats(5, true);
                GetEquipStats(6, true);
                GetEquipStats(7, true);
                GetEquipStats(8, true);
                MinAtk = Str;
                MaxAtk = Str;
                MaxHP = BaseMaxHP();
                Potency = Level;
                GetEquipStats(1, false);
                GetEquipStats(2, false);
                GetEquipStats(3, false);
                GetEquipStats(4, false);
                GetEquipStats(5, false);
                GetEquipStats(6, false);
                GetEquipStats(7, false);
                GetEquipStats(8, false);
                CurHP = MaxHP;
                if (Job == 11)
                {
                    Str = 5;
                    Agi = 2;
                    Vit = 3;
                    Spi = 0;
                }
                if (Job == 21)
                {
                    Str = 5;
                    Agi = 2;
                    Vit = 3;
                    Spi = 0;
                }
                if (Job == 41)
                {
                    Str = 2;
                    Agi = 7;
                    Vit = 1;
                    Spi = 0;
                }
                if (Job == 132)
                {
                    Str = 0;
                    Agi = 2;
                    Vit = 3;
                    Spi = 5;
                }
                if (Job == 142)
                {
                    Str = 0;
                    Agi = 2;
                    Vit = 3;
                    Spi = 5;
                }
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 7, Job));
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 16, Str));
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 17, Agi));
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 15, Vit));
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 14, Spi));
                MyClient.SendPacket(General.MyPackets.GeneralData((long)UID, 0, 0, 0, 92));
                MyClient.SendPacket(General.MyPackets.Vital((long)UID, 0, CurHP));
                
                for (byte i = 1; i < 9; i++)
                {
                    if (Equips[i] == null || Equips[i] == "") continue;
                    string I = Equips[i];
                    string[] II = I.Split('-');
                    uint IID = uint.Parse(II[0]);
                    byte Quality = (byte)Other.ItemQuality(IID);

                    if (i == 1)
                    {
                        string NewID = "";

                        if (Other.WeaponType(IID) == 111 || Other.WeaponType(IID) == 113 || Other.WeaponType(IID) == 114 || Other.WeaponType(IID) == 118 || Other.WeaponType(IID) == 117)
                        {
                            NewID = II[0].Remove(4, 2);
                            NewID = NewID + "0" + Quality.ToString();

                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                        else if (Other.WeaponType(IID) == 112)
                        {
                            byte Type = byte.Parse(II[0][4].ToString());
                            byte Color = byte.Parse(II[0][3].ToString());
                            NewID = "11" + Type.ToString() + Color.ToString() + "0" + Quality.ToString();
                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                    }
                    else if (i == 2)
                    {
                        string NewID = "";

                        NewID = II[0].Remove(3, 3);
                        NewID += "00" + Quality.ToString();
                        Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                        II[0] = NewID;
                        MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                    }
                    else if (i == 3)
                    {
                        string NewID = "";
                        if (Other.WeaponType(IID) == 130 || Other.WeaponType(IID) == 131 || Other.WeaponType(IID) == 133 || Other.WeaponType(IID) == 134)
                        {
                            NewID = II[0].Remove(4, 2);
                            NewID = NewID + "0" + Quality.ToString();

                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                        else if (Other.WeaponType(IID) == 135 || Other.WeaponType(IID) == 136 || Other.WeaponType(IID) == 138 || Other.WeaponType(IID) == 139)
                        {
                            byte Type = byte.Parse(II[0][2].ToString());
                            byte Color = byte.Parse(II[0][3].ToString());
                            Type -= 5;
                            NewID = "13" + Type.ToString() + Color.ToString() + "0" + Quality.ToString();
                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                    }
                    else if (i == 4)
                    {
                        string NewID = "";

                        NewID = II[0].Remove(3, 3);
                        NewID += "02" + Quality.ToString();
                        Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                        II[0] = NewID;
                        MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                    }
                    else if (i == 5)
                    {
                        string NewID = "";

                        if (Other.WeaponType(IID) == 900)
                        {
                            NewID = II[0].Remove(4, 2);
                            NewID += "0" + Quality.ToString();
                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                        else if (Other.ItemType(IID) == 4 || Other.ItemType(IID) == 5)
                        {
                            NewID = II[0].Remove(3, 3);
                            NewID += "02" + Quality.ToString();
                            Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                            II[0] = NewID;
                            MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                        }
                    }
                    else if (i == 6)
                    {
                        string NewID = "";

                        NewID = II[0].Remove(3, 3);
                        NewID += "01" + Quality.ToString();
                        Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                        II[0] = NewID;
                        MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                    }
                    else if (i == 8)
                    {
                        string NewID = "";

                        NewID = II[0].Remove(3, 3);
                        NewID += "01" + Quality.ToString();
                        Equips[i] = NewID + "-" + II[1] + "-" + II[2] + "-" + II[3] + "-" + II[4] + "-" + II[5];
                        II[0] = NewID;
                        MyClient.SendPacket(General.MyPackets.AddItem(Equips_UIDs[i], int.Parse(II[0]), byte.Parse(II[1]), byte.Parse(II[2]), byte.Parse(II[3]), byte.Parse(II[4]), byte.Parse(II[5]), i, 100, 100));
                    }

                }

                MyClient.SendPacket(General.MyPackets.Vital(UID, 13, Level));

                MyClient.SendPacket(General.MyPackets.String(UID, 10, "hitstar"));

                World.SendMsgToAll(Name + " Has been brought to Level 1 by breaking the rules!", "SYSTEM", 2011);
                World.SendMsgToAll(Name + " has been restarted!", "SYSTEM", 2005);
                World.UpdateSpawn(this);
            }
            catch (Exception Exc) { Console.WriteLine(Exc); }
            World.UpdateSpawn(this);
        }
in client.cs under /level Add :

Code:
if (Status == 8)
                                            {
                                                if (Splitter[0] == "/resetchar")
                                                {
                                                    foreach (DictionaryEntry DE in World.AllChars)
                                                    {
                                                        Character Char = (Character)DE.Value;
                                                        if (Splitter[1] == Char.Name)
                                                        {

                                                            Char.ResetChar();
                                                        }
                                                    }
                                                }
                                            }
/ResetChar NameChar
konkizta is offline  
Thanks
10 Users
Old 10/24/2008, 19:42   #2
 
xxFastBoy's Avatar
 
elite*gold: 0
Join Date: Jun 2007
Posts: 145
Received Thanks: 8
Gratz Nİce work
xxFastBoy is offline  
Old 10/24/2008, 19:45   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
hmm nice :P
µ~Xero~µ is offline  
Old 10/24/2008, 19:52   #4
 
elite*gold: 0
Join Date: Aug 2008
Posts: 77
Received Thanks: 63
Press Thanks Botton plx
konkizta is offline  
Thanks
1 User
Old 10/24/2008, 19:55   #5
 
elite*gold: 0
Join Date: Sep 2008
Posts: 348
Received Thanks: 141
Quote:
Originally Posted by konkizta View Post
Press Thanks Botton plx
Oki.....Did u have anything More
!DeX! is offline  
Old 10/24/2008, 20:42   #6
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
added to [All-in-1] thread
XxArcherMasterxX is offline  
Old 10/24/2008, 21:16   #7
 
lolex's Avatar
 
elite*gold: 0
Join Date: May 2007
Posts: 46
Received Thanks: 0
looooooooooool
lolex is offline  
Old 10/24/2008, 21:23   #8
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
Quote:
Originally Posted by lolex View Post
looooooooooool
man get lost you are posting in all threads the same
XxArcherMasterxX is offline  
Old 10/24/2008, 21:39   #9
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
String manipulation = failure.
nTL3fTy is offline  
Old 10/25/2008, 00:21   #10
 
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 912
Quote:
Originally Posted by nTL3fTy View Post
String manipulation = failure.
Lol yeah, all this is the Reborn code.
kinshi88 is offline  
Old 12/25/2008, 05:10   #11
 
flamesco's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 21
Received Thanks: 0
i think this is to reset char lvl if im not wrong

but i have a site that does that already lol.
flamesco is offline  
Reply


Similar Threads Similar Threads
[RELEASE]Casino Game
07/13/2010 - Coding Releases - 1 Replies
Casino Gamble v1 Info: This is an awsome and fun casinogame i made in c#. Feel free to use it :D Please give feedback or press thanks if u use it :P How to install: How to play:
[Release] Game Booster
06/20/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 2 Replies
Why use Game Booster? plus you can use this program to completely boost your game play in other online games such as Grand Chase , Rakion , Cabal , etc etc ;) Key Benefits
[Release] EO Game CP
05/16/2010 - EO PServer Guides & Releases - 24 Replies
Hello everyone, after few days of scripting :pimp: i got the cp done so enjoy my V1.0.0 release of uzn-game-cp for eo servers. V1.0.0: Download Login page Registeration page Retrieve page Statistic page Account Information page
[Release] DeathMatch Game!
03/02/2010 - CO2 PServer Guides & Releases - 55 Replies
Hello fellows. I just got an idea from Counter-Strike,and figured I'd code it.



All times are GMT +2. The time now is 17:37.


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.