Treasure Hunt addon for EMS 0.3

brw1990

New Member
Treasure Hunt Addon.

Fully tested and works great.


https://www.dropbox.com/sh/ubfv2kvaydv57jc/GErygVkuZ6



I added this into the ems 0.3 thinking it would be a nice escape for the those survivors who just wanted to do a mission and make some money and not worry about bandits. i own a PvE and its a great addon. it works well with the mission system just gives you a third mission to run.



What it does.



It spawns a crate in a 750x750 Green circle and fills it with gold,silver,copper which can be changed to your liking.



g03g.jpg




which makes the players, have to wonder around this huge circle looking for a little green box on the ground.



You can edit the sayings to those are just what i picked.



98ag.jpg




ffqm.jpg




it sticks with the random select so what ever you put in it, it will random select your items in sets of 10, my box had gold,silver,copper set it in and random selected copper and silver. thus making the treasure hunt each time different and fun. some loot may be shy some maybe great, its like in real games.



88ue.jpg




once the treasure is found it clears itself. And restarts the timer.



d0ub.jpg




Set up - moderate.

need notepad++

basic knowledge of your server pbo.

ems 0.3.

your pbo of choose packer.

Dayz epoch 1.0.4.2




1.Too start your going to need to get your dayz_server.pbo By downloading it off your server provider. then unpack it and load in ems 0.3.



2. Once its unpacked go into your ems/missions file and add a folder named Treasurehunt. (has to be like that) (then add the file tr1.sqf into the folder.



3. next your going to go into your script folder in the ems 0.3 and add the following line to your you DZMSBOX.sqf

Code:
_Treasure = ["ItemGoldbar","Itemsilverbar10oz","ItemCopperBar10oz"];

so it looks like this.

Code:
_bpackList = ["DZ_ALICE_Pack_EP1","DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];
_gshellList = ["HandGrenade_west","FlareGreen_M203","FlareWhite_M203"];
_medical = ["ItemBandage","ItemMorphine","ItemEpinephrine","ItemPainkiller","ItemWaterbottle","FoodMRE","ItemAntibiotic","ItemBloodbag"];
_Treasure = ["ItemGoldbar","Itemsilverbar10oz","ItemCopperBar10oz"];

4. Then your going to add this into the DZMSBox.sqf. i added it above medical.

Code:
///////////////////////////////////////////////////////////Treasure hunt by brw1990
if (_type == "Treasure") then {
    // load treasure
    _scount = count _Treasure;
    for "_x" from 1 to 3 do {
        _sSelect = floor(random _sCount);
        _item = _Treasure select _sSelect;
        _crate addMagazineCargoGlobal [_item,10];
    };
};


5.Now your going to stay in your scripts and add the following scripts. DZMSaddtreasurehunt.sqf and DZMSTrTimer.sqf.



6. Now your going to stay in scripts and look for DZMSMarkerloop.sqf and add the following.

Right above //now we wait another 25 seconds.(which is at the bottom)

Code:
    /////////Treasure hunt by brw1990
        if (!(getMarkerColor "DZMStrMarker" == "")) then {
        deleteMarker "DZMStrMarker";
        //Re-Add the markers
        _nul = createMarker ["DZMStrMarker", DZMStrCoords];
        "DZMStrMarker" setMarkerColor "ColorGreen";
        "DZMStrMarker" setMarkerShape "ELLIPSE";
        "DZMStrMarker" setMarkerBrush "Grid";
        "DZMStrMarker" setMarkerSize [750,750];
    };



7. Now your going to go into your DZMSconfig.sqf and add the following. bellow dzmsminormax =990 around line 62.

Code:
// Time in seconds before a Treasure Hunt mission will run.
// At least this much time will pass between treasure hunt missions. Default = 3600 (1 hour)
DZMStrMin = 3600;
// Maximum time in seconds before a Treasure mission will run.
// A Treasure hunt mission will always run before this much time has passed. Default = 3605 (1 hour 5 seconds)
DZMStrMax = 3605;

8. Then your going to need to add in the same file DZMSconfig.sqf

Code:
DZMStreasureArray = ["tr1"];

so it looks like.

Code:
DZMSMajorArray = ["SM1","SM2","SM3","SM4","SM5","SM6","SM7","SM8","SM9","SM10","SM13"];
DZMSMinorArray = ["SM1","SM2","SM3","SM4","SM5","SM6","SM7","SM8","SM9","SM10","SM11","SM12"];
DZMStreasureArray = ["tr1"];

9. now your going to go into your DZMSfunctions.sqf and add the following lines.

Code:
DZMSTRTIMER = "\z\addons\dayz_server\EMS\Scripts\DZMStrTimer.sqf";

DZMSAddtreasurehunt = "\z\addons\dayz_server\EMS\Scripts\DZMSAddtreasurehunt.sqf";


So i looks like.

Code:
DZMSMajTimer = "\z\addons\dayz_server\EMS\Scripts\DZMSMajTimer.sqf";
DZMSMinTimer = "\z\addons\dayz_server\EMS\Scripts\DZMSMinTimer.sqf";
DZMSTRTIMER = "\z\addons\dayz_server\EMS\Scripts\DZMStrTimer.sqf";
DZMSMarkerLoop = "\z\addons\dayz_server\EMS\Scripts\DZMSMarkerLoop.sqf";

DZMSAddMajMarker = "\z\addons\dayz_server\EMS\Scripts\DZMSAddMajMarker.sqf";
DZMSAddMinMarker = "\z\addons\dayz_server\EMS\Scripts\DZMSAddMinMarker.sqf";
DZMSAddtreasurehunt = "\z\addons\dayz_server\EMS\Scripts\DZMSAddtreasurehunt.sqf";

10. Now your going to go into your DZMSInit.sqf and add the following line.

Code:
[] ExecVM DZMStrTimer;

so it looks like this. around line 100.

Code:
[] ExecVM DZMSMajTimer;
[] ExecVM DZMSMinTimer;
[] ExecVM DZMStrTimer;

now pack it all up watch it play. Enjoy i know my players are. please give credit where credits do.



I don't take credit for making the EMS 0.3 i did not make that. i just added the mission.



Any bugs or issues please report so i can try and fix.



https://www.dropbox.com/sh/ubfv2kvaydv57jc/GErygVkuZ6
 
Last edited:
Back
Top