View Single Post
  #1  
Old 05-03-2012, 08:44 PM
garglius1 garglius1 is offline
Butcher of the Kingdoms
Join Date: Mar 2004
Location: Montreal, Quebec
Posts: 213
garglius1 is on a distinguished road
Send a message via MSN to garglius1
Warping while standing at a specific location

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
__________________
-Garg, the former GK Pro-

5813... WHAT!
Reply With Quote