[Release]Honor Points Trader 5165

07/29/2010 16:39 FrontBoy#1
Hello today i will release my Honor Points Trader
Now because the mods deleted honor arena i will teach you how to add one

First in character.cs search for :

Code:
public bool Ghost = false;
Under that add:

Code:
public int HonorPoints = 0;
Search for:


Code:
if (!BlueName)
                        {
                            Attacker.BlueNameLasts += 45;
                            if (Attacker.Enemies.Contains(EntityID))
                                Attacker.PKPoints += 5;
                            else
                                Attacker.PKPoints += 10;
                        }
Under that add:

Code:
if (Loc.Map == 1091)
                        {
                            Attacker.HonorPoints += 2;
                        }
Search 5 times for:

Code:
C.LotteryUsed = 0;
Under all of them put:

Code:
C.HonorPoints = 0;
Search 1 time for:

Code:
BW.Write(C.LotteryUsed);
Under that put:

Code:
BW.Write(C.HonorPoints);
Search 2 times for:

Code:
C.LotteryUsed = BR.ReadByte();
Under that put:

Code:
C.HonorPoints = BR.ReadByte();
Here is the NPC, this goes in NPCDialog.cs:

Code:
#region HonorArena
                            case 77584:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like to enter Honor Arena or check your Honor Points?"));
                                        GC.AddSend(Packets.NPCLink("Enter", 1));
                                        GC.AddSend(Packets.NPCLink("Check", 2));
                                        GC.AddSend(Packets.NPCLink("No", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        GC.MyChar.Teleport(1091, 35, 35);
                                    }
                                    if (Control == 2)
                                    {
                                        GC.AddSend(Packets.NPCSay("You have " + GC.MyChar.HonorPoints + " HonorPoints."));
                                        GC.AddSend(Packets.NPCLink("Alright ", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());

                                    }
                                    break;
                                }
                            #endregion
Ok now when you added the Honor Arena now we will add the npc to give reward for Honor Points :

Code:
                            #region HonorPoints Exchanger
                            case 1291: // Change the case id
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello, " + GC.MyChar.Name + " i badly need some Honor Points do you have some?"));
                                        GC.AddSend(Packets.NPCLink("Yes, i have!", 1));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1 && GC.MyChar.HonorPoints >= 50)
                                    {
                                        GC.AddSend(Packets.NPCSay("Well i have some medals... Hey what about this. I give you Gold Medal for 50 Honor Points ok?"));
                                        GC.AddSend(Packets.NPCLink("Yes ok!", 2));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 2)
                                    {
                                        GC.MyChar.HonorPoints -= 50;
                                        GC.MyChar.AddItem(1088006);
                                        GC.AddSend(Packets.NPCSay("There i gave you the medal!"));
                                        GC.AddSend(Packets.NPCLink("Thanks!", 2));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else
                                    {
                                        GC.AddSend(Packets.NPCSay("Hey you dont have 50 Honor Points!"));
                                        GC.AddSend(Packets.NPCLink("Sorry my mistake.", 2));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
Then you need to add the npc to NPCS.txt

Note : You need to change the reward i will tell you how :

GC.MyChar.AddItem(Here is the id of the reward);

or if you want to add cps for reward delete :

GC.MyChar.AddItem(1088006);

and on that place type :

GC.MyChar.CPs += 5000;

5000 is the cps amount change it :D

Press thanks if you like it

Credits to mattyc2580 for teaching me with the HonorPoints Check
Im still noob at coding :D
07/29/2010 16:43 .Beatz#2
Good to see you are learning things :) Hope to see better releases from you in time :D
07/29/2010 17:13 FrontBoy#3
Quote:
Originally Posted by mattyc2580 View Post
Good to see you are learning things :) Hope to see better releases from you in time :D
Thanks :D

Soon im gonna release my Boots and Ring
07/29/2010 17:32 Korvacs#4
Just so were clear, its standard practice now for admins to ban and delete all of Deckers accounts and posts, even if they are somewhat useful.
07/29/2010 17:43 _DreadNought_#5
^ Which ofc they were not.
07/29/2010 17:47 FrontBoy#6
Quote:
Originally Posted by Eliminationn View Post
^ Which ofc they were not.
The Honor Arena System works i use it on my server everyone in my server use it and we havent found bug
07/29/2010 17:52 Korvacs#7
What are you talking about......
07/29/2010 18:32 .Beatz#8
Hello today i will release my Honor Points Trader
Now because the mods deleted honor arena i will teach you how to add one

This is the reason Korvacs said what he did in his earlier post. He was stating that the reason Deckers Thread was closed and deleted was because it was Decker. He did not say that the Honor Arena did not work.
07/29/2010 18:38 FrontBoy#9
But Elimination said that they ofc were uselles
09/02/2010 00:21 Frankos#10
i don't understand where i can search for C.LotteryUsed = 0; and more. tell us .CS files where we can find that.
09/02/2010 00:29 FrontBoy#11
Database.cs
09/02/2010 00:32 Frankos#12
i can't find that in database.cs ...can u help me in pvt please? can u send me your msn/yahoo id in PM please?

Thanx
09/02/2010 00:38 FrontBoy#13
dont be st@p#d open your source using c# open Database.cs press Ctrl + F then write
C.LotteryUsed = 0; with no spaces no nothing and press enter then you will find it *If you use this press thanks*
09/02/2010 00:49 Frankos#14
you are crazy man ? i have been searched in all .cs files but i can't find that. :-??

and more and more like " BW.Write(C.LotteryUsed); " and " C.LotteryUsed = BR.ReadByte(); ". i really need your help.

I will press +Thanx if you will help me :)
09/02/2010 00:52 FrontBoy#15
dude open all cs files
write what you are looking for then make it to search in whole project you will find it