vivinano / MudaeAutoBot

python bot that uses strictly the **Discord API** to Roll,Claim,and Kakera Snipe in Mudae. 5/10/21 project converted over to discum library
Apache License 2.0
152 stars 49 forks source link

Bot not acknowledging when wish is rolled. #50

Closed FxDvRV closed 3 years ago

FxDvRV commented 3 years ago

Hello, after testing whether or not the bot works with a minimum of 10 kakera, and a minimum of 50 kakera, the bot works perfectly fine. However after changing the minimum kakera to 400, and someone above that being rolled (also on the "namelist" and my wishlist) the bot did not acknowledge or make any attempt to claim it. Any idea what went wrong?

vivinano commented 3 years ago

so there a claim window so if the bot has already successfully made a claim or a Claim not available message is shown then everything will be ignored

basically anytime you start the bot there is no claim window set but it the bot is running gets a claim window set then its gonna ignore things until you are able to claim again

FxDvRV commented 3 years ago

I had a claim at that time, if that's what you mean

vivinano commented 3 years ago

alright did it have wished by @FxDvRV in the header ?

FxDvRV commented 3 years ago

Yup, my wishes were public, the name was also in my "namelist" and it was above the minimum kakera value.

vivinano commented 3 years ago

did you roll and get an instant snipe or was it someone else roll and he instant sniped it ? because there is a function that checks if its already claimed then it knows that it has already lost the race and ignores the snipe

FxDvRV commented 3 years ago

The thing is, I wasn't at my computer when it happened, which is the annoying part because I can't tell you any specifics. Also, isn't there a way to make it so the bot is always faster?

vivinano commented 3 years ago

image

so this is the part of the way that snipe time is calculated

but basically mudae is kinda slow and dumb and if it is to fast then mudae doesnt know that u added a reaction and then there also snipe protection so it has to be slow enough to bypass the snipe protection but fast enough to snipe the character

there several factors I've tried to minimize alot of these factors but overal

there is program execution time >> Discord API interaction time >> Mudae Interaction time

I only control the 1st

image

there is a time.sleep at the end of that to kind of add a .5 global sleep mode to that in terms of instant snipe cases so it doesnt fall through

FxDvRV commented 3 years ago

What's the snipe protection time? Does the roller get some sort of priority or something? And what time would you recommend I use?

vivinano commented 3 years ago

well it depends on what togglesnipe you play on

on certain modes there a window where only the roller can get it or wisher can get it

most of that time management is taken out of your thoughts from using the $settings command so it takes all that optimization out of your mind

image

the only thing u can really change is the time.sleep(.5) just to take out that wait time but it also chances sniping to fast and causing mudae to say to fast

FxDvRV commented 3 years ago

Oh, well currently the server is set to default with no restrictions, so that shouldn't be an issue. What speed should I use for this setting?

vivinano commented 3 years ago

uh post the channeldata.txt and let me confirm that just in case

FxDvRV commented 3 years ago

Sure

Server Settings (Server not premium)

· Prefix: $ ($prefix) · Lang: en ($lang) · Claim reset: every 180 min. ($setclaim) · Exact minute of the reset: xx:23 ($setinterval) · Reset shifted: by +0 min. ($shifthour) · Rolls per hour: 10 ($setrolls) · Time before the claim reaction expires: 30 sec. ($settimer) · Spawn rarity multiplicator for already claimed characters: 2 ($setrare) · Server game mode: 1 ($gamemode) · This channel instance: 1 ($channelinstance) · Slash commands: enabled ($toggleslash)

· Ranking: enabled ($toggleclaimrank/$togglelikerank) · Ranks displayed during rolls: claims only ($togglerolls) · Hentai series: enabled ($togglehentai) · Disturbing imagery series: enabled ($toggledisturbing) · Rolls sniping: 0 ($togglesnipe) · Kakera sniping: 0 ($togglekakerasnipe) · Limit of characters per harem: 8100 ($haremlimit) · Custom reactions: no ($claimreact)

· Kakera trading: disabled ($togglekakeratrade) · Kakera calculation: claims and likes ranks (and number of claimed characters) ($togglekakeraclaim/$togglekakeralike) · Kakera value displayed during rolls: enabled ($togglekakerarolls) · $kakeraloot wishprotect: enabled ($togglewishprotect)

vivinano commented 3 years ago

alright so there only a .5 sleep from

image

you can either remove that line entirely and have it just deal with no sleep time and try to react super fast as state with the comment

Anarchy FTW

or keep that sleep and change the value lower like .1 or .05 its all personal preference

but keep in mind mudae might not register that you have reacted

if you wanna think about it in like simple terms its like if you took a barcode and just really quickly tried to scan it in selfcheck-out by pushing it thru the scanner its probably won't register that you scanned the item

FxDvRV commented 3 years ago

