Thread: 2h weapons

Results 1 to 7 of 7
  1. #1 2h weapons 
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    can someone help me to stop this bug pls
    i can wield bow and kite ,d axe with kite etc in the same time
    pls help me
    i added this in process but dont work(
    if (playerEquipment[playerShield] == 7336 && (playerEquipment[playerWeapon] == 4718)){
    remove(playerEquipment[playerWeapon], 3);
    sendMessage(" You cant equip a 2h weapon and a shield ");
    }

    if (playerEquipment[playerWeapon] == 4718 && (playerEquipment[playerShield] == 7336)){
    remove(playerEquipment[playerWeapon], 3);
    sendMessage(" You cant equip a 2h weapon and a shield ");
    }

    i use devo 2,7 base!pls help me i wil rep u+++
    Reply With Quote  
     

  2. #2  
    Registered Member
    G0nzo's Avatar
    Join Date
    Feb 2009
    Posts
    4,960
    Thanks given
    514
    Thanks received
    546
    Rep Power
    1735
    hmm

    Code:
    if (playerEquipment[playerShield] == 7336 && (playerEquipment[playerWeapon] == 4718)){
    remove(playerEquipment[playerWeapon],  4718);
    sendMessage(" You cant equip a 2h weapon and a shield ");
    }
    Computer Science Graduate, Java Expert
    Need help with something? PM me
    Reply With Quote  
     

  3. #3  
    Registered Member
    wouha's Avatar
    Join Date
    Feb 2008
    Age
    30
    Posts
    1,034
    Thanks given
    8
    Thanks received
    16
    Rep Power
    297
    Quote Originally Posted by G0nzo View Post
    hmm

    Code:
    if (playerEquipment[playerShield] == 7336 && (playerEquipment[playerWeapon] == 4718)){
    remove(playerEquipment[playerWeapon],  4718);
    sendMessage(" You cant equip a 2h weapon and a shield ");
    }
    lol.... worsest way every to do it, it will cause deleting items..

    ontopic

    add it at the other 2h swords, find 2h somewhere in the files, i know there there.
    .
    Reply With Quote  
     

  4. #4  
    Registered Member
    G0nzo's Avatar
    Join Date
    Feb 2009
    Posts
    4,960
    Thanks given
    514
    Thanks received
    546
    Rep Power
    1735
    i just changed his code to remove the right item lol
    Computer Science Graduate, Java Expert
    Need help with something? PM me
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    add it at the other 2h swords, find 2h somewhere in the files, i know there there.
    in what class?can u tell me what item is added like 2h?or a two hands weapon please
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    int targetSlot = 0;
    targetSlot = itemType(wearID);
    int[] two_hand = { 1319, 4718, 4726, 1409, 4710, 7158 };
    for (int element : two_hand) {
    if ((wearID == element) && (playerEquipment[playerShield] > 0)) {
    if (playerHasItem(-1)) {
    addItem(playerEquipment[playerShield], 1);
    playerEquipment[playerShield] = -1;
    } else {
    CAM().sendMessage("You can't wear this weapon with a shield");
    return false;
    }
    }
    if ((itemType(wearID) == playerShield)
    && (playerEquipment[playerWeapon] == element)) {
    if (playerHasItem(-1)) {
    addItem(playerEquipment[playerWeapon], 1);
    playerEquipment[playerWeapon] = -1;
    } else {
    CAM().sendMessage("You can't wear a shield with this weapon");
    return false;
    }
    }
    look my dh axe is here but if i have my inventary full u can wear a kite but he delete ur weapon
    hmm
    how i fix this?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jul 2008
    Posts
    3,163
    Thanks given
    235
    Thanks received
    74
    Rep Power
    209
    someone pls?
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •