Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
TheFirstNoob

Крафт домов на основе прожитого времени - [Craft houses based on survived time]

Recommended Posts

Автор скрипта: Juandayz
Оригинал темы: http://epochmod.com/forum/topic/42367-releasecraft-houses-based-on-survived-time/ 

Описание:
Скрипт позволяет крафтить Дома на основе прожитого времени.

Все работает через "Саперную лопатку"

- Малый дом: Выжить 2 дня + 4 деревянной стены (WoodWalls) + 1 деревянный пол (Floor/Ceiling)
- Средний дом: Выжить 5 дней + 2 каменные стены (CinderWalls) + 1 
деревянный пол (Floor/Ceiling)
- Большой дом: Выжить 8 дней + 4 
каменные стены (CinderWalls) + 1 деревянный пол (Floor/Ceiling)
- Госпиталь для героя: Выжить 2 дня + 5000 положительной репутации (хуманити) + 2 деревянной стены + 1
 деревянный пол (Floor/Ceiling)

Видео:



Вшито в скрипт:
- Лимит 1 дом на 30м плот
- Информация о сборке и Выжившем времени через 30м плот

- Скрипт лечения для Госпиталя героя
- Удалена функция "Только для владельцев" (не проверено автором, но сказал что должно работать)
- Сохранение точной позиции после рестарта





УСТАНОВКА

Потребуется:
- Кастомные файлы fn_selfActions.sqf, variables.sqf, compiles.sqf
- Наличие установленного скрипта: Maca Extra_RC

- Файлы: https://yadi.sk/d/tc-52qi1tYbz4

0. Папку Custom из скачанного архива поместить в папку с вашей миссией (MPMission)


1. Открыть fn_selfAction.sqf:
1.1. Найти:

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {

1.2. Добавить НИЖЕ:

if (s_player_plotmenu < 0) then {
	s_player_plotmenu = player addAction ["<t color='#ff5200'>PLOT-INFO</t>", "custom\scripts\house\plotmenu.sqf", [], 5, false];
	};

1.3. Снова найти:

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {

1.4. Добавить ВЫШЕ: 

////////////////hospital hero///
if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "GUE_WarfareBFieldhHospital")) then {
if (s_player_hospitalhero < 0) then {
	s_player_hospitalhero = player addAction ["<t color='#ff5200'>Heal-in-Tent</t>", "custom\scripts\house\hospitalhero.sqf", [], 5, false];
	};
	} else {
	    player removeAction s_player_hospitalhero;
            s_player_hospitalhero = -1;
	};
	///////////////////////////////////////////

Должно выглядеть примерно так:


////////////////hospital hero///

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "GUE_WarfareBFieldhHospital")) then {
if (s_player_hospitalhero < 0) then {
    s_player_hospitalhero = player addAction ["
Heal-in-Tent", "custom\scripts\house\hospitalhero.sqf", [], 5, false];
};
} else {
    player removeAction s_player_hospitalhero;
    s_player_hospitalhero = -1;
};
///////////////////////////////////////////


if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {

if (s_player_plotmenu < 0) then {
s_player_plotmenu = player addAction ["
PLOT-INFO", "custom\scripts\house\plotmenu.sqf", [], 5, false];
};



1.5. Найти (Без закрывающей скобки!): 

} else {
            player removeAction s_player_maintain_area;
            s_player_maintain_area = -1;
            player removeAction s_player_maintain_area_preview;
            s_player_maintain_area_preview = -1;

1.6. Добавить НИЖЕ:

player removeAction s_player_plotmenu;
s_player_plotmenu = -1;

Должно выглядеть примерно так:


} else {

    player removeAction s_player_maintain_area;
    s_player_maintain_area = -1;
    player removeAction s_player_maintain_area_preview;
    s_player_maintain_area_preview = -1;


    player removeAction s_player_plotmenu;
    s_player_plotmenu = -1;

};



1.7. Найти:

//Engineering
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];

1.8. Добавить ВЫШЕ:

player removeAction s_player_hospitalhero;
s_player_hospitalhero = -1;
player removeAction s_player_plotmenu;
s_player_plotmenu = -1;

1.9. Найти:

_isModular = _cursorTarget isKindOf "ModularItems";

1.10. ЗАМЕНИТЬ на:

_isModular = (_cursorTarget isKindOf "ModularItems") or ((typeOf _cursorTarget) in DZE_SurvivedHouseRemove);

Все с fn_selfAction.sqf закончили!





2. Открываем Variables.sqf:
2.1. Найти: 

dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ"];

2.2. ЗАМЕНИТЬ на:

dayz_allowedObjects = ["GUE_WarfareBFieldhHospital","MAP_bouda2_vnitrek","MAP_deutshe_mini","MAP_Mil_Mil_Guardhouse","TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ"];

2.2.1. И Добавить НИЖЕ:

DZE_SurvivedHouseRemove = ["GUE_WarfareBFieldhHospital","MAP_bouda2_vnitrek","MAP_deutshe_mini","MAP_Mil_Mil_Guardhouse"];

2.3. Найти:

DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ"];

2.4. ЗАМЕНИТЬ на:

DZE_maintainClasses = ["GUE_WarfareBFieldhHospital","MAP_bouda2_vnitrek","MAP_deutshe_mini","MAP_Mil_Mil_Guardhouse","ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ"];

2.5. Найти:

dayz_resetSelfActions = {

2.6. Добавить НИЖЕ: 

s_player_plotmenu = -1;
s_player_hospitalhero = -1;

Все с Variables.sqf Закончили.





3. Открываем compile.sqf:
3.1. Найти:

player_removeObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remove.sqf";

3.2. ЗАМЕНИТЬ на: 

player_removeObject = compile preprocessFileLineNumbers "custom\scripts\house\remove.sqf"; 

Все с Compile.sqf Закончили.




4. Открываем Extra_RC.sqf:
4.1. Если файл пустой, то:

class ExtraRc {

class ItemEtool {
     class shouse {
        text = "Small Houses";
        script = "execVM 'custom\scripts\house\smallhouse.sqf'";
     };    
     class mhouse {
        text = "Medium Houses";
        script = "execVM 'custom\scripts\house\mediumhouse.sqf'";
     };
     class lhouse {
        text = "Large Houses";
        script = "execVM 'custom\scripts\house\largehouse.sqf'";
     };
     class hhouse {
        text = "Hero House";
        script = "execVM 'custom\scripts\house\herohouse.sqf'";
     };
    };

};

4.2. Если класс "class ExtraRc" уже имеется, то:

class ItemEtool {
     class shouse {
        text = "Small Houses";
        script = "execVM 'custom\scripts\house\smallhouse.sqf'";
     };    
     class mhouse {
        text = "Medium Houses";
        script = "execVM 'custom\scripts\house\mediumhouse.sqf'";
     };
     class lhouse {
        text = "Large Houses";
        script = "execVM 'custom\scripts\house\largehouse.sqf'";
     };
     class hhouse {
        text = "Hero House";
        script = "execVM 'custom\scripts\house\herohouse.sqf'";
     };
    };

4.3. Если классы "class ExtraRc" и "class ItemEtool" уже имеются, то:

class shouse {
        text = "Small Houses";
        script = "execVM 'custom\scripts\house\smallhouse.sqf'";
     };    
     class mhouse {
        text = "Medium Houses";
        script = "execVM 'custom\scripts\house\mediumhouse.sqf'";
     };
     class lhouse {
        text = "Large Houses";
        script = "execVM 'custom\scripts\house\largehouse.sqf'";
     };
     class hhouse {
        text = "Hero House";
        script = "execVM 'custom\scripts\house\herohouse.sqf'";
     };



На этом все :3

Share this post


Link to post
Share on other sites



Для тех кто использует ПКМ через DZE_CLICK_ACTIONS делаем так:

открываем config.sqf и подабляем перед



["Binocular","5000 Meters","setViewDistance 5000; systemChat('ViewDistance: 5000'); systemChat('Warning: Higher the distance, the lower the FPS');","true"]

это



["ItemEtool","Малый дом","execVM 'custom\scripts\house\smallhouse.sqf';","true"],
["ItemEtool","Средний дом","execVM 'custom\scripts\house\mediumhouse.sqf';","true"],
["ItemEtool","Большой дом","execVM 'custom\scripts\house\largehouse.sqf';","true"],
["ItemEtool","Геройский дом","execVM 'custom\scripts\house\herohouse.sqf';","true"],
Edited by RedLink (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Troy1
      Всем привет. Подскжите ну или помогите пожалуйста решить вопрос.
      Вопрос звучит так. На сервере есть трейдер зоны и базы игроков. 
      Если в течение определённого времени, на пример 1 - 2 часа с машиной не кто не взаимодействует и машина не находится в зоне трейдера или на теретории базы, то машина отлетает в гараж или на штраф стоянку.
      На сервере используется TraderPlus.
       
      Есть такие решения у кого?
      За ранние благодарю.
    • By Troy1
      Всем привет. Подскжите ну или помогите пожалуйста решить вопрос.
      Вопрос звучит так. Нужно сделать так, что бы на всей карте был запрет на строительство. 
      Если нужно построить например базу с палатками, то нужно установить верстак или флаг, который установит зону для строительства с радиусом примерно 20-25 метров от центра и желательно что бы зона была квадратной.
      Есть такие решения у кого?
      За ранние благодарю.
    • By BR0wi
      Подскажите где найти людей, которые делаю моды на заказ. К кому вообще обращаться? Или что бы реализовать свои идеи нужно самому "год" сидеть и изучать все механики модинга?
    • By CubeIn
      Приветствую господа, хочу создать новый проект, уникальный, но для этого нужен маппер.
      Я оставлю здесь свой дискрод, напишите в лс, кто готов взяться за крупный проект.
      4me#4542
    • By 6agu
      Поставил
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.