Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - LeonZ

Pages: [1]
1
Server Discussion / Lucky's Wasteland
« on: May 18, 2023, 06:21 AM »
Lucky's Wasteland

IP and Port: 139.99.4.177:2302

Map: Malden
Version: Custom Update 15.2

What features we can given to you?
  • Whole new experience with Contact DLC's equipment and features
  • Almost 97% arma 3 equipment are available in store
  • More customize missions that other server do not have
  • Custom item? We have Defibrillator or AED, quad bike, water scooter and more...
  • Action like chop tree, transfer ownership, take/steal uniform, get in as passenger for few DLC and more...
  • Can arma jump before? We have climb with no mod
  • Dead in underwater and no be able to retrieve your gear? We got solution
  • Wanna base build? We offer you some good stuff in general store
  • Solo in attack helicopter? No worry we got head track for you when manual fire
  • We can use drive assist without light
  • Still searching for beacon one by one? Rename it and spawn
  • Dont have skill for land on aircraft carrier, we added you tailhook

We have Discord server and you might want to report bug or suggest feature there, Spartan Out

2
To land an aircraft, you need fly from behind (Max distance 2500m) and heading to runway, then scroll down and pick for "Tailhook Down" action, then you are ready to land, if you fail on landing example too high or too far, then the tailhook will retrieve automatic

To initial it in the file "client\init.sqf", here is the code for run it
Code: [Select]
[] execVM "addons\tailhook\init.sqf";
This code that i'm using is from Tetet (USS Nimitz) and BRAVO ZERO ONE Studios (Jets DLC)

3
Editing & Coding / Respawn with captured territory
« on: Mar 02, 2022, 02:43 PM »
Respawn with captured territory

https://cdn.discordapp.com/attachments/482598996641316868/948571768585617448/66C0E571C369C4388B2E272C629F437A86DB6DC7.png


File edited:
  • client\systems\playerMenu\dialog\loadRespawnDialog.sqf
  • client\functions\clientCompile.sqf
  • client\functions\spawnAction.sqf
  • server\default_config.sqf

File added:
  • client\functions\spawnOnTerritory.sqf

client\systems\playerMenu\dialog\loadRespawnDialog.sqf
Code: [Select]
#define TERRITORY_SPAWN_COOLDOWN (["A3W_territorySpawnCooldown", 5*60] call getPublicVar)

// #L42
_territorySpawnCooldown = TERRITORY_SPAWN_COOLDOWN;

