Game Elites is offering you all kind of Hacks, Bots, Tips and Tools.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 [Release] Free Cps by Npc

View previous topic View next topic Go down 
AuthorMessage
LeGend
NOOB!
NOOB!
avatar

Posts : 18
Join date : 2009-05-09
Age : 24
Location : California

PostSubject: [Release] Free Cps by Npc   Sat May 09, 2009 5:42 pm

here is a smal code that gives new players some cps gut they can get them only once.

add in the character.cs:
Code:
      // FreeCps
        public uint FCPs = 0;


search for:
Code:
  public void Save()
add before:
Code:
        public void SaveFCPs()
        {
            LastSave = DateTime.Now;
            if (MyClient.There)
                if (MyClient.Online)
                {
                    DataBase.SaveChar(this);
                    DataBase.SaveFCPs(this);
                }
        }

now search in databse.cs for
Code:
  public static void SaveChar(Character Charr)
add before
Code:
        public static void SaveFCPs(Character Charr)
        {
            MySqlCommand Command = null;
            Command = new MySqlCommand("UPDATE `Characters` SET `FCPs` = '" + Charr.FCPs + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
            Command.ExecuteNonQuery();
        }

search for
Code:
DataRow DR = DSet.Tables["Character"].Rows[0];
and add under this
Code:
 Charr.FCPs = (uint)DR["FCPs"];

Now for the NPC:

go into your client.cs to the npc talk
or search for
Code:
if (CurrentNPC == 390)
after this NPCcode add
Code:
                            if (CurrentNPC == 912)//Give CPS Pack
                            {
                                SendPacket(General.MyPackets.NPCSay("Hi, my name in HuangZoe. I can give u some free cps if u want?"));
                                SendPacket(General.MyPackets.NPCLink("OH! Yes plz.", 1));
                                SendPacket(General.MyPackets.NPCLink("Good Bye.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }


go to the NPCDO
search agien for
Code:
if (CurrentNPC == 390)
and add after this NPCcode
Code:
                            if (CurrentNPC == 912)
                            {
                                if (Control == 1)
                                {
                                    if (MyChar.FCPs == 0)
                                    {

                                        MyChar.FCPs += 1;


                                        MyChar.CPs += 1000;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                        MyChar.SaveFCPs();
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You have get some CPS from me. Go away"));
                                     
                                        SendPacket(General.MyPackets.NPCLink("ok.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                    }
                                   
                                }
                            }

now add i your mysqldatabse in the character table:

add the NPC in the databse and
DONE
Back to top Go down
View user profile
 
[Release] Free Cps by Npc
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Im new to FB. Feel free to add me as a friend
» Free Isn't Good Enough Sweepstakes *Alabama, Kentucky and Tennessee only*
» Martins Pond Free Dinner Competition *uk only*
» FREE $100 Gas Card *Illinois only*
» Legitimate site for free tv and movies online--thousands of listings

Permissions in this forum:You cannot reply to topics in this forum
Game-Elites :: Conquer Online 2 :: CO2 Programming-
Jump to: