Hmm?
NPC Code:
//Door
if (playerenters) timereverywhere;
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))>0) {
if (strequals(#a,#s(server.house#v(this.id)owner))||s erver.house#v(this.id)open) {
hidelocal;
dontblocklocal;
timeout=2;
}
else say2 This house is owned by#b#s(server.house#v(this.id)owner);
}
else {
hidelocal;
dontblocklocal;
timeout=2;
}
}
if (playerchats) {
if (strlen(#s(server.house#v(this.id)owner))<=0)
if (strequals(#c,Buy house #v(this.id))) {
if (playerrupees>=1000) {
playerrupees-=1000;
setstring server.house#v(this.id)owner,#a;
}
else say2 You don't have enough money!;
}
}
else if (strequals(#a,#s(server.house#v(this.id)owner))) {
if (strequals(#c,Sell house #v(this.id))) {
playerrupees+=500;
setstring server.house#v(this.id)owner,;
}
if (strequals(#c,Open house #v(this.id))) set server.house#v(this.id)open;
if (strequals(#c,Close house #v(this.id))) unset server.house#v(this.id)open;
}
}
NPC Code:
//Sign
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))<=0) say2 House for sale!#b-1000 Gralats#bSay "buy house #v(this.id)";
else say2 House owned by#b#s(server.house#v(this.id)owner));
}