3 ms·
I ran this line localStorage.data = JSON.stringify((function (data) { data.player.weapon = 'goldensword'; return data })(JSON.parse(localStorage.data))) and
by eridius 15y ago
I ran this line
localStorage.data = JSON.stringify((function (data) { data.player.weapon = 'goldensword'; return data })(JSON.parse(localStorage.data)))
and then reloaded the page, and I had the golden sword.
- PhearTheCeal 15y agoAh, I see. I didn't reload the page. I wonder if there is any way to do this without reloading the page... It be fun to show off if someone figured it out.
- ynniv 15y agoThe client server protocol only lets you specify arbitrary equipment when you connect. To change equipment during the game, you have to Types.Messages.LOOT a dropped item.
- PhearTheCeal 15y agoSorry, I don't understand. Types.Messages.LOOT can be used how exactly?
- ynniv 15y agoLOOT is an action in the client server protocol - you can't easily use it. The important part is that you can only equip an item that is available to be picked up, unlike when you first connect. You can specify any weapon and armor when you first connect, which is why editing the local storage works.