Jump to content

[RELEASE] Smoke weed Dukes Style!


theduke

Recommended Posts


Created by: infistar  Credits to infistar for the actual script
        Edited by FragZ
        Re-Edited By TheDuke™ for different effects


Ok so here is my version of Smoke Hemp for Epoch 1.0.6.1

- When you right click on a kilo of hemp, you can smoke it. It will fully heal you, and give you the munchies a bit.
You will get a 60 second blur effect, but the effect is medium. And you can still move around, partially see and shoot.
The idea was to be able to heal while doing a mission, but kinda have a bit of effects to make it somewhat like real life LOL

- You can also smoke at hookas on the map, or the ones used in the gem crafting.
While looking at the hooka you get the option to "smoke pipe".
This one does the normal effect of rolling on the ground with the massive screen blur. Meant to be done at base ;)

Download from the github
https://github.com/theduke77/Smoke-weed-Epoch-1.0.6.1

Place the smokeweed folder in your customs folder. If you dont have one create one.

1. Open your custom fn_selfactions.sqf

Place this at the bottom

//Smoke Bong
    _isbong = typeOf cursorTarget in ["Land_Water_pipe_EP1"];    
if((_isbong) && _canDo) then {
                if (s_player_pipe < 0) then {
                s_player_pipe = player addAction["Smoke Pipe", "custom\smokeweed\pipesmoke.sqf","", 1, true, true, "", ""];
    };
        } else {
    player removeAction s_player_pipe;
    s_player_pipe = -1;
        };

 

Still in the fn_selfactions look for

player removeAction s_player_manageDoor;
    s_player_manageDoor = -1;

add this bellow

player removeAction s_player_pipe;
    s_player_pipe = -1;


        
save and close

2. Open your extra_rc.hpp and add this

class ItemKiloHemp {
        class smokeweed {
            text = "Smoke the shit";
            script = "execVM 'custom\smokeweed\smokeweed.sqf'";
        };
    };

2b. Alternatively for the right click, you can do this to your config.sqf if you use  the Deploy anything script

["ItemKiloHemp","Smoke that shit","execVM 'custom\smokeweed\smokeweed.sqf';","true"] // only comma at the end if its not the last line

    
save and close

3. Open your description.ext

Add this in your CfgSounds

  

 class cough
    {
    name="cough";
    sound[]={custom\smokeweed\cough.ogg,0.9,1};
    titles[] = {};
    };
     
    class bong
    {
    name="bong";
    sound[]={custom\smokeweed\bong.ogg,0.9,1};
    titles[] = {};
    };    


    
Save and close

4. Open your variables.sqf

Look for 

dayz_resetSelfActions = {

add this before the closing bracket     };

s_player_pipe = -1;

Repack your mission and you're good to go!

Enjoy...not too much ;)

 

EDIT: 22/03/2017 Updated for client RPT error
 

Link to comment
Share on other sites

@theduke  whats about if u add the hooker ... pay sex with drugs

hookers.sqf (mpmissions\your instance\hookers\ )

Spoiler

private [ "_camera", "_Message", "_camDistance","_hasitem"];
_Message = format["Wow this lady is fking awesome! %1,",format["%1", name player]];
_camDistance = 60;

_hasitem = "ItemKiloHemp" in magazines player;
 
  if (!_hasitem) exitWith {cutText [format["first give me something to smoke"], "PLAIN DOWN"];};

   showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_Message, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

sex.ogg (sound)  (same location)

http://www.mediafire.com/file/rr9kio9q9lwkiop/sex.ogg

into description.ext

Spoiler

Find:


aiKills = 1;
diagRadio = 1;
diagHit = 1;

below paste:
 


class CfgSounds
{
hookers[] =
    {
    sex
    };
    class sex
    {
    name="sex";
    sound[]={hookers\sex.ogg,0.9,1};
    titles[] = {};
    };       
};

 

in a custom fn_selfactions.. and very bottom

Spoiler

/////////////sex//
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["Hooker1"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_sex2 < 0) then {
            s_player_sex2 = player addaction[("<t color=""#F7D708"">" + ("Sex for Drugs") +"</t>"),"hookers\hooker.sqf"];
        };
    } else {
        player removeAction s_player_sex2;
        s_player_sex2 = -1;
    };

Now add the Ai "Hooker1" in somewhere on the map

for example in stary

["Hooker1", [6293.7876, 7837.8843, 3.0517578e-005],0],

 

Link to comment
Share on other sites

  • 1 month later...

@theduke Thanks for sharing this script, can I ask how you spawn in your hemp plants for players to cut?

I currently spawn in fibre plants via the epochevents array in init.sqf using the method in @juandayz script, and I am wondering if there is a way to spawn say 5 or 6 different plantations of hemp plants around the map at server start in random spots and have an option to have their locations published on the map or not?

thanks

Link to comment
Share on other sites

On 23.3.2017 at 1:28 PM, juandayz said:

@theduke  whats about if u add the hooker ... pay sex with drugs

hookers.sqf (mpmissions\your instance\hookers\ )

  Hide contents

private [ "_camera", "_Message", "_camDistance","_hasitem"];
_Message = format["Wow this lady is fking awesome! %1,",format["%1", name player]];
_camDistance = 60;

_hasitem = "ItemKiloHemp" in magazines player;
 
  if (!_hasitem) exitWith {cutText [format["first give me something to smoke"], "PLAIN DOWN"];};

   showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_Message, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

sex.ogg (sound)  (same location)

http://www.mediafire.com/file/rr9kio9q9lwkiop/sex.ogg

into description.ext

  Reveal hidden contents

Find:



aiKills = 1;
diagRadio = 1;
diagHit = 1;

