[Release]FIXED MARRIAGE

10/28/2008 23:37 DungMaster#1
Sorry for my first post .This release may help you ..

FIXED DIVORCE O.O'

Ok , Let's go. Search in Client.cs for :
Code:
 
                            if (CurrentNPC == 390)
                            {
                                if (MyChar.Spouse == "" || MyChar.Spouse == "None")
                                {
                                    SendPacket(General.MyPackets.NPCSay("Do you wish to propose to your sweetheart?"));
                                    SendPacket(General.MyPackets.NPCSay("Remember that marriage is a serious commitment, do not enter into it lightly."));
                                    SendPacket(General.MyPackets.NPCLink("Yes I want to propose", 1));
                                    SendPacket(General.MyPackets.NPCLink("Nooo I'm not ready", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You have already spouse."));
                                    SendPacket(General.MyPackets.NPCLink("Sorry", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Under it add :
Code:
                            if (CurrentNPC == 304)
                            {
                                if (MyChar.Spouse == "" || MyChar.Spouse == "None")
                                {
                                    SendPacket(General.MyPackets.NPCSay("Hey! You are single!"));
                                    SendPacket(General.MyPackets.NPCLink("I know.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("Stars in the sky represent true love and commitment..."));
                                    SendPacket(General.MyPackets.NPCSay(" unfortunately, some stars don't shine as bright, and therefore, need to be destroyed."));
                                    SendPacket(General.MyPackets.NPCSay(" Marriage represents those stars. I can divorce you if you and your spouse"));
                                    SendPacket(General.MyPackets.NPCSay(" no longer want to be together."));
                                    SendPacket(General.MyPackets.NPCLink("I want to be divorced.", 1));
                                    SendPacket(General.MyPackets.NPCLink("I am happily Married.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Search for :
Code:
                            if (CurrentNPC == 390)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Click on your sweetheart to propose to them"));
                                    SendPacket(General.MyPackets.NPCLink("OK", 2));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.Spouse == "" || MyChar.Spouse == "None")
                                    {
                                        MyChar.MyClient.SendPacket(Packets.MarriageMouse(MyChar.UID));
                                    }
                                }
                            }
Under it add :
Code:
                            if (CurrentNPC == 304)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("Currently, I have an abundant supply of Meteor Tears, but need Meteors. "));
                                    SendPacket(General.MyPackets.NPCSay("If you give me one Meteor, I can divorce you from your once-loved one."));
                                    SendPacket(General.MyPackets.NPCLink("Here is your Meteor", 2));
                                    SendPacket(General.MyPackets.NPCLink("I love my Spouse", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(1088001, 1))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                        SendPacket(General.MyPackets.NPCSay("Okay, you have a meteor. Are you POSITIVE you want to divorce your spouse?"));
                                        SendPacket(General.MyPackets.NPCLink("Yes.", 3));
                                        SendPacket(General.MyPackets.NPCLink("I am not positive...", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You appear to not have a meteor...I cannot divorce you. "));
                                        SendPacket(General.MyPackets.NPCLink("Okay.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 3)
                                {
                                    MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    SendPacket(General.MyPackets.String(MyChar.UID, 6, "None"));
                                    foreach (DictionaryEntry DE in World.AllChars)
                                    {
                                        Character charc = (Character)DE.Value;
                                        if (charc.Name == MyChar.Spouse)
                                        {
                                            charc.MyClient.SendPacket(General.MyPackets.String(charc.UID, 6, "None"));
                                            MyChar.Spouse = "None";
                                        }
                                    }
                                    DataBase.RemoveSpouse(MyChar.UID);
                                    SendPacket(General.MyPackets.NPCSay("I was able to divorce you. Hope you can cope with the loss."));
                                    SendPacket(General.MyPackets.NPCLink("Okay.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Open DataBase.cs and search for public static void SaveWHPW(Character Charr)

Under it add :
Code:
        public static void RemoveSpouse(uint RemovedUID)
        {
            MySqlCommand Command = null;
            MySqlDataAdapter DataAdapter = null;
            DataAdapter = new MySqlDataAdapter("SELECT * FROM `Characters` WHERE `UID` = " + RemovedUID, Connection);

            DataSet DSet = new DataSet();
            DataAdapter.Fill(DSet, "Char");

            DataRow DR = DSet.Tables["Char"].Rows[0];
            string Spouse = (string)DR["Spouse"];

            Command = new MySqlCommand("UPDATE `Characters` SET `Spouse` = 'None'", Connection);
            Command.ExecuteNonQuery();
        }
That's all :)
10/28/2008 23:41 felipeboladao#2
haha,all working 100%,tranks
10/28/2008 23:43 DungMaster#3
Quote:
Originally Posted by felipeboladao View Post
haha,all working 100%,tranks
Sem problemas .. xD ( No problems.. )
10/28/2008 23:54 XxArcherMasterxX#4
added to my all-in-1 thread
10/28/2008 23:57 DungMaster#5
Quote:
Originally Posted by XxArcherMasterxX View Post
added to my all-in-1 thread
I like your all-in- 1 LOL... x):mofo:
10/29/2008 00:05 XxArcherMasterxX#6
Quote:
Originally Posted by DungMaster View Post
I like your all-in- 1 LOL... x):mofo:
ty xD
10/29/2008 00:07 Brun0_#7
Quote:
Originally Posted by DungMaster View Post
Sem problemas .. xD ( No problems.. )
Sua Bixa.. Massa =D Em ¬¬
shushusuhsh


Felipe.. eu postei zuano.. o vini ( dung ) e meu brodi shusuhshs
=D
10/29/2008 03:15 felipeboladao#8
o.O a base desses scripts nao tem dono BrunO..
ao passar Seus Scripts vc esta dando o Script entao vc nao pode reclamar...
10/29/2008 03:23 lostsolder05#9
lol? where's the credits included in that towards letterx? he's the 1 who coded that divorce npc...

just cuz u may have fixed smthing or w/e doesn't make it ure's... :P
10/29/2008 13:28 DungMaster#10
Quote:
Originally Posted by lostsolder05 View Post
lol? where's the credits included in that towards letterx? he's the 1 who coded that divorce npc...

just cuz u may have fixed smthing or w/e doesn't make it ure's... :P
lol .. credits to Bruno .. ¬¬:D
10/29/2008 13:46 lostsolder05#11
Quote:
Originally Posted by DungMaster View Post
lol .. credits to Bruno .. ¬¬:D
hmk lol well include credits next time ;)
10/29/2008 15:31 Brun0_#12
Quote:
Originally Posted by DungMaster View Post
lol .. credits to Bruno .. ¬¬:D
:p:p:p:p

(L) s2 uhususushush
10/29/2008 21:38 tao4229#13
K, first of all, I never saw shit wrong with the first divorce thread(that you copied as far as I can see).
Second, why the hell do people keep posting "fixes", instead of just telling the person who originally posted it the tiny bug?!
Third, what the f*k about brun0? It was originally done by Imitation/LetterX, with my help(LOL).
10/29/2008 21:49 LetterX#14
WHAT THE HECK. I release something useful...and I notice there is a string packet bug...and I will fix it by tonight...but really...copying *some* of my work, changing around what little you copied, and then releasing as your own?

And for EVERYONE'S INFORMATION: This is bugged. Mine, although needing some work, divorces you and your spouse even if the other one is off line. This one, won't...and the RemoveSpouse part for DataBase.cs is useless without the other additions.

I thought releasing Divorce for LOTF would be useful, as I see, I won't make that mistake again.
10/29/2008 22:02 lostsolder05#15
Quote:
Originally Posted by LetterX View Post
WHAT THE HECK. I release something useful...and I notice there is a string packet bug...and I will fix it by tonight...but really...copying *some* of my work, changing around what little you copied, and then releasing as your own?

And for EVERYONE'S INFORMATION: This is bugged. Mine, although needing some work, divorces you and your spouse even if the other one is off line. This one, won't...and the RemoveSpouse part for DataBase.cs is useless without the other additions.

I thought releasing Divorce for LOTF would be useful, as I see, I won't make that mistake again.
hmm, thought it was ure divorce npc lol

anywayz, personally i wouldnt either thats exctly y i never release anything on here ^^