def test_runLoop(): q = Queue() s = Event() s.set() lbl = slavewg.LootBlackLotus(s, q) lbl.do(lbl.pos_winterspring_mountain)
# coding:utf-8 import time from queue import Queue, Empty from threading import Event, Thread import slavewg stoped = Event() tasks_queue = Queue() # 要执行的脚本 ads = slavewg.Ads(stoped, tasks_queue) ads.start() lbl = slavewg.LootBlackLotus(stoped, tasks_queue) lbl.start(lbl.position['东泉谷山顶贼黑花']) # # 潜行 # sneak = slavewg.Sneak(stoped, tasks_queue) # sneak.start('=') # fw = slavewg.Tabinterval(stoped, tasks_queue) # fw.start('b', 60 * 4) def run(): time.sleep(5) while not stoped.wait(0.1): try: func = tasks_queue.get(timeout=1) func() except Empty: