Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2
You last visited: Today at 06:39

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

Advertisement



[Question] Python debugging

Discussion on [Question] Python debugging within the Metin2 forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2016
Posts: 7
Received Thanks: 1
[Question] Python debugging

Hello. I am new to python so if someone can help me, i would really appreciate that. How do you guys debug the python scripts inside metin2? Are you writing in the chat? Is there a better way? How do i debug the exceptions? Thank you very much
Radu97a is offline  
Old 04/22/2020, 22:52   #2
 
elite*gold: 0
Join Date: Nov 2016
Posts: 245
Received Thanks: 147
Code:
import sys, os
f = open('pythonDump.txt','w')
modules_key = sys.modules.keys()
modules_dic = sys.modules
built_in = sys.builtin_module_names
for mod in modules_key:
    if mod not in built_in:
        print >>f,'\n-----MODULE------'
        print >>f,str(mod)
        print >>f,'-----------------\n'
        funcs = dir(modules_dic.get(mod))
        for func in funcs:
            print >>f,str(func)
			
f.close()
Save this as " .py " file. You can use any PythonLoader.
senpaiex is offline  
Old 04/22/2020, 23:01   #3
 
elite*gold: 0
Join Date: Dec 2016
Posts: 7
Received Thanks: 1
Thank you. What i meant is that for example
I create a python script for metin2 (for example teleport)
The GUI works everything is fine, i click a button and it does nothing but it should.
How can i debug the error? How can i find what's the problem.
For example "variable x is undefined"

I've tried wrapping it in a try catch but i dont know how to get the exception message
Radu97a is offline  
Old 04/22/2020, 23:17   #4
 
elite*gold: 0
Join Date: Nov 2016
Posts: 245
Received Thanks: 147
Did you check Syserr file ?
senpaiex is offline  
Old 04/22/2020, 23:31   #5
 
elite*gold: 0
Join Date: Dec 2016
Posts: 7
Received Thanks: 1
In the syserr folder i can see a file generated when i run the script but there is just a bunch of numbers and a hour. I guess error codes
Radu97a is offline  
Old 04/23/2020, 00:20   #6
 
elite*gold: 0
Join Date: Nov 2016
Posts: 245
Received Thanks: 147
Yes. Just use your script ( press teleport button for example ) than open last syserrfile with any text editor. Check error in syserr file.
senpaiex is offline  
Old 04/23/2020, 00:43   #7
 
elite*gold: 0
Join Date: Dec 2016
Posts: 7
Received Thanks: 1
0423 01:21:22368 :: 609340520423 01:28:38816 :: 609400040423 01:28:38816 :: 609404240423 01:28:38816 :: 609383600423 01:28:38816 :: 609383600423 01:28:38817 :: 609383600423 01:28:38817 :: 609404480423 01:28:38817 :: 609404480423 01:28:38817 :: 609404680423 01:28:38817 :: 609404480423 01:28:56244 :: 609400080423 01:28:56244 :: 609403920423 01:28:56244 :: 609383280423 01:28:56244 :: 609383280423 01:28:56244 :: 609383280423 01:28:56244 :: 609404160423 01:28:56244 :: 609404160423 01:28:56244 :: 609404360423 01:28:56244 :: 609404160423 01:28:57114 :: 609400040423 01:28:57114 :: 609404240423 01:28:57114 :: 609383600423 01:28:57115 :: 609383600423 01:28:57115 :: 609383600423 01:28:57115 :: 609404480423 01:28:57115 :: 609404480423 01:28:57115 :: 609404680423 01:28:57115 :: 609404480423 01:28:12347 :: 609400080423 01:28:12347 :: 609403920423 01:28:12347 :: 609383280423 01:28:12347 :: 609383280423 01:28:12347 :: 609383280423 01:28:12347 :: 609404160423 01:28:12347 :: 609404160423 01:28:12347 :: 609404360423 01:28:12347 :: 609404160423 01:28:13040 :: 609400640423 01:28:13040 :: 609404360423 01:28:13040 :: 609383720423 01:28:13040 :: 609383720423 01:28:13040 :: 609383720423 01:28:13040 :: 609404600423 01:28:13040 :: 609404600423 01:28:13040 :: 609404800423 01:28:13040 :: 609404600423 01:29:26372 :: 609400640423 01:29:26372 :: 609404360423 01:29:26372 :: 609383720423 01:29:26372 :: 609383720423 01:29:26372 :: 609383720423 01:29:26372 :: 609404600423 01:29:26372 :: 609404600423 01:29:26372 :: 609404800423 01:29:26372 :: 609404600423 01:29:43941 :: 609400040423 01:29:43941 :: 609404240423 01:29:43941 :: 609383600423 01:29:43941 :: 609404480423 01:29:43941 :: 609404480423 01:29:43941 :: 609404480423 01:29:43941 :: 609404240423 01:29:43941 :: 609404160423 01:29:43941 :: 609404360423 01:29:43941 :: 609404280423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404360423 01:29:43941 :: 609404480423 01:29:43941 :: 609404480423 01:29:43941 :: 609404680423 01:29:43941 :: 609404480423 01:29:46169 :: 609400040423 01:29:46169 :: 609404240423 01:29:46169 :: 609383600423 01:29:46169 :: 609404480423 01:29:46169 :: 609404480423 01:29:46169 :: 609404480423 01:29:46169 :: 609404240423 01:29:46169 :: 609404160423 01:29:46169 :: 609404360423 01:29:46169 :: 609404280423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404360423 01:29:46169 :: 609404480423 01:29:46169 :: 609404480423 01:29:46169 :: 609404680423 01:29:46169 :: 609404480423 01:29:49818 :: 609400080423 01:29:49818 :: 609403920423 01:29:49818 :: 609383280423 01:29:49818 :: 609383280423 01:29:49818 :: 609383280423 01:29:49818 :: 609404160423 01:29:49818 :: 609404160423 01:29:49818 :: 609404360423 01:29:49818 :: 609404160423 01:30:18925 :: 609400080423 01:30:18925 :: 609403920423 01:30:18925 :: 609383280423 01:30:18925 :: 609383280423 01:30:18925 :: 609383280423 01:30:18925 :: 609404160423 01:30:18925 :: 609404160423 01:30:18925 :: 609404360423 01:30:18925 :: 609404160423 01:30:24927 :: 609400040423 01:30:24927 :: 609404240423 01:30:24927 :: 609383600423 01:30:24927 :: 609383600423 01:30:24928 :: 609383600423 01:30:24928 :: 609404480423 01:30:24928 :: 609404480423 01:30:24928 :: 609404680423 01:30:24928 :: 609404480423 01:30:31910 :: 609400080423 01:30:31910 :: 609403920423 01:30:31910 :: 609383280423 01:30:31910 :: 609383280423 01:30:31910 :: 609383280423 01:30:31910 :: 609404160423 01:30:31910 :: 609404160423 01:30:31910 :: 609404360423 01:30:31910 :: 609404160423 01:30:43110 :: 609400040423 01:30:43110 :: 609404240423 01:30:43110 :: 609383600423 01:30:43110 :: 609383600423 01:30:43111 :: 609383600423 01:30:43111 :: 609404480423 01:30:43111 :: 609404480423 01:30:43111 :: 609404680423 01:30:43111 :: 609404480423 01:30:43902 :: 609400040423 01:30:43902 :: 609404240423 01:30:43902 :: 609383600423 01:30:43902 :: 609383600423 01:30:43903 :: 609383600423 01:30:43903 :: 609404480423 01:30:43903 :: 609404480423 01:30:43903 :: 609404680423 01:30:43903 :: 609404480423 01:30:55885 :: 609400080423 01:30:55885 :: 609403920423 01:30:55885 :: 609383280423 01:30:55885 :: 609383280423 01:30:55886 :: 609383280423 01:30:55886 :: 609404160423 01:30:55886 :: 609404160423 01:30:55886 :: 609404360423 01:30:55886 :: 609404160423 01:31:57360 :: 609400040423 01:31:57360 :: 609404240423 01:31:57360 :: 609383600423 01:31:57360 :: 609383600423 01:31:57361 :: 609383600423 01:31:57361 :: 609404480423 01:31:57361 :: 609404480423 01:31:57361 :: 609404680423 01:31:57361 :: 609404480423 01:31:10247 :: 609400040423 01:31:10247 :: 609404240423 01:31:10247 :: 609383600423 01:31:10247 :: 609383600423 01:31:10248 :: 609383600423 01:31:10248 :: 609404480423 01:31:10248 :: 609404480423 01:31:10248 :: 609404680423 01:31:10248 :: 609404480423 01:31:14256 :: 609400040423 01:31:14256 :: 609404240423 01:31:14256 :: 609383600423 01:31:14257 :: 609383600423 01:31:14257 :: 609383600423 01:31:14257 :: 609404480423 01:31:14257 :: 609404480423 01:31:14257 :: 609404680423 01:31:14257 :: 609404480423 01:41:07760 :: 609400040423 01:41:07760 :: 609404240423 01:41:07760 :: 609383600423 01:41:07761 :: 609383600423 01:41:07761 :: 609404480423 01:41:07761 :: 609404480423 01:41:07761 :: 609404680423 01:41:07761 :: 60940448

This is an example of what i find in the syserr file
Radu97a is offline  
Old 04/23/2020, 01:03   #8
 
elite*gold: 0
Join Date: Nov 2016
Posts: 245
Received Thanks: 147
Wow this is weird If you share your code maybe we can understand whats goin on there.
senpaiex is offline  
Old 04/23/2020, 01:51   #9
 
elite*gold: 0
Join Date: Dec 2016
Posts: 7
Received Thanks: 1
Its not about this code. I want to know for the future how i can debug stuff
Radu97a is offline  
Old 04/23/2020, 12:42   #10
 
elite*gold: 0
Join Date: Nov 2016
Posts: 245
Received Thanks: 147
I tried before debug the game (not code) but CrypTect terminate the process everytime. Its using "IsDebuggerPresent" I tried anti-antidebug tools ( like Scylla Hide etc.. ) but still CrypTect knows im debugging game. At the end i get banned Im still looking for a way to debug this weird game..
senpaiex is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Question bout debugging (I'm new to this so be patient please)
02/21/2011 - CO2 Private Server - 3 Replies
I'm Using Microsoft Visual C# 2010 Express and would like for someone to please thoroughly breakdown "How to debug", so i can add stuff to my private server.. Note: I'm new to this stuff so please be patient with me, I Appreciate it very much. Note2: I know it's kind of annoying to do this, so all contributions are gratefully appreciated and will be rewarded with a "Thanks"! :handsdown:
Reversing / Debugging Q
01/19/2006 - General Coding - 11 Replies
So i got this address range in the 00ee0000 -> 00eeffff area ... its inventory bits /array of bytes(not bits) 1=inventory slot filled, and 0=not filled. Thats good and all, but being dynamic and all means that the base address changes a bit from time to time. SO I am looking for a pointer to that specific area of memory. However i cannot find one ? The nearest pointer i find is like fff away from the destination! MY question is this ; im obvsioly going about this wrong, finding a...



All times are GMT +1. The time now is 06:39.


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