below paste:
 



class CfgSounds
{
hookers[] =
    {
    sex
    };
    class sex
    {
    name="sex";
    sound[]={hookers\sex.ogg,0.9,1};
    titles[] = {};
    };       
};

 

in a custom fn_selfactions.. and very bottom

  Reveal hidden contents

/////////////sex//
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["Hooker1"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_sex2 < 0) then {
            s_player_sex2 = player addaction[("<t color=""#F7D708"">" + ("Sex for Drugs") +"</t>"),"hookers\hooker.sqf"];
        };
    } else {
        player removeAction s_player_sex2;
        s_player_sex2 = -1;
    };

Now add the Ai "Hooker1" in somewhere on the map

for example in stary


["Hooker1", [6293.7876, 7837.8843, 3.0517578e-005],0],

 

@juandayz is this for "standalone" too? And maybe the hooker take coins?

I wanna see who is willing to pay for sex :tongue:

Link to comment
Share on other sites

56 minutes ago, Voltan said:

@theduke Thanks for sharing this script, can I ask how you spawn in your hemp plants for players to cut?

I currently spawn in fibre plants via the epochevents array in init.sqf using the method in @juandayz script, and I am wondering if there is a way to spawn say 5 or 6 different plantations of hemp plants around the map at server start in random spots and have an option to have their locations published on the map or not?

thanks

Disregard, I found a method to do it in FragZ's original Harvest weed post found here incase anyone else want to do the same:

 

Link to comment
Share on other sites

On 3/23/2017 at 7:28 AM, juandayz said:

@theduke  whats about if u add the hooker ... pay sex with drugs

hookers.sqf (mpmissions\your instance\hookers\ )

  Reveal hidden contents

private [ "_camera", "_Message", "_camDistance","_hasitem"];
_Message = format["Wow this lady is fking awesome! %1,",format["%1", name player]];
_camDistance = 60;

_hasitem = "ItemKiloHemp" in magazines player;
 
  if (!_hasitem) exitWith {cutText [format["first give me something to smoke"], "PLAIN DOWN"];};

   showCinemaBorder true;
   camUseNVG false;               
   _camera = "camera" camCreate [(position player select 0)-2, position player select 1,(position player select 2)+_camDistance];
   _camera cameraEffect ["internal","back"];
   
   _camera camSetFOV 2.000;
   _camera camCommit 0;
   waitUntil {camCommitted _camera};
   playsound "sex";
 
   _camera camSetTarget vehicle player;
   _camera camSetRelPos [0,0,2];
   _camera camCommit 12;
 
   cutText [_Message, "PLAIN DOWN"];

   waitUntil {camCommitted _camera};
 
  _camera cameraEffect ["terminate","back"];
  camDestroy _camera;

sex.ogg (sound)  (same location)

http://www.mediafire.com/file/rr9kio9q9lwkiop/sex.ogg

into description.ext

  Hide contents

Find:



aiKills = 1;
diagRadio = 1;
diagHit = 1;

below paste:
 



class CfgSounds
{
hookers[] =
    {
    sex
    };
    class sex
    {
    name="sex";
    sound[]={hookers\sex.ogg,0.9,1};
    titles[] = {};
    };       
};

 

in a custom fn_selfactions.. and very bottom

  Hide contents

/////////////sex//
private["_playerPos","_neartrader"];

_playerPos = getPosATL player;
_neartrader = count nearestObjects [_playerPos, ["Hooker1"], 3] > 0;
 
if (_neartrader) then {
        if (s_player_sex2 < 0) then {
            s_player_sex2 = player addaction[("<t color=""#F7D708"">" + ("Sex for Drugs") +"</t>"),"hookers\hooker.sqf"];
        };
    } else {
        player removeAction s_player_sex2;
        s_player_sex2 = -1;
    };

Now add the Ai "Hooker1" in somewhere on the map

for example in stary


["Hooker1", [6293.7876, 7837.8843, 3.0517578e-005],0],

 

Oh snap i did not see this. I have all the hookers on my server 1-4 as risky traders no safezones this is getting aded now thanks. lol

Link to comment
Share on other sites

@theduke thanks for sharing!

It works for me without this:

Spoiler

Still in the fn_selfactions look for


player removeAction s_player_manageDoor;
    s_player_manageDoor = -1;

add this bellow


player removeAction s_player_pipe;
    s_player_pipe = -1;

P.D: By the way, I make my hookah in my deploys:biggrin:

Spoiler

["equip_hose",[0,1,1],5,1,true,true,true,false,false,false,false,["Land_Water_pipe_EP1"],[],["equip_hose","PartWoodLumber","ItemKiloHemp","TrashJackDaniels"],"true"],

 

 

Link to comment
Share on other sites

2 hours ago, S4M said:

@theduke thanks for sharing!

It works for me without this:

  Reveal hidden contents

Still in the fn_selfactions look for



player removeAction s_player_manageDoor;
    s_player_manageDoor = -1;

add this bellow



player removeAction s_player_pipe;
    s_player_pipe = -1;

P.D: By the way, I make my hookah in my deploys:biggrin:

  Reveal hidden contents

["equip_hose",[0,1,1],5,1,true,true,true,false,false,false,false,["Land_Water_pipe_EP1"],[],["equip_hose","PartWoodLumber","ItemKiloHemp","TrashJackDaniels"],"true"],

 

 

it works, but throws a client RPT spam which causes FPS to drop

Link to comment
Share on other sites

  • 1 year later...
20 hours ago, freakneek said:

this is not working for me :-(
installed as per instructions and there is  nothing in the RPT
any ideas?

 

What part isn't working? Not spawning weed around the map? Can't smoke weed?

More detail please

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...