turf
var
saveX = 0
saveY = 0
saveZ = 0
list
owner = list()
doormatt
icon_state = "doormatt"
Enter(mob/M)
if(src.owner.len == 0)
switch(alert(M,"Do you wish to buy this house?","Buying House","Yes","No"))
if("Yes")
M<<"Welcome to your new house"
src.owner.Add(M.key)
return 1
if("No") //
return 0
else
if(M.key in src.owner)
return 1
else
M<<"This isn't your house!!!"
return 0
var/list/HouseStuff = list()
world/New()
if(fexists("House.sav"))
var/savefile/F = new("House.sav")
F >> HouseStuff
for(var/obj/O in HouseStuff)
if(istype(O,/obj))
O.loc = locate(O.saveX,O.saveY,O.saveZ)
for(var/turf/T in HouseStuff)
if(istype(T,/turf/doormatt))
for(var/turf/S in world)
if(istype(S,/turf/doormatt))
if(S.loc == locate(T.saveX,T.saveY,T.saveZ))
S.owner = T.owner
HouseStuff.Remove(T)
world/Del()
var/savefile/F
F = new("House.sav")
for(var/turf/T in world)
if(istype(T,/turf/doormatt))
T.saveX = T.x
T.saveY = T.y
T.saveZ = T.z
HouseStuff.Add(T)
if(istype(T,/turf/house/woodfloor))
for(var/obj/O in T)
O.saveX = O.x
O.saveY = O.y
O.saveZ = O.z
HouseStuff.Add(O)
F << HouseStuff
mob/verb/Invite_Person(var/mob/M in world)
var/check = 0
if(M.client)
for(var/turf/T in world)
if(istype(T,/turf/doormatt))
if(src.key in T.owner)
check = 1
T.owner.Add(M.key)
M<<"[src] invited you to his house!"
src<<"You invited [M] to your house!"
if(check == 0)
src<<"You don't own a house!"
hi i was wonderign if you could help me make 2 commands for this house code. I need the following
- Kick // gives u an option to kick the person u invited
- Sell House /// allowes you to sell the house you own
any help would be great
Also, I can barely tell what you're saying 99% of the time; try using periods(.), commas(,) and paragraphs <_<<br/>
Anyway, to make sell house and kick owner, all you would have to do is to remove the player's key from the doormat's owner list.