Jump to content

Syriza

Banned
  • Posts

    259
  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Posts posted by Syriza

  1. vor 55 Minuten schrieb VegaS™:

    If you inserted the query with the good values and you've problem with time, you should use my

    This is the hidden content, please
    , already there're many features included, items with real time fixed, etc.

     

    is there a fix for 4 sockets? i tried to do your system with 4 socket, it didnt work. ( many others tried to help me unsuccesfully..)

    • Good 1
  2. vor einer Stunde schrieb Cien:

    Unfortunately there´s no Tutorial anywhere in regards to this. I´ve only found alot of Threads from people who seem to have the same Question, unfortunately again any answer posted doesn't help.

    In short, i would like to give certain Monster Elemental Damage Types so that the Resistances like Lightning, Dark etc reduce the Damage taken.

    As far as i can tell all of this is already implemented, my battle.cpp as an example:

    
    	//[ mob -> PC ] ¿ø¼Ò ¼Ó¼º ¹æ¾î Àû¿ë
    	//2013/01/17
    	//¸ó½ºÅÍ ¼Ó¼º°ø°Ý µ¥¹ÌÁöÀÇ 30%¿¡ ÇØ´çÇÏ´Â ¼öÄ¡¿¡¸¸ ÀúÇ×ÀÌ Àû¿ëµÊ.
    	if (pkAttacker->IsNPC() && pkVictim->IsPC())
    	{
    		if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ELEC))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ELEC))		/ 100;
    		else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_FIRE))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_FIRE))		/ 100;
    		else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_ICE))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_ICE))		/ 100;
    		else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_WIND))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_WIND))		/ 100;
    		else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_EARTH))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_EARTH))	/ 100;
    		else if (pkAttacker->IsRaceFlag(RACE_FLAG_ATT_DARK))
    			iAtk -= (iAtk * 30 * pkVictim->GetPoint(POINT_RESIST_DARK))		/ 100;
    	}
    		
    	
    	return iAtk;

    My Question is, how do i give certain Monster lightning Damage respectively an aditional Race Flag ?

    (as an example, certain Monster are weak against Devil and their Damage gets reduce by Lightning Resistance )

     

    In Mysql, just adding  ATT_ELEC as a new Raceflag in the mob_proto under setRaceFlag doesn't work.

     

    Thanks in advance.

     

     

    isnt this the calculation from martys source? why did you release it lol

    • Love 1
  3.  

    In ConstInfo.py:

    DONT_REMOVE_LOGIN_ID_PASSWORD_AFTER_WRONG_TRY = 0

     

     

    Intrologin.py change the function SetPasswordEditLineFocus

    	def SetPasswordEditLineFocus(self):
    		if constInfo.DONT_REMOVE_LOGIN_ID_PASSWORD_AFTER_WRONG_TRY:
    			if self.idEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨
    				self.idEditLine.SetText("")
    				self.idEditLine.SetFocus() #0000685: [M2EU] 아이디/비밀번호 유추 가능 버그 수정: 무조건 아이디로 포커스가 가게 만든다
    
    			if self.pwdEditLine != None: #0000862: [M2EU] 로그인창 팝업 에러: 종료시 먼저 None 설정됨
    				self.pwdEditLine.SetText("")
    		else:
    			if self.pwdEditLine != None:
    				self.pwdEditLine.SetFocus()

     

    • Love 2
  4. vor 10 Stunden schrieb VegaS™:

    If you want to do this in quest, you've to do a boolean variable in source and set it to true or false from quest functions like:

    
    pc.set_active_critical(true)
    pc.set_active_critical(false)

    If you don't know how to do it, you should use a simple pc quest flag.

    Quest:

    
    quest player begin
    	state start begin
    		when 20092.chat."Test Critical" with pc.get_map_index() == 100 begin
    			pc.setqf('disabled_critical_pct', select("Disable critical", "Enable critical") - 1)
    		end
    	end
    end
    -- or
    quest player begin
    	state start begin
    		when login with pc.get_map_index() == 100 begin
    			pc.setqf('disabled_critical_pct', 1)
    		end
    		
    		when logout with pc.get_map_index() == 100 begin
    			pc.setqf('disabled_critical_pct', 0)
    		end
    	end
    end

    Srcs/Server/game/src/char_battle.cpp (Line: 1745, 1889)

    
    // Search for:
    			if (number(1, 100) <= iCriticalPct)
    // Change with:
    			const bool isDisabledCriticalPct = pAttacker->GetQuestFlag("player.disabled_critical_pct") > 0;
    			if (!isDisabledCriticalPct && number(1, 100) <= iCriticalPct)

    Not tested.

     

    thanks needed this too!

  5. vor 2 Stunden schrieb devdeto:

    Userinterface.cpp

    1, put it to the beginning

    
    PVOID* find(const char *szFunc, HMODULE hModule)
    {
    	if (!hModule)
    		hModule = GetModuleHandle(0);
    
    	PIMAGE_DOS_HEADER img_dos_headers = (PIMAGE_DOS_HEADER)hModule;
    
    	PIMAGE_NT_HEADERS img_nt_headers = (PIMAGE_NT_HEADERS)((byte*)img_dos_headers + img_dos_headers->e_lfanew);
    
    	PIMAGE_IMPORT_DESCRIPTOR img_import_desc = (PIMAGE_IMPORT_DESCRIPTOR)((byte*)img_dos_headers + img_nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
    
    	if (img_dos_headers->e_magic != IMAGE_DOS_SIGNATURE)
    		printf("e_magic dos sig\n");
    
    	for (IMAGE_IMPORT_DESCRIPTOR *iid = img_import_desc; iid->Name != 0; iid++)
    	{
    		for (int func_idx = 0; *(func_idx + (void**)(iid->FirstThunk + (size_t)hModule)) != nullptr; func_idx++)
    		{
    			char* mod_func_name = (char*)(*(func_idx + (size_t*)(iid->OriginalFirstThunk + (size_t)hModule)) + (size_t)hModule + 2);
    
    			const intptr_t nmod_func_name = (intptr_t)mod_func_name;
    
    			if (nmod_func_name >= 0)
    			{
    				if (!::strcmp(szFunc, mod_func_name))
    					return func_idx + (void**)(iid->FirstThunk + (size_t)hModule);
    			}
    		}
    	}
    	return 0;
    }
    
    std::uint32_t detour_ptr(const char *szFunc, PVOID newfunction, HMODULE module)
    {
    	void **&&func_ptr = find(szFunc, module);
    
    	if (*func_ptr == newfunction || *func_ptr == nullptr)
    		return 0;
    
    	DWORD old_rights;
    	DWORD new_rights = PAGE_READWRITE;
    
    	VirtualProtect(func_ptr, sizeof (uintptr_t), new_rights, &old_rights);
    
    	uintptr_t ret = (uintptr_t)*func_ptr;
    
    	*func_ptr = newfunction;
    
    	VirtualProtect(func_ptr, sizeof (uintptr_t), old_rights, &new_rights);
    
    	return ret;
    }

    2, include

    
    #include <windows.h>
    #include <cstdint>

    3, WriteProcessMemory prototype, hook

    
    using WriteProcessMemoryFn = BOOL(__stdcall*)(HANDLE, LPVOID, LPCVOID, SIZE_T, SIZE_T*);
    WriteProcessMemoryFn oWriteProcessMemory;
    BOOL __stdcall hkWriteProcessMemory(HANDLE hProcess, LPVOID lpBaseAddress, LPCVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesWritten)
    {
    	return oWriteProcessMemory(nullptr, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten);
    }

    4, search-->  bool Main(HINSTANCE hInstance, LPSTR lpCmdLine)  and  put it to the beginning

    
        oWriteProcessMemory = (WriteProcessMemoryFn)detour_ptr("WriteProcessMemory", (PVOID)hkWriteProcessMemory, GetModuleHandleA("Kernel32.dll"));

     

     

    This not only protects the MemoryBreak, but also all the cheats that WriteProcessMemory changes the game.

    Now he's hooked, so if something invites WriteProcessMemory to get a nullpt to the handle.

     

     Original post

     

    thank you for your release!

    • Love 2
  6. Hey guys, i implemented the release from vegas About the Extension for item_award but if i insert a query there and start my server

    the data base core is crashing immediatly and i get Connection refused. if i delete the fourth socket column then the Server is starting with

    the query but then i get the error: unknown column socket3

     

    vegas said everything should be fine.. if anyone is able to help me i would pay him.

     

    and trust me i checked the Code everything should be ok... i really dont know why i have this error.

     

    This is the hidden content, please

    • Metin2 Dev 7
    • Good 1
  7. @ManiacRobert

     

    This is not my Code!! Ist from ManiacRobet

     

    		#ifdef __SASH_SYSTEM__
    		else if ((item->GetType() == ITEM_COSTUME) && (item->GetSubType() == COSTUME_SASH))
    		{
    			int lastSortInventoryPulse = GetEffectTimer();
    			int currentPulse = thecore_pulse();			
    			if (lastSortInventoryPulse > currentPulse) {
    				int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (currentPulse / PASSES_PER_SEC(1)));
    				int minutes = deltaInSeconds / 60;
    				int seconds = (deltaInSeconds - (minutes * 60));
    		
    			ChatPacket(CHAT_TYPE_INFO, "Efect-ul o sa apara din nou in %02d secunde.", seconds);
    			return false;
    			}
    			this->EffectPacket(SE_EFFECT_SASH_EQUIP);
    			SetEffectTimer(thecore_pulse() + PASSES_PER_SEC(10));
    
    		}
    		#endif

     

     

     

    char.h

     

    	protected:
    		CSafebox *			m_pkSafebox;
    		int					m_iSafeboxSize;
    		int					m_iSafeboxLoadTime;
    		int					m_ichtimer;
    #ifdef __SASH_SYSTEM__		
    		int					m_ieffect;
    #endif		
    		bool				m_bOpeningSafebox;	///< 창고가 열기 요청 중이거나 열려있는가 여부, true 일 경우 열기요청이거나 열려있음.
    
    		CSafebox *			m_pkMall;
    		int					m_iMallLoadTime;
    
    		PIXEL_POSITION		m_posSafeboxOpen;

     

     

    	public:
    		bool	IsOpenSafebox() const { return m_isOpenSafebox ? true : false; }
    		void 	SetOpenSafebox(bool b) { m_isOpenSafebox = b; }
    
    		int		GetSafeboxLoadTime() const { return m_iSafeboxLoadTime; }
    		void	SetSafeboxLoadTime() { m_iSafeboxLoadTime = thecore_pulse(); }
    
    
    		// int		GetChTime() const { return m_ichtimer; }
    		// void	SetChTime(int pulse) { m_ichtimer = pulse; }
    #ifdef __SASH_SYSTEM__		
    		int		GetEffectTimer() const { return m_ieffect; }
    		void	SetEffectTimer(int pulse) { m_ieffect = pulse; }		
    #endif		
    		//END_PREVENT_TRADE_WINDOW
    	private:
    		bool	m_isOpenSafebox;
    
    	public:
    		int		GetSkillPowerByLevel(int level, bool bMob = false) const;

     

    • 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.