DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • December 10, 2018, 03:32:47 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: 1 [2]   Go Down
  Print  
Author Topic: Gardenflirt (and marriage)  (Read 7228 times)
0 Members and 1 Guest are viewing this topic.
Interloper
Guest
« Reply #15 on: December 06, 2004, 02:00:20 AM »

Okay, sorry for double posting but I did some more digging and discovered more information that I thought I would post. I understand most people have moved onto 0.9.8 but I've got nothing to lose by posting in the hope someone can give me some advice.

Anyway, it seems that divorce from loss of charm has some sort of problem with it... It counts as a divorce for the person who ran out of charm, but not for the person they were married to.

This causes other problems as well, such as the person that doesn't receive the divorce losing a charmpoint each day for "letting themself go a little" but not being able to make it back the usual way by flirting because it tells them they are still married!

I managed to "force" a divorce for the person that didn't receive one by flirting with the character they were divorced from. This resulted in a "your partner caught you cheating" divorce, which is kind of amusing since they were flirting with the person they were supposedly married too...

 Tongue

ANyways, like I said, I understand that most of you have moved on to bigger and better things, but I came across this problem and figured I had nothing to lose by posting about it. If anyone has experience with this mod and can offer some advice I'd be pleased to hear it.

Cheers.  Cheesy

Edit: Done still yet more digging and it looks like the problem might lie with the part of newday.php where divorce occurs automatically if you have 0 charm... It seems to set the "marriedto" field of the character with no charm to zero, but make no change to the person they supposedly divorced...

Too confusing.  Sad
« Last Edit: December 06, 2004, 02:04:25 AM by Interloper » Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #16 on: December 06, 2004, 12:48:22 PM »

Here my section of divorce of newday.php:
Code:
   if ($session['user']['marriedto'] == 4294967295 || $session['user']['charisma'] == 4294967295) {
        output("`n`%Sei sposato, perci non c' nessun motivo di mantenere un'immagine perfetta, ed oggi ti lasci andare un po'.`n");
        $session['user']['charm']--;
        if ($session['user']['charm'] <= 0) {
            output("`bQuando ti svegli, trovi accanto a te un biglietto che dice`n`5Car".($session['user']['sex']?"a":"o")." ");
            output($session['user']['name']);
            output("`5,`nNonostante i bellissimi baci, scopro di non provare pi attrazione per te nel modo in cui la provavo prima.`n`n");
            output("Chiamami volubile, ma ho bisogno di andarmene. Ci sono altr".($session['user']['sex']?"e":"i")." guerrier".($session[user][sex]?"e":"i")." nel villaggio e penso che ");
            output("alcun".($session['user']['sex']?"e":"i")." siano parecchio attraenti. Perci non sei tu, sono io, eccetera eccetera....");
            $sql = "SELECT name,acctid FROM accounts WHERE locked=0 AND acctid=" . $session['user']['marriedto'] . "";
            $result = db_query($sql) or die(db_error(LINK));
            $row = db_fetch_assoc($result);
            $partner = $row[name];
            if ($partner == "") $partner = $session['user']['sex']?"Seth":"Violet";
            output("`n`nSenza rancore, Baci, $partner`b`n");
            debuglog(" stato lasciato da $partner");
            addnews("`\$$partner ha lasciato ".$session['user']['name']."`\$ per seguire \"altri interessi\"!");
            if ($session['user']['marriedto'] == 4294967295) $session['user']['marriedto'] = 0;
            if ($session['user']['charisma'] == 4294967295) {
                $sql = "UPDATE accounts SET charisma=0,marriedto=0 WHERE acctid='$row[acctid]'";
                db_query($sql);
                systemmail($row['acctid'], "`\$Di nuovo single!`0", "`6hai lasciato `&".$session['user']['name']."`6. Il matrimonio ultimamente era diventato una gabbia.");
                $session['user']['charisma'] = 0;
                $session['user']['marriedto'] = 0;
            }
        }
    }
It's still in italian but you'll be able to find matches with english version  Grin
It works fine, doing complete divorce, no half work  Wink
Let me know if works for you.
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
anpera
Guest
« Reply #17 on: December 06, 2004, 02:12:36 PM »

I updated the download link, but i can't find an error that causes the named problem. I noticed the same effect on a few other servers, mainly on such with lots of players or on slow machines.

Like mentioned in one of my earlier posts I think there is a general problem in 0.9.7, because I also noticed this effect on gold an gem transfers and other things, that affect account data of others. (Marriage itself often is only done one-sided and so divorce can't work too). If the two players are online at the same time and click on something the same time (P1 clicks on newday and gets the divorce message and P2 sends a line for village chat for example), the changes, that were made to divorce P1 form P2 at P2's table by P1 are overwritten the very same moment by the old account infos of P2. So divorce is only done one sided.

Maybe a 'lock table accounts' during runtime of common.php can prevent this from happening, but I guess that would slow down the server extremly...

so to make a divorce by hand with user editor in admin grotto, set:

- charisma to 0
- marriedto to 0
for both players.

To force a marriage set:
P1:
- charisma to 4294967295
- marriedto to acctid of P2

P2:
- charisma to 4294967295
- marriedto to acctid of P1

(To fix a broken marriage you have to check charisma and marriedto values of both players. marriedto should be correct, because it is set with each flirt, but charisma is the troublemaker most of the times...
Note that P1 and P2 can't be same gender!)
« Last Edit: December 06, 2004, 02:50:13 PM by anpera » Logged
Interloper
Guest
« Reply #18 on: December 06, 2004, 02:35:17 PM »

Awesome, thanks so much for your help anpera.  Smiley

I was wondering if it was safe to manually end marriages in the grotto, and now I know. I'll also look at comparing your newday code to the one I have and seeing if that makes any difference in the future.

Thanks again.  Cheesy
Logged
Imperialx
Guest
« Reply #19 on: March 03, 2005, 06:33:04 PM »

Link doesn't work.   Huh
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #20 on: March 03, 2005, 08:09:59 PM »

http://dragonprime.net/users/anpera/gardenflirt.zip

Works for me Wink
« Last Edit: March 03, 2005, 08:10:15 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Pages: 1 [2]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
34 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search