diff --git a/README.md b/README.md index 8fd4af7..02b0b1e 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,13 @@ Have fun tracking! ## Updates +**Update 8 December 2024, 20:45 Game Time**: + +* Fixed D&D Tokens not fully capturing within mystery gifts. + **Update 3 December 2024, 07:30 Game Time**: -* Added tracking of mystery gift contents +* Added tracking of mystery gift contents. **Update 2 December 2024, 20:45 Game Time**: diff --git a/scripts/script.js b/scripts/script.js index 6f6e108..d050595 100644 --- a/scripts/script.js +++ b/scripts/script.js @@ -280,8 +280,8 @@ function readChatbox() { }); } if (foundMystery) { - const regex = /(\[\d+:\d+:\d+\]) You unwrap your mystery gift and receive: \s?((?:\1 \d+[ x ][\w\s':+\-!()\d]+ ?)+)/g; - const itemRegex = /\[\d+:\d+:\d+\] (\d+)\s*x?\s*([\w\s'+:\-!()\d]*)/g; + const regex = /(\[\d+:\d+:\d+\]) You unwrap your mystery gift and receive: \s?((?:\1 \d+[ x ][\w\s':&+\-!()\d]+ ?)+)/g; + const itemRegex = /\[\d+:\d+:\d+\] (\d+)\s*x?\s*([\w\s'+&:\-!()\d]*)/g; const rewardRegex = new RegExp(regex.source); const rewards = chat.match(regex); const counter = `${APP_PREFIX}MysteryGifts`;