Open Source API & Scrapbook Helper

Was auch immer an Tools für Shakes&Fidget aufkommen, hier können sie vorgestellt werden.
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Open Source API & Scrapbook Helper

Beitrag von marenga »

API

If you want to build a tool to communicate with the Shakes and Fidget servers, you need to have an API, that handles the communication. Whatever the mfbot uses to do so is not open to the public and as far as I know, there is no other community API. As such, I made my own:

https://github.com/the-marenga/sf-api

This should allow you to build everything from a script to update your charcter description, up to a fully fledged Shakes and Fidget Bot without ever having to think about the horrible S&F Server encoding. I will try to keep the API up to date, but feel free to open a Github issue, if anything needs to be updated, or is otherwise broken, or missing.


Scrapbook Helper

With this, I also built a tool to quickly fill the scrapbook, by showing you players with the most not yet collected items. Feel free to give it a try:

https://github.com/the-marenga/sf-scrapbook-helper

Bild
Zuletzt geändert von marenga am So 10. Mär 2024, 17:19, insgesamt 2-mal geändert.
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag (Insgesamt 9):
DasAoD (Mo 8. Jan 2024, 06:45) • Bossi (Mo 8. Jan 2024, 14:24) • wxclxr (Mo 8. Jan 2024, 19:58) • neuhier (Sa 13. Jan 2024, 16:47) • extensaria (Fr 19. Jan 2024, 07:28) • Quax (Sa 17. Feb 2024, 10:01) • good idea (Sa 24. Feb 2024, 18:03) • DrexXxus (Di 26. Mär 2024, 19:04) • CinExPL (Mi 24. Apr 2024, 00:03)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

I'll test it this afternoon/evening. 😃
Thanks for sharing. 👍
Folgende Benutzer bedankten sich beim Autor DasAoD für den Beitrag:
Bossi (Mo 8. Jan 2024, 14:25)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

First of all, a big thanks for this program.

Here's a short update from me.

Srapbook Helper runs fine under Windows 10.
Login via SSO (S&F account), as well as via the normal login (character name + password), works.
Manual and automatic attacks also work without any problems.
Scrapbook Helper Windows 10.png
Scrapbook Helper Windows 10.png (242.84 KiB) 3022 mal betrachtet

Unfortunately, I can't get Scrapbook Helper working under Windows 11.
Even with deactivated real-time protection of the Defender and with various compatibility modes, the program would not start.
Scarpbook Helper Windows 11.png
Scarpbook Helper Windows 11.png (138.22 KiB) 3022 mal betrachtet
The window remains empty and shortly afterwards the program hangs.

Is there a short "guide" for the settings?

Crawl threads = Means what? (Maybe I'm just a bit stupid. :lol: )
Max target level = is self-explanatory
Pause Crawling", "Start Crawling" and "Auto Battle" are also self-explanatory.

What exactly do the last three buttons do?

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

Don't forget; if you run the bot, it's best to log out of the character while the scrapbook helper is crawling.

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

Update:
I was able to start the program on another Windows 11 PC without any problems.
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: Open Source S&F API

Beitrag von marenga »

Big thanks for the extensive testing!

The windows 11 issue is very weird. I tested the tool on both my main win11 machine and a somewhat fresh install and both worked fine immediately. There might be some issue with the UI framework I used or something, I will have a look into that to try and fix it.

Crawl threads is the amount of s&f accounts, that get created/registered in the backgound to fetch the Hall of Fame. I think that is also what CrawlerNG does to make sure your main account does not get banned for sending a million requests. If you feel like the crawling is too slow, you can increase that value up to 10 to ~10x the speed. In theory you could go even higher, but I do not want someone to fill up the server with a million junk accounts.

Backup HoF saves the current crawling progress of that server to disk, so that you do not need to refetch the entire hall of fame each time you restart the program (with another account on that server). Restore HoF is the button to then load that file to restore the crawling progress. Export player just writes all data the api knows about the current player (level, dungeons, etc.) to disk. Around 12000 lines of json for my accounts. This is just for curiosity, or progress tracking I guess.

But yeah, I should probably just have some sort of simple guide what the buttons do on the page, and/or just explain them in the tool itself.

Thanks again for checking it out!
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag:
DasAoD (Mi 10. Jan 2024, 16:45)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

Hi marenga.

Thank you for the explanation. (y)

Now I understand what all the buttons are for.

I started the program on my Windows 11 PC with the admin account. I was able to run it without any problems, just like on another Windows 11 PC with a normal user account. (y)
This could also be due to some settings on my PC. :|

The MFBot runs on a laptop, so I will mainly start the Scrapbook Helper on this.
Maybe I'll also find out why the helper won't start on my Windows 11 machine if I don't start it as admin.

In the meantime, I wish you a good night ;)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

Little Update:

I've now tried to save the .exe in different locations, which always resulted in the same error.
However, as soon as I copy the .exe to the desktop or create a shortcut there, I can start the program without any problems, regardless of where I have saved the .exe.
Very strange. :lol:
Bossi
Beiträge: 21
Registriert: Sa 28. Sep 2019, 14:53
Hat sich bedankt: 9 Mal
Danksagung erhalten: 7 Mal

Re: Open Source S&F API

Beitrag von Bossi »

Hello and thank you for your great work.
I have a question if there is the possibility to export the found counterparts of the Scrapbook Helper in the format as the Mfbot needs them. For example Playername1/Playername2/Playername 3/ and so on.
Because unfortunately the Scrapbookhelper does not automatically attack the opponents when the bot is running in the background, it only works when the bot is not running.
Thanks again for the work already done.

Best regards Bossi
Folgende Benutzer bedankten sich beim Autor Bossi für den Beitrag:
DasAoD (Mi 10. Jan 2024, 16:17)
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: Open Source S&F API

Beitrag von marenga »

Sure, that should be pretty simple to do.

- You would want the minimal amount of players necessary to fill the scrapbook, with the max level filter applied, right?
- Do you think export to a file, or copy to clipboard would be a better export option for your use case?

On a side note, I think it should technically also be possible to have the bot and the helper runnig at the same time. They would just end up "fighting for control", which would be pretty noticeable on the server side
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag:
DasAoD (Mi 10. Jan 2024, 16:17)
Bossi
Beiträge: 21
Registriert: Sa 28. Sep 2019, 14:53
Hat sich bedankt: 9 Mal
Danksagung erhalten: 7 Mal

Re: Open Source S&F API

Beitrag von Bossi »

Thank you for your quick response. I think a copy to clipboard should be the most elegant solution. And yes the sorting as the tool already does is a great solution.
I thought it would probably be conspicuous if the Scrapbook Helper and the MFBot were constantly fighting over logging in.
I think if the export function is still implemented, the tool should be usable for all use cases (either battles via the Scarpbook Helper itself or otherwise via the MFBot).

Thanks and Greetings Bossi
Folgende Benutzer bedankten sich beim Autor Bossi für den Beitrag:
DasAoD (Mi 10. Jan 2024, 16:17)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

I haven't thought about this export function yet, as I have a different problem for the moment. ;)

Another thing that just occurred to me.
On servers that are soon to be merged, the new address is already displayed next to characters after logging in via SSO.
Is this how the addresses are retrieved from the server?
Scrapbook Helper fusion server.png
Scrapbook Helper fusion server.png (4.12 KiB) 2766 mal betrachtet
Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 24 Gäste