Sword of a 100 Damage
Troll Item: A Sword that does 100 damage. To you :p
← Back to main
Code Block:
api.giveItem(myId, "Stone Sword", 1, {
customDisplayName: "Sword of a 100 Damage"
});
World Code:
onPlayerDamagingOtherPlayer = function(attackerId, victimId, damage, withItem, bodyPartHit, damagerDbId) {
api.attemptApplyDamage({
eId: attackerId,
hitEId: attackerId,
attemptedDmgAmt: 100,
withItem: "Stone Sword"
showCritParticles: true,
broadcastEntityHurt: true,
isTrueDamage: true,
})
};
onPlayerKilledOtherPlayer = (attackerId, killedId, damageDealt, withItem) => {
if (attackerId === killedId){
api.setClientOption(killedId, "respawnButtonText", "I didn't say which player takes the 100 damage")
} else{
api.setClientOption(killedId, "respawnButtonText", "general:respawn")
}
}