Have you got a method to actually check the amount of arrows a player has? I haven't looked at PI code in a long time but you could do a check like
if (arrows < 0)
c.sendMessage("You have run out of arrows!");
|
On my server when you are ranging and then switch to a weapon it stats the message, "You have run out of arrows."
I looked in combatassistant and found the follow. Anyone know a fix for this issue?
Code:if (!c.usingCross && !usingArrows && c.usingBow && (c.playerEquipment[Player.playerWeapon] < 4212 || c.playerEquipment[Player.playerWeapon] > 4223) && !c.usingMagic) { if (c.playerEquipment[Player.playerWeapon] == 15241) c.sendMessage("You have fun out of shots."); else c.sendMessage("You have run out of arrows!"); c.stopMovement(); c.getCombat().resetPlayerAttack(); return; }
Have you got a method to actually check the amount of arrows a player has? I haven't looked at PI code in a long time but you could do a check like
if (arrows < 0)
c.sendMessage("You have run out of arrows!");
Well it doesn't change the attack type so even if they have enough it try's to range and go to you can use this item with these arrows.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |