WarFace Script???

GPC2 script programming for Titan Two. Code examples, questions, requests.

Re: WarFace Script???

Postby DontAtMe » Sat Dec 28, 2019 8:03 am

If you have a sd card in your T2, Remove, it.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: WarFace Script???

Postby Shthappensbro » Sat Dec 28, 2019 9:51 am

DontAtMe wrote:If you have a sd card in your T2, Remove, it.



i do but im using it??? u think that will fix it??
User avatar
Shthappensbro
Major
Major
 
Posts: 754
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Shthappensbro » Sat Dec 28, 2019 6:13 pm

DontAtMe wrote:If you have a sd card in your T2, Remove, it.




oh my it works now with the card out i dont get the error... dafukkk ?? whats with that... its a 16GB SanDisk UltraPlus why would it just start giving me this error tho? nothin wrong with the sd
User avatar
Shthappensbro
Major
Major
 
Posts: 754
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Mad » Sat Dec 28, 2019 7:54 pm

Try formatting it again in Device configuration.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am

Re: WarFace Script???

Postby Shthappensbro » Sat Dec 28, 2019 11:41 pm

Mad wrote:Try formatting it again in Device configuration.


looks like that worked! why does it do that???
User avatar
Shthappensbro
Major
Major
 
Posts: 754
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby bonefisher » Sun Dec 29, 2019 12:01 am

Every time you update firmware you need to update sd card for some reason it doesn't do it automatic and if nothing changes in sd card you don't get problem but if there is change in that for download to sd you get issues like your going through!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: WarFace Script???

Postby Shthappensbro » Sun Dec 29, 2019 12:11 am

bonefisher wrote:Every time you update firmware you need to update sd card for some reason it doesn't do it automatic and if nothing changes in sd card you don't get problem but if there is change in that for download to sd you get issues like your going through!




oh damn but it deletes everything :/
User avatar
Shthappensbro
Major
Major
 
Posts: 754
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby bonefisher » Sun Dec 29, 2019 12:58 am

Just configure instead of formatting
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: WarFace Script???

Postby Shthappensbro » Sun Dec 29, 2019 1:40 am

bonefisher wrote:Just configure instead of formatting



alright thanks hey man can u fix ur script up a little? for warface u can delete the ads spam the ads tracking not the other one it does work so it frees script up ?? and can u add auto slide when u double tap shift witch would be Ls and B



Code: Select all
#pragma METAINFO("Warface MODzPACK", 1, 2, "bonefisher")
/* Special credits goes out to DrNefario for a awesome anti-recoil function!*/
 
/* *****************************************************************************
<cfgdesc>
[Warface MODzPACK]
color          = #008000
shortdesc      = Use Interactive Configuration to configure and make sure to hit SAVE and RUN button to run script. Primary/ Secondary switching enabled. If you get on wrong side just hold switch button pass 250 ms to line up class. Runtime operations for manual overrides. <br /><br /> <b><u>Runtime Operations</b></u>  <br /><br />Tap <b>[PS|XBOX]</b> button to activate modz timer with white LED indicating for 1500ms. In this time you'll be able to toggle mods in runtime operations til white LED goes out. When toggle mods LED RED = ON and GREEN = OFF.</b><br /><br /><b>[Toggle Mods]</b><br /><br />Press <b>[CROSS/A BUTTON]</b> to quickly enable/disable the <b>[MODz]</b>.<br /><br />Press <b>[FIRE TRIGGER]</b> on each side of switching to quickly enable/disable the <b>[RAPID FIRE]</b> mod.<br /><br />Press <b>[ADS TRIGGER]</b> to quickly enable/disable the <b>[QUICKSCOPE]</b>mod.<br /><br />Press <b>[D-Pad Up]</b> to quickly enable/disable the <b>[AIM ABUSE]</b> mod.<br /><br />Press <b>[D-Pad Down]</b> to quickly enable/disable the <b>[FIRE AIM ABUSE]</b> mod.<br /><br />Press <b>[D-Pad Left]</b> to quickly cycle thru options of <b>[STRAFE]</b> mod.<br /><br />Press <b>[D-Pad Right]</b> to quickly cycle thru of <b>[CROUCH SPAM]</b> mod.
control        = info
 
[WEAPON SETTINGS:]
color          = #008000
collapsible    = 2
shortdesc      = <font color="brown">PRIMARY WEAPON ENABLE:</font> <font color="green"> Rapid Fire?</font>
byteoffset     = 0
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 0
item           = Rapidfire ON
 
[Primary Hold Time Setting]
group          = true
shortdesc      = <font color="brown">PRIMARY ROUNDS PER MINUTE:</font> <font color="green">   Set to desired rpm setting.</font>
byteoffset     = 1
bitsize        = 32
control        = spinboxf
default        = 7500
minimum        = 0
maximum        = 52000
step           = 10
decimals       = 1
 
[Secondary Weapon Setting]
color          = #008000
group          = true
shortdesc      = <font color="brown">SECONDARY WEAPON ENABLE:</font> <font color="green"> Rapid Fire?</font>
byteoffset     = 9
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 0
item           = Rapidfire ON
 
[Secondary Hold Time Setting]
group          = true
shortdesc      = <font color="brown">SECONDARY ROUNDS PER MINUTE:</font> <font color="green">   Set to desired rpm setting.</font>
byteoffset     = 10
bitsize        = 32
control        = spinboxf
default        = 7500
minimum        = 0
maximum        = 52000
step           = 10
decimals       = 1
 
[ANTI RECOIL SETTINGS:]
color          = #008000
collapsible    = 2
 
[Stick Noise Remover]
group          = true
shortdesc      = <font color="brown">STICK NOISE:</font> <font color="green"> Set to the resting dead zone values for your right stick.</font>
byteoffset     = 18
bitsize        = 32
control        = spinboxf
default        = 1000
minimum        = 0
maximum        = 10000
step           = 100
decimals       = 2
 
[PRIMARY ANTI RECOIL SETTINGS:]
group          = true
shortdesc      = <font color="brown">PRIMARY WEAPON:</font> <font color="green"> Anti Recoil?</font>
byteoffset     = 22
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 1
item           = Anti Recoil ON
 
[Primary Anti Recoil Settings]
group          = true
shortdesc      = <font color="brown">PRIMARY:</font> <font color="green"> Anti Recoil Delay (In MS) after fire button is pressed.</font>
byteoffset     = 23
bitsize        = 16
control        = slider
default        = 75
minimum        = 0
maximum        = 1000
step           = 5
 
[Primary Anti Recoil]
group          = true
shortdesc      = <font color="brown">PRIMARY:</font> <font color="green"> Anti Recoil vertical pull force compensation.</font>
byteoffset     = 25
bitsize        = 32
control        = spinboxf
default        = 1600
minimum        = -10000
maximum        = 10000
step           = 50
decimals       = 2
 
[SECONDARY ANTI RECOIL SETTINGS:]
group          = true
shortdesc      = <font color="brown">SECONDARY WEAPON:</font> <font color="green"> Anti Recoil?</font>
byteoffset     = 29
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 1
item           = Anti Recoil ON
 
[Secondary Anti Recoil Settings]
group          = true
shortdesc      = <font color="brown">SECONDARY:</font> <font color="green"> Anti Recoil Delay (In MS) after fire button is pressed.</font>
byteoffset     = 30
bitsize        = 16
control        = slider
default        = 75
minimum        = 0
maximum        = 1000
step           = 5
 
[Secondary Anti Recoil]
group          = true
shortdesc      = <font color="brown">SECONDARY:</font> <font color="green"> Anti Recoil vertical pull force compensation.</font>
byteoffset     = 32
bitsize        = 32
control        = spinboxf
default        = 1400
minimum        = -10000
maximum        = 10000
step           = 50
decimals       = 2
 
[ASSIST TRACKING SETTINGS:]
color       = #008000
collapsible = 2
 
[ASSIST TRACKING:]
group          = true
shortdesc      = <font color="green">ADS tracking option.</font>
byteoffset     = 36
bitsize        = 8
control        = radiobox
default        = 0
item           = Disabled
item           = Enabled ADS Abuse one tracking(Adjustable)
item           = Enabled ADS Abuse full time tracking(Adjustable)
 
[Aim Hold Time]
group          = true
shortdesc      = <font color="brown">Aim Hold Time:</font><font color="green"> measured in milliseconds.
byteoffset     = 37
bitsize        = 16
control        = spinbox
default        = 320
minimum        = 0
maximum        = 2000
step           = 5
 
[Aim Release Time]
group          = true
shortdesc      = <font color="brown">Aim Release Time:</font><font color="green"> measured in milliseconds.
byteoffset     = 41
bitsize        = 16
control        = spinbox
default        = 50
minimum        = 0
maximum        = 500
step           = 5
 
[AIM ABUSE SETTINGS:]
group          = true
shortdesc      = <font color="green">Firing tracking option.</font>
byteoffset     = 56
bitsize        = 1
bitoffset      = 7
control        = checkbox
default        = 0
item           = Aim Abuse
 
[Auto Aim Hold Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Hold Time:</font> <font color="green"> Configure the time period, in milli-seconds, of which the ADS(Scope) button should be pressed when the aim-assist abuse is activated.
byteoffset     = 57
bitsize        = 16
control        = spinbox
default        = 350
minimum        = 0
maximum        = 5000
step           = 50
 
[Auto Aim Release Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Release Time:</font> <font color="green"> Configure the time period, in milli-seconds, of which the ADS(Scope) button should be released when the aim-assist abuse is activated.
byteoffset     = 59
bitsize        = 16
control        = spinbox
default        = 80
minimum        = 0
maximum        = 5000
step           = 5
 
[Auto Aim Fire Pre Pause Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Fire Pre Pause Time:</font> <font color="green"> Configure the time period, in milli-seconds, to pause rapid fire for given time before ads release.
byteoffset     = 61
bitsize        = 16
control        = spinbox
default        = 10
minimum        = 0
maximum        = 5000
step           = 5
 
[Auto Aim Fire Post Pause Time]
group          = true
shortdesc      = <font color="brown">Auto Aim Fire Post Pause Time:</font> <font color="green"> Configure the time period, in milli-seconds, to pause rapid fire for given time after ads release.
byteoffset     = 63
bitsize        = 16
control        = spinbox
default        = 10
minimum        = 0
maximum        = 5000
step           = 5
 
[QUICKSCOPE SETTINGS:]
color          = #008000
collapsible    = 2
shortdesc         = <font color="green">Enable Scope features on the ADS trigger.</font>
byteoffset       = 77
bitsize             = 8
control             = radiobox
default             = 0
item               = Disabled
item               = Enable quick scope.
 
[QUICK SCOPE ADJUSTMENTS]
group               = true
shortdesc         = <font color="green">Adjust quick scope delay.</font>
byteoffset       = 78
bitsize             = 16
control             = slider
default             = 320
minimum             = 0
maximum             = 500
step               = 1
 
[STRAFE SETTINGS:]
color       = #008000
collapsible = 2
 
[Strafe MODz]
group       = true
shortdesc   = <font color="green">Strafe option.</font>
byteoffset  = 115
bitsize     = 8
control     = radiobox
default     = 0
item        = Disabled
item        = Enabled Strafe (Adjustable)
item        = Enabled Strafe(Hip only)(Adjustable)
item        = Enabled Strafe On single press ads and double press ads Off.
 
[Strafe Adjustable Setting]
group       = true
shortdesc   = <br><b><font color="green">Strafe Adjustable Setting:</font></b>
byteoffset  = 116
bitsize     = 32
control     = spinbox
default     = 400
minimum     = 0
maximum     = 2000
step        = 10
 
[CROUCH SPAM SETTINGS:]
color       = #008000
collapsible = 2
 
[Crouch Spam MODz]
group       = true
shortdesc   = <font color="green">Crouch Spam option.</font>
byteoffset  = 120
bitsize     = 8
control     = radiobox
default     = 0
item        = Disabled
item        = Enabled Crouch Spam ADS only(Adjustable)
item        = Enabled Crouch Spam Hip only(Adjustable)
item        = Enabled Crouch Spam on Fire(Adjustable).
item        = Enabled Crouch Spam while ADS + Fire(Adjustable).
 
[Crouch Spam Adjustable Setting]
group       = true
shortdesc   = <br><b><font color="green">Crouch Spam Adjustable Setting:</font></b>
byteoffset  = 121
bitsize     = 32
control     = spinbox
default     = 140
minimum     = 0
maximum     = 1000
step        = 5
</cfgdesc>
***************************************************************************** */

 
#include <display.gph>
#define wait(a)  wait((int)a);
#define WEAPON_0   0
#define WEAPON_1   1
int Count;
bool modz = 1;
int modz_toggle;
fix32 prpm;
fix32 psps;
fix32 phold_time, prest_time;
fix32 srpm;
fix32 ssps;
fix32 shold_time, srest_time;
bool pUseRapidFire;
bool sUseRapidFire;
uint8  weapon = 0;
fix32 StickNoise;
bool pUseAntiRecoil;
uint16 pARecoilDelay;
fix32 pARecoil_V;
bool sUseAntiRecoil;
uint16 sARecoilDelay;
fix32 sARecoil_V;
fix32 ARecoil_V_ToUse;
uint16 ARecoilDelay_ToUse;
//Aim Abuse
uint8 ads_abuse;
int AimHoldTime;
int AimReleaseTime;
bool bUseAimAbuse = FALSE;
bool bAutoAimPauseFire;
int AutoAimHoldTime;
int AutoAimReleaseTime;
int AutoAimFirePrePauseTime;
int AutoAimFirePostPauseTime;
int    quick_scope_delay;
uint8  scope;
uint8 STRAFE_MODz;
uint32 STRAFE_SHUFFLE;
uint8 CROUCH_SPAM;
uint32 CROUCH_SHUFFLE;
uint32    IND[] = {
    _0_,         // 0
    _1_,         // 1
    _2_,         // 2
    _3_,         // 3
    _4_,         // 4
    _P_,         // 5
    _S_          // 6
};
init
{
    pmem_load();
    pUseRapidFire = (pmem_read(0) >> 7) & 0b1;
  pmem_read(1, &prpm);
    sUseRapidFire = (pmem_read(9) >> 7) & 0b1;
  pmem_read(10, &srpm);
  pmem_read(18, &StickNoise);
    pUseAntiRecoil = (pmem_read(22) >> 7) & 0b1;
  pmem_read(23, &pARecoilDelay);
  pmem_read(25, &pARecoil_V);
    sUseAntiRecoil = (pmem_read(29) >> 7) & 0b1;
  pmem_read(30, &sARecoilDelay);
  pmem_read(32, &sARecoil_V);
    ads_abuse = pmem_read(36);
    pmem_read(37, &AimHoldTime);
  pmem_read(41, &AimReleaseTime);
    bUseAimAbuse = (pmem_read(56) >> 7) & 0b1;
  pmem_read(57, &AutoAimHoldTime);
  pmem_read(59, &AutoAimReleaseTime);
  pmem_read(61, &AutoAimFirePrePauseTime);
  pmem_read(63, &AutoAimFirePostPauseTime);
    scope = pmem_read(77);
  pmem_read(78, &quick_scope_delay);
    STRAFE_MODz = pmem_read(115);
  pmem_read(116, &STRAFE_SHUFFLE);
    CROUCH_SPAM = pmem_read(120);
  pmem_read(121, &CROUCH_SHUFFLE);
    set_weapon(weapon);
    p_update_rapidfire();
    s_update_rapidfire();
}
 
