Пример #1
0
def button(update, context):
    user = update.effective_user
    uid = update.effective_user.id
    query = update.callback_query
    first_name = update.effective_user.first_name
    global games
    chatid = update.effective_chat.id
    check_chatid(chatid)
    if query.data == 'bj:hit':
        # 给user发牌
        check_chatid(chatid)
        getCard(chatid, uid, first_name)
        query.edit_message_text(getUsers(chatid), reply_markup=gamekb)
    elif query.data == 'bj:save':
        games[chatid]['users'][uid]['state'] = "🔴 停牌"
        query.edit_message_text(getUsers(chatid), reply_markup=gamekb)
    elif query.data == 'bj:sum':
        bal.check(user)
        ccl(chatid, user)
        if games[chatid]['users'][uid]["state"] == "❌ 失败 💥 $%s - $1000" % (
                bal.get_coins(user)):
            bal.addcoins(user, -1000)
        elif games[chatid]['users'][uid]["state"] == "✅ 胜利 💰 $%s + $2000" % (
                bal.get_coins(user)):
            bal.addcoins(user, 2000)
        query.edit_message_text(getUsers(chatid))
        games = {}
Пример #2
0
def fish(update, context):
    Fish = [
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!",
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!", 
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!", 
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!", 
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!", 
        "💥 LOL You got nothing, git gud. \n\n💥 哈哈哈钓了一天鱼都没钓着。回家修炼去吧!",  
        "🐠 You brought one common fish and gained $5! \n\n🐠 你钓到了一条太阳鱼,收获了 $5。",
        "🐠 You brought one common fish and gained $5! \n\n🐠 你钓到了一条太阳鱼,收获了 $5。",
        "🐠 You brought one common fish and gained $5! \n\n🐠 你钓到了一条太阳鱼,收获了 $5。",
        "🐠 You brought one common fish and gained $5! \n\n🐠 你钓到了一条太阳鱼,收获了 $5。",
        "🐠🐠 You brought back two common fishes and gained $10! \n\n🐠🐠 你钓到了两条太阳鱼,收获了 $10。",
        "🐠🐠 You brought back two common fishes and gained $10! \n\n🐠🐠 你钓到了两条太阳鱼,收获了 $10。",
        "🐠🐠 You brought back two common fishes and gained $10! \n\n🐠🐠 你钓到了两条太阳鱼,收获了 $10。",
        "4x🐠 You brought back four common fishes and gained $20! \n\n4x🐠 你钓到了四条太阳鱼,收获了 $20。", 
        "🐟 You brought back one RARE fish and gained $100! Whoo Hoo! \n\n🐟 你钓到了一条 大嘴鲈鱼 ,收获了 $100。棒棒哒~ ", 
        "🐟 You brought back one RARE fish and gained $100! Whoo Hoo! \n\n🐟 你钓到了一条 大嘴鲈鱼 ,收获了 $100。棒棒哒~ ", 
        "💳 You fished up a credit card and gave it to the police. You gained $700. Wait what just happened? \n\n💳 你钓到一张银行卡并交给了警察。你得到了 $700。等会等会,发生了什么?!"
        ]
    msg3 = random.choice(Fish)
    user = update.message.from_user
    if msg3 == Fish[6] or msg3 == Fish[7] or msg3 == Fish[8] or msg3 == Fish[9]:
        bal.addcoins(user,5)
    elif msg3 == Fish[12] or msg3 == Fish[10] or msg3 == Fish[11]:
        bal.addcoins(user,10)
    elif msg3 == Fish[13]:
        bal.addcoins(user,20)
    elif msg3 == Fish[14] or msg3 == Fish[15]:
        bal.addcoins(user,100)
    elif msg3 == Fish[16]:
        bal.addcoins(user,700)
    msg3 += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg3)
Пример #3
0
def fp(update, context):
    user = update.effective_user
    ok = random.randint(1111,3333)
    sp = ["temple 🛕. You found alot of ancient redstone contrapions 🎛 and sold them for $%s."%(ok), "dead end 💀.", "pond and a shop beside it. 🌊 If you want to buy a fishing rod and fish, use the command /PDFish 🎣."]
    d = random.choice(sp)
    msg44 = "You followed the path and found a %s"%(d)
    if d == sp[0]:
        bal.addcoins(user,ok)
    msg44 += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg44)
Пример #4
0
def cheap(update, context):
    user = update.effective_user
    shopping = [
        "💥 You bought fake supplies. Get rekt.", "🚱 DRILL NO WORK????????",
        "✅ You made the right choice, good call! Got to your friend's research base and earned $7777. But wait... someone stole your snow moto... what do you do?"
    ]
    msg = random.choice(shopping)
    if msg == shopping[2]:
        bal.addcoins(user, 7777)
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
Пример #5
0
def cheap(update, context):
    user = update.effective_user
    shopping = [
        "💥 You don't have enough cash. Get rekt.", "🚱 DRILL NO WORK????????",
        "✅ You made the right choice, good call! Got to your friend's research base and earned $6666."
    ]
    msg = random.choice(shopping)
    if msg == shopping[2]:
        bal.addcoins(user, 6666)
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
Пример #6
0
def w(update, context):
    user = update.effective_user
    uid = str(user.id)
    if not "- 🎫 Space Ticket -- [ACTIVE]" == bal.bal[uid]['inv']['items']['spaceticket']:
        if bal.bal[uid]['coins'] >= 100000:
            msg = "You accepted the offer. 'Space Ticket' is now in your inventory."
            bal.addcoins(user,-100000)
            bal.additem(user,'🎫 Space Ticket','spaceticket')
    else:
        msg = "Invaid command: No offers to accept"
        
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
Пример #7
0
def c(update, context):
    user = update.effective_user
    ri = random.randint(2000, 12000)
    choices = [
        "💥 You accidentally fell of the cliff 🧗🏼‍♀️ and broke both of your legs 🤕.",
        "💥 You fell of the cliff 🧗🏼‍♀️ and landed hard on a rock.",
        "😇 You successfully went down safely. You examined the plants and reported it to the scientests. The scientests had never seen such things before and you were rewarded $%s for a reward."
        % (ri)
    ]
    msg = random.choice(choices)
    if msg == choices[2]:
        bal.addcoins(user, ri)
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
Пример #8
0
def shop(update, context):
    user = update.effective_user
    if len(context.args) == 0:
        msg = """The 🤖 DMII Market

Item name: Space Ticket | Go to /PDSpace to buy it if you don't have one!

----------------------------------------------------------

Item Number: 2 | Item name: GoldPass | Item Price: $500,000

Item Number: 3 | Item name: Crossbow | Item Price: $50,000

Item Number: 4 | Item name: Arrow | Item Price: $1,000

----------------------------------------------------------

To buy an Item, do /PDShop buy [Item Number] or [Item name] 
To buy multiple arrows at once, do /PDShop buy 4 [Number]
"""
    else:
        uid = str(user.id)
        print(context.args)
        if context.args[0] == 'buy':
            if context.args[1] == 'crossbow' or context.args[1] == '3':
                if bal.bal[uid]['coins'] >= 50000:
                    msg = 'Purchase Successful! Crossbow is now in your inventory.'
                    bal.addweapon(user,'- 🏹 Crossbow','crossbow')
                    bal.addcoins(user,-50000)
                else:
                    msg = "Purchase Unsuccessful. You don't have enough coins."
            elif context.args[1] == 'goldpass' or context.args[1] == '2':
                if bal.bal[uid]['coins'] >= 500000:
                    msg = 'Purchase Successful! Goldpass is now in your inventory.'
                    bal.addperks(user,'- 🔑 Gold Pass','goldpass')
                    bal.addcoins(user,-500000)
                else:
                    msg = "Purchase Unsuccessful. You don't have enough coins."
            elif context.args[1] == 'arrow' or context.args[1] == '4':
                if len(context.args) == 3:
                    if bal.bal[uid]['coins'] >= 1000 * int(context.args[2]):
                        msg = 'Purchase Successful! %s of that item is now in your inventory.'%(context.args[2])
                        bal.addarrows(user,int(context.args[2]))
                        bal.addcoins(user,-1000*int(context.args[2]))
                    else:
                        msg = "Purchase Unsuccessful. You don't have enough coins."
                else:
                    if bal.bal[uid]['coins'] >= 1000:
                        msg = 'Purchase Successful! one arrow is now in your inventory.'
                        bal.addcoins(user,-1000)
                        bal.addarrows(user,1)
                    else:
                        msg = "Purchase Unsuccessful. You don't have enough coins."
        else: 
            msg = 'Invaid'
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
Пример #9
0
def sumGame(chatid):
    number,msg = getNumber()
    users = games[chatid]["p"]
    game = 'x'
    if number >= 11:
        game = 'd'
    setHist(chatid,game)
    for u in users.keys():
        if users[u] == '':
            users[u] = '没选'
        elif users[u] == game:
            c = random.randint(0,10)
            bal.addcoins(users,random.randint(100,1000))
            users[u] = f'Yes! 你赢取了{c}个金币'
        else:
            c = random.randint(0,10) * -1
            bal.addcoins(users,random.randint(100,1000))
            users[u] = f'Noo!你输掉了{c}个金币'
    msg += "\n%s"%getUsers(users)
    return msg 
