You last visited: Today at 05:54
Advertisement
Could someone convert this please?
Discussion on Could someone convert this please? within the CO2 Private Server forum part of the Conquer Online 2 category.
03/27/2012, 20:32
#1
elite*gold: 0
Join Date: Aug 2010
Posts: 28
Received Thanks: 1
Could someone convert this please?
Hey could someone convert this npc to work for project x source 5165
Code:
#region socker
case 794769468:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like me to make a socket in an item for you?"));
GC.AddSend(Packets.NPCSay(" You must prepare 10 Star Drills and the Gem you want to Socket."));
GC.AddSend(Packets.NPCSay(" Please make sure you only have ONE gem in your inventory."));
GC.AddSend(Packets.NPCLink("Socket Garment.", 10));
GC.AddSend(Packets.NPCLink("Socket Gourd.", 20));
GC.AddSend(Packets.NPCLink("Change Socket.", 1));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("I will only charge 1 StarDrill to change the socketed Gem."));
SendPacket(General.MyPackets.NPCSay(" Change which socket?"));
SendPacket(General.MyPackets.NPCLink("Garment.", 2));
SendPacket(General.MyPackets.NPCLink("Gourd.", 3));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2 || Control == 3)
{
string name = "Item";
if (Control == 2)
name = "Garment";
if (Control == 3)
name = "Gourd";
byte into = 0;
if (Control == 10 && MyChar.Equips[9] != null && MyChar.Equips[9] != "0")
into = 9;
else if (Control == 20 && MyChar.Equips[7] != null && MyChar.Equips[7] != "0")
into = 7;
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a " + name + " to socket!"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
if (MyChar.InventoryContains(1200006, 1))
{
string[] item = MyChar.Equips[into].Split('-');
if (item[4] != "0")
return;
if (GC.MyChar.InventoryContains(700001, 1))
item[4] = "01";
else if (GC.MyChar.InventoryContains(700002, 1))
item[4] = "02";
else if (GC.MyChar.InventoryContains(700003, 1))
item[4] = "03";
else if (GC.MyChar.InventoryContains(700011, 1))
item[4] = "11";
else if (GC.MyChar.InventoryContains(700012, 1))
item[4] = "12";
else if (GC.MyChar.InventoryContains(700013, 1))
item[4] = "13";
else if (GC.MyChar.InventoryContains(700021, 1))
item[4] = "21";
else if (GC.MyChar.InventoryContains(700022, 1))
item[4] = "22";
else if (GC.MyChar.InventoryContains(700023, 1))
item[4] = "23";
else if (GC.MyChar.InventoryContains(700031, 1))
item[4] = "31";
else if (GC.GC.MyChar.InventoryContains(700032, 1))
item[4] = "32";
else if (GC.GC.MyChar.InventoryContains(700033, 1))
item[4] = "33";
else if (GC.MyChar.InventoryContains(700041, 1))
item[4] = "41";
else if (GC.MyChar.InventoryContains(700042, 1))
item[4] = "42";
else if (GC.MyChar.InventoryContains(700043, 1))
item[4] = "43";
else if (GC.MyChar.InventoryContains(700051, 1))
item[4] = "51";
else if (GC.MyChar.InventoryContains(700052, 1))
item[4] = "52";
else if (GC.MyChar.InventoryContains(700053, 1))
item[4] = "53";
else if (GC.MyChar.InventoryContains(700061, 1))
item[4] = "61";
else if (GC.MyChar.InventoryContains(700062, 1))
item[4] = "62";
else if (GC.MyChar.InventoryContains(700063, 1))
item[4] = "63";
else if (GC.MyChar.InventoryContains(700071, 1))
item[4] = "71";
else if (GC.MyChar.InventoryContains(700072, 1))
item[4] = "72";
else if (GC.MyChar.InventoryContains(700073, 1))
item[4] = "73";
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a Gem to Socket."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
MyChar.RemoveItem(MyChar.ItemNext(uint.Parse("7000" + item[4])));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
SendPacket(General.MyPackets.AddItem((long)MyChar.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));
SendPacket(General.MyPackets.NPCSay("Your " + name + " has been socketed sucessfully!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("You don't have enough StarDrills."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (Control == 10 || Control == 20)
{
string name = "Item";
if (Control == 10)
name = "Garment";
if (Control == 20)
name = "Gourd";
byte into = 0;
if (Control == 10 && MyChar.Equips[9] != null && MyChar.Equips[9] != "0")
into = 9;
else if (Control == 20 && MyChar.Equips[7] != null && MyChar.Equips[7] != "0")
into = 7;
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a " + name + " to socket!"));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
if (MyChar.InventoryContains(1200006, 10))
{
string[] item = MyChar.Equips[into].Split('-');
if (item[4] != "0")
return;
if (MyChar.InventoryContains(700001, 1))
item[4] = "01";
else if (MyChar.InventoryContains(700002, 1))
item[4] = "02";
else if (MyChar.InventoryContains(700003, 1))
item[4] = "03";
else if (MyChar.InventoryContains(700011, 1))
item[4] = "11";
else if (MyChar.InventoryContains(700012, 1))
item[4] = "12";
else if (MyChar.InventoryContains(700013, 1))
item[4] = "13";
else if (MyChar.InventoryContains(700021, 1))
item[4] = "21";
else if (MyChar.InventoryContains(700022, 1))
item[4] = "22";
else if (MyChar.InventoryContains(700023, 1))
item[4] = "23";
else if (MyChar.InventoryContains(700031, 1))
item[4] = "31";
else if (MyChar.InventoryContains(700032, 1))
item[4] = "32";
else if (MyChar.InventoryContains(700033, 1))
item[4] = "33";
else if (MyChar.InventoryContains(700041, 1))
item[4] = "41";
else if (MyChar.InventoryContains(700042, 1))
item[4] = "42";
else if (MyChar.InventoryContains(700043, 1))
item[4] = "43";
else if (MyChar.InventoryContains(700051, 1))
item[4] = "51";
else if (MyChar.InventoryContains(700052, 1))
item[4] = "52";
else if (MyChar.InventoryContains(700053, 1))
item[4] = "53";
else if (MyChar.InventoryContains(700061, 1))
item[4] = "61";
else if (MyChar.InventoryContains(700062, 1))
item[4] = "62";
else if (MyChar.InventoryContains(700063, 1))
item[4] = "63";
else if (MyChar.InventoryContains(700071, 1))
item[4] = "71";
else if (MyChar.InventoryContains(700072, 1))
item[4] = "72";
else if (MyChar.InventoryContains(700073, 1))
item[4] = "73";
else
{
SendPacket(General.MyPackets.NPCSay("You don't have a Gem to Socket."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
return;
}
MyChar.RemoveItem(MyChar.ItemNext(uint.Parse("7000" + item[4])));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.RemoveItem(MyChar.ItemNext(1200006));
MyChar.Equips[into] = item[0] + "-" + item[1] + "-" + item[2] + "-" + item[3] + "-" + item[4] + "-" + item[5];
SendPacket(General.MyPackets.AddItem((long)MyChar.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));
SendPacket(General.MyPackets.NPCSay("Your " + name + " has been socketed sucessfully!"));
SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("You don't have enough StarDrills."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
break;
}
#endregion
Similar Threads
asm - convert.
01/15/2012 - General Coding - 5 Replies
Hi, can I ask you to rework it so that you can compile the Dev-C++
int getCharW(int Font, char* Name, int nAlign)
{
int TextLen = strlen(Name);
int nret = 0;
__asm
{
push nAlign
push TextLen
How do i convert JPG to DAT
02/23/2011 - SRO Private Server - 2 Replies
Hello, i've been editing media.pk2, i have exported some files in .DAT format from the media.pk2 and changed them to .JPG (to modify them) just by renaming .DAT to .JPG, but when i try to rename JPG back to DAT it stays as JPG file. so, how do i convert JPG to DAT?
[C++] how to convert dec to hex?
05/11/2009 - C/C++ - 1 Replies
I need to convert a decimal integer into hex.
The decimal integer is the value of a pointer and i need to get in hex to use it as a address for writeprocessmemory.
So is there any way to convert a dec into a hex and use the hex value as a argument for writeprocessmemory?
EDIT:meeh...forgot that the value is only displayed as decimal number -.-
/close plz
convert [help]
11/20/2008 - General Coding - 2 Replies
Hello guys,
I'm pretty new to stuff like reading Data out of games,such as warhammer. I found out the pointer + offset for the x / y / z / heading value right now and they're correct, found the same info in a forum, but my problem is, that in cheat engine it looks like this:
X =
Array of Byte = 55 6F 81 49
4bytes = 1233219413
float: 1060330.625
And I was wondering, how I can convert them in C# or in any other language, to get the correct value, which is telling me the x value.
All times are GMT +2. The time now is 05:54 .