vic1707 / AutoPlay-PokeMeow-Discord

A bot that plays PokeMeow for you
15 stars 19 forks source link

Let's collaborate #20

Open adrianaryaputra opened 3 years ago

adrianaryaputra commented 3 years ago

Hello, my name is Adrian and I see that we have a similar project. I found that interesting!

I'm also developing a bot for PokeMeow and at the current version, it has almost similar capability as your bot. The difference is, I made the bot configurable directly using discord chat.

You can check it here. If you interested, let's collaborate.

Thanks.

vic1707 commented 2 years ago

Hello, my name is Adrian and I see that we have a similar project. I found that interesting!

I'm also developing a bot for PokeMeow and at the current version, it has almost similar capability as your bot. The difference is, I made the bot configurable directly using discord chat.

You can check it here. If you interested, let's collaborate.

Thanks.

I would love to collaborate but because of that difference both of ours bots aren't compatible I think... How does a bot configurable via the chat can catch pokemons for you ? As far as I know there isn't any token to login to a personnal account using discord.py, am i wrong?

vic1707 commented 2 years ago

Hello, my name is Adrian and I see that we have a similar project. I found that interesting! I'm also developing a bot for PokeMeow and at the current version, it has almost similar capability as your bot. The difference is, I made the bot configurable directly using discord chat. You can check it here. If you interested, let's collaborate. Thanks.

Captcha solver pls

I think you don't realize how hard it is to make one, I can't due to my lack of knowledge. I think if none is available it's maybe because it's really hard. I think, like me, @adrianaryaputra, want to implement one. This type of comment isn't really helpfull...

adrianaryaputra commented 2 years ago

@vic1707 , I see that you use selenium to obtain the message.. yeah it is different~

I use modified discord.py called discord.py-self. It is using later API so you can parse self message as usual. The token must be taken manually from your discord apps inspect element > network > science > header > request authentication.

for catching the pokemon,, i listen to incoming message event, and do a little bit of filter. But i think current filter method is still badly implemented.

if you interested,, i can add you as contributor~ i can also help you to understand the code if needed~

@Mehul343 we can implement captcha by using services such as 2captcha,, but I don’t implement captcha because it is costly. If you do 24h botting, and got captcha every two minute, one day of auto captcha will cost you around 1-2 USD.

vic1707 commented 2 years ago

Hello, my name is Adrian and I see that we have a similar project. I found that interesting! I'm also developing a bot for PokeMeow and at the current version, it has almost similar capability as your bot. The difference is, I made the bot configurable directly using discord chat. You can check it here. If you interested, let's collaborate. Thanks.

Captcha solver pls

I think you don't realize how hard it is to make one, I can't due to my lack of knowledge. I think if none is available it's maybe because it's really hard. I think, like me, @adrianaryaputra, want to implement one. This type of comment isn't really helpfull...

It is really easy with discord.py-self even I made one myself and it only has like 150 lines of code and it can do fishing too here's my code-

import asyncio import random import time from time import sleep import discord from discord import channel

print("Start date & time " + time.strftime("%c"))

username=("") channelid_fish= wildchannelid= channelids=[str(channelid_fish), str(wildchannelid)]

names=["Articuno", "Mew", "Jirachi", "Moltres", "Raikou", "Entei", "Suicune", "Ho-oh", "Regirock", "Regice", "Registeel", "Kyogre", "Latias", "Latios", "Deoxys", "Uxie", "Mesprit", "Azelf", "Heatran", "Regigigas", "Cresselia", "Cobalion", "Terrakion", "Virizion", "Tornadus", "Thundurus", "Landorus", "Xerneas", "Yveltal", "Celebi", "Zygarde"]

ball="prb" Encounters=0 Catches=0 Fish_Catches=0 GoodPoke=0

class MyClient(discord.Client): async def on_message(self, message):

 if (message.channel.id == wildchannelid):
     if message.author != self.user:
        if message.author.id != 664508672713424926:
            if message.author.id != 833428629705719828:
                if message.author.id != 795050413279019028:
                    quit()

 embeds = message.embeds
 for embed in embeds:
    footer=str(embed.footer)
    rarity=(footer.find)
    description=str(embed.description)
    name=(description.find)

    if (name("**"+ username + "** found a wild") == -1):
        return

    await message.channel.trigger_typing()
    await asyncio.sleep(0.3)
    global GoodPoke
    GoodPoke=0
    global Encounters
    Encounters += 1

    if (rarity('Common') != -1):
            await message.channel.send("gb")

    elif (rarity('Uncommon') != -1):
            await message.channel.send("gb")

    elif (rarity('Super Rare') != -1):

        if (name('Alolan-Geodude') != -1):
            await message.channel.send("mb")
            GoodPoke += 1
        else:
            await message.channel.send("ub")

    elif (rarity('Rare') != -1):
            await message.channel.send("gb")

    elif (rarity('Shiny (Full-odds') != -1):
      await message.channel.send("mb")
      GoodPoke += 1

    elif (rarity('Shiny') != -1):
      await message.channel.send("mb")
      GoodPoke += 1

    elif (rarity('Legendary') != -1):
        if any(word in description for word in names):
            await message.channel.send(ball)

        else:
            await message.channel.send("mb")
            GoodPoke += 1

