Jump to content

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


FragZ

Recommended Posts

Yeah, finally got it.

 

some kinda typo, grrr :D

 

now the marker shown on the map. not via server_monitor.sqf,  but via init.sqf !

 

Thannxxx again for everything got this script to run ;-)

 

now we can look for the static fields and the AI patrols around them ^^

 

Cheers

you're welcome. you'll have to add ai though, they aren't apart of this script. I actually incorporated weed plants into my DZMS missions so the AI at DZMS missions are guarding them.

Link to comment
Share on other sites

the reason you're having trouble getting it to run from your init.sqf is because you're calling it like this

execVM "\z\addons\dayz_server\buildings\weedfarm.sqf";

First you're attempting to call a script in the server PBO from the mission init.sqf... you cant really do that. The script would have to be located somewhere in the mission folder.  In the directions I gave you, I told you to put it in a folder called scripts and call it like this

//Weed Farms
[] execVM "scripts\weedfarms.sqf";

if you had followed my instructions completely this would have worked for you :)

Link to comment
Share on other sites

how can we have those amazing effects???

 

http://youtu.be/TFWi3chu1Xg?t=15m56s

 

those are the best visions i´ve ever seen..   :D

 

hopefully it is not video edited like photoshopped -.-

 

b7igk6.jpg

 

