Jump to content

[RELEASE][CRAFT HOUSES BASED ON SURVIVED TIME]


Recommended Posts

 

/////////Allow players by right click on Etool to:

*Build Small Houses: (Survive 2 days + 4 WoodWalls + 1 FloorCelling)

*Build Medium Houses: (Survive 5 days + 2 CinderWalls + 1 FloorCelling)

*Build Large Houses: (Survive 8 days + 4 CinderWalls + 1 FloorCelling)

*Build Hero Hospital Tent : (Survive 2 days// PlayerHumanity+5000  // 2 WoodWalls + 1 FloorCelling)

//////////INCLUDED:

*Only 1 house per plot area restriction.

*Info Menu about requiere items and days survived in plot pole cursor target.

*Heal script for Hero Hospital Tent.

*Houses recognized as Maintein Class.

*Remove option only for owners (not tested on friends but it should work).

*Keep Same position after restart.

PICS:

 

/////////INSTALL:

*First at all you need a custom fn_selfActions.sqf, variables.sqf ,compiles.sqf

*And DZE_ click actions mod:

  Reveal hidden contents

 

1- your custom fn_selfActions.sqf :

A:

  Reveal hidden contents

B:

  Reveal hidden contents

***So step A & B must look like this:

  Reveal hidden contents

 

C:

  Reveal hidden contents

D:

  Reveal hidden contents

E:

  Reveal hidden contents

*Done with selfActions.sqf

2- Now in your Custom variables.sqf

A:

  Reveal hidden contents

B:

  Reveal hidden contents

C:

  Reveal hidden contents

3-Now in your Custom compiles.sqf

A:

  Reveal hidden contents

 4- Extra_Rc.hpp if u use group management.

  Reveal hidden contents

 4- extra_rc.hpp if u DONT! use group management.

  Reveal hidden contents

IF DONT HAVE Extra_rc.hpp  AND URE USING DEPLOY ANYTHING (Tnks @Cherdenko)

open your config.sqf in addons folder and add the lines in blue

  Reveal hidden contents

**** download all sqf from here: http://www.mediafire.com/download/orbkco94qn9s4vp/crafthuouses.zip    (FIXED)

 

////////IF U DOWNLOAD THE FILE YOU DONT NEED NOTHING MORE, JUST PLACE  "custom" download folder into  "Mpmissions\your instance\" ////////////////////////////

 

 

***IF DOWNLOAD LINK IS DEAD THEN:

5-Create the sqf´s and folders.

A: FOLDERS

  Reveal hidden contents

 

SQFS (drop all sqf into "Mpmissions/your instance/ custom/ scripts/house/" )

 

  Reveal hidden contents

 

Link to comment
Share on other sites

so i discovered some bugs on your mod:

First of all the items were no being removed from my inventory, after i placed  down the houses. second of all, what if we changed the range of the Plotpole? Does it sstill check 30 meters?

3rd: For me no buildings/ houses can be removed.

4th i can´t place down the large house...

I hope i could help you improve the script...(gonna post a vid of it later duh)

Edit: Maybe a little Promo? :D

 

One last edit:

If you are using deploy anything edit your overwrites Config so it looks like this:

  Reveal hidden contents

 

Link to comment
Share on other sites

Hey! @Cherdenko tnks for your TEST!!!  well see...  First thing u note: about high position of building., i added "page up" and "pange down" from player_build.sqf to take control about where you u place the houses....  if u think its higher...  find in smallhouses.sqf mediumhouses.sqf and largehouse.sqf   this line:

_offset = [0,8,2];  //number two is for up down

 

For remove it::  you need a crowbar and get into the house.. also u need be a plot owner.

And you cant build anothers houses if u already have one cuz thers a restriction amount of houses per plot area.

i put the msg in a wrong site,, see:

  Reveal hidden contents

must be:

  Reveal hidden contents

For remove items,,, your right!  my bad... its fixed.. let me update it in download file..  TNKS SO MUCH!!

 

tnks!!!!!!

Link to comment
Share on other sites

mmm  i can build large houses.... maybe u cant cuz survived restrictions?

Coment all this lines in largehouses.sqf  and try build. ( u cant build another house if thers any other kind of house in plot area) any other kind of house = small,medium or large.

//if (_Playersurvived > 8) then {
//[format["<t align='center' size='0.75' color='#FFCC00'>>You learn build Large Houses.%1</t>",(name player)],0,0,2,2] spawn BIS_fnc_dynamicText; 

//_Playersurvived = dayz_Survived;

//if (_Playersurvived < 8) exitWith {
//[format["<t align='center' size='0.75' color='#FFCC00'>>not yet! you have %1 days survived. and needs almost 8 days</t>",_Playersurvived],0,0,2,2] spawn BIS_fnc_dynamicText;
//};

 

for hero heal restriction... try add it in hospitalhero.sqf

at very top above

disableSerialization;

add:

private ["_LastUsedTime","_Time"];

_LastUsedTime = 900;
_Time = time - lastuse;	


if(_Time < _LastUsedTime) exitWith { 
    cutText [format["wait %1 seconds",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; 
};

at very bottom add:

 lastuse = time;

 

 

Link to comment
Share on other sites

And also a Variable to remove cashMoney would be great...

So if you build the house you need an additional x/y coins to build the house.

And i double checked in my db: i am 10 days alife now...

Also its not even calling the script i think :/

(By the way, thx again :))

Link to comment
Share on other sites

For coins cost...

 

_costs = 200;

if !([ player,_costs] call SC_fnc_removeCoins) then {
		titleText [format["Needs %1 %2 .",_costs,CurrencyName] , "PLAIN DOWN", 1];
	} else {
	titleText [format["Pay %1 por %2 %3",_costs,CurrencyName] , "PLAIN DOWN", 1];

 

Link to comment
Share on other sites

if u wanna get more realism with costs ...Buy architectural plan in WholeSaler  doing this:

into your selfactions

find:

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "GUE_WarfareBFieldhHospital")) then {

place above:

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "RU_Citizen4")) then {

if (s_player_cost < 0) then {
    s_player_cost = player addAction ["<t color='#ff5200'>BUY ARCHITECTURAL PLAN
</t>", "custom\scripts\house\costs.sqf", [], 5, false];
    };
    } else {
    player removeAction s_player_cost;
    s_player_cost = -1;
    };

**now find:

  player removeAction s_player_hospitalhero;
    s_player_hospitalhero = -1;

place above:

 player removeAction s_player_cost;
    s_player_cost = -1;

*NOW CREATE A NEW SQF CALLED "costs.sqf" drop into custom\scripts\house\

costs.sqf

  Reveal hidden contents

now in each house.sqf  (large,medium,small)

example with smallhouse.sqf add lines in red

  Reveal hidden contents
  Reveal hidden contents
  Reveal hidden contents

Then go to your server, use scrollmenu in your wholesaler and pick "Buy architectural plan"

Link to comment
Share on other sites

so the big house now works flawless, but i think it´s removing the coins too soon in the script.

Because if you don´t have all the crafting stuff you need, but have the coins in the inventory it will remove the coins, but still show you that there are some parts missing... is it possible to make the remove coins thing at the end of the script?

But after all: Still awesome work @juandayz :D

Link to comment
Share on other sites

try lines in red:

example for mediumhouse.sqf  (not tested)

  Reveal hidden contents

 

near of the end

  Reveal hidden contents

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...