async def on_message_edit(self, before, after):
 if any(word in str(after.channel.id) for word in channelids):
  embeds = after.embeds
  for embed in embeds:
   description=str(embed.description)
   status=(description.find)
   global GoodPoke
   global Fish_Catches
   global Catches
   fishchannel = client.get_channel(channelid_fish)

   if (status('PULL') != -1):
        await fishchannel.send("pull")

   elif (status('Not even') != -1):
        await asyncio.sleep(21.5)
        await fishchannel.trigger_typing()
        await fishchannel.send(";f")

   elif (status('fished out') != -1):
        sleep(0.2)
        if (status('Golden') != -1):
            await fishchannel.send("mb")
            GoodPoke += 1

        elif (status('Shiny') != -1):
            await fishchannel.send("mb")
            GoodPoke += 1

        elif (status('Kyogre') != -1):
            await fishchannel.send("db")

        elif (status('Suicune') != -1):
            await fishchannel.send("db")

        else:
            await fishchannel.send("gb")

   elif (status('caught') != -1):
    if (after.channel.id == channelid_fish):
        fishchannel = client.get_channel(channelid_fish)
        Fish_Catches += 1
        print(("Current date & time : " + time.strftime("%c")) + " | Encounters : " + (str(Encounters)) + " | Catches : " + (str(Catches)) + " | Fish Catches : " + (str(Fish_Catches)))
        await asyncio.sleep(21.5)
        await fishchannel.trigger_typing()
        await fishchannel.send(";f")

    elif (after.channel.id == wildchannelid):
        channel = client.get_channel(wildchannelid)
        Catches += 1
        print(("Current date & time : " + time.strftime("%c")) + " | Encounters : " + (str(Encounters)) + " | Catches : " + (str(Catches)) + " | Fish Catches : " + (str(Fish_Catches)))
        if GoodPoke == 1:
         await channel.trigger_typing()
         await asyncio.sleep(0.125)
         happy = ["gg", "nice", "that's nice", "ooh yeah", "pog", "poggers"]
         await channel.send(random.choice(happy))
        await asyncio.sleep(8.4)
        await channel.trigger_typing()
        await channel.send(";p")

   elif (status('broke') != -1):
    if (after.channel.id == channelid_fish):
        fishchannel = client.get_channel(channelid_fish)
        Fish_Catches += 1
        await asyncio.sleep(21.5)
        await fishchannel.trigger_typing()
        await fishchannel.send(";f")

    elif (after.channel.id == wildchannelid):
        channel = client.get_channel(wildchannelid)
        Catches += 1
        await asyncio.sleep(8.5)
        await channel.trigger_typing()
        await asyncio.sleep(0.1)
        await channel.send(";p")

client=MyClient() client.run('')

My code has a lot of safety features so it can grind in public channels too, it detects if the embed is the pokemon embed and it is for the user who is using the bot, it stops if anyone else sends a message in the channel, and it has typing trigger too so whenever it sends a message the "____ is typing..." Thing shows up. It also sends random comments upon catching a good pokemon like a shiny or a legendary, it does prb or ub on cheap legendaries. It can fish but in different server as fishing and ;p decreases a lot of speed if done in same server.

Ok thanks for the snippet, but if it's that easy why didn't you share your solver with us (no sarcasms I can't do it and don't have time nor will to try again) ? I don't see any captcha handling nor solving feature in it... Your code looks usable, some hard-coded IDs aren't a good idea, use a parsing arguments lib. I also see that discord.py-self looks amazing and could have been much easier than selenium if I known about it.

P.S When you share code, share it inside a code block : [triple backtics]py Your code [triple backtics]

Barryloa commented 2 years ago

https://azcaptcha.com/demo I found this website here you can upload an image then it solves the captcha for you. You just have to find a way to upload the captcha on this website then send the result on discord. This site has recaptcha :/ But there is an extension named buster which can solve re captcha

Yeah so I finally made a captcha solver using azcaptcha api. Its accuracy is 60-65%. But you can only do 50 captchas with one azcaptcha account after that you will have to make more accounts to continue using their api.

Could you give me your discord ? i woud like to talk to you thanks :)

adrianaryaputra commented 2 years ago

If you want to do it properly,, you need the paid version captcha solver API. quite easy to do, but,, it is not worth to pay like 30$ a month for this game imho.

vic1707 commented 2 years ago

1h40 before having to make a new account isn't worth it to my eye... Feel free to upload your code as a git repo I'm sure many would be pleased to try it out ^^