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();
}
K, first of all, I never saw **** 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).
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.
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 ^^
[Release] Marriage Fix [5165] 03/10/2010 - CO2 PServer Guides & Releases - 13 Replies Removed for reasons beyond my control.
#request close
[Release] Gay Marriage :D 03/01/2010 - CO2 PServer Guides & Releases - 8 Replies Go to marriage.cs and search for:
{ GC.LocalMessage(2005, "No male and male marriage is permitted!"); return; }
DELETE IT!!!
now you can be gay with your gay partner, good luck and happy camping :D
[Release]Marriage problem Fix 07/26/2009 - CO2 PServer Guides & Releases - 12 Replies I found the cause of this problem with the help of my friend Ahmedbik
and I decided to release it here
just close the server and excute this file
must be offline because it changes in cq_user table