An auto-trainer??!! (SGChooChoo)

Read (Or scroll) all the way to the bottom for a MiniTrain ;P

Make da whoooole train automagically :D


I really wanted to make a train, but couldn't find a good script to do it I never do anything manually, so I decided to write one. This script lets you automagically set up most of the GA.

Usage:

  1. Download and install the script
  2. Open the new Giveaway page
  3. Enter the game and the key/gift
  4. Click the new button on the bottom that says CHOOO CHOOOOOOO
  5. Fill out all the information if you haven't already. This information will stay until you close the tab
  6. This should automagically take you to the confirm page. CHECK THAT ALL THE INFO IS CORRECT BEFORE CONFIRMING!!! MY SCRIPT IS STILL BETA!
  7. On the giveaway page there should be a button labeled "Anotha One" (Sorry, had to!). Click that to add a cart!
  8. Profit!

Notes:

  • Carts are in reverse order (1st cart is last, ect...)
  • In case I haven't said this enough, CHECK THAT ALL THE INFO IS CORRECT BEFORE CONFIRMING! I CANNOT BE HELD ACCOUNTABLE FOR ANY MISTAKES!!!
  • If you find a bug or have a feature to request, please let me know :D

Download HERE

(Script which I used some functions from HERE)


Planned Updates:
Automagically add next/previous links Done!
Take over the world!!! JK
Add config
Add GUI for config
Replace fugly popups with jQuery UI
Add more customization options

Ticket for the train! ALL ABOARD ;P (0+, 48 hours)


View attached image.
View attached image.
View attached image.
View attached image.
View attached image.
8 years ago*

Comment has been collapsed.

Deleted

This comment was deleted 1 year ago.

8 years ago
Permalink

Comment has been collapsed.

Bump!

8 years ago
Permalink

Comment has been collapsed.

Booomp!

8 years ago
Permalink

Comment has been collapsed.

Here is a BOOMP for you.;)

8 years ago
Permalink

Comment has been collapsed.

boomp

8 years ago
Permalink

Comment has been collapsed.

ok. you can haz boomp.

boomp.

8 years ago
Permalink

Comment has been collapsed.

Used the script to make this train, and it worked great. Thanks for putting this together!

8 years ago
Permalink

Comment has been collapsed.

hahaha I love the language! very nice script!

8 years ago
Permalink

Comment has been collapsed.

Nice idea for a script. It deserves a bump.

8 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 1 year ago.

8 years ago
Permalink

Comment has been collapsed.

Thanks for the nifty script. Instead of "Anotha One," I renamed that button as "MOAR" I also edited the description to read

Reverse Auto-Trainer??!!

Make da whoooole train in reverse order, automagically :D

8 years ago*
Permalink

Comment has been collapsed.

I don't know why this is still not implemented in the normal site .....
Can I use it for group giveaways too and if yes what I need to change?

8 years ago
Permalink

Comment has been collapsed.

You mean instead of invite only to be whitelist/group only?

Yes, you should be able to. I will look into adding that xP

For now, follow these instructions:

Change this line

$("div[data-checkbox-value='invite_only']").trigger("click");

to this

$("div[data-checkbox-value='groups']").trigger("click");

Then get the group ID by mousing over the checkbox next to the group name, Right Click, Inspect Element (On chrome at least). You should see something that looks like this

<div data-group-id="485124627" class="formgroup formgroup--steam">

Copy that group ID then add this line after the one you changed before

$("div[data-group-id='(The group ID you copied)']").trigger("click");

Then use the script as you would usually xP

Sorry for the late response :(

8 years ago
Permalink

Comment has been collapsed.

Thanks =)

8 years ago
Permalink

Comment has been collapsed.

i was wondering if it would be possible to add a option to disable the runtime hours question and instead go off the selected end time upon creating the train for each individual giveaway?
maybe something like "timeOpen:false" in the config to have it go off selected time instead.

or if it's easier to just pull a few lines of code which ones do i remove?

8 years ago
Permalink

Comment has been collapsed.

That's actually a good idea, and I will work in adding that!

In the meantime, you can do it yourself!

Necessary edits:
Replace

