Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.