Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 00:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP]Threading and Timer Object in Python script

Discussion on [HELP]Threading and Timer Object in Python script within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 25
Received Thanks: 8
[HELP]Threading and Timer Object in Python script

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.


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
or
Code:
from threading import timer
i get an error from client, says
Code:
no module named 'threading'
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
FSXraptor is offline  
Old 06/02/2012, 18:33   #2
 
elite*gold: 0
Join Date: Mar 2010
Posts: 25
Received Thanks: 8
up
FSXraptor is offline  
Reply


Similar Threads Similar Threads
[Turkish-Made(2)]Mini Python Script
03/25/2012 - Metin2 PServer Guides & Strategies - 19 Replies
Hi, Mini Python Script - YouTube How to: Open root.epk&eix, uichat.py: Search: __SendTalkingChatPacket(self, text): change: def __SendTalkingChatPacket(self, text):
#Python Countdown Timer bei Du wirst mit dem Server verbunden
08/13/2011 - Metin2 Private Server - 0 Replies
Hallo com wie ihr euch sicher errinern könnt gab es in Crank´s Client diesen Countdown - Timer der beim connecten von 5-0 gezählt hat und dann erst Fehler beim verbinden mit dem Server ausgegeben hat ich habe folgendes Problem ich will so ein script schreiben aber immer wenn ich das tue aktualisiert sich das Du wirst mit dem Server verbunden 5 nicht es wartet 5 sekunden ohne was anzuzeigen und dann springt es sofort in das else statement hier mein Code: else:...
Kab python script
06/08/2011 - Dekaron - 0 Replies
So i got prety much every script 2 fork 4 me except i cant make a script in python castle. My question is does anyone have any working python scripts or any idea how 2 make one.
Edit script in python and add features.
11/23/2010 - Metin2 Private Server - 0 Replies
Hello. Is it to add to this script, python, import serverInfo serverNum=` serverChannel=1 addr_new = serverInfo.REGION_DICT port_new = serverInfo.REGION_DICT account_addr_new = serverInfo.REGION_AUTH_SERVER_DICT account_port_new = serverInfo.REGION_AUTH_SERVER_DICT addr=addr_new
Script for Python to Tomb
03/09/2009 - Dekaron - 4 Replies
Anyoen got the script for going from python to tomb I already have the adresses/



All times are GMT +1. The time now is 00:13.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.