please comment if you know
Maps/Editor
Help me with doors
Help me with doors
1

BUTTONX=1 --write in the button's X position in tiles
BUTTONY=1 --write in the button's Y position in tiles
COST=1000 --write in the amount of money to open the door
DOORNAME="door1" --write in the entity's name IN QUOTES (" - quote)
addhook("use","buydoor")
function buydoor(id)
	if (player(id,"tilex")==BUTTONX and player(id,"tiley")==BUTTONY and player(id,"money")>=COST) then
		parse("trigger "..DOORNAME)
		parse("setmoney "..id.." "..(player(id,"money")-COST))
	else
		msg2(id,"You don't have enough money!")
	end
end
please make a map test

1
