Jump to content

Is here someone who can make this feature?


Recommended Posts

  • Active Member

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.

 

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • 2 weeks later...
  • Active+ Member
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.

  • Love 7
Link to comment
Share on other sites

  • Active Member

@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

I'll be always helpful! 👊 

Link to comment
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.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • Active+ Member

@ReFresh That math is working for me https://metin2.download/picture/gysEx31h4260Fa0350MID6jgS7CnwRY9/.gif

@Tasho My mistake :)

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.