yes
add this in attackplayer method
with this you don't need to add anything elseCode:if (c.playerEquipment[c.playerRing] == itemID) { return; }
|
Do anyone know if there is released any snippet for this:
To disable some items on pk.
Example: I don't want owner to wear pring on pk [etc edge, green dragon, and other pking areas.] Or disable pk tele if someone's wearing pring.
Any idea ? o-O
yes
add this in attackplayer method
with this you don't need to add anything elseCode:if (c.playerEquipment[c.playerRing] == itemID) { return; }
Thanks
Not sure if you have the wilderness line in your server where you have to cross, but they can always enter while wearing a P'ring, I personally just removed the P'Ring altogether.
Or a better way would to to have a array of items, and if the player is wearing any of the items from the array, don't allow him to attack/be attacked.
Code:int[] cantEquip = { 1, 2, 3, 4 }; for (int cant : cantEquip) { if (c.playerEquipment[c.playerHat] == cant) { c.sendMessage("You can't equip these items!"); return; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |