Giter Club home page Giter Club logo

ximscripts's Introduction

XimLink Scripts

A collection of scripts for Xim Link. Currently for BlackOps Cold War.

This is meant to be the contents of the folder located at:

%USER%\My Documents\Xim Link\Scripts

Configuration

Most configuration happens in the weapons.ini file.

An example entry:

[ak74u]
name=AK-74u
damage=27
rpm=697
degrees=200
speed=23 

name = Name of the gun. Meant to display on the as-yet non-existent GUI

damage = The minimum amount of damage the gun does. The damage at its furthest effective range

rpm = Rounds per Minute

degrees = Up being 0, incrementing clockwise

speed = How much to move the stick

Anti Recoil

A weapon's degree and speed properties dictate how the recoil compensation behaves.

Speed is how far you would need to push the analog joystick on your controller in order to compensate for the recoil. Values are from 21 - 100.

Degree is the compensation direction, from 0-360, starting at the top going clockwise

For a weapon whose recoil is straight up at a small rate, a setting of

degrees=180
speed=30

might work.

Bursting

Some weapons have changing recoil patterns. The FFAR and Groza assault rifles are a good example of this, creating "S"-shaped recoil patterns throughout their firing. In most cases, the full amount of bullets required to down a foe will leave the gun before the recoil pattern changes direction.

For this reason, giving a configuration entry the damage and rpm values will allow you to "pulse" or "burst" a fully-automatic weapon. Since the first leg of the "S" pattern is predictable, and all that is necessary to log a kill, we can also provide recoil compensation for it as well.

This formula demonstrates the calculation of the shortest amount of time to hold the trigger necessary to kill a player

health = 150

# ak74u
damage=27 # at its furthest distance
rpm=697

shots to kill (STK) = health / damage + 1 = 6
time to kill (TTK) = STK / (RPM / 60) = 516ms

Thus holding the trigger for 516ms will provide enough TTK while incurring the least amount of recoil in the most predictable pattern.

Functions

The helpers.ahk file contains the definition of the functions that are called when squeezing the trigger.

You have the following options:

;; bursts a weapon and performs anti-recoil for the duration
;; of the weapon's ttk (times any multipliers)
antiRecoilBurst(weapon)

;; bursts a weapon without AR
onlyBurst(weapon)

;; perform only anti-recoil logic, no bursting
onlyAntiRecoil(weapon)

;; autofire a semi-auto weapon n times
autofire(times)

;; quickscope on unique, only left-mouse-btn presses
;; operate as normal fire if held together with right-mouse-btn
quickscope(ads_time)

;; repeatedly fires akimbo weapons
dualAuto(times)

The following is a blank template for creating a new weapon profile.

#Include %A_AppData%\XIM Link\ScriptAdditionals\AHK_ADDITIONALS.ahk
#Include %A_MyDocuments%\XIM Link\Scripts\lib\helpers.ahk

#NoEnv

;; Configuration Variables
gun_id := "$GUN_ID"

config := build_config(gun_id)
gun := new Weapon(config, health)

~LButton::fireHandler(func("$DESIRED_FUNCTION_HERE"), $funcArg1, burst_sleep)

;; optional
;; #Include %A_MyDocuments%\XIM Link\Scripts\lib\bindings.ahk

Bindings

Reload Cancel
If the Left Mouse button is pressed within 1.5 seconds, the average reload time in-game, a reload cancel will be sent. (Double-taps weapon swap key)

Slide Cancel
Pressing LCtrl down will begin a slide if the character is sprtinging. A 'cancel' will be sent when Lctrl is released

180 Turn
WheelDown will turn the player 180 degrees nearly instantly

ximscripts's People

Contributors

audibleblink avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

n0trick5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.