SLB2k11

repair Edited Repair Function

34 posts in this topic

This Version:

You need to Repair:

  • 1 Ductape
  • 1 Junkmetal

Time to repair ~22 seconds and not able to abourt

some optic parts like animation and optic item

Next Version:

  • only repair Wheels (each Wheel 1 Ductape)
  • OR
  • Full Repair (Ductape , Junkmetal and other stuff)

 

Github:

https://github.com/slb2k11/Exile_Repair/tree/master

Edited by SLB2k11
9 people like this

Share this post


Link to post
Share on other sites
Advertisement

Update

Add in Line 12:

if (ExileClientPlayerIsInCombat) exitWith
{
	["RepairFailedWarning", ["You are in combat!"]] call ExileClient_gui_notification_event_addNotification;
};

 

Edited by jus61

Share this post


Link to post
Share on other sites

Does the dev team have plans to expand the repair of vehicles beyond the duct tape?

Who knows they might but it says in the config that you can overwrite everything without touching there code and potentially make an entirely different game.

Share this post


Link to post
Share on other sites

If I want to remove the in combat restriction - How do I do this, just remove this line?

 

if (ExileClientPlayerIsInCombat) exitWith
{
        ["RepairFailedWarning", ["You are in combat!"]] call ExileClient_gui_notification_event_addNotification;
};

Also you need to include !"Item_ToolKit" in your createVehicle.txt battle eye filter..

Edited by John

Share this post


Link to post
Share on other sites

Who knows they might but it says in the config that you can overwrite everything without touching there code and potentially make an entirely different game.

But you cant add loot items or craft other bits like sand bags

Share this post


Link to post
Share on other sites

if it doesnt have simulation no you can but if there is a way to give those item simulation you might could

Share this post


Link to post
Share on other sites

Love this kind of script. Now, making repairs more than just duct taping in nanosec is really welcome addon.

Cant wait to hear all that cry what comes after installing this.... hah

1 person likes this

Share this post


Link to post
Share on other sites

Great script adjust .. I made it that you need a toolkit and a ducttape ..

/**
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_vehicle","_availableHitpoints","_fixable","_equippedMagazines"];
_vehicle = _this select 0;
if (ExileClientPlayerIsInCombat) exitWith
{
        ["RepairFailedWarning", ["You are in combat!"]] call ExileClient_gui_notification_event_addNotification;
};
if (vehicle player isEqualTo _vehicle) exitWith
{
    ["RepairFailedWarning", ["Are you serious?"]] call ExileClient_gui_notification_event_addNotification;
};
_availableHitpoints = _vehicle call ExileClient_util_vehicle_getHitPoints;
{
    if((_vehicle getHitPointDamage _x) > 0)exitWith
    {
        _fixable = "potato";
    };
}
forEach _availableHitpoints;
if (isNil "_fixable") exitWith
{
    ["RepairFailedWarning", ["This vehicle does not need to be repaired."]] call ExileClient_gui_notification_event_addNotification;
};
if (!local _vehicle) then
{
    ["RepairFailedWarning", ["Please get in as driver/pilot first."]] call ExileClient_gui_notification_event_addNotification;
}
else
{
    _equippedItems = items player;
    _equippedMagazines = magazines player;
    if ("Exile_Item_DuctTape" in _equippedMagazines) then
    {
        if ("ToolKit" in _equippedItems) then
        {
        _position = player modelToWorld [1,+1,0];
        _item = "Item_ToolKit" createVehicle [0,0,0];
        _item setPos [_position select 0, _position select 1, 0];    
        player playMove "AinvPknlMstpSnonWnonDr_medic3";    
        player playMove "AinvPknlMstpSnonWnonDr_medic3";    
        sleep 20;
        _vehicle setDamage 0;
        player removeItem "Exile_Item_DuctTape";
        player removeItem "ToolKit";
        deleteVehicle _item;
        ["Success",["Vehicle repaired"]] call ExileClient_gui_notification_event_addNotification;
        }
        else
        {
        ["Whoops",["You also need a ToolKit to do that!"]] call ExileClient_gui_notification_event_addNotification;
        };
    }
    else
    {
        ["RepairFailedWarning", ["You need DuctTape and a ToolKit to do that!"]] call ExileClient_gui_notification_event_addNotification;
    };
    
};
true

 

Edited by Rythron

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.