Jump to content

FragZ

Member
  • Posts

    487
  • Joined

  • Last visited

Reputation Activity

  1. Like
    FragZ got a reaction from Airwaves Man in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  2. Like
    FragZ got a reaction from Fragile in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  3. Like
    FragZ reacted to Zupa in [Alpha Release] Single Currency 3.0 & Storage DEFAULT HIVE ( No global banking).   
    Single Currency 3.0 & Storage DEFAULT HIVE ( No global banking).
     
    AKA: ZSC 
     
     
    RELEASE 1: INDEPENDENT RELEASE ( No converting script yet to convert old SC money to this version).
     
     
     
            REQUEST: If someone is good with MYSQL can he complete the qyuery on the bottom of this post? ^^ limited time here ^^.
     
     
    What is it?
     
    This script replaces gold,silver,tin,copper,briefcases by 1 virtual currency with a configurable name. You can buy,sell, give, receive, take (from dead bodies) and STORE this money like it was a normal inventory item. ( It will work with a different dialog then your gear dialog.) 
     
    No more smelting gold into silver or anything related to that. Everything is in one currency ( For example "ZupasticiumCoins"). 
     
    Features.
     
    Store Money in storage objects and vehicles ( max money in 1 storage depends on the size).  No global access to your money. Anyone can take the money out ( for vault/lockbox it must be open of course). Trade with this currency for cars/items. Give money to other players. NO inventory issues with gold!    
    Whats the difference with your other single currency scripts?
     
    You can use the default hive! No global bank! Back to normal epoch danger to lose cash!  Cleaned up code Very low changes to default saving system. (DB friendly) NO database changes needed. NO ATMs, Safezones, atms in trader whatsoever... Store money in vehicles.  
    Technical data:
    Storage money is saved in the gear section of the object in the Database Player Money is added to gear section of the player in the Database ( Again thanks to maca for pointing this out for me).  
    Extra
     
    This build will have all of the fixes on errors out there ( Build on peterbeers all in on packages with the bugfixes). Reworked the  transfering money between players to be sure trade goes to the right object/player. Store money in vehicles Credits
     
    Maca - Original private single currency. Peterbeer -  for putting all fixes together in 1 pack. Soul - Hives modifications and code changes for it. ( not applied on this script, jsut credited for hard work). Rocu - Great help on forums and fixes. DraftKid - Testing and screenshots  
     
    Please report bugs so I can solve them!
     
     
    The config located IN
    ZSC/gold/ZSCconfig.sqf /* Single Currency 3.0 uses storages to store money which can be accessed by anyone if open of course (safe,lockbox). Each storage has his own money, so no global access. */ // Name of your currency CurrencyName = "Coins"; // Objects that can hold money. Vehicles are added automaticly. Size of money capacity is depended on ammount of magazines the object can hold. ZSC_MoneyStorage = ["VaultStorage","LockboxStorage","StorageShed_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","GunRack_DZ","WoodCrate_DZ","TentStorage","TentStorageDomed","TentStorageDomed2"]; // Multiplier how much money an object can hold. This number X ammount of magazines it can hold. ( so URAL -> 500 items * 1000 = 5 MIL cash). ZSC_MaxMoneyInStorageMultiplier = 1000; // (True = No Animation / False = Animation) InstantTrading = false; // If TRUE: overwrite yours player_switchmodel with mine. | IF False: Change content yourself @ step D ZSC_Overwrite_SwitchModel = true; // if TRUE: Overwrites yours fn_selfactions with default 1 + edits. | IF False: Change content yourself @ step D ZSC_Overwrite_SelfActions = true; // if TRUE: Overwrites yours fn_selfactions with default 1 + edits. | IF False: Change content yourself @ step D ZSC_Overwrite_UnLockVault = true; // if TRUE: Overwrites yours fn_selfactions with default 1 + edits. | IF False: Change content yourself @ step D ZSC_Overwrite_LockVault = true; /* IF YOU USE different mods like P4L it's recommended to do changes yourself or it wont work */ There are pbo's provided for cherno 11. Or follow the installation instructions
     
    https://github.com/EpochSC/SingleCurrencyStorage
     
    Installation instructions. ( TRIED TO KEEP IT NOOB FRIENDLY ^^)
     
     
    If u are going to use the full pbo?!
     
    The missions.sqm is build for OVERPOCH. Delete the overwatch addons if you are just using it for Epoch. 
     
     
     
    MISSION PBO
     
    A ) In your init.sqf:
     
    A 1) You must have 
    /*ZSC*/ DZE_ConfigTrader = true; /*ZSC*/ in the top section ( for example right above "EpochEvents"); Place if you do not have it yet. ZSC requires Config traders, It will also help your server reduce lag!
     
    A 2) PLACE
    /*ZSC*/ call compile preprocessFileLineNumbers "ZSC\gold\ZSCinit.sqf"; /*ZSC*/ ABOVE
    progressLoadingScreen 0.5; A 3) PLACE
    execVM "ZSC\compiles\playerHud.sqf"; RIGHT UNDER
    _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; A 4 )
     
    Change
    call compile preprocessFileLineNumbers "server_traders.sqf"; to
    call compile preprocessFileLineNumbers "server_traders_cherno_11.sqf"; ON THE BOTTOM OF THIS TOPIC THERE WILL BE AN EXPLANATION FOR OTHER MAPS / INSTANCES.
     
    A 5 ) MAKE SURE 
    _serverMonitor = [] execVM "\z\addons\dayz_server\system\server_monitor.sqf"; this line is custom and doesnt have dayz_code in it. It should point at dayz_server or if u use another script to where ever that places it.
     
    B ) In your description.ext
     
    B 1) Place 
    #include "ZSC\config\cfgServerTrader.hpp" on the complete top.
     
    B 2 ) Add if you do not have a RscTitles yet!
    class RscTitles { #include "ZSC\config\ZSChud.hpp" }; at the bottom.
     
    IF U ALREADY HAVE IT just add
    #include "ZSC\config\ZSChud.hpp" behind whatever is in there.
     
    B 3 ) JUST ADD AT THE COMPLETE BOTTOM
    #include "ZSC\config\ZSCdefines.hpp" #include "ZSC\config\ZSCdialogs.hpp" B 4 ) If you come from another currency, u can remove the shit that was extra added in that one  :).
     
    C )  COPY FILES
     
    C 1 ) Place the ZSC folder in your mission pbo ( take it out of the github's missions pbo).
    C 2 ) Place server_traders_cherno_11.sqf in your missions pbo. ( If other map/instance check bottom of the topic.).
     
    D ) fn_selfactions ( IF you use my overwrite, u do not have to to this step.
     
    D 1 )PLACE
    if(_typeOfCursorTarget in ZSC_MoneyStorage && (player distance _cursorTarget < 5)) then { if (s_bank_dialog < 0) then { s_bank_dialog = player addAction ["Money Storage", "ZSC\actions\bank_dialog.sqf",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_bank_dialog; s_bank_dialog = -1; }; // cars if( _isVehicle && !_isMan &&_isAlive && !_isMan && !locked _cursorTarget && !(_cursorTarget isKindOf "Bicycle") && (player distance _cursorTarget < 5)) then { if (s_bank_dialog2 < 0) then { s_bank_dialog2 = player addAction ["Money Storage", "ZSC\actions\bank_dialog.sqf",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_bank_dialog2; s_bank_dialog2 = -1; };  
    AFTER
    } else { {player removeAction _x} count s_player_combi;s_player_combi = []; s_player_unlockvault = -1; }; D 2 )
    if (_isMan and _isAlive and !_isZombie and !_isAnimal and !(_traderType in serverTraders)) then { if (s_givemoney_dialog < 0) then { s_givemoney_dialog = player addAction [format["Give Money to %1", (name _cursorTarget)], "ZSC\actions\give_player_dialog.sqf",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_givemoney_dialog; s_givemoney_dialog = -1; }; ABOVE
    if(_typeOfCursorTarget in dayz_fuelpumparray) then { D 3 ) CHANGE
    if (_player_studybody) then { if (s_player_studybody < 0) then { s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_studybody; s_player_studybody = -1; }; INTO
    if (_player_studybody) then { if (s_player_studybody < 0) then { s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "ZSC\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_studybody; s_player_studybody = -1; }; D 4 ) 
     
    ADD 
    player removeAction s_givemoney_dialog; s_givemoney_dialog = -1; player removeAction s_bank_dialog; s_bank_dialog = -1; player removeAction s_bank_dialog2; s_bank_dialog2 = -1; BEHIND
    player removeAction s_player_towing; s_player_towing = -1; player removeAction s_player_fuelauto; s_player_fuelauto = -1; player removeAction s_player_fuelauto2; s_player_fuelauto2 = -1; D 5 )  TO remove the client side errors u getting add in your VARIABLES.SQF
    s_givemoney_dialog = -1; s_bank_dialog = -1; s_bank_dialog2 = -1; TO
    dayz_resetSelfActions = { E ) player_switchModel.sqf again, if u overwriten with mine in first step, u can skip.
     
    E 1 ) add 
    _cashMoney = player getVariable["cashMoney",0]; behind
    _weapons = weapons player; _countMags = call player_countMagazines; _magazines = _countMags select 0; E 2 ) Add
    player setVariable ["cashMoney",_cashMoney,true]; on the BOTTOM
     
    E 3 ) CHANGE
    //Create New Character _group = createGroup west; _newUnit = _group createUnit [_class,dayz_spawnPos,[],0,"NONE"]; _newUnit setPosATL _position; _newUnit setDir _dir; into
    _group = createGroup west; _newUnit = _group createUnit [_class,dayz_spawnPos,[],0,"NONE"]; [_newUnit] joinSilent createGroup WEST; _newUnit setPosATL _position; _newUnit setDir _dir; _newUnit setVariable ["cashMoney",_cashMoney,true]; F) You can use my unclockVault in ZSCinit, If u got a custom one, do the following changes:
     
    F1)
     
    place 
    _objMoney = _obj getVariable["bankMoney",0]; behind
    _dir = direction _obj; _pos = _obj getVariable["OEMPos",(getposATL _obj)]; _objectID = _obj getVariable["ObjectID","0"]; _objectUID = _obj getVariable["ObjectUID","0"]; F 2)
    place
    _holder setVariable ["bankMoney", _objMoney, true]; behind
    _holder setVariable["CharacterID",_ownerID,true]; _holder setVariable["ObjectID",_objectID,true]; _holder setVariable["ObjectUID",_objectUID,true]; _holder setVariable ["OEMPos", _pos, true]; E) in LockVault.sqf if u got a custom one, otherwise use mine and set true in config:
     
    E1 ) place) 
    _objMoney = _obj getVariable["bankMoney",0]; behind
    _ownerID = _obj getVariable["CharacterID","0"]; _objectID = _obj getVariable["ObjectID","0"]; _objectUID = _obj getVariable["ObjectUID","0"]; E2 ) 
     
    place
    _holder setVariable ["bankMoney", _objMoney, true]; behind
    _holder setVariable["CharacterID",_ownerID,true]; _holder setVariable["ObjectID",_objectID,true]; _holder setVariable["ObjectUID",_objectUID,true]; _holder setVariable ["OEMPos", _pos, true]; SERVER PBO
     
    A ) REPLACE your "compiles/server_tradeObject.sqf"  With my one ( not other script uses that anyways).
     
    B )  IN compiles/server_updateObject.sqf
     
    Change 
    _inventory = [ getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object ]; into
    _inventory = [ getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object /*ZSC*/ , _object getVariable["bankMoney",0] /*ZSC*/ ]; C ) In your server_monitor.sqf ( NOTE: the " _intentory' variable can be called "_inventory" at your files, so change my code to that, if it's the case).
     
    Add
    /*ZSC*/ if( count (_intentory) > 3)then{ _object setVariable ["bankMoney", _intentory select 3, true]; }else{ _object setVariable ["bankMoney", 0, true]; }; /*ZSC*/ ABOVE
    if (_type in DZE_LockedStorage) then { // Fill variables with loot _object setVariable ["WeaponCargo", (_intentory select 0),true]; _object setVariable ["MagazineCargo", (_intentory select 1),true]; _object setVariable ["BackpackCargo", (_intentory select 2),true]; } else { D) in compiles/server_playerSync.sqf
     
    Change
    _playerGear = [weapons _character,_magazines];  into
    _playerGear = [weapons _character,_magazines, _character getVariable["cashMoney",0]];  NOTE:
     
    in the gold init i use a custom gearSet.sqf
    If u would have a custom one, it's defined in the ZSCinit.sqf. Only differnecy will be the top where it checks for the money in your gear sections.
     
     
    FAQ!
     
     
    I use a different instance/map to play one! What do i do?
     
    The only things that difference between maps where u need to worrie about is the server_traders.sqf. I included them for 4 maps, if your map is NOT in there u will have to change your original one.
    FAIR SIMPLE:
     
    1) Take your original server_traders
     
    2) Open one of mine
     
    3) Copy my categories with the correct numbes to your traders. You can choose also which traders sells what then ^^.
     
    4) Share your file to me so i can put it in the list
     
     
    Does it work with Overpoch(ins).
     
    Simple: Yes, Everything with epoch as base.
     
    Overwatch items or included in traders, remove the categories if you do not use them.
     
     
    Can i convert from the older system?
     
    You will have to revert your database to the default structure and maybe transfer money. Banks added to the players cash is the best solution.
     
    How do i see my money and bank?
     
    1 - Bank will not be visible cus their is none. You store money in storages like other items ( but in a different dialog). So the money can be accessed by anyone that has access to that storage.
    2- Money is visisble with a money icon on the right side of the screen. Feel free to add it to other places aswell.
     
    This will return your money:
    player getVariable["cashMoney",0]; Can I use it with database traders?
     
    No, this build is made for config traders. No support (Yet).
     
     
    Screenshots
     
     



     
     
     
     
     
     
    I probably will code this inthe default epoch code and send a merge request to Epoch Devs with an option to do 
    DZE_SingleCurrency = true/false; And if they accept it , it might be in 1.6 ^^
  4. Like
    FragZ reacted to StiflersM0M in Assassination mission on players   
    pushBack only works in ArmA 3.
  5. Like
    FragZ reacted to calamity in Is it possible to add new item, but with...   
    here is the link to what Fragz is saying.....

     
     
    it uses the ItemBriefcase_Base 
    this is the classname for a briefcase that exists but is not used in standard loot 
     
    you could change the addaction words to like  briefcase of Flawless Gold Bars
    then  change the random loot it creates to  different number of gold bars
     
    class ItemBriefcase_Base {
        class OpenSurpriseBrief {
            text = "open briefcase of Flawless Gold Bars";
            script = "execVM 'addons\mbc\open_brief.sqf'";
        };
    };
  6. Like
    FragZ got a reaction from DamianL in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  7. Like
    FragZ reacted to GaspArt in [Release] 1.0 Custom Skin Textures   
    yeah of course:
    something like that:
    in init.sqf         !!! change path and model
    { _moderated = _x getVariable ["moderated",0]; if( !isNil "_moderated" && _moderated != 0)then{ _x setObjectTexture [0, "scripts\gui\upg\moder.jpg"]; }; }forEach playableUnits; // if your antihack doesnt allow this use nearestObjects[player, ["Survivor2_DZ"],25000]; In infistar:
    In menu of moder
     
    adminadd = adminadd + [" Suit UP",moderskinning,"0","0","0","1",[0,0.8,1,1]]; and that after _adminskinning !!!!! !!! change path
    moderskinning = { PVOZ_moderSkin = [player , "scripts\gui\upg\moder.jpg" ]; // (or color , "#(argb,1,1,1)color(0,0,0,1)" ) publicVariable "PVOZ_moderSkin"; player setObjectTexture [0, "scripts\gui\upg\moder.jpg"]; // (to also see it yourself) player setVariable["adminated",1,true]; }; Done lol :3 
  8. Like
    FragZ got a reaction from Mendo in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  9. Like
    FragZ reacted to CordIAsis in Variables called over Server?   
    In your explanation it states that both server_whitelist.sqf and admintools_main.sqf are both serverside, but your one line question at the top states one is serverside one is clientside. That's confused me somewhat. I'm gonna assume that you made an error in your explanation and just go from your one line at the top.
     
    Yes, you can. Once you have initialised your variables serverside you can use publicVariable "my_variable"; to broadcast that to all clients.
    Clientside you can just put them in a hold, waitUntil {!isNil "my_variable"}; then a quick if statement to work out if the player UID is inside the 'my_variable' array. I hope that answered your question properly.
  10. Like
    FragZ reacted to CordIAsis in Variables called over Server?   
    You would use the publicVariable command serverside, as you're wanting to send it from the server to the clients.
    The waitUntil{!isNil "my_var"}; command in the clientside files will stop the script proceeding until the client has received your variable from the server.
    This command will halt progress of the file it is in until the code inside the braces returns true. In this case it checks that the variable you send from your server using publicVariable command has been received by the client. Using this is important to prevent errors relating to your variable being undefined.
     
    Yes! Just like that.
    /****************************************************************************************************************/ //Super admin and Dev testing whitelisting FZ_SuperLovers = ["xxxUIDsxxx"]; Mod_list = ["000"]; FZ_Admins = ["0"]; publicVariable "FZ_SuperLovers"; publicVariable "Mod_List"; publicVariable "FZ_Admins"; That would do the trick just fine. ExecVm that from anywhere serverside and those variable will go to all clients.
  11. Like
    FragZ reacted to CordIAsis in Variables called over Server?   
    You can check for all variables in 1 waitUntil command.
    waitUntil {(!isNil "myvar1") && (!isNil "myvar2") && (!isNil "myvar3")};
  12. Like
    FragZ got a reaction from freakystyle in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  13. Like
    FragZ reacted to Zupa in Looking for someone to install scripts? Send me a PM - Now Including OverPoch   
    I think the epoch forums need some extra moderators ^^
  14. Like
    FragZ reacted to Uro in Looking for someone to install scripts? Send me a PM - Now Including OverPoch   
    Still selling the "installation" of other peoples work?
     
    If you are selling any of the things I've released freely please remove them from your store and/or collection of scripts.
     
    They were released to the community for the community with guides and not for some guy to make a cheap buck off of.
     
    Thanks.
  15. Like
    FragZ reacted to goatservers in Looking for someone to install scripts? Send me a PM - Now Including OverPoch   
    I would personally avoid going to this guy for help. I waited in his ts for over 30 hours For him to then tell me
    <08:39:53> "Vincent Van Goat": would you be able to install a single currency system on my server for a fee
    <10:16:48> "Vincent Van Goat": or would that be too complicated?
    <15:09:16> "Vincent Van Goat": hello?
    <15:09:28> "Vincent Van Goat": i'm not coming here again tomorow just to be ignored
    <17:26:20> "Vincent Van Goat": hello?
    <17:26:33> "Vincent Van Goat": i know it says be patient, but this is becoming stupid
    <17:26:50> "Vincent Van Goat": in total i have probably waited in your ts for 30 hours
    <17:31:37> "[WP] Alexander": you know ive been afk everytime you come by
    <17:31:45> "[WP] Alexander": and im helping YOU
    <17:31:50> "[WP] Alexander": and i dont like your shitty attitude
    <17:31:54> "[WP] Alexander": so you can leave my teamspeak
    So basically after wasting 30 hours of my time he tells me this, nice isn't it, and he obviously isn't afk when i am there because how would he have replied.
     
    Just a warning really, stay clear of asking him to install scripts for you, he charges a fortune for other's work and then is abusive towards you.
  16. Like
    FragZ reacted to vbawol in Proposed UI change   
    I like it! This is certainly something we should add for 1.0.6

    https://github.com/vbawol/DayZ-Epoch/issues/1383
  17. Like
    FragZ got a reaction from DeliciousAce in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  18. Like
    FragZ reacted to SadBoy1981 in Custom debug monitor   
    _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); Before this line write:  _logo = "";
     
    Or you can make your own logo for monitor. Make picture with name logo.paa file must be in format PAA
    Drop file where is init.sqf and replase line into debug monitor with  _logo = "logo.paa";
  19. Like
    FragZ reacted to DangerRuss in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    This didnt work for me.
     
    Oh, I see the problem. Some bad copy pasta I think sir. Your script should look like
    /* by: ZeroK00L */ [] spawn { hint "You roll a fatty and smoke it! Damn! That shit is the chronic!"; player removeMagazine 'ItemKiloHemp'; Remove_Drug_effects = {
  20. Like
    FragZ got a reaction from Brockie in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  21. Like
    FragZ got a reaction from psychosis in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  22. Like
    FragZ got a reaction from HisShadow in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  23. Like
    FragZ got a reaction from Darihon in [TUTORIAL] Harvestable hemp, smoking weed, pot farms.   
    Hello guys! This is my first complete tutorial.

    Today I will show you how to install the Hemp farms scripts and the smoking script.

    First, you will need to install maca's right clickable system, which can be found here:   http://www.epochservers.com/viewtopic.php?f=14&t=13&sid=4d68d5283b8d5635f8323b5ed02979bf

    Then, open up extra_rc.hpp and copy this code in it:
     
    class ExtraRc { class ItemKnife { class farmhemp { text = "Harvest the weed"; script = "execVM 'scripts\hemp.sqf'"; }; }; class ItemKiloHemp { class smokeweed { text = "Smoke the shit"; script = "execVM 'scripts\smokeshit.sqf'"; }; }; }; Edit the text and paths to fit your needs.


    Now create a new text document and paste this in it:

     
    /* put together for DayZ Epoch Credits to Shogun338 from Insurrection gaming modified for separate "gather weed" script */ private ["_gearmenu","_playerPos","_nearWeed","_weed","_objectID","_objectUID"]; _playerPos = getPosATL player; _hempqty = {_x == "ItemKiloHemp"} count magazines player; _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0; _weed = nearestObject [player, "fiberplant"]; if !(_nearWeed) exitWith { cutText [format["You need to be near the weed plants in order to gather."], "PLAIN DOWN"]; }; if (_hempqty > 2) exitWith { cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! You could get arrested by the police ;)", name player], "PLAIN DOWN"]; }; if (dayz_combat == 1) then { cutText [format["You are in Combat and Cannot Gather the Weed."], "PLAIN DOWN"]; } else { disableSerialization; _gearmenu = FindDisplay 106; _gearmenu CloseDisplay 106; player playActionNow "Medic"; r_interrupt = false; sleep 6; _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 Weed! Smoke that shit or sell it at Black market dealer!!"], "PLAIN DOWN"]; }; Save it as hemp.sqf and put it in your scritps folder in the mission pbo.


    Next up, create a new text document and paste this in it (NOTE ALL CREDITS TO INFISTAR FROM DAYZANTIHACK.COM):
     
    /* by: http://infiSTAR.de Credits to infistar for the 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;}; }; }; Save it as smokeshit.sqf and put it in the scripts folder of your mission.pbo
     
    NOTE: THIS SCRIPT LOOKS LIKE  A LSD TRIP. Go to the OPTIONAL part of the tutorial for a mellow version.
     
     
    Finally, open the arma 2 oa map editor and place down whatever buildings you want the weed to be into. Place any type of bushes or barrels or rocks in the editor where you want the weed to be (in my example I used "MAP_b_betulaHumilis". Save the mission.sqf and go to your DOCUMENTS/Arma 2 Other Profiles/Yourprofilename/mission.sqf and open it.



    Change every  MAP_b_betulaHumilis (or any object you placed)
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["MAP_b_betulaHumilis", [4048.9565, 7805.9746], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4048.9565, 7805.9746]; }; to
     
    _vehicle_5 = objNull; if (true) then { _this = createVehicle ["fiberplant", [4050.6616, 7809.3203], [], 0, "CAN_COLLIDE"]; _vehicle_5 = _this; _this setPos [4050.6616, 7809.3203]; }; Do the usual changes for a building file and save it as weedfarm.sqf  then go to your server.pbo and put it in buildings folder.
     
    You can also use this script made by HALV to spawn random fields each restart.
    http://pastebin.com/juMsuJ1r


    Finally, call it in the init/system_functions.sqf at the bottom just like so:
     
    execVM "\z\addons\dayz_server\buildings\weedfarm.sqf"; OPTIONNAL:

    -If you want people to be able to sell it you can add ItemKiloHemp in the traders DATA from your sql table so you can make them be sold.
    Don't forgot to add it to Traders items as well
    - Add this right above while {true} do in smokeshit.sqf  :)
    player playMoveNow "ActsPercMstpSnonWpstDnon_sceneBardak01"; This will add an animation to the player.
    -For a little bit less exagerated smokeshit.sqf script, use this one made by ZeroK00L:
     
    /* 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;}; }; }; If you have any questions you can ask me.

    I DO NOT TAKE CREDITS FOR THE HARVESTING SCRIPT. Credits to original authors.
  24. Like
    FragZ got a reaction from NateDaBeast in Harvestable Hemp   
    You are welcome!
  25. Like
    FragZ got a reaction from bFe in How to place a villa on chernarus?   
    It worked thank you very much! That is what I was planning to do.
×
×
  • Create New...