When I activate this verb via a button on the shop window, a dialog pops up to select an object in the usr.contents before the alert comes up. I don't know why there is a prompt to select an object in usr.contents. The purchased item will always go to the user's equipped pack (usr.pack).
var/obj/object/L = usr.SelectedObject
if(!(L in usr.pack))
if(alert("Would you like to buy the [L.name] for [L.price1] copper?","Buy","Yes","No")=="No")return
Thanks for any assistance.