Skip to content

Commit

Permalink
march event
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBThai committed Mar 19, 2024
1 parent ad6a990 commit 873c3f5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ShootingStar extends Collectible {
'412812867348463636',
'692146302284202134',
'417214768970203136',
'606142158067597332'
];
this.fullControl = true;
this.ownerOnly = true;
Expand All @@ -33,7 +34,7 @@ class ShootingStar extends Collectible {
this.giveMsg =
'<:starfrens:1067095520985751563> ooh, your **wish** <a:glitter:1080026999327834122> came true! the universe has listened to your dream, you got **1 shooting star**! ?emoji?';

this.failChance = 0.55;
this.failChance = 0.20;
this.failMsg =
'**<:starfrens:1067095520985751563> Sadly...maybe a dream is just meant to be a dream <a:pinkstars:1080026894436667402>**';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/commandList/patreon/planet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

const CommandInterface = require('../../CommandInterface.js');

const owners = ['692146302284202134', '412812867348463636'];
const owners = ['692146302284202134'];
const data = 'planet';
const planets = [
{
Expand Down
6 changes: 6 additions & 0 deletions src/data/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,5 +428,11 @@
"end": 1708588800000,
"type": "valentine",
"chance": 0.05
},
"2024_march": {
"start": 1710918000000,
"end": 1711609200000,
"type": "march",
"chance": 0.05
}
}
42 changes: 21 additions & 21 deletions src/utils/eventUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,58 +202,58 @@ async function getEventRewards(user) {
let rewardCount = 1000;
rewardCount = Math.floor(rewardCount + Math.random() * 4000);
return {
rewardTxt: `You received a red envelope! It has **${this.global.toFancyNum(rewardCount)} ${
rewardTxt: `What a lucky day! You found **${this.global.toFancyNum(rewardCount)} ${
this.config.emoji.cowoncy
} Cowoncies**, that's dope!`,
rewardEmoji: '🧧',
} Cowoncies**!`,
rewardEmoji: 'πŸ€',
rewardSql: `INSERT INTO cowoncy (id,money) VALUES (${id}, ${rewardCount}) ON DUPLICATE KEY UPDATE money = money + ${rewardCount};`,
};
} else if (rand <= 0.3) {
// Shard
let rewardCount = 300;
rewardCount = Math.floor(rewardCount + Math.random() * 700);
return {
rewardTxt: `OwO what's this? A black cat left a gift behind? It's **${this.global.toFancyNum(
rewardTxt: `What a lucky day! You found **${this.global.toFancyNum(
rewardCount
)} ${this.config.emoji.shards} Weapon Shards** to make your weapons refined!`,
rewardEmoji: 'πŸˆβ€β¬›',
)} ${this.config.emoji.shards} Weapon Shards**!`,
rewardEmoji: 'πŸ€',
rewardSql: `INSERT INTO shards (uid,count) VALUES (${uid},${rewardCount}) ON DUPLICATE KEY UPDATE count = count + ${rewardCount};`,
};
} else if (rand <= 0.45) {
// Lootbox
let rewardCount = 1;
rewardCount = Math.floor(rewardCount + Math.random() * 2);
let rewardTxt = `Happy Chinese New Year! I hope `;
let rewardTxt = `What a lucky day! You found **${rewardCount} ${this.config.emoji.lootbox} Lootbox`;
if (rewardCount > 1) {
rewardTxt += `these **${rewardCount} ${this.config.emoji.lootbox} Lootboxes** can make your luck appear!`;
rewardTxt += `es**!`;
} else {
rewardTxt += `this **${rewardCount} ${this.config.emoji.lootbox} Lootbox** can make your luck appear!`;
rewardTxt += `**!`;
}
return {
rewardTxt,
rewardEmoji: `🧧`,
rewardEmoji: `πŸ€`,
rewardSql: `INSERT INTO lootbox (id,boxcount,claimcount,claim) VALUES (${id},${rewardCount},0,'2017-01-01') ON DUPLICATE KEY UPDATE boxcount = boxcount + ${rewardCount};`,
};
} else if (rand <= 0.6) {
// Crate
let rewardCount = 1;
rewardCount = Math.floor(rewardCount + Math.random() * 2);
let rewardTxt = `Look! A fairy with a gift for you! She left behind **${rewardCount} ${this.config.emoji.crate} Weapon Crate`;
let rewardTxt = `What a lucky day! You found **${rewardCount} ${this.config.emoji.crate} Weapon Crate`;
if (rewardCount > 1) {
rewardTxt += `s**, they look brand new!`;
rewardTxt += `s**!`;
} else {
rewardTxt += `**, it looks brand new!`;
rewardTxt += `**!`;
}
return {
rewardTxt,
rewardEmoji: '🧚',
rewardEmoji: 'πŸ€',
rewardSql: `INSERT INTO crate (uid,cratetype,boxcount,claimcount,claim) VALUES (${uid},0,${rewardCount},0,'2017-01-01') ON DUPLICATE KEY UPDATE boxcount = boxcount + ${rewardCount};`,
};
} else if (rand <= 0.75) {
// Cookie
return {
rewardTxt: `Happy Valentine's! Enjoy this nice treat. I hope this **${this.config.emoji.cookie} Cookie** is very very sweet!`,
rewardEmoji: '❀️',
rewardTxt: `What a lucky day! You found a **${this.config.emoji.cookie} Cookie**!`,
rewardEmoji: 'πŸ€',
rewardSql: `INSERT INTO rep (id, count) VALUES (${id},1) ON DUPLICATE KEY UPDATE count = count + 1;`,
};
} else if (rand <= 0.9) {
Expand All @@ -264,16 +264,16 @@ async function getEventRewards(user) {
let gemSql = gem.sql;
gem = Object.values(gem.gems)[0].gem;
return {
rewardTxt: `OwO! I wish you Good luck in the year ahead. If not, this **${gem.emoji} ${gem.rank} ${gem.type} Gem** will give you fortune instead!`,
rewardEmoji: '🧧',
rewardTxt: `What a lucky day! You found a **${gem.emoji} ${gem.rank} ${gem.type} Gem**!`,
rewardEmoji: 'πŸ€',
rewardSql: gemSql,
};
} else {
// Special Pet
let animal = this.global.validAnimal('2024feb_owo');
let animal = this.global.validAnimal('2024spring_patrick');
return {
rewardTxt: `A cutie appeared, she asks, "Will you be my Valentine?". ${animal.value} OwO wants to stay with you all the time!`,
rewardEmoji: 'πŸ’Œ',
rewardTxt: `You're in luck! ${animal.value} OwO came to come join your team!`,
rewardEmoji: 'πŸ€',
rewardSql: `INSERT INTO animal (count, totalcount, id, name) VALUES (1,1,${id},'${animal.value}')
ON DUPLICATE KEY UPDATE count = count + 1, totalcount = totalcount + 1;
INSERT INTO animal_count (id, ${animal.rank}) VALUES (${id}, 1)
Expand Down

0 comments on commit 873c3f5

Please sign in to comment.