main
{
      inhibit(BUTTON_1, 140);
    if(event_release(BUTTON_1) && time_active(BUTTON_1) < 140)
    {
        modz_toggle = 1;
    }
    else
    {
    if(modz_toggle)combo_run(modz_timer);
    }
    if (modz_toggle)
    {
    if (event_active(BUTTON_4)||event_active(BUTTON_5)||
        event_active(BUTTON_6)||event_active(BUTTON_7)||
        event_active(BUTTON_8)||event_active(BUTTON_9)||
        event_active(BUTTON_10)||event_active(BUTTON_11)||
        event_active(BUTTON_12)||event_active(BUTTON_13)||
        event_active(BUTTON_14)||event_active(BUTTON_15)||
        event_active(BUTTON_16)||event_active(BUTTON_17))
        {
            combo_restart(modz_timer);
        }
    }
    if(modz_toggle)
    {
        set_val(BUTTON_4, 0);set_val(BUTTON_5, 0);set_val(BUTTON_6, 0);
        set_val(BUTTON_7, 0);set_val(BUTTON_8, 0);set_val(BUTTON_9, 0);
        set_val(BUTTON_10, 0);set_val(BUTTON_11, 0);set_val(BUTTON_12, 0);
        set_val(BUTTON_13, 0);set_val(BUTTON_14, 0);set_val(BUTTON_15, 0);
        set_val(BUTTON_16, 0);set_val(BUTTON_17, 0);
    }
        if(modz_toggle)
        {
        if(event_active(BUTTON_16))
        {
            if(modz == 0)
            {
                modz = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(modz == 1)
            {
                modz = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
        }
        if(event_active(BUTTON_8))
        {
            if(scope == 0)
            {
                scope = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(scope == 1)
            {
                scope = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
            pmem_write(77,scope);
            printf("QUICK SCOPE: %d", scope);
            pmem_save();
        }
        if(event_active(BUTTON_10))
        {
            if(ads_abuse == 0)
            {
                ads_abuse = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(ads_abuse == 1)
            {
                ads_abuse = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
            pmem_write(36,ads_abuse);
            printf("ADS ABUSE: %d", ads_abuse);
            pmem_save();
        }
        if(event_active(BUTTON_11))
        {
            if(bUseAimAbuse == 0)
            {
                bUseAimAbuse = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(bUseAimAbuse == 1)
            {
                bUseAimAbuse = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
            pmem_write(56,bUseAimAbuse);
            printf("AIM ABUSE: %d", bUseAimAbuse);
            pmem_save();
        }
        if(event_active(BUTTON_12))
        {
            if(STRAFE_MODz == 0)
            {
                STRAFE_MODz = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(STRAFE_MODz == 1)
            {
                STRAFE_MODz = 2;
                display (2);
 
                combo_run(modz_on_led);
            }
            else if(STRAFE_MODz == 2)
            {
                STRAFE_MODz = 3;
                display (3);
 
                combo_run(modz_on_led);
            }
            else if(STRAFE_MODz == 3)
            {
                STRAFE_MODz = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
            pmem_write(115,STRAFE_MODz);
            printf("STRAFE_MODz: %d", STRAFE_MODz);
            pmem_save();
        }
        if(event_active(BUTTON_13))
        {
            if(CROUCH_SPAM == 0)
            {
                CROUCH_SPAM = 1;
                display (1);
 
                combo_run(modz_on_led);
            }
            else if(CROUCH_SPAM == 1)
            {
                CROUCH_SPAM = 2;
                display (2);
 
                combo_run(modz_on_led);
            }
            else if(CROUCH_SPAM == 2)
            {
                CROUCH_SPAM = 3;
                display (3);
 
                combo_run(modz_on_led);
            }
            else if(CROUCH_SPAM == 3)
            {
                CROUCH_SPAM = 4;
                display (4);
 
                combo_run(modz_on_led);
            }
            else if(CROUCH_SPAM == 4)
            {
                CROUCH_SPAM = 0;
                display (0);
 
                combo_run(modz_off_led);
            }
            pmem_write(120,CROUCH_SPAM);
            printf("CROUCH_SPAM: %d", CROUCH_SPAM);
            pmem_save();
        }
    }
    if(modz==1){
    //--------------------------WEAPON-SWITCHING----------------------------------//
  if(event_release(BUTTON_14) && time_active(BUTTON_14) < 250){
    if(weapon == WEAPON_0) set_weapon(WEAPON_1);
    else if(weapon == WEAPON_1) set_weapon(WEAPON_0);
    }
 
    switch(weapon) {
    case WEAPON_0: {
    if(modz_toggle)
    {
      if(event_active(BUTTON_5))
        {
            if(pUseRapidFire == 0)
            {
              pUseRapidFire = 1;
 
                combo_run(modz_on_led);
            }
            else if(pUseRapidFire == 1)
            {
                pUseRapidFire = 0;
 
                combo_run(modz_off_led);
            }
            pmem_write(0,pUseRapidFire);
            printf("pri RAPID FIRE: %d", pUseRapidFire);
            pmem_save();
        }
    }
    if(pUseRapidFire == 0)
    {
        set_val(BUTTON_5, 0.0);
        if (get_actual(BUTTON_5))
        {
        if (bAutoAimPauseFire == FALSE)
        {
            set_val(BUTTON_5, 100.0);
        }
        }
    }
    if(pUseRapidFire == 1)
    {
        if (get_actual(BUTTON_5))
        {
        if (bAutoAimPauseFire == FALSE)
        {
            combo_run(pRapidFire);
        }
        }
    }
    if(pUseAntiRecoil == 1)
    {
        ARecoilDelay_ToUse = pARecoilDelay;
        ARecoil_V_ToUse = pARecoil_V;
    }
    } break;
    case WEAPON_1: {
    if(modz_toggle)
    {
      if(event_active(BUTTON_5))
      {
        if(sUseRapidFire == 0)
          {
            sUseRapidFire = 1;
 
              combo_run(modz_on_led);
          }
          else if(sUseRapidFire == 1)
          {
            sUseRapidFire = 0;
 
              combo_run(modz_off_led);
          }
              pmem_write(9,sUseRapidFire);
              printf("sec RAPID FIRE: %d", sUseRapidFire);
              pmem_save();
      }
    }
    if(sUseRapidFire == 0)
    {
        set_val(BUTTON_5, 0.0);
        if (get_actual(BUTTON_5))
        {
        if (bAutoAimPauseFire == FALSE)
        {
            set_val(BUTTON_5, 100.0);
        }
        }
    }
    if(sUseRapidFire == 1)
    {
      if (get_actual(BUTTON_5))
        {
      if (bAutoAimPauseFire == FALSE)
        {
          combo_run(sRapidFire);
        }
        }
    }
    if(sUseAntiRecoil == 1)
    {
        ARecoilDelay_ToUse = sARecoilDelay;
        ARecoil_V_ToUse = sARecoil_V;
    }
    } break;
  }
    if (get_actual(BUTTON_5) && time_active(BUTTON_5) >= ARecoilDelay_ToUse)
    {
      if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
        if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
        if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
        if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
        //We currently only want shoot to be on during the hold phase of rapid fire
        if (get_actual(BUTTON_8)&& get_actual(BUTTON_5))
        {
          AntiRecoil(ARecoil_V_ToUse);
        }
    }
    if(ads_abuse == 1)
    {
        if(get_actual(BUTTON_8) && !get_actual(BUTTON_5))
        {
          combo_run(aim_abuse);
        }
    }
    if(ads_abuse == 2)
    {
        if(get_actual(BUTTON_8) && !get_actual(BUTTON_5))
        {
          combo_run(aim_abuse);
        }
    }
    if (bUseAimAbuse == 1)
    {
        if (get_actual(BUTTON_8) && get_actual(BUTTON_5))
        {
            combo_run(AimAbuse);
        }
        else
        {
            bAutoAimPauseFire = FALSE;
            combo_stop(AimAbuse);
        }
    }
    if(scope == 1 ){
    if(event_release(BUTTON_8) && time_active(BUTTON_8) < 240) {
        combo_run(one_shot);
    }
    }
    if(STRAFE_MODz == 1) {
    if(get_val(BUTTON_5)) {
        combo_run(super_strafe);
    }else if(event_release(BUTTON_5)) {
        combo_stop(super_strafe);
    }
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_stop(super_strafe);
    }
    }
    if(STRAFE_MODz == 2) {
    if((!get_val(BUTTON_8) && get_val(BUTTON_5)) || (event_release(BUTTON_8) && get_val(BUTTON_5))) {
        combo_run(super_strafe);
    }else if(event_release(BUTTON_5)) {
        combo_stop(super_strafe);
    }
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_stop(super_strafe);
    }
    }
    if(STRAFE_MODz == 3) {
        #define STRAFE_OFF   0
    #define STRAFE_ON    1
    static uint8 strafe;
    if(event_active(BUTTON_8)) {
        strafe = STRAFE_ON;
        display_overlay(_1_, 500);
    } else if(is_active(BUTTON_8) && time_release(BUTTON_8) <= 200) {
        strafe = STRAFE_OFF;
        display_overlay(_0_, 500);
    }
    if(strafe == STRAFE_ON){
        combo_run(super_strafe);
    }else combo_stop(super_strafe);
    if(is_active(STICK_2_Y)){combo_stop(super_strafe);}
    if(is_active(STICK_2_X)){combo_stop(super_strafe);}
    }
    if(CROUCH_SPAM == 1)
    {
        if(get_actual(BUTTON_8) && !get_actual(BUTTON_5))
        {
            if(Count<1) {combo_run(c_spam);}
        }
    }
    if(CROUCH_SPAM == 2)
    {
        if(!get_actual(BUTTON_8) && get_actual(BUTTON_5))
        {
            if(Count<1) {combo_run(c_spam);}
        }
    }
    if(CROUCH_SPAM == 3)
    {
        if(get_actual(BUTTON_5))
        {
            if(Count<1) {combo_run(c_spam);}
        }
    }
    if(CROUCH_SPAM == 4)
    {
        if(get_actual(BUTTON_8) && get_actual(BUTTON_5))
        {
            if(Count<1) {combo_run(c_spam);}
        }
    }
}
}
 
combo pRapidFire
{
    set_val(BUTTON_5, 100);
    wait(phold_time);
    set_val(BUTTON_5, 5);
    wait(prest_time);
      set_val(BUTTON_5, 0);
}
 
combo sRapidFire
{
    set_val(BUTTON_5, 100);
    wait(shold_time);
    set_val(BUTTON_5, 5);
    wait(srest_time);
      set_val(BUTTON_5, 0);
}
combo aim_abuse
{
    set_val(BUTTON_8, 100.0);
    wait(AimHoldTime);
    set_val(BUTTON_8, 5.0);
    wait(AimReleaseTime);
    set_val(BUTTON_8, 100.0);
}
 
combo AimAbuse
{
    bAutoAimPauseFire = FALSE;
    set_val(BUTTON_8, 50);
    wait(AutoAimHoldTime - AutoAimFirePrePauseTime);
    bAutoAimPauseFire = TRUE;
    wait(AutoAimFirePrePauseTime);
    set_val(BUTTON_8, 5.0);
    wait(AutoAimReleaseTime);
    set_val(BUTTON_8, 100);
    wait(AutoAimFirePostPauseTime);   
}
 
combo one_shot
{
      set_val(BUTTON_8, 100.0);
      wait(quick_scope_delay);
      set_val(BUTTON_8, 100.0);
      set_val(BUTTON_5, 100.0);
      wait(70);
      set_val(BUTTON_8, 100.0);
      wait(65);
}
 
combo super_strafe
{
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE/2);
    set_val(STICK_2_X, 100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    wait(STRAFE_SHUFFLE);
    set_val(STICK_2_X, 100);
    set_val(STICK_2_X, -100);
    wait(STRAFE_SHUFFLE/2);
    set_val(STICK_2_X, 100);
}
 
combo c_spam
{
    set_val(BUTTON_15,100);
    wait(CROUCH_SHUFFLE);
    wait(CROUCH_SHUFFLE);
    set_val(BUTTON_15,100);
    wait(CROUCH_SHUFFLE);
    wait(CROUCH_SHUFFLE);
    Count=Count+1;
    if(Count==1) {
        Count=0;
    }
}
 
combo modz_timer
{
    led_reset();
    led_set(LED_3, -1.0, 0);
    led_set(LED_4, -1.0, 0);
    wait(1500);
    led_reset();
    modz_toggle = 0;
}
 
combo modz_on_led
{
    combo_stop(modz_timer);
    led_reset();
    led_set(LED_2, -1.0, 0);
    wait(300);
}
 
combo modz_off_led
{
    combo_stop(modz_timer);
    led_reset();
    led_set(LED_3, -1.0, 0);
    wait(300);
}
 
void p_update_rapidfire()
{
    printf("<center><font style='color:blue;font-size:14px;',><br>ROUNDS PER MINUTE: %.04f", prpm);
    psps = prpm/ 60.0;
    phold_time = 500.0 / psps;
    prest_time = phold_time - 0.0;
    if(prest_time < 0.0) prest_time = 0.0;   
 
    return;
}
 
void s_update_rapidfire()
{
    printf("<center><font style='color:red;font-size:14px;',><br>ROUNDS PER MINUTE: %.04f", srpm);
    ssps = srpm/ 60.0;
    shold_time = 500.0 / ssps;
    srest_time = shold_time - 0.0;
    if(srest_time < 0.0) srest_time = 0.0;   
 
    return;
}
 
void AntiRecoil(fix32 recoil) {
  fix32 RY = get_actual(22);
  fix32 RX = get_actual(21);
  fix32 modifiedRY;
 
  fix32 trueRY = (sqrt(RY*RY+(RY*RY+RX*RX))-StickNoise)/sqrt(RY*RY+RX*RX)*RY*.8;
  fix32 trueRX = (sqrt(RY*RY+(RY*RY+RX*RX))-StickNoise)/sqrt(RY*RY+RX*RX)*RX*.9;
 
  if (RY > 0.0) modifiedRY = (100.0-StickNoise-recoil)/(100.0-StickNoise)*trueRY + recoil;
  if (RY < 0.0) modifiedRY = (100.0-StickNoise+recoil)/(100.0-StickNoise)*trueRY + recoil;
 
  fix32 altradius = sqrt(trueRX*trueRX + modifiedRY*modifiedRY);
 
  fix32 finalRX = trueRX * (altradius + StickNoise)/altradius;
  fix32 finalRY = modifiedRY * (altradius + StickNoise)/altradius;
 
  if (RX*RX+RY*RY <= StickNoise*StickNoise) set_val(22,(StickNoise+recoil));
 
  if (RX*RX+RY*RY > StickNoise*StickNoise) {
    set_val(22,clamp(finalRY, -100f, 100f));
    set_val(21,clamp(finalRX, -100f, 100f));
  }
}
 
void set_weapon(uint8 new_weapon)
{
  static uint8 old_weapon;
 
    if(new_weapon == old_weapon) return;
      old_weapon = new_weapon;
      weapon = new_weapon;
 
    static uint32 timestamp;
    uint32 elapsed = system_time() - timestamp;
 
    if(!elapsed || elapsed >= 10) {
    // Set LED
    switch(weapon) {
    case WEAPON_0: { // BLUE LED
      led_set(LED_1, 100.0, 0);
      led_set(LED_2, 0.0, 0);
      led_set(LED_3, 0.0, 0);
      led_set(LED_4, 0.0, 0);
            display (5);
    } break;
    case WEAPON_1: { // RED LED
      led_set(LED_1, 0.0, 0);
      led_set(LED_2, 100.0, 0);
      led_set(LED_3, 0.0, 0);
      led_set(LED_4, 0.0, 0);
            display (6);
    } break;
    }
    timestamp = system_time();
    }
    return;
}
 
 // Display Numbers
void display (uint8 indc)
{
    uint8 VIE;
    VIE = IND[indc];
    display_overlay(VIE, 2000 );
}
User avatar
Shthappensbro
Major
Major
 
Posts: 754
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby bonefisher » Sun Dec 29, 2019 4:20 am

when I get time!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

PreviousNext

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 80 guests