obj/Gringgots/Vault_Door_1
name="Vault Door"
icon='obj.dmi'
icon_state="vault"
density=1
opacity=1
var/owner=""
verb
Open_Vault()
set src in oview(1)
var/obj/Gringgots/Vault_Door_Key/K
for(K in usr)
if(K.Vault=="[src.name]")
usr.y+=2
usr<<"Welcome back to Gringots Mr. [usr]"
return
else
return
return
Leave_Vault()
set src in oview(1)
var/obj/Gringgots/Vault_Door_Key/K
for(K in usr)
if(K.Vault=="[src.name]")
var/savefile/F = new("Map.sav")
for(var/obj/o in oview(10))
o.lastx = o.x
o.lasty = o.y
o.lastz = o.z
objs.Add(o)
F << objs
usr.y-=2
else
return
return
Buy_Vault()
set src in oview(1)
if(src.owner=="")
var/obj/Gringgots/Vault_Door_Key/K
for(K in usr)
if(K.owner=="")
if(K.Vault=="")
src.name="[usr]'s Vault"
K.owner="[usr]"
K.Vault="[src.name]"
var/savefile/F = new("Map.sav")
for(var/obj/o in oview(10))
o.lastx = o.x
o.lasty = o.y
o.lastz = o.z
objs.Add(o)
F << objs
usr.y+=2
return
else return
else return
else return
obj/Gringgots/Vault_Door_Key
icon='obj.dmi'
icon_state="key"
var/owner=""
var/Vault=""
verb/Get()
set src in oview(1)
src.loc=usr
return
verb/Drop()
src.loc=usr.loc
return
Problem description:
Why does it not work, when i try and buy the Vault i get this:
runtime error: Cannot execute null.Add().
proc name: Buy Vault (/obj/Gringgots/Vault_Door_1/verb/Buy_Vault)
source file: Gringots.dm,51
usr: Lt. Pain (/mob)
src: Lt. Pain\'s Vault (/obj/Gringgots/Vault_Door_1)
call stack:
Lt. Pain\'s Vault (/obj/Gringgots/Vault_Door_1): Buy Vault()