I have made a hack for diablo 2, Im crashing in the game please help

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

BeginerHere

Newbie
Full Member
Aug 6, 2012
16
252
0
I have made this code. And I seem to be crashing in the game. Here is the codes I used. Do you maybe know why Im crashing?
C++:
if (Packet[0] == 0x4C && Packet[1] == UNIT_TYPE_PLAYER)
  {
   LPUNITANY pUnit = GetUnit(*(LPDWORD)&Packet[2], UNIT_TYPE_PLAYER);

     if (!pUnit)
     return TRUE;

   D2SpellInfo Spell;
   GetSkillInfo(*(LPDWORD)&Packet[6], &Spell);

   //Print(0, 5, "%s casted level ÿc3%d ÿc5%s", pUnit->pPlayerData->szName, Packet[8], Spell.szSpellName);

   if (*(LPDWORD)&Packet[10] == Me->dwUnitId && !InTown(Me) && V_TPWhenAttacked)
   {
     if (Spell.dwSpellInfoFlag & DSI_PARTYCAST)
      return TRUE;

     LPROSTERUNIT pRoster = FindPartyById(pUnit->dwUnitId);

     if (!pRoster)
      return TRUE;

     DWORD dwFlags = GetPvPFlags(pRoster->dwUnitId);

     if (dwFlags & PVP_HOSTILED_BY_YOU || dwFlags & PVP_HOSTILED_YOU)
     {
      Print(0, 4, "ÿc5Escape: ÿc-1%s attacked you", pRoster->szName);

      if (Portal())
        V_TP = TRUE;
      else
        ExitGame();
     }
   }

   return TRUE;
  }

  if (Packet[0] == 0x4D && Packet[1] == UNIT_TYPE_PLAYER)
  {
   LPUNITANY pUnit = GetUnit(*(LPDWORD)&Packet[2], UNIT_TYPE_PLAYER);

   if (!pUnit)
     return TRUE;

   D2SpellInfo Spell;
   GetSkillInfo(*(LPWORD)&Packet[6], &Spell);

   Print(0, 5, "%s casted level ÿc3%d ÿc5%s", pUnit->pPlayerData->szName, Packet[10], Spell.szSpellName);

   return TRUE;
  }
Edit:Use code tags [#]
 

Attachments

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
I don't have much experience with packets, maybe someone like Konsowa can give you some insight on this.

Fleep
 

konsowa

Coder
Full Member
Nobleman
May 24, 2012
178
753
3
Well check if spell is casted if u don't print anything
 

BeginerHere

Newbie
Full Member
Aug 6, 2012
16
252
0
Well basically. What this does is reads and prints what every charater in the game is casting. And what level it is.

If nothing is casted. Nor printed onthe screen. I dont crash
 

BeginerHere

Newbie
Full Member
Aug 6, 2012
16
252
0
Well the packets it self prints into the game. I have attached my packets.cpp to this post.
It doesnt use the chat functions when it prints
 

wessie

Newbie
Full Member
Jul 5, 2012
22
272
2
A few things can be wrong:

1) Offsets
2) Structures (i dont see the full code, but every code is build on them)
3) Did you included the right libs?

What you can try is get OllyDBG & Reclass and start reversing all the stuff again, it might be a bit of work but if the hack is that impotent it will payout :)
 

BeginerHere

Newbie
Full Member
Aug 6, 2012
16
252
0
im readdy to delete this. Ive almost had enough.

I even took out all the new edits I did and still crashed.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods League of Legends Accounts