can i shorten its time ? default 500ms can i make it like 200ms ?
Don’t think so.
You can make your own timer in Python.
Done it like
Timer(0.2,npcKontrol).start()
But not working sometimes.
İts feels like its working but waiting to show result arter 200ms .
from phBot import *
import phBotChat
import QtBind
from threading import Timer
kontrol = False
gui = QtBind.init(__name__, 'Click TEST')
button1 = QtBind.createButton(gui, 'deneme', 'Button', 10, 125)
def deneme():
global kontrol
kontrol = True
zamanli()
button2 = QtBind.createButton(gui, 'deneme2', 'Button', 100, 125)
def deneme2():
global kontrol
kontrol = False
zamanli()
def zamanli():
global kontrol
if kontrol == True:
log('oldu')
else :
phBotChat.Party('Özgün mal')
Timer(0.250,zamanli).start()
Dont mind code i am just showing an example
You probably don’t want to spam chat that fast lol
İ wish to spam for 2 seç
According to your last comment, if you want to do it 2 seconds, just put a counter and once that counter value is 4, run your code. And once you finished running your code, reset counter. For example, if you want to send a message every 5 seconds, simply divide 5000 / 500 and you get 10.
But if you want to do it every 200ms, you just have to write your custom “event_loop()” function with Python and it shouldn’t be too difficult.
thx bro already sovled