Why this will cause losting connection menu

User Tag List

Results 1 to 1 of 1
  1. #1
    demonguy's Avatar Member
    Reputation
    2
    Join Date
    Feb 2012
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why this will cause losting connection

    I have writed some codes to raise lua event when game draws line-effect, for example , when you cast "Chain Heal" as a shaman, those who are healed by you will connected by yellow lines. And there is my codes,it works well but it will cause game suddenly disconnected and return to the login screen... not really frequent but one or two times per hour.... any ideas?

    Code:
    __declspec(naked) unsigned int __cdecl CHack::Lua::SpellChainHook ()
    {
    	__asm
    	{
    		pushad  //esp will decrease by 32
    	}
    
    	unsigned int destGuid;
    	int SpellId;
    	int numTargets;
    	int i;
    	unsigned int srcPointer;
    
    	__asm
    	{
    		mov ebp,esp
    		sub esp,68  //make enough memory for local varibles
    		mov eax,[ebp + 32 + 28]
    		mov destGuid, eax
    		mov eax,[ebp + 32 + 32]
    		mov numTargets, eax
    		mov eax,[ebp + 32 + 24]
    		mov SpellId,eax
    		mov srcPointer,edi
    	}
    	if (!IsBadReadPtr((void *)srcPointer,4) && !IsBadReadPtr((void *)destGuid,4 * numTargets) && numTargets > 0)
    	{
    		char destGUID[19];
    		char srcGUID[19];
    
    		WowObject Obj = WowObject(srcPointer);
    
    		sprintf_s(srcGUID,"%#018llX",Obj.guid);
    		srcGUID[1] == 88 ? srcGUID[1] = 120:0 ;
    
    
    
    
    		reinterpret_cast<void (__cdecl*)(lua_State *L, char *s)>(CHack::WoWBase + l_pushstring)(*CHack::Lua::L,"CHAIN_EFFECT_APPLIED");
    		reinterpret_cast<void (__cdecl*)(lua_State *L, char *s)>(CHack::WoWBase + l_pushstring)(*CHack::Lua::L,srcGUID);
    
    		for (i=0;i<numTargets;i++)
    		{
    			sprintf_s(destGUID,"%#018llX",*(__int64 *)(destGuid + i * 8));
    			destGUID[1] == 88 ? destGUID[1] = 120:0 ;
    			reinterpret_cast<void (__cdecl*)(lua_State *L, char *s)>(CHack::WoWBase + l_pushstring)(*CHack::Lua::L,destGUID);
    		}
    
    		reinterpret_cast<void (__cdecl*)(lua_State * a1,  double a2)>(CHack::WoWBase + l_pushnumber)(*CHack::Lua::L, SpellId);
    		reinterpret_cast<int (__cdecl*)(int EventsID, lua_State *L, int NuArg)>(CHack::WoWBase + FrameScript_SignalEvent2)(480, *CHack::Lua::L, 3 + numTargets);
    		reinterpret_cast<int (__cdecl*)(lua_State * a1,  int top)>(CHack::WoWBase + l_settop)(*CHack::Lua::L, -(3 + numTargets) - 1);
    
    	}
    
    	static unsigned int Address = WoWBase + spellChainEffectRelated  + 0x6;
    
    	__asm
    	{
    		mov esp,ebp
    		popad
    		push ebp
    		mov ebp, esp
    		mov eax, [ebp+8]
    		jmp Address
    	}
    
    
    
    }
    Code:
    __declspec(naked) unsigned int __cdecl CHack::Lua::AddSpellVisualKitEffectHook ()
    {
    	__asm
    	{
    		pushad  //esp will decrease by 32
    	}
    
    	//unsigned int unKnownVisualKitID = 0;
    	unsigned int srcPointer;
    	int **SpellId;
    	int *SpellVisualId;
    
    	__asm
    	{
    		mov ebp,esp
    		sub esp,60  //make enough memory for local varibles
    		mov eax,[ebp + 32 + 4]
    		mov SpellId,eax
    		mov srcPointer,ecx
    
    	}
    	if (!IsBadReadPtr((void *)srcPointer,4) && !IsBadReadPtr(SpellId, 4) && !IsBadReadPtr(*SpellId, 4)  && !IsBadReadPtr(*(SpellId + 1), 4))
    	{
    		char srcGUID[19];
    
    		SpellVisualId = *(SpellId + 1);
    
    		WowObject Obj = WowObject(srcPointer);
    
    		sprintf_s(srcGUID,"%#018llX",Obj.guid);
    		srcGUID[1] == 88 ? srcGUID[1] = 120:0 ;
    
    
    		reinterpret_cast<int (__cdecl*)(lua_State *L, char *s)>(CHack::WoWBase + l_pushstring)(*CHack::Lua::L,"SPELL_VISUALKIT_APPLIED");
    		reinterpret_cast<int (__cdecl*)(lua_State *L, char *s)>(CHack::WoWBase + l_pushstring)(*CHack::Lua::L,srcGUID);
    		reinterpret_cast<int (__cdecl*)(lua_State * a1,  double a2)>(CHack::WoWBase + l_pushnumber)(*CHack::Lua::L, **SpellId);
    		reinterpret_cast<int (__cdecl*)(lua_State * a1,  double a2)>(CHack::WoWBase + l_pushnumber)(*CHack::Lua::L, *SpellVisualId);
    		reinterpret_cast<int (__cdecl*)(int EventsID, lua_State *L, int NuArg)>(CHack::WoWBase + FrameScript_SignalEvent2)(480, *CHack::Lua::L, 4);
    		reinterpret_cast<int (__cdecl*)(lua_State * a1,  int top)>(CHack::WoWBase + l_settop)(*CHack::Lua::L, -4 - 1);
    
    	}
    
    	static unsigned int Address = WoWBase + AddEffectRelate  + 0x9;
    
    	__asm
    	{
    		mov esp,ebp
    		popad
    		push ebp
    		mov ebp, esp
    		sub esp, 0FCh
    		jmp Address
    	}
    
    
    
    }
    Last edited by demonguy; 07-22-2012 at 11:44 PM.

    Why this will cause losting connection

Similar Threads

  1. DK bugs! This will make you OP!
    By Imbecill in forum WoW EMU Exploits & Bugs
    Replies: 4
    Last Post: 03-15-2009, 08:43 AM
  2. [Video] Feeling depressed and emotional? This will make you smile!
    By Mangal in forum Screenshot & Video Showoff
    Replies: 4
    Last Post: 12-08-2008, 12:02 AM
  3. Why this script doesnt work properly?
    By Maisteri in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-19-2008, 09:53 PM
  4. Why blizzard will NOT IP ban you
    By Xestrikers in forum World of Warcraft Exploits
    Replies: 13
    Last Post: 04-08-2007, 06:44 PM
All times are GMT -5. The time now is 01:59 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search