im using skript 2.7.1 /skbee-2.18 / skellett-2.0.9/ skquery-4.1.10 / skrayfall-1.9.28/ skript-gui-.3 / reflect / yaml/ utilities
Im keep getting error with this line
"if attacker's tool is bow: "
error message is "you can not use get bow expression in any event but 'on entity shoot: event!
can anyone help me with this?
0.9.2
Im keep getting error with this line
"if attacker's tool is bow: "
error message is "you can not use get bow expression in any event but 'on entity shoot: event!
can anyone help me with this?
Code:
on damage:
set {_tool} to attacker's tool's type
set {_tool} to "%{_tool}%"
replace all {server.delete_item::*} and " " with "" in {_tool}
if {_tool} is not "pickaxe":
set {_lore::*} to uncolored lore of attacker's tool
if attacker's tool is bow:
if {_lore::3} is set:
replace all "damage X " and " " with "" in {_lore::3}
set {_lore::3} to {_lore::3} parsed as number
set damage to damage * {_lore::3}
remove {%victim%.defense} from damage
send "&cdamage + %damage * 2%" to attacker
if {_lore::4} is set:
replace all "ls X " and " " with "" in {_lore::4}
set {_lore::4} to {_lore::4} parsed as number
add damage * {_lore::4} to attacker's health
send "&dls + %damage * {_lore::4} * 2%" to attacker
else if {_lore::3} is set:
replace all "damage X " and " " with "" in {_lore::3}
set {_lore::3} to {_lore::3} parsed as number
set damage to damage * {_lore::3}
remove {%victim%.defense} from damage
send "&cdamage + %damage * 2%" to attacker