ID:169160
 
I used the search function but havn't come up with anything usefull. Basicly i want to know how to code it so that you can buy a house and teleport to it and same for a guild.
Try this:
mob/var
house="none"
money
houseloc
turf/var
housebought
turf/house_1
icon='House.dmi'
icon_state="house 1"
density=1
verb/Buy()
set src in oview(1)
switch(alert("Would you like to buy this house for 1000 dollars?","","Yes","No"))
if("Yes")
if(usr.money<1000)
alert("Please come back when you have at least 1000 dollars!")
else
if(src.housebought)
alert("This house is already taken")
return
alert("You buy house 1!")
usr.money-=1000
usr.house="1"
usr.houseloc=src.loc
usr.verbs+=/mob/houses/verb/house1teleport
src.housebought=1
mob/houses/verb
house1teleport()
switch(alert("Confirm: Would you like to go to your house in an instant?","","Yes","No"))
if("No")
return
if("Yes")
usr.Move(locate(1,1,1))//change to your house location
//house2teleport()\
change to 2nd house, etc.


[Untested]
In response to Jay1
Thanks that looks great but would it be possible to have some kind of invite vrerb where you invite people in and how can i code it so you can buy funiture from shop to add to your house?
In response to Jay1
That's a pretty poor way to handle houses. ;)