#Sword where the sharpness increases per kill

1 messages · Page 1 of 1 (latest)

stark canopy
#

i am trying to make a few op weapons for a event of mine but i dont know how to start with this one how would this be done?

languid sable
#

Hello!
For every player kill you can use this:

on death:
 if victim is a player:
  if attacker is a player:
   set {_lvl} to level of sharpness of attacker's tool
   set level of sharpness of attacker's tool to {_lvl}+1
   message "&eYour weapon got sharpness upgraded to level %level of sharpness of attacker's tool%" to attacker

Hopefully this helps :)

stark canopy
#

alright thank you

languid sable
#

No problem :D

stark canopy
#

how would i make it work for only one specific weapon

languid sable
#

if attacker's item is stone sword named "name":

Add that in between if attacker is a player and set {_lvl} to level of sharpness of attacker's tool

Then change the type of item and name

stark canopy
#

alright thanks

languid sable
#

Np, but if they aren't holding it you might need to loop their inventory, to check if they have it in there.

loop attacker's inventory:
 if loop-value is stone sword named "name":```

This is only if you want any weapon in their inventory to increase the sharpness level of the specific item
#

If not just ignore lol

stark canopy
#

ok

#

on death:
if victim is a pig:
if attacker is a player:
if attacker's item is diamond sword:
set {_lvl} to level of sharpness of attacker's tool
set level of sharpness of attacker's tool to {_lvl}+1
message "&eYour weapon got sharpness upgraded to level %level of sharpness of attacker's tool%" to attacker

#

that wont work now did i do it wrong?

stark canopy
languid sable
#

Because there's a colon at the end, you will need to add 1 space to everything after it:

 if victim is a player:
  if attacker is a player:
   if attacker's item is stone sword named "name":
    set {_lvl} to level of sharpness of attacker's tool
    set level of sharpness of attacker's tool to {_lvl}+1
    message "&eYour weapon got sharpness upgraded to level %level of sharpness of attacker's tool%" to attacker```
stark canopy
#

okay