SetEventScript [ItemSwing] [NecroStaff] [StaffScript]You must run this script before this next script. [NecroStaff] can be replaced with any staff or even item. [StaffScript] is the name of the script you want the staff to run when swung.
IfThis will teleport a player to any specified coordinates. You must set the coordinates somewhere within the jail.
Intersect [ray] [vrel:0,0,0] [vrel:1024,0,0] [players]
Context [player] [target]
Teleport [player] [512,200,512]