# Called for specific events. data field will always be a string.
def handle_event(t, data):
if t == 5: # EVENT_RARE_DROP (equippable only)
item = get_item(int(data))
# Your code here
log('Drop: [Rare] '+item['name'])
elif t == 6: # EVENT_ITEM_DROP (equippable only)
item = get_item(int(data))
# Your code here
log('Drop: '+item['name'])
If that don’t cover your necessities, then try to parse pick up packet …
Also, I think you can find easily how to create your own loops. You can use Timer (easier but limited) threads or event_loop (with a counter as global to trigger your conditions)
Example with:
- Timer : Attendance Registration - #3
- Thread : [Plugin] ItemManager - #2 by diefrucht
- event_loop : [Plugin] xChat - #8 by JellyBitz
Or a new one using variables to trigger your function as switch, using even_loop btw… I don’t like it but is good to have in mind : Character Select / Creator - #44 by mikail123