TUServerMU
MuOnline => Soporte / Ayudas => Tema comenzado por: copixx on August 05, 2019, 07:49:12 PM
-
Buenas noches! Tengo este source en el offattack de los sources ExTeam (S3 o S6 son iguales) pero no funciona, o sea, no consume las pociones de mana. Si algun coder sabe como fixearlo o programarlo se los agradezco!
P.D: estuve intentando pero no se codear, fixie otras cosas pero esto no puedo :/ este es el link de los sources: http://tuservermu.com.ve/index.php?topic=24208.0
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) - (lpObj->Level);
if ( tMana < 0 )
{
tMana=0;
}
switch ( lpObj->pInventory[pos].m_Type )
{
case ITEMGET(14,4):
tMana += ((int)(lpObj->MaxMana + lpObj->AddMana))*20/100;
break;
case ITEMGET(14,5):
tMana += ((int)(lpObj->MaxMana + lpObj->AddMana))*30/100;
break;
case ITEMGET(14,6):
tMana += ((int)(lpObj->MaxMana + lpObj->AddMana))*40/100;
break;
}
lpObj->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);
}
}
}
-
Estas usando el comando o la ventana que se abre del offattack ?