API-XX commited on
Commit
3151f19
ยท
verified ยท
1 Parent(s): 659a86f

Upload case.js

Browse files
Files changed (1) hide show
  1. case.js +17 -5
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]) return reply("โœ… *You have already started your journey!*");
 
 
 
 
 
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
- reply("๐ŸŽฎ *Your adventure begins!* You have been successfully added to the game.");
 
 
 
 
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: