JavaScript is required to use Bungie.net

Destiny

Diskutiere über alles, was mit Destiny zu tun hat.
Bearbeitet von My Derpy Turtle: 3/19/2016 12:37:19 AM
28

Fun little shader cycling script

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

Sprache des Beitrags:

 

Bearbeiten
Vorschau

Benimm dich. Nimm dir eine Minute, um dir unsere Verhaltensregeln durchzulesen, bevor du den Beitrag abschickst. Abbrechen Bearbeiten Einsatztrupp erstellen Posten

Gesamtes Thema ansehen
Es ist dir nicht gestattet, diesen Inhalt zu sehen.
;
preload icon
preload icon
preload icon