# -------------------------------------------------- # SkArmorEvent v. 1.0 # Skrypt na eventy wywołujące się przy zakładaniu i zdejmowaniu zbroi # # by Kormic # -------------------------------------------------- custom event "onArmorEquip": pattern: armo[u]r (equip|wear) event-values: player, item check: continue custom event "onArmorUnequip": pattern: armo[u]r un(equip|wear) event-values: player, item check: continue on right click: player's tool is not any armor: stop if player's tool is any helmet: player's helmet is not air stop else if player's tool is any chestplate: player's chestplate is not air stop else if player's tool is any leggings: player's leggings is not air stop else if player's tool is any boots: player's boots is not air stop set {_l::player} to player set {_l::item} to player's tool call event (custom event "onArmorEquip" with {_l::*}) on inventory click: clicked inventory is player's inventory if click type is left mouse button or right mouse button: clicked slot is between 36 and 39 if player's cursor slot is any armor: set {_l::player} to player set {_l::item} to player's cursor slot call event (custom event "onArmorEquip" with {_l::*}) else if player's cursor slot is air: event-slot is not air set {_l::player} to player set {_l::item} to event-slot call event (custom event "onArmorUnequip" with {_l::*}) else if click type is left mouse button with shift or right mouse button with shift: if clicked slot is between 36 and 39: event-slot is not air set {_l::player} to player set {_l::item} to event-slot call event (custom event "onArmorUnequip" with {_l::*}) if event-slot is air: stop if event-slot is any helmet: player's helmet is not air stop else if event-slot is any chestplate: player's chestplate is not air stop else if event-slot is any leggings: player's leggings is not air stop else if event-slot is any boots: player's boots is not air stop set {_l::player} to player set {_l::item} to event-slot call event (custom event "onArmorEquip" with {_l::*})