ID:144914
 
Code:
area
House1
Enter()
if(owned==1)
if(usr.owner=="House1")
usr<<"Welcome"
usr<<"[housename]"
return 1
else
if(usr.canenter=="House1")
usr<<"[housename]"
return 1
else
usr<<"This is not your house,[housename]"
return 0
else
switch(alert("This house is for sale, do you want to buy it for 50000 gold?",,"Yes","No"))
if("Yes")
if(usr.gold>=50000) //How ever much you want the tempary house to sell for.
usr.gold-=50000 //How ever much you want the tempary house to sell for.
usr.owner="House1"
owned=1
statpanel("House")
usr.verbs+=/mob/proc/invite
usr.verbs+=/mob/proc/un_invite
usr.verbs+=/mob/proc/name_house

else
usr<<"You dont have enough gold!"
if("No")
return 0


Problem description:

ok thats how i have it to buy a house for a set price and when u buy it it keeps ur key untill.... the server is closed... i want it so it saves ur key to that house. Also how would i make it so the items u drop in that house are saved?
I repeat:

Please put your code inside the <dm> tags, not outside. That's what they're there for.

No put usr in proc. Ungh.

Lummox JR
that better?
In response to Pyro170
Pyro170 wrote:
that better?

Aye, but you still have to get rid of the usr abuse. usr has no place in Enter().

Lummox JR
In response to Lummox JR
so make the usr. into scr. ?
In response to Pyro170
Just get rid of that snippet, it sucks badly.
In response to Pyro170
Pyro170 wrote:
so make the usr. into scr. ?

Of course not. In Enter(), src is the turf (or, more generally, the atom being entered). What you need to use is the argument that is sent to Enter(), telling it what atom is trying to enter.

Just because usr is wrong does not mean src is right. Sometimes you either need more information sent to the proc, or you need to use the information it has.

Lummox JR
In response to Lummox JR
well thanks for the help with the extra stuff but i stll need to know how to make that code save the items and players key to the house :P. thanks for the other help though!
In response to Pyro170
Yous should know what Lummox means when you press that nifty Function 1 (F1) button while in DreamMaker. It's really that easy.
In response to Mysame
yea i know now :P thanks