Page 1 of 1

Warehouse Tweaks

Posted: Tue Jan 02, 2018 6:32 pm
by Vusys
Image

The in-game commands for the warehouse are very verbose and the web interface is a little lacking. I whipped this little tweak up on the weekend and thought I'd share given how useful it's been to me so far. It takes over a URL that isn't used and creates its own rendering of what's in your warehouse. It's not very polished but gets the job done.

N.b. Some images may be broken. A number of them have differing file names (e.g. Redstone Dust vs Redstone, and Terracotta vs Stained Clay). I've fixed most of them but there may be some items that also have this issue that I don't know about.

Instructions
  1. Install Tampermonkey (Only tested in Firefox and Chrome. Other userscript addons like Greasemonkey are probably fine too)
  2. Open this gist
  3. Click Raw at the top right
  4. Click Install
  5. Navigate to https://warehouse.renmx.com/v2. You have to be logged in and authenticated for this to work otherwise you'll get a white page.

Edit: This is in the wrong forum ._. Can someone please move into minecraft general? Thanks.

Re: Warehouse Tweaks

Posted: Wed Jan 03, 2018 5:03 am
by Pri
Great tweak Vusys, very cool. By the way I don't know if you're aware of this but there is a JSON API for Auctions, Shop and Warehouse. http://warehouse.renmx.com/json.php

I dunno if you want to do something with that or not :)

Re: Warehouse Tweaks

Posted: Wed Jan 03, 2018 10:36 am
by freakboy31
Cool

Re: Warehouse Tweaks

Posted: Wed Jan 03, 2018 6:04 pm
by Vusys
Pri wrote:
Wed Jan 03, 2018 5:03 am
Great tweak Vusys, very cool. By the way I don't know if you're aware of this but there is a JSON API for Auctions, Shop and Warehouse. http://warehouse.renmx.com/json.php

I dunno if you want to do something with that or not :)
Yes, that's what I'm using. Was originally parsing the DOM but that's ugly and gross. It's also the reason why I have to rewrite some of the image URLs - the API's names differ in places from the image URLs, there's no 301, fallback for old names, and the API does not provide the image URL :(

Edit:

On a bit of a tangent, the shop API is currently not working for me. It takes 13s to return a HTTP 500.

Re: Warehouse Tweaks

Posted: Thu Jan 04, 2018 3:54 am
by Pri
Yeah there's some bug with it, I'll look into it. Also I will modify the warehouse API to give image urls :)

EDIT1: Warehouse image url change done.

EDIT2: Shop API is working now: http://shop.renmx.com/json.php

Re: Warehouse Tweaks

Posted: Thu Jan 04, 2018 9:19 am
by Pri
Vusys, I've been thinking a lot about the Warehouse interface. The fact is, I just don't have the time needed to make any kind of decent interface for the Warehouse, I'm not great at Javascript either. But I thought I could help you with your script so I created a new page here: http://warehouse.renmx.com/submit.php?c ... uantity=12

Which will allow you to have buttons on your scripted page to directly retrieve things from warehouse to main inventory in-game. I was thinking you could add like a quick retrieve button for common quantities and perhaps a slider for custom quantity selection. You can get the csrf token from the json.php (it now appears at the top) this token is unique for each account so you can retrieve that during page load and then include it with all button submissions.

If there is a way for me to just host the code on the server itself so people don't need to install tamper monkey and the script that way I'm happy to do that and to credit you for the pages creation :)

Re: Warehouse Tweaks

Posted: Thu Jan 04, 2018 7:16 pm
by Vusys
I've made an update that fixes the script breaking because of API changes and also introduces buttons to get items.

Re: Warehouse Tweaks

Posted: Thu Jan 04, 2018 7:28 pm
by Vusys
Pri wrote:
Thu Jan 04, 2018 9:19 am
Vusys, I've been thinking a lot about the Warehouse interface. The fact is, I just don't have the time needed to make any kind of decent interface for the Warehouse, I'm not great at Javascript either. But I thought I could help you with your script so I created a new page here: http://warehouse.renmx.com/submit.php?c ... uantity=12

Which will allow you to have buttons on your scripted page to directly retrieve things from warehouse to main inventory in-game. I was thinking you could add like a quick retrieve button for common quantities and perhaps a slider for custom quantity selection. You can get the csrf token from the json.php (it now appears at the top) this token is unique for each account so you can retrieve that during page load and then include it with all button submissions.

If there is a way for me to just host the code on the server itself so people don't need to install tamper monkey and the script that way I'm happy to do that and to credit you for the pages creation :)
Thanks for the extra API stuff. I’m now using the images and I’ve added some buttons for grabbing items.

Been mulling it over today, and I think it’s probably best to stick as a third party userscript. I could make some changes to make it work naively by switching to the main site’s version of jQuery and Bootstrap, but it’s not a good solution. It would be a weird mix of being both first party and third party and would really end up being the worst of both worlds. I’d rather help out by contributing directly to the site or just stick to my own unofficial addons. I can appreciate why you wouldn't want the former and it's not like I could commit to delivering anything massive.

I didn’t mean to disparage or cast a shadow on your work. I am just naturally inclined to tinker with things. :)

Re: Warehouse Tweaks

Posted: Fri Jan 05, 2018 1:28 am
by Pri
Okey dokey :)