View Single Post
  #10  
Old 02-01-2011, 12:27 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by ffcmike View Post
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};
  }


Last edited by ffcmike; 02-01-2011 at 05:33 PM..
Reply With Quote