+ work around added to player zombie "get over" stuck animation issue.
+ added setpos to vaults, allows precise positioning
+ possible fix for damage spam at server start.
+ added player zombie attack move, Works with animals and zombies only
currently.
+ 10oz bars for all types of metal
+ fix for detecting near vehicles when selling fixes #81
This commit is contained in:
vbawol
2013-02-14 17:20:35 -06:00
parent 9f56cdcbfe
commit 58742df73a
14 changed files with 244 additions and 361 deletions

View File

@@ -1,4 +1,4 @@
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
private ["_item","_id"];
_item = _this select 3;
// remove menu
@@ -12,10 +12,10 @@ s_player_callzombies = 1;
[player,"spotted",0,false] call dayz_zombieSpeak;
_id = [player,100,true,(getPosATL player)] spawn player_alertZombies;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
// wait a bit
sleep 6;
sleep 15;
// allow menu again
s_player_callzombies = -1;

View File

@@ -79,6 +79,49 @@ if (inflamed cursorTarget and _canDo) then {
[ ["ItemGoldBar",10] ],
[ ["ItemGoldBar10oz",1] ]
];
_recipe_ItemSilverBar10oz = [
[ ["ItemSilverBar10oz",1] ],
[ ["ItemSilverBar",10] ]
];
_recipe_ItemSilverBar = [
[ ["ItemSilverBar",10] ],
[ ["ItemSilverBar10oz",1] ]
];
_recipe_ItemCopperBar10oz = [
[ ["ItemCopperBar10oz",1] ],
[ ["ItemCopperBar",10] ]
];
_recipe_ItemCopperBar = [
[ ["ItemCopperBar",10] ],
[ ["ItemCopperBar10oz",1] ]
];
_recipe_ItemTinBar10oz = [
[ ["ItemTinBar10oz",1] ],
[ ["ItemTinBar",10] ]
];
_recipe_ItemTinBar = [
[ ["ItemTinBar",10] ],
[ ["ItemTinBar10oz",1] ]
];
_recipe_ItemAluminumBar10oz = [
[ ["ItemAluminumBar10oz",1] ],
[ ["ItemAluminumBar",10] ]
];
_recipe_ItemAluminumBar = [
[ ["ItemAluminumBar",10] ],
[ ["ItemAluminumBar10oz",1] ]
];
_recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
_recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];

View File

@@ -0,0 +1,44 @@
private ["_item","_ent","_cnt","_index","_wound","_damage","_rnd","_move"];
_item = _this select 3;
_ent = _item;
// remove menu
player removeAction s_player_pzombiesattack;
s_player_pzombiesattack = 1;
_rnd = round(random 9) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
player playMoveNow _move;
sleep 1;
_isZombie = _ent isKindOf "zZombie_base";
// TODO add distance check and maybe los
if (_ent isKindOf "Animal" or _isZombie) then {
_ent setDamage 1;
} else {
// TODO TEST AND Improve
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit select 1) select _index;
_wound = (DAYZ_woundHit select 0) select _index;
_damage = 0.1 + random (1.2);
[_item, _wound, _damage, player,"zombie"] call fnc_usec_damageHandler;
};
[player,"hit",0,false] call dayz_zombieSpeak;
player switchmove "";
sleep 1;
s_player_pzombiesattack = -1;

View File

@@ -1,25 +1,19 @@
private["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent"];
private ["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent","_ctrlBlood","_rnd","_move","_display","_control","_bloodVal"];
_item = _this select 3;
_ent = _item;
disableSerialization;
player removeAction s_player_butcher;
s_player_butcher = 1;
if (_ent isKindOf "Animal") then {
_ent setDamage 1;
} else {
_ent setHit ["legs",1];
_ent setVariable ["hit_legs",2,true];
};
if(!(alive _item)) then {
_rnd = round(random 4) + 1;
_move = "ZombieFeed" + str(_rnd);
[nil, player, rSWITCHMOVE,_move] call RE;
sleep 5;
if(not alive _item) then {
_rnd = round(random 4) + 1;
_move = "ZombieFeed" + str(_rnd);
player playMoveNow _move;
sleep 1;
// player playActionNow "PutDown";
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
@@ -91,8 +85,10 @@ if(not alive _item) then {
_control ctrlShow true;
cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"];
cutText [format[(localize "str_player_consumed"),_animalType], "PLAIN DOWN"];
player switchmove "";
};
s_player_butcher = -1;

View File

@@ -91,7 +91,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
_count = 0;
if(_stype == "CfgVehicles") then {
_count = position player nearObjects [_name,10];
_count = count (position player nearObjects [_name,10]);
};
if(_stype == "CfgMagazines") then {
_count = {_x == _name} count magazines player;