1: action for firewalker boots , if worn firewalker boots use enchanted ruby and equip boots

i have one action, but dont work for me

if boots == itemid("worn firewalker boots") then
moveitems("worn firewalker boots", "boots", UR_BACKPACK, 1) wait(200, 400)
elseif itemcount("worn firewalker boots") > 0 and itemcount("small enchanted ruby") > 0 then
useitemon("small enchanted ruby", "worn firewalker boots", UR_BACKPACK) wait(200, 400)
elseif itemcount("firewalker boots", UR_BACKPACK) > 0 then
moveitems("firewalker boots", UR_BACKPACK, "boots", 1) wait(200, 400)

2: with my mage, if player on screen or 3 sqm stop atack with spells and atak with sds

help plx