0 votes
by (2.7k points)
edited by

I want a macro that creates an inventory. It will work like this:

<<inventory [width] [height] [variable]>>

Items will be draggable within the inventory and the [height] is it's height, [width] is it's width, and [variable] is the variable it modifies. It should not be reset with the reloading of a page, and items should be draggable between multiple inventories. The items in the inventory should be stored as a list. In other words, I want an inventory similar to the one in the sidebar of Adventures, but with an unlimited number of inventories availible at any one time. Navigating away from the page will save the current items in the inventory to the variable [variable].

And I want a macro that creates an item, like this:

<<item [name] [tag] [image url]>>

Items can be placed in inventories and dragged between multiple ones. The [image] will automatically be resized to fit within the inventories. What JavaScript do I need for this?

Edit: this might help, as it uses drag-and drop: Using drag and drop to set variables

2 Answers

0 votes
by (2.9k points)
I found this on the old forum, it's for linking keys and links. It's not exactly what you asked for but its a key component for making an RPG game.


Its also looks like you want an array of your inventory. I'm not very good with that so I'm going to leave that for someone else.


This may help if you want to make an RPG game, it's really easy to use and its free, you may want to use Aseprite for making sprites but that's 16$.


+3 votes
by (62.7k points)
This isn't a question. This is a request for for someone to literally build a system for you. If you want that, hire a programmer.