Hi all, I am trying to implement a timer in a while loop to put a time limit in Guild accept war declare. I need to execute the loop 1 time every second so it must be delayed by the timer object.
But if I try
or
i get an error from client, says
If I user time.sleep(1) then the game freezes, so it don't work.
Is there any way to add the threading module in the client libs? I believe that metin2 runs on Python 2.2 which by default does not have the threading module.
Thanks
Code:
def __GuildWar_OpenAskDialog(self, guildID, warType):
#code
#code etc
time = 31
while time > 0:
chat.AppendChat(chat.CHAT_TYPE_INFO, "Remaining %s seconds." % (time))
self.t = threading.Timer(1, __somedef)
self.t.start()
time = time -1
But if I try
Code:
import Threading
Code:
from threading import timer
Code:
no module named 'threading'
Is there any way to add the threading module in the client libs? I believe that metin2 runs on Python 2.2 which by default does not have the threading module.
Thanks