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

ChatSetAttr for Call of Cthulhu luck increase

I used to have a macro that would increase a characters Luck by 1d10 but I appear to have deleted it and I can't remember how I managed to create it . I think I  must have based it on this script: &{template:callofcthulhu} {{name=Increase Luck}}{{title=Luck Roll}} !setattr --silent --charid @{selected|character_id} --luck|{{roll=[[1d10]]}}!!! I have tried different ways to make it work but I think I've lost a few SAN points trying to figure it out. Is there a way I can get this to automatically increase the Luck attribute? 
1708640105

Edited 1708640189
vÍnce
Pro
Sheet Author
Steven W said: I used to have a macro that would increase a characters Luck by 1d10 but I appear to have deleted it and I can't remember how I managed to create it . I think I  must have based it on this script: &{template:callofcthulhu} {{name=Increase Luck}}{{title=Luck Roll}} !setattr --silent --charid @{selected|character_id} --luck|{{roll=[[1d10]]}}!!! I have tried different ways to make it work but I think I've lost a few SAN points trying to figure it out. Is there a way I can get this to automatically increase the Luck attribute?  Hi Steven, your macro appears to work for me... You might have to allow Players permission to use the macro.  (game settings | api settings | chatsetattr) Also, as written, the macro sets the Luck value.  Did you want to just add to the current Luck value? example; &{template:callofcthulhu} {{name=Increase Luck}}{{title=Luck Roll}} !setattr --silent --charid @{selected|character_id} --luck|{{roll=[[@{selected|luck} + 1d10]]}}
vÍnce said: Steven W said: I used to have a macro that would increase a characters Luck by 1d10 but I appear to have deleted it and I can't remember how I managed to create it . I think I  must have based it on this script: &{template:callofcthulhu} {{name=Increase Luck}}{{title=Luck Roll}} !setattr --silent --charid @{selected|character_id} --luck|{{roll=[[1d10]]}}!!! I have tried different ways to make it work but I think I've lost a few SAN points trying to figure it out. Is there a way I can get this to automatically increase the Luck attribute?  Hi Steven, your macro appears to work for me... You might have to allow Players permission to use the macro.  (game settings | api settings | chatsetattr) Also, as written, the macro sets the Luck value.  Did you want to just add to the current Luck value? example; &{template:callofcthulhu} {{name=Increase Luck}}{{title=Luck Roll}} !setattr --silent --charid @{selected|character_id} --luck|{{roll=[[@{selected|luck} + 1d10]]}} Sorry I meant to say that I wanted it to add to the current luck value.   Thank you for the example, I did get it to work once I added !!! to the end of the line.   
1708645354
vÍnce
Pro
Sheet Author
Lol.  Removed it thinking it may interfere with the api.  I forgot about the `!!!` required by chatsetattr to allow embedded api commands within a roll template. Stay sane. Cheers