|
You last visited: Today at 13:47
Advertisement
Help with reset attributes NPC.
Discussion on Help with reset attributes NPC. within the CO2 Private Server forum part of the Conquer Online 2 category.
08/07/2009, 19:03
|
#1
|
elite*gold: 0
Join Date: Aug 2006
Posts: 323
Received Thanks: 14
|
Help with reset attributes NPC.
Ok, It resets the attributes but doesnt add statpoints or refresh maxhealth and im assuming it doesnt refresh statpoints.
I have
Code:
if (Control == 4)
{
DataBase.GetStats(MyChar);
MyChar.MinAtk = MyChar.Str;
MyChar.MaxAtk = MyChar.Str;
MyChar.MaxHP = MyChar.BaseMaxHP();
int StatTotal = MyChar.Str + MyChar.Agi + MyChar.Vit + MyChar.Spi;
MyChar.Str = 0;
MyChar.Agi = 0;
MyChar.Vit = 0;
MyChar.Spi = 0;
MyChar.StatP += ushort.Parse(Convert.ToString(StatTotal));
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 0, MyChar.StatP));
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 0, MyChar.MaxHP));
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 13, MyChar.Level));
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, 0, MyChar.CurHP));
SendPacket(General.MyPackets.Vital((long)MyChar.UID, 2, MyChar.MaxMana()));
SendPacket(General.MyPackets.GeneralData((long)MyChar.UID, 0, 0, 0, 92));
if (MyChar.MyGuild != null)
MyChar.MyGuild.Refresh(MyChar);
}
|
|
|
08/07/2009, 19:07
|
#2
|
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
|
Here is mine works fine
HTML Code:
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 cannot reallot your stats manually, Please use the /allot command."));
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());
}
}
}
|
|
|
08/07/2009, 19:17
|
#3
|
elite*gold: 0
Join Date: Aug 2006
Posts: 323
Received Thanks: 14
|
Yay! my SaveStatPoints works great as does your script.
Thanks
|
|
|
 |
Similar Threads
|
Attributes
08/08/2010 - Lineage 2 - 7 Replies
How to see the atributes of people i know there is a program whitch tell you the atribute when the other atack you but i dont know the name of that program.
Also if there is other way tell me please.
|
Best way of training base attributes
06/04/2010 - General Gaming Discussion - 1 Replies
STR: Logging
VIT: Mining
DEX: Throwing, not archery! Archery is the cheapest way to raise Dex, but it's way slower.
QCK: Riding
INT: Casting
WIS: Fishing and Cooking (they go together). Herb Gathering is slower on WIS, but gives a little int as well.
(from Narcowski, thx!)
|
Attributes (STR,AGI,VITAL,SPT)
10/12/2009 - Conquer Online 2 - 5 Replies
What is Strength for :
(Does it add Physical Attack or its only for being able to equip stuff)
What is Agility for:
(Does it help you make Physical Attacks or its only for being able to equip stuff)
What is Vitality for:
(I know this is for higher life)
What is Spirit for:
(I know its for higher mana but does it add magic attacks)
Every1 will get a Thanks for contributing xD
|
How many Overall Attributes should this have?
07/19/2008 - Conquer Online 2 - 3 Replies
How many Overall Attributes should a 130-130-89 Troj-Warr-Warr have? Someone trying to sell me 1 with 160 Strenth, 50 Agility, 95 Vitality. Is this the correct stats for what its advertised as or?
Sounds wrong too me... any opinions?
|
attributes
03/22/2008 - Conquer Online 2 - 5 Replies
hi guys!can any1 give me a few hints how to attribute my points for 2ndrb 130-130-113 fire?if i distribue them with a db in mkt,can i do it a 2nd time?i might sound like a noob(i might b)but i am too busy plvlin and im not very social in game:cool:
|
All times are GMT +1. The time now is 13:48.
|
|