Jump to content

[TUTORIAL] Harvestable hemp, smoking weed, pot farms.


FragZ

Recommended Posts

  • 4 weeks later...
  • 1 month later...
  • 3 months later...

here is a link i shared for the advanced crafting system, that has the extra rc in it.

Hope this helps.  Also,  I've modified this script to smoke 2 ways, RC on weed or scroll on hooka, hooka makes bubble  sounds and coughing.  Roll around animation,  RC make coughing sound, fully heals you LOL, and has a blurry screen, but you can still fight.  And you can grow weed too lol

 

On 7/14/2015 at 9:31 PM, weltoncamargo said:

I want a song to smoke, someone to help?

as for this, all you need to do is add this line of code in the smoke.sqf (file that creates the effect)

playSound "cough";
    sleep 3;
    playSound "cough";

and add this in your description.ext in your "class CfgSounds" area

 

 

class cough
    {
    name="cough";
    sound[]={YOUR\PATH\cough.ogg,0.9,1};
    titles[] = {};
    };

 

 

change the path to fit your needs and the value "cough" is the name of my sound, it can be anything you choose.

 

Hope this helps

 

 

 

Link to comment
Share on other sites

  • 4 weeks later...

Script works great, I am having one issue though. I used HALV's script to spawn random fields every restart, It works and spawns them but it dosent get marked on the map for some reason. I checked and i couldn't find any error in the RPT but it will leave a pastebin of it.

Pastebin: http://pastebin.com/84ETnv40

Any help would be greatly appreciated! 

Link to comment
Share on other sites

I got a problem with my smokeshit.sqf.

I don't get any blur effects.

/*
    by: ZeroK00L
    */
    [] spawn {
    hint "You roll a fatty and smoke it! Damn! That shit is the chronic!";
    player removeMagazine 'ItemKiloHemp';
    Remove_Drug_effects =
    {
    {
    ppEffectDestroy _x;
    } forEach (_this select 0);
    ppEffectDestroy ppe2;
    ppEffectDestroy ppe3;
    setaperture 0;
    };
    _time = time;
    _effects = [];
	player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01";
    while {true} do
    {
    ppe2 = ppEffectCreate ["chromAberration", 1555];
    _effects = _effects + [ppe2];
    ppe2 ppEffectAdjust [random 0.25,random 0.25,true];
    ppe2 ppEffectCommit 1;
    ppe2 ppEffectEnable true;
    ppe3 = ppEffectCreate ["radialBlur", 1555];
    _effects = _effects + [ppe3];
    ppe3 ppEffectEnable true;
    ppe3 ppEffectAdjust [random 0.02,random 0.02,0.15,0.15];
    ppe3 ppEffectCommit 1;
    sleep random(1);
	r_player_blood = r_player_bloodTotal;            //set their blood to the maximum allowed
	r_player_lowblood = false;                        //set lowblood setting to false
	10 fadeSound 1;                                    //slowly fade their volume back to maximum
	"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;    //disable post processing blur effect
	"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;    //give them their colour back
	r_player_lowblood = false;                        //just double checking their blood isnt low
	player setVariable["USEC_BloodQty",r_player_bloodTotal,true];    //set their blood back up to maximum again
    if (_time + 60 < time) exitWith {[_effects] call Remove_Drug_effects;};
    };
    };

 

Link to comment
Share on other sites

