Upload case.js
Browse files
case.js
CHANGED
@@ -970,6 +970,11 @@ module.exports = async (conn, dev, chatUpdate, store) => {
|
|
970 |
|
971 |
> โโโโโโโโโโโโโโ
|
972 |
|
|
|
|
|
|
|
|
|
|
|
973 |
> โใ \`๐
๐๐๐ ๐๐๐๐๐๐๐๐๐\` ใ
|
974 |
|
975 |
> โโโโโโโโโโโโโโ
|
@@ -3236,21 +3241,29 @@ case 'scan': {
|
|
3236 |
}
|
3237 |
case 'startgame': {
|
3238 |
let user = m.sender;
|
3239 |
-
|
3240 |
let gameData = fs.existsSync(gameFile) ? JSON.parse(fs.readFileSync(gameFile, 'utf8')) : {};
|
3241 |
|
3242 |
-
if (gameData[user])
|
|
|
|
|
|
|
|
|
|
|
3243 |
|
3244 |
gameData[user] = {
|
3245 |
money: 1000,
|
3246 |
level: 1,
|
3247 |
xp: 0,
|
3248 |
-
inventory: []
|
3249 |
};
|
3250 |
|
3251 |
fs.writeFileSync(gameFile, JSON.stringify(gameData, null, 2));
|
3252 |
|
3253 |
-
|
|
|
|
|
|
|
|
|
3254 |
break;
|
3255 |
}
|
3256 |
|
@@ -3401,7 +3414,6 @@ case 'startgame': {
|
|
3401 |
|
3402 |
|
3403 |
|
3404 |
-
|
3405 |
|
3406 |
|
3407 |
default:
|
|
|
970 |
|
971 |
> โโโโโโโโโโโโโโ
|
972 |
|
973 |
+
> โใ \`๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐\` ใ
|
974 |
+
> ${sign} ${prefix}startgame
|
975 |
+
|
976 |
+
> โโโโโโโโโโโโโโ
|
977 |
+
|
978 |
> โใ \`๐
๐๐๐ ๐๐๐๐๐๐๐๐๐\` ใ
|
979 |
|
980 |
> โโโโโโโโโโโโโโ
|
|
|
3241 |
}
|
3242 |
case 'startgame': {
|
3243 |
let user = m.sender;
|
|
|
3244 |
let gameData = fs.existsSync(gameFile) ? JSON.parse(fs.readFileSync(gameFile, 'utf8')) : {};
|
3245 |
|
3246 |
+
if (gameData[user]) {
|
3247 |
+
return conn.sendMessage(m.chat, {
|
3248 |
+
image: { url: "https://huggingface.co/spaces/API-XX/TEST/resolve/main/Links/images.jpeg" },
|
3249 |
+
caption: fontx(`โ๏ธ *You are already in the game!*\n\n๐ฐ *Balance:* $${gameData[user].money}\n๐๏ธ *Level:* ${gameData[user].level}\n๐น *XP:* ${gameData[user].xp}\n๐ *Inventory:* ${gameData[user].inventory.length > 0 ? gameData[user].inventory.join(", ") : "Empty"}\n\n๐ช Visit the *weapon store* to buy your first weapon!`)
|
3250 |
+
});
|
3251 |
+
}
|
3252 |
|
3253 |
gameData[user] = {
|
3254 |
money: 1000,
|
3255 |
level: 1,
|
3256 |
xp: 0,
|
3257 |
+
inventory: ["Wooden Sword"]
|
3258 |
};
|
3259 |
|
3260 |
fs.writeFileSync(gameFile, JSON.stringify(gameData, null, 2));
|
3261 |
|
3262 |
+
conn.sendMessage(m.chat, {
|
3263 |
+
image: { url: "https://i.imgur.com/QTqCHLy.jpg" },
|
3264 |
+
caption: fontx(`๐ฅ *Welcome to the World of Legends!*\n\n๐ฐ *Starting Balance:* $1000\n๐๏ธ *Level:* 1\n๐น *XP:* 0\n๐ก๏ธ *Starting Weapon:* Wooden Sword\n\nโ๏ธ *Prepare for battle, warrior!* Visit the weapon store and upgrade your gear!`)
|
3265 |
+
});
|
3266 |
+
|
3267 |
break;
|
3268 |
}
|
3269 |
|
|
|
3414 |
|
3415 |
|
3416 |
|
|
|
3417 |
|
3418 |
|
3419 |
default:
|