Post: Help to convert these scripts
09-23-2014, 03:08 PM #1
Default Avatar
kentwan
Guest
(adsbygoogle = window.adsbygoogle || []).push({}); Hello everyone these are a few scripts which I have from CronusMax but they use their own scripting language but isnt very different to others. I am a programming noob and was hoping some of you would be able to help me change these scripts into AutoHotKey scripts. So here they are:



    #remap_Start
// Author:GL0ZZ3N
// Special thanks to Token
// Hold BACK, SELECT, SHARE, VIEW [depending on console]
// Then HOLD "X" or "SQUARE" [depending on console] while reloading to set your weapon
// Keep BOTH buttons HELD
// Watch your ammo fill up, then RELEASE both buttons
// You have now calibrated your weapon
// Tap your reload button and every reload will be perfect.. depending on your reaction time that is

unmap 1;
#remap_End

//VARIABLES - int
//--------------------------------------------------------------
#int_Start
reloadtime;
PVAR;
#int_End
//INITIALIZATION - init
//--------------------------------------------------------------
#init_Start
PVAR = get_pvar(SPVAR_1, 0, 4000, 4000);
#init_End
//MAIN BLOCK - main
//--------------------------------------------------------------
#main_Start
if (get_val(1) &&(get_val(20))) combo_run(getreloadtime) combo_run(setpvar);
if (get_val(20) && (get_val(1) < 100)) combo_run(quickreload);
else if (combo_running(getreloadtime)){ combo_stop(quickreload);}
#main_End
//COMBOS - combo
//--------------------------------------------------------------
#combos_Start
combo getreloadtime {reloadtime = get_ptime(20);}
combo setpvar {set_pvar(PVAR_1, (reloadtime));}

combo quickreload {
wait (PVAR);
set_val(17,100);
wait(20);
//
wait(20);
set_val(17,100);
wait(20);
//
}
#combos_End




    // RAPIDFIRE ADJUSTABLE
//VARIABLES
// ---------------------------------------------------------
#int_Start
rapid_onoff = TRUE;
fire_button;
scope_button;
hold_time;
rest_time;
RATE_OF_FIRE = 14.5; //Range: 1 to 25 RPS (Round/s)
#int_End
//INITIALIZATION
// ---------------------------------------------------------
#init_Start
if(get_console() == PIO_PS3) {
fire_button = 3;
scope_button = 6;}
else { // Natural Trigger & Bumper
fire_button = 4;
scope_button = 7;}
#init_End
//MAIN BLOCK
// ---------------------------------------------------------
#main_Start
// RAPID FIRE
hold_time = 500 / RATE_OF_FIRE;
rest_time = hold_time - 20;
if(rest_time < 0) rest_time = 0;
// INCREASE RATE OF FIRE press ADS + D-pad UP
if(get_val(scope_button) && event_press(13)) RATE_OF_FIRE = RATE_OF_FIRE+0.2;
// DECREASE RATE OF FIRE press ADS + D-pad DOWN
if(get_val(scope_button) && event_press(14)) RATE_OF_FIRE = RATE_OF_FIRE-0.2;

// RAPID FIRE
if(get_val(fire_button) && rapid_onoff) {combo_run(RAPID_FIRE);}
else if(combo_running(RAPID_FIRE)) {combo_stop(RAPID_FIRE);}
#main_End

//COMBOS
// ---------------------------------------------------------
#combos_Start
//Rapidfire
combo RAPID_FIRE {//begin
set_val(fire_button, 100);
wait(hold_time);
set_val(fire_button, 0);
wait(rest_time);
set_val(fire_button, 0);
}//end
#combos_End


    // JITTER
//DECLARARATIONS - define
//--------------------------------------------------------------
#define_Start
RATE_OF_FIRE=33;
#define_End
//VARIABLES - int
//--------------------------------------------------------------
#int_Start
hold_time;
rest_time;
#int_End
//INITIALIZATION - init
//--------------------------------------------------------------
#init_Start
hold_time = 500 / RATE_OF_FIRE;
rest_time = hold_time - 20;
#init_End
//MAIN BLOCK - main
//--------------------------------------------------------------
#main_Start
if(get_val(XB1_RT)) {combo_run(Jitter);}
else if(combo_running(Jitter)) {combo_stop(Jitter);}
#main_End
//COMBOS - combo
//--------------------------------------------------------------
#combos_Start
// Jitter
combo Jitter {//begin
set_val(XB1_Y, 100); set_val(XB1_X, 100); wait(hold_time);
set_val(XB1_Y, 0); set_val(XB1_X, 0); wait(rest_time);
set_val(XB1_Y, 0); set_val(XB1_X, 0);
}//end
#combos_End



Thank you for taking the time to read this post and also thank you for helping me!
09-23-2014, 06:28 PM #2
A1
Why You Mad Bruh?
Moved To Modding Questions

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo