Created
January 15, 2015 21:45
-
-
Save zeroeth/b9ed32b068a373fc6718 to your computer and use it in GitHub Desktop.
Aris minigame score keeper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script> | |
| var ARIS = {}; | |
| </script> | |
| </head> | |
| <body> | |
| <div> | |
| <button id="giveWinToken">You Win X!</button> | |
| </div> | |
| <script> | |
| (function() { | |
| var total_wins_item_id = 17; | |
| var game_win_token_item_id = 16; | |
| var starting_token_count = 0; | |
| document.getElementById("giveWinToken").onclick = function() | |
| { | |
| if(starting_token_count <= 0) | |
| { | |
| ARIS.setItemCount (game_win_token_item_id, 1); | |
| ARIS.giveItemCount(total_wins_item_id, 1); | |
| } | |
| } | |
| ARIS.didUpdateItemQty = function(item_id, quantity) | |
| { | |
| starting_token_count = quantity; | |
| } | |
| ARIS.ready = function() | |
| { | |
| ARIS.getItemCount(game_win_token_item_id); | |
| } | |
| })(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment