Register for your free account! | Forgot your password?

You last visited: Today at 03:04

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

Advertisement



[Release] Points ( Custom idea )

Discussion on [Release] Points ( Custom idea ) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
[Release] Points ( Custom idea )

Hey guys. Litteraly bored,so I decided to code like points,this is how it work:

What point does:
You can trade them for items,such as:
DB
Met
Experience
VPS
Blessing
some more...


You can also sell them to an NPC.


How to get them:
PKing others
Be in the winning guild of GW
Participing in Lottery


How to loose:
Getting PKed by another player.


Lets start!


Search for :
public void SaveHB()
Above it ,add:

Code:
public void SavePoints()
        {
            LastSave = DateTime.Now;
            if (MyClient.There)
                if (MyClient.Online)
                {
                    DataBase.SaveChar(this);
                    DataBase.SavePoints(this);
                }
        }
Search for:
public static void Ban
above it , add:

Code:
public static void SavePoints(Character Charr)
        {
            MySqlCommand Command = null;
            Command = new MySqlCommand("UPDATE `Characters` SET `Points` = '" + Charr.Points + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
            Command.ExecuteNonQuery();
        }

Search for
if (CurrentNPC == 9812)
Until you get to the CODE for it,above it add:

Code:
if (CurrentNPC == 3900)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Which to buy points? This is what I give for your items."));
                                    SendPacket(General.MyPackets.NPCLink("50 points for one million silvers.", 3));
                                    SendPacket(General.MyPackets.NPCLink("50 points for 140 CPs.", 4));
                                    SendPacket(General.MyPackets.NPCLink("10 points for 5000 VPs", 5));
                                    SendPacket(General.MyPackets.NPCLink("15 points for an Meteor", 6));
                                    SendPacket(General.MyPackets.NPCLink("35 points for an DragonBall", 7));
                                    SendPacket(General.MyPackets.NPCLink("Nothing,thanks.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Which to sell points? This is what I give for your points."));
                                    SendPacket(General.MyPackets.NPCLink("10000 VPs for 100 points", 8));
                                    SendPacket(General.MyPackets.NPCLink("EXP. worth of 10 ExpBalls for 300 points.", 9));
                                    SendPacket(General.MyPackets.NPCLink("DragonBall for 75 points", 10));
                                    SendPacket(General.MyPackets.NPCLink("3-days-blessing for 750 points", 11));
                                    SendPacket(General.MyPackets.NPCLink("Random amout of silvers for 500 points", 12));
                                    SendPacket(General.MyPackets.NPCLink("Nothing,thanks.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                    
                                    }
                                if (Control == 3)
                                {
                                    if (MyChar.Silvers >= 1000000)
                                    {
                                        MyChar.Points += 50;
                                        MyChar.Silvers -= 1000000;
                             SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
                             SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));
                                       
                                        
                                    }

                                }
                                if (Control == 4)
                                {
                                    if (MyChar.CPs >= 140)
                                    {
                                        MyChar.Points += 50;
                                        MyChar.CPs -= 140;
                                      SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                      SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));

                                    }
                                }
                                if (Control == 5)
                                {
                                    if (MyChar.VP >= 5000)
                                    {
                                        MyChar.Points += 10;
                                        MyChar.VP -= 5000;
                                        MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));

                                    }
                                }
                                if (Control == 6)
                                {
                                    if (MyChar.InventoryContains(1088001, 1))
                                    {
                                        MyChar.Points += 15;
                                        MyChar.RemoveItem(1088001);

                                    }
                                }
                                if (Control == 7)
                                {
                                    if (MyChar.InventoryContains(1088000, 1))
                                    {
                                        MyChar.Points += 35;
                                        MyChar.RemoveItem(1088000);

                                    }
                                }
                                if (Control == 8)
                                    {
                                        if (MyChar.Points >= 100)
                                        {
                                            MyChar.VP += 10000 ;
                                            MyChar.Points -= 100;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));
                                            

                                        }
                                    }
                                if (Control == 9)
                                {
                                    if (MyChar.Points >= 900)
                                    {
                                    if (MyChar.Level < 100)
                                            MyChar.AddExp((ulong)(12950000 + MyChar.Level * 400000), false);
                                        else if (MyChar.Level < 110)
                                            MyChar.AddExp((ulong)(13950000 + MyChar.Level * 700000), false);
                                        else if (MyChar.Level < 115)
                                            MyChar.AddExp((ulong)(15950000 + MyChar.Level * 900000), false);
                                        else if (MyChar.Level < 120)
                                            MyChar.AddExp((ulong)(18950000 + MyChar.Level * 1100000), false);
                                        else if (MyChar.Level < 125)
                                            MyChar.AddExp((ulong)(20950000 + MyChar.Level * 1400000), false);
                                        else if (MyChar.Level < 130)
                                            MyChar.AddExp((ulong)(23950000 + MyChar.Level * 1700000), false);
                                        else if (MyChar.Level < 135)
                                            MyChar.AddExp((ulong)(28950000 + MyChar.Level * 1900000), false);
                                        MyChar.Points -= 900;
                                        SendPacket(General.MyPackets.Vital((long)MyChar.UID, 5, MyChar.Exp));
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));

                                    }
                                }
                                if (Control == 10)
                                {
                                    if (MyChar.Points >= 75)
                                    {
                                        MyChar.AddItem("1088000-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                        MyChar.Points -= 75;
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));

                                    }
                                }
                                if (Control == 11)
                                {
                                    if (MyChar.Points >= 750)
                                    {
                                        if (!MyChar.Blessed)
                                        {
                                            MyChar.HBStart = DateTime.Now;
                                           MyChar.HBEnd = DateTime.Now.AddDays(3);
                                            MyChar.WhichBless = 1;
                                            MyChar.Blessed = true;
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 18, (3 * 24 * 60 * 60)));
                                            MyChar.MyClient.SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                           
                                            World.UpdateSpawn(MyChar);
                                            MyChar.SaveHB();
                                            MyChar.MyClient.SendPacket(General.MyPackets.String(MyChar.UID, 10, "zf2-e128"));
                                            MyChar.Points -= 750;
                                            SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));
                                        }
                                        else
                                        {
                                            MyChar.MyClient.SendPacket(General.MyPackets.SendMsg(MyChar.MyClient.MessageId, "SYSTEM", MyChar.Name, "You already have Heavens Blessing!", 2005));
                                        }
                                        

                                    }
                                }
                                if (Control == 12)
                                {
                                    if (MyChar.Points >= 500)
                                    {
                                        int AddSilv = General.Rand.Next(10000000, 20000000);
                                        MyChar.Silvers += (uint)AddSilv;
                                        MyChar.Points -= 500;
                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
                                        SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You now have " + MyChar.Points + " Points left.", 2005));
                                       

                                    }
                                }
                                MyChar.SavePoints();
                          }

