SMaloney2017 / Temple-OSRS-Plugin

A RuneLite plugin using the TempleOSRS API.
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

Update Player Data Automatically #1

Closed BarelyFunctionalCode closed 2 years ago

BarelyFunctionalCode commented 2 years ago

Hey, great plugin.

Would there be a way to add a feature to the plugin where it updates your TempleOSRS profile upon login? Something like making a GET request to https://templeosrs.com/php/add_datapoint.php?player=USERNAME.

That way there wouldn't be a need to manually update on templeOSRS. There seems to be a separate plugin that does something similar, but with this being a TempleOSRS plugin I figured it would be a good place to put it.

SMaloney2017 commented 2 years ago

Yea, absolutely!

I originally didn't plan on implementing this since the XP-Updater plugin already exists, but I've been considering adding an option to update fetched players before returning their skilling and bossing gains to avoid the event that the player doesn't exist on Temple.

This could give me an excuse to knock out both of these ideas together.

I'll start on this tonight after work, thanks for the suggestion!

BarelyFunctionalCode commented 2 years ago

Yeah I noticed that in the bottom of your readme file and figured this was a similar thing.

Looking forward to the update! Now if I could just get motivated to fix up my own plugin haha.

BarelyFunctionalCode commented 2 years ago

Also, the XP updater updates TempleOSRS on logout and not login, so maybe it's a better idea to do it on logout.

SMaloney2017 commented 2 years ago

Just finished up implementing the logic to auto-update the local player on logout given an xp-threshold is met and either: