|
You last visited: Today at 10:47
Advertisement
[LOTF]Help
Discussion on [LOTF]Help within the CO2 Private Server forum part of the Conquer Online 2 category.
08/31/2009, 16:29
|
#1
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
[LOTF]Help
What Is Wrong With This that for Some Reason It Dosent Want to +11 Rings
Code:
if (Control == 11)
{
SendPacket(General.MyPackets.NPCSay("Costs 200000 Cps. After Plusing Please Take Off The Item And Put It Back On. Which item do you want to +11?"));
SendPacket(General.MyPackets.NPCLink("+11 my helmet or earring.", 13));
SendPacket(General.MyPackets.NPCLink("+11 my necklace.", 14));
SendPacket(General.MyPackets.NPCLink("+11 my armor.", 15));
SendPacket(General.MyPackets.NPCLink("+11 my weapon.", 16));
SendPacket(General.MyPackets.NPCLink("+11 my ring, heavy ring.", 17));
SendPacket(General.MyPackets.NPCLink("+11 my boots.", 18));
SendPacket(General.MyPackets.NPCLink("+11 my shield.", 19));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 13 && Control <= 19)
{
if (MyChar.CPs >= 200000)
{
string TheEquip = "";
if (Control == 13)
TheEquip = MyChar.Equips[1];
if (Control == 14)
TheEquip = MyChar.Equips[2];
if (Control == 15)
TheEquip = MyChar.Equips[3];
if (Control == 16)
TheEquip = MyChar.Equips[4];
if (Control == 17)
TheEquip = MyChar.Equips[6];
if (Control == 18)
TheEquip = MyChar.Equips[8];
if (Control == 19)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 13)
Pos = 1;
if (Control == 14)
Pos = 2;
if (Control == 15)
Pos = 3;
if (Control == 16)
Pos = 4;
if (Control == 7)
Pos = 6;
if (Control == 18)
Pos = 8;
if (Control == 19)
Pos = 5;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewPlus = 11;
uint OldPlus = uint.Parse(Splitter[1]);
uint ReqPlus = 10;
if (OldPlus == ReqPlus)
{
MyChar.CPs -= 200000;
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + NewPlus + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
|
|
|
08/31/2009, 17:16
|
#2
|
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
|
This will work. Control 17 handles rings and as I noticed it said 7 rather than 17. Simple mistake, happens to everyone =p
Code:
if (Control == 11)
{
SendPacket(General.MyPackets.NPCSay("Costs 200000 Cps. After Plusing Please Take Off The Item And Put It Back On. Which item do you want to +11?"));
SendPacket(General.MyPackets.NPCLink("+11 my helmet or earring.", 13));
SendPacket(General.MyPackets.NPCLink("+11 my necklace.", 14));
SendPacket(General.MyPackets.NPCLink("+11 my armor.", 15));
SendPacket(General.MyPackets.NPCLink("+11 my weapon.", 16));
SendPacket(General.MyPackets.NPCLink("+11 my ring, heavy ring.", 17));
SendPacket(General.MyPackets.NPCLink("+11 my boots.", 18));
SendPacket(General.MyPackets.NPCLink("+11 my shield.", 19));
SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control >= 13 && Control <= 19)
{
if (MyChar.CPs >= 200000)
{
string TheEquip = "";
if (Control == 13)
TheEquip = MyChar.Equips[1];
if (Control == 14)
TheEquip = MyChar.Equips[2];
if (Control == 15)
TheEquip = MyChar.Equips[3];
if (Control == 16)
TheEquip = MyChar.Equips[4];
if (Control == 17)
TheEquip = MyChar.Equips[6];
if (Control == 18)
TheEquip = MyChar.Equips[8];
if (Control == 19)
TheEquip = MyChar.Equips[5];
byte Pos = 0;
if (Control == 13)
Pos = 1;
if (Control == 14)
Pos = 2;
if (Control == 15)
Pos = 3;
if (Control == 16)
Pos = 4;
if (Control == 17)
Pos = 6;
if (Control == 18)
Pos = 8;
if (Control == 19)
Pos = 5;
string[] Splitter = TheEquip.Split('-');
uint ItemId = uint.Parse(Splitter[0]);
uint NewPlus = 11;
uint OldPlus = uint.Parse(Splitter[1]);
uint ReqPlus = 10;
if (OldPlus == ReqPlus)
{
MyChar.CPs -= 200000;
MyChar.GetEquipStats(Pos, true);
MyChar.Equips[Pos] = ItemId.ToString() + "-" + NewPlus + "-" + Splitter[2] + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
MyChar.GetEquipStats(Pos, false);
MyChar.SendEquips(false);
SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
}
else
If it actually doesn't work for some reason just let me know and I'll look it over once more.
Don't forget to press *Thanks
|
|
|
08/31/2009, 17:32
|
#3
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
Lol maybe on how tired iam hope it works tho tnx Testint rite now
|
|
|
09/07/2009, 04:05
|
#4
|
elite*gold: 0
Join Date: Jun 2009
Posts: 361
Received Thanks: 98
|
Press thanks =p
|
|
|
|
Similar Threads
|
Help [LOTF]
09/14/2009 - CO2 Private Server - 2 Replies
OK this is for a LOTF SOurce and i want to know where can i start so PLayers that Are dead Other players Cant Click On them At all ! Any Help?
|
[HELP] Compile error with LOTF(i know LOTF sucks but just help)
06/19/2009 - CO2 Private Server - 3 Replies
It says:
Loaded 254 portals.
Loaded 1027 NPCs.
Loaded 37 mobs.
Loaded 11147 items.
Loaded 172 mob spawns.
System.ArgumentOutOfRangeException: 'minValue' cannot be greater then mxValue.
Parameter name : minValue
at System.Random.Next<Int32 minValue, Int32 maxValue>
at COServer_Project.Mobs.SpawnAllMobs<> in C:\Documents and Settings\Admin\My Documents\COServerProject1\COServerProject\Entitie s.cs:line 207
|
Lotf
03/30/2009 - CO2 Private Server - 2 Replies
Is tehre even away to fix login? in lotf
|
Lotf
07/22/2008 - Conquer Online 2 - 0 Replies
I have a question in lotf source their is a login bug like when the server go's online in a minute the login freezes anyone know how to fix that?
|
All times are GMT +2. The time now is 10:47.
|
|