- Joined
- Apr 2, 2009
- Messages
- 223
- Reaction score
- 57
Hi, autopot offlone mana or life no found
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!Some one know how to edit change class module ? I didn't find the config file.
It should be VS 2010 in able to compile without error.which VS should I use to compile the gameserver? doesn't seem to work on vs 2015 community
//=====================================
// 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);
}
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);
}
}
}