Auto donate Guild Points (GP)

in TRSro you can donate 50 gp’s as you collected

Can you make this automatic @Ryan?

Thanks for your consideration,

Ahmet.

1 Like

You could build some condition to trigger python like:

import phBot
import struct

# Check if has SP to donate to the guild
def DonateGP(quantity=None):
	# If quantity it's not specified, donate all the SP
	if quantity == None:
		quantity = phBot.get_character_data()['sp']
		if quantity == 0:
			return

	# GUILD_SP_DONATE_REQUEST
	phBot.inject_joymax(0x7258,struct.pack('I', quantity),False)

# Donate by using conditions
def DonateGP_All():
	DonateGP()

# Donate by using conditions
def DonateGP_100():
	DonateGP(100)

if ( ... ) { Python ( DonateGP_All ); }

3 Likes

Thank you very much. However I don’t actually know how to inject this code to phbot. Can you please briefly enlight me?

Regards

Ahmet

Copy and paste the code to some text file and rename it with .py extension.
Then drop it to the Plugins folder from phBot and restart it to build the condition.

You’ll need to have installed python from phBot installer.

What do we write in the value of python in the if section?

Are we writing the name of the function? If so, how do we give the parameters?

I have done so, however the bot couldn’t load the plugin I don’t know why.
image
image

@ddkorkut you have to trigger it by condition as jelly say like this
if sp >1000 then python DonateGP_100

but to be clear i have no exp with trigering python with condition
but you can try it

its not a plugin

It is a plugin… there’s just no UI so you won’t see it load.

Thanks for your reply, do you know where I can type if statement to trigger it?

Regards

Condition Tab → Builder

you can also search -----> Conditions

Ah I guess there has been a misunderstanding. We don’t donate sp in TrSro, we donate gp, which increases as you level up. But I’ll try to modify your code. Hope I could do it

1 Like

Could you find a solution for gp donation?

Selam dedekorkut trsro özelinde oto gp bağışa bir çözüm buldun mu?

1 Like

yok hocam olmuyor. Sp bağışlamayı ayarlamışlar, gp değil.

2 Likes

Hey Jelly, how can i get guild points data?

tt

Do I need to examine server packages?

It is a new system? Because GP (Guild Points) normally are the SP (Skill Points) you generated while you are into any guild.

Donating SP (called GP by the UI) is used only to speed this process.

That being said, you can find this from phBot API.
Looking for your own nickname into the guild data.

yes its new system for trsro

i dont need donated gp, i need donatable gp

but its not possible with get_character_data() function

I am trying to ask for support from @Ryan but I could not reach it.

@JellyBitz your API is not solution of this problem. Can U make a plugin for this? FOR Silkroad Online Turkey or New system (GP Donating)

Thank you very much for solution, I used it succesfully on TRSRO.

Do you have any python code to try Academy Accumulated Buff correctly?

https://forum.projecthax.com/t/accumulated-buff-problem/15434/2

2 Likes

nail her yerde varsın :slight_smile: bize adım adım anlatır mısın ? bizde nasiplenelim :slight_smile:

Yes, it’s a new system.
Each time the character levels up, he gains 50 GP
Guild level can only be increased by GP.
It would be nice to have a plugin for this.