Advertisement Create a free account

[Script] Dealer

1565754117

Edited 1565835119
keithcurtis
Forum Champion
I have significantly updated my Inspire script to the point where I think it would cause less confusion to start a new thread. Once again, thanks to Scott C. The Aaron and GiGs for their time an patience. The new script is called "Dealer" and uses the following syntax: !deal --[give,take] [#] --[deck name] If give/take is not specified, it gives a card to the player controlling the selected token If deck name is not specified, it defaults to "Playing Cards". You can specify a number of cards to give or take. After the action word, type an integer, after a space: !deal --give 5 --Playing Cards The script will deal cards to the player from the specified deck so long as there are enough available. If the deck has cycled through all cards, it will automatically shuffle. If a token has more than one controller or is controlled by All and one or more players, it will select the first single player in the controlled by list. Script will try to let you know if you have not prepared a command or deck properly. If deck does not deal a card, you may need to manually shuffle (Roll20 bug). If the deck is shuffled, it may not recognize all cards in hand. Uses: Games which deal or take playing cards at random from a standard deck Awarding inspiration--or Bardic Inspiration from a separate deck. Awarding a random potion/scroll/treasure/piece of equipment from a properly prepared deck. Examples !deal --give --Inspiration This will deal a card from a deck called "Inspiration" to the player whose token is selected.  This would be ideal as a token ability or macro bar macro to allow GMs to award Inspiration to the player of a selected token. !deal --take --Inspiration This will take a card from a deck called "Inspiration" from the hand player whose token is selected. This would be ideal as a token ability to allow players to spend Inspiration !deal --give or !deal --give --Playing Cards This will deal a card from the Playing Cards deck to the player whose token is selected. !deal --take This will take a card from the Playing Cards deck from the hand player whose token is selected. The Code is here .
1565756229
GiGs
Pro
Sheet Author
Nice to see you building on this script. I'll be using this in one of my upcoming games for fate point tokens. Might be handy to look into giving more than one card at the same time. 
1565756501
keithcurtis
Forum Champion
Good idea.
1565835245
keithcurtis
Forum Champion
I have added the capability to specify the number of cards to handle. After "--give" or "--take", type a space followed by an integer: !deal --give 5 --Playing Cards The script will deal cards to the player from the specified deck so long as there are enough available. If the deck has cycled through all cards, it will automatically shuffle. The top post is updated, and the code is now linked, rather than posted in-line.
1565840990
Wes
Pro
Sheet Author
I haven't checked it out yet but it sounds very convenient. Can anyone in a game use the commands or do they check for gm only?
1565841141
keithcurtis
Forum Champion
Anyone. It was designed that way back when I started it as an inspiration script, so that players could discard their inspiration.