[Release] Some needed stuff for Coemu

10/19/2009 10:58 12tails#196
another system.....

but i will try your system....

and thanks for the help : D

i will try the mobs thing...... because it's only in MC where i got crash....
10/19/2009 14:51 ImmortalYashi#197
Important:

Break through ?!

[Only registered and activated users can see links. Click Here To Register...]
muhauhauh?
10/19/2009 14:53 Kiyono#198
Quote:
Originally Posted by ImmortalYashi View Post
Important:

Break through ?!
muhauhauh?
Grats?
10/19/2009 14:55 ImmortalYashi#199
Lawl thx i'm going 5150+
10/20/2009 19:47 arab4life#200
Few Questions, I got most them working..but these...

*-Ethereal


This Goes In NPCTALK.CS
Quote:
#region Ethereal //Enchanted & +10 Man
case 450: //Ethereal
{
if (LinkBack == 0)
{
Text("Hey sweety, what is up ?", CSocket);
Text("\n I can help you having some extra HP", CSocket);
Text("\n reduce the damage on you", CSocket);
Text("\n or upgrade your gears 10-12", CSocket);
Link("Enchant my gears", 1, CSocket);
Link("Bless my gears", 2, CSocket);
Link("Compose my gears", 3, CSocket);
Link("Nothing, l8er :P", 255, CSocket);
Face(55, CSocket);
End(CSocket);
}
else if (LinkBack == 1) CSocket.Send(ConquerPacket.Enchant(CSocket.Client. ID));
else if (LinkBack == 2)
.
.
.
}
break;
}
#endregion
Then it states that...and for Ethereal you will need the Enchant packet (put it anywhere under Packets folder In which file does this go in?
Quote:
public static byte[] Enchant(int PlayerID)
{
PacketBuilder Packet = new PacketBuilder(1010, 24);
Packet.Int(64);
Packet.Int(3);
Packet.Int(170);
Packet.Int(99);
Packet.Long(PlayerID);
Packet.Long(1091);
Packet.Int(223);
Packet.Int(0);
Packet.Int(58);
Packet.Int(1);
Packet.Short(7);
Packet.Short(116);
return Packet.getFinal();
}
last but not least...and then add this code under PacketProcessor.cs packet type 1009 i know it goes in the packetprocessor but where?

Quote:
case 28://Enchant
{
int ItemId = ReadLong(Data, 4); int GemID = ReadLong(Data, 8);
byte GemType = 0; byte EnchantToGive = 0;
if (CSocket.Client.Inventory.ContainsKey(ItemId))
{
if (CSocket.Client.Inventory.ContainsKey(GemID))
{
GemType = (byte)(CSocket.Client.Inventory[GemID].ItemID - 700000);
if (GemType.ToString().EndsWith("1")) EnchantToGive = (byte)Nano.Rand.Next(5, 50);
else if (GemType.ToString().EndsWith("2")) EnchantToGive = (byte)Nano.Rand.Next(50, 150);
else if (GemType == 13) EnchantToGive = (byte)Nano.Rand.Next(210, 255);//SDG
else if (GemType.ToString().EndsWith("3")) EnchantToGive = (byte)Nano.Rand.Next(150, 225);
if (EnchantToGive > 0)
{
Handler.DeleteItem(CSocket.Client.Inventory[GemID].ItemID, 1, CSocket);
if (CSocket.Client.Inventory[ItemId].Enchant <= EnchantToGive)
{
CSocket.Client.Inventory[ItemId].Enchant = EnchantToGive; Struct.ItemInfo NewIt = CSocket.Client.Inventory[ItemId];
CSocket.Send(ConquerPacket.ItemUsage(NewIt.UID, 0, Struct.ItemUsage.UpdateItem));
CSocket.Send(ConquerPacket.ItemInfo(CSocket.Client .Inventory[ItemId]));
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Waw you Gain extra HP by " + EnchantToGive, Struct.ChatType.Top));
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your gem gave a lower Enchanted than that ur item has , Better luck next time!", Struct.ChatType.Top));
}
}
}
else
{
CSocket.Send(ConquerPacket.Chat(0, "System", "you", "Cant find the gem", Struct.ChatType.Top));
}
}
else CSocket.Send(ConquerPacket.Chat(0, "System", "you", "Cant find the Item", Struct.ChatType.Top));
break;
}

Thank You for your help



Also some NPC when i added them...it gives me this

Error 1 The name 'HasItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6810 33 CoEmu v2 GameServer

Error 2 The name 'DeleteItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6812 33 CoEmu v2 GameServer

Error 5 The name 'UpDateItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6849 37 CoEmu v2 GameServer
10/20/2009 21:33 samehvan#201
Quote:
Originally Posted by arab4life View Post
Few Questions, I got most them working..but these...

*-Ethereal


This Goes In NPCTALK.CS


Then it states that...and for Ethereal you will need the Enchant packet (put it anywhere under Packets folder In which file does this go in?


last but not least...and then add this code under PacketProcessor.cs packet type 1009 i know it goes in the packetprocessor but where?




Thank You for your help



Also some NPC when i added them...it gives me this

Error 1 The name 'HasItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6810 33 CoEmu v2 GameServer

Error 2 The name 'DeleteItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6812 33 CoEmu v2 GameServer

Error 5 The name 'UpDateItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 6849 37 CoEmu v2 GameServer
*-for enchant put it at any file under Packets folder , when u open your source u will c some yellow folders one of them is Packets when u click on it some files will appear put the enchant packet to one of them
*-for the PacketProcessor search for
Code:
case 27://Reply to ping
and put my code be4 it

*-the other 3 errors check the first post again , the first code contains the 3 voids
10/21/2009 00:33 arab4life#202
Thank you, i o u 1
10/21/2009 02:08 samehvan#203
Quote:
Originally Posted by arab4life View Post
Thank you, i o u 1
no problem at all , we are here to help or ask for help ,any time bro
10/21/2009 02:31 ImmortalYashi#204
Samehvan i got important news if you just did login on msn..
10/21/2009 02:45 samehvan#205
Quote:
Originally Posted by ImmortalYashi View Post
Samehvan i got important news if you just did login on msn..
i am on it
10/21/2009 04:05 arab4life#206
Just wanted to say something about samehvan

The best person alive!

Thats all.
10/21/2009 08:05 arab4life#207
I was trying to add shop boy

Quote:
Error 1 The name 'UpDateItem' does not exist in the current context E:\GameStart\coemu\CoEmu v2 GameServer\Handlers\NpcTalk.cs 7050 37 CoEmu v2 GameServer

NVM Fixed
10/21/2009 09:27 gad-legion#208
Code:
        public static void UpDateItem(Struct.ItemInfo Item, ClientSocket CSocket)
        {
            if (Item.UID == 0)
            {
                Item.UID = Nano.Rand.Next(1, 9999999);
                bool created = Database.Database.NewItem(Item, CSocket);
                while (!created)
                {
                    Item.UID = Nano.Rand.Next(1, 9999999);
                    created = Database.Database.NewItem(Item, CSocket);
                }

                CSocket.Client.Inventory.Add(Item.UID, Item);
                CSocket.Send(ConquerPacket.ItemInfo(Item));
            }
            else
            {
                CSocket.Send(ConquerPacket.ItemUsage(Item.UID, Item.Position, Struct.ItemUsage.UpdateItem));
                CSocket.Send(ConquerPacket.ItemInfo(Item));
                Database.Database.UpdateItem(Item);
            }
        }
10/21/2009 09:31 sawickas#209
How add timer and makę start up iwents in time?
10/21/2009 12:40 lukejonesy#210
Quote:
Originally Posted by ImmortalYashi View Post
Important:

Break through ?!

dude! how'd you do that!!!!
whoa! well done!