on death of player:
if victim's held item is a totem of undying:
if {totemCooldown::%victim%} is not set:
cancel event
set victim's health to victim's maximum health
send "&aYou have been revived by the power of the totem!" to victim
play sound "entity.totem.use" to victim
play 10 of particle "redstone" at location of victim offset 0.5, 0.5, 0.5
set {totemCooldown::%victim%} to now
else if difference between now and {totemCooldown::%victim%} is less than 30 seconds:
send "&cThe totem's power needs to recharge! Try again in &e%difference between 30 seconds and (difference between now and {totemCooldown::%victim%})% seconds &c." to victim
else:
cancel event
set victim's health to victim's maximum health
send "&aYou have been revived by the power of the totem!" to victim
play sound "entity.totem.use" to victim
spawn 10 particles of dust color green at victim
set {totemCooldown::%victim%} to now
#anyone know what is wrong with this im kinda new to skript
1 messages · Page 1 of 1 (latest)
line 18 - check docs
line 9 try using vectors? ~ vector(3,3,3)
ty will try it
hey @rigid pebble could you help me with this?
on death of player:
if victim's held item is a totem of undying:
set the cooldown of totem of undying for victim to 10 seconds
if {totemCooldown::%victim%} is not set:
cancel event
set victim's health to victim's maximum health
send "&aYou have been revived by the power of the totem!" to victim
play sound "entity.totem.use" to victim
play 10 of particle "redstone" at location of victim offset ~vector(3,3,3)
set {totemCooldown::%victim%} to now
else if difference between now and {totemCooldown::%victim%} is less than 30 seconds:
send "&cThe totem's power needs to recharge! Try again in &e%difference between 30 seconds and (difference between now and {totemCooldown::%victim%})% seconds &c." to victim
else:
cancel event
set victim's health to victim's maximum health
send "&aYou have been revived by the power of the totem!" to victim
play sound "entity.totem.use" to victim
spawn 20 of particle flame for player at player offset by 0.2, 0.2, 0.2 with speed 0.05
set {totemCooldown::%victim%} to now