Jump to content

Aslan247

Member
  • Posts

    25
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Aslan247 reacted to Airwaves Man in [RELEASE] Food Spoils Script   
    I like the idea of the script. You have asked why nobody else has made a script like that already, well it is because this is a way more complicated as you perhaps think at the moment. First of all you are new to coding so you can acutally not know most of the things so do not worry about it.
    Your script has a few problems:
    1. The script runs for the server too. It is not really a problem for the script itself but if you run things for clients only use.
    if (!isDedicated) then { code }; 2. It only runs one time. A while loop would be required so the script can check the whole time the player is playing.
    3. If one condition is true, lets say the first one, the script will wait 900s and will remove after that 'FoodBaconRaw'. But it does not check when the player got this item or the player even still have it. After removing the item it will add the biomeat no matter if the player really had the removed item. A few thoughts about that to make it more clear:
    The player could have cooked the 'FoodBaconRaw' within the 900s. If the player gets a new 'FoodBaconRaw' within the 900s the script will remove it even it was in the player inventory only a few seconds. 4. The script will always remove only 1 item. If you have 2x 'FoodBaconRaw' only one gets removed.
    5. If you relog everything gets resetted, the same if you died and you take back your gear. If you have died and took back your gear, it will only work after a relog because of the missing while loop.
    6. Because of the high sleeps you are using the most parts of the script will never be checked. It just takes too long even if you would have added a while loop.
    7. Some classnames are written wrong like FoodRawTuna is FishRawTuna.
    To realize this script idea it will need a few variables and a complete different way to script it. I would call it expert level. Those are the key features you have to think about:
    When has the player add the item to the inventory and how many items. How to handle the removal to the items if one or more got removed already by another action. How to handle if a new item of the same type got added within the time the other items will spoil. If a player relogs or getting killed. What about if the meat is inside the backpack. Do not use sleep with those high numbers. Use diag_tickTime instead. I've wrote a small script how it works better. But it still does not check the followong things:
    Backpack Time when the player got the items Relog and death // Set the spoil time at the start of the script. local _spoilTickTime = diag_tickTime; // Nested array of items that spoil within the inventory. [Spoilt item, New item]. local _spoilItems = [["FoodBaconRaw","FoodBioMeat"],["FishRawTuna","FoodBioMeat"]]; // spoil time in mins local _spoilTime = 15; while {1==1} do { // Every default: 15mins the items spoil in the inventory. if ((diag_tickTime - _spoilTickTime) > (_spoilTime*60)) then { { local _item = _x select 0; // Make sure that the player has acutally the item that spoils in their inventroy. if (_item in magazines player) then { local _newItem = _x select 1; // Count the items that will spoil now to get them all. _qtyItems = {_x == _item} count magazines player; for "_i" from 1 to _qtyItems do { player removeMagazine _item; player addMagazine _newItem; }; // Get display text of the spoilt items and inform the player. _displayName = getText(configFile >> "CfgMagazines" >> _item >> "displayname"); systemchat format ["%1 %2 spoiled in your inventory.",_qtyItems,_displayName]; }; } foreach _spoilItems; // Reset the spoil time of the script. _spoilTickTime = diag_tickTime; }; uisleep 5; };  
  2. Like
    Aslan247 reacted to Achmed in [HOW TO] Adding Intro Music!   
    finally got this to work.... 
     
    it helps if you paste the correct install instructions ;)
     
    http://opendayz.net/threads/blur-gaming-custom-spawn-tutorial.9785/
  3. Like
    Aslan247 reacted to Airwaves Man in DayZ Epoch 1.0.7 fake or real?   
    Epoch 1.0.7 is no fake at all. We are working hard to get it out this year.
  4. Like
    Aslan247 reacted to JasonTM in ROB BANK   
    Taking "full credit" for copy/pasting code?
     
    https://github.com/MigSDev5/BankRobery
  5. Thanks
    Aslan247 reacted to Airwaves Man in SAFE/TENT Gear not saving to Database HELP!   
    Problem solved, outdated server_publishObject.sqf was the problem.
  6. Thanks
  7. Like
    Aslan247 reacted to salival in [SOLVED] Purchased Vehicles Not Spawning   
    You need to update your infiSTAR, this is _not_ an epoch issue, this is an infiSTAR issue.
  8. Like
    Aslan247 got a reaction from koriaba in [SOLVED] Purchased Vehicles Not Spawning   
    My Overpoch server is doing the same thing but I am not using infiSTAR. I get the key, the red arrow on the ground, but the vehicle spawns in only after the server restarts. Not holding my breath but really need some help here. 
  9. Like
    Aslan247 reacted to OtterNas3 in [RELEASE] Vehicle Key Changer - For making Masterkey - V 1.4 (Updated 06/15/2014)   
    Just finished it and thought someone could like it...
    You have many, many (many, ...) Vehicles? You have many, many (many, ...) different Keys? Already need to attach a list with Key = Vehicle to your Monitor to keep track of em? Need 30 minutes to start driving because you dont have such a list? Frustrated? ALL OVER!
     
    This little script allows you and the Players on your Server to copy Vehicles, that you got the Key for, to another Key that's in your Inventory!
     
    Example:
    Car 1: Red Skoda - Red Key (1234)
    Car 2: Green Skoda - Green Key (4321)
     
    You need a Keymakers Kit!
    Put both keys in your Inventory, look at the Car 1 and select "Change Vehicle Key" from the action menu.
     
    You get a list with all Keys in your Inventory, to select from a menu. In this case the list would just be one: Green Key (4321)
    Not in the list is the Key for Car 1, so no Red Key (1234)
     
    Select the new Key you want to put the car on and: voila!
     
    You can throw away the unneeded Red Key (1234)
    The Old vehicle Key gets added to your Backpack
    Car 1 & Car 2 are both now on the Green Key (4321)
     
    You can allow players to "Claim" Vehicles that are dynamic spawned on the Map and does not yet need a Key.
    This is a option you can turn On/Off!
    You can set a price for claiming vehicles also.
     
    THIS DOES NOT HOWEVER INCLUDE MISSIONVEHICLES THAT ARE NOT SPAWNED CORRECTLY!
    IF YOU WANT TO BE ABLE TO CLAIM MISSIONVEHICLES, TELL THE MISSION DEVELOPER TO SETUP HIS SPAWNCODE FOR VEHICLES TO A CORRECT WAY!
     
    Changelog 1.4
    I changed some functions and implemented some small fixes mentioned by other users in this Thread.
    Specially for just bought vehicles and the "get not saved after driving" thing.
    This should also fix the duping for some of you, i never had it yet and cant reproduce. just made the call a bit different now.
     
     
    If it doesnt work as it should, gimme a shout.
     
    And for people that think this Mod is a total mess. Dont use it?
    It works on my Server for a loooooooooooooong time now without any errors!
     
     
     
    Demo Video
    http://www.youtube.com/watch?v=bEUmLrje_5o
     
     
    Like?
     
    DOWNLOAD:
    https://www.dropbox.com/s/mq0dvpzawtwmam8/VehicleKeyChanger_v1.4.zip
     
     Install Instructions:
    1. Download and unzip VehicleKeyChanger_v1.4.zip
    2. unpbo MPMissions\YOURMISSIONNAME.pbo
    3. copy the custom folder from the unziped VehicleKeyChanger_v1.4.zip to MPMissions\YOURMISSIONNAME\
    4. open MPMissions\YOURMISSIONNAME\init.sqf
     
    Find this block:
    if (!isDedicated) then { 0 fadeSound 0; waitUntil {!isNil "dayz_loadScreenMsg"}; dayz_loadScreenMsg = (localize "STR_AUTHENTICATING"); _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; }; And insert this line above the closing bracket };
    _nil = [] execVM "custom\VehicleKeyChanger\VehicleKeyChanger_init.sqf"; 5.
    Configuration:
    Edit custom\VehicleKeyChanger\VehicleKeyChanger_init.sqf
     
    Edit this block to your likings!

    ///////////////////////////////////////////////// ///////////////////////////////////////////////// // Edit these settings to fit your needs/likes // ///////////////////////////////////////////////// ///////////////////////////////////////////////// /// Claim Vehicles that does not yet need Key /// ///////// 0 = Not allowed | 1 = Allowed ///////// vkc_claiming = 0; ///////////////////////////////////////////////// //////// Claim Vehicles costs this Item ///////// /// Any Item can be used here, some examples: /// //// ItemTinBar, ItemSilverBar, ItemGoldBar, //// ////// ItemSilverBar10oz, ItemGoldBar10oz, ////// ///// ItemBriefcase20oz, ItemBriefcase100oz ///// //////// set to "0" to disable the costs //////// vkc_claimingPrice = "ItemGoldBar10oz"; ///////////////////////////////////////////////// ////////// Change Key costs this Item /////////// ////////////// see above examples /////////////// //////// set to "0" to disable the costs //////// vkc_Price = "ItemSilverBar"; ///////////////////////////////////////////////// /////// Need KeyKit to use this function //////// ////////// 0 = Not needed | 1 = Needed ////////// vkc_needKeykit = 1; ///////////////////////////////////////////////// ///////////////////////////////////////////////// /////////////// DONT EDIT BELOW ! /////////////// ///////////////////////////////////////////////// 5. repbo MPMissions\YOURMISSIONNAME\
    - upload it to your server -
     
    6. unpbo @DayZ_Epoch_Server\addons\dayz_server.pbo
     
    7 copy server_updateObject.sqf from your unziped VehicleKeyChanger_v1.4.zip to @DayZ_Epoch_Server\addons\dayz_server\compile\  and overwrite the existing one. (This just adds a function for this mod nothing else changed)
    If you already have a custom server_updateObjects.sqf you need to compare my file with yours and make the changes yourself!
     
    8. repbo @DayZ_Epoch_Server\addons\dayz_server\
    - upload it to your server -
     
    9 copy this file to your Servers BattlEye filters folder:
    publicvariableval.txt
     
    FYI: INFISTAR AdminCheat, ummm sorry meant AntiCheat, users!
    Cause he uses his own BE filter files should not copy paste this file over your existing one, else you will get kicked for all the cool nice admin functions that comes with your Infistar! You need to do the change yourself if you get kicked for anything regarding this script.
    I dont had and will not have a look at Infistar's BE files to sort things out!
     
    10. Restart your server
    11. Enjoy it and cleanup your vaults!
     
    12. DONT LOOSE YOUR MASTERKEY! :rolleyes:
     
     
    -- Additional Information ---
     
    For InfiStar AdminCheat (ummm sorry meant AntiCheat...) users:

     
     
    Have fun with it!
     
    - If you like it - Like it - So I can count Downloads - I like that
     
    #####################################
    #                      Support my work                      #
    #                                    &                                #
    #                                Donate                           #
    #####################################

  10. Thanks
    Aslan247 reacted to juandayz in reduce viewing distance and grass   
    Here u have another set view mod.  using scroll menu.
    ddownload here: http://www.mediafire.com/download/e1aszrrdzs2dc5s/setview.zip
    and drop it in custom\setview\ folder
    add this in your init.sqf at very bottom:
    //SET VIEW DISTANCE
    [] execVM "custom\setview\setview_activate.sqf";
    done!
     
  11. Thanks
    Aslan247 reacted to kingpapawawa in Looking for files for epoch 1.0.6.2 working.   
    you will still need to add ai scripts but those should be easy
×
×
  • Create New...