Check job_name what is in data

I want to check what the profession of the character is while trading, but I couldn’t find the code

elif msg == “CB”:
character = get_character_data()
if character[‘job_name’] == ‘Trader’:
if set_training_script(“CBLinen.txt”):
log(“Constantinopleda Mal Alınıyor”)

is dont work bc help @Ryan @JellyBitz

i need check job type trader or hunter

That gives you job name not type…

When you say job name, do you know what is defined in it? And what should I do to get him which profession it is, because while traders are buying goods, hunters should not try to buy it either. @DeRidder14

Job name is whatever you gave it… just like your char name. I don’t think there’s any api for finding the job type

Thank you . do i have a chance to do that api because i need to exclude hunters from this command or do you have any idea for that, to exclude hunters from command

Also, aren’t JellyBitz and Ryan answering threads anymore?

What I’m not good enough for you?

Just define which of your chars are hunters… you can’t have that many chars

how do i define it , When I type the command from the general chat, the hunters get into the loop and are constantly walking between two locations because there is no pet. @DeRidder14

Just add a list inside your plugin with all your traders names… keep it simple.

You can use what you have just check the job_name against that list instead of ‘Trader’

ok ty so much

hey u here
i need adapting this code to xcontrole

def inject_pick(id, tradeGood):
packet = b’\x01\x02\x01’ + struct.pack(‘I’, id)
inject_joymax(0x7074, packet, False)
log(‘Plugin ‘+pName+’: Picked up "’+tradeGood[‘name’]+'" ')

def pick_loop():
if not 0 == len(tradeGoods):
timer = Timer(0.5, pick_loop)
itemTuple = tradeGoods.popitem()
id = itemTuple[0]
tradeGood = itemTuple[1]
x = tradeGood[‘x’]
y = tradeGood[‘y’]
move_to(x, y, 0.0)
log('Plugin ‘+pName+’: Moving to X: ‘+ str(x)+’ Y: '+ str(y))
inject_pick(id, tradeGood)
if(0 == len(tradeGoods)):
log(‘Plugin ‘+pName+’: Finished picking trade goods.’)
global isRepicking
isRepicking = False
log(‘Plugin ‘+pName+’: Could not pick all item, start picking again.’)