Current buff list + change bot settings

I will try to check dont attack setting when specific buff is not in the list, or the person who give that buff is not in the training area.
How can i get active buff list? What is the opcode? Maybe checking the player more easier but still that opcode can be usefull.
And how can i change bot settings from a plugin?

Getting active buffs is pretty complicated. You have to track not just if the buff was cast on you but how long until it expires and also if it was “ended” in some way earlier than the expiration.

1 Like

I thought that there can be an opcode for the list. Okey its not problem, next question, how can i change the bot setting? İ should tick and untick “Don’t attack monsters” option

You can’t do that from a plugin.

You can change settings using profiles. See more here.

You will need to make a copy from your original settings, use set_profile() to change to temporal setting, edit the original (using json), and get back to load the original (edited) setting profile.

2 Likes

That would work but you can’t directly change the settings.

What do you suggest @Ryan?

Thanks for your suggestion by the way, if i cant find less complicated and easy solution, probably i will do that

Set up multiple profiles as suggested by @JellyBitz then create a plugin to swap profiles if the specific player is not in the party.

Edit: By the way there is a buff list for “player in party” and “player not in party”.

1 Like

I think you did not understand the scenario, for example if warrior give me pain qouta then i should attack, and if not (warrior in town for example) than stop attacking

You can’t do that unless I add an API for retrieving active buffs.

so, will you ?? :slight_smile:

I don’t see why not.

1 Like

İ ask you for a function to see statistics page’s values and you did not :slight_smile: thats why i asked like that :slight_smile:

It’s too much work to do that.

okey no problem, im waiting for the buf list then

get_players() returns None why is that ?

Was the API for getting current buff list ? I checked the API site but couldn’t seem to find it.