WarFace Script???

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

Re: WarFace Script???

Postby Shthappensbro » Sun Aug 11, 2019 6:38 pm

bonefisher wrote:Whatever I build will be for everything!



thats the only way to go!! hahaha
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Shthappensbro » Mon Aug 12, 2019 1:49 am

bonefisher wrote:Whatever I build will be for everything!




you playing the game>???
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Shthappensbro » Mon Aug 12, 2019 3:44 am

Mad wrote:Change 21 to 22 but that's also not going to work well.



how do i make straf always on???
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Mad » Mon Aug 12, 2019 4:49 am

Code: Select all
bool strafe = TRUE;
ConsoleTuner Support Team || Discord
Mad
Major
Major
 
Posts: 1157
Joined: Wed May 22, 2019 5:39 am

Re: WarFace Script???

Postby Shthappensbro » Mon Aug 12, 2019 1:54 pm

Mad wrote:
Code: Select all
bool strafe = TRUE;


Just post it by the other bools ???
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Shthappensbro » Mon Aug 12, 2019 7:18 pm

Mad wrote:
Code: Select all
bool strafe = TRUE;



i get error when putting that right below the other bools


found it had to take the other one out i think

how do i make it where it strafe no matter what??? tho like on it own ?


are make it active why moving forward too ? so with ads and fire and forward all actives it you know? like when i turn it on it says on ? tell i turn it off
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby Shthappensbro » Tue Aug 13, 2019 2:08 am

Mad wrote:
Code: Select all
bool strafe = TRUE;



u have xbox or ps4??
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

Re: WarFace Script???

Postby bonefisher » Tue Aug 13, 2019 4:16 am

You'll have to rewrite code for that!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5344
Joined: Thu Jan 29, 2015 10:49 am

Re: WarFace Script???

Postby bonefisher » Tue Aug 13, 2019 4:19 am

Code: Select all
 
/*
ADS +
DPAD UP to toggle rapidfire
DPAD DOWN to toggle strafe
DPAD LEFT to toggle crouch spam
DPAD RIGHT to toggle ADS Spam
*/

 
#pragma METAINFO("Warface", 1, 0, "Mad")
 
#define RF_HOLD     33
#define RF_RELEASE  64
#define AIM_HOLD    150
#define AIM_RELEASE 50
#define STRAFE_TIME 350
#define AA_VALUE    20
#define AA_DELAY    40
 
fix32 AR = 15f; // Anti Recoil Value
 
bool rapidfire;
bool strafe;
bool cspam;
bool aspam;
bool aa     = TRUE; // Enable aim assist.
bool recoil = FALSE; // Enable anti-recoil
 
init {
  led(255,0,0);
}   
 
main {
  if (is_active(7)) {
    if (event_active(9)) Toggle(1);
    if (event_active(10)) Toggle(2);
    if (event_active(11)) Toggle(3);
    if (event_active(12)) Toggle(4);
  }
 
  if (is_active(4) && aa) combo_run(AimAssist);
 
  if (is_active(21) || is_active(22)) combo_stop(AimAssist);
 
  if (get_actual(4)) {
    if (recoil) AntiRecoil(22, AR);
    if (rapidfire) combo_run(RapidFire);
  }
 
  if (strafe) {
    if(is_active(23) || is_active(24))  combo_stop(Strafe);
    else combo_run(Strafe);
  }
 
  if (cspam && get_actual(4)) combo_run(Crouch);
 
  if (aspam && get_actual(7) && !get_actual(4)) combo_run(AimAbuse);
}
 
combo RapidFire {
  set_val(4, 100);
  wait(RF_HOLD);
  set_val(4, 0);
  wait(RF_RELEASE);
}
 
combo Strafe {
  set_val(23, -100.0);
  wait(STRAFE_TIME);
  set_val(23, 100.0);;
  wait(STRAFE_TIME);
}
 
combo Crouch {
  set_val(14, 100);
  wait(30);
  set_val(14, 0);
  wait(30);
}
 
combo AimAbuse {
  set_val(7, 100);
  wait(AIM_HOLD);
  set_val(7, 0.0);
  wait(AIM_RELEASE);
}
 
combo AimAssist {
  set_val(22, AA_VALUE);
  set_val(21, AA_VALUE);
  set_val(21, -AA_VALUE);
  wait(AA_DELAY);
  set_val(22, -AA_VALUE);
  set_val(21, -AA_VALUE);
  set_val(21, AA_VALUE);
  wait(AA_DELAY);
}
 
void AntiRecoil (uint8 axis, fix32 recoil){
  if (sqrt(sq(get_actual(21)) + sq(get_actual(22))) < abs(recoil)) {
    set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_actual(axis));
  }
}
 
void Toggle(int id) {
  do{
    switch(id){
      case 1: {
        rapidfire = !rapidfire;
        if (rapidfire){ led(0, 255, 0); return; }
        else continue;
      }
      case 2: {
        strafe = !strafe;
        if (strafe){ led(0, 0, 255); return; }
        else continue;
      }
      case 3: {
        cspam = !cspam;
        if (cspam){ led(0, 255, 255); return; }
        else continue;
      }
      case 4: {
        aspam = !aspam;
        if (aspam){ led(255, 255, 0); return; }             
        else continue;
      }
    }
  }
  while(0);
  led(255, 0, 0);
}
 
