Okay, so I've been skimming around like crazy trying to find ways of making this work, I've altered it quite a few times, but the majority of what I do won't get accepted by the source. I'm not a great coder, I know this. The coding here is basically LOTF, just altered, and some parts still based for LOTF. Say what you want, but learning how to transfer a few things from LOTF to work on here will help me to understand this source slightly better, so hopefully in the future, I won't need to reult in threads like this.
Here's what I have so far, red highlights are portions that aren't accepted.
If someone can enlighten me as to what would be appropriate for the specific sections highlighted, it would help me understand this a bit better.
I've already went over a few releases by others here, compaired to LOTF, as soe of them were altered from it, and I understand how they all work, wasn't much that had to be changed with them, but this in itself is confusing me.
Thanks in advance anyone who is willing to help.
Here's what I have so far, red highlights are portions that aren't accepted.
Code:
case 10064:// Tinter
{
if (LinkBack == 0)
{
Text("What would you like to dye?", CSocket);
Link("Armor.", 1, CSocket);
Link("Helmet.", 2, CSocket);
Link("Shield.", 3, CSocket);
Link("I'm think I'm good!", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1 || LinkBack == 2 || LinkBack == 3)
{
[COLOR="Red"]Color[/COLOR] = LinkBack;
Text("What Colour would you like to dye your armor?", CSocket);
Link("Orange", 4, CSocket);
Link("Light Blue", 5, CSocket);
Link("Red", 6, CSocket);
Link("Blue", 7, CSocket);
Link("Yellow", 8, CSocket);
Link("Purple", 9, CSocket);
Link("White", 10, CSocket);
End(CSocket);
}
else if (LinkBack == 4 || LinkBack == 5 || LinkBack == 6 || LinkBack == 7 || LinkBack == 8 || LinkBack == 9 || LinkBack == 10)
{
try
{
string[] item;
string[] item2 = null;
if (Color == 3)
item2 = CSocket.Client.Equipment[5].[COLOR="red"]Split[/COLOR]('-');
string newitem;
if (Color == 1 && CSocket.Client.Equipment[3] != null && [COLOR="red"]CSocket.Client.Equipment[3] != "0[/COLOR]")
item = CSocket.Client.Equipment[3].[COLOR="red"]Split[/COLOR]('-');
else if (Color == 2 && CSocket.Client.Equipment[1] != null && [COLOR="red"]CSocket.Client.Equipment[1] != "0[/COLOR]")
item = CSocket.Client.Equipment[1].[COLOR="red"]Split[/COLOR]('-');
else if (Color == 3)
if (CSocket.Client.Equipment[5] != null && [COLOR="red"]Other[/COLOR].WeaponType(uint.Parse(item2[0])) == 900)
item = CSocket.Client.Equipment[5].[COLOR="red"]Split[/COLOR]('-');
else
{
Text("You don't have a shield equipped.", CSocket);
Link("I'm sorry.", 255, CSocket);
End(CSocket);
}
else
return;
newitem = item[0];
newitem = newitem.Remove(newitem.Length - 3, 1);
if (LinkBack == 4)
newitem = newitem.Insert(newitem.Length - 2, "3");
if (LinkBack == 5)
newitem = newitem.Insert(newitem.Length - 2, "4");
if (LinkBack == 6)
newitem = newitem.Insert(newitem.Length - 2, "5");
if (LinkBack == 7)
newitem = newitem.Insert(newitem.Length - 2, "6");
if (LinkBack == 8)
newitem = newitem.Insert(newitem.Length - 2, "7");
if (LinkBack == 9)
newitem = newitem.Insert(newitem.Length - 2, "8");
if (LinkBack == 10)
newitem = newitem.Insert(newitem.Length - 2, "9");
if ([COLOR="red"]Color[/COLOR] == 1)
{
CSocket.Client.Equipment[3] = [COLOR="red"]newitem + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];[/COLOR]
CSocket.Send(ConquerPacket.ItemInfo(CSocket, 2, CSocket.Client.Equipment, Struct.[COLOR="red"]ItemInfo[/COLOR]));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter(CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
}
if ([COLOR="red"]Color[/COLOR] == 2)
{
CSocket.Client.Equipment[1] = [COLOR="red"]newitem + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];[/COLOR]
CSocket.Send(ConquerPacket.ItemInfo(CSocket, 2, CSocket.Client.Equipment, Struct.[COLOR="red"]ItemInfo[/COLOR]));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter(CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
}
if ([COLOR="red"]Color[/COLOR] == 3)
{
CSocket.Client.Equipment[5] = [COLOR="red"]newitem + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];[/COLOR]
CSocket.Send(ConquerPacket.ItemInfo(CSocket, 2, CSocket.Client.Equipment, Struct.[COLOR="red"]ItemInfo[/COLOR]));
ConquerPacket.ToLocal(ConquerPacket.SpawnCharacter(CSocket), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, CSocket.Client.ID);
}
[COLOR="red"]Color[/COLOR] = 0;
}
catch (Exception Exc) { [COLOR="red"]General[/COLOR].WriteLine(Convert.ToString(Exc)); }
}
}
I've already went over a few releases by others here, compaired to LOTF, as soe of them were altered from it, and I understand how they all work, wasn't much that had to be changed with them, but this in itself is confusing me.
Thanks in advance anyone who is willing to help.