[Release]Original CardPoints Officer! 5165 Source!

02/11/2010 00:39 killersub#1
Well, since this was ma original post in 4botters I've decided to share it with you guys here!And,Since I saw parts of this in an "OLD" ass loft source I decided to update/convert it to the 5165 source(it's kinda my work when u think about it...), and since NO1 else has posted this I decided I will :)...this is the ORIGINAL TQ NPC(well maybe not,but in some way) and the original spot...

let's define our variables, etc...

in Character.cs find
Quote:
public bool DoubleExp = 0;
and under it put this code
Quote:
public int ItemsInInventory = 0;
now if you already don't have a variable for "CardPoints" in Character.cs or you get the error of "CardPoints" in my NPC then implement this code in Character.cs under:
Quote:
public uint TradingWith = 0;
PUT THIS:
Quote:
public uint CardPoints = 0;
THAT'S ONLY IF YOU DON'T SEE THAT CODE ANYWHERE IN "Character.cs" OR ONLY IF YOU HAVE AN ERROR WITH "CardPoints" IF NOT THEN SKIP THIS STEP OR U WILL GET MANY ERRORS!...AN IF YOU HAVE DOWNLOADED A RECENT 5165 SOURCE IT WILL MOST LIKELY COME WITH THAT IN IT ALREADY!

now for the NPC...