var timeOpen = parseInt(sessionStorage.getItem("timeOpen"));

With

var timeOpen = sessionStorage.getItem("timeOpen");

Replace

timeOpen = parseInt(prompt("It appears you haven't set up a train yet!\nHow long (In hours) would you like the giveaways to be open for?")*3600000);

With

timeOpen = $("input[name='end_time']").val();

Replace

$("input[name='end_time']").val(formatTime(Date.now()+timeOpen));

With

$("input[name='end_time']").val(timeOpen);

Once you've finished all of those, the end time on all GA's should be set to the one you used for the first one!

Sorry for the late reply, didn't check my acct this morning.

8 years ago
Permalink

Comment has been collapsed.

thank you! =)
will test the edits when i get a chance ^^

edit/update: worked perfectly! =) thanks again

8 years ago*
Permalink

Comment has been collapsed.

Hello joonatoona,
I have a suggestion. Place the button CHOOO CHOOOOOOO somewhere to the top part of the page.

It is quite annoying when I always have to scroll the pages to the bottom when I want to confirm the process even if all the fields are at the top.

7 years ago
Permalink

Comment has been collapsed.

buttonTop:false, // MOVE THE TRAIN BUTTON TO THE TOP [Default: false]

Look at the code, there's a config at the top ;P

7 years ago
Permalink

Comment has been collapsed.

But I don't want to use a config directly in the code because an update would rewrite it. I think the button at the bottom cannot be better for anyone, can be? What is the point of it there? Or maybe the button would be even better below the cd-key field.

7 years ago
Permalink

Comment has been collapsed.

(I haven't updated it in months now)
The bottom is the default because... Reasons? Idk, but if I do update I will make sure that settings are persistent.

7 years ago
Permalink

Comment has been collapsed.

Hello,
I suggest to copy or move the button Anotha One to the screen where I have to confirm the GA. The button would confirm it and open new GA creation page. There would be 1 step less and it would be cool.

View attached image.
7 years ago*
Permalink

Comment has been collapsed.

I have yet to figure out an elegant way to confirm the GA automatically. I will look into it.

7 years ago
Permalink

Comment has been collapsed.

I've noticed that trains made with your script use html accesskeys so that you can go to the next 'cart' using ALT+.

How is this done? I've looked at the script and I can't see anything adding that.

I'd love to be able to add this to the train I am working on.

A random example of accesskey code below:

<a href="https://www.steamgifts.com/giveaway/xxxxx/" accesskey=".">NEXT</a>
<a href="https://www.steamgifts.com/giveaway/xxxxx/" accesskey=">" target="_blank"></a>

Thanks!

7 years ago
Permalink

Comment has been collapsed.

Ummm... I'm not entirely sure. I think it has something to do with how this website parses markup? The script just generates a link in this format:

[Next](URL)

7 years ago
Permalink

Comment has been collapsed.

That's weird.

Thanks though!

7 years ago
Permalink

Comment has been collapsed.

Edit: just saw that I never explained here that the effect was cause by a userscript I have installed: Add Prev/Next Accesskeys.

7 years ago*
Permalink

Comment has been collapsed.

I should have known of this in December... DOH!! xD

7 years ago
Permalink

Comment has been collapsed.

and what am i supposed to do with the underpants?

7 years ago
Permalink

Comment has been collapsed.

Hi,
the script generates not working link in the first made GA (the last GA of the train). Could you put there there just plain text "End of the train." or something like that?

7 years ago
Permalink

Comment has been collapsed.

have a ump, cause i just decided to use this :)
and i love this:

Make da whoooole train automagically

7 years ago
Permalink

Comment has been collapsed.

Thanks BUMP

7 years ago
Permalink

Comment has been collapsed.

bump because

7 years ago
Permalink

Comment has been collapsed.

When I click on CHOOCHOO it takes me back to the start and I keep having to change my date and stuff

what am I doing wrong?

7 years ago
Permalink

Comment has been collapsed.

I would guess it is due to changes on SG, as this script hasn't been updated in a while. I would check out ESGST

7 years ago
Permalink

Comment has been collapsed.

Boompety Boo

7 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.