elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   CO2 PServer Guides & Releases (https://www.elitepvpers.com/forum/co2-pserver-guides-releases/)
-   -   [Guide]How to edit 5165 source! (https://www.elitepvpers.com/forum/co2-pserver-guides-releases/396410-guide-how-edit-5165-source.html)

.Ryu 12/13/2009 03:37

[Guide]How to edit 5165 source!
 
Well here is a simple thread on using the functions in the 5165 source that everyone has, Basicly will be talking bout functions about the source

Ok first lets start with adding a item and what it does

Spoiler:
Lets start by going to Character.cs in Game/Character.cs

Search for
Code:

MoneyBag
And youll find this code

Code:

#region Class1MoneyBag
                    case 723713:
                        {
                            RemoveItem(I);
                            Silvers += 300000;
                            break;
                        }
                    #endregion

Now this is where you would add this stuff like pk amulet and all that now to make your own item or something lets break it down

To make your own scroll it be like

Code:

case SCROLL CASE:
                        {
                            if (Loc.Map != 6000 && Loc.Map != 6001)
                            {
                                Teleport(MAP ID, MAP CORDS, MAP CORDS);
                                RemoveItem(I);
                            }
                            else
                                MyClient.LocalMessage(2005, "Cannot use teleport scrolls in jail.");
                            break;
                        }

Ill break it down some more later

Now for a NPC

Let do a NPC to learn skills

Spoiler:
Ok let me show you the base NPC

Code:

#region TO FIND THE NPC QUICKER
                            case NPC ID HERE:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Would you like to learn a skill??"));
                                        GC.AddSend(Packets.NPCLink("SKILL  1", 4));
                                        GC.AddSend(Packets.NPCLink("SKILL  2", 5));
                                        GC.AddSend(Packets.NPCLink("SKILL  3 ", 6));
                                        GC.AddSend(Packets.NPCLink("NO THANKS", 255));/// 255 is to exit the NPC remember that
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (GC.MyChar.Inventory.Count < 40)
                                    {

                                        if (Control == 4)
                                        {
                                            if (GC.MyChar.Silvers >= 10000)///The ammount the silver the account must have for skills
                                            {
                                                GC.MyChar.Silvers -= 10000;
                                                GC.MyChar.RWSkill(new Game.Skill() { ID = 7001, Lvl = 0, Exp = 0 });
                                                GC.AddSend(Packets.NPCSay("You have learned SKILL  1"));
                                                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }

Thats not a full NPC ok guys thanks

And for those poeple who have problems editing the source heres a simple guide on what to do =P

Spoiler:

When you edit something you wanna build it so to build it do this

[Only registered and activated users can see links. Click Here To Register...]

and then you wanna debug it wicth is quite simple

[Only registered and activated users can see links. Click Here To Register...]

After you debug it this window should pop up

[Only registered and activated users can see links. Click Here To Register...]

Note:If you have errors this will not work

That how you would do it

Guys i will edit this post with some more basic :D for all the nubs that need

If this helps press thanks

the.Evil 12/13/2009 16:28

thhx

~*NewDuuDe*~ 12/13/2009 17:09

Exactly why do we need space in our inventory to learn a skill?

~jochemke~ 12/13/2009 17:22

Quote:

Originally Posted by BERGHUIS1 (Post 3641581)
Exactly why do we need space in our inventory to learn a skill?

yea i saw that too . Its only needed if it is a skillbook that will be added to your inventory else it seems useless to me .

.Ryu 12/13/2009 20:23

#Request Close
I guess no one wants help =\

~jochemke~ 12/14/2009 10:58

well it isn't useless . But the stuff u released is quite basic . Many people can easily figure that out but still +k from me ;)

.Ryu 12/19/2009 21:01

Quote:

Originally Posted by ~quablerist~ (Post 3677518)
I cant Build or Debug an edit cuz I cant klick on the Build or Debug Butten Please help me
:)

Well pm me your email adress and ill help you out =P


All times are GMT +2. The time now is 17:00.

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