Jump to content

xP3NG3Rx

Honorable Member
  • Posts

    839
  • Joined

  • Days Won

    393
  • Feedback

    100%

Posts posted by xP3NG3Rx

  1. Something like that, but for weapons this is a bit messed up, not every camera view good for the different kind of weapons.
    But now I'm having fun.

    efe3c4c739.png

    When I'm done I'll post it here, but my base is totally GF like, so, might not be fit 100% for this base.

    • Love 11
  2. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hi, folks!

    With this guide you will be able to combine textlines with images, like rubinum does.

     

     

    202002Photoshop-2019-01-11-10-48-05.png

     

    Usage is simple:

    emojiTextLine.SetText("|Eemoji/key_ctrl|e + |Eemoji/key_x|e + |Eemoji/key_rclick|e - Direct sell")

     

    The files are located in the icon pack, so basically the code will load from icon/{GIVEN_PATH}.tga - in the sample the path for the X  is: icon/emoji/key_x.tga
    Here are the images from rubinum client: 

    Spoiler

    This is the hidden content, please

     

    Howto:

    Spoiler

    1.) Open EterLib/TextTag.h and add the new tags into the enum there:

    
    
    	TEXT_TAG_EMOJI_START, // |E
    	TEXT_TAG_EMOJI_END, // |e ex) |Epath/filename|h

    2.1.) Open the EterLib/TextTag.cpp and extend the GetTextTag function with the following statements:

    
    
        else if (*cur == L'E') // emoji |Epath/emo|e
        {
            tagLen = 2;
            return TEXT_TAG_EMOJI_START;
        }
        else if (*cur == L'e') // end of emoji
        {
            tagLen = 2;
            return TEXT_TAG_EMOJI_END;
        }

    2.2.) Extend the GetTextTagOutputString function with the following statements:

    
    
            else if (tag == TEXT_TAG_EMOJI_START)
                hyperlinkStep = 1;
            else if (tag == TEXT_TAG_EMOJI_END)
                hyperlinkStep = 0;

    2.3.) Repeat the 2.2. in the GetTextTagInternalPosFromRenderPos function:

    
    
            else if (tag == TEXT_TAG_EMOJI_START)
                hyperlinkStep = 1;
            else if (tag == TEXT_TAG_EMOJI_END)
                hyperlinkStep = 0;

    2.4.) Repeat again in the GetTextTagOutputLen function too:

    
    
            else if (tag == TEXT_TAG_EMOJI_START)
                hyperlinkStep = 1;
            else if (tag == TEXT_TAG_EMOJI_END)
                hyperlinkStep = 0;

    3.1.) Open EterLib/GrpTextInstance.h and add the following line at the top of the file where the includes are:

    
    
    #include "GrpImageInstance.h"

    3.2.) Add the following struct below of the SHyperlink struct:

    
    
            struct SEmoji
            {
                short x;
                CGraphicImageInstance * pInstance;
    
                SEmoji() : x(0)
                {
                    pInstance = NULL;
                }
            };

    3.3.) Below of the m_hyperlinkVector declaration declare a new variable:

    
    
    
    	std::vector<SEmoji> m_emojiVector;

    4.1.) Open EterLib/GrpTextInstance.cpp and add the following line at the top of the file, where the includes are:

    
    
    #include "ResourceManager.h"

    4.2.) In the CGraphicTextInstance::Update function add the following below of this line: m_hyperlinkVector.clear();

    
    
        if (m_emojiVector.size() != 0)
        {
            for (std::vector<SEmoji>::iterator itor = m_emojiVector.begin(); itor != m_emojiVector.end(); ++itor)
            {
                SEmoji & rEmo = *itor;
                if (rEmo.pInstance)
                {
                    CGraphicImageInstance::Delete(rEmo.pInstance);
                    rEmo.pInstance = NULL;
                }
            }
        }
        m_emojiVector.clear();

    4.3.) This is a bit complicated, so first of all look for this line:

    
    
    else    // ľĆ¶řżÜ ´Ů¸Ą ÁöżŞ.

    This is the else for the Arabic codepage, I could not test it, so I didn't make it to arab rtl style.

    4.4.) Add the following below of this line: std::wstring hyperlinkBuffer;

    
    
                    SEmoji kEmoji;
                    int emojiStep = 0;
                    std::wstring emojiBuffer;

    4.5.) Replace this:

    
    
                            if (hyperlinkStep == 1)
                                hyperlinkBuffer.append(1, wText[i]);

    With this:

    
    
                            if (hyperlinkStep == 1)
                                hyperlinkBuffer.append(1, wText[i]);
                            else if (emojiStep == 1)
                                emojiBuffer.append(1, wText[i]);

    4.6.) Then add the new processor for the new tags:

    
    
                            else if (ret == TEXT_TAG_EMOJI_START)
                            {
                                emojiStep = 1;
                                emojiBuffer = L"";
                            }
                            else if (ret == TEXT_TAG_EMOJI_END)
                            {
                                kEmoji.x = x;
    
                                char retBuf[1024];
                                int retLen = Ymir_WideCharToMultiByte(GetDefaultCodePage(), 0, emojiBuffer.c_str(), emojiBuffer.length(), retBuf, sizeof(retBuf) - 1, NULL, NULL);
                                retBuf[retLen] = '\0';
    
                                char szPath[255];
                                snprintf(szPath, sizeof(szPath), "icon/%s.tga", retBuf);
                                if (CResourceManager::Instance().IsFileExist(szPath))
                                {
                                    CGraphicImage * pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(szPath);
                                    kEmoji.pInstance = CGraphicImageInstance::New();
                                    kEmoji.pInstance->SetImagePointer(pImage);
                                    m_emojiVector.push_back(kEmoji);
                                    memset(&kEmoji, 0, sizeof(SEmoji));
                                    for (int i = 0; i < pImage->GetWidth() / (pSpaceInfo->width-1); ++i)
                                        x += __DrawCharacter(pFontTexture, dataCodePage, ' ', dwColor);
                                    if (pImage->GetWidth() % (pSpaceInfo->width - 1) > 1)
                                        x += __DrawCharacter(pFontTexture, dataCodePage, ' ', dwColor);
                                }
                                emojiStep = 0;
                                emojiBuffer = L"";
                            }

    4.7.) Add the following code to the end of the CGraphicTextInstance::Render function:

    
    
        if (m_emojiVector.size() != 0)
        {
            for (std::vector<SEmoji>::iterator itor = m_emojiVector.begin(); itor != m_emojiVector.end(); ++itor)
            {
                SEmoji & rEmo = *itor;
                if (rEmo.pInstance)
                {
                    rEmo.pInstance->SetPosition(fStanX + rEmo.x, (fStanY + 7.0) - (rEmo.pInstance->GetHeight() / 2));
                    rEmo.pInstance->Render();
                }
            }
        }

    4.8.) Add the following into the CGraphicTextInstance::Destroy function:

    
    
        if (m_emojiVector.size() != 0)
        {
            for (std::vector<SEmoji>::iterator itor = m_emojiVector.begin(); itor != m_emojiVector.end(); ++itor)
            {
                SEmoji & rEmo = *itor;
                if (rEmo.pInstance)
                {
                    CGraphicImageInstance::Delete(rEmo.pInstance);
                    rEmo.pInstance = NULL;
                }
            }
        }
        m_emojiVector.clear();

     

     

    Have fun :)
    Sorry for arab players :P, for sure they have also developers, so let's go guys, finish it ?
    If you have problem, maybe I made a mistake in the guide of missed out something, just leave a comment below.

    PS.: Sometimes the code tag of the board puts an extra invisible character mostly the end of the lines, if your IDE cries for syntax error, but it seems correct, check that part of the file with notepad++, it will show a ?(question mark) where the problem is.

     

    • Metin2 Dev 358
    • kekw 2
    • Eyes 5
    • Dislove 5
    • Angry 3
    • Not Good 3
    • Sad 2
    • Cry 1
    • Smile Tear 2
    • Think 3
    • Confused 4
    • Scream 6
    • Lmao 2
    • Good 121
    • Love 26
    • Love 271
  3. 434eace8eb.png

    At the moment I still don't know they are using it for special instances or not, because every mob has the same value 0.0 which means 100.0f by default. Of course the calculations are different than before, but still, I'm not sure about this. I tried to make it to my own, but I've caused some problems during the PvP so I had to put back the old one. Maybe one day I will give another try.

    • Love 2
  4. Official v18.5 XMas patch v18.5.6 r22630

    1. Christmas pet, mount, costumes.
    2. New "miniboss" minigame gui + dungeon map.

    (

    This is the hidden content, please
    ) (
    This is the hidden content, please
    )

    Full client: (

    This is the hidden content, please
    ) (
    This is the hidden content, please
    )

    And please stop asking for root python files, I don't have them...

    • Metin2 Dev 52
    • kekw 1
    • Cry 1
    • Smile Tear 1
    • Confused 1
    • Scream 1
    • Good 16
    • Love 1
    • Love 66
  5. Hell yeah, I thought that one isn't new :D.
    But it changes the CurrentColor instead of the Diffuse

    int __thiscall CPythonEventManager::SetFontColor(_DWORD *this, int a2, float a3, float a4, float a5)
    {
      int result; // eax
      unsigned int v6; // edx
      float *v7; // ecx
      _DWORD *v8; // [esp+0h] [ebp-18h]
    
      v8 = this;
      *(float *)&result = COERCE_FLOAT(sub_49A2C40(a2));
      if ( (_BYTE)result )
      {
        v6 = (v8[13] - v8[12]) >> 2;
        if ( a2 >= v6 )
          dummyshit00(v8 + 9, v6);
        v7 = (float *)(*(_DWORD *)(v8[12] + 4 * a2) + 32); // + 32 !
        *v7 = a3;
        v7[1] = a4;
        v7[2] = a5;
        *(float *)&result = 1.0;
        v7[3] = 1.0;
      }
      return result;
    }
    _DWORD *__userpurge CPythonEventManager::__InitEventSet@<eax>(const char *a1@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>, int a5)
    {
      v5 = a1;
      *(_DWORD *)(a5 + 4) = 0;                      // ix
      *(_DWORD *)(a5 + 8) = 0;                      // iy
      *(_DWORD *)(a5 + 12) = 0;                     // iw
      *(_DWORD *)(a5 + 16) = 0;                     // iyl
      *(_BYTE *)(a5 + 20) = 0;                      // islock
      *(_DWORD *)(a5 + 24) = 0;                     // lastdelaytime
      *(_DWORD *)(a5 + 28) = 0;                     // curletter
      v6 = (float *)(a5 + 32);                      // curcolor + 32 !
      *v6 = 1.0;
      v6[1] = 1.0;
      v6[2] = 1.0;
      v6[3] = 1.0;
    void CPythonEventManager::__InitEventSet(TEventSet& rEventSet)
    {
    	rEventSet.ix = 0;
    	rEventSet.iy = 0;
    	rEventSet.iWidth = 0;
    	rEventSet.iyLocal = 0;
    
    	rEventSet.isLock = false;
    	rEventSet.lLastDelayTime = 0;
    	rEventSet.iCurrentLetter = 0;
    	rEventSet.CurrentColor = D3DXCOLOR(1, 1, 1, 1);
    	//[...]
    }

     

    • Love 4
  6. Now I can see, your english is terrible sorry, I didn't understand what was your problem just after the 3rd read.
    And actually you removed the bonuses from the enum of apply in the database, what is non-sense to me why.
    You have to keep up to date the apply enum in the database with the applies in the source.
     

  7. Hi fellas,

    Here are the official version of these classes:

    1. CMoveTextLine - Used in Yutnori
    2. CMoveImageBox - Used in MonsterCard, Rumi and CatchKing
    3. CMoveScaleImageBox - Used in Yutnori

    I already reversed them months ago except the CMoveScaleImageBox but yesterday I finished them coz they had a little problem, but now seems working well.
    What you must know, this release isn't stable, I just reversed them, and tested with the scripts what you will see, so I couldn't stress them, they may have problems. And I don't recommend to use the SetScalePivotCenter function, I don't know why but works a bit strange than the official, it needs something more during the texture load in.

    Video of them:

    Spoiler

     

     

    Spoiler

    1.) Open EterPythonLib\PythonWindow.h and add the following class-definitions anywhere in the UI namespace:

    
    	class CMoveTextLine : public CTextLine
    	{
    	public:
    		CMoveTextLine(PyObject * ppyObject);
    		virtual ~CMoveTextLine();
    
    	public:
    		static DWORD Type();
    
    		void SetMoveSpeed(float fSpeed);
    		void SetMovePosition(float fDstX, float fDstY);
    		bool GetMove();
    		void MoveStart();
    		void MoveStop();
    
    	protected:
    		void OnUpdate();
    		void OnRender();
    		void OnEndMove();
    		void OnChangePosition();
    
    		BOOL OnIsType(DWORD dwType);
    
    		D3DXVECTOR2 m_v2SrcPos, m_v2DstPos, m_v2NextPos, m_v2Direction, m_v2NextDistance;
    		float m_fDistance, m_fMoveSpeed;
    		bool m_bIsMove;
    	};
    	class CMoveImageBox : public CImageBox
    	{
    		public:
    			CMoveImageBox(PyObject * ppyObject);
    			virtual ~CMoveImageBox();
    
    			static DWORD Type();
    
    			void SetMoveSpeed(float fSpeed);
    			void SetMovePosition(float fDstX, float fDstY);
    			bool GetMove();
    			void MoveStart();
    			void MoveStop();
    
    		protected:
    			virtual void OnCreateInstance();
    			virtual void OnDestroyInstance();
    
    			virtual void OnUpdate();
    			virtual void OnRender();
    			virtual void OnEndMove();
    
    			BOOL OnIsType(DWORD dwType);
    
    			D3DXVECTOR2 m_v2SrcPos, m_v2DstPos, m_v2NextPos, m_v2Direction, m_v2NextDistance;
    			float m_fDistance, m_fMoveSpeed;
    			bool m_bIsMove;
    	};
    	class CMoveScaleImageBox : public CMoveImageBox
    	{
    		public:
    			CMoveScaleImageBox(PyObject * ppyObject);
    			virtual ~CMoveScaleImageBox();
    
    			static DWORD Type();
    
    			void SetMaxScale(float fMaxScale);
    			void SetMaxScaleRate(float fMaxScaleRate);
    			void SetScalePivotCenter(bool bScalePivotCenter);
    
    		protected:
    			virtual void OnCreateInstance();
    			virtual void OnDestroyInstance();
    
    			virtual void OnUpdate();
    
    			BOOL OnIsType(DWORD dwType);
    
    			float m_fMaxScale, m_fMaxScaleRate, m_fScaleDistance, m_fAdditionalScale;
    			D3DXVECTOR2 m_v2CurScale;
    	};

    2.) Open EterPythonLib\PythonWindow.cpp and paste the functions of the new classes anywhere you want:

    
    	/// CMoveTextLine
    	CMoveTextLine::CMoveTextLine(PyObject * ppyObject) :
    		CTextLine(ppyObject),
    		m_v2SrcPos(0.0f, 0.0f),
    		m_v2DstPos(0.0f, 0.0f),
    		m_v2NextPos(0.0f, 0.0f),
    		m_v2Direction(0.0f, 0.0f),
    		m_v2NextDistance(0.0f, 0.0f),
    		m_fDistance(0.0f),
    		m_fMoveSpeed(10.0f),
    		m_bIsMove(false)
    	{
    	}
    
    	CMoveTextLine::~CMoveTextLine()
    	{
    		m_TextInstance.Destroy();
    	}
    
    	DWORD CMoveTextLine::Type()
    	{
    		static DWORD s_dwType = GetCRC32("CMoveTextLine", strlen("CMoveTextLine"));
    		return (s_dwType);
    	}
    
    	BOOL CMoveTextLine::OnIsType(DWORD dwType)
    	{
    		if (CMoveTextLine::Type() == dwType)
    			return TRUE;
    
    		return FALSE;
    	}
    
    	void CMoveTextLine::SetMoveSpeed(float fSpeed)
    	{
    		m_fMoveSpeed = fSpeed;
    	}
    
    	bool CMoveTextLine::GetMove()
    	{
    		return m_bIsMove;
    	}
    
    	void CMoveTextLine::MoveStart()
    	{
    		m_bIsMove = true;
    		m_v2NextPos = m_v2SrcPos;
    	}
    
    	void CMoveTextLine::MoveStop()
    	{
    		m_bIsMove = false;
    	}
    
    	void CMoveTextLine::OnEndMove()
    	{
    		PyCallClassMemberFunc(m_poHandler, "OnEndMove", BuildEmptyTuple());
    	}
    
    	void CMoveTextLine::OnChangePosition()
    	{
    		m_TextInstance.SetPosition((GetDefaultCodePage() == CP_1256) ? m_rect.right : m_rect.left, m_rect.top);
    	}
    
    	void CMoveTextLine::SetMovePosition(float fDstX, float fDstY)
    	{
    		if (fDstX != m_v2DstPos.x || fDstY != m_v2DstPos.y || m_rect.left != m_v2SrcPos.x || m_rect.top != m_v2SrcPos.y)
    		{
    			m_v2SrcPos.x = m_rect.left;
    			m_v2SrcPos.y = m_rect.top;
    
    			m_v2DstPos.x = fDstX;
    			m_v2DstPos.y = fDstY;
    
    			D3DXVec2Subtract(&m_v2Direction, &m_v2DstPos, &m_v2SrcPos);
    
    			m_fDistance = (m_v2Direction.y*m_v2Direction.y + m_v2Direction.x*m_v2Direction.x);
    			D3DXVec2Normalize(&m_v2Direction, &m_v2Direction);
    
    			if (m_v2SrcPos != m_v2NextPos)
    			{
    				float fDist = sqrtf(m_v2NextDistance.x*m_v2NextDistance.x + m_v2NextDistance.y*m_v2NextDistance.y);
    				m_v2NextPos = m_v2Direction * fDist;
    				m_TextInstance.SetPosition(m_v2NextPos.x, m_v2NextPos.y);
    			}
    		}
    	}
    
    	void CMoveTextLine::OnUpdate()
    	{
    		if (IsShow() && GetMove())
    		{
    			D3DXVec2Add(&m_v2NextPos, &m_v2NextPos, &(m_v2Direction * m_fMoveSpeed));
    			D3DXVec2Subtract(&m_v2NextDistance, &m_v2NextPos, &m_v2SrcPos);
    
    			float fNextDistance = m_v2NextDistance.y * m_v2NextDistance.y + m_v2NextDistance.x * m_v2NextDistance.x;
    			if (fNextDistance >= m_fDistance)
    			{
    				m_v2NextPos = m_v2DstPos;
    				MoveStop();
    				OnEndMove();
    			}
    
    			m_TextInstance.SetPosition(m_v2NextPos.x, m_v2NextPos.y);
    			m_TextInstance.Update();
    		}
    	}
    
    	void CMoveTextLine::OnRender()
    	{
    		if (IsShow())
    			m_TextInstance.Render();
    	}
    
    	/// CMoveImageBox
    	CMoveImageBox::CMoveImageBox(PyObject * ppyObject) :
    		CImageBox(ppyObject),
    		m_v2SrcPos(0.0f, 0.0f),
    		m_v2DstPos(0.0f, 0.0f),
    		m_v2NextPos(0.0f, 0.0f),
    		m_v2Direction(0.0f, 0.0f),
    		m_v2NextDistance(0.0f, 0.0f),
    		m_fDistance(0.0f),
    		m_fMoveSpeed(10.0f),
    		m_bIsMove(false)
    	{
    	}
    
    	CMoveImageBox::~CMoveImageBox()
    	{
    		OnDestroyInstance();
    	}
    
    	void CMoveImageBox::OnCreateInstance()
    	{
    		OnDestroyInstance();
    
    		m_pImageInstance = CGraphicImageInstance::New();
    	}
    
    	void CMoveImageBox::OnDestroyInstance()
    	{
    		if (m_pImageInstance)
    		{
    			CGraphicImageInstance::Delete(m_pImageInstance);
    			m_pImageInstance = NULL;
    		}
    	}
    
    	DWORD CMoveImageBox::Type()
    	{
    		static DWORD s_dwType = GetCRC32("CMoveImageBox", strlen("CMoveImageBox"));
    		return (s_dwType);
    	}
    
    	BOOL CMoveImageBox::OnIsType(DWORD dwType)
    	{
    		if (CMoveImageBox::Type() == dwType)
    			return TRUE;
    
    		return FALSE;
    	}
    
    	void CMoveImageBox::OnEndMove()
    	{
    		PyCallClassMemberFunc(m_poHandler, "OnEndMove", BuildEmptyTuple());
    	}
    
    	void CMoveImageBox::SetMovePosition(float fDstX, float fDstY)
    	{
    		if (fDstX != m_v2DstPos.x || fDstY != m_v2DstPos.y || m_rect.left != m_v2SrcPos.x || m_rect.top != m_v2SrcPos.y)
    		{
    			m_v2SrcPos.x = m_rect.left;
    			m_v2SrcPos.y = m_rect.top;
    
    			m_v2DstPos.x = fDstX;
    			m_v2DstPos.y = fDstY;
    
    			D3DXVec2Subtract(&m_v2Direction, &m_v2DstPos, &m_v2SrcPos);
    
    			m_fDistance = (m_v2Direction.x*m_v2Direction.x + m_v2Direction.y*m_v2Direction.y);
    
    			D3DXVec2Normalize(&m_v2Direction, &m_v2Direction);
    
    			if (m_pImageInstance && m_v2SrcPos != m_v2NextPos)
    			{
    				float fDist = sqrtf(m_v2NextDistance.x*m_v2NextDistance.x + m_v2NextDistance.y*m_v2NextDistance.y);
    
    				m_v2NextPos = m_v2Direction * fDist;
    				m_pImageInstance->SetPosition(m_v2NextPos.x, m_v2NextPos.y);
    			}
    		}
    	}
    
    	void CMoveImageBox::SetMoveSpeed(float fSpeed)
    	{
    		m_fMoveSpeed = fSpeed;
    	}
    
    	void CMoveImageBox::MoveStart()
    	{
    		m_bIsMove = true;
    		m_v2NextPos = m_v2SrcPos;
    	}
    
    	void CMoveImageBox::MoveStop()
    	{
    		m_bIsMove = false;
    	}
    
    	bool CMoveImageBox::GetMove()
    	{
    		return m_bIsMove;
    	}
    
    	void CMoveImageBox::OnUpdate()
    	{
    		if (!m_pImageInstance)
    			return;
    
    		if (IsShow() && GetMove())
    		{
    			D3DXVec2Add(&m_v2NextPos, &m_v2NextPos, &(m_v2Direction * m_fMoveSpeed));
    			D3DXVec2Subtract(&m_v2NextDistance, &m_v2NextPos, &m_v2SrcPos);
    
    			float fNextDistance = (m_v2NextDistance.x*m_v2NextDistance.x + m_v2NextDistance.y*m_v2NextDistance.y);
    			if (fNextDistance >= m_fDistance)
    			{
    				m_v2NextPos = m_v2DstPos;
    				MoveStop();
    				OnEndMove();
    			}
    
    			m_pImageInstance->SetPosition(m_v2NextPos.x, m_v2NextPos.y);
    		}
    	}
    
    	void CMoveImageBox::OnRender()
    	{
    		if (!m_pImageInstance)
    			return;
    
    		if (IsShow())
    			m_pImageInstance->Render();
    	}
    
    	/// CMoveScaleImageBox
    	CMoveScaleImageBox::CMoveScaleImageBox(PyObject * ppyObject) :
    		CMoveImageBox(ppyObject),
    		m_fMaxScale(1.0f),
    		m_fMaxScaleRate(1.0f),
    		m_fScaleDistance(0.0f),
    		m_fAdditionalScale(0.0f),
    		m_v2CurScale(1.0f, 1.0f)
    	{
    	}
    
    	CMoveScaleImageBox::~CMoveScaleImageBox()
    	{
    		OnDestroyInstance();
    	}
    
    	void CMoveScaleImageBox::OnCreateInstance()
    	{
    		OnDestroyInstance();
    
    		m_pImageInstance = CGraphicImageInstance::New();
    	}
    
    	void CMoveScaleImageBox::OnDestroyInstance()
    	{
    		if (m_pImageInstance)
    		{
    			CGraphicImageInstance::Delete(m_pImageInstance);
    			m_pImageInstance = NULL;
    		}
    	}
    
    	DWORD CMoveScaleImageBox::Type()
    	{
    		static DWORD s_dwType = GetCRC32("CMoveScaleImageBox", strlen("CMoveScaleImageBox"));
    		return (s_dwType);
    	}
    
    	BOOL CMoveScaleImageBox::OnIsType(DWORD dwType)
    	{
    		if (CMoveScaleImageBox::Type() == dwType)
    			return TRUE;
    
    		return FALSE;
    	}
    
    	void CMoveScaleImageBox::SetMaxScale(float fMaxScale)
    	{
    		m_fMaxScale = fMaxScale;
    	}
    
    	void CMoveScaleImageBox::SetMaxScaleRate(float fMaxScaleRate)
    	{
    		m_fMaxScaleRate = fMaxScaleRate;
    		float fDistanceRate = m_fDistance * fMaxScaleRate;
    		m_fScaleDistance = fDistanceRate;
    		m_v2CurScale = m_pImageInstance->GetScale();
    		float fDiffScale = m_fMaxScale - m_v2CurScale.x;
    		m_fAdditionalScale = fDiffScale / (sqrtf(fDistanceRate) / m_fMoveSpeed);
    	}
    
    	void CMoveScaleImageBox::SetScalePivotCenter(bool bScalePivotCenter)
    	{
    		if (m_pImageInstance)
    			m_pImageInstance->SetScalePivotCenter(bScalePivotCenter);
    	}
    
    	void CMoveScaleImageBox::OnUpdate()
    	{
    		if (!m_pImageInstance)
    			return;
    
    		if (IsShow() && GetMove())
    		{
    			D3DXVec2Add(&m_v2NextPos, &m_v2NextPos, &(m_v2Direction * m_fMoveSpeed));
    			D3DXVec2Subtract(&m_v2NextDistance, &m_v2NextPos, &m_v2SrcPos);
    
    			float fNextDistance = (m_v2NextDistance.x*m_v2NextDistance.x + m_v2NextDistance.y*m_v2NextDistance.y);
    			if (m_fScaleDistance < fNextDistance)
    				m_fAdditionalScale *= -1.0f;
    			
    			D3DXVECTOR2 v2NewScale;
    			D3DXVec2Add(&v2NewScale, &m_pImageInstance->GetScale(), &D3DXVECTOR2(m_fAdditionalScale, m_fAdditionalScale));
    			if (m_fMaxScale < v2NewScale.x)
    				v2NewScale = D3DXVECTOR2(m_fMaxScale, m_fMaxScale);
    
    			if (m_v2CurScale.x > v2NewScale.x)
    				v2NewScale = m_v2CurScale;
    
    			m_pImageInstance->SetScale(v2NewScale);
    
    			if (fNextDistance >= m_fDistance)
    			{
    				m_pImageInstance->SetScale(m_v2CurScale);
    				m_v2NextPos = m_v2DstPos;
    				MoveStop();
    				OnEndMove();
    			}
    
    			m_pImageInstance->SetPosition(m_v2NextPos.x, m_v2NextPos.y);
    		}
    	}

    3.1.) Open EterPythonLib\PythonWindowManager.h and extend the enum of the windows with these:

    
    				WT_MOVE_TEXTLINE,
    				WT_MOVE_IMAGEBOX,
    				WT_MOVE_SCALEIMAGEBOX,

    3.2.) Add the following definitions of functions:

    
    			CWindow *	RegisterMoveTextLine(PyObject * po, const char * c_szLayer);
    			CWindow *	RegisterMoveImageBox(PyObject * po, const char * c_szLayer);
    			CWindow *	RegisterMoveScaleImageBox(PyObject * po, const char * c_szLayer);

    4.1.) Open EterPythonLib\PythonWindowManager.cpp and extend the switch statement in the CWindowManager::__NewWindow with these:

    
    			case WT_MOVE_TEXTLINE:
    				return new CMoveTextLine(po);
    				break;
    			case WT_MOVE_IMAGEBOX:
    				return new CMoveImageBox(po);
    				break;
    			case WT_MOVE_SCALEIMAGEBOX:
    				return new CMoveScaleImageBox(po);
    				break;

    4.2.) Add the following functions:

    
    	CWindow * CWindowManager::RegisterMoveTextLine(PyObject * po, const char * c_szLayer)
    	{
    		assert(m_LayerWindowMap.end() != m_LayerWindowMap.find(c_szLayer));
    
    		CWindow * pWin = new CMoveTextLine(po);
    		m_LayerWindowMap[c_szLayer]->AddChild(pWin);
    
    #ifdef __WINDOW_LEAK_CHECK__
    		gs_kSet_pkWnd.insert(pWin);
    #endif
    		return pWin;
    	}
    
    	CWindow * CWindowManager::RegisterMoveImageBox(PyObject * po, const char * c_szLayer)
    	{
    		assert(m_LayerWindowMap.end() != m_LayerWindowMap.find(c_szLayer));
    
    		CWindow * pWin = new CMoveImageBox(po);
    		m_LayerWindowMap[c_szLayer]->AddChild(pWin);
    
    #ifdef __WINDOW_LEAK_CHECK__
    		gs_kSet_pkWnd.insert(pWin);
    #endif
    		return pWin;
    	}
    
    	CWindow * CWindowManager::RegisterMoveScaleImageBox(PyObject * po, const char * c_szLayer)
    	{
    		assert(m_LayerWindowMap.end() != m_LayerWindowMap.find(c_szLayer));
    
    		CWindow * pWin = new CMoveScaleImageBox(po);
    		m_LayerWindowMap[c_szLayer]->AddChild(pWin);
    
    #ifdef __WINDOW_LEAK_CHECK__
    		gs_kSet_pkWnd.insert(pWin);
    #endif
    		return pWin;
    	}

    5.1.) Open ETerPythonLib\PythonWindowManagerModule.cpp and add the following functions anywhere you want:

    
    // MoveTextLine
    PyObject * wndMgrRegisterMoveTextLine(PyObject * poSelf, PyObject * poArgs)
    {
    	PyObject * po;
    	if (!PyTuple_GetObject(poArgs, 0, &po))
    		return Py_BuildException();
    	char * szLayer;
    	if (!PyTuple_GetString(poArgs, 1, &szLayer))
    		return Py_BuildException();
    
    	UI::CWindow * pWindow = UI::CWindowManager::Instance().RegisterMoveTextLine(po, szLayer);
    	return Py_BuildValue("i", pWindow);
    }
    
    // MoveImageBox
    PyObject * wndMgrRegisterMoveImageBox(PyObject * poSelf, PyObject * poArgs)
    {
    	PyObject * po;
    	if (!PyTuple_GetObject(poArgs, 0, &po))
    		return Py_BuildException();
    	char * szLayer;
    	if (!PyTuple_GetString(poArgs, 1, &szLayer))
    		return Py_BuildException();
    
    	UI::CWindow * pWindow = UI::CWindowManager::Instance().RegisterMoveImageBox(po, szLayer);
    	return Py_BuildValue("i", pWindow);
    }
    
    // MoveScaleImageBox
    PyObject * wndMgrRegisterMoveScaleImageBox(PyObject * poSelf, PyObject * poArgs)
    {
    	PyObject * po;
    	if (!PyTuple_GetObject(poArgs, 0, &po))
    		return Py_BuildException();
    	char * szLayer;
    	if (!PyTuple_GetString(poArgs, 1, &szLayer))
    		return Py_BuildException();
    
    	UI::CWindow * pWindow = UI::CWindowManager::Instance().RegisterMoveScaleImageBox(po, szLayer);
    	return Py_BuildValue("i", pWindow);
    }
    
    PyObject * wndSetMoveSpeed(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	float fSpeed;
    	if (!PyTuple_GetFloat(poArgs, 1, &fSpeed))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveImageBox::Type()) || pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveImageBox*)pWindow)->SetMoveSpeed(fSpeed);
    	else if (pWindow->IsType(UI::CMoveTextLine::Type()))
    		((UI::CMoveTextLine*)pWindow)->SetMoveSpeed(fSpeed);
    
    	return Py_BuildNone();
    }
    
    PyObject * wndSetMovePosition(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	float fDstX(0.0f), fDstY(0.0f);
    	if (!PyTuple_GetFloat(poArgs, 1, &fDstX))
    		return Py_BuildException();
    	if (!PyTuple_GetFloat(poArgs, 2, &fDstY))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveImageBox::Type()) || pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveImageBox*)pWindow)->SetMovePosition(fDstX, fDstY);
    	else if (pWindow->IsType(UI::CMoveTextLine::Type()))
    		((UI::CMoveTextLine*)pWindow)->SetMovePosition(fDstX, fDstY);
    
    	return Py_BuildNone();
    }
    
    PyObject * wndMoveStart(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveImageBox::Type()) || pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveImageBox*)pWindow)->MoveStart();
    	else if (pWindow->IsType(UI::CMoveTextLine::Type()))
    		((UI::CMoveTextLine*)pWindow)->MoveStart();
    
    	return Py_BuildNone();
    }
    
    PyObject * wndMoveStop(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveImageBox::Type()) || pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveImageBox*)pWindow)->MoveStop();
    	else if (pWindow->IsType(UI::CMoveTextLine::Type()))
    		((UI::CMoveTextLine*)pWindow)->MoveStop();
    
    	return Py_BuildNone();
    }
    
    PyObject * wndGetMove(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveImageBox::Type()) || pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		return Py_BuildValue("i", ((UI::CMoveImageBox*)pWindow)->GetMove());
    	else if (pWindow->IsType(UI::CMoveTextLine::Type()))
    		return Py_BuildValue("i", ((UI::CMoveTextLine*)pWindow)->GetMove());
    	else
    		return Py_BuildValue("i", 0);
    }
    
    PyObject * wndSetMaxScale(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	float fMaxScale = 1.0f;
    	if (!PyTuple_GetFloat(poArgs, 1, &fMaxScale))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveScaleImageBox*)pWindow)->SetMaxScale(fMaxScale);
    
    	return Py_BuildNone();
    }
    
    PyObject * wndSetMaxScaleRate(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	float fMaxScaleRate = 1.0f;
    	if (!PyTuple_GetFloat(poArgs, 1, &fMaxScaleRate))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveScaleImageBox*)pWindow)->SetMaxScaleRate(fMaxScaleRate);
    
    	return Py_BuildNone();
    }
    
    PyObject * wndSetScalePivotCenter(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	bool bScalePivotCenter = false;
    	if (!PyTuple_GetBoolean(poArgs, 1, &bScalePivotCenter))
    		return Py_BuildException();
    
    	if (pWindow->IsType(UI::CMoveScaleImageBox::Type()))
    		((UI::CMoveScaleImageBox*)pWindow)->SetScalePivotCenter(bScalePivotCenter);
    
    	return Py_BuildNone();
    }

    5.2.) Enable them in the methodlist:

    
    		{ "RegisterMoveTextLine",		wndMgrRegisterMoveTextLine,			METH_VARARGS },
    		{ "RegisterMoveImageBox",		wndMgrRegisterMoveImageBox,			METH_VARARGS },
    		{ "RegisterMoveScaleImageBox",	wndMgrRegisterMoveScaleImageBox,	METH_VARARGS },
    
    		{ "SetMoveSpeed",				wndSetMoveSpeed,					METH_VARARGS },
    		{ "SetMovePosition",			wndSetMovePosition,					METH_VARARGS },
    		{ "MoveStart",					wndMoveStart,						METH_VARARGS },
    		{ "MoveStop",					wndMoveStop,						METH_VARARGS },
    		{ "GetMove",					wndGetMove,							METH_VARARGS },
    
    		{ "SetMaxScale",				wndSetMaxScale,						METH_VARARGS },
    		{ "SetMaxScaleRate",			wndSetMaxScaleRate,					METH_VARARGS },
    		{ "SetScalePivotCenter",		wndSetScalePivotCenter,				METH_VARARGS },

    6.1.) Open EterLib\GrpImageInstance.h and add the following definitions of functions in the CGraphicImageInstance class as public:

    
    		void SetScale(float fx, float fy);
    		void SetScale(D3DXVECTOR2 v2Scale);
    		const D3DXVECTOR2 & GetScale() const;
    		void SetScalePercent(BYTE byPercent);
    		void SetScalePivotCenter(bool bScalePivotCenter);

    6.2.) Add the following new variables into the CGraphinImageInstance class as protected:

    
    		D3DXVECTOR2 m_v2Scale;
    		bool m_bScalePivotCenter;

    7.1.) Open EterLib\GrpImageInstance.cpp and initialize the new variables with default values in the Initialize function:

    
    	m_v2Scale.x = m_v2Scale.y = 1.0f;
    	m_bScalePivotCenter = false;

    7.2.) Add the new functions anywhere you want:

    
    void CGraphicImageInstance::SetScale(float fx, float fy)
    {
    	m_v2Scale.x = fx;
    	m_v2Scale.y = fy;
    }
    
    void CGraphicImageInstance::SetScale(D3DXVECTOR2 v2Scale)
    {
    	m_v2Scale = v2Scale;
    }
    
    void CGraphicImageInstance::SetScalePercent(BYTE byPercent)
    {
    	m_v2Scale.x *= byPercent;
    	m_v2Scale.y *= byPercent;
    }
    
    const D3DXVECTOR2 & CGraphicImageInstance::GetScale() const
    {
    	return m_v2Scale;
    }
    
    void CGraphicImageInstance::SetScalePivotCenter(bool bScalePivotCenter)
    {
    	m_bScalePivotCenter = bScalePivotCenter;
    }

    7.3.) Replace the following in the OnRender and OnRenderCoolTime:

    
    	float fimgWidth = pImage->GetWidth();
    	float fimgHeight = pImage->GetHeight();

    With this:

    
    	float fimgWidth = pImage->GetWidth() * m_v2Scale.x;
    	float fimgHeight = pImage->GetHeight() * m_v2Scale.y;

    7.4.) Add the following into the OnRender function, below of the filling up the vertices(so before the CGraphicBase::SetPDTStream):

    
    	if (m_bScalePivotCenter)
    	{
    		vertices[0].texCoord = TTextureCoordinate(eu, sv);
    		vertices[1].texCoord = TTextureCoordinate(su, sv);
    		vertices[2].texCoord = TTextureCoordinate(eu, ev);
    		vertices[3].texCoord = TTextureCoordinate(su, ev);
    	}

    8.1.) Open root\ui.py and add the following classes:

    
    class MoveTextLine(TextLine):
    	def __init__(self):
    		TextLine.__init__(self)
    		self.end_move_event_func = None
    		self.end_move_event_args = None
    
    	def __del__(self):
    		TextLine.__del__(self)
    		self.end_move_event_func = None
    		self.end_move_event_args = None
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterMoveTextLine(self, layer)
    
    	def SetMovePosition(self, dst_x, dst_y):
    		wndMgr.SetMovePosition(self.hWnd, dst_x, dst_y)
    
    	def SetMoveSpeed(self, speed):
    		wndMgr.SetMoveSpeed(self.hWnd, speed)
    
    	def MoveStart(self):
    		wndMgr.MoveStart(self.hWnd)
    	def MoveStop(self):
    		wndMgr.MoveStop(self.hWnd)
    	def GetMove(self):
    		return wndMgr.GetMove(self.hWnd)
    
    	def OnEndMove(self):
    		if self.end_move_event_func:
    			apply(self.end_move_event_func, self.end_move_event_args)
    
    	def SetEndMoveEvent(self, event, *args):
    		self.end_move_event_func = event
    		self.end_move_event_args = args
    
    class MoveImageBox(ImageBox):
    	def __init__(self, layer = "UI"):
    		ImageBox.__init__(self, layer)
    		self.end_move_event = None
    
    	def __del__(self):
    		ImageBox.__del__(self)
    		self.end_move_event = None
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterMoveImageBox(self, layer)
    
    	def MoveStart(self):
    		wndMgr.MoveStart(self.hWnd)
    	def MoveStop(self):
    		wndMgr.MoveStop(self.hWnd)
    	def GetMove(self):
    		return wndMgr.GetMove(self.hWnd)
    
    	def SetMovePosition(self, dst_x, dst_y):
    		wndMgr.SetMovePosition(self.hWnd, dst_x, dst_y)
    
    	def SetMoveSpeed(self, speed):
    		wndMgr.SetMoveSpeed(self.hWnd, speed)
    
    	def OnEndMove(self):
    		if self.end_move_event:
    			self.end_move_event()
    
    	def SetEndMoveEvent(self, event):
    		self.end_move_event = event
    
    class MoveScaleImageBox(MoveImageBox):
    	def __init__(self, layer = "UI"):
    		MoveImageBox.__init__(self, layer)
    
    	def __del__(self):
    		MoveImageBox.__del__(self)
    
    	def RegisterWindow(self, layer):
    		self.hWnd = wndMgr.RegisterMoveScaleImageBox(self, layer)
    
    	def SetMaxScale(self, scale):
    		wndMgr.SetMaxScale(self.hWnd, scale)
    
    	def SetMaxScaleRate(self, pivot):
    		wndMgr.SetMaxScaleRate(self.hWnd, pivot)
    
    	def SetScalePivotCenter(self, flag):
    		wndMgr.SetScalePivotCenter(self.hWnd, flag)

    9.) TestScript.py:

    
    class MoveTextLineTest(ui.BoardWithTitleBar):
    	def __init__(self):
    		ui.BoardWithTitleBar.__init__(self)
    
    		self.__LoadWindow()
    		self.__LoadGUI()
    
    	def __del__(self):
    		ui.BoardWithTitleBar.__del__(self)
    
    	def __LoadWindow(self):
    		self.SetSize(200, 100)
    		self.SetPosition(0, 0)
    		self.AddFlag('movable')
    		self.AddFlag('float')
    		self.SetTitleName("       ~ MoveTextLineTest")
    		self.SetCloseEvent(self.BeginBoi)
    
    	def __LoadGUI(self):
    		self.Biatch = ui.MoveTextLine()
    		self.Biatch.SetParent(self)
    		self.Biatch.SetText("TEST")
    		self.Biatch.Show()
    
    	def BeginBoi(self):
    		self.Biatch.SetPosition(0, 0)
    		self.Biatch.SetMoveSpeed(2.)
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetMovePosition(pgx + 175, pgy + 80)
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.GetCancer))
    		self.Biatch.MoveStart()
    
    	def GetCancer(self):
    		self.Hide()
    		return 1
    
    	def OnPressEscapeKey(self):
    		self.GetCancer()
    		return 1
    
    class MoveImageBoxTest(ui.BoardWithTitleBar):
    	def __init__(self):
    		ui.BoardWithTitleBar.__init__(self)
    
    		self.__LoadWindow()
    		self.__LoadGUI()
    
    	def __del__(self):
    		ui.BoardWithTitleBar.__del__(self)
    
    	def __LoadWindow(self):
    		self.SetSize(200, 100)
    		self.SetPosition(0, 0)
    		self.SetCloseEvent(self.BeginBoi)
    		self.SetTitleName("       ~ MoveImageBoxTest")
    		self.AddFlag('movable')
    		self.AddFlag('float')
    		# self.SetCenterPosition()
    
    	def __LoadGUI(self):
    		self.Biatch = ui.MoveImageBox()
    		self.Biatch.SetParent(proxy(self))
    		self.Biatch.LoadImage("icon/item/trade.tga")
    		self.Biatch.SetPosition(0,0)
    		self.Biatch.AddFlag("float")
    		self.Biatch.Show()
    
    	def BeginBoi(self):
    		self.Biatch.SetMoveSpeed(1.)
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetMovePosition(pgx + 175, pgy + 80)
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.GetCancer))
    		self.Biatch.MoveStart()
    
    	def GetCancer(self):
    		self.Hide()
    		return 1
    
    	def OnPressEscapeKey(self):
    		self.GetCancer()
    		return 1
    
    class MoveScaleImageBoxTest(ui.BoardWithTitleBar):
    	def __init__(self):
    		ui.BoardWithTitleBar.__init__(self)
    
    		self.Pivot = False
    		self.__LoadWindow()
    		self.__LoadGUI()
    
    	def __del__(self):
    		ui.BoardWithTitleBar.__del__(self)
    
    	def __LoadWindow(self):
    		self.SetSize(200, 100)
    		self.SetPosition(0, 0)
    		self.SetCloseEvent(self.BeginBoi)
    		self.SetTitleName("       ~ MoveScaleImageBoxTest")
    		self.AddFlag('movable')
    		self.AddFlag('float')
    
    	def __LoadGUI(self):
    		self.Biatch = ui.MoveScaleImageBox()
    		self.Biatch.SetParent(self)
    		self.Biatch.LoadImage("icon/item/trade.tga")
    		self.Biatch.SetScalePivotCenter(self.Pivot)
    		self.Biatch.AddFlag("float")
    		self.Biatch.Show()
    
    	def BeginBoi(self):
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetPosition(0,0)
    		self.Biatch.SetMovePosition(pgx+0, pgy+35)
    		self.Biatch.SetMoveSpeed(1.5)
    		self.Biatch.SetMaxScale(2.0)
    		self.Biatch.SetMaxScaleRate(1.5)
    		self.Biatch.MoveStart()
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.Step0))
    
    	def Step0(self):
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetPosition(0,35)
    		self.Biatch.SetMovePosition(pgx+30, pgy+35)
    		self.Biatch.SetMoveSpeed(1.5)
    		self.Biatch.SetMaxScale(3.0)
    		self.Biatch.SetMaxScaleRate(1.5)
    		self.Biatch.MoveStart()
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.Step1))
    
    	def Step1(self):
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetPosition(30,35)
    		self.Biatch.SetMovePosition(pgx+30, pgy+65)
    		self.Biatch.SetMoveSpeed(1.5)
    		self.Biatch.SetMaxScale(3.0)
    		self.Biatch.SetMaxScaleRate(1.5)
    		self.Biatch.MoveStart()
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.Step2))
    
    	def Step2(self):
    		(pgx, pgy) = self.GetGlobalPosition()
    		self.Biatch.SetPosition(30,65)
    		self.Biatch.SetMovePosition(pgx+125, pgy+65)
    		self.Biatch.SetMoveSpeed(1.5)
    		self.Biatch.SetMaxScale(2.0)
    		self.Biatch.SetMaxScaleRate(1.5)
    		self.Biatch.MoveStart()
    		self.Biatch.SetEndMoveEvent(ui.__mem_func__(self.Step3))
    
    	def Step3(self):
    		self.Biatch.SetPosition(125,65)
    
    	def GetCancer(self):
    		self.Hide()
    		return 1
    
    	def OnPressEscapeKey(self):
    		self.GetCancer()
    		return 1
    

     

     

    PS: If I missed something just write a comment below.

    • Metin2 Dev 4
    • Love 21
×
×
  • 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.