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. Then place a car wreck, … 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 it may be used where … 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 spawn { waitUntil { if( … 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 -smp cores=4,threads=4 \ 11 -usbdevice … 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 crat99 and then place this … 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 select 6, [0,0,0]]; (_this select … 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 on this Github. https://github.com/ekisu/mpv-webm. wget … 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 = getPos _cargo nearObjects ["House",500]; { … Read more

Easily spawn an enemy jet to patrol an AO in Arma 3 with a script.

This simple script will spawn a jet to patrol an AO and attack any enemy vehicle or helicopter it sees. This is improved code that has a proper patrol radius and is better than the jet patrolling in too small a radius. // Spawn a CAS jet to patrol the AO.   #define PLANE_TYPE "rhs_l159_CDF","rhs_l39_cdf","rhs_mig29s_vmf","RHS_Su25SM_vvsc","RHS_T50_vvs_generic","RHS_T50_vvs_generic_ext","RHS_T50_vvs_blueonblue" … Read more

Useful Linux ideas and tips. Print graphical notifications from a shell script.

To print a graphical notification from a shell script, insert this code. notify-send "Match Found!"notify-send "Match Found!" This will pop up a notification on your desktop, this will alert you to the fact that your shell script has done something. Make your computer talk. This will speak whatever you type as text. jason@jason-desktop:~$ espeak "I … 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), pack-reused 13758 Receiving objects: 100% … 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}];   player enablestamina false player addEventHandler … 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, and if it is the … Read more

Universal archive unpacker script for Linux. Easily unpack any archive with the terminal.

The unp script for Linux is a script that will detect what the archive is and call the appropriate program to handle it. This is a very useful script for the command line user. In the example below I am unpacking a zip file. jason@eyjafjallajkull:~/Downloads$ unp northwind.sql_.zip Archive: northwind.sql_.zip inflating: northwind.sqljason@eyjafjallajkull:~/Downloads$ unp northwind.sql_.zip Archive: northwind.sql_.zip … 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 | cowsay’#!/bin/sh watch -t -n 1 … 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 -*-" echo   ethtool -T $DEV … Read more