[Help] add option

Results 1 to 1 of 1
  1. #1
    Valued Member Versgar is offline
    MemberRank
    Dec 2015 Join Date
    116Posts

    [Help] add option

    Help,can't figure out how to do that if the inventory is a certain item he needs to add the option character.


    here is an example code.

    Protocol
    PHP Code:
    case 0x26:            
    CGUseItemRecv((PMSG_USEITEM *)aRecvaIndex);            
    CustomJewels.CGUseItemRecv((PMSG_USEITEM*)aRecv,aIndex);           
    break; 
    PHP Code:
    bool CGUseItemRecv(PMSG_USEITEMlpMsgint aIndex){    if(aIndex OBJECT_MAX)       
    return 
    true;    
    OBJECTSTRUCT *gObj = (OBJECTSTRUCT*)OBJECT_POINTER(aIndex);    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,120)) //Talisman Of Damage    {        
    gObj->m_AttackDamageMin += 10;// 10%        
    gObj->m_AttackDamageMax += 10;// 10%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,121)) //Talisman Of Defence    {        
    gObj->m_Defense += 10// 10%        
    gObj->m_MagicDefense += 10// 10%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,122)) //Talisman Of Double    {        
    gObj->SetOpDoubleDamage += 3//3%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,123)) //Talisman Of Exellent    {        
    gObj->m_ExcelentDamage += 100// 5%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,124)) //Talisman Of Critical    {        
    gObj->m_CriticalDamage += 5// 5%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,126)) //Talisman Of Ignore    {        
    gObj->SetOpIgnoreDefense += 3// 3%    
    }    
    if(
    gObj->pInventory[lpMsg->inventoryPos].m_Type == ITEMGET(14,127)) //Talisman Of Reflect    {        
    gObj->SetOpReflectionDamage += 5// 5%    
    }    
    return 
    false;





Advertisement