0.9 + pre 1.7.5

This commit is contained in:
vbawol
2013-02-03 08:26:46 -06:00
parent 8fd13cf31f
commit 6cdcf6c094
20 changed files with 32879 additions and 257 deletions

View File

@@ -1,105 +1,26 @@
private["_hasFoodMeat","_hasFoodTin","_item","_wait"];
private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
player removeAction s_player_cook;
s_player_cook = -1;
//_qty = {_x == "FoodSteakRaw"} count magazines player;
_wait = 5 - _qty;
_rawmeat = meatraw;
_cookedmeat = meatcooked;
if ("FoodSteakRaw" in magazines player) then {
_qty = {_x == "FoodSteakRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodSteakRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodSteakRaw";
player addMagazine "FoodSteakCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodmuttonRaw > FoodmuttonCooked
if ("FoodmuttonRaw" in magazines player) then {
_qty = {_x == "FoodmuttonRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodmuttonRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodmuttonRaw";
player addMagazine "FoodmuttonCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodchickenRaw > FoodchickenCooked
if ("FoodchickenRaw" in magazines player) then {
_qty = {_x == "FoodchickenRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodchickenRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodchickenRaw";
player addMagazine "FoodchickenCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodrabbitRaw > FoodBaconCooked
if ("FoodrabbitRaw" in magazines player) then {
_qty = {_x == "FoodrabbitRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodrabbitRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodrabbitRaw";
player addMagazine "FoodRabbitCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodbaconRaw > FoodRabbitCooked
if ("FoodbaconRaw" in magazines player) then {
_qty = {_x == "FoodbaconRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodbaconRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodbaconRaw";
player addMagazine "FoodBaconCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
/*
_hasFoodMeat = "FoodSteakRaw" in magazines player;
_qty = {_x == "ItemWaterbottleUnfilled"} count magazines player;
if (_hasFoodMeat) then {
player removeMagazine "FoodSteakRaw";
player playActionNow "Medic";
[player,"eat",0,false] call dayz_zombieSpeak;
sleep 6;
player addMagazine "FoodSteakCooked";
cutText [localize "str_success_cooked_steak", "PLAIN DOWN"];
};
*/
{
_meat = _x;
_meatcooked = _cookedmeat select (_rawmeat find _meat);
if (_meat in magazines player) then {
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
_qty = {_x == _meat} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
//_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
player removeMagazine _meat;
player addMagazine _meatcooked;
if !(_meat in magazines player) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
};
cutText [format[(localize "str_success_cooked"),_qty,_text], "PLAIN DOWN"];
};
} forEach _rawmeat;