Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 19:17

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

Advertisement



Pythonscript bricht ab!?

Discussion on Pythonscript bricht ab!? within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2010
Posts: 18
Received Thanks: 1
Pythonscript bricht ab!?

Hey hab mal wieder ein Problem mit Python, genauer der OnUpdate. Und zwar stellt folgendes Script nach ner gewissen Zeit die Arbeit ein. Ich habe versucht was einzubauen, das den client killt und ihn dann neugestartet, was auch das gewünschte ergebnis erzielt(das script arbeitet wieder) aber nicht die endlösung sein kann weil ich eben Metin immer neu aufrufen muss. Entfert man den teil, stellt es nach etwas mehr als einer Stunde die arbeit ein. Hat jemand ne Idee woran das liegen könnte und wie ich das beheben oder umgehen kann?
Code:
import ui
import game
import chat
import time
import player
import net
import event
import shop
import chr
import time
import thread
import constInfo
import background

timeskip = 0
time_old = int(time.strftime("%H%M%S"))
time_verz = 10
time_verz2 = 3400
time_old2 = int(time.strftime("%H%M%S"))+time_verz2

class switchhelper(ui.ScriptWindow):

    def __init__(self):
	ui.ScriptWindow.__init__(self)
	self.OldRecv = game.GameWindow.OpenQuestWindow
	chat.AppendChat(1, "Switchhelper")

    def __del__(self):
	ui.ScriptWindow.__del__(self)

    def Destroy(self):
	self.Hide()
	return TRUE

    def InstallQuestWindowHook(self):
	game.GameWindow.OpenQuestWindow = self.HookedQuestWindow
	chat.AppendChat(1, "Quest Window wurde erfolgreich gehooked.")		

    def UnHookQuestWindow(self):
	game.GameWindow.OpenQuestWindow = self.OldRecv
	chat.AppendChat(1, "Quest Window Hook wurde entfernt.")

    def HookedQuestWindow(self, skin, idx):
	pass

    def rebuy(self):
	if player.GetItemCountByVnum(71084) <= 400:
	    net.SendShopBuyPacket(6)

    def yangspeicher(self):
	if player.GetMoney() <= 6000000:
	    self.quest()
	else:
	    self.shopopen()
	    self.rebuy()

    def quest(self):
	global timeskip
	if timeskip == 2:
	    event.SelectAnswer(1, 0)
	    self.UnHookQuestWindow()
	    timeskip = 0
	if timeskip == 1:
	    for Slot in xrange(player.INVENTORY_PAGE_SIZE * 2):
		ItemValue = player.GetItemIndex(Slot)
		if ItemValue == 91805:
		    net.SendItemUsePacket(Slot)
		    timeskip = 2
	if timeskip == 0:
	    self.OldRecv = game.GameWindow.OpenQuestWindow
	    self.InstallQuestWindowHook()
	    timeskip = 1

    def shopopen(self):
	if shop.IsOpen() == 0:
	    self.open()

    def open(self):
	for vid in range(100000):
    	    if chr.IsNPC(vid) == 1 and chr.GetNameByVID(vid) == "Schatztruhe" and player.GetCharacterDistance(vid) <= 600:
	        net.SendOnClickPacket(vid)

    def OnUpdate(self):
	global time_verz
	global time_old
	global time_verz2
	global time_old2
	if time_old2 <= int(time.strftime("%H%M%S")):
	    if net.IsConnect() == 1:
		app.Abort()
	    time_old2 = int(time.strftime("%H%M%S"))+time_verz2

	if time_old <= int(time.strftime("%H%M%S")):
	    self.yangspeicher()
	    time_old = int(time.strftime("%H%M%S"))+time_verz

start = switchhelper()
start.Show()
Schonmal vielen dank mfg Arya

niemand ne Idee?

niemand ne Idee?
AriaSwitkona is offline  
Reply


Similar Threads Similar Threads
pythonscript.py
12/26/2013 - Metin2 - 2 Replies
Hi! Can someone please do a Step-By-Step on how to make a pythonscript that works in Metin? For example a energybot... Thanks! :handsdown: Happy Holidays!
[Release] DaRealFreak Skill & Autopot Pythonscript
07/21/2013 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 2 Replies
Joa... das ist sein unvollendeter Levelbot, den man gut für Selfbuff + Autopotting verwenden kann. Man sollte die .py allerdings erst ingame laden, ich glaub als logininfo buggt es.
Multimod Pythonscript by DaRealFreak
07/05/2013 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 23 Replies
Hallo Com, Ich hab mal ein wenig nach einem Pyhonscript gesucht und bin dabei auf ein "all-in-one script" gestoßen, das ich gern auch hier sharen würde. Vielleicht kann's ja jemand gebrauchen. Ich persönlich finde es perfekt als Zusatz für Kamer's Client Mod. Funktionen Chatspammer Whisperspammer Inventory Manager
Internet bricht ab.
05/12/2013 - Technical Support - 22 Replies
Jo Leute, habe folgendes Problem seit kurzem bricht bei mir mein Internet einfach so ab und kommt dann mit gelben Ausrufezeichen wieder. http://i.epvpimg.com/hkUtf.jpg *Bild aus dem Internet* So bleibt es auch die ganze Zeit habe auch eine Problembehandlung durchgeführt und es kommt irgendwas mit das, dass Netzwerkkabel nicht richtig angeschlossen ist obwohl ich einen WLan Stick benutze den ich nun auch gewechselt habe, jedoch ohne Erfolg. Bei meinem Laptop habe ich keine Probleme, dort...
PC bricht ab
07/17/2012 - Technical Support - 6 Replies
-



All times are GMT +2. The time now is 19:17.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.