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 ); }