Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] Welcome to "Trader Joe's!" I carry just about everything! And I always have 50' of rope. Who doesn't need that?

1386477559

Edited 1386640633
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Much better way to approach the interface: A hand out is used with inline CSS You can move up and down to select a row (menu wraps around if you try to go below the last row.) On each row you can cycle the item listed (it also wraps around.) Notice "To" changed from "Player1" to "Player2" Much less code to navigate. This gives a pretty good user interface... still working but this should work much better and be less complex. <a href="https://gist.github.com/BaldarSilveraxe/7884617" rel="nofollow">https://gist.github.com/BaldarSilveraxe/7884617</a>
1386521712
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I have a much better approach to this now... You can use inline CSS on a hand out... and it refreshes automatically on changes to the note. Which means you can highlight rows and change values on the fly. This with small macro buttons at the bottom will be much better. From left to right Up - Highlight next row up Dn - Highlight next row up Plus - Add Item Minus - Remove Item Right - Cycle field (change trade "From" or "To." Return - Executive the transaction Also you can use the macro "modifier" as a validate before submit function.
stupid question, but.... what exactly is this for? i know its to create items? but why
1386527750
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Inventory system to keep current all items in the game and auto associated with the a character.... as well as track currency and weight of items carried.... or hit and damage for a weapon.
This is really cool, I hope roll20 implements an inventory that works like this one day.
1386598695
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Updated the lead post with a much better user interface. This could be use for anything. i.e. Hand out with selectable rows for all your API commands (reduce your macro bar to "navigation" macros.)
The navigation macros thing is...interesting :-). I never would have thought of that, myself. It does use quite a bit of server resources (since you're "re-sending" the entire HTML content of the window pane to every player every time someone presses one of the arrow buttons), but I suppose it's not too bad? Haha.
1386609516
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
<a href="http://www.youtube.com/watch?v=CXjgo6iHgnY&feature=youtu.be" rel="nofollow">http://www.youtube.com/watch?v=CXjgo6iHgnY&feature=youtu.be</a> Sample of it WORKING!!!!!!
1386641183

Edited 1386641806
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Updated the script... need to clean up how I am handling the data (storing and manipulating.) But its currently creating items and by volume selected and placing them in one state array with owner's name. As you can see the parting has been investing heavily in "transportation" items (for no real reason.) Each item has its own "key" so it can be traded, destroyed, sold, or updated (i.e. a "Sword Long" could later be found to be a "Sword Long +1") {description:"Lance Heavy Horse", cost:"15", costunit:"gp", costgp:"15", weight:"15", size:"L", type:"P", speedfactor:"8", damagesm:"1d8+1", damagel:"3d6", note:"This weapon inflicts double damage when used from the back of a charging mount.", family:"weapon", combat:"Melee", rof:"", s:"", m:"", l:"", ac:"", armortype:""}, And.... when an item is created all information about that weapon is captured. Riley D. said: The navigation macros thing is...interesting :-). I never would have thought of that, myself. It does use quite a bit of server resources (since you're "re-sending" the entire HTML content of the window pane to every player every time someone presses one of the arrow buttons), but I suppose it's not too bad? Haha. Yea... sorry about that.... I am sure a better UI for API is on the way (or the new record sheets will be flexible enough to be leveraged.) Ability to make hyperlink API commands with "/direct" would be really nice... especially if you could "/wdirect" we could do a lot with just that!