Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gmap location (https://forums.graalonline.com/forums/showthread.php?t=73299)

Chompy 04-05-2007 02:10 PM

gmap location
 
Is there an variable saying what gmap you are on, or a function to check what gmap you are on?

for example

PHP Code:

if (isonGmap("overworld"))
  
seteffect(0000.1);
else
  if (
isonGmap("cave"))
    
seteffect(0000.5); 

Is there a function or variable which can help me do this?

Rapidwolve 04-05-2007 02:47 PM

I think you can work magic with pos(), I've seen it done before

Chompy 04-05-2007 03:09 PM

Quote:

Originally Posted by Rapidwolve (Post 1297079)
I think you can work magic with pos(), I've seen it done before

Only if the gmap format has "_" in it :]
Some gmap format are like "overworldab-01.nw" or "overworlda5.nw" etc..

Twinny 04-05-2007 03:24 PM

Reading player.level serverside tells you what gmap you are on. The other option is found in player.gmap.name clientside ;)

Chompy 04-05-2007 03:31 PM

Quote:

Originally Posted by Twinny (Post 1297092)
Reading player.level serverside tells you what gmap you are on. The other option is found in player.gmap.name clientside ;)

Just what I needed!
It has a small delay, but that won't stop me :p

Thanks :p

Twinny 04-05-2007 03:37 PM

Quote:

Originally Posted by Chompy (Post 1297096)
Just what I needed!
It has a small delay, but that won't stop me :p

Thanks :p

The clientside method has no delay :p

Chandler 04-05-2007 03:49 PM

PHP Code:

player.level.name 

serverside, returns the gmap name.
Just thought I'd add this :)

Chompy 04-05-2007 04:41 PM

Quote:

Originally Posted by Twinny (Post 1297098)
The clientside method has no delay :p

Has a little delay with big gmaps :[


All times are GMT +2. The time now is 09:17 PM.

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