Hi. I have recently taken to making my graal kingdoms house levels, and after reading the guides online, it has been going fairly well. I've come to a point where I can't find the info I need to do exactly what I want to do, so I've come here to ask.
Essentially I have an NPC that looks like this:
PHP Code:
function onPlayerChats() {
if (player.chat == "I want out") {
player.setlevel2("insidedustari_mainfloor.nw",30.5,4.5);
}
}
which works perfectly in warping me from the level it's in to the other level. What I am looking to do though is to make it work only when the player is standing in a specific area (a carpet on my floor) rather than working in the whole room. The coordinates for my carpet are:
top left corner : x= 28.5 y=48.5
top right corner: x=32.5 y=48.5
bottom left corner: x=28.5 y=52
Bottom right corner: x= 32.5 y=52
Essentially I would like it to be so that my warp command only works when standing within these coordinates. Any help and comments appreciated