From c1c0289686839e585bb8b96a230302884f13001b Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 7 Feb 2013 00:52:47 -0600 Subject: [PATCH] 0.931 + fixed standard female skin reverting to male on reconnect. + added skill (days alive) to cracking vaults (days alive 10=25%, 20=50% , 30=75% , 36=90% higher chance. --- dayz_code/compile/player_unlockVault.sqf | 33 +++++++++++++++++++++--- dayz_code/init/variables.sqf | 4 +-- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/dayz_code/compile/player_unlockVault.sqf b/dayz_code/compile/player_unlockVault.sqf index 17707f696..6303a4703 100644 --- a/dayz_code/compile/player_unlockVault.sqf +++ b/dayz_code/compile/player_unlockVault.sqf @@ -23,12 +23,37 @@ if (_ownerID == dayz_playerUID) then { // do random roll to try to unlock vault // start low to test figure out what works later if(_hasToolbox) then { - if(floor (random 10000) == 1337) then { - _allowunlock = true; - + + // days alive modifier + _maxRoll = 10000 - (dayz_skilllevel * 250); + + // math check + // 0 days x 250 = 0 + // 1 days x 250 = 250 (10000 - 250) = 9750 + // 4 days x 250 = 1000 (10000 - 1000) = 9000 + // 10 days x 250 = 2500 (10000 - 2500) = 7500 + // 20 days x 250 = 5000 (10000 - 5000) = 5000 + // 30 days x 250 = 7500 (10000 - 7500) = 2500 + // 36 days x 250 = 9000 (10000 - 9000) = 1000 + // 40 days x 250 = 10000 (10000 - 10000) = 0 + + if(_maxRoll > 10000) then { + _maxRoll = 10000; }; + + if(_maxRoll < 1000) then { + _maxRoll = 1000; + }; + + if(floor (random _maxRoll) == 137) then { + _allowunlock = true; + }; + + // lower chance to break tools based on skill = days alive + _toolboxRoll = dayz_skilllevel * 10; + // Chance to break toolbox randomly - if(floor (random 15) == 1) then { + if(floor (random _toolboxRoll) == 1) then { player removeWeapon _item; titleText ["Your toolbox is now broken, you will need to find another one.", "PLAIN"]; }; diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index 86cbe4201..3625ed847 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -30,8 +30,8 @@ CZ_Special_Forces_GL_DES_EP1_DZ = "CZ_Special_Forces_GL_DES_EP1_DZ"; TK_INS_Soldier_EP1_DZ = "TK_INS_Soldier_EP1_DZ"; TK_INS_Warlord_EP1_DZ = "TK_INS_Warlord_EP1_DZ"; -AllPlayers = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ"]; -AllPlayersVehicles = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","AllVehicles"]; +AllPlayers = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ"]; +AllPlayersVehicles = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","AllVehicles"]; PZombie_VB = "PZombie_VB";