From cbcf4acb603e96be6a3f1c576ba3422119b14d22 Mon Sep 17 00:00:00 2001 From: Can eh dian <62065288+Canehdian@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:02:17 -0500 Subject: [PATCH 1/4] Add files via upload --- Levels/Canehdian-VoiceEXP/README.md | 15 ++++++++ Levels/Canehdian-VoiceEXP/VoiceEXP.actionpack | 37 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 Levels/Canehdian-VoiceEXP/README.md create mode 100644 Levels/Canehdian-VoiceEXP/VoiceEXP.actionpack diff --git a/Levels/Canehdian-VoiceEXP/README.md b/Levels/Canehdian-VoiceEXP/README.md new file mode 100644 index 0000000..82a360e --- /dev/null +++ b/Levels/Canehdian-VoiceEXP/README.md @@ -0,0 +1,15 @@ +# *WARNING* +This actionpack does not play well with Join to Create voice channels or any other voice channel that disconnects the user immediately after joining. +To bypass this issue, it is recommended to ![blacklist](https://micro.sylo.digital/i/9EDJsQ) any of these voice channels from both actions. + +# Info + +This Action pack will enable Atlas to give users Experience for the time spent in a voice channel. + +# Getting Started + +BE SURE TO READ THE WARNING AT THE TOP OF THIS README + +There are 3 variables you need to change to start using these Actions. +The Voice Channel Leave action has 2 variables for the amount of Experience and duration to apply it across. (By default it adds 5 experience for every 120 seconds the user is in a voice channel) +The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. \ No newline at end of file diff --git a/Levels/Canehdian-VoiceEXP/VoiceEXP.actionpack b/Levels/Canehdian-VoiceEXP/VoiceEXP.actionpack new file mode 100644 index 0000000..546f46d --- /dev/null +++ b/Levels/Canehdian-VoiceEXP/VoiceEXP.actionpack @@ -0,0 +1,37 @@ +{ + "comment": "Exported from https://atlas.bot", + "formatVersion": 2, + "exportedAt": "2025-03-29T03:57:13.557Z", + "actions": [ + { + "trigger": { + "__typename": "GuildActionTriggerVoiceChannelLeave", + "contextChannelId": null, + "type": "VoiceChannelLeave", + "voiceChannelId": null + }, + "disabled": false, + "name": "Voice EXP", + "content": "// by default the user will gain 5 exp for every 120s that they are in the vc\r\n\r\n{=EXPPerTime;5} // this sets it so the user gains 5 exp for every 120s that they were in the vc\r\n{=IntervalForEXPGain;120} // this sets the amount of seconds that the user will gain the above exp for while they were in the vc\r\n\r\n// DO NOT TOUCH ANYTHING BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING\r\n\r\n{if;{catch;{math;{$EXPPerTime} + 1};NaN};==;NaN;{return;{responder.error;The EXPPerTime variable is not a valid number in the Voice EXP Channel Leave action}}}\r\n{if;{catch;{math;{$IntervalForEXPGain} + 1};NaN};==;NaN;{return;{responder.error;The IntervalForEXPGain variable is not a valid number in the Voice EXP Channel Leave action}}}\r\n\r\n{=data;{store.get;VoiceData_{channel.id}}}\r\n{if;{$data};==;;{return}}\r\n{=UserData;{catch;{split;{join;{filter;{$data};/{user.id}-\\d+/;matches};-};-};{return}}}\r\n{=data;{filter;{$data};/{user.id}-\\d+/;!matches}}\r\n\r\n{if;{catch;{join;{$data};};};==;;\r\n {store.delete;VoiceData_{channel.id}}\r\n ;\r\n {store.set;VoiceData_{channel.id};{$data}}\r\n}\r\n// calculates the experience that the user should gain based on the time they were in the voice chat for\r\n{=exp;{math;floor(({time} - {$UserData.1}) / {$IntervalForEXPGain} * {$EXPPerTime})}}\r\n{user.setXP add=true;{$exp}}", + "cooldownSeconds": 0, + "cooldownType": "User", + "restriction": null, + "flags": "0" + }, + { + "trigger": { + "__typename": "GuildActionTriggerVoiceChannelJoin", + "contextChannelId": null, + "type": "VoiceChannelJoin", + "voiceChannelId": null + }, + "disabled": false, + "name": "Voice EXP", + "content": "{=AFKChannel;CHANNEL_ID} // replace CHANNEL_ID with the ID of your AFK channel or leave it blank if your server doesn't have one\r\n\r\n// DON'T TOUCH ANYTHING BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING\r\n\r\n{if;{channel.id};==;{$AFKChannel};{return}}\r\n{=data;{or;{store.get;VoiceData_{channel.id}};{[]}}}\r\n{if;{$data};includes;{user.id};\r\n {=data;{filter;{$data};/{user.id}-\\d+/;!matches}}\r\n}\r\n{push;{$data};{user.id}-{time}}\r\n{store.set;VoiceData_{channel.id};{$data}}", + "cooldownSeconds": 0, + "cooldownType": "User", + "restriction": null, + "flags": "0" + } + ] +} \ No newline at end of file From 164c4d45629f96e4a2c4860bc4e328f851fb3c75 Mon Sep 17 00:00:00 2001 From: Can eh dian <62065288+Canehdian@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:03:03 -0500 Subject: [PATCH 2/4] Update README.md fix image --- Levels/Canehdian-VoiceEXP/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Levels/Canehdian-VoiceEXP/README.md b/Levels/Canehdian-VoiceEXP/README.md index 82a360e..592731d 100644 --- a/Levels/Canehdian-VoiceEXP/README.md +++ b/Levels/Canehdian-VoiceEXP/README.md @@ -1,6 +1,7 @@ # *WARNING* This actionpack does not play well with Join to Create voice channels or any other voice channel that disconnects the user immediately after joining. -To bypass this issue, it is recommended to ![blacklist](https://micro.sylo.digital/i/9EDJsQ) any of these voice channels from both actions. +To bypass this issue, it is recommended to blacklist any of these voice channels from both actions. +![blacklist](https://micro.sylo.digital/i/9EDJsQ) # Info @@ -12,4 +13,4 @@ BE SURE TO READ THE WARNING AT THE TOP OF THIS README There are 3 variables you need to change to start using these Actions. The Voice Channel Leave action has 2 variables for the amount of Experience and duration to apply it across. (By default it adds 5 experience for every 120 seconds the user is in a voice channel) -The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. \ No newline at end of file +The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. From 7a148899acea84954eda472ae585715d918887fd Mon Sep 17 00:00:00 2001 From: Can eh dian <62065288+Canehdian@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:04:30 -0500 Subject: [PATCH 3/4] Update README.md gr --- Levels/Canehdian-VoiceEXP/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Levels/Canehdian-VoiceEXP/README.md b/Levels/Canehdian-VoiceEXP/README.md index 592731d..a0fb4e8 100644 --- a/Levels/Canehdian-VoiceEXP/README.md +++ b/Levels/Canehdian-VoiceEXP/README.md @@ -12,5 +12,5 @@ This Action pack will enable Atlas to give users Experience for the time spent i BE SURE TO READ THE WARNING AT THE TOP OF THIS README There are 3 variables you need to change to start using these Actions. -The Voice Channel Leave action has 2 variables for the amount of Experience and duration to apply it across. (By default it adds 5 experience for every 120 seconds the user is in a voice channel) -The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. +1. The Voice Channel Leave action has 2 variables for the amount of Experience and duration to apply it across. (By default it adds 5 experience for every 120 seconds the user is in a voice channel) +2. The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. From 339facfa4420afdfa1bd255022ab5a1eaf2a7cf1 Mon Sep 17 00:00:00 2001 From: Can eh dian <62065288+Canehdian@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:10:47 -0500 Subject: [PATCH 4/4] Update README.md rah --- Levels/Canehdian-VoiceEXP/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Levels/Canehdian-VoiceEXP/README.md b/Levels/Canehdian-VoiceEXP/README.md index a0fb4e8..f749f5f 100644 --- a/Levels/Canehdian-VoiceEXP/README.md +++ b/Levels/Canehdian-VoiceEXP/README.md @@ -11,6 +11,7 @@ This Action pack will enable Atlas to give users Experience for the time spent i BE SURE TO READ THE WARNING AT THE TOP OF THIS README -There are 3 variables you need to change to start using these Actions. -1. The Voice Channel Leave action has 2 variables for the amount of Experience and duration to apply it across. (By default it adds 5 experience for every 120 seconds the user is in a voice channel) -2. The Voice Channel join action has 1 variable which should be the AFK channel's ID so users can't gain Experience for being AFK. +There are 3 variables you need to change in total to start using these Actions. +1. EXPPerTime: the amount of Experience gained based on the set IntervalForEXPGain variable +2. IntervalForEXPGain: the amount of time it takes in a voice channel for a user to gain the set EXPPerTime variable (by default, the user gains 5 exp for every 120 seconds they are in a voice channel) +3. AFKChannel: This lets the script know what channel is the AFK Channel so it can blacklist users from gaining EXP there