So I was bored in the tower today and I'd seen something about an app that lets you switch shaders using the Destiny API. I decided I'd write a little script to achieve the same affect. I do front end web development and I regularly use the Chrome extension Destiny Item Manager to move gear around so I figured I'd just write a little JavaScript to simulate clicks there instead of going through the hassle of figuring out the API. So this is the script I came up with.
Edit: This will only work when you are not in an activity.
Edit: [b]The Settings menu is the Google Chrome settings menu. NOT the DIM settings menu. The Chrome settings menu is the little hamburger menu in the upper right corner of your browser. Alternatively you can just hit the F12 key as a shortcut to open Developer Tools.[/b]
[spoiler]
// Switch to randomn shader
function switchShader(){
var mainDelay = 7000;
var clickDelay = 200; //Have to wait a short time for the clickable div to appear.
var shaders = jQuery(".sort-armor").first().find(".unequipped").find(".item");
var numShaders = shaders.length;
var randomShaderIndex = Math.floor(Math.random() * numShaders);
var randomShader = shaders[randomShaderIndex];
jQuery(randomShader).find(".img").click();
//jQuery(".sort-armor").first().find(".unequipped").find(".item").first().find(".img").click();
window.setTimeout(function(){
jQuery(".ngdialog-content").find(".move-button").first().click();
window.setTimeout(switchShader, mainDelay);
}, clickDelay);
}
switchShader();
[/spoiler]
1) To use it you must have the Destiny Item Manager extension for Google Chrome installed.
2) Once you've got that ready, open up the extension and move whatever shaders you want to the character you are currently playing on.
3) Then click "Developer Tools" found under Settings (the hamburger menu thing) -> More Tools -> Developer Tools.
4) Locate the "Console" tab.
5) Copy and paste the script into the console area and hit enter.
The script should start running.
Some notes/caveats:
1) This is a dumb hack that I came up with in like 1hr cuz I'm lazy and don't want to actually figure out how to use the API properly.
2) To stop the script just refresh the page or close your browser window
3) The default swap time is 7 seconds. (the suXBox 360 can't reliably load shaders faster than that) If you want to make the swap time faster or slower than you just need to modify the value assigned to the variable "mainDelay". 1 second = 1000 so do what you want.
4) It will pick a random shader out of your unequipped shaders.
5) If you change tabs/loose focus on the Chrome application then the script will start running slowly or stop completely.
That is all.
English
#Destiny
-
1 AntwortenBump for later
-
4 AntwortenWarning! This script will delete your sole 320 ghost and/or class item!
-
1 AntwortenBump for later?
-
2 AntwortenWhat if I make the swap time .25s? Will it be a rainbow?
-
-
1 Antworten
-
5 AntwortenYou can do this with the companion app and a jail broken iPhone.
-
3 Antworten[quote] 3) Then click "Developer Tools" found under Settings (the hamburger menu thing) -> More Tools -> Developer Tools. [/quote] I can't find "more tools" in settings. I have the DIM extension and I swear I spent 15 minutes trying to find it. Any help? I want to be a rainbro so badly.
-
Cool. It would of be fun back when Destiny was still fun
-
[quote]Then click "Developer Tools" found under Settings (the hamburger menu thing)[/quote] This.
-
12 AntwortenI did this and it deleted all my gear.
-
Pretty cool. Thanks for this.
-
6 AntwortenLove me some simple Java code
-
3 AntwortenI cannot find the dev tools for the life of me. I am using V. 3.4 but I can only find the basic tools made for filtering. Halp.
-
1 Antworten
-
3 AntwortenThanks for deleting all my gear!
-
Bump for later
-
Cool have to try this sometime
-
2 AntwortenSounds pretty cool, but I wish it'd be able to cycle through shaders in kiosk. =( It's pretty annoying only being able to go through 7 at a time.
-
8 AntwortenCan I get a reply to this for later, please?
-
Huh. Cool.
-
Neat idea. I'll give it a go April 12th ;) [spoiler]JK, I can't get away from this game. Ill try it tonight.[/spoiler]
-
-
4 AntwortenNo idea if you have done this but try posting on reddit
-
-
2 Antworten