Search for : if (CurrentNPC == 390)
Above it ,add:

Code:
if (CurrentNPC == 3900)//PointNPC1
                            {
                                SendPacket(General.MyPackets.NPCSay("Hello,I am the points NPC. I can give you points for your items, or vice versa"));
                                SendPacket(General.MyPackets.NPCSay("Your current points is : " + MyChar.Points));
                                SendPacket(General.MyPackets.NPCSay("Look at my options,intresed in any?"));
                                SendPacket(General.MyPackets.NPCLink("I'd like to buy points", 1));
                                SendPacket(General.MyPackets.NPCLink("I'd like to sell points", 2));
                                SendPacket(General.MyPackets.NPCLink("Nevermind", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }

Search for :
User.BlueName = true;

you will find two, under both,add this:

Code:
User.Points += 25;
                                    Player.Points -= 25;
                                    User.MyClient.SendPacket(General.MyPackets.SendMsg(User.MyClient.MessageId, "SYSTEM", User.Name, "You took 25 points from your target!", 2005));
                                    User.MyClient.SendPacket(General.MyPackets.SendMsg(Player.MyClient.MessageId, "SYSTEM", Player.Name, "You lost 25 points by dying!", 2005));
Search for : else if (ItemParts[0] == "723700"
Under it , add:

Code:
 else if (ItemParts[0] == "780001")//PointCardS
            {
                Points += 40;
                MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You gained 40 Points! You now have " + Points + " Points.", 2005));
           RemoveItem(ItemUID);
            }
            else if (ItemParts[0] == "780000")//PointCard
            {
                Points += 120;
                MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You gained 120 Points! You now have " + Points + " Points.", 2005));
                RemoveItem(ItemUID);
            }
In Character.cs , add:

Code:
public uint Points = 0;


OH MY GOD,GOTTA SLEEP,IM DYING. Now add an npc with id 3900 somewhere and add a new Points for it in character table in database.



Never tested the code,ever never,so you test it.. GOODNIGHT!!


Emme
_Emme_ is offline  
Thanks
17 Users
Old 11/01/2008, 01:31   #2
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
So, Just like CPs?. lol
© Haydz is offline  
Old 11/01/2008, 02:12   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 217
Received Thanks: 26
.. you can't lose cps by getting pked, or from lotto .. but i guess you could say that
demonscim is offline  
Old 11/01/2008, 09:32   #4
 
~jochemke~'s Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
well can be funny if it works
gonna try as soon as i can
~jochemke~ is offline  
Old 11/01/2008, 09:40   #5


 
MeGaMaX's Avatar
 
elite*gold: 48
Join Date: Sep 2006
Posts: 1,087
Received Thanks: 2,585
Yoooo Thanks Emme
MeGaMaX is offline  
Thanks
1 User
Old 11/01/2008, 09:45   #6
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Press thanks if you're happy with it.I did not try it one single time,so report any bugs.

Thanks
_Emme_ is offline  
Thanks
5 Users
Old 11/01/2008, 09:46   #7
 
leavemealone's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 2,168
Received Thanks: 8,593
Rather useless, but in this sorta theory should create an Honor System
leavemealone is offline  
Old 11/01/2008, 10:43   #8
 
elite*gold: 0
Join Date: Dec 2006
Posts: 196
Received Thanks: 35
you forgot something, it doesnt save your way i think.

just keep searching for vp and add copie it and change vp to points.
randomnoob is offline  
Old 11/01/2008, 11:40   #9
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
It does save, look at the top two codes.
_Emme_ is offline  
Thanks
4 Users
Old 11/01/2008, 13:38   #10
 
Exia13's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 256
Received Thanks: 21
Another great release
Exia13 is offline  
Old 11/01/2008, 13:50   #11
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
I fooled around with a private server some time ago, and made a similar system, although you didn't get "Points" for PKing, you gained CPs. Monsters didn't drop Meteors and DragonBalls, and they didn't give XP, they only dropped items.

You could make a very cool PvP based server with similar systems.
Nice thinking, Emme.
IAmHawtness is offline  
Old 11/01/2008, 15:42   #12
 
adz06676's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 450
Received Thanks: 68
this is pretty much pointless whats wrong with using cps?
adz06676 is offline  
Old 11/02/2008, 22:31   #13
 
elite*gold: 0
Join Date: Apr 2008
Posts: 56
Received Thanks: 8
Emme you make a good work , but your points don't save..
DungMaster is offline  
Old 11/03/2008, 00:31   #14
 
Tw3ak's Avatar
 
elite*gold: 20
Join Date: Jun 2005
Posts: 1,489
Received Thanks: 301
Quote:
Originally Posted by DungMaster View Post
Emme you make a good work , but your points don't save..
You have to add points to your database class where it reads char info when char is loading.

It should save the info fine if ya added it right but there is no code to retrieve it when each character logs in you need to go to your database class
and find where it loads all character info and add points to it then it will load them everytime.

This also needs to be done with emme's heavensblessing to work right otherwise it will save the info but not load what was saved when u log off and back on.

Or better yet better way is to have server read ALL your char info when logging in with simpler variables then standard lotf has but i won't go into that now.
Tw3ak is offline  
Old 11/03/2008, 17:29   #15
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Search for:

Quote:
Charr.VP = (uint)DR["VP"];
Above it , add:

Quote:
Charr.Points = (uint)DR["Points"];
_Emme_ is offline  
Reply


Similar Threads Similar Threads
[Release] Custom Quest
09/11/2010 - CO2 PServer Guides & Releases - 11 Replies
Hello. This is a cool little quest I made. Credits go to me and -Shunsui-. I hope you like it! Add these codes to NPCDialog.cs: #region Ghost case 67435: { if (Control == 0)
[Release] Another Custom Quest
04/23/2010 - CO2 PServer Guides & Releases - 6 Replies
Hello I made this quest all by myself It is pretty good I guess Add these to NPCDialog.cs: #region Shirly Quest case 778867: { if (Control == 0) {
idea, vote points
05/23/2009 - RF Online - 0 Replies
hiya all:bandit: u all know it... ure voting for ur private server to get some game points... but i want more... always wait 12 hours after 1 vote?! thats shitty... i was trying to bypass this waiting time with some proxys... but fail... some1 have any idea? peace out:bandit:
[RELEASE] Custom Monsters
11/14/2008 - EO PServer Guides & Releases - 5 Replies
Hi, I Edited how most of the monsters look In-game Some look realy cool ^^ everything works fine for me.. so i dont think there are any bugs xD i hope at least Someone likes it. Lol i cant upload any Pictures because my net is slow as Hell! If someone can upload an image of some of the monsters i'll give em a Thanks lol xD I'm Murtah by the way. Oh, This is for server owners.. just add the Three cq_monstertype's into ya My Folder and the monsterface into your Ini Folder of your client :P you...
And Idea For Pking Without Gaining Pk Points
08/22/2007 - Conquer Online 2 - 7 Replies
Ok, this is just an idea, maybe you could edit the file that controles monsters, so it makes you seem as a monster, then you can kill someone as a "monster" therefore gaining no pk points, this is just an idea.



All times are GMT +1. The time now is 03:04.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.