This is just a nooby release for the Hairstyler npc and for hairdyes I just got working, I will add more on here as I finish them, be gentle this is my first release .
//Edit: Changed the title since I got it finished/fixed it myself
Add in this block of code somewhere in NpcTalk.cs
Quote:
case 10002:// Hairstyler
{
if (LinkBack == 0)
{
Text("Now i can offer three types of hairstyles: New styles, nostalgic styles and special styles. Would you like to cost 500 silvers to make a change?", CSocket);
Link("New styles.", 1, CSocket);
Link("Nostalgic styles.", 2, CSocket);
Link("Special styles.", 3, CSocket);
Link("Keep my current style.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 1 || LinkBack == 111)
{
Text("Which style would you like to choose from?", CSocket);
Link("New HairStyle01", 4, CSocket);
Link("New HairStyle02", 5, CSocket);
Link("New HairStyle03", 6, CSocket);
Link("New HairStyle04", 7, CSocket);
Link("New HairStyle05", 8, CSocket);
Link("New HairStyle06", 9, CSocket);
Link("New HairStyle07", 10, CSocket);
Link("Next.", 11, CSocket);
End(CSocket);
}
else if (LinkBack == 11)
{
Text("Which style would you like to choose from?", CSocket);
Link("New HairStyle08", 12, CSocket);
Link("New HairStyle09", 13, CSocket);
Link("New HairStyle10", 14, CSocket);
Link("New HairStyle11", 15, CSocket);
Link("New HairStyle12", 16, CSocket);
Link("Previous", 1, CSocket);
End(CSocket);
}
else if (LinkBack == 2 || LinkBack == 112)
{
if (LinkBack == 112)
{
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Hair, Struct.StatusTypes.HairStyle));
}
Text("Which style would you like to choose from?", CSocket);
Link("Nostalgic01", 17, CSocket);
Link("Nostalgic02", 18, CSocket);
Link("Nostalgic03", 19, CSocket);
Link("Nostalgic04", 20, CSocket);
Link("Nostalgic05", 21, CSocket);
Link("Nostalgic06", 22, CSocket);
Link("Nostalgic07", 23, CSocket);
Link("I changed my mind.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 3 || LinkBack == 113)
{
if (LinkBack == 113)
{
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Hair, Struct.StatusTypes.HairStyle));
}
Text("Which style would you like to choose from?", CSocket);
Link("Special01", 25, CSocket);
Link("Special02", 26, CSocket);
Link("Special03", 27, CSocket);
Link("Special04", 28, CSocket);
Link("Special05", 29, CSocket);
Link("I changed my mind.", 255, CSocket);
End(CSocket);
}
else if (LinkBack == 254)
{
if (CSocket.Client.Money >= 500)
{
Money(-500, CSocket);
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Hair, Struct.StatusTypes.HairStyle));
}
}
else if (LinkBack > 3 && LinkBack < 30 && LinkBack != 11)
{
if (CSocket.Client.Money >= 500)
{
Text("It's completed. Are you satisfied with your new hairstyle?", CSocket);
Link("Cool!", 254, CSocket);
if (LinkBack < 17)
Link("I want to change it.", 111, CSocket);
else if (LinkBack < 25)
Link("I want to change it.", 112, CSocket);
else if (LinkBack < 30)
Link("I want to change it.", 113, CSocket);
End(CSocket);
if (LinkBack == 4)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "30");
if (LinkBack == 5)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "31");
if (LinkBack == 6)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "32");
if (LinkBack == 7)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "33");
if (LinkBack == 8)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "34");
if (LinkBack == 9)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "35");
if (LinkBack == 10)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "36");
if (LinkBack == 12)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "37");
if (LinkBack == 13)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "38");
if (LinkBack == 14)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "39");
if (LinkBack == 15)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "40");
if (LinkBack == 16)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "41");
if (LinkBack == 17)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "11");
if (LinkBack == 18)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "12");
if (LinkBack == 19)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "13");
if (LinkBack == 20)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "14");
if (LinkBack == 21)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "15");
if (LinkBack == 22)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "16");
if (LinkBack == 23)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "17");
if (LinkBack == 24)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "10");
if (LinkBack == 25)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "21");
if (LinkBack == 26)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "22");
if (LinkBack == 27)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "23");
if (LinkBack == 28)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "24");
if (LinkBack == 29)
CSocket.Client.Hair = ushort.Parse(Convert.ToString(CSocket.Client.Hair)[0] + "25");
@Kiyono
yeah some one else released it after I did look at the date on mine and the others that was released, I did this awhile back but I don't think anyone saw it cause I named the thread wrong because I was stuck on something and was trying to get help but ended up fixing it myself.
Quote:
Originally Posted by arab4life
nice job
Thanks I was really bored when I did this lol but I'll try to code/release some other stuff too.
Guild deletion code error coemu... 03/03/2010 - CO2 Private Server - 0 Replies this codes written perfectly but i keep getting an error message...
public static void DeleteGuild(int ID)
{
if (Nano.Guilds.ContainsKey(ID))
{
Struct.GuildInfo GuToDel = Nano.Guilds;
foreach (int ChId in GuToDel.GMems)
{
try
{
coemu unreachable code?? 03/01/2010 - CO2 Private Server - 8 Replies foreach (KeyValuePair<int, Struct.GuildInfo> Gui in Nano.Guilds)
i checked this and it all seems good 0.0
Warning 1 Unreachable code detected C:...\PacketProcessor.cs 494 85 CoEmu v2 GameServer
dame XD
[REQUEST] Someone with knowlege of how to code into coemu 10/27/2009 - CO2 Private Server - 14 Replies Hey Guys, well i started CoEmu source, (the one andy released) iv implemented a hell of a lot of things, however i don't quite get some of the errors i encounter, i may pay somebody to teach me away around these codes, or how to just fix them, PM me please, it's very much appreciated.
[Tutorial][For who can't Code] Code Simple NPC (CoEmu) 10/15/2009 - CO2 Private Server - 13 Replies First i will release the npc and explain you alot of good things
The npc
Ok .. here is the npc jail in TwinCity (Enter the jail and go out the jail)
in Handlers / NpcTalk.cs Search for
default:
{
Text("NPC " + ID + "'s dialog is not coded.", CSocket);
[Help CoEmu V2] Lil help on a code 07/08/2009 - CO2 Private Server - 11 Replies Im still new to this but im creating an npc and i want to learn how to let it show text based on your level like:
Level 1 :
Hello lvl 1
Level 2:
Hello lvl 2
Level 3 :
Hello lvl 3