void led(int8 r, int8 g, int8 b) {
    led_set(LED_1, (fix32)b, 0);
    led_set(LED_2, (fix32)r, 0);
    led_set(LED_3, (fix32)g, 0);
    return;
}
 

here
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5344
Joined: Thu Jan 29, 2015 10:49 am

Re: WarFace Script???

Postby Shthappensbro » Tue Aug 13, 2019 2:34 pm

bonefisher wrote:
Code: Select all
 
/*
ADS +
DPAD UP to toggle rapidfire
DPAD DOWN to toggle strafe
DPAD LEFT to toggle crouch spam
DPAD RIGHT to toggle ADS Spam
*/

 
#pragma METAINFO("Warface", 1, 0, "Mad")
 
#define RF_HOLD     33
#define RF_RELEASE  64
#define AIM_HOLD    150
#define AIM_RELEASE 50
#define STRAFE_TIME 350
#define AA_VALUE    20
#define AA_DELAY    40
 
fix32 AR = 15f; // Anti Recoil Value
 
bool rapidfire;
bool strafe;
bool cspam;
bool aspam;
bool aa     = TRUE; // Enable aim assist.
bool recoil = FALSE; // Enable anti-recoil
 
init {
  led(255,0,0);
}   
 
main {
  if (is_active(7)) {
    if (event_active(9)) Toggle(1);
    if (event_active(10)) Toggle(2);
    if (event_active(11)) Toggle(3);
    if (event_active(12)) Toggle(4);
  }
 
  if (is_active(4) && aa) combo_run(AimAssist);
 
  if (is_active(21) || is_active(22)) combo_stop(AimAssist);
 
  if (get_actual(4)) {
    if (recoil) AntiRecoil(22, AR);
    if (rapidfire) combo_run(RapidFire);
  }
 
  if (strafe) {
    if(is_active(23) || is_active(24))  combo_stop(Strafe);
    else combo_run(Strafe);
  }
 
  if (cspam && get_actual(4)) combo_run(Crouch);
 
  if (aspam && get_actual(7) && !get_actual(4)) combo_run(AimAbuse);
}
 
combo RapidFire {
  set_val(4, 100);
  wait(RF_HOLD);
  set_val(4, 0);
  wait(RF_RELEASE);
}
 
combo Strafe {
  set_val(23, -100.0);
  wait(STRAFE_TIME);
  set_val(23, 100.0);;
  wait(STRAFE_TIME);
}
 
combo Crouch {
  set_val(14, 100);
  wait(30);
  set_val(14, 0);
  wait(30);
}
 
combo AimAbuse {
  set_val(7, 100);
  wait(AIM_HOLD);
  set_val(7, 0.0);
  wait(AIM_RELEASE);
}
 
combo AimAssist {
  set_val(22, AA_VALUE);
  set_val(21, AA_VALUE);
  set_val(21, -AA_VALUE);
  wait(AA_DELAY);
  set_val(22, -AA_VALUE);
  set_val(21, -AA_VALUE);
  set_val(21, AA_VALUE);
  wait(AA_DELAY);
}
 
void AntiRecoil (uint8 axis, fix32 recoil){
  if (sqrt(sq(get_actual(21)) + sq(get_actual(22))) < abs(recoil)) {
    set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_actual(axis));
  }
}
 
void Toggle(int id) {
  do{
    switch(id){
      case 1: {
        rapidfire = !rapidfire;
        if (rapidfire){ led(0, 255, 0); return; }
        else continue;
      }
      case 2: {
        strafe = !strafe;
        if (strafe){ led(0, 0, 255); return; }
        else continue;
      }
      case 3: {
        cspam = !cspam;
        if (cspam){ led(0, 255, 255); return; }
        else continue;
      }
      case 4: {
        aspam = !aspam;
        if (aspam){ led(255, 255, 0); return; }             
        else continue;
      }
    }
  }
  while(0);
  led(255, 0, 0);
}
 
void led(int8 r, int8 g, int8 b) {
    led_set(LED_1, (fix32)b, 0);
    led_set(LED_2, (fix32)r, 0);
    led_set(LED_3, (fix32)g, 0);
    return;
}
 

here



Thanks man gonna have to try it tonight when I get off work. This isn't the old script is it ? Guess it doesn't matter as long as the crouch spam works when you press the fire button. I wanted to try the aim assist with ur Modification what u did last time but instead of going left to right really fast what about up and down ? Or in a small circle movement really fast? And only activevate when pressing fire button instead of ads like it is now
User avatar
Shthappensbro
Captain
Captain
 
Posts: 738
Joined: Wed Aug 16, 2017 4:55 pm

PreviousNext

Return to GPC2 Script Programming

Who is online

Users browsing this forum: FunkyNeurons, Google [Bot] and 13 guests

cron