[Release] Some needed stuff for Coemu

08/29/2009 22:41 12tails#61
maybe is too much... but i wanna to ask if someone have skills like.... firecircle.. pervade... spirit healing meditation (spirit healing and meditation i already find here and posted by samehvan... but doesn't works for me )

if someone have and can... please can post it here ??
08/29/2009 23:33 samehvan#62
Quote:
Originally Posted by 12tails View Post
maybe is too much... but i wanna to ask if someone have skills like.... firecircle.. pervade... spirit healing meditation (spirit healing and meditation i already find here and posted by samehvan... but doesn't works for me )

if someone have and can... please can post it here ??
added to post 3
08/30/2009 00:13 12tails#63
samehvan...

i got this! take a look at the screen!
08/30/2009 00:35 samehvan#64
Quote:
Originally Posted by 12tails View Post
samehvan...

i got this! take a look at the screen!
add this to any Handlers class (mine at NPcTalk.cs)

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);
            }
        }
08/30/2009 00:52 12tails#65
just 1 problem left... that says do not contains the definition for UpdateItem on ConquerPacket... take a look!
08/30/2009 02:25 samehvan#66
Quote:
Originally Posted by 12tails View Post
just 1 problem left... that says do not contains the definition for UpdateItem on ConquerPacket... take a look!
replace those 3 lines with

Code:
                                                        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));
08/30/2009 04:22 12tails#67
samehvan...

some days ago you have released the 1 st rebornc script...

i'm making the 2nd reborn script... but i wan't to use the rebitens void into it too... to do not make again the reb itens for 2 rb ...

but i've found some little bugs that i can't solve them.... i alreay try... take a look at the original code:

Code:
        private static void RebItems(ClientSocket CSocket)
        {
            string CurItemId = "";//1=HeadG 2=NickG 3=Armor 4=RH 5=LH 6=Ring 7=MagicBottels 8=Boots 9=Garments
            if (CSocket.Client.Equipment.ContainsKey(1))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[1].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1);
                if (CurItemId == "118")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11800" + Qual;
                }
                else
                {
                    string Main = CurItemId.Remove(4, 2);
                    CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[1].ItemID = int.Parse(CurItemId);
                }
            }
            if (CSocket.Client.Equipment.ContainsKey(2))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[2].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[2].ItemID = int.Parse(CurItemId);
            }
            if (CSocket.Client.Equipment.ContainsKey(3))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[3].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
                if (int.Parse(Main) > 129 && int.Parse(Main) < 135)
                {
                    CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[3].ItemID = int.Parse(CurItemId);
                }
                else
                {
                    CurItemId = Convert.ToString((int.Parse(Main) - 50)) + "0" + Qual; CSocket.Client.Equipment[3].ItemID = int.Parse(CurItemId);
                }
            }
            if (CSocket.Client.Equipment.ContainsKey(4))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[4].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "02" + Qual; CSocket.Client.Equipment[4].ItemID = int.Parse(CurItemId);
            }
            if (CSocket.Client.Equipment.ContainsKey(5))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[5].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
                if (Main.StartsWith("900"))//Shield
                {
                    CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
                else if (Main.StartsWith("4") || Main.StartsWith("5"))
                {
                    Main = CurItemId.Remove(3, 3);
                    CurItemId = Convert.ToString((int.Parse(Main) - 50)) + "02" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
            }
            if (CSocket.Client.Equipment.ContainsKey(6))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[6].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[6].ItemID = int.Parse(CurItemId);
            }
            if (CSocket.Client.Equipment.ContainsKey(8))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[8].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[8].ItemID = int.Parse(CurItemId);
            }
            for (byte gg=1;gg<9;gg++)
            {
                if (CSocket.Client.Equipment.ContainsKey(gg))
                {
                    int Uid_ = CSocket.Client.Equipment[gg].UID;
                    ItemUnequip(gg, Uid_, CSocket);
                    ItemEquip(gg, Uid_, CSocket);
                }
            }

        }
there are bugs into reb the armor, reborn the left hand weapon, and the headgear.
so i tryed to make a little diferent things one of them is that:

Code:
            string CurItemId = "";//1=HeadG 2=NickG 3=Armor 4=RH 5=LH 6=Ring 7=MagicBottels 8=Boots 9=Garments
            if (CSocket.Client.Equipment.ContainsKey(1))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[1].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1);
                if (CurItemId == "110")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11000" + Qual;
                }
                else if (CurItemId == "111")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11100" + Qual;
                }
                else if (CurItemId == "1111")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11110" + Qual;
                }
                else if (CurItemId == "112")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11200" + Qual;
                }
                else if (CurItemId == "1121")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11210" + Qual;
                }
                else if (CurItemId == "113")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11300" + Qual;
                }
                else if (CurItemId == "1131")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11310" + Qual;
                }
                else if (CurItemId == "114")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11400" + Qual;
                }
                else if (CurItemId == "1141")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11410" + Qual;
                }
                else if (CurItemId == "115")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11500" + Qual;
                }
                else if (CurItemId == "1151")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11510" + Qual;
                }
                else if (CurItemId == "116")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11600" + Qual;
                }
                else if (CurItemId == "1161")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11610" + Qual;
                }
                else if (CurItemId == "117")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11700" + Qual;
                }
                else if (CurItemId == "1171")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11710" + Qual;
                }
                else if (CurItemId == "118")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11800" + Qual;
                }
                else if (CurItemId == "1181")
                {
                    string Main = CurItemId.Remove(3, 3);
                    CurItemId = "11810" + Qual;
                }
                else
                {
                    string Main = CurItemId.Remove(4, 2);
                    CurItemId = Main + "0" + Qual; CSocket.Client.Equipment[1].ItemID = int.Parse(CurItemId);
                }
and here again:

Code:
            if (CSocket.Client.Equipment.ContainsKey(5))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[5].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(4, 2);
                if (Main.StartsWith("900"))//Shield
                {
                    CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
                else if (Main.StartsWith("410") || Main.StartsWith("420") || Main.StartsWith("480") || Main.StartsWith("5") || Main.StartsWith("601"))
                {
                    CurItemId.Remove(0, CurItemId.Length - 1); Main = CurItemId.Remove(4, 2);
                    CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
            }
and the armor i have no idea how to fix (and the other two things i've posted are not fixed too, still trying to fix them..)

so if you or ANYONE here can help... i will over the 2nd reborn scrip and i will post it here....

i will sleep for now ... too tired... but feel free to post... tomorrow at the morning i will see what i can doo for it and with the help of you all!

tkx if someone help... cya!
08/30/2009 04:53 pro4never#68
Holy shit... Only read through some of the code but what I saw looked good.

You make me kinda sad that I already stopped with my server (but having gotten rid of my server machine AND leaving for university in a week is a good enough reason for me)

Lots of nice additions there though, would have been nice to implement/re-code my server using some of them (although I did have a fair number of them) Fairly sure yours are a bit less messy xD. I might go find my old random scroll code to post later when I'm pulling data off my old server machine if anyone wants it.


Quote:
Originally Posted by 12tails View Post
maybe is too much... but i wanna to ask if someone have skills like.... firecircle.. pervade... spirit healing meditation (spirit healing and meditation i already find here and posted by samehvan... but doesn't works for me )

if someone have and can... please can post it here ??


I had virtually all of the skills working but it required a shitload of re-coding the entire attack system (yay for me not having done that part) Unfortunately I'm fairly sure it's what lead to my servers main instabilities.... and the fact that there was some serious lock on bugs (easily fixed... but still, didn't have time to re-re-code the attack system)

Tfb/nado/other castable skills auto casting in pk mode is NOT a good thing rofl...
08/30/2009 12:36 Kiyono#69
I see that you finished socketing talismans ^^
08/30/2009 19:06 samehvan#70
Quote:
Originally Posted by Kiyono View Post
I see that you finished socketing talismans ^^
Ah yea , Fatal Strike is next :p ,God Help Us
08/30/2009 19:11 Kiyono#71
I've even tried removing and respawing the char at the mobs coords but everything failed, at some point I clicked on a mob and got teleported to TC lol
09/01/2009 03:10 samehvan#72
Quote:
Originally Posted by 12tails View Post
samehvan...

some days ago you have released the 1 st rebornc script...

i'm making the 2nd reborn script... but i wan't to use the rebitens void into it too... to do not make again the reb itens for 2 rb ...

but i've found some little bugs that i can't solve them.... i alreay try... take a look at the original code:


tkx if someone help... cya!
replace it with this one (tested 90% of different cases) but if u found anything wrong tell me

Code:
private static void RebItems(ClientSocket CSocket)
        {
            string CurItemId = "";//1=HeadG 2=NickG 3=Armor 4=RH 5=LH 6=Ring 7=MagicBottels 8=Boots 9=Garments
            if (CSocket.Client.Equipment.ContainsKey(1))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[1].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1);
                string Main = CurItemId.Remove(3); CurItemId = Main + "00" + Qual;
                CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[1].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[1], CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(2))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[2].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3);
                CurItemId = Main + "02" + Qual; CSocket.Client.Equipment[2].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[2], CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(3))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[3].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3);
                CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[3].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[3], CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(4))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[4].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3);
                CurItemId = Main + "02" + Qual; CSocket.Client.Equipment[4].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[4], CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(5))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[5].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3);
                if (Main.StartsWith("900"))//Shield
                {
                    CurItemId = Main + "00" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
                else if (Main.StartsWith("4") || Main.StartsWith("5")||Main.StartsWith("6"))
                {
                    //Main = CurItemId.Remove(3, 3);
                    CurItemId = Main + "02" + Qual; CSocket.Client.Equipment[5].ItemID = int.Parse(CurItemId);
                }
                UpDateItem(CSocket.Client.Equipment[5], CSocket);
                ItemUnequip(5, CSocket.Client.Equipment[5].UID, CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(6))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[6].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[6].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[6], CSocket);
            }
            if (CSocket.Client.Equipment.ContainsKey(8))
            {
                CurItemId = Convert.ToString(CSocket.Client.Equipment[8].ItemID);
                string Qual = CurItemId.Remove(0, CurItemId.Length - 1); string Main = CurItemId.Remove(3, 3);
                CurItemId = Main + "01" + Qual; CSocket.Client.Equipment[8].ItemID = int.Parse(CurItemId);
                UpDateItem(CSocket.Client.Equipment[8], CSocket);
            }
        }
oh , forgot to add the UpDateItem void :p

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);
            }
        }
09/02/2009 18:32 1supertao#73
I think he's on vacation
09/03/2009 07:42 jynxter23#74
Ok.. Reading through the thread.. Ive fixed a bunch of errors.. But I still have these ones.
Code:
Error	1	The name 'Face' does not exist in the current context	C:\Documents and Settings\Owner\Desktop\My server\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs	70	29	CoEmu v2 GameServer
That one is given to me like 10 times. Lol.

Next one is,
Code:
Error	4	The name 'ReqLvl' does not exist in the current context	C:\Documents and Settings\Owner\Desktop\My server\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs	107	68	CoEmu v2 GameServer
That ones just given to me once.. and the last one is..
Code:
Error	14	'CoEmu_v2_GameServer.Structs.Struct.ItemInfo' does not contain a definition for 'Progress' and no extension method 'Progress' accepting a first argument of type 'CoEmu_v2_GameServer.Structs.Struct.ItemInfo' could be found (are you missing a using directive or an assembly reference?)	C:\Documents and Settings\Owner\Desktop\My server\CoEmu v2\CoEmu v2 GameServer\Handlers\NpcTalk.cs	2744	22	CoEmu v2 GameServer
Any help would be greatly appreciated. Thanks :P

P.s. You rock :handsdown:
09/03/2009 14:07 12tails#75
you should make all the definitions...

also face have fxed a long time ago... just search for pete's post you will see