If you want to only use a wand when you are targeting 1 creature, and don't want to use a wand for any others, I made this script for a friend, it may be useful to you.
I haven't yet tested it, so expect it to change in next 20 minutes.
local wand = "Wand of Inferno"
local bpfrom = "Backpack of Holding"
local placeto = "weapon" -- weapon, ammo, etc
local count = 1
local twand = "Bonelord"
if target.name == twand then
if itemcount(wand, placeto) == 0 then
moveitems(wand, bpfrom, placeto, count)
if itemcount(wand, placeto) ~= 0 then
moveitems(wand, placeto, bpfrom, count)