This smokeshit.sqf works

 /*
by: ZeroK00L
*/
[] spawn {
hint "You roll a fatty and smoke it! Damn! That shit is the chronic!";
player removeMagazine 'ItemKiloHemp';
Remove_Drug_effects =
{
{
ppEffectDestroy _x;
} forEach (_this select 0);
ppEffectDestroy ppe2;
ppEffectDestroy ppe3;
setaperture 0;
};
_time = time;
_effects = [];
player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01";
while {true} do
{
ppe2 = ppEffectCreate ["chromAberration", 1555];
_effects = _effects + [ppe2];
ppe2 ppEffectAdjust [random 0.25,random 0.25,true];
ppe2 ppEffectCommit 1;
ppe2 ppEffectEnable true;
ppe3 = ppEffectCreate ["radialBlur", 1555];
_effects = _effects + [ppe3];
ppe3 ppEffectEnable true;
ppe3 ppEffectAdjust [random 0.02,random 0.02,0.15,0.15];
ppe3 ppEffectCommit 1;
sleep random(1);
if (_time + 60 < time) exitWith {[_effects] call Remove_Drug_effects;};
};
}

Link to comment
Share on other sites

6 hours ago, nidico100 said:

I got a problem with my smokeshit.sqf.

I don't get any blur effects.


/*
    by: ZeroK00L
    */
    [] spawn {
    hint "You roll a fatty and smoke it! Damn! That shit is the chronic!";
    player removeMagazine 'ItemKiloHemp';
    Remove_Drug_effects =
    {
    {
    ppEffectDestroy _x;
    } forEach (_this select 0);
    ppEffectDestroy ppe2;
    ppEffectDestroy ppe3;
    setaperture 0;
    };
    _time = time;
    _effects = [];
	player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01";
    while {true} do
    {
    ppe2 = ppEffectCreate ["chromAberration", 1555];
    _effects = _effects + [ppe2];
    ppe2 ppEffectAdjust [random 0.25,random 0.25,true];
    ppe2 ppEffectCommit 1;
    ppe2 ppEffectEnable true;
    ppe3 = ppEffectCreate ["radialBlur", 1555];
    _effects = _effects + [ppe3];
    ppe3 ppEffectEnable true;
    ppe3 ppEffectAdjust [random 0.02,random 0.02,0.15,0.15];
    ppe3 ppEffectCommit 1;
    sleep random(1);
	r_player_blood = r_player_bloodTotal;            //set their blood to the maximum allowed
	r_player_lowblood = false;                        //set lowblood setting to false
	10 fadeSound 1;                                    //slowly fade their volume back to maximum
	"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;    //disable post processing blur effect
	"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;    //give them their colour back
	r_player_lowblood = false;                        //just double checking their blood isnt low
	player setVariable["USEC_BloodQty",r_player_bloodTotal,true];    //set their blood back up to maximum again
    if (_time + 60 < time) exitWith {[_effects] call Remove_Drug_effects;};
    };
    };

 

If it works for some and not others try this

i have some players on my server that it doesnt work, we figured out that they ran the game with different video settings in arma 2.  Im not sure exactly what to change to what, but it has to do with the post process settings and the resolution in arma.

 

Link to comment
Share on other sites

46 minutes ago, theduke said:

If it works for some and not others try this

i have some players on my server that it doesnt work, we figured out that they ran the game with different video settings in arma 2.  Im not sure exactly what to change to what, but it has to do with the post process settings and the resolution in arma.

 

Oh okay thanks for the information :)

Link to comment
Share on other sites

My screen just turns entirely white when I smoke weed ... PP is enabled... here's my smokeshit.sqf:

