toddw123 / RotMG_Clientless

Compatible with version X16.0.0
MIT License
11 stars 4 forks source link

Created new branch "dailylogin" #28

Closed toddw123 closed 7 years ago

toddw123 commented 7 years ago

Created a new branch and already have it working. The dailylogin branch is just for claiming the daily login rewards.

It will run through as many clients as you have in the settings (i might make it run through them one at a time, but right now it doesnt). First it checks if they have claimed the reward for the day, if not it will login the client in, go to the quest room, and attempt to claim the reward(s) it needs. Once its claimed it exits that client. Ive tested with a few clients so far and its working great. About to test will all my mules.

I also am not 100% sure on the daily reward xml structure for each client, so it might not work tomorrow when the values change in it, but ill keep my eye on this until i know its working without issues.

So enjoy! Automatic daily rewards are here!

ebf34e12952930cf commented 7 years ago

Lol, just finished mine too https://github.com/BlackRayquaza/RotMG_Clientless/commit/71df614189867e4ac51113c565f761701762167c, probably not the prettiest solution though

toddw123 commented 7 years ago

Yeah very similar to the one I just pushed. Except I have mine not doing anything until the first NewTick packet, and a little more logic in it from what I can see.

Anyone reason you changed the packet helper from delete[] back too free()?

ebf34e12952930cf commented 7 years ago

didnt actually do that, weird.

toddw123 commented 7 years ago

Lol weird.

So any idea what the XML attribute values of "days" refers to? In my logic I have it assuming that it means the day you can claim, but since today is the 1st i can't really confirm or deny this logic lol

toddw123 commented 7 years ago

I just pushed a change so it will run through clients one by one. It also verifies a server is up before it adds it to the server map, and then it uses the first server thats up for all the clients. This + having to get an additional xml resource from the server slows down the loading function, i could probably change it to stop checking servers as soon as it finds one that is up instead of checking all of them.

I also have it attempt to reconnect up to 3 times if the client gets an account in use error (i sometime get this error when the server is lagging). But if it gets the failure 4 times it will just stop because i dont want it waiting up to 10 minutes when its running just one client at a time.

Just ran through my entire muledump account list, like 200 accounts, about 96% successfully claimed both rewards. I might just set this up on my windows scheduler and have it run every morning at like 3-4am and then a second time at like 11pm to catch any accounts to failed the first time. Im surprised deca is actually giving out free character/vault slots. I could have a a fuck ton of mule accounts with multiple character/vault slots!

Other then verifying that the logic i have in place in regards to the fetchCalendar xml's values, this branch probably wont get any more changes unless deca makes some changes to the process.

jalius commented 7 years ago

FYI: Todd, i know you are running a login service, you dont actually have to get each reward every day, you just have to claim them before the cycle ends. So you could save yourself some time by just logging in every day for 29 days, then on the 30th day run claim rewards. This is just based on some accidental testing I did just now on my bot accounts, turns out they have the claimkeys for previous days.

toddw123 commented 7 years ago

Interesting. Are you sure of this? I have been under the impression that you have to claim that day otherwise it won't allow the next reward to be claimed. Ie, you have to claim the reward everyday.

As of right now I haven't heard from anyone interested in the service, im mostly just checking if anyone is interested since I have the tools available to do it with ease. It would be easy for me to do it either method though, but would be interesting to see if it works the way you mention or not.

jalius commented 7 years ago

Pretty sure it works, however, haven't been able to access http://realmofthemadgodhrd.appspot.com/dailyLogin/fetchCalendar recently to confirm or deny it. Getting: Error: Server Error

The server encountered an error and could not complete your request.

I have been under the impression that you have to claim that day otherwise it won't allow the next reward to be claimed. Ie, you have to claim the reward everyday.

I assumed the same, but it seems that just a login is enough.

Give it a shot on your accounts, I'd like to hear back. Also curious about what happens if you reach the end of the calendar but do not claim? Does the calendar just reset on you? And does the 7 day calendar reset every 7 days? or every time deca feels like updating the calendar.

EDIT: Pretty sure I've confirmed that just a login is required for you to receive a for that day. I have 2 consecutive keys and 2 nonconsecutive keys filed in my /dailyLogin/fetchCalendar under the corresponding day. So that is cool. Now wondering, what happens to my consecutive keys if i miss a day?

toddw123 commented 7 years ago

Yeah I can confirm that it lets you claim previous day's. So that's interesting.

Also about the XML giving you an error, I've noticed that if I try to access the fetch calendar URL without having a hit to the char/list for the account within like a couple hours period it will give me an error. But if I hit the char/list and then go back to the fetch calendar it works. So you can try that out if you get the server error

toddw123 commented 7 years ago

And yes I also am wondering about the consecutive part of this. I've modified the code to collect all keys and claim all available rewards regardless. This way if there are keys for previous day's available it will grab those. I haven't pushed this yet as I'm still in the process of cleaning it up so I'll get that pushes sometime tomorrow