well here are my codes... its basic from LOTF but i'm getting error..
this i put on character.cs:
Code:
public uint[] Equips_UIDs = new uint[10];
public string[] Equips = new string[10];
Code:
case 1010:
{
if (LinkBack == 0)
{
Text("Hello, i can make the first and the seccond socket to an item for CPs!! chose what do you wan't!", CSocket);
Link("1ST-Socket", 1, CSocket);
Link("2ND-Socket", 2, CSocket);
Link("Just passing by", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
Text("Choose what do you want the first socket to be created in.",CSocket);
Link("Headgear", 3,CSocket);
Link("Necklace/ bag", 4,CSocket);
Link("Armor/ gown", 5,CSocket);
Link("Ring/ bracelet", 6,CSocket);
Link("Boots", 7,CSocket);
Link("Just passing by.", 255,CSocket);
Face(30,CSocket);
End(CSocket);
}
else if (LinkBack == 2)
{
Text("Choose what do you want the second socket to be created in.", CSocket);
Link("Headgear", 3, CSocket);
Link("Necklace/ bag", 4, CSocket);
Link("Armor/ gown", 5, CSocket);
Link("Ring/ bracelet", 6, CSocket);
Link("Boots", 7, CSocket);
Link("Just passing by.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 3 || LinkBack == 4 || LinkBack == 5 || LinkBack == 6 || LinkBack == 7)
{
int into = 0;
if (LinkBack == 3 && CSocket.Client.Equips[1] != null && CSocket.Client.Equips[1] != "0")
into = 1;
else if (LinkBack == 4 && CSocket.Client.Equips[2] != null && CSocket.Client.Equips[2] != "0")
into = 2;
else if (LinkBack == 5 && CSocket.Client.Equips[3] != null && CSocket.Client.Equips[3] != "0")
into = 3;
else if (LinkBack == 6 && CSocket.Client.Equips[6] != null && CSocket.Client.Equips[6] != "0")
into = 6;
else if (LinkBack == 7 && CSocket.Client.Equips[8] != null && CSocket.Client.Equips[8] != "0")
into = 8;
else
return;
if (CSocket.Client.CPs > 2580)
{
int soc1 = 0;
string[] item = CSocket.Client.Equips[into].Split('-');
if (item[4] != "0")
return;
CPs(-2580, CSocket);
soc1 = 1;
item[4] = "255";
CSocket.Client.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
CSocket.Send(ConquerPacket.AddItem((long)CSocket.Client.Equips_UIDs[into], int.Parse(item[0]), byte.Parse(item[1]), byte.Parse(item[2]), byte.Parse(item[3]), byte.Parse(item[4]), byte.Parse(item[5]), (byte)into, 100, 100));
}
else
{
Text("You don't have 2580 CPs!", CSocket);
Link("I see.", 255,CSocket);
Face(30,CSocket);
End(CSocket);
}
}
else if (LinkBack == 8 || LinkBack == 9 || LinkBack == 10 || LinkBack == 11 || LinkBack == 12)
{
int into = 0;
if (LinkBack == 8 && CSocket.Client.Equips[1] != null && CSocket.Client.Equips[1] != "0")
into = 1;
else if (LinkBack == 9 && CSocket.Client.Equips[2] != null && CSocket.Client.Equips[2] != "0")
into = 2;
else if (LinkBack == 10 && CSocket.Client.Equips[3] != null && CSocket.Client.Equips[3] != "0")
into = 3;
else if (LinkBack == 11 && CSocket.Client.Equips[6] != null && CSocket.Client.Equips[6] != "0")
into = 6;
else if (LinkBack == 12 && CSocket.Client.Equips[8] != null && CSocket.Client.Equips[8] != "0")
into = 8;
else
return;
if (CSocket.Client.CPs > 13230)
{
int soc2 = 0;
string[] item = CSocket.Client.Equips[into].Split('-');
if (item[5] != "0" || item[4] == "0")
return;
CPs(-13230, CSocket);
soc2 = 2;
item[5] = "255";
CSocket.Client.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
CSocket.Send(ConquerPacket.AddItem((long)CSocket.Client.Equips_UIDs[into], int.Parse(item[0]), byte.Parse(item[1]), byte.Parse(item[2]), byte.Parse(item[3]), byte.Parse(item[4]), byte.Parse(item[5]), (byte)into, 100, 100));
}
else
{
Text("You don't have the 13230 CPs!", CSocket);
Link("I see.", 255, CSocket);
Face(30, CSocket);
}
}
break;
}
Edit:
forgot the image..






