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

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Another Lovers Mod  (Read 12221 times)
0 Members and 1 Guest are viewing this topic.
Ironman
Guest
« on: February 09, 2006, 07:19:47 PM »

I know that there are other alternative versions of lovers.php out there, but I've been working on this one since November, and I figured maybe someone else would like it.

Features:

* Only one male player can be married to Violet and only one female to Seth
* Required charm for each level of flirting admin configurable
* Amount of charm lost when divorced admin configurable
* Violet/Seth will divorce when aplayer is in very low spirits  (this is to keep one player from being married forever, not allowing others the oppertunity)

There are a couple of things I would like to add yet, so any suggestions are appreciated.  The things I would like to add:

* A way to have Violet/Seth divorce their partner if said partner has not logged into the game in an configurable number of days
* Save the married player by acctid, since I currently have it saved by name, which can change in the game w/o being changed in the module settings

Download link:  http://dragonprime.net/users/Ironman/lovers2.zip
Logged
robert
Old Dog
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #1 on: February 10, 2006, 01:40:05 AM »

Copy/paste is a terrible thing. Copying a flawed file also copies its flaws. This is not your fault Ironman, it is a flaw in the core file.

The names of the barmaid and bard are game settings and should not be hard coded into any file which refers to them.

I posted a fix for one such use here:
http://dragonprime.net/index.php?board=16;action=display;threadid=3504

Looking over the file, I see more places where 'violet' and 'seth' needs to be replaced.
Logged

Ironman
Guest
« Reply #2 on: February 10, 2006, 03:48:17 AM »

Fixed in version 2.01.  Same link as above.
Logged
Zanzaras
Captain of the Guard
***
Offline Offline

Posts: 220


*Snipe*


View Profile
« Reply #3 on: February 10, 2006, 06:42:07 AM »

I actually like this. It's closer to the original Legend of the Red Dragon. I never have been fond of the fact that every player in the game can be married to Seth or Violet at the same time. This puts the "special" back into the marriage, knowing that you beat out all the other players and won Seth's/Violet's hand.

Although I can see how it would be frustrating to a player on a server with a large player base.
Logged

"Intelligence is like a river, the deeper it is the less noise it makes."
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #4 on: February 10, 2006, 07:00:27 AM »

I always loved the thought of a Casanova-Seth and bitchy-Violet... Wink Has something of "Bard's Tale" Wink
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #5 on: February 10, 2006, 07:28:36 AM »

^^ well, in the next release this will be fixed.
Logged
Ironman
Guest
« Reply #6 on: February 10, 2006, 12:56:18 PM »

I actually like this. It's closer to the original Legend of the Red Dragon. I never have been fond of the fact that every player in the game can be married to Seth or Violet at the same time. This puts the "special" back into the marriage, knowing that you beat out all the other players and won Seth's/Violet's hand.

Although I can see how it would be frustrating to a player on a server with a large player base.

That was exactly what I was going for -- the old LORD way of doing it. Smiley
Logged
Ironman
Guest
« Reply #7 on: February 10, 2006, 01:01:50 PM »

^^ well, in the next release this will be fixed.
What features, exactly?  All of the above?  What about the changes I plan on making (seen in the first post)?  If this is already done, I may as well not spend any more time working on it.
Logged
Nightborn
Guest
« Reply #8 on: February 10, 2006, 01:49:24 PM »

Ah, nono.

The fixes = fixed seth/violet in the lovers module...

it was obviously forgotten to fix the entire module... parts are done, parts are left out.

I rewrote those passages and posted them in.

I don't know the exact outcome yet.
Logged
Ironman
Guest
« Reply #9 on: February 10, 2006, 02:29:53 PM »

Okay, cool.  I'm sure the changes I made wouldn't be appropriate for some servers.

Can anyone offer me some advice on how I would have the module check how many days either Seth or Violet's spouse has not played so that they can be auto divorced?

Thanks!
Any other suggestions welcome, as well.
Logged
Nightborn
Guest
« Reply #10 on: February 10, 2006, 02:48:01 PM »

only a bad one.

on all newday_runonce, increase a pref "daysoff" by +1 (just one sql query would suffice).

then, on every newday (user called) set the pref to 0.

this should work. if you get the pref, you have the days he hasn't logged in.
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 #11 on: February 10, 2006, 02:56:13 PM »

You can always use an SQL call (at newday-runonce) to get the laston of the player. It would look something like this:
Code:
$married_id = get_module_setting("violetspouse");
// once you switch it to acctid
$sql = "SELECT laston FROM ".db_prefix("accounts")." WHERE acctid='$married_id'";
$res = db_query($sql);
$row = db_fetch_assoc($res);
if ($row['laston'] < date("Y-m-d H:i:s",strtotime("-".get_module_setting("daystilldivorce")." days"))){
// do what you want
}
Looking over your code, I'd suggest storing the spouse of Violet/Seth as their acctid, and not their name. Change text to int in the settings, and then when you set it, just have:
Code:
set_module_setting("violetspouse",$session['user']['acctid']);
Then, to call the name:
Code:
$sql = "SELECT name FROM ".db_prefix("accounts")." WHERE acctid='".get_module_setting("violetspouse")."'";
$res = db_qeury($sql);
$row = db_fetch_assoc($res);
$name = $row['name'];
I hope that is all understandable.
« Last Edit: February 10, 2006, 02:58:16 PM by Sichae » Logged

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

Nightborn
Guest
« Reply #12 on: February 10, 2006, 02:59:41 PM »

Mhm, this is another option, yes. ^^

using the laston function. I don't know if he meant real days or game days.
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 #13 on: February 10, 2006, 03:00:38 PM »

using the laston function. I don't know if he meant real days or game days.

Ah, okay. Ironman, if you meant game days, then I suggest going with Nightborn's method. If you mean real days, then you can use my method.
Logged

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

Ironman
Guest
« Reply #14 on: February 10, 2006, 04:41:13 PM »

Sorry I wasn't more specific.  I was thinking real days.  I had considered game days, but calling someone absent based on game days can be a little unfair, depending on when new days reset.

Thanks for the suggestions.  Going to work now...

Logged
Pages: [1] 2 3   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
76 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search