Cod ww2 HQ AFK

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

Cod ww2 HQ AFK

Postby Freedo64 » Fri Dec 01, 2017 3:57 am

Can someone make a script where you just walk around in a circle in the HQ while afk? I have been using the supply drop glitch to remain in the game but this will soon be patched. This will help level up your social score. I have gone from level five to level 13 and a couple of days. It would be really cool if you could automatically commend Other players, but this may be a stretch.
User avatar
Freedo64
Master Sergeant
Master Sergeant
 
Posts: 34
Joined: Tue May 24, 2016 11:24 am

Re: Cod ww2 HQ AFK

Postby J2Kbr » Fri Dec 01, 2017 12:46 pm

Give a try to the code below.
Code: Select all
fix32 angle;
 
main {
    set_val(STICK_2_X, sin(angle) * 100.0);
    set_val(STICK_2_Y, cos(angle) * 100.0);
    angle += 0.0005; if(angle >= 2.0 * PI) angle = 0.0;
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Cod ww2 HQ AFK

Postby Freedo64 » Fri Dec 01, 2017 6:30 pm

Sorry. That is not in my skill set. Thanks for the feedback anyway! I guess you could call me a senior citizen gamer and all this technology is a little beyond me. I’m sure someone will come up with one soon. Love my Titan 1& 2.
User avatar
Freedo64
Master Sergeant
Master Sergeant
 
Posts: 34
Joined: Tue May 24, 2016 11:24 am

Re: Cod ww2 HQ AFK

Postby UK_Wildcats » Fri Dec 01, 2017 7:02 pm

I took J2Kbr' code and made a Titan 2 script. You can now use the interactive configuration to set the value of the angle adjustment. J2kbr's default code was too big of a circle. I also added in the ability to use a jump and emote in order to make it look more random.

Code: Select all
#pragma METAINFO("AFK - circle", 1, 0, "UK_Wildcats_Fans")
 
/*
<cfgdesc>
shortdesc    = <font size="14"><font color="blue"><b>AFK Script</b></font></font><br><br>
control        = info
 
[CIRCLE ANGLE]
shortdesc    = Set the angle adjustment to make a bigger or smaller circle
byteoffset    = 10
bitsize        = 32
control        = spinboxf
default        = 00002000
minimum        = 00000000
maximum        = 80000000
</cfgdesc>
*/

 
#define UP              BUTTON_10
#define DOWN            BUTTON_11
#define LEFT            BUTTON_12
#define RIGHT           BUTTON_13
 
#define JUMP            BUTTON_16
 
fix32 angle, angle_adjust;
bool Enabled;
int Counter;
 
init {
    pmem_load();   
    pmem_read(10, &angle_adjust);
    Enabled = TRUE;
    Counter = 1;
}
 
main {
    if(Enabled) {combo_run(AFK);}
    if(!Enabled){combo_run(DPAD);}
}
 
 
combo AFK {
    set_val(STICK_2_X, sin(angle) * 100.0);
    set_val(STICK_2_Y, cos(angle) * 100.0);
    angle += angle_adjust; if(angle >= 2.0 * PI) angle = 0.0;
    wait(5000);
    set_val(STICK_2_X, 0);
    set_val(STICK_2_Y, 0);
    wait(500);
    Enabled = FALSE;
}
 
combo DPAD {
    set_val(JUMP,100);
    wait(20);
    wait(1000);
    if(Counter == 1) {set_val(UP,100);}
    if(Counter == 2) {set_val(DOWN,100);}
    if(Counter == 3) {set_val(LEFT,100);}
    if(Counter == 4) {set_val(RIGHT,100);}
    wait(200);
    set_val(UP,0);
    wait(8000);
    Enabled = TRUE;
    Counter = Counter + 1;
    if(Counter > 4) {Counter = 1;}
}


@J2Kbr - Please notice the "Enabled" variable. If I just put the combos to run in sequence without the IF(Enabled), the DPAD combo would not run correctly. The AFK combo seemed to overlap and cancel the other one.
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Cod ww2 HQ AFK

Postby Freedo64 » Fri Dec 01, 2017 7:26 pm

I am not finding it in the gpc scripts.how do I get it?
User avatar
Freedo64
Master Sergeant
Master Sergeant
 
Posts: 34
Joined: Tue May 24, 2016 11:24 am

Re: Cod ww2 HQ AFK

Postby UK_Wildcats » Sun Dec 03, 2017 3:25 pm

Freedo64: Per the private message, I published the script for you.
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Cod ww2 HQ AFK

Postby Freedo64 » Sun Dec 03, 2017 3:53 pm

thanks! you are awesome
User avatar
Freedo64
Master Sergeant
Master Sergeant
 
Posts: 34
Joined: Tue May 24, 2016 11:24 am

Re: Cod ww2 HQ AFK

Postby bmpt guard » Fri Apr 13, 2018 9:35 am

UK_Wildcats_Fans wrote:I took J2Kbr' code and made a Titan 2 script. You can now use the interactive configuration to set the value of the angle adjustment. J2kbr's default code was too big of a circle. I also added in the ability to use a jump and emote in order to make it look more random.

Code: Select all
#pragma METAINFO("AFK - circle", 1, 0, "UK_Wildcats_Fans")
 
/*
<cfgdesc>
shortdesc    = <font size="14"><font color="blue"><b>AFK Script</b></font></font><br><br>
control        = info
 
[CIRCLE ANGLE]
shortdesc    = Set the angle adjustment to make a bigger or smaller circle
byteoffset    = 10
bitsize        = 32
control        = spinboxf
default        = 00002000
minimum        = 00000000
maximum        = 80000000
</cfgdesc>
*/

 
#define UP              BUTTON_10
#define DOWN            BUTTON_11
#define LEFT            BUTTON_12
#define RIGHT           BUTTON_13
 
#define JUMP            BUTTON_16
 
fix32 angle, angle_adjust;
bool Enabled;
int Counter;
 
init {
    pmem_load();   
    pmem_read(10, &angle_adjust);
    Enabled = TRUE;
    Counter = 1;
}
 
main {
    if(Enabled) {combo_run(AFK);}
    if(!Enabled){combo_run(DPAD);}
}
 
 
combo AFK {
    set_val(STICK_2_X, sin(angle) * 100.0);
    set_val(STICK_2_Y, cos(angle) * 100.0);
    angle += angle_adjust; if(angle >= 2.0 * PI) angle = 0.0;
    wait(5000);
    set_val(STICK_2_X, 0);
    set_val(STICK_2_Y, 0);
    wait(500);
    Enabled = FALSE;
}
 
combo DPAD {
    set_val(JUMP,100);
    wait(20);
    wait(1000);
    if(Counter == 1) {set_val(UP,100);}
    if(Counter == 2) {set_val(DOWN,100);}
    if(Counter == 3) {set_val(LEFT,100);}
    if(Counter == 4) {set_val(RIGHT,100);}
    wait(200);
    set_val(UP,0);
    wait(8000);
    Enabled = TRUE;
    Counter = Counter + 1;
    if(Counter > 4) {Counter = 1;}
}


@J2Kbr - Please notice the "Enabled" variable. If I just put the combos to run in sequence without the IF(Enabled), the DPAD combo would not run correctly. The AFK combo seemed to overlap and cancel the other one.



good job bro. i like to see a pubg afk bp macro script
User avatar
bmpt guard
Command Sergeant Major
Command Sergeant Major
 
Posts: 142
Joined: Thu May 12, 2016 9:33 pm

Re: Cod ww2 HQ AFK

Postby lllilgabe123 » Tue Jul 24, 2018 1:05 pm

Is there still a benefit from going afk in HQ?
User avatar
lllilgabe123
Sergeant Major
Sergeant Major
 
Posts: 68
Joined: Fri Jul 20, 2018 7:40 pm

Re: Cod ww2 HQ AFK

Postby UK_Wildcats » Tue Jul 31, 2018 5:00 pm

I use it to rank up my social score.
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 88 guests