Register for your free account! | Forgot your password?

You last visited: Today at 00:49

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


[Release] Free Cps for new Palyers by NPC

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
[Release] Free Cps for new Palyers by NPC

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

add in the caracter.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



koio is offline  
Old 01/10/2009, 18:11   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
ooh you can also edit this for an advanced start pack for like items, just change the +Cps to additem and all that =]]

hope it works i will try later


TruthCo is offline  
Old 01/10/2009, 18:18   #3
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,031
Received Thanks: 58
Quote:
Originally Posted by TruthCo View Post
ooh you can also edit this for an advanced start pack for like items, just change the +Cps to additem and all that =]]

hope it works i will try later
dude your spamming that forum .. wat a ****? You joined yesterday And now your post count is 53 LOL, You dont have to post in every thread untill you got something important to say...
damianpesta is offline  
Old 01/10/2009, 18:32   #4
 
elite*gold: 0
Join Date: Jul 2007
Posts: 442
Received Thanks: 104
He has an average of 24 posts a day......That kind of speaks for itself


plasma-hand is offline  
Old 01/10/2009, 18:40   #5
 
elite*gold: 0
Join Date: Dec 2008
Posts: 493
Received Thanks: 71
Regarding this NPC - you could have the player START with cps rather than them having to talk to an NPC
Beta Limit is offline  
Old 01/10/2009, 18:41   #6
 
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
im not spamming any posts im pretty sure im helping some people, and im not breaking any rules so just get off my back
TruthCo is offline  
Old 01/10/2009, 20:48   #7
 
elite*gold: 0
Join Date: Oct 2006
Posts: 222
Received Thanks: 27
Quote:
and im not breaking any rules so just get off my back
This could be offensive at other players and that's not good... So you said you don't brake rules??
sherwin9 is offline  
Old 01/10/2009, 21:02   #8
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,031
Received Thanks: 58
Quote:
Originally Posted by TruthCo View Post
im not spamming any posts im pretty sure im helping some people, and im not breaking any rules so just get off my back
I Guess you didnt make any Useful Posts , Just to make sure I will look through them now and Post results Later .
damianpesta is offline  
Old 01/10/2009, 21:44   #9
 
elite*gold: 0
Join Date: Jul 2006
Posts: 1,933
Received Thanks: 664
I lolled at the code. I haven`t seen such a bad code for ages... Come on, you`re using an uint, just to make it one? And this is only one thing. Lol.

Also, why make a SaveFCP()? Why not just make a FCP bool = 0; then the NPC checks if the bool is true, gives CPs, and makes it false. You don`t even need a lot of that code.
KraHen is offline  
Old 01/10/2009, 21:56   #10
 
elite*gold: 0
Join Date: Jan 2006
Posts: 124
Received Thanks: 16
Would This actually work and if so how many CPs would i get?
Frietag is offline  
Old 01/10/2009, 21:56   #11
 
elite*gold: 0
Join Date: Mar 2006
Posts: 105
Received Thanks: 18
this is very old for me :-j
But thanks for ur contribuition!
HunterKiller is offline  
Old 01/10/2009, 21:58   #12
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
Quote:
Originally Posted by ElDeRnEcRo View Post
Also, why make a SaveFCP()? Why not just make a FCP bool = 0; then the NPC checks if the bool is true, gives CPs, and makes it false. You don`t even need a lot of that code.
LOL
u can do it how u want to do it
i do it here my way if u wana use a other u can do it
and ho sad that i released all my codes for free cps?
this is only a spimple example for free things which u get limited time
koio is offline  
Old 01/10/2009, 22:14   #13
 
elite*gold: 0
Join Date: Jun 2007
Posts: 30
Received Thanks: 3
Hmm Ok where abouts are all these files does it work on a normal sever and not a private ? Respond a.s.a.p thanks
spazem is offline  
Old 01/10/2009, 22:15   #14
 
elite*gold: 0
Join Date: Jun 2007
Posts: 30
Received Thanks: 3
That was a kind of dumb question its in the private sever section sorry =x
spazem is offline  
Old 01/10/2009, 22:42   #15
 
elite*gold: 0
Join Date: Sep 2008
Posts: 132
Received Thanks: 64
Quote:
Originally Posted by spazem View Post
Hmm Ok where abouts are all these files does it work on a normal sever and not a private ? Respond a.s.a.p thanks
with this code it works for a normal pserver


koio is offline  
Reply



« [Mini-Guide]How to make mobs drop certain items | [RELEASE] Free Items to all Online Players »

Similar Threads
Sell palyers
11/10/2006 - CO2 Main - Discussions / Questions - 0 Replies
Sell water tro lvl 130 archer lvl 130 water fire lvl 128 water water tro lvl 116 tro tro lvl 127 water tro lvl 130 Server Venus Pm for offerts :bandit:



All times are GMT +1. The time now is 00:49.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.