Jump to content

PeaceMaker

Member
  • Posts

    403
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by PeaceMaker

  1. On 1/11/2017 at 3:20 AM, Exygo said:

    Story: Over time I learned that the SetEvent function can cause weird problems in Metin2, maybe you have this bug or maybe not, I actually encountered this problem and found the fix.

    How to trigger the bug:

    1. Use this quest for a test:

    
    quest test begin
    	state start begin
    		when 9003.chat."quest test" begin
    			say("Hey we are doing a test here")
    			local o = select("option 1","option 2")
    			if o == 1 then
    				return
    			elseif o == 2 then
    				return
    			end
    		end
    	end
    end

    2. Now you click on the NPC, choose "quest test" option and don't click on any option(1,2)

    3. /transfer your_character with another GM account

    4. The character who clicked on "quest test" option and didn't choose any of the sub-options (1 or 2 ) will now have an invisible stucked window on the center and can't click on the ground or click the area in the center of the screen(where the quest ui was before teleportation)

     

    How to fix it:

    1. Go to uiQuest.py

    2. In def MakeQuestion find the SetEvent functions and edit them as below:

    
    	def MakeQuestion(self, n):
    		global entire_questbutton_number
    		global entire_questpage_number
    		global cur_questpage_number
    		entire_questpage_number = ((n-2)/7)+1
    		entire_questbutton_number = n
    		
    		if not self.board:
    			return
    
    		self.btnAnswer = [self.MakeEachButton(i) for i in xrange (n)]
    			
    		import localeInfo
    		self.prevbutton = self.MakeNextPrevPageButton()
    		self.prevbutton.SetPosition(self.sx+self.board.GetWidth()/2-164, self.board.GetHeight()/2-16)
    		self.prevbutton.SetText(localeInfo.UI_PREVPAGE)
    		#self.prevbutton.SetEvent(self.PrevQuestPageEvent, 1, n) # buggy
    		self.prevbutton.SAFE_SetEvent(self.PrevQuestPageEvent, 1, n) # unbuggy
    
    		self.nextbutton = self.MakeNextPrevPageButton()
    		self.nextbutton.SetPosition(self.sx+self.board.GetWidth()/2+112, self.board.GetHeight()/2-16)
    		self.nextbutton.SetText(localeInfo.UI_NEXTPAGE)
    		#self.nextbutton.SetEvent(self.NextQuestPageEvent, 1, n) # buggy
    		self.nextbutton.SAFE_SetEvent(self.NextQuestPageEvent, 1, n) # unbuggy
    
    		if cur_questpage_number != 1:
    			cur_questpage_number = 1

    Note: After that you should check for other SetEvent functions (comment them and see if the bug still happens)

    Info: The bug has something to do with the function arguments

    Other locations where this bug caused problems:

    • intrologin.py - can cause the arrow keys,enter,esc to not work in the select character phase

     

    https://metin2.download/picture/1k8elT1GJR9eS136n5KR9HhRwUYRDrUy/.png 

    any idea ? 

    • Metin2 Dev 1
  2. On 12/14/2016 at 3:25 AM, MORTE said:

     

    On 12/13/2016 at 6:56 PM, 127.0.0.1 said:

    My name is ramy, I'm a junior programmer with experience of about two years in (STL , boost .. and soo on ) I live Netherlands since 10 years, but i was born in USA :) Now I'll show you how you can protect your tea-keys against hackers. I love very much c ++ 11 / c ++ 17, so the codes will only work with Visual Studio 2013 or higher.

    I saw someone selling it, so I thought to give you something better, I think.

    I came to this forum because someone hired me to work on his server and he recommended me to come here if I need help, ever.

    Firstly include those two STL headers  intro EterPack.h

    
    #include <cstdint>
    #include <array>

    EterPack.h

    
    struct TeaKey
    {
    // Date: 01 . 12 . 2016
    // Author: Ramy overflow
    	TeaKey(std::array<DWORD, 4>src): data_(src), copy(src) {}
    
    	operator const std::uint8_t *()const
    	{
    		return reinterpret_cast<const std::uint8_t *>(data_.data());
    	}
    
    	operator const DWORD *()const
    	{
    		return data_.data();
    	}
    
    	operator DWORD *()const
    	{
    		return copy.data();
    	}
    
    private:
    	std::array<DWORD, 4>data_;
    	mutable std::array<DWORD, 4>copy;
    };

     

    EterPack.cpp

    
    const TeaKey &s_adwEterPackKey()
    {
    // Date: 01 . 12 . 2016
    // Author: Ramy overflow
    	static const TeaKey key
    	{
    		std::array < DWORD, 4 > {{
    				45129401UL,
    				92367215UL,
    				681285731UL,
    				1710201UL,
    			}
    		}
    	};
    	return key;
    }
    
    const TeaKey &s_adwEterPackSecurityKey()
    {
    // Date: 01 . 12 . 2016
    // Author: Ramy overflow
    	static const TeaKey key
    	{
    		std::array < DWORD, 4 > {{
    				78952482UL,
    				527348324UL,
    				1632942UL,
    				486274726UL,
    			}
    		}
    	};
    	return key;
    }

    And now search for all  s_adwEterPackKey / s_adwEterPackSecurityKey and replace with  s_adwEterPackKey() / s_adwEterPackSecurityKey() so just add an ()  because it's a function :)

     

    Sincerely , Ramy overfow :)

    so which method is betteR ? or both are shit ? xD

  3. If you're able to block m2bob and lalaker1 , ill be your first customer :)

    Ah and to answer your questions , 

    Is there still a demand for anti-cheating solutions?

    Of course , i can get you at least 10 customers 

    Are solutions on the market any good? What is my competition?

    No they're not , the only way to block m2bob or lalaker1 is to pay for whitelisting your server ... which is not good at all 



    i'm happy to see someone again concerned in fighting these hackers 

    • Love 1
×
×
  • 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.