mob/var
house = 0
house2 = 0
allow_into_house = 0
dont_allow_house = 0
atom
movable
var
bought=0
bought1 = 0
bought2 = 0
houseowner=null
houseguild=null
houseown = 0
turf
var
bought=0
houseowner=null
houseguild=null
mob/var/canenter = 0
mob
house
verb
Allow_Into_House()
set category = "Channels"
set name = "Allow/Disallow House"
for(var/client/M in world)
if(M.client)
if(M.canenter==0||null)
M << "<font color=green>[usr] allows you into their house!</font>"
M.canenter = 1
else
if(M.canenter==1)
M << "<font color=green>[usr] disallows your entrance into their house!</font>"
M.canenter = 0
else
return
// Dont_Allow_House()
// set category = "Channels"
// set name = "Don't Allow House"
// for(var/mob/M in world)
// if(M.client)
// if(M == src || src == M)
// return
// else
// M << "<font color=red>[src] does'nt allow you into their house!</font>"
// M.canenter = 0
/*House_Teleport()
set category = "Channels"
set name = "House Teleport"
//Re-do parts of this system if you want
//other people, teleporting to your house.
if(src.house == 1 || src.canenter == 1)
src.loc=locate(33,30,1)
src << "<b>Your House</b>"
src.dir = SOUTH
src.see_invisible = 0
if(src.house2 == 1 || src.canenter == 1)
src.loc=locate(33,18,1)
src << "<b>Your House</b>"
src.dir = SOUTH
src.see_invisible = 0*/
turf
Door
Door1a //Door 1.
Enter(mob/M) //If a mob enters.
if(istype(M,/client)) //If it is a mob.
if(src.houseowner==null||src.houseowner==""||src.bought==0||src.bought==null)
if(M.house==0||M.house==null)
var/c = input("Do you want to buy this house, it costs 50,000,000 Zenni to buy it, still want to buy it?","House") in list ("Yes","No") //Buy it or not?
if(c == "Yes") //If Yes..
if(M.zenni >= 50000000) //Do you have enough gold?
M.zenni -= 50000000 //Subtract 5,000 gold
M.house = 1 //You now own this house.
src.bought=1 //You bought this house.
src.houseowner="[M.name]" //You own this house.
src.houseguild="[M.guild_name]"
M.verbs += typesof(/mob/house/verb/) //Give the House Owner verbs.
else //Else..
M << "<font color=red>You need <font color=black>[50000000-M.zenni]</font><font color=red> more Zenni to buy this House.</font>" //You need more gold.
return //Return it..
if(c == "No") //If the answer is NO
M << "<font color=red>You decided not to buy the house.</font>" //You chose NOT to buy the house.
return //Return it..
else
if(src.bought==1) //If you can enter or not.
if(src.houseowner=="[M.name]"||src.houseguild="[M.guild_name]") //If you can enter or not.
M.loc=locate(241,243,5) //Bring the person inside.
else
M << "<font color=red>You cannot enter.</font>"
// M << "<font color=red>You cannot do that, you bought another house already.</font>" //You or someone else bought the house.
else
return
Problem description: