Viewers Based Command Counting

Hi, I’m currently trying to create a command for a fellow streamer.

The goal of the command is to “!bless” an indicated viewer (using the @ in chat). This is what I have so far.

$(display_name) blesses $twitch(display_name,$arg(1)) with the power of Delareg! +$cmd_count(XXXXX) speed

XXXXX being command ID

^This^ however only counts the TOTAL amount of times !bless is used, however I was wondering whether it is possible to distinguish this count on whoever “$twitch(display_name,$arg(1))” is.

My thought was maybe using some kind of custom data but using the username as the definition, creating a seperate custom data for each user automatically.

$custom_data(get, $twitch(display_name,$arg(1))) to define the data as their username
$custom_data(+,$twitch(display_name,$arg(1))) to add +1

^This^ does not work

Is something like this possible without creating 100 different $custom_data sets for each viewer?


1 Like

You can try this :

$custom_data(+,bless_$twitch(id,$arg(1,0,1))) $(display_name) blesses $twitch(display_name,$arg(1)) with the power of Delareg! +$custom_data(get,bless_$twitch(id,$arg(1,0,1)),0) speed

Always add the “+” in front of the “get” recovery so that the incrementation is done before recovering the data.

The ID is preferable for the key of the data, and setting ‘0,1’ on the “Twitch” TAG allows to block the display of the text if ever the person does not add a nickname after the command :slight_smile:

1 Like

THANK YOU!! This works great! Now just to figure out how to clear the data at some point :3

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.