Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2
You last visited: Today at 02:11

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

Advertisement



please need python function

Discussion on please need python function within the Metin2 forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 3
Received Thanks: 0
please need python function

I want to click some NPC like salesman, octavia and oldman etc with game's python commands. How can you i go to NPC's coordinate. What is that command can you help me please
baskuda is offline  
Old 07/06/2015, 19:22   #2
 
elite*gold: 726
Join Date: Jul 2010
Posts: 14,233
Received Thanks: 7,914
m2net.SendOnClickPacket(player.GetTargetVID())
noahrmal is offline  
Old 07/07/2015, 11:22   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 3
Received Thanks: 0
i need to select npc by mause which you have said. No way to do that with command line? For example select to Soon or find to npc wich i want to do process
baskuda is offline  
Old 07/07/2015, 16:41   #4
 
elite*gold: 726
Join Date: Jul 2010
Posts: 14,233
Received Thanks: 7,914
with target vid you can read out the vids of your npcs (different vids for npcs in different channels/maps)

or you can scan for vid by race of the npc:

Code:
def ScanForNPCByRace(self, race):
		for i in xrange(100000):
			if chr.INSTANCE_TYPE_NPC == chr.GetInstanceType(i):
				chr.SelectInstance(i)
				if chr.GetRace() == race:
					return i
		return 0
to get the race of your npc (you have to do it once for every npc)
Code:
chr.SelectInstance(player.GetTargetVID())
chat.AppendChat(7, str(chr.GetRace()))
noahrmal is offline  
Old 06/02/2018, 02:31   #5
 
elite*gold: 0
Join Date: Oct 2017
Posts: 1
Received Thanks: 0
So how can i make a python file to work like this:
Find the id of the npc that i want to talk
when i change map or relog or something ... if i am near to him talk to him and choose the opinion that i want ?
dsgrgeo is offline  
Reply


Similar Threads Similar Threads
Python function doesn't work
12/31/2014 - Metin2 Private Server - 0 Replies
in my case "__CreateSubFunction" not work, so maybe i got a error think in this function, but i dont know. def __init__(self): ui.Window.__init__(self) self.Board = ui.BoardWithTitleBar() self.Board.SetSize(300, 500) self.Board.SetCenterPosition() self.Board.AddFlag('movable') self.Board.AddFlag('float') self.Board.SetTitleName("Test") self.Board.SetCloseEvent(self.Close)
[C++] Run Python Function Functions Metin2
05/10/2014 - C/C++ - 5 Replies
Hat sich geklärt.
Help Me Python Function
02/08/2014 - Metin2 Private Server - 1 Replies
Any person know the function in python to use : http://m2data.liquiron.com/ex/icon/item/70038.png Thanx.
[RELEASE]Python Chat Anti-SPAM Function
11/02/2013 - Metin2 PServer Guides & Strategies - 10 Replies
:D
[PYTHON]Function in game aufrufen?
04/23/2013 - Metin2 Private Server - 4 Replies
Hey, kann man in (metin) Python irgendwie von einer uiscript py datei aus eine Function in der game.py ausführen? Vielen Dank für jede Hilfe Das schon versucht: import game



All times are GMT +2. The time now is 02:11.


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.