obj/castle2
var/owner=""
icon='Player.dmi'
icon_state="castle"
density=1
Click()
usr<<"Loading menu..."
sleep(10)
if(src.owner == usr)
usr<<"your the owner"
else
usr<<"blah"
obj/castle
icon='Player.dmi'
icon_state="castle"
DblClick()
if(usr.selected==1)
var/choice = input("What Would you like to do?") in list("un_select","Build","none")
if(choice=="Build")
usr.selected=0
usr.locked=1
suffix=null
new/obj/castle2(usr.loc)
for(var/obj/castle/o in usr)
del(o)
sleep(10)
usr.locked=0
for(var/obj/castle2/P in view(0))
P.owner=usr
if(choice=="un_select")
usr.selected=0
suffix=null
else
if(usr.selected==0)
var/c = input ("What would you like to do?") in list ("select","none")
if(c=="select")
usr.selected=1
suffix="selected"
-Thanks, Wanabe
var/obj/castely2/P = new(usr.loc)
Then, P is the castle, and you can do whatever you want with it.