No errors in RPT or anything .. the animations/smoke works fine with PP disabled but with PP enabled I can't see anything .. it's just .. white .. :( *PP + white = ??? :blink:*

 

Spoiler

 


 [] spawn {
    hint "You just smoked a huge blunt! Feel the high kick in! (lasts 90 seconds)";
    player removeMagazine 'ItemKiloHemp';
    player setDamage 0;
    r_player_inpain = false;
    r_player_injured = false;
    dayz_hunger    = dayz_hunger + 0.4;
    dayz_thirst = dayz_thirst + 0.4;
    r_player_lowblood = 	false;
    dayz_sourceBleeding =	objNull;
    player setVariable ["USEC_injured",false,true];
   {player setVariable[_x,false,true];} forEach USEC_woundHit;
    player setVariable['medForceUpdate',true,true];
	
    Remove_Drug_effects =
    {
		{ppEffectDestroy _x;} forEach (_this select 0);
		ppEffectDestroy ppe2;
		ppEffectDestroy ppe3;
		setaperture 0;
	};
	
    _time = time;
    _effects = [];
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01";
    while {true} do
		{
		_smoke = "SmokeShellGreen" createVehicle position player;
		if (vehicle player != player) then { _smoke attachTo [vehicle player,[0,0,0]];}
		else {_smoke attachTo [player,[0,0,0]];};
		ppe2 = ppEffectCreate ["chromAberration", 1555];
		_effects = _effects + [ppe2];
		ppe2 ppEffectAdjust [random 0.25,random 0.25,true];
		ppe2 ppEffectCommit 1;
		ppe2 ppEffectEnable true;
		ppe3 = ppEffectCreate ["radialBlur", 1555];
		_effects = _effects + [ppe3];
		ppe3 ppEffectEnable true;
		ppe3 ppEffectAdjust [random 0.02,random 0.02,0.15,0.15];
		ppe3 ppEffectCommit 1;
		sleep random(1);
		if (_time + 90 < time) exitWith {[_effects] call Remove_Drug_effects;};
		};
 };

 

 

Link to comment
Share on other sites

4 hours ago, Infinity said:

My screen just turns entirely white when I smoke weed ... PP is enabled... here's my smokeshit.sqf:

No errors in RPT or anything .. the animations/smoke works fine with PP disabled but with PP enabled I can't see anything .. it's just .. white .. :( *PP + white = ??? :blink:*

 

Hidden Content

 

Arma is very odd, As @theduke said it works with some video settings but not all. I guess that's arma for ya.

Link to comment
Share on other sites

i built a custom weed plantation with buildings, loot crates and a wai mission.

if anyone wants it just pm me

njF0Y6H.jpg

This is one part of the farm :) i tried to make it a bit realistic and detailed (on the pic i cutted the weed so you can see the house better)

Link to comment
Share on other sites

9 hours ago, Infinity said:

My screen just turns entirely white when I smoke weed ... PP is enabled... here's my smokeshit.sqf:

No errors in RPT or anything .. the animations/smoke works fine with PP disabled but with PP enabled I can't see anything .. it's just .. white .. :( *PP + white = ??? :blink:*

 

Hidden Content

 

This happened to me, i had to play around with my video settings.  Chances are if you DID modify them for performance, they are wrong.  Screenshot your current settings, then go to defaults and mess around with the post process setting and resolution.  The "resolution" needs to be different than the (i think its the "3d resolution")  Been a while since i've been in the settings menu...working could be off a bit lol.  Let me know if you cant figure it out and ill check my settings when i get back

Link to comment
Share on other sites

On 9-1-2016 at 3:24 AM, theduke said:

This happened to me, i had to play around with my video settings.  Chances are if you DID modify them for performance, they are wrong.  Screenshot your current settings, then go to defaults and mess around with the post process setting and resolution.  The "resolution" needs to be different than the (i think its the "3d resolution")  Been a while since i've been in the settings menu...working could be off a bit lol.  Let me know if you cant figure it out and ill check my settings when i get back

Ah, that makes a lot of sense. I'll give it a try, thank you!

Link to comment
Share on other sites

  • 4 weeks later...
On 1/8/2016 at 9:10 AM, Infinity said:

My screen just turns entirely white when I smoke weed ... PP is enabled... here's my smokeshit.sqf:

No errors in RPT or anything .. the animations/smoke works fine with PP disabled but with PP enabled I can't see anything .. it's just .. white .. :( *PP + white = ??? :blink:*

 

Hidden Content

 

Turning up Postprocess Effects and PPAA fixed this for me. (video options / advanced)

Link to comment
Share on other sites

Map markers are not showing for players when InfiStar is installed on the server (everything else works perfectly). Admins can see the markers. When I remove InfiStar everything works perfectly including the markers.  I am having the exact same problem with another script that puts a players name on any marks they make on the map in game. InfiStar v1430. Does anyone have a fix for this?

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 months later...
  • 2 months later...

Copy and replace hemp.sqf. Don't know if anyone else has fixed the dupes but i did. Players removing plant at same time. Macro Dupe As well as multi click on same plant untill it is harvested.

 

Spoiler

private ["_gearmenu","_playerPos","_nearWeed","_weed","_countplayers","_objectID","_objectUID"];
_playerPos = getPosATL player;
_hempqty = {_x == "ItemKiloHemp"} count magazines player;
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
_weed = nearestObject [player, "fiberplant"];
_countplayers = count nearestObjects [player, ["CAManBase"], 15];
if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a player or zombie is within 15 metres!"], "PLAIN DOWN"]; };

if !(_nearWeed) exitWith {
    cutText [format["You need to be near the good shit in order to gather the Kush bro."], "PLAIN DOWN"];
};
if (_hempqty > 0) exitWith { 
    cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! Stash it in your bag. Hurry!!! ;)", name player], "PLAIN DOWN"];
};
if (dayz_combat == 1) then { 
    cutText [format["You are in Combat and Cannot Gather the Kush."], "PLAIN DOWN"];
} else {
    disableSerialization;
    _gearmenu = FindDisplay 106;
    _gearmenu CloseDisplay 106;
    r_interrupt = false;
    _objectID = _weed getVariable["ObjectID","0"];
    _objectUID = _weed getVariable["ObjectUID","0"];
    deleteVehicle _weed;
    [_objectID,_objectUID] call server_deleteObj;
    _weed setDamage 1;
    player addMagazine "ItemKiloHemp";
    sleep 2;
    cutText [format["You got the weed!!"], "PLAIN DOWN"];    
};

 

Link to comment
Share on other sites

Here is my hemp.sqf aswell. Warning for mature.

Spoiler

private ["_inVehicle","_vehicle","_gearmenu","_playerPos","_nearWeed","_weed","_countplayers","_objectID","_objectUID"];
_playerPos = getPosATL player;
_hempqty = {_x == "ItemKiloHemp"} count magazines player;
_nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
_weed = nearestObject [player, "fiberplant"];
_countplayers = count nearestObjects [player, ["CAManBase"], 5];
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);

if (_inVehicle) exitWith {
 cutText [format["Nah dude, get your ass out and harvest pussy!!"], "PLAIN DOWN"]; 
 };

//prevent same plant at same time with multi players

if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a some bitch is within 5 metres!"], "PLAIN DOWN"]; };

if !(_nearWeed) exitWith {
    cutText [format["Gotta get closer to gather the Kush bro."], "PLAIN DOWN"];
};

//prevent macro dupe set 0
if (_hempqty > 0) exitWith { 
    cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! Stash it in your bag. Hurry Fucker!!! ;)", name player], "PLAIN DOWN"];
};
if (dayz_combat == 1) then { 
    cutText [format["You are in Combat and Cannot Gather the Kush."], "PLAIN DOWN"];
} else {
    disableSerialization;
    _gearmenu = FindDisplay 106;
    _gearmenu CloseDisplay 106;
    r_interrupt = false;
    _objectID = _weed getVariable["ObjectID","0"];
    _objectUID = _weed getVariable["ObjectUID","0"];
    deleteVehicle _weed;
    [_objectID,_objectUID] call server_deleteObj;
    _weed setDamage 1;
    player addMagazine "ItemKiloHemp";
    sleep 2;
    cutText [format["You've Gathered Some Of That Fuck You Up Stupid Slap Yo Granny Kush! Smoke that shit or sell it at the Risky Ass Gem Trader !!"], "PLAIN DOWN"];    
};

 

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
  • Advertisement
×
×
  • Create New...