Jump to content

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.

//Big thanks to Abel(Tiger) and all of you guys who made this feature idea working!

Edited by ReFresh

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/
Share on other sites

  • 2 weeks later...
  • Bot
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 8

english_banner.gif

Link to comment
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/#findComment-98798
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
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/#findComment-98824
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
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/#findComment-98834
Share on other sites

  • Bot

@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

english_banner.gif

Link to comment
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/#findComment-98861
Share on other sites

  • 2 weeks later...
  • Active+ Member

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.

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/17916-warp-scrolls-feature-idea/#findComment-99399
Share on other sites

  • 3 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.