Code:
#region CardPoints    
                            case 95450:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Have you gained any CardPoints in your travels across the land? If so, I can exchange prizes for your CardPoints!"));
                                        GC.AddSend(Packets.NPCLink("What are CardPoints?", 1));
                                        GC.AddSend(Packets.NPCLink("Exchange for Prizes.", 2));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay("CardPoints are special points that you can rack up by doing quests, using items, or other things!"));
                                        GC.AddSend(Packets.NPCSay(" After you get some CardPoints, you can exchange a certain amount of them for special prizes!"));
                                        GC.AddSend(Packets.NPCSay(" Don't get CardPoints mixed up with CPs, they are 2 totally different things!"));
                                        GC.AddSend(Packets.NPCLink("Cool!", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 2)
                                    {
                                        GC.AddSend(Packets.NPCSay("What prize would you like? (Current CardPoints: " + GC.MyChar.CardPoints + ")"));
                                        GC.AddSend(Packets.NPCLink("Dragonball [340]", 3));
                                        GC.AddSend(Packets.NPCLink("Dragonballx5 [1380]", 4));
                                        GC.AddSend(Packets.NPCLink("ExpBall [42]", 5));
                                        GC.AddSend(Packets.NPCLink("50mil Silvers [340]", 6));
                                        GC.AddSend(Packets.NPCLink("5mil Silvers [34]", 7));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 3)
                                    {
                                        if (GC.MyChar.CardPoints >= 340)
                                        {
                                            if (GC.MyChar.ItemsInInventory <= 39)
                                            {
                                                GC.MyChar.CardPoints -= 340;
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.Message("SYSTEM", GC.MyChar.Name, "You now have " + GC.MyChar.CardPoints + " CardPoints left.", 2005);
                                                GC.MyChar.SaveCardPoints();
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You don't have enoughspace in your inventory!"));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CardPoints!"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 4)
                                    {
                                        if (GC.MyChar.CardPoints >= 1380)
                                        {
                                            if (GC.MyChar.ItemsInInventory <= 35)
                                            {
                                                GC.MyChar.CardPoints -= 1380;
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.MyChar.AddItem("1088000-0-0-0-0-0");
                                                GC.Message("SYSTEM", GC.MyChar.Name, "You now have " + GC.MyChar.CardPoints + " CardPoints left.", 2005);
                                                GC.MyChar.SaveCardPoints();
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You don't have enoughspace in your inventory!"));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CardPoints!"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 5)
                                    {
                                        if (GC.MyChar.CardPoints >= 42)
                                        {
                                            if (GC.MyChar.ItemsInInventory <= 39)
                                            {
                                                GC.MyChar.CardPoints -= 42;
                                                GC.MyChar.AddItem("723700-0-0-0-0-0");
                                                GC.Message("SYSTEM", GC.MyChar.Name, "You now have " + GC.MyChar.CardPoints + " CardPoints left.", 2005);
                                                GC.MyChar.SaveCardPoints();
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("You don't have enoughspace in your inventory!"));
                                                GC.AddSend(Packets.NPCLink("I see.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CardPoints!"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 6)
                                    {
                                        if (GC.MyChar.CardPoints >= 340)
                                        {
                                            GC.MyChar.CardPoints -= 340;
                                            GC.MyChar.Silvers += 50000000;
                                            GC.Message("SYSTEM", GC.MyChar.Name, "You now have " + GC.MyChar.CardPoints + " CardPoints left.", 2005);
                                            GC.MyChar.SaveCardPoints();
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CardPoints!"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 7)
                                    {
                                        if (GC.MyChar.CardPoints >= 34)
                                        {
                                            GC.MyChar.CardPoints -= 34;
                                            GC.MyChar.Silvers += 5000000;
                                            GC.Message("SYSTEM", GC.MyChar.Name, "You now have " + GC.MyChar.CardPoints + " CardPoints left.", 2005);
                                            GC.MyChar.SaveCardPoints();
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CardPoints!"));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
and in your OldCODB folder open your NPCs.txt and add this line somewhere on the bottom of the file:

Quote:
95450 1660 2 0 1015 706 594
ENJOY!
+THANKS IF THIS HELPED YOU OR EVEN GAVE U AN IDEA!
ENJOY!
02/11/2010 01:42 StarEvaAfta!~#2
Nice release , keep great working
02/11/2010 02:45 killersub#3
Quote:
Originally Posted by StarEvaAfta!~ View Post
Nice release , keep great working
Thanks I love to contribute! XD
02/11/2010 09:04 ramix#4
public boolc DoubleExp = 0;

in my source i have this

public bool DoubleExp;

not

public bool DoubleExp = 0;

have a little error in GC.MyChar.SaveCardPoints();

but that is easy fix...

good release ;)
02/11/2010 09:18 NukingFuts#5
nice work mate :)
02/11/2010 21:05 killersub#6
Quote:
Originally Posted by ramix View Post
public boolc DoubleExp = 0;

in my source i have this

public bool DoubleExp;

not

public bool DoubleExp = 0;

have a little error in GC.MyChar.SaveCardPoints();

but that is easy fix...

good release ;)
rofl blonde momment XD...my bad I'll fix that A.S.A.P lolz thanks for correcting me that error! and thanks!

and for SaveCardPoints in Character.cs find:
Quote:
internal void Teleport(int p, int p_2, int p_3, int p_4)
{
throw new NotImplementedException();
}
and under it add:
Quote:
internal void SaveCardPoints()
{
throw new NotImplementedException();
}
hope I helped! thanks!
02/11/2010 22:10 Decker_#7
good job killer! :D:D:D
02/11/2010 23:10 killersub#8
Quote:
Originally Posted by _Decker View Post
good job killer! :D:D:D
Thanks bro!
02/11/2010 23:15 Decker_#9
But I tried this and I get errors :(
02/11/2010 23:17 killersub#10
Quote:
Originally Posted by _Decker View Post
But I tried this and I get errors :(
alright post ur errors and i'll try my best to help.
02/11/2010 23:19 Decker_#11
Lol, actually I don't know what this NPC does anyways, but I wanted it.
lol
02/11/2010 23:21 killersub#12
Quote:
Originally Posted by _Decker View Post
Lol, actually I don't know what this NPC does anyways, but I wanted it.
lol
well this NPC gives the "noobs" a chance to get easy CPs/DBs/etc whatever it says(lol) and makes them get cardpoints from (anywhere, mobs, quests, etc) and u can exchange those cardpoints for the valuable prices it states in the code lol...
02/12/2010 21:44 copz1337#13
um killersub i cant find "internal void Teleport(int p, int p_2, int p_3, int p_4)" etc.. in the Characters.cs ??
02/12/2010 22:22 killersub#14
Quote:
Originally Posted by copz1337 View Post
um killersub i cant find "internal void Teleport(int p, int p_2, int p_3, int p_4)" etc.. in the Characters.cs ??
lol wat are u talking about bro? is there a problem? if so, which is it cuz I'm sure I have not said anything about and "internal void"...plz post the problem it says and maybe I can understand it better XD
02/25/2010 23:20 walmartboi#15
OMG! This is from KinshiEmu(Kinshi's 5017 source that he never really opened publicly), which I still have somewhere on my hard drive. This brings back memories.