Display Range of Melee Weapons

Results 1 to 4 of 4
  1. #1
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Display Range of Melee Weapons

    Simple little thing, I am not a c++ coder so there prob is a better way that someone will post but this works.

    ZShopEquipItem.cpp
    Find:
    PHP Code:
    if(pItemDesc->m_nDelay.Ref()) {
                
    sprintf(temp,"%s : %d\n"ZMsgMSG_WORD_DELAY), pItemDesc->m_nDelay.Ref());
                
    str += temp;
            } 
    Paste Underneath:
    PHP Code:
                    if(pItemDesc->m_nRange.Ref()) {
                switch(
    pItemDesc->m_nWeaponType.Ref()) {
                    case 
    MWT_DAGGER:
                    case 
    MWT_DUAL_DAGGER
                    case 
    MWT_KATANA:
                    case 
    MWT_GREAT_SWORD:
                    case 
    MWT_DOUBLE_KATANA:
                        
    sprintf(temp,"%s : %d\n""Range"pItemDesc->m_nRange.Ref());
                        
    str += temp;
                        break;
                }
            } 
    Also for controllability(named "Spread" to make more sense to people)

    PHP Code:
                            if(pItemDesc->m_nControllability.Ref()) {
                switch(
    pItemDesc->m_nWeaponType.Ref()) {
                    case 
    MWT_PISTOL:
                    case 
    MWT_PISTOLx2:
                    case 
    MWT_REVOLVER:
                    case 
    MWT_REVOLVERx2:
                    case 
    MWT_SMG:
                    case 
    MWT_SMGx2:
                    case 
    MWT_SHOTGUN:
                    case 
    MWT_SAWED_SHOTGUN:
                    case 
    MWT_RIFLE:
                    case 
    MWT_MACHINEGUN:
                    case 
    MWT_ROCKET:
                    case 
    MWT_SNIFER:
                        
    sprintf(temp,"%s : %d\n""Spread"pItemDesc->m_nControllability.Ref());
                        
    str += temp;
                        break;
                }
            } 
    For ID (Credits: Mr_Troy)
    Line 131
    PHP Code:
    sprintf(temp,"Item ID : %d\n"pItemDesc->m_nID);       
    str+=temp
    if anyone could figure out/tell me how to get the ID, I keep running into a problem.
    Last edited by OJuice; 11-08-13 at 01:21 AM.


  2. #2
    Account Upgraded | Title Enabled! medotarek is offline
    MemberRank
    Apr 2012 Join Date
    Egypt/RageZoneLocation
    615Posts

    Re: Display Range of Melee Weapons

    Quote Originally Posted by OJuice View Post
    Simple little thing, I am not a c++ coder so there prob is a better way that someone will post but this works.

    ZShopEquipItem.cpp
    Find:
    Code:
    if(pItemDesc->m_nDelay.Ref()) {
    			sprintf(temp,"%s : %d\n", ZMsg( MSG_WORD_DELAY), pItemDesc->m_nDelay.Ref());
    			str += temp;
    		}
    Paste Underneath:
    Code:
    if(pItemDesc->m_nRange.Ref()) {
    			switch(pItemDesc->m_nWeaponType.Ref()) {
    				case MWT_DAGGER:
    				case MWT_DUAL_DAGGER: 
    				case MWT_KATANA:
    				case MWT_GREAT_SWORD:
    				case MWT_DOUBLE_KATANA:
    					sprintf(temp,"%s : %d\n", "Range", pItemDesc->m_nRange.Ref());
    					str += temp;
    					break;
    			}
    		}
    if anyone could figure out/tell me how to get the ID, I keep running into a problem.
    Nice with this way we can add item id too and else

  3. #3
    Proficient Member Mr_Troy is offline
    MemberRank
    Jun 2007 Join Date
    172Posts

    Re: Display Range of Melee Weapons

    Code:
            sprintf(temp,"Item ID : %d\n", pItemDesc->m_nID);       
            str+=temp;

  4. #4
    I like pie OJuice is offline
    MemberRank
    Jul 2011 Join Date
    205Posts

    Re: Display Range of Melee Weapons

    Quote Originally Posted by Mr_Troy View Post
    Code:
            sprintf(temp,"Item ID : %d\n", pItemDesc->m_nID);       
            str+=temp;
    i get an error every time i try that

    EDIT: nvm ive been trying to do m_nID.ref() lol. I spent so long trying to figure that out, thanks



Advertisement