Keeping the sleep time of 0.5, what would you say the lowest claim delay setting could be that will still allow for consistent claims (so not too fast that it won't register)

vivinano commented 3 years ago

I haven't tested it in a live server so its up to how competitive your server is to be honest you can try with maybe .1 and go lower or higher from there but idk mudae sometimes doesn't respond me and a friend had a small laugh over the bot being to fast for mudae at one point hence for the time.sleep

FxDvRV commented 3 years ago

Oh, 0.1 isn't too fast? I read somewhere on the main page that you should leave 1 second minimum or something. I'll try something like that for now though.

vivinano commented 3 years ago

that was for the older discord.py version cause it was async and was even faster lol

FxDvRV commented 3 years ago

Ah okay, i'll try it out then.

FxDvRV commented 3 years ago

Closing for now, I think that problem was a one time thing

vivinano commented 3 years ago

was in during a claim window ? so it is programmed to ignore even if condition is true IF the bot has already claimed something successfully

FxDvRV commented 3 years ago

Yup, I most definitely had a claim.

vivinano commented 3 years ago

when was it the bot last did a successful snipe ? and when was this character rolled ?

FxDvRV commented 3 years ago

The bot has successfully sniped 100% of the time in my test servers, with it following the rules I set. However in my main server it has failed to claim both times, however it successfully reacts to kakera 100% of the time on all servers.

and when was this character rolled ?

I'm not sure what you're asking here sorry

vivinano commented 3 years ago

so does it print ? or doesnt print

FxDvRV commented 3 years ago

print...? I'm so sorry I'm not understanding what you mean

vivinano commented 3 years ago

does it print out "character found" or does it does it not print anything

FxDvRV commented 3 years ago

The character found acknowledgement isn't printed, it does however properly notice when someone is rolled by printing the "someone else rolled" message

vivinano commented 3 years ago

if it isnt printed then that means you are out of the claim window

FxDvRV commented 3 years ago

What do you mean by out of the claim window?

vivinano commented 3 years ago

image

so if nothing is printed then that means that it happened to be outside of the claim window so the bot thinks that is is unable to claim and wont attempt to "log" that something was found

I guess do a search on the server its been missing and do

(Username) from:Mudae

FxDvRV commented 3 years ago

I 100% had a claim then, it reset just minutes prior to being rolled. Both times actually, I 100% had a claim ready.

vivinano commented 3 years ago

send me the screen and feel and let me see the time stamps

FxDvRV commented 3 years ago

With a lowered minimum kakera, I've confirmed it works on the main server, something musth ave just happened those times.

vivinano commented 3 years ago

the only reason i can see is if there was a claim window set inaccurately i will leave it running on my server and see if it claims after then claim window and all that

FxDvRV commented 3 years ago

Okay thanks. How does it actually detect the claim window? It's not waiting 3 hours after I last claimed right? It actually knows when the reset is?

vivinano commented 3 years ago

no it does calculation for the time window

vivinano commented 3 years ago

so The only thing i can think of following my codes logic

is that something set your claim window improperly maybe your claim timer is set because of a kakera timer let me see the logic

vivinano commented 3 years ago

can u show me if you got a kakera wait timer by any chance ? before the character rolled ?

FxDvRV commented 3 years ago

I'll try find out if I had a kakera react available when the character was rolled then. (Assuming that's what you mean.)

FxDvRV commented 3 years ago

Yep, can confirm I had enough kakera power to do a react at the time the character was rolled.

vivinano commented 3 years ago

so there is nothing starting with ur username that has a timer ? that could possible set the window incorrectly ?

FxDvRV commented 3 years ago

Yup, nobody in the server has anything remotely close to my username, and at that moment I had both claim and kakera timers up guaranteed.

vivinano commented 3 years ago

which checks did it pass ? name and kakera right ?

FxDvRV commented 3 years ago

Sorry, what do you mean by that?

vivinano commented 3 years ago

so this character was in ur name list and kakera ?

FxDvRV commented 3 years ago

Out of the two that the bot missed, one of them was in name list and above kakera minimum, the second one was only above the kakera minimum.

vivinano commented 3 years ago

for the name one send me the picture of the character and its name in your name list and i guess the 2nd one also trying to see if there is something special about those that they failed

Edit: Currently also running the bot to see if the waifu window is setting correctly

FxDvRV commented 3 years ago

I might have figured it out. During both times, I had the error where it says failed to find $settings for channel xxxxx (the channel where they were rolled). But then on the next line it said "Reading from File for channel xxxxx" so I assumed it was fine, but maybe it wasn't working after all and that's why?

vivinano commented 3 years ago

ah so if it fails to find any setting for a channel that channel is removed from the list of channels it monitors so yeah that means it not longer is looking at that channel

if you search $togglehentai from:Mudae do you not have settings instance ?

vivinano commented 3 years ago

image

if something like this doesnt appear up then there is no setting then its get removed from the list as it doesnt have the variables to work off of.

The file reading was added later so for those servers without settings you could set up the special instance of your server based off setting for other servers via a simple copy paste with a rename