DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => Completed Modules for version 1.x.x => Topic started by: MarcTheSlayer on August 23, 2010, 02:24:36 PM



Title: Dwelling Open House Policy v0.0.4
Post by: MarcTheSlayer on August 23, 2010, 02:24:36 PM
Dwelling Open House Policy v0.0.4

Idea from Contessa. :)

This module allows dwellings owners to open up their house to anyone and everyone. No keys required. They can also mute the non key holders so they can't post. The coffer/logout links however will still only be accessible to the owner and key holders.

To get the open house policy the dwelling owner must buy it at the lodge. If you set lodge cost to zero then all dwellings owners can get it.

Settings allow you to limit where this is available by village and again by dwelling type. There's a link in each hamlet that shows a table showing the policy information.

Update
06/09/10 - v0.0.2
+ Fixed a location problem where open dwellings appeared in all locations.
12/09/10 - v0.0.3
+ Fixed a bug, had used $dwid instead of $arg['dwid'].
20/09/10 - v0.0.4
+ Added mute option so non keyholders can only view commentary, they can't post. Idea from Contessa. :)
+ Fixed logout bug. Link no longer shows for non keyholders.


-Edit-
I had attached version 0.0.4b which doesn't use the extra dwellings setting that I have. If you're not sure which version to use then use 0.0.4b - See post below.

Comments, suggestions, bugs welcome. :)

Zip files attached.


Title: Re: Dwelling Open House Policy v0.0.1
Post by: MarcTheSlayer on August 23, 2010, 03:01:02 PM
It would seem that my dwellings module has an extra setting. One that allows you to turn off dwellings in any village. I use this setting for part of the table information.

Here's the changes in my dwelling files.

Open: 'root/modules/dwellings.php'
Code:
//
// Find:
//
"prefs-city"=>array(

//
// After, ADD:
//
"allow" => "Are dwellings allowed in this city?,bool|1",

Open: 'root/modules/dwellings/dohook/village.php'
Code:
//
// Find:
//
tlschema($args['schemas']['gatenav']);

//
// Before, ADD:
//
require_once('modules/cityprefs/lib.php');
$loc = get_cityprefs_cityid('location',$session['user']['location']);
if( get_module_objpref('city',$loc,'allow','dwellings') )
{

//
// Find:
//
set_module_pref("dwelling_saver",0);

//
// After, ADD:
//
}

Without this extra setting nothing will break, you'll just get a column of No's in the table.


Title: Re: Dwelling Open House Policy v0.0.1
Post by: JollyGG on August 23, 2010, 03:06:00 PM
Ooooooh...I think I'll be the first to get this and try it out! :D A site I help with like having Truth or Dare nights, lol, and this would make it a lot easier on the officiators :)


Title: Re: Dwelling Open House Policy v0.0.1
Post by: JollyGG on August 23, 2010, 03:15:28 PM
lol, that modules/dwellings/dohook/village.php was the easiest fix ever :P


Title: Re: Dwelling Open House Policy v0.0.1
Post by: JollyGG on August 23, 2010, 03:27:12 PM
As for my suggestion, I plan on doing this, but if you want to, lol, I'd like to make a set of dwelling, smaller ones, for new players. Only times they be able to access it are the first two DKs, and ONLY if in their prefs they choose to not want to be PVP'd (this idea mainly for a server that doesn't have immunity to it). Since there will be no issues to them stealing from coffers, no need to worry about that, but just somewhere for them to sleep, lol


Title: Re: Dwelling Open House Policy v0.0.1
Post by: MarcTheSlayer on August 23, 2010, 04:28:10 PM
I've been meaning to write an orphanage dwelling type module that lowly DK players can stay in for protection. =)


Title: Re: Dwelling Open House Policy v0.0.1
Post by: JollyGG on August 23, 2010, 08:39:41 PM
Ooooh, yeah, exactly! Let me know when you do, I'll be the first to download it too! :D


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Megan|SaraBeth on February 01, 2012, 02:48:26 PM
How do you make it so the policy doesnt expire at the end of the day?


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Minato on February 01, 2012, 03:34:26 PM
How do you make it so the policy doesnt expire at the end of the day?

Take a gander at the newday and/or newday-runonce cases, if they exist. He probably used this method to make sure things reset properly at the new day. :)


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Megan|SaraBeth on February 01, 2012, 05:17:22 PM
It doesnt have a newday run once or newday at all.


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Minato on February 01, 2012, 07:19:06 PM
It doesnt have a newday run once or newday at all.

That's all I could give you short of downloading his file, opening it, and then writing the edit for you... Maybe one of these other fine gentlemen will have the time I lack? :)


Title: Re: Dwelling Open House Policy v0.0.4
Post by: MarcTheSlayer on February 02, 2012, 12:34:13 PM
How do you make it so the policy doesnt expire at the end of the day?

Once the dwelling owner buys this from the lodge, they're able to turn it on and off from that dwelling's management page. It does not expire. :)


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Minato on February 02, 2012, 01:09:47 PM
How do you make it so the policy doesnt expire at the end of the day?

Once the dwelling owner buys this from the lodge, they're able to turn it on and off from that dwelling's management page. It does not expire. :)

Just a question for Megan, what function of the module made you believe it to work to expire the Policy?  ???


Title: Re: Dwelling Open House Policy v0.0.4
Post by: Megan|SaraBeth on February 03, 2012, 03:39:44 PM
when the houses you have keys too section refused to list it and you had to get to it from the hamlet registry.  but its all good now. it doesnt expire

© 2018 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines