Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
SyarzzNF authored Jul 13, 2024
1 parent 13411be commit 9899395
Show file tree
Hide file tree
Showing 100 changed files with 6,774 additions and 0 deletions.
107 changes: 107 additions & 0 deletions plugins/rpg-ngentud.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@

let handler = async (m, { conn }) => {
let __timers = (new Date - global.db.data.users[m.sender].lastngojek)
let _timers = (300000 - __timers)
let order = global.db.data.users[m.sender].ojekk
let timers = clockString(_timers)
let name = conn.getName(m.sender)
let user = global.db.data.users[m.sender]

if (new Date - global.db.data.users[m.sender].lastngojek > 300000) {
let randomaku1 = `${Math.floor(Math.random() * 10)}`
let randomaku2 = `${Math.floor(Math.random() * 10)}`
let randomaku4 = `${Math.floor(Math.random() * 5)}`
let randomaku3 = `${Math.floor(Math.random() * 10)}`
let randomaku5 = `${Math.floor(Math.random() * 10)}`

.trim()

let rbrb1 = (randomaku1 * 2)
let rbrb2 = (randomaku2 * 10)
let rbrb3 = (randomaku3 * 1)
let rbrb4 = (randomaku4 * 15729)
let rbrb5 = (randomaku5 * 20000)

var zero1 = `${rbrb1}`
var zero2 = `${rbrb2}`
var zero3 = `${rbrb3}`
var zero4 = `${rbrb4}`
var zero5 = `${rbrb5}`

var dimas = `
✔️ Mendapatkan Pelanggan....
`

var dimas2 = `
🥵 Mulai Mengocok.....
`

var dimas3 = `
🥵Ahhhh, Sakitttt!! >////<
💦Crotttt.....
`

var dimas4 = `
🥵💦💦Ahhhhhh😫
`

var hsl = `
*—[ Hasil Ngewe ${name} ]—*
➕ 💹 Uang = [ ${zero4} ]
➕ ✨ Exp = [ ${zero5} ]
➕ 📛 Warn = +1
➕ 😍 Order Selesai = +1
➕ 📥Total Order Sebelumnya : ${order}
${wm}
`


global.db.data.users[m.sender].warn += 1
global.db.data.users[m.sender].money += rbrb4
global.db.data.users[m.sender].exp += rbrb5
global.db.data.users[m.sender].ojekk += 1


setTimeout(() => {
m.reply(`${hsl}`)
}, 27000)

setTimeout(() => {
m.reply(`${dimas4}`)
}, 25000)

setTimeout(() => {
m.reply(`${dimas3}`)
}, 20000)

setTimeout(() => {
m.reply(`${dimas2}`)
}, 15000)

setTimeout(() => {
m.reply(`${dimas}`)
}, 10000)

setTimeout(() => {
m.reply('Mencari Pelanggan.....')
}, 0)
user.lastngojek = new Date * 1
} else conn.sendButton(m.chat, `Sepertinya Anda Sudah Kecapekan Silahkan Istirahat Dulu Sekitar\n🕔 *${timers}*`, wm, 'Inventory', '.inv', m )
}
handler.help = ['ngewe']
handler.tags = ['rpg']
handler.command = /^(ngewe|anu)$/i
handler.register = true
handler.premium = true
handler.private = true

export default handler


function clockString(ms) {
let h = Math.floor(ms / 3600000)
let m = Math.floor(ms / 60000) % 60
let s = Math.floor(ms / 1000) % 60
console.log({ms,h,m,s})
return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':')
}
16 changes: 16 additions & 0 deletions plugins/rpg-nguli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
let handler = async (m, { conn }) => {
if (new Date - global.db.data.users[m.sender].lastnguli > 86400000) {
global.db.data.users[m.sender].limit += 10
m.reply('_Selamat Kamu Mendapatkan +10 Limit_')
global.db.data.users[m.sender].lastnguli = new Date * 1
} else m.reply('Kamu Sudah Mengklaim Upah Nguli Hari Ini')
}
handler.help = ['nguli']
handler.tags = ['rpg']
handler.command = /^(nguli)$/i


handler.fail = null


export default handler
122 changes: 122 additions & 0 deletions plugins/rpg-ojek.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@

let handler = async (m, { conn }) => {
let __timers = (new Date - global.db.data.users[m.sender].lastngojek)
let _timers = (300000 - __timers)
let order = global.db.data.users[m.sender].ojekk
let timers = clockString(_timers)
let name = conn.getName(m.sender)
let user = global.db.data.users[m.sender]

if (new Date - global.db.data.users[m.sender].lastngojek > 300000) {
let randomaku1 = `${Math.floor(Math.random() * 10)}`
let randomaku2 = `${Math.floor(Math.random() * 10)}`
let randomaku4 = `${Math.floor(Math.random() * 5)}`
let randomaku3 = `${Math.floor(Math.random() * 10)}`
let randomaku5 = `${Math.floor(Math.random() * 10)}`

.trim()

let rbrb1 = (randomaku1 * 2)
let rbrb2 = (randomaku2 * 10)
let rbrb3 = (randomaku3 * 1)
let rbrb4 = (randomaku4 * 15729)
let rbrb5 = (randomaku5 * 120)

var zero1 = `${rbrb1}`
var zero2 = `${rbrb2}`
var zero3 = `${rbrb3}`
var zero4 = `${rbrb4}`
var zero5 = `${rbrb5}`

var dimas = `
🚶⬛⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬜⬜⬜⬛⬜⬜⬜⬛⬛
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
🏘️🏘️🏘️🏘️🌳 🌳 🏘️ 🛵
✔️ Mendapatkan Orderan....
`

var dimas2 = `
🚶🛵⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬜⬜⬜⬛⬜⬜⬜⬛⬛
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
🏘️🏘️🏘️🏘️🌳 🌳 🏘️
➕ Mengantar Ke Tujuan....
`

var dimas3 = `
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬜⬜⬛⬛⬜⬜⬜⬛⬛
⬛⬛⬛⬛⬛⬛⬛🛵⬛⬛
🏘️🏘️🏘️🏘️🌳 🌳 🏘️
➕ Sampai Di Tujuan....
`

var dimas4 = `
⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛
⬛⬜⬜⬛⬛⬜⬜⬜⬛⬛
⬛⬛⬛⬛⬛⬛⬛🛵⬛⬛
🏘️🏘️🏘️🏘️🌳 🌳 🏘️ 🚶
➕ 💹Menerima Gaji....
`

var hsl = `
*—[ Hasil Ngojek ${name} ]—*
➕ 💹 Uang = [ ${zero4} ]
➕ ✨ Exp = [ ${zero5} ]
➕ 😍 Order Selesai = +1
➕ 📥 Total Order Sebelumnya : ${order}
${wm}
`
var dimas5 = `*Waktunya Kamu Ngojek Lagi Hari Ini*`


global.db.data.users[m.sender].money += rbrb4
global.db.data.users[m.sender].exp += rbrb5
global.db.data.users[m.sender].ojekk += 1


setTimeout(() => {
setTimeout(() => {
m.reply(`${dimas5}`)
}, 79200000)

m.reply(`${hsl}`)
}, 27000)

setTimeout(() => {
m.reply(`${dimas4}`)
}, 25000)

setTimeout(() => {
m.reply(`${dimas3}`)
}, 20000)

setTimeout(() => {
m.reply(`${dimas2}`)
}, 15000)

setTimeout(() => {
m.reply(`${dimas}`)
}, 10000)

setTimeout(() => {
m.reply('Mencari Pelanggan.....')
}, 0)
user.lastngojek = new Date * 1
} else conn.sendButton(m.chat, `Sepertinya Anda Sudah Kecapekan Silahkan Istirahat Dulu Sekitar\n🕔 *${timers}*`, wm, [['Inventory', '.inv']], m )
}
handler.tags = ['rpg']
handler.command = /^(ojek)$/i
handler.register = true

export default handler


function clockString(ms) {
let h = Math.floor(ms / 3600000)
let m = Math.floor(ms / 60000) % 60
let s = Math.floor(ms / 1000) % 60
console.log({ms,h,m,s})
return [h, m, s].map(v => v.toString().padStart(2, 0) ).join(':')
}
120 changes: 120 additions & 0 deletions plugins/rpg-open.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
const rewards = {
common: {
money: 101,
exp: 201,
trash: 11,
potion: [0, 1, 0, 1, 0, 0, 0, 0, 0],
common: [0, 1, 0, 1, 0, 0, 0, 0, 0, 0],
uncommon: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
},
uncommon: {
money: 201,
exp: 401,
trash: 31,
potion: [0, 1, 0, 0, 0, 0, 0],
diamond: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
common: [0, 1, 0, 0, 0, 0, 0, 0],
uncommon: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
mythic: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
wood: [0, 1, 0, 0, 0, 0],
rock: [0, 1, 0, 0, 0, 0],
string: [0, 1, 0, 0, 0, 0]
},
mythic: {
money: 301,
exp: 551,
trash: 61,
potion: [0, 1, 0, 0, 0, 0],
emerald: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
diamond: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
gold: [0, 1, 0, 0, 0, 0, 0, 0, 0],
iron: [0, 1, 0, 0, 0, 0, 0, 0],
common: [0, 1, 0, 0, 0, 0],
uncommon: [0, 1, 0, 0, 0, 0, 0, 0],
mythic: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
legendary: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
pet: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
wood: [0, 1, 0, 0, 0],
rock: [0, 1, 0, 0, 0],
string: [0, 1, 0, 0, 0]
},
legendary: {
money: 401,
exp: 601,
trash: 101,
potion: [0, 1, 0, 0, 0],
emerald: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
diamond: [0, 1, 0, 0, 0, 0, 0, 0, 0],
gold: [0, 1, 0, 0, 0, 0, 0, 0],
iron: [0, 1, 0, 0, 0, 0, 0],
common: [0, 1, 0, 0],
uncommon: [0, 1, 0, 0, 0, 0],
mythic: [0, 1, 0, 0, 0, 0, 0, 0, 0],
legendary: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
pet: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
wood: [0, 1, 0, 0],
rock: [0, 1, 0, 0],
string: [0, 1, 0, 0]
},
// pet: {
// petFood: [0, 1, 0, 0, 0],
// anjing: [],
// }
}
let handler = async (m, { command, args, usedPrefix }) => {
let user = global.db.data.users[m.sender]
let listCrate = Object.fromEntries(Object.entries(rewards).filter(([v]) => v && v in user))
let info = `
Use Format *${usedPrefix}${command} [crate] [count]*
Usage example: *${usedPrefix}${command} common 10*
📍Crate list:
${Object.keys(listCrate).map((v) => `
${rpg.emoticon(v)}${v}
`.trim()).join('\n')}
`.trim()
let type = (args[0] || '').toLowerCase()
let count = Math.floor(isNumber(args[1]) ? Math.min(Math.max(parseInt(args[1]), 1), Number.MAX_SAFE_INTEGER) : 1) * 1
if (!(type in listCrate)) return m.reply(info)
if (user[type] < count) return m.reply(`
Your *${rpg.emoticon(type)}${type} crate* is not enough!, you only have ${user[type]} *${rpg.emoticon(type)}${type} crate*
type *${usedPrefix}buy ${type} ${count - user[type]}* to buy
`.trim())
// TODO: add pet crate
// if (type !== 'pet')
let crateReward = {}
for (let i = 0; i < count; i++)
for (let [reward, value] of Object.entries(listCrate[type]))
if (reward in user) {
const total = value.getRandom()
if (total) {
user[reward] += total * 1
crateReward[reward] = (crateReward[reward] || 0) + (total * 1)
}
}
user[type] -= count * 1
m.reply(`
You have opened *${count}* ${global.rpg.emoticon(type)}${type} crate and got:
${Object.keys(crateReward).filter(v => v && crateReward[v] && !/legendary|pet|mythic|diamond|emerald/i.test(v)).map(reward => `
*${global.rpg.emoticon(reward)}${reward}:* ${crateReward[reward]}
`.trim()).join('\n')}
`.trim())
let diamond = crateReward.diamond, mythic = crateReward.mythic, pet = crateReward.pet, legendary = crateReward.legendary, emerald = crateReward.emerald
if (mythic || diamond) m.reply(`
Congrats you got a rare item, which is ${diamond ? `*${diamond}* ${rpg.emoticon('diamond')}diamond` : ''}${diamond && mythic ? 'and ' : ''}${mythic ? `*${mythic}* ${rpg.emoticon('mythic')}mythic` : ''}
`.trim())
if (pet || legendary || emerald) m.reply(`
Congrats you got a epic item, which is ${pet ? `*${pet}* ${rpg.emoticon('pet')}pet` : ''}${pet && legendary && emerald ? ', ' : (pet && legendary || legendary && emerald || emerald && pet) ? 'and ' : ''}${legendary ? `*${legendary}* ${rpg.emoticon('legendary')}legendary` : ''}${pet && legendary && emerald ? 'and ' : ''}${emerald ? `*${emerald}* ${rpg.emoticon('emerald')}emerald` : ''}
`.trim())
}
handler.help = ['open', 'gacha'].map(v => v + ' *crate jumlah*')
handler.tags = ['rpg']
handler.command = /^(open|buka|gacha)$/i

export default handler

function isNumber(number) {
if (!number) return number
number = parseInt(number)
return typeof number == 'number' && !isNaN(number)
}
Loading

0 comments on commit 9899395

Please sign in to comment.