[Help] Mets

08/31/2009 20:56 Zkiller110#1
what would the codeing look like to be able to right click a meteor and have it turn into a metpack? i did this and it says This items's use is not implemented yet.

Code:
            if (ItemParts[0] == "1088001")
            {
                if (ItemsInInventory <= 39)
                {
                    AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    RemoveItem(ItemUID);
                }
            }
i only used 1 met because im not sure how to set it up so u need 10 mets to make a scroll
08/31/2009 21:23 _xTreme_#2
Quote:
Originally Posted by Zkiller110 View Post
what would the codeing look like to be able to right click a meteor and have it turn into a metpack? i did this and it says This items's use is not implemented yet.

Code:
            if (ItemParts[0] == "1088001")
            {
                if (ItemsInInventory <= 39)
                {
                    AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    RemoveItem(ItemUID);
                }
            }
i only used 1 met because im not sure how to set it up so u need 10 mets to make a scroll
Why not just code Millionaire Lee to scroll 10 DBs and/or meteors?
08/31/2009 21:30 Zkiller110#3
Quote:
Originally Posted by _xTreme_ View Post
Why not just code Millionaire Lee to scroll 10 DBs and/or meteors?
he is already coded to pack mets and dbs i just wanted to make it faster so you dont have togo to the Millionaire Lee. and it is not only that code that doesnt work any item that i add and want to do somthing when you right click it comes up with the same message
08/31/2009 22:32 kinshi88#4
Here's mine from CoEmu v2.
Easy to convert to Lotf.

Code:
                case 1088001:
                    {
                        if (Calculation.InventoryContains(1088001, 10, CSocket))
                        {
                            int Count = 0;
                            while (Calculation.InventoryContains(1088001, 10, CSocket))
                            {
                                Calculation.DeleteItem(1088001, 10, CSocket);
                                Calculation.GetItem(CSocket, 720027, 0, 0, 0, 0, 0, 0, 0, 1);
                                Count++;
                            }
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, (Count * 10) + " Meteors packed into " + Count + " MeteorScroll(s).", Struct.ChatType.Top));
                        }
                        if (Calculation.InventoryContains(1088001, 5, CSocket))
                        {
                            int Count = 0;
                            while (Calculation.InventoryContains(1088001, 5, CSocket))
                            {
                                Calculation.DeleteItem(1088001, 5, CSocket);
                                Calculation.GetItem(CSocket, 723268, 0, 0, 0, 0, 0, 0, 0, 1);
                                Count++;
                            }
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, (Count * 5) + " Meteors packed into " + Count + " MeteorBox(es).", Struct.ChatType.Top));
                        }
                        break;
                    }
09/01/2009 02:53 Zkiller110#5
Quote:
Originally Posted by kinshi88 View Post
Here's mine from CoEmu v2.
Easy to convert to Lotf.

Code:
                case 1088001:
                    {
                        if (Calculation.InventoryContains(1088001, 10, CSocket))
                        {
                            int Count = 0;
                            while (Calculation.InventoryContains(1088001, 10, CSocket))
                            {
                                Calculation.DeleteItem(1088001, 10, CSocket);
                                Calculation.GetItem(CSocket, 720027, 0, 0, 0, 0, 0, 0, 0, 1);
                                Count++;
                            }
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, (Count * 10) + " Meteors packed into " + Count + " MeteorScroll(s).", Struct.ChatType.Top));
                        }
                        if (Calculation.InventoryContains(1088001, 5, CSocket))
                        {
                            int Count = 0;
                            while (Calculation.InventoryContains(1088001, 5, CSocket))
                            {
                                Calculation.DeleteItem(1088001, 5, CSocket);
                                Calculation.GetItem(CSocket, 723268, 0, 0, 0, 0, 0, 0, 0, 1);
                                Count++;
                            }
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, (Count * 5) + " Meteors packed into " + Count + " MeteorBox(es).", Struct.ChatType.Top));
                        }
                        break;
                    }
the only think that i c that might make a difference is the case 1088001: part the rest seems to say the same think as yours
09/01/2009 04:28 killermickle#6
Quote:
Originally Posted by Zkiller110 View Post
he is already coded to pack mets and dbs i just wanted to make it faster so you dont have togo to the Millionaire Lee. and it is not only that code that doesnt work any item that i add and want to do somthing when you right click it comes up with the same message
Take a look at millionaire lee's code.

You should be able to figure it out.
09/01/2009 22:07 Zkiller110#7
Quote:
Originally Posted by killermickle View Post
Take a look at millionaire lee's code.

You should be able to figure it out.
i looked at his code for packing mets not much help since his codeing is in client.cs and the use items section is in character.cs i dont get ythe items sitll says item use not implemented here is the start of the section that i am putting the item in and a met scroll that i copyed off of anyone know y i cant change my met into a met scroll by right clicking it in my inventory?

Code:
        public void UseItem(ulong ItemUID, string Item)
        {
            Ready = false;
            string[] ItemParts = Item.Split('-');
            #region Meteor
            if (ItemParts[0] == "720027")//MetScroll
            {
                if (ItemsInInventory <= 30)
                {
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    RemoveItem(ItemUID);
                }
            }
            if (ItemParts[0] == "1088001")//Meteor

            {
                if (ItemsInInventory <= 39)
                {
                    AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(346623472));
                    RemoveItem(ItemUID);
                }
            }
            #endregion
       }
09/02/2009 21:39 Zkiller110#8
Bump can anyone help me??
09/02/2009 21:44 _xTreme_#9
What source are you using?
09/02/2009 23:05 killermickle#10
Code:
            if (ItemParts[0] == "1088001") // If met is right clicked.
            {
                if (InventoryContains(1088001, 10)) // and user has atleast 10 mets
                {
                    RemoveItem(ItemNext(1088001)); // remove 10 mets
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    RemoveItem(ItemNext(1088001));
                    AddItem("720027-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836)); // add metscroll - metpack id is 721510. unsure of which you wanted...
                }
                else // if user has below 10 mets
                {
                    MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "You do not have 10 meteors.", 2005));
                }
            }
09/02/2009 23:20 ~Yuki~#11
lotf