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);
}
}
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));
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);
}
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






