Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: No autobuff en Offlevel.  (Visto 603 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline Odisk Posteado: March 23, 2020, 02:25:19 PM | Modificado: March 23, 2020, 02:38:49 PM by Odisk

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 882
  • Gracias recibida: 12301
  • pr
hola chicos tengo un problema con el autobuff en el offlevel por ejemplo

yo lo dejo en un spot y deberia consumir la mana estando en offlevel

aqui les dejo un ejemplo con el soul master

ya eh modificado el codigo de todas las manera y nada

Son las SRC De Exteam.

si alguien me puede colaborar como arreglar para que se ejecute, estoy proceso de aprendizaje..
Code: [Select]
//=====================================
// Dark Wizard Offline Experience
//=====================================
void cOffExp::DarkWizardOff(LPOBJ lpObj)
{
int SearchSkill = 0;
CMagicInf * lpMagic;

if(gObjGetMagicSearch( lpObj, 9) != NULL) SearchSkill = 9;
else if(gObjGetMagicSearch( lpObj, 445) != NULL) SearchSkill = 445;
else if(gObjGetMagicSearch( lpObj, 446) != NULL) SearchSkill = 446;
else if(gObjGetMagicSearch( lpObj, 447) != NULL) SearchSkill = 447;
else if(gObjGetMagicSearch( lpObj, 448) != NULL) SearchSkill = 448;
else if(gObjGetMagicSearch( lpObj, 449) != NULL) SearchSkill = 449;
else return;

lpMagic = gObjGetMagicSearch( lpObj, SearchSkill);
if(lpMagic==NULL) return;

gObjUseSkill.UseSkill(lpObj->m_Index, lpMagic,lpObj->X, lpObj->Y,0,0,-1);

int dis;
int tObjNum;
BYTE attr;
for (int n=0;n<MAX_VIEWPORT_MONSTER;n++)
{
tObjNum = lpObj->VpPlayer2[n].number;
if(lpObj->VpPlayer2[n].state == 0) continue;
if ( tObjNum >= 0 )
{
if ( gObj[tObjNum].Type == OBJ_MONSTER )
{
attr = MapC[gObj[tObjNum].MapNumber].GetAttr(gObj[tObjNum].X, gObj[tObjNum].Y);
if ( (attr&1) != 1 )
{
dis = gObjCalDistance(lpObj, &gObj[tObjNum]);
if(6 >= dis)
{
gObjAttack(lpObj, &gObj[tObjNum], lpMagic, FALSE, 1, 0, FALSE,0,0);
}
}
}
}
}

this->UseMana(lpObj->m_Index);
}



codigo para el que funcione el autobuff del mana.
Code: [Select]

void cOffExp::UseMana(int aIndex)
{
LPOBJ lpObj = &gObj[aIndex];

if(lpObj->Mana > 100) return;

int pos;

pos = gObjGetManaItemPos(aIndex);

if(pos == -1) return;

if( lpObj->pInventory[pos].m_Type == ITEMGET(14,4) ||
lpObj->pInventory[pos].m_Type == ITEMGET(14,5) ||
lpObj->pInventory[pos].m_Type == ITEMGET(14,6)  )
{
int tMana = (lpObj->pInventory[pos].m_Value*10) - (gObj[aIndex].Level);

if ( tMana < 0 )
{
tMana=0;
}

switch ( lpObj->pInventory[pos].m_Type )
{
case ITEMGET(14,4):
tMana += ((int)(gObj[aIndex].MaxMana + gObj[aIndex].AddMana))*20/100;
break;
case ITEMGET(14,5):
tMana += ((int)(gObj[aIndex].MaxMana + gObj[aIndex].AddMana))*30/100;
break;
case ITEMGET(14,6):
tMana += ((int)(gObj[aIndex].MaxMana + gObj[aIndex].AddMana))*40/100;
break;
}

gObj[aIndex].Mana += tMana;

if ( gObj[aIndex].Mana > (gObj[aIndex].MaxMana+gObj[aIndex].AddMana-1.0f) )
{
gObj[aIndex].Mana = gObj[aIndex].MaxMana+gObj[aIndex].AddMana;
}

GCManaSend(aIndex, (int)gObj[aIndex].Mana, 0xFF, 0, (int)gObj[aIndex].BP);

if ( !gObjSearchItemMinus(&gObj[aIndex], pos, 1) )
{
gObjInventoryItemSet(aIndex, pos, -1);
gObj[aIndex].pInventory[pos].Clear();
GCInventoryItemDeleteSend(aIndex, pos, 1);
}
}
}

.h
Citar
   void UseMana(int aIndex);


one day

Offline Odisk #1 Posteado: March 24, 2020, 12:17:49 AM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 882
  • Gracias recibida: 12301
  • pr
one day

Offline Odisk #2 Posteado: March 24, 2020, 02:44:17 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 882
  • Gracias recibida: 12301
  • pr
one day

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
914 Views
Last post September 19, 2019, 11:10:01 AM
by Dariox84
5 Replies
883 Views
Last post January 16, 2020, 06:24:30 PM
by kind
40 Replies
2388 Views
Last post February 07, 2021, 10:27:55 PM
by fallonrain
0 Replies
391 Views
Last post November 24, 2020, 08:43:46 AM
by Raptor
0 Replies
235 Views
Last post October 22, 2021, 11:34:06 AM
by marksync