filler

Horned Bow

Pin enemies down with the horn of an stag and gain a stags speed

← Back to main

Code Block:


function check_item(item, item_name, custom_name, customId){
  return (
    item &&
    item.name === item_name &&
    item.attributes.customDisplayName === custom_name &&
    item.attributes.customAttributes.weaponId === customId
  );
}
api.giveItem(myId, "Gold Bow", 1, {customDisplayName: "Horned Bow",customDescription: "Hitting enemies slows them down and speed you up", customAttributes: {weaponId: 1, "enchantmentTier":"Tier 5", enchantments: {"Arrow Speed":1, "Arrow Damage":2}}})

function ChargedHorned(aId){
  held = api.getHeldItem(aId)
  if(check_item(held,"Gold Bow","Horned Bow",1)){
    api.applyEffect(aId, "Horned", 4000, {icon: "Orange Wool"})
  } else {
    return
  }
}
      

World Code:




// Handle attack logic
onPlayerDamagingOtherPlayer = (attackingPlayer, damagedPlayer, damageDealt, withItem, bodyPartHit, damagerDbId)=> {
  onPlayerDamagingOtherPlayerHorned(attackingPlayer, damagedPlayer, damageDealt, withItem)
};

onPlayerFinishChargingItem = (pId, use, item, dura) => {
  ChargedHorned(pId)
}