[Release] CoEmuv2 .. Stuff

08/02/2009 06:30 taylor2846#1
First Plz release all you can for coemu such as any items npcs skills what ever if it is not alredy released release it plz it will save us all lots of time.. and becaz no one seem no no how to dye armor black and stuff from a npc im Releaseign how and plz if someone can release to me the npc for socing items dont remember his name and Magic Artisan and the guy for upgrading item level and quality with mets a db's.. plz^^.. any way.


edit your database.cs update item code to this

Code:
		public static void UpdateItem(Struct.ItemInfo Item)
		{
            MySqlCommand Cmd = new MySqlCommand("UPDATE `items` SET `ItemID` = " + Item.ItemID + ", `Position` = " + Item.Position + ", `Minus` = " + Item.Bless + ", `Plus` = " + Item.Plus + ", `Progress` = " + Item.Progress + ", `Enchant` = " + Item.Enchant + ", `Soc1` = " + Item.Soc1 + ", `Soc2` = " + Item.Soc2 + ", `Dura` = " + Item.Dura + ", `MaxDura` = " + Item.MaxDura + ", `Color` = " + Item.Color + " WHERE `ItemUID` = \"" + Item.UID + "\"", DatabaseConnection.NewConnection());
			Cmd.ExecuteNonQuery();
			Cmd.Connection.Close();
			Cmd.Connection.Dispose();
			Cmd.Dispose();
		}
and now black tolip
Code:
                case 723584://BlackTulip
                    {
                        if (CSocket.Client.Equipment.ContainsKey(3))
                        {
                            Struct.ItemInfo itm = CSocket.Client.Equipment[3];
                            itm.Color = 2;
                            CSocket.Send(ConquerPacket.ItemInfo(itm.UID, itm.ItemID, itm.Plus, itm.Progress, itm.Bless, itm.Enchant, itm.Soc1, itm.Soc2, itm.Dura, itm.MaxDura, itm.Position, itm.Color));
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Your Armor is now black!", Struct.ChatType.Top));
                            Database.Database.UpdateItem(itm);
                        }
                        else
                        {
                            Delete = false;
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You Have no armor on dont wast the item", Struct.ChatType.Top));
                        }
                        break;
                    }
ok and now so you can see item color on the groud in DropItem.cs edit
the code below
Code:
					CSocket.Send(ConquerPacket.ItemUsage(UID, 255, Struct.ItemUsage.RemoveItem));
to
Code:
					ConquerPacket.ToLocal(ConquerPacket.DropItem(IG.UID, IG.ItemID, IG.X, IG.Y, IG.Color), IG.X, IG.Y, IG.Map, 0, 0);
ok now in Item.cs edit CopyItem to this

Code:
			public void CopyItem(ItemInfo Item)
			{
				Bless = Item.Bless;
				Dura = Item.Dura;
				Enchant = Item.Enchant;
				ItemID = Item.ItemID;
				MaxDura = Item.MaxDura;
				Plus = Item.Plus;
				Position = Item.Position;
				Soc1 = Item.Soc1;
				Soc2 = Item.Soc2;
                Color = Item.Color;
				UID = Item.UID;
			}
and edit Public class ItemInfo to this
Code:
		public class ItemInfo
		{
			public int UID;
			public int ItemID;
			public int Plus;
            public int Progress;
			public int Bless;
			public int Enchant;
			public int Soc1;
			public int Soc2;
			public int Dura;
			public int MaxDura;
			public int Position;
			public int Color = 4;
		}
------------
to upgrade item quality do something like this.
Code:
                                    if (Calculation.CanUpgrade(Convert.ToString(Item.ItemID)))
                                    {

                                        CSocket.Send(ConquerPacket.ItemUsage(Item.UID, 255, Struct.ItemUsage.RemoveItem));
                                        if (Calculation.Quality(Convert.ToString(Item.ItemID)) == 3 || Calculation.Quality(Convert.ToString(Item.ItemID)) == 4)
                                            Item.ItemID += 6 - Calculation.Quality(Convert.ToString(Item.ItemID));
                                        else
                                        {
                                            Item.ItemID += 1;
                                        }
                                        Database.Database.UpdateItem(Item);
                                        CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Progress, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
and to upgrade item level do something like this
Code:
                                    if (Calculation.CanUpgrade(Convert.ToString(Item.ItemID)))
                                    {
                                        Struct.ItemData item = Nano.Items[Item.ItemID];
                                        if (item.Level < 130)
                                        {
                                            if (CSocket.Client.Level <= Calculation.NextEquipLevel(Item.ItemID))
                                            {
                                                CSocket.Send(ConquerPacket.ItemUsage(Item.UID, 255, Struct.ItemUsage.RemoveItem));
                                                Item.ItemID = Calculation.NextEquipLevel(Item.ItemID);
                                                Database.Database.UpdateItem(Item);
                                                CSocket.Send(ConquerPacket.ItemInfo(Item.UID, Item.ItemID, Item.Plus, Item.Progress, Item.Bless, Item.Enchant, Item.Soc1, Item.Soc2, Item.Dura, Item.MaxDura, Item.Position, Item.Color));
ok i thank thats all i did .. plz note i have waxing oven so if you dont have it you will get some earrors
08/03/2009 06:13 CIRASH#2
did you code this Taylor?
08/03/2009 06:20 taylor2846#3
yes why? if i didnt i would have credits in it. i dont Release other people work unless they tell me to. why is no one replying or noting no ty's no replys noting is it relly that bad?
08/03/2009 06:36 CIRASH#4
I wouldnt say its bad. and the only reason i asked is yeah i see you release stuff but also you ask ALOT of questions and thats not a bad thing. So yeah i just didnt know if this was all from you xD
08/03/2009 06:52 taylor2846#5
lol..i do ask lots of Q.. but that is to learn.. i am probably the only one that ask Q and stuff that try to learn from it.. it wold be a lots easier if people helps lol and not just tell me to read i guide lol i don't understand guids that well that's why i ask Q.. thay thank i am just trying to get them to do the work for me but i do try to learn from every code i see on here and all Q.. that i ask
note im not saying no one helps lots on here helps but even more just trys to get you to stop asking Q..s lol but why not ask Q's and why not answer Q's if you can its they only way most can learn
08/03/2009 07:08 CIRASH#6
yeah im learning to code and i can usually fix errors easily nd all that and alot of people do help i agree. i have learned alot from reading many posts here and shit. but yeah i was just wondering if it was your code. +k for releasing