[help] with wuxing oven

06/03/2009 23:25 iamanoob#1
Hey guys I was just wondering if someone can point me in the right direction for coding the oven (to enchant gear/compose) on coemuv2 source. I checked out the sql's npc/direction but just occured to me that the window is npc link activated (at least it is on co) and that there are no other npcs that have a similar structure i can look at. any help would be great. thanks.
06/05/2009 16:10 Shayne93#2
Quote:
Originally Posted by iamanoob View Post
Hey guys I was just wondering if someone can point me in the right direction for coding the oven (to enchant gear/compose) on coemuv2 source. I checked out the sql's npc/direction but just occured to me that the window is npc link activated (at least it is on co) and that there are no other npcs that have a similar structure i can look at. any help would be great. thanks.
here here, i would love a little help, but alot of people are to stubborn to offer there knowledge and help, =/ so dont expect much lol
06/05/2009 17:33 yuko#3
compose
Code:
case 35016:
                    {
                        CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 1, 0, 0, 0, 0, Struct.DataType.Dialog));
                        break;
                    }
this is just to activate the windows.
i don't know how to read the final packet "2036"
Code:
[COLOR="Red"]case 2036:
                        {
                            Console.WriteLine("Composing");
                            break;
                        }[/COLOR]

                    default:
						{
							Console.WriteLine("[GameServer] Unknown packet type: " + Type);
							CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "[Handler-Error] Please report: Unable to handle packet type " + Type, Struct.ChatType.Top));
							break;
						}
06/05/2009 19:56 iamanoob#4
ooo okay that helps a ton ^^ tyvm
06/05/2009 21:10 felipeboladao#5
How to unable Stones IDs? to compose?
06/06/2009 15:25 yuko#6
for the time being i'll send what i got so far on the wix oven
Code:
case 2036:
                        {
                            int ItemUID = ReadLong(Data, 8);
							int Stone = ReadLong(Data, 12);
                            if (CSocket.Client.Inventory.ContainsKey(ItemUID) && CSocket.Client.Inventory.ContainsKey(Stone))
                            {
                                Struct.ItemInfo Item = CSocket.Client.Inventory[ItemUID];
                                Struct.ItemInfo PlusStone = CSocket.Client.Inventory[Stone];
                                if (Item.Plus < PlusStone.Plus)
                                {
                                    Item.Plus = PlusStone.Plus;
                                }
                                else if (Item.Plus == PlusStone.Plus)
                                {
                                    Item.Plus += 1;
//the problem here is that the client thinks it works with progression so you need 2 stones
//i'll add the progression when i get back 
                                }
                                Database.Database.UpdateItem(Item);
                                CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
                                CSocket.Send(ConquerPacket.ItemUsage(Stone, 255, Struct.ItemUsage.RemoveItem));
                                Database.Database.DeleteItem(Stone);
                                CSocket.Client.Inventory.Remove(Stone);
                            }
06/06/2009 20:08 Zeroxelli#7
[Only registered and activated users can see links. Click Here To Register...]