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
  #3  
Old 08-15-2014, 05:11 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Thanks. That helped alot.

Now the only problem I am having with it is the getstringkeys not getting all the flags. Any idea why it might not? I made sure they are all added using the same method.

PHP Code:
  temp.choosefrom getstringkeys("this.option.");
  
temp.options.desc null;

  
// If player is not in the list go ahead and add them anyways
  
if ( this.option.(@player.account) == null ) {
    
this.option.(@player.account) = 0;
  }
  
  for ( 
temp.coption temp.choosefrom ) {
    
// this tells it the option is a playerobject
    // get there account name and head icon
    
if ( player.account != temp.coption ) {
      
temp.pl      findplayer(temp.coption);
      
temp.offline temp.pl == NULL;
      
temp.pl      temp.offline ? new TServerPlayer(@temp.coption) : temp.pl;
      
temp.options.desc.add(temp.pl.account);
    }
  }

  for ( 
temp.pl allplayers ) {
    if ( !(
temp.pl.account in temp.options.desc) ) {
      
// they are RC
      
if ( temp.pl.level != null && temp.pl.account != player.account) {
        
temp.options.desc.add(temp.pl.account);
      }
    }
  }

  
// now send temp.data to be shown in the list :)
  
temp.data temp.options.savevarstoarray(false);
  return 
temp.data
I believe the problem is related to offline players. I could have sworn this was working before for loading head and hair of offline players.

Last edited by scriptless; 08-15-2014 at 05:52 AM..
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 02:08 PM.


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