How to create my own gamepack via Visual Scripting

GPC script programming for Titan One device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher, Baby Cham, Elvish

How to create my own gamepack via Visual Scripting

Postby macnmore » Thu Jan 10, 2019 3:14 am

I need to make a basic script to keep my controller on and my game session active for coin farming in PvZ GW2. I'd like it to move Left, then Right, then jump, then repeat. How can I do this in Visual Scripting?
User avatar
macnmore
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Mon Feb 01, 2016 10:14 pm

Re: How to create my own gamepack via Visual Scripting

Postby J2Kbr » Thu Jan 10, 2019 10:13 am

If you can have the Titan One plugged to the PC at the same time with the console, the best option for this is use the GameREC plugin. With it you can record the controller inputs once and then play back in a endless loop. this will not require from you any script coding.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 17267
Joined: Tue Mar 18, 2014 1:39 pm

Re: How to create my own gamepack via Visual Scripting

Postby macnmore » Fri Jan 11, 2019 9:00 pm

I have GTuner on my laptop, so I should be able to have it plugged in to the laptop at the same time as the XBox. I'll dig around on GameREC to see what I can find. Thanks
User avatar
macnmore
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Mon Feb 01, 2016 10:14 pm

Re: How to create my own gamepack via Visual Scripting

Postby macnmore » Sat Jan 12, 2019 5:30 am

I can't get any plugins loaded in GTuner...it locks up the program and I have to end task. Is there a bug or another way to load them?
Also, how/where can I find the commands for scripting? I found a basic script and was playing with it but couldn't get it to work. I want to make a script that moves my character right (left stick moved right to so strafe), then press A button twice, then strafe left, then A button twice, then repeat.
User avatar
macnmore
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Mon Feb 01, 2016 10:14 pm

Re: How to create my own gamepack via Visual Scripting

Postby J2Kbr » Mon Jan 14, 2019 11:54 am

macnmore wrote:I can't get any plugins loaded in GTuner...it locks up the program and I have to end task. Is there a bug or another way to load them?

Please try run Gtuner Pro as administrator to install the plugins.

macnmore wrote:Also, how/where can I find the commands for scripting?

In the link below you can find the scripting language reference, with examples:

https://www.consoletuner.com/kbase/gpc_ ... erence.htm
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 17267
Joined: Tue Mar 18, 2014 1:39 pm

Re: How to create my own gamepack via Visual Scripting

Postby norge1 » Tue Jan 15, 2019 7:21 am

macnmore wrote:I need to make a basic script to keep my controller on and my game session active for coin farming in PvZ GW2. I'd like it to move Left, then Right, then jump, then repeat. How can I do this in Visual Scripting?


its not visual studio but i didnt see why it had to be made in visual studio. by the way gtuner is visual studio's clone sort of speak.
raw code copy and paste if you know how or download the script.
remember
right dpad is on
down dpad is off


Code: Select all
#pragma METAINFO("pvz gw2 afk requested macnmore", 1, 0, "norge1")
#include <titanone.gph>
 
/*
Basically you need to mash A for 1.5 seconds or so, then hit LT and RT simultaneously.
Then repeat forever. I believe 14 A presses in that 1.5 seconds would be sufficient.
 
 
Mash A for 1.5 seconds, LT + RT .1 seconds after > repeat
*/

 
 
// VARIABLES
// ---------------------------------------------------------
int toggle;
int onoff;
/////////////////////////////
// combo wait times
int press = 50;
int rest  = 57;
 
 
main {
    if (get_val(XB1_RIGHT)) toggle =  TRUE; // Turn it on when you press DPAD LEFT
    if (get_val(XB1_DOWN)) toggle = FALSE; // turn it off when you press DPAD LEFT
    if (toggle) {
    }else combo_stop(PressR2andL2);
    if (toggle) {
    }else combo_stop (reset);
    if(toggle){
        combo_run(PressR2andL2);
    }
 
    if(toggle){
        combo_run(PressR2andL2);
    }
}
 
combo PressR2andL2 { // 1 second
    set_val(XB1_LEFT, 100);
    wait(70); wait(100);
 
    set_val(XB1_RIGHT, 100);
    wait(70); wait(100);
 
     set_val(XB1_LEFT, 100);
    wait(70); wait(100);
 
    set_val(XB1_RIGHT, 100);
    wait(70); wait(100);
 
     set_val(XB1_LEFT, 100);
    wait(70); wait(100);
 
    set_val(XB1_RIGHT, 100);
    wait(70); wait(100);
}
 
combo reset { //need to wait 2 sec here before the next button press executes
    set_val(XB1_A, 100);
    wait(1125);
    wait(1125);
    }
 
Attachments
pvz gw2 afk requested macnmore.gpc
your welcome i hope it works for you
(1.39 KiB) Downloaded 72 times
User avatar
norge1
Command Sergeant Major
Command Sergeant Major
 
Posts: 136
Joined: Thu May 12, 2016 9:33 pm



Return to GPC Script Programming (Titan One)

Who is online

Users browsing this forum: No registered users and 7 guests