Thats a Footage from my servers. This is what I use :

 [] 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
    {
	Flare = "SmokeShellGreen" createVehicle position player;
	if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
	else {Flare 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

@Gr8

 

JahRastafari LOL, i would be overwhelmed if ican get this to run...  best visuals i´ve ever seen in any computer game. this optics were very close to real life ;-)  amazing job!!!

 

i make copy pasta into a new smokeshit.sqf         (after right click on hemp, i click on smoke weed, but it wont start)

 

then i make everything reverse, choose the old file, that worked...

 

after that i tried to make it fit with my old script, but it wont work either...whats wrong?

 

my non working smokeshit.sqf that have to  works :D  

 [] spawn {
    hint "You just smoked a huge blunt and youre now high as crazy fuck (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
    {
Flare = "SmokeShellGreen" createVehicle position player;
if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
else {Flare 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;};
 }; 

 

my working smokeshit.sqf

/*
by: http://infiSTAR.deCreditstoinfistarforthe actual script
Edited by FragZ

*/
//Add this part after *while {true} do {* to add a smoke effect
/* Flare = "SmokeShellGreen" createVehicle position player;
if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
else {Flare attachTo [player,[0,0,0.]];}
*/
[] spawn {
hint "You took drugs YOLOLOLO";
player removeMagazine 'ItemKiloHemp';
Remove_Drug_effects =
{
{
ppEffectDestroy _x;
} forEach (_this select 0);
ppEffectDestroy nonapsi_ef;
ppEffectDestroy wetdist1;
ppEffectDestroy ppe;
ppEffectDestroy ppe2;
ppEffectDestroy ppe3;
setaperture 0;
"dynamicBlur" ppEffectAdjust [0];
"dynamicBlur" ppEffectCommit 16;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 0;
};
_time = time;
_effects = [];
while {true} do
{
nonapsi_ef = ppEffectCreate ["colorCorrections", 1555];
_effects = _effects + [nonapsi_ef];
nonapsi_ef ppEffectEnable true;
nonapsi_ef ppEffectAdjust [1.0, 1.0, -0.03, [0.0, 0.0, 0.0, 0.0], [3.0, 5.0, 9.0, 5.0],[0.4,0.0,0.0, 0.7]];
nonapsi_ef ppEffectCommit 1;
sleep random(1);
wetdist1 = ppEffectCreate ["wetDistortion", 2006];
_effects = _effects + [wetdist1];
wetdist1 ppEffectAdjust [0, 8, 0.8,8,8, 0.2, 1, 0, 0, 0.08, 0.08, 0, 0, 0, 0.77];
wetdist1 ppEffectEnable true;
wetdist1 ppEffectCommit 0;
ppe = ppEffectCreate ["colorCorrections", 1555];
_effects = _effects + [ppe];
ppe ppEffectAdjust [1, 1, 0, [1.5,6,2.5,0.5], [5,3.5,5,-0.5], [-3,5,-5,-0.5]];
ppe ppEffectCommit 1;
ppe ppEffectEnable true;
ppe2 = ppEffectCreate ["chromAberration", 1555];
_effects = _effects + [ppe2];
ppe2 ppEffectAdjust [0.01,0.01,true];
ppe2 ppEffectCommit 1;
ppe2 ppEffectEnable true;
ppe3 = ppEffectCreate ["radialBlur", 1555];
_effects = _effects + [ppe3];
ppe3 ppEffectEnable true;
ppe3 ppEffectAdjust [0.02,0.02,0.15,0.15];
ppe3 ppEffectCommit 1;
sleep random(1);
wetdist1 = ppEffectCreate ["wetDistortion", 2006];
_effects = _effects + [wetdist1];
wetdist1 ppEffectAdjust [1, 1.16, 0.32, 2.56, 0.8, 0.64, 2.64, 0, 0, 1.08, 0.08, 0, 0, 0, 1.77];
wetdist1 ppEffectEnable true;
wetdist1 ppEffectCommit 0;
sleep random(1);
nonapsi_ef = ppEffectCreate ["colorCorrections", 1555];
_effects = _effects + [nonapsi_ef];
nonapsi_ef ppEffectEnable true;
nonapsi_ef ppEffectAdjust [1.0, 1.0, -0.02, [9.5, 1.5, 2.5, 0.2], [2.0, 7.0, 6.0, 2.0],[0.4,0.0,0.0, 0.7]];
nonapsi_ef ppEffectCommit 1;
sleep random(1);
if (_time + 60 < time) exitWith {[_effects] call Remove_Drug_effects;};
};
}; 

Link to comment
Share on other sites

JahRastafari LOL, i would be overwhelmed if ican get this to run...  best visuals i´ve ever seen in any computer game. this optics were very close to real life ;-)  amazing job!!!

 

This video was taken ages ago. And people felt like they were overdosing estacy with cocaine, so i tuned it down a bit. I might have the old files tho.

 

But beware that if you want the effects in the video, you need to turn your video settings at high.

Link to comment
Share on other sites

Try this out btw i found the error with notepad++ yall should look it was not closeing the first one

 

[] spawn {

    hint "You just smoked a huge blunt and youre now high as crazy fuck (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
    {
Flare = "SmokeShellGreen" createVehicle position player;
if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
else {Flare 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

yeah, weed sounds like John Digweed ;-)

 

 

uhm, nope, sorry, dont works...i am a total noob with c++

 

maybe with the moving Anim?  maybe i dont have that?

 

or maybe bad language inside blocked by infistar?

 

this drives me crazy....still cant get it....

Link to comment
Share on other sites

yeah, weed sounds like John Digweed ;-)

 

 

uhm, nope, sorry, dont works...i am a total noob with c++

 

maybe with the moving Anim?  maybe i dont have that?

 

or maybe bad language inside blocked by infistar?

 

this drives me crazy....still cant get it....

Im utterly useless with this but he was correct in that there aren't enough closing brackets. If you use Notepad ++ and you use the SQF syntax highlighting, when you click next to a bracket it, and its corresponding closing bracket turn red. 

Im sure gr8 will be able to help.

 

Try this. No promises.

 [] spawn {
    hint "You just smoked a huge blunt and youre now high as crazy fuck (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
    {
Flare = "SmokeShellGreen" createVehicle position player;
if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
else {Flare 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

many thanxx dudes, but it still dont works.

 

if i use your script, Danger, it wont take out the  hemp. i can hear the click sound ingame, but nothing more, no notices about consume, . still no visuals...

 

kinda witchcraft involved???

 

i have an overpoch chernarus server with 1051 and 025 mods installed on an gtxgaming server with actual infistar installed.

 

if u need more informations or any other files, please let me know.

 

the only script iwhich works is this one showed above in post #231.

 

we have the  DayZ Custom Right Click Actions 3.0.3  / deploy anything 2.8 script running, and not maca´s right click options with that special extra_rc.hpp

 

this works well with other right clicks like harvest the weed with knife...

 

i have no clue...

 

good night. 

 

thanks anyway @ all for now to helping me getting this to run...

 

p.s. thanx for the hint to use the Notepad ++ with  SQF syntax highlighting,  i always use the C++ syntax ;-) But thats nearly the same?!?

Link to comment
Share on other sites

Yea it was a real shot in the dark. I just compared my smokeweed.sqf to that one and tried to see whats different. It looked like he had an extra bracket and was missing a closing bracket at the bottom. It could be that the script itself doesn't work. you could try just copying the effects part of that script and adding it to the one I gave you which works.

 

In all honesty, the novelty effect of the crazy high wears off quickly and it just becomes annoying. If you actually want people to use the weed to heal, you won't want such crazy visuals.  We'll have to wait for gr8 to chime in.

Link to comment
Share on other sites

 [] 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
		{
		Flare = "SmokeShellGreen" createVehicle position player;
		if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
		else {Flare 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;};
		};
 };

Here is a modified code. I have fixed the brackets :)

 

Heals Player, Removes thirst, hunger and pain.

Also have green smoke coming from the players head.

Link to comment
Share on other sites

 [] 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
		{
		Flare = "SmokeShellGreen" createVehicle position player;
		if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
		else {Flare 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;};
		};
 };

Here is a modified code. I have fixed the brackets :)

 

Heals Player, Removes thirst, hunger and pain.

Also have green smoke coming from the players head.

 

lol i was just about to post the same thing i fixed it aswell :)

Link to comment
Share on other sites

 [] 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
		{
		Flare = "SmokeShellGreen" createVehicle position player;
		if (vehicle player != player) then { Flare attachTo [vehicle player,[0,0,0.]];}
		else {Flare 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;};
		};
 };

Here is a modified code. I have fixed the brackets :)

 

Heals Player, Removes thirst, hunger and pain.

Also have green smoke coming from the players head.

 

 

 

 

:(  :(  :(

 

still not running...  same as above... can only hear the click sound ingame when rightclick on hemp, but no hemp was taken out and no effects starting...

 

please could someone try this script on his own server, if this is running with the desired effects, and not only check if there´s a bracket missing?

 

And give me an invite to the server to see those effects running by myself?  my steam chat name is: ironblader and my skype is: padidiver0808

 

thanks

 

  the normal script with that C64 Colors still works....

 

i also try only to cut out the effects part, but i cant get it also...

 

this is a really hard one...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...