Looking for help to trigger a button

Well we want to try to make something that would trigger a press on this button while im on sro client
anyone has tips?
image

When should the button be triggered?
You could trigger it based on an opcode.

when i want to :sweat_smile:

Didn’t I reply to this exact thread already?

Sure u did but that way it would be like pc based plugin the plungin would work if u config the pc as I understand

By ingame chat it’s an easier way, you didn’t learn anything about xControl?

from phBot import *
import struct

# Avoid issues
inGame = False
CLIENT_CHAT_REQUEST = 0x7025

# Called when the bot successfully connects to the game server
def connected():
	global inGame
	inGame = False

# Called when the character enters the game world
def joined_game():
	global inGame
	inGame = True

# All packets received from Silkroad will be passed to this function
# Returning True will keep the packet and False will not forward it to the game server
def handle_silkroad(opcode, data):
	if inGame:
		if opcode == CLIENT_CHAT_REQUEST:
			if data[0] == 1: # All chat
				index=2
				messageLength = struct.unpack_from('<H', data, index)[0]
				index+=2 # messageLength
				message = struct.unpack_from('<' + str(messageLength) + 's', data, index)[0].decode('cp1252')
				if message == "TEST":
					TEST_clicked()
					return False
	return True

def TEST_clicked():
	log("Plugin: TEST button triggered!")
1 Like

In game chat wont do. Btw i never used xControl