DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • July 20, 2018, 01:35:43 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: drunkenness  (Read 3061 times)
0 Members and 1 Guest are viewing this topic.
Hex
Guest
« on: November 16, 2004, 11:19:56 PM »

I noticed there's an entry in the database for $session['user']['drunkenness'], and most fo the modules I've looked at are using it.

What's up with the drinks.php module using it's own drunkeness variable? Why aren't the two tied together...

I'm only looking at this because I've been getting complaints of people being too drunk to work (jobs.php - LonnyL) even though $session['user']['drunkenness'] == 0

Any ideas?

Well, I made this up really quick to display a users drunkeness on the info bar so they know if they should even bother going to work or not.. probably not the best, but it functions..

http://dragonprime.net/users/Hex/drunkdisp.zip
« Last Edit: November 17, 2004, 12:05:37 AM by Hex » Logged
Kendaer
Guest
« Reply #1 on: November 19, 2004, 07:17:39 AM »

No place in the official code uses $session['user']['drunkeness'] any longer

Any third party modules which do are wrong.

When you install the drinks module it replaces that accounts table column with it's own preference because it belongs with the drinks module.
Logged
Hex
Guest
« Reply #2 on: November 26, 2004, 05:56:01 PM »

Then what is the correct variable for checking drunkeness levels?  would it be

Code:
get_module_pref('drunkeness','drinks');
set_module_pref('drunkeness',#,'drinks');

All the modules that modify drunkeness at all whose sources I've looked at are using $session['user']['drunkeness']. Lonnys Castle and Jobs, for example. The reason I wrote the drunkdisp module was to show my users when they were sober enough to work after drinking in the wine cellar of the castle. However, It's been over a week and my drunkeness level has not gone down at all so I'm starting to wonder what gives?

Code snip from jobs:

Code:
if ($op == "work"){
if ($session['user']['drunkenness']>65 and get_module_pref('job') == 1){
   output("The Foreman stops you...... \"How dare you show up to work in this condition!\"");
   output("\"Go sober up!\"");

and from lonnys castle:

Code:
$session['user']['drunkenness']+=33;

Thanks
Logged
lonnyl
Guest
« Reply #3 on: November 26, 2004, 07:29:54 PM »

It's becuase $session['user']['drunkeness'] is no longer handled at newday.... both of those mods need to be updated (I'll get it done soon) as well as the add images module.
Logged
Hex
Guest
« Reply #4 on: November 27, 2004, 07:49:25 AM »

It's becuase $session['user']['drunkeness'] is no longer handled at newday.... both of those mods need to be updated (I'll get it done soon) as well as the add images module.

already did Smiley

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


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

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