How to script an artillery piece to fire on a certain position in Arma 3.

To make an artillery piece to fire on a certain spot in the editor, firstly, place the Scorcher unit, name it “arty1” and put this code in the init. this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}] This will give it unlimited ammo….

Read More

Declaring global variables in Arma 3 scripting.

Declaring a global variable in Arma 3 in very easy, this one is for defining the max radius of a battle zone. Declare it at the initial phase of your mission scripting like this. missionNamespace setVariable [’PARAMS_AOSize’,1000,FALSE]; // Radius of main AO.missionNamespace setVariable [‘PARAMS_AOSize’,1000,FALSE]; // Radius of main AO. Then…

Read More

How to protect your base in Arma 3 from trolls and griefing.

This very useful script when placed in the initPlayerLocal.sqf file will protect a base from придурки who are firing into your base and destroying everything. player addEventHandler ["FiredMan", {   _p = _this select 6; if( _p distance (getMarkerPos "respawn_west") < 1000) then { deleteVehicle _p; } else { _p…

Read More

How to setup a simple qemu VM and use networking.

This script will run a qemu VM and setup networking easily. This is very simple. 1 #!/bin/sh 2 3 export QEMU_AUDIO_DRV=alsa 4 DISKIMG=~/win7.img 5 WIN7IMG=~/Downloads/win7.iso 6 VIRTIMG=~/Downloads/virtio-win-0.1-81.iso 7 qemu-system-x86_64 –enable-kvm -drive file=${DISKIMG},if=virtio -m 4096 \ 8 -net nic,model=virtio -net user -cdrom ${WIN7IMG} \ 9 -drive file=${VIRTIMG},index=3,media=cdrom \ 10 -rtc base=localtime,clock=host…

Read More

Very interesting and useful Arma 3 scripting commands for multiplayer missions.

Arma 3 scripting samples for creating MP missions This code sample inserted into the initServer.sqf will protect buildings 900m around your base from destruction by retards with a grudge against your server. { _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]);{ _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]); Name an object…

Read More

Very evil and cool Arma 3 script snippets.

Spawn a bomb wherever the player clicks on the map. onMapSingleClick "’Bomb_03_F’ createVehicle _pos,TRUE";onMapSingleClick "’Bomb_03_F’ createVehicle _pos,TRUE"; Attach a KAB-250 bomb to every bullet you fire, this also gives you unlimited ammo. Very destructive script for any malicious Arma 3 player. player addEventHandler ["Fired", { ("Bomb_03_F" createVehicle [0,0,1e9]) attachTo [_this…

Read More

How to encode a section of a movie to a webm file with mpv.

To encode a section of a movie file to a high-quality webm file, use this simple addon for mpv. Firstly run this command to create a directory to put the lua script. mkdir -p ~/.config/mpv/scriptsmkdir -p ~/.config/mpv/scripts Then download the required script to the directory we created. This is located…

Read More

More very useful Arma 3 scripting commands.

Some very cool Arma 3 SQF scripting samples Shoot a vehicle or soldier 50,000 feet into the sky. cursorTarget setVelocity [0,0,1000]; hint format["%1 Is flying to space!",name cursorTarget];cursorTarget setVelocity [0,0,1000]; hint format["%1 Is flying to space!",name cursorTarget]; Spawn an AAF support crate in random houses around the HQ. _houseList =…

Read More

How to spawn a randomly placed building in Arma 3.

This simple code for Arma 3 will spawn a randomly placed HQ building within the area of the mkr1 marker. This is a 4000×4000 marker placed on the map. This gets a random safe area and places the building within the area of this marker. _mrk = "mkr1"; _area =…

Read More

Glances. A nice new networking script for Linux that runs on Python.

Glances is a very detailed script that will print out comprehensive information about your Linux workstation or server. To install the Glances script clone the git repository this way. jason@jason-desktop:~$ git clone https://github.com/nicolargo/glances.git Cloning into ‘glances’… remote: Counting objects: 13758, done. remote: Total 13758 (delta 0), reused 0 (delta 0),…

Read More

How to have practically no weapon sway or recoil in an Arma 3 mission.

The weapon sway in Arma 3 is out of control right now. With the 1.54 Nexus update, the weapon sway is like a drunken Irishman. But you can remove this. player setCustomAimCoef 0.1; player addMPEventhandler ["MPRespawn", {player setCustomAimCoef 0.1}];   player setUnitRecoilCoefficient 0.1; player addEventHandler ["Respawn", {player setUnitRecoilCoefficient 0.1}];  …

Read More

A simple shell script to create a new Linux user account.

This simple script will help create new user accounts on a Linux system. This is very useful when administering a Linux machine and it is necessary to create a few user accounts. #!/bin/bash   clear   trap "" SIGHUP SIGINT SIGTERM SIGTSTP   # Get username, check if its taken,…

Read More

Create a cool looking clock in your terminal.

This simple little script will print an updating clock in the terminal. #!/bin/sh   watch -t -n 1 ‘date +%H:%M:%S | figlet’#!/bin/sh watch -t -n 1 ‘date +%H:%M:%S | figlet’ This version will print a cow that tells you the time. #!/bin/sh   watch -t -n 1 ‘date +%H:%M:%S |…

Read More

A useful script for gaining information about your Ethernet adapter.

This useful shell script will print information about your Ethernet or Wireless adapter. This is very useful for getting a lot of information at once. #!/bin/sh   DEV="eno16777736"   echo "Showing information for the active network interface: $DEV."   echo -e "-*- \e[1mGet timestamping information for your Ethernet device.\e[0m -*-"…

Read More