Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-17-2009, 02:36 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Joining classes first

There's an annoying delay between the time the onActionPlayerOnline function in the Control-NPC is called and when the classes are joined. That, or the level NPCs are called first (onPlayerEnters).

The problem is that this kind of thing happens in level NPCs that have an onPlayerEnters() function:

Quote:
Originally Posted by NC
Script: Function cbk1994.onStaffTag not found at line 7 of jail_level in script of npcs[16] (in level era_jail.nw at pos (29, 36))
Script: Function cbk1994.isStaff not found at line 7 of jail_level in script of npcs[16] (in level era_jail.nw at pos (29, 36))
Script: Function cbk1994.unstick not found at line 8 of jail_level in script of npcs[16] (in level era_jail.nw at pos (29, 36))
This is the onActionPlayerOnline function.

PHP Code:
function onActionPlayerOnline() {
  if (! (
player.account in serveroptions.staff.tokenize(","))) {
    
player.addWeapon("Temp/Server Warp");
    return; 
// goodbye, global news team
  
}
  
  
clientr.serversideReady false;
  
  
player.join("player_itemfunctions");
  
player.join("player");
  
player.join("player_staff");
  
player.join("player_hpfunctions");
  
  
player.loadPlayer();

As you can see, the player class is being joined almost at once.

I think that the server should wait up to five seconds for onActionPlayerOnline to complete and for all of the classes to join, and then trigger onPlayerEnters to level NPCs. This could also be extended to weapons so that they are not called before their items and such have been loaded.
__________________
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 10:19 PM.


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