// #L61 - #L78
_setPlayersInfo =
{
private ["_location"];

_location = _this; // spawn beacon object or town marker name
_isBeacon = (typeName _location == "OBJECT");
_friendlyUnits = [];
_friendlyPlayers = 0;
_friendlyNPCs = 0;
_enemyPlayers = 0;
_enemyNPCs = 0;

{
if (alive _x && {_x isKindOf "CAManBase" && {!(_x call A3W_fnc_isUnconscious) && _x inArea _location}}) then
{
if (FRIENDLY_CONDITION) then
{
if (isPlayer _x) then

// #L124 - #L173
_isTerritoryCaptured =
{
private ["_location", "_index"];
_location = _this;
_index = currentTerritoryDetails findIf { (_x select 0) == _location };
_friendlyUnits = [];
_friendlyPlayers = 0;
_friendlyNPCs = 0;
_enemyPlayers = 0;
_enemyNPCs = 0;
{
if (alive _x && {_x isKindOf "CAManBase" && {!(_x call A3W_fnc_isUnconscious) && _x inArea _location}}) then
{
if (FRIENDLY_CONDITION) then
{
if (isPlayer _x) then
{
_friendlyPlayers = _friendlyPlayers + 1;
_friendlyUnits pushBack _x;
}
else
{
_friendlyNPCs = _friendlyNPCs + 1;
};
}
else
{
if (isPlayer _x) then
{
_enemyPlayers = _enemyPlayers + 1;
}
else
{
if (side _x != sideLogic) then
{
_enemyNPCs = _enemyNPCs + 1;
};
};
};
};
} forEach allUnits;

missionNamespace setVariable [format ["%1_friendlyUnits", _location], _friendlyUnits];
missionNamespace setVariable [format ["%1_friendlyPlayers", _location], _friendlyPlayers];
missionNamespace setVariable [format ["%1_friendlyNPCs", _location], _friendlyNPCs];
missionNamespace setVariable [format ["%1_enemyPlayers", _location], _enemyPlayers];
missionNamespace setVariable [format ["%1_enemyNPCs", _location], _enemyNPCs];

(currentTerritoryDetails select _index select 2) == playerSide
};

// #L290 - #L300
if (!isNil "_lastSpawn") then
{
_spawnCooldown = if (["TERRITORY_", _location] call fn_startsWith) then { TERRITORY_SPAWN_COOLDOWN } else { TOWN_SPAWN_COOLDOWN };
_remaining = _spawnCooldown - (diag_tickTime - _lastSpawn);

if (_spawnCooldown > 0 && _remaining > 0) then
{
_textStr = _textStr + format ["[<t color='#ffff00'>%1</t>] ", _remaining call fn_formatTimer];
_cooldown = true;
};
};

// #L345 - #L354
{
_pos = markerPos _location;
if (["TERRITORY_", _location] call fn_startsWith) then
{
_data = [3, _location];
} else
{
_data = [1, _location];
};
};

// #L418
_locType lbAdd "Territories";

// #L427 - #L432
showBeacons = switch (_curSel) do
{
case 0: { "Town" };
case 1: { "Beacon" };
case 2: { "Territory" };
};

// #L447
showBeacons = "Town";

// #L472 Removed 2 lines
// #L474 Removed 1 line

// #L487 - #L495
_territories = [];
{
private "_friendlyPlayers";
_territory = _x select 0;
if (_territory call _isTerritoryCaptured) then
{
_territories pushBack _territory;
};
} forEach (call compile preprocessFileLineNumbers "mapConfig\territories.sqf");

// #L508 - #L510
if (count _towns > 0 && count _beacons == 0 && showBeacons == "Towns") then { _locType lbSetCurSel 0 };
if (count _beacons > 0 && count _towns == 0 && showBeacons == "Beacons") then { _locType lbSetCurSel 1 };
if (count _territories > 0 && count _beacons == 0 && showBeacons == "Territories") then { _locType lbSetCurSel 2 };

// #L514 - #L528
_locations = switch (showBeacons) do
{
case "Town":
{
[_towns, [], {_x call _getPlayerThreshold}, "DESCEND"] call BIS_fnc_sortBy
};
case "Territory":
{
[_territories, [], {_x call _getPlayerThreshold}, "DESCEND"] call BIS_fnc_sortBy
};
case "Beacon":
{
[_beacons, [], {_x call _getBeaconDistance}, "ASCEND", {alive _x}] call BIS_fnc_sortBy
};
};

// #L546 - #L556
_citiesTerritories = call cityList;
_citiesTerritories append (call compile preprocessFileLineNumbers "mapConfig\territories.sqf");
_index = _citiesTerritories findIf { _x select 0 == _location };
if (["TERRITORY_", _location] call fn_startsWith) then
{
_text = _citiesTerritories select _index select 1;
} else
{
_text = _citiesTerritories select _index select 2;
};
_data = str _location;

// #L558 Removed 1 line

// #L587 - #L590
_spawnCooldown = if (["TERRITORY_", _location] call fn_startsWith) then { _territorySpawnCooldown } else { _townSpawnCooldown };
_remaining = _spawnCooldown - (diag_tickTime - _lastSpawn);

if (_spawnCooldown > 0 && _remaining > 0) then

client\functions\spawnAction.sqf
Code: [Select]
switch (_switch) do
{
case 1: { _data call spawnInTown };
case 2: { _data call spawnOnBeacon };
case 3: { _data call spawnOnTerritory }; // skydive
default { _data call spawnRandom };
};

client\functions\clientCompile.sqf
Code: [Select]
spawnOnTerritory = "client\functions\spawnOnTerritory.sqf" call mf_compile;
server\default_config.sqf
Code: [Select]
A3W_territorySpawnCooldown = 2.5*60;
client\functions\spawnOnTerritory.sqf
Code: [Select]
// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
// @file Version: 1.0
// @file Name: spawnOnTerritory.sqf
// @file Author: Leon

private ["_marker", "_height", "_index", "_territories", "_preload", "_pos", "_rad", "_territoryName", "_notInArea", "_playerPos"];
_marker = _this select 0;
_preload = param [1, false, [false]];

_height = (["A3W_spawnBeaconSpawnHeight", 0] call getPublicVar) max 0;
_territories = (call compile preprocessFileLineNumbers "mapConfig\territories.sqf");
_index = _territories findIf { _x select 0 == _marker };
_rad = selectMax (markerSize _marker);
_territoryName = _territories select _index select 1;

_pos = getMarkerPos _marker;
_playerPos = _pos;
_notInArea = true;
while { _notInArea } do
{
_playerPos = [_pos,5,_rad,1,0,0,0] call findSafePos;
if (_playerPos inArea _marker) then
{
_notInArea = false;
};
};
_playerPos set [2, if (_height < 25) then { 0 } else { _height }];
if (_preload) then { waitUntil {sleep 0.1; preloadCamera _playerPos} };
waitUntil {!isNil "bis_fnc_init" && {bis_fnc_init}};
player setPos _playerPos;

player setVariable [_marker + "_lastSpawn", diag_tickTime];
[player, _marker] remoteExecCall ["A3W_fnc_updateSpawnTimestamp", 2];

respawnDialogActive = false;
closeDialog 0;

_territoryName spawn
{
_territoryName = _this;
sleep 1;

_hour = date select 3;
_mins = date select 4;
["Wasteland", _territoryName, format ["%1:%3%2", _hour, _mins, if (_mins < 10) then {"0"} else {""}]] spawn BIS_fnc_infoText;
};

Pages: [1]