Jump to content
metin2dev
Metin2International
ReFresh

Is here someone who can make this feature?

Recommended Posts

Hey guys,

I saw on some server new feature for warp scrolls when you hover over the warp scroll with mouse cursor you will be able to see the map with coordinates where you will be teleported. Can someone make it? 

Arrow shows where is target of the coordinates. The target is flashing like when you make new target with quest.

 

Share this post


Link to post
Share on other sites
Spoiler

## uitooltip.py
## 1. Search:
							self.AppendTextLine(localeInfo.TOOLTIP_MEMORIZED_POSITION % (localeMapName, int(xPos-xBase)/100, int(yPos-yBase)/100), self.NORMAL_COLOR)
## 1. Add after:
							self.AppendMapImage(mapName, int(xPos-xBase)/100, int(yPos-yBase)/100)


## 2. Search function:
	def __DragonSoulInfoString (self, dwVnum):
		...
## 2. Add after:
	def AppendMapImage(self, mapName, xPos, yPos):
		mapImage = ui.ImageBox()
		mapImage.SetParent(self)
		mapImage.Show()
		mapImage.LoadImage("d:/ymir work/ui/atlas/%s/atlas.sub" % (mapName))
		mapImage.SetPosition(0, self.toolTipHeight)
		mapImage.SetWindowHorizontalAlignCenter()
		
		mapSizeDict = {
			"metin2_map_c1" : [4, 5],
		}
		
		if mapName in mapSizeDict:
			pointImageX = (xPos / float(mapSizeDict[mapName][0] * (128 * 200)) * float(mapImage.GetWidth())) * 100 - 15.0
			pointImageY = (yPos / float(mapSizeDict[mapName][1] * (128 * 200)) * float(mapImage.GetHeight())) * 100 - 15.0
			
			pointImage = ui.AniImageBox()
			pointImage.SetParent(mapImage)
			pointImage.SetDelay(6)
			for i in xrange(1, 13):
				pointImage.AppendImage("d:/ymir work/ui/minimap/mini_waypoint%02d.sub" % i)
			pointImage.SetPosition(pointImageX, pointImageY)
			pointImage.Show()
		
		self.toolTipHeight += mapImage.GetHeight()
		self.childrenList.append(mapImage)
		if mapName in mapSizeDict:
			self.childrenList.append(pointImage)
		self.ResizeToolTip()

 

That's the hard way ... 

Please don't say it's ugly code, I know it.

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

@Abel(Tiger) Hey, it's working but I have a little problem. Coordinates shows bad position.

Try to fix this mathematics:

            pointImageX = (xPos / float(mapSizeDict[mapName][0] * (128 * 200)) * float(mapImage.GetWidth())) * 100 - 15.0
            pointImageY = (yPos / float(mapSizeDict[mapName][1] * (128 * 200)) * float(mapImage.GetHeight())) * 100 - 15.0

qq.jpg

Share this post


Link to post
Share on other sites
11 hours ago, Abel(Tiger) said:
  Hide contents


			for i in xrange(0, 13):
				pointImage.AppendImage("d:/ymir work/ui/minimap/mini_waypoint%02d.sub" % i)

 

 

q83leab.png

  • MINI_WAYPOINT_IMAGE_COUNT = 12 ..\Client\src\UserInterface\PythonMiniMap.h
  • You should replace your xrange with start = 1

Good job.

  • Like 1

Share this post


Link to post
Share on other sites

Can someone help me to fix it? I have problem with flashing point. It showing bad position and only one and the same position of flashing point at each coordinates.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×