Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 06:02

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

Advertisement



[Request] NPC that Reallot Points

Discussion on [Request] NPC that Reallot Points within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2007
Posts: 128
Received Thanks: 80
[Request] NPC that Reallot Points

Can someone post a code with guide for NPC that reallot attribute points.. Please. Thanks.
nestreys is offline  
Old 07/21/2009, 23:03   #2
 
elite*gold: 0
Join Date: Nov 2008
Posts: 108
Received Thanks: 4
Quote:
Originally Posted by nestreys View Post
Can someone post a code with guide for NPC that reallot attribute points.. Please. Thanks.


Why making 2 threads about the same thing if 1 of them been answered...? And no , noobody's gonna give you full npc.I almost made a full function for you there.Work out how's the npc gonna be yourself.
WTFoRK is offline  
Thanks
1 User
Old 07/22/2009, 00:21   #3
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
what source ??
samehvan is offline  
Thanks
1 User
Old 07/22/2009, 02:27   #4
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
Quote:
Originally Posted by samehvan View Post
what source ??
LOTF

I'm not going to give out whole code but here's how you would do it..

Make it check like this...

EXAMPLE:

Code:
if (CurrentNPC == 0)
{
if (MyChar.Reborn >= 1)
{
                                        SendPacket(General.MyPackets.NPCSay("Blablalblalbla reallot your stats blalblalblallblallblallblalllbll"));
                                        SendPacket(General.MyPackets.NPCLink("Ok.", 1));
                                        SendPacket(General.MyPackets.NPCLink("No Thanks.", 255));
                                        SendPacket(General.MyPackets.NPCFinish());
}
                            if (Control == 1)
                            {
if (MyChar.Agi >= 1)// <--- Make it check agility since it's always needed
REALLOT
}
}
Horrible example code but just gives an idea...

Make it check for the Agi attribute point (since it's always needed) if it's greater than or equal to 1 then have it reallot..
n0mansland is offline  
Thanks
1 User
Old 07/22/2009, 02:32   #5
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
I thought i already gave you it... lol
f0am is offline  
Thanks
1 User
Old 07/22/2009, 02:43   #6
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
i dont use LOTF but i can continue n0mansland Code

//REALLOT
if (Control == 1)
{
MyChar.StatePoints+=MyChar.Agi;MyChar.StatePoints+ =MyChar.Str;
MyChar.StatePoints+=MyChar.Vit;MyChar.StatePoints+ =MyChar.Spi;
MyChar.Agi=2;MyChar.Str=3;MyChar.Vit=5;MyChar.Stat ePoints-=10;

// Then Send this attributes
}

i think some Vitals or so, i dont know what packets ur source use , and also notice that u may need to chang some vars i give as an example to whatever ur source calls them
samehvan is offline  
Thanks
1 User
Old 07/22/2009, 02:44   #7
 
elite*gold: 0
Join Date: May 2009
Posts: 56
Received Thanks: 4
code for reallot stats

search for
if (CurrentNPC == 278) in client.cs
above it add


Code:
if (CurrentNPC == 9548)//Reallot Stats
                            {
                                SendPacket(General.MyPackets.NPCSay("Reborn players who are level 70 or higher can redistribute their attribute points at the cost of a Dragonball."));
                                SendPacket(General.MyPackets.NPCLink("I will reallot my points.", 1));
                                SendPacket(General.MyPackets.NPCLink("Let me think it over.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
then search for
if (CurrentNPC == 278) again
above it add
Code:
if (CurrentNPC == 9548)
                                if (Control == 1)
                                {
                                    if (MyChar.RBCount >= 1)
                                    {
                                        if (MyChar.InventoryContains(1088000, 1))
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(1088000));

                                            uint Points = 0;

                                            Points += MyChar.Str;
                                            Points += MyChar.Spi;
                                            Points += MyChar.Agi;
                                            Points += MyChar.Vit;

                                            MyChar.StatP += (ushort)Points;

                                            MyChar.Str = 0;
                                            MyChar.Spi = 0;
                                            MyChar.Agi = 0;
                                            MyChar.Vit = 0;

                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 16, MyChar.Str));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 17, MyChar.Agi));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 15, MyChar.Vit));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 14, MyChar.Spi));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 5, (ulong)MyChar.Exp));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 2, MyChar.MaxMana()));
                                            SendPacket(General.MyPackets.GeneralData((long)MyChar.UID, 0, 0, 0, 92));
                                            SendPacket(General.MyPackets.Vital((long)MyChar.UID, 0, MyChar.CurHP));
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 11, MyChar.StatP));

                                            MyChar.SaveStatPoints();
                                            MyChar.Save();
                                            SendPacket(General.MyPackets.NPCSay("You can either reallot your stats manually."));
                                            SendPacket(General.MyPackets.NPCSay(" Command Breakdown: /allot [vit, str, agi, spi] [Amount to ADD to the Stat]"));
                                            SendPacket(General.MyPackets.NPCLink("I see, Thanks.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You don't have a Dragonball."));
                                            SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You cannot reallot your attribute points if you aren't reborn."));
                                        SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
then on character.cs search for
public void PackSkills()
above it add

Code:
public void SaveStatPoints()
        {
            if (MyClient.There)
                if (MyClient.Online)
                    DataBase.SaveChar(this);
        }
and thats about it i hope it helps
pajar22 is offline  
Thanks
1 User
Old 07/22/2009, 02:54   #8
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Guys already gave him and i also gave him a command so it works >< gos.
f0am is offline  
Old 07/22/2009, 03:40   #9
 
elite*gold: 0
Join Date: Nov 2007
Posts: 128
Received Thanks: 80
foam gave me one already. Thank you so much for the help.
nestreys is offline  
Reply


Similar Threads Similar Threads
[Request] How Change Mode Stat Points and Skill Points?
05/09/2013 - Shaiya - 49 Replies
How do i change MODE Stat Points and Skill Points per level? Ex.: Ultimate Mode: 7 Stat Points - want to change it to 14 Stat Points 4 Skill Points - want to change it to 8 Skill Points Thanks for your attention.
[Request/HELP] no pk points in pka
06/18/2009 - CO2 Private Server - 16 Replies
Hi, Anyone can help me out here for no pk points and no flashing in pk arena? If someone can guide, then maybe i can make the rest of it like jail, Guild Area, or anywhere else i can specify on the code... Thanks. thanks. thanks.
[Request]Revive points
06/14/2009 - CO2 Private Server - 18 Replies
Hello everyone...does someone have all revive points? If so, can you post them?
[Request] How to add revive points?
11/06/2008 - CO2 Private Server - 4 Replies
Hi everyone, I would like to know how to add/change revive points. If anyone knows how please post it here.



All times are GMT +1. The time now is 06:02.


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.