[Release]Enchant,Bless And Compose NPC

10/29/2008 04:25 Brun0_#1
Go In Client.cs And Search For:

if (CurrentNPC == 1010)

Under Add:

Code:
                        if (CurrentNPC == 278)
                        {
                            SendPacket(General.MyPackets.NPCSay("This machine here can compose, bless and enchant your items. Appearently it can only compose, because it is broken."));
                            SendPacket(General.MyPackets.NPCLink("Compose", 1));
                            SendPacket(General.MyPackets.NPCLink("Enchant", 2));
                            SendPacket(General.MyPackets.NPCLink("Bless", 10));
                            SendPacket(General.MyPackets.NPCLink("No Thanks", 255));
                            SendPacket(General.MyPackets.NPCSetFace(30));
                            SendPacket(General.MyPackets.NPCFinish());
                        }

Now Search Again For :


if (CurrentNPC == 1010)

And Under Add:

Code:
                        if (CurrentNPC == 278)//enchant bless and compose
                        {
                            if (Control == 1)
                            {
                                SendPacket(General.MyPackets.ETCPacket(MyChar, 1));
                            }
                            if (Control == 2)
                            {
                                SendPacket(General.MyPackets.NPCSay("Costs 100 Cps. After Enchanting Please Take Off The Item And Put It Back On. Which item do you want to Enchant?"));
                                SendPacket(General.MyPackets.NPCLink("Enchant helmet or earring.", 3));
                                SendPacket(General.MyPackets.NPCLink("Enchant necklace.", 4));
                                SendPacket(General.MyPackets.NPCLink("Enchant armor.", 5));
                                SendPacket(General.MyPackets.NPCLink("Enchant weapon.", 6));
                                SendPacket(General.MyPackets.NPCLink("Enchant ring, heavy ring.", 7));
                                SendPacket(General.MyPackets.NPCLink("Enchant boots.", 8));
                                SendPacket(General.MyPackets.NPCLink("Enchant shield.", 9));
                                SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
                            if (Control >= 3 && Control <= 9)
                            {
                                if (MyChar.CPs >= 100)
                                {
                                    string TheEquip = "";

                                    if (Control == 3)
                                        TheEquip = MyChar.Equips[1];
                                    if (Control == 4)
                                        TheEquip = MyChar.Equips[2];
                                    if (Control == 5)
                                        TheEquip = MyChar.Equips[3];
                                    if (Control == 6)
                                        TheEquip = MyChar.Equips[4];
                                    if (Control == 7)
                                        TheEquip = MyChar.Equips[6];
                                    if (Control == 8)
                                        TheEquip = MyChar.Equips[8];
                                    if (Control == 9)
                                        TheEquip = MyChar.Equips[5];

                                    byte Pos = 0;

                                    if (Control == 3)
                                        Pos = 1;
                                    if (Control == 4)
                                        Pos = 2;
                                    if (Control == 5)
                                        Pos = 3;
                                    if (Control == 6)
                                        Pos = 4;
                                    if (Control == 7)
                                        Pos = 6;
                                    if (Control == 8)
                                        Pos = 8;
                                    if (Control == 9)
                                        Pos = 5;

                                    MyChar.CPs -= 100;
                                    string[] Splitter = TheEquip.Split('-');
                                    uint ItemId = uint.Parse(Splitter[0]);
                                    uint OldEnchant = uint.Parse(Splitter[3]);
                                    uint NewEnchant = (uint)General.Rand.Next(1, 255);//fix

                                    if (OldEnchant <= NewEnchant)
                                    {

                                        MyChar.GetEquipStats(Pos, true);
                                        MyChar.Equips[Pos] = ItemId.ToString() + "-" + Splitter[1] + "-" + Splitter[2] + "-" + NewEnchant + "-" + Splitter[4] + "-" + Splitter[5];
                                        MyChar.GetEquipStats(Pos, false);

                                        MyChar.SendEquips(false);
                                        SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("I'm Sorry The New enchantment was smaller than your old one."));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCLink("Ok...", 255));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                            if (Control == 10)
                            {
                                SendPacket(General.MyPackets.NPCSay("Costs 100 Cps. After Blessing Please Take Off The Item And Put It Back On. Which item do you want to Bless?"));
                                SendPacket(General.MyPackets.NPCLink("Bless helmet or earring.", 13));
                                SendPacket(General.MyPackets.NPCLink("Bless necklace.", 14));
                                SendPacket(General.MyPackets.NPCLink("Bless armor.", 15));
                                SendPacket(General.MyPackets.NPCLink("Bless weapon.", 16));
                                SendPacket(General.MyPackets.NPCLink("Bless ring, heavy ring.", 17));
                                SendPacket(General.MyPackets.NPCLink("Bless boots.", 18));
                                SendPacket(General.MyPackets.NPCLink("Bless shield.", 19));
                                SendPacket(General.MyPackets.NPCLink("Goodbye.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
                            if (Control >= 13 && Control <= 19)
                            {
                                if (MyChar.CPs >= 100)
                                {
                                    string TheEquip = "";

                                    if (Control == 13)
                                        TheEquip = MyChar.Equips[1];
                                    if (Control == 14)
                                        TheEquip = MyChar.Equips[2];
                                    if (Control == 15)
                                        TheEquip = MyChar.Equips[3];
                                    if (Control == 16)
                                        TheEquip = MyChar.Equips[4];
                                    if (Control == 17)
                                        TheEquip = MyChar.Equips[6];
                                    if (Control == 18)
                                        TheEquip = MyChar.Equips[8];
                                    if (Control == 19)
                                        TheEquip = MyChar.Equips[5];

                                    byte Pos = 0;

                                    if (Control == 13)
                                        Pos = 1;
                                    if (Control == 14)
                                        Pos = 2;
                                    if (Control == 15)
                                        Pos = 3;
                                    if (Control == 16)
                                        Pos = 4;
                                    if (Control == 17)
                                        Pos = 6;
                                    if (Control == 18)
                                        Pos = 8;
                                    if (Control == 19)
                                        Pos = 5;

                                    MyChar.CPs -= 100;
                                    string[] Splitter = TheEquip.Split('-');
                                    uint ItemId = uint.Parse(Splitter[0]);
                                    uint NewBless = (uint)General.Rand.Next(1, 7);
                                    uint OldBless = uint.Parse(Splitter[2]);

                                    if (NewBless > OldBless)
                                    {

                                        MyChar.GetEquipStats(Pos, true);
                                        MyChar.Equips[Pos] = ItemId.ToString() + "-" + Splitter[1] + "-" + NewBless + "-" + Splitter[3] + "-" + Splitter[4] + "-" + Splitter[5];
                                        MyChar.GetEquipStats(Pos, false);
                                        MyChar.SendEquips(false);

                                        SendPacket(General.MyPackets.AddItem((long)MyChar.Equips_UIDs[Pos], (int)ItemId, byte.Parse(Splitter[1]), byte.Parse(Splitter[2]), byte.Parse(Splitter[3]), byte.Parse(Splitter[4]), byte.Parse(Splitter[5]), Pos, 100, 100));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("I'm Sorry The New Bless was smaller than your old one."));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCLink("Ok...", 255));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                        }

i Help u ? Press Thanks =D
10/29/2008 05:13 pauldexter#2
nice release!
10/29/2008 05:14 lolex#3
OK OK, before you thank proved this code.

If role, you give thanks
10/29/2008 16:36 $HaDoW#4
old....
btw he copyed that from some scource he made noting -_-
10/29/2008 16:39 demonscim#5
pretty kewl.. i used it :D
10/29/2008 16:58 XxArcherMasterxX#6
added to my all-in-1 thread
10/29/2008 18:30 alexbigfoot#7
too hard for u to use the "enchant" packet?
04/20/2009 15:36 auraboreal#8
Bruno, tem como colocar bless com super tortoise e enchated com gemas? vlw

Bruno, is to put bless with "super tortoise" and enchated with gems? VLW

Isso fez dar erro em todo o meu client.cs!!!

This error has given throughout my client.cs!
04/21/2009 10:11 CTNetCom#9
Its not working for me..Is it I have to add something else?Ima using PowerSource
11/08/2009 20:38 omom248#10
where is client.cs i cant find it .....
11/08/2009 21:21 .Matt#11
Quote:
Originally Posted by omom248 View Post
where is client.cs i cant find it .....
Then you probably should just delete the source and go play a binaries.
11/09/2009 13:01 #*=DarkAngeL=*##12
Isn't this a little cheap when making belss and enchantment?
11/09/2009 22:26 zbest#13
Nice release ;)
11/10/2009 11:20 ~*NewDuuDe*~#14
WTF was the point of starting a discussion in a one year old thread?