Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   findlevel() Issue (https://forums.graalonline.com/forums/showthread.php?t=134261873)

ffcmike 01-28-2011 06:59 PM

findlevel() Issue
 
Since the servers were moved it seems as if findlevel("levelname.nw"); no longer works for individual level files on a gmap serverside, I've tried echoing the name of the returned object but it is always null, I've tried using the /refreshfilelist RC command aswell as updating levels both individually and in the form of the GMAP but the problem remains, the levels exist and are properly playable just simply will no longer be found via the findlevel command, while non GMAP levels or a parameter of the gmap filename work fine, anybody else experiencing this elsewhere?

ffcmike 01-30-2011 12:35 PM

Just me?

Admins 01-30-2011 03:05 PM

It never worked. On server side it sees the gmap as one big level.

ffcmike 01-30-2011 10:18 PM

It most certainly did work before, I've used it for several years for example in staff tools where warp locations are stored as specific .nw variables as opposed to gmap coordinates, which is helpful as if you update the size of the gmap these coordinates may no longer be valid.

Admins 01-30-2011 10:30 PM

There are getmapx(sublevelname) and getmapy(sublevelname)

ffcmike 01-30-2011 10:35 PM

Quote:

Originally Posted by Stefan (Post 1626800)
There are getmapx(sublevelname) and getmapy(sublevelname)

I was aware of this, was just wondering if the fact you can no longer use findlevel("levelname.nw"); for gmap levels is an intentional thing or if it can possibly be restored.

fowlplay4 01-30-2011 11:31 PM

Quote:

Originally Posted by ffcmike (Post 1626801)
I was aware of this, was just wondering if the fact you can no longer use findlevel("levelname.nw"); for gmap levels is an intentional thing or if it can possibly be restored.

fowlplay4 prob: level list is not supported anymore

might have something to do with that.

Admins 01-31-2011 12:55 AM

It was not possible before, eventually it still worked on your server because the levels were still in memory and the npcserver not restarted after adding the gmap.

ffcmike 01-31-2011 01:23 AM

Is there a function for determining a gmap from a specified .nw file parameter?, as getmapx/getmapy do not tell you what the gmap name is, so say you're working off a list you'd have to store the name of the gmap, and if you're wanting to tie the x/y coordinates to a specific .nw level you'd have to store the name of that also, whereas before you only required that one .nw filename.

ffcmike 02-01-2011 12:27 AM

Quote:

Originally Posted by ffcmike (Post 1626841)
Is there a function for determining a gmap from a specified .nw file parameter?

Would be nice if there was a function for this (can't seem to find one through /scripthelp in RC or the wiki) so I don't have to do stuff like:

PHP Code:

public function getGMAP(temp.lvl){
  
temp.getmapx(temp.lvl) * 64;
  
temp.getmapy(temp.lvl) * 64;
  for(
temp.serveroptions.gmaps){
    
temp.obj findlevel(temp.".gmap");
    if(
temp.obj.getmappartfile(temp.xtemp.y) == temp.lvl){
      return {
temp.objtemp.xtemp.y};
    }
  }
  return 
NULL;


PHP Code:

temp.obj findlevel(temp.lvlname);
if(
temp.obj == NULL){
  if(
levelexists(temp.lvlname)){
    
temp.controlnpc.getGMAP(temp.lvlname);
    return {
temp.l[0], temp.l[1] + temp.xtemp.l[2] + temp.y};
  }




All times are GMT +2. The time now is 06:55 PM.

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