Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: HELP WITH TARGET  (Visto 2471 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline RifleMaN_ Posteado: November 30, 2023, 09:54:33 PM | Modificado: November 30, 2023, 10:19:23 PM by RifleMaN_

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar
protocol.cpp

      LPOBJ lpObj = &gObj[aIndex];
      LPOBJ lpTargetObj = &gObj[aIndex];

      switch (protoNum)
      {
      case 0x1E:
         Speed.Skill(lpObj, lpObj->UseMagicNumber, lpTargetObj);

         if (DataEncryptCheck(aIndex, protoNum, Encrypt) != FALSE)
         {
            CGDurationMagicRecv((PMSG_DURATION_MAGIC_RECV *)aRecv, aIndex);
         }
         break;

in Speed.cpp I'm trying to use:
GCDamageSend(lpObj->m_Index, lpTargetObj->m_Index, 0, 0, 0);
But Target is detecting the character itself, how to switch to the enemy?

source 1.01t fireteam

Gracias:


Offline RifleMaN_ #1 Posteado: December 01, 2023, 01:42:14 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar

Offline RifleMaN_ #2 Posteado: December 01, 2023, 09:05:52 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar

Offline realman #3 Posteado: December 02, 2023, 08:51:19 AM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1404
  • md
 LPOBJ lpObj = &gObj[aIndex];
      LPOBJ lpTargetObj = &gObj[aIndex];  <-- HERE

ofk you will get your self if you add to both same aIndex

Discord: mercurialxen
Final

Offline RifleMaN_ #4 Posteado: December 02, 2023, 01:54:54 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar
LPOBJ lpObj = &gObj[aIndex];
      LPOBJ lpTargetObj = &gObj[aIndex];  <-- HERE

ofk you will get your self if you add to both same aIndex

How to Have the Enemy Index?


Offline realman #5 Posteado: December 02, 2023, 02:07:08 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1404
  • md
LPOBJ lpObj = &gObj[aIndex];
      LPOBJ lpTargetObj = &gObj[aIndex];  <-- HERE

ofk you will get your self if you add to both same aIndex

How to Have the Enemy Index?

im not Vanga
send me code of this moment and i will check

Discord: mercurialxen
Final

Gracias:


Offline RifleMaN_ #6 Posteado: December 03, 2023, 01:06:11 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar
LPOBJ lpObj = &gObj[aIndex];
      LPOBJ lpTargetObj = &gObj[aIndex];  <-- HERE

ofk you will get your self if you add to both same aIndex

How to Have the Enemy Index?

im not Vanga
send me code of this moment and i will check

Protocol.cpp
      LPOBJ lpObj = &gObj[aIndex];

      switch (protoNum)
      {
      case 0x19:
         Speed.Skill(lpObj, lpObj->UseMagicNumber);

         if (DataEncryptCheck(aIndex, protoNum, Encrypt) != FALSE)
         {
            CGMagicAttack((PMSG_MAGICATTACK *)aRecv, aIndex);
         }
         break;
      case 0x1E:
         Speed.Skill(lpObj, lpObj->UseMagicNumber);

         if (DataEncryptCheck(aIndex, protoNum, Encrypt) != FALSE)
         {
            CGDurationMagicRecv((PMSG_DURATION_MAGIC_RECV *)aRecv, aIndex);
         }
         break;

Speed.cpp

               else if (lpObj->HackSkillCount[this->SpeedStruct[lpObj->m_Index]._Skill] > this->SkillStruct._Velocity && this->SkillStruct._Type == 0)
               {
                  if (this->SpeedStruct[lpObj->m_Index]._Sended == false)
                  {

                     GCDamageSend(lpObj->m_Index, lpTargetObj->m_Index, 0, 0, 0);

                  }
               }

to use the GCDamageSend function that needs the protocol target

I'm trying to edit like this:

      LPOBJ lpObj = &gObj[aIndex];
                LPOBJ lpTargetObj = &gObj[aIndex];

      switch (protoNum)
      {
      case 0x19:
         Speed.Skill(lpObj, lpObj->UseMagicNumber, lpTargetObj);

         if (DataEncryptCheck(aIndex, protoNum, Encrypt) != FALSE)
         {
            CGMagicAttack((PMSG_MAGICATTACK *)aRecv, aIndex);
         }
         break;
      case 0x1E:
         Speed.Skill(lpObj, lpObj->UseMagicNumber, lpTargetObj);

         if (DataEncryptCheck(aIndex, protoNum, Encrypt) != FALSE)
         {
            CGDurationMagicRecv((PMSG_DURATION_MAGIC_RECV *)aRecv, aIndex);
         }
         break;

I believe that here would be something else  LPOBJ lpTargetObj = &gObj[aIndex];


Offline realman #7 Posteado: December 03, 2023, 01:25:06 PM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 106
  • Gracias recibida: 1404
  • md
its wrong code
i can get TARGET index only inside of function
CGMagicAttack
CGDurationMagicRecv

Discord: mercurialxen
Final

Online Specifier #8 Posteado: December 04, 2023, 04:23:50 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 718
  • Gracias recibida: 5852
  • ae
use this instead
Code: [Select]
 LPOBJ lpTargetObj = &gObj[aIndex];

and declare it inside the function

---------------------------[NULL]---------------------------------

Offline RifleMaN_ #9 Posteado: December 04, 2023, 07:50:55 PM

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 95
  • Gracias recibida: 15
  • ar
use this instead
Code: [Select]
 LPOBJ lpTargetObj = &gObj[aIndex];

and declare it inside the function

is already using LPOBJ lpTargetObj = &gObj[aIndex]


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
1 Replies
1245 Views
Last post June 09, 2020, 04:54:03 PM
by Pasa_Pal_Fondo
3 Replies
1245 Views
Last post September 03, 2020, 10:45:12 PM
by iSh4dow
6 Replies
1482 Views
Last post May 09, 2021, 02:50:30 PM
by xtestx
0 Replies
477 Views
Last post May 04, 2021, 07:06:47 PM
by xtestx