Пример #10
0
def rewarded(update, context):
    user = update.message.from_user
    godif = random.randint(100, 250)
    reward = [
        "☀️好样的 %s!你的老板给你了 $200." % user.first_name, "💵你在工作中收到了 $50.",
        "哈哈哈你什么也没有得到",
        "✨让神决定你的命运吧。 \n你的幸运终于来了!神给予了你 $%s 。" % (godif), "☀️你收获了 $200。棒棒哒~ ",
        "⚡️你获得了 $50。", "你一无所成。再修炼100年吧~ ",
        "✨让神决定你的命运吧。 \n你的幸运终于来了!神给予了你 $%s 。" % (godif),
        "💥你在工作中表现不好,损失了 $40。活该!", "☄️你被老板的躲避球击中。你挂了。损失了 $120。",
        "🎱哟,躲避球练的不错。这次就放过你啦!"
    ]
    msg = random.choice(reward)
    if msg == reward[0] or msg == reward[4]:
        bal.addcoins(user, 200)
    elif msg == reward[1] or msg == reward[5]:
        bal.addcoins(user, 50)
    elif msg == reward[2] or msg == reward[6]:
        bal.addcoins(user, 0)
    elif msg == reward[3] or msg == reward[7]:
        bal.addcoins(user, godif)
    elif msg == reward[8]:
        bal.addcoins(user, -40)
    elif msg == reward[9]:
        bal.addcoins(user, -120)
    elif msg == reward[10]:
        bal.addcoins(user, 0)
    msg += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg)
    godif = random.randint(100, 250)
Пример #11
0
def hunting(update, context):
    Hunt = [
        "💥 LOL you suck, you found nothing to hunt \n\n💥 哈哈你没有找到任何东西去捕猎",
        "💥 LOL you suck, you found nothing to hunt \n\n💥 哈哈你没有找到任何东西去捕猎",
        "💥 LOL you suck, you found nothing to hunt \n\n💥 哈哈你没有找到任何东西去捕猎",
        "🐻 A bear almost ate you. You lost $250. \n\n🐻 一只熊差点把你吃掉了。你失去了 $250。",
        "🐻 A bear almost ate you. You lost $250. \n\n🐻 一只熊差点把你吃掉了。你失去了 $250。",
        "🦨 You brought back a skunk and gained $10! \n\n🦨 你拿回来一只臭鼬并收获了 $10!",
        "🦨 You brought back a skunk and gained $10! \n\n🦨 你拿回来一只臭鼬并收获了 $10!",
        "🐇 You brought back a rabbit and gained $15! \n\n🐇 你拿回来一只兔子并收获了 $15!",
        "🐇 You brought back a rabbit and gained $15! \n\n🐇 你拿回来一只兔子并收获了 $15!",
        "🐇 You brought back a rabbit and gained $15! \n\n🐇 你拿回来一只兔子并收获了 $15!",
        "🦆 You brought back a duck and gained $25! \n\n🦆 你拿回来一只鸭子并收获了 $25!",
        "🦆 You brought back a duck and gained $25! \n\n🦆 你拿回来一只鸭子并收获了 $25!",
        "🐗 You brought back a boar and gained $70! \n\n🐗 你拿回来一只野猪并收获了 $70!",
        "Holy Moly! \n🐉 You brought back a DRAGON and gained $400! How'd you even manage that? \n\n我哩个天呐!\n 🐉 你拿回来了一只龙并收获了 $400!你是咋么做到的?"
    ]

    msg5 = random.choice(Hunt)
    user = update.message.from_user
    if msg5 == Hunt[5] or msg5 == Hunt[6]:
        bal.addcoins(user, 10)
    elif msg5 == Hunt[7] or msg5 == Hunt[9] or msg5 == Hunt[8]:
        bal.addcoins(user, 15)
    elif msg5 == Hunt[11] or msg5 == Hunt[10]:
        bal.addcoins(user, 25)
    elif msg5 == Hunt[12]:
        bal.addcoins(user, 70)
    elif msg5 == Hunt[13]:
        bal.addcoins(user, 400)
    elif msg5 == Hunt[3] or msg5 == Hunt[4]:
        bal.addcoins(user, -250)

    msg5 += "\n\nᴀᴜᴛʜᴏʀɪꜱᴇᴅ ʙʏ ɴᴏᴀʜ ❤️ \n作者:ɴᴏᴀʜ"
    update.message.reply_text(msg5)