Register for your free account! | Forgot your password?

You last visited: Today at 03:30

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

Advertisement



LIKE MINIMAP SHOW X Y

Discussion on LIKE MINIMAP SHOW X Y within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 78
Received Thanks: 22
LIKE MINIMAP SHOW X Y

...
Maho09 is offline  
Old 06/14/2015, 21:56   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 686
Since I'm not entirely sure if it works correctly, but has worked when briefly testing. I'm gonna release some part of source which is like 5 years old and was never used in my projects.

I found the formula for this on one of the silkroad related boards. I actually would like to credit someone but I'm not sure who wrote it. Might be illstar as I read through a lot of stuff he wrote.

Might be helpful to you
Code:
        public void Update()
        {
            float ToGoX;
            float ToGoY;
            double distance;
            double speed = 0.0;

            try
            {
                if (m_Standing)
                {
                    m_LastCalculated = m_Start;
                }
                else
                {
                    Double timeLeft = DateTime.Now.Subtract(m_lastUpdate).TotalMilliseconds;
                    ToGoX = (m_LastCalculated.X - m_Destination.X);
                    ToGoY = (m_LastCalculated.Y - m_Destination.Y);
                    distance = Math.Sqrt(ToGoX * ToGoX + ToGoY * ToGoY);

                    switch (m_SpeedMode)
                    {
                        case eSpeedMode.Walking:
                            speed = ((m_WalkSpeed / 10.0) * timeLeft) / 1000.0;
                            break;
                        case eSpeedMode.Running:
                            speed = ((m_RunSpeed / 10.0) * timeLeft) / 1000.0;
                            break;
                    }

                    if (distance == 0.0)
                    {
                        m_LastCalculated = m_Start;
                    }

                    float modi = (float)(((100.0 / distance) * speed) * 0.01);

                    ToGoX *= modi;
                    ToGoY *= modi;

                    float tmpX = m_LastCalculated.X;
                    float tmpY = m_LastCalculated.Y;

                    tmpX -= ToGoX;
                    tmpY -= ToGoY;

                    //Set X, Y
                    m_LastCalculated.X = tmpX;
                    m_LastCalculated.Y = tmpY;
                    m_lastUpdate = DateTime.Now;
                }


            }
            catch (Exception ex)
            {
                Debug.Print("PositionTracker->Update()->Exception:" + ex.Message);
            }

        }
DaxterSoul is offline  
Thanks
1 User
Old 06/14/2015, 22:58   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 78
Received Thanks: 22
Where calling timer? Not work t.y for helping @DaxterSoul but i need more source
Maho09 is offline  
Old 06/14/2015, 23:42   #4
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
nvm,you're too ignorant
vorosmihaly is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Datei : Minimap "NPC Minimap Pos." ?
08/16/2014 - Metin2 Private Server - 1 Replies
.
[SHOW]Patch List Creator DOS[SHOW
05/27/2014 - Flyff Private Server - 2 Replies
Hi Elitepvpers, Today i am willing to show you my Patch List creator. Now some of you would say why even bother cause there are already Patch List creators like Titanium etc.. Well in fact I did create one 1 DOS is because I was missing some things inside Titanium etc. For example the latest Titanium you can select all files but for the folders you need to click 1 folder at an time. I find it irritating that I cant select only the folder instead.
Looking for VB code to show entitys on minimap
01/18/2010 - Aion - 1 Replies
Im creating a simple radar that shows everything around me, I have almost everything complete but I cant figure out a nice function or formula to have the entities in my minimap while im in the middle of the map and depending on my cam movements to also move the entities along in a circle.
how to make ur own edited bos map which show in minimap/ctrl-m? :D
08/29/2008 - Eudemons Online - 4 Replies
can some1 write a tutorial or link me the tutorial? huhuhu :handsdown: i want to make this shows in my minimap/ctrl-m, how? :confused: ---> hxxp://forum.91.com/topics/156/200802/09/36584,1.h tml?time=1219965699 thanks in advance. P/s: sorry mod if i broke a rule... huhu -puNKiey



All times are GMT +1. The time now is 03:32.


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