View Single Post
  #22  
Old 05-03-2007, 09:18 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Re: Rudora DB NPCs

Quote:
Originally Posted by xXziroXx View Post
Skyld, remember how it didn't work on Mythic? I found out why.

If another NPC requests client RC before you open it, it will not work unless the NPC has requested the client RC to be closed. Let me show an example..


Example #1
Step #1:
PHP Code:
// Script of a wNPC
//#CLIENTSIDE
function onCreated() requestText("clientrc"1); 
Step #2:
Player press F6 for client RC to open

Result: Nothing but RC chat works in client RC. Weapons, NPCs, files, serveroptions.. NOTHING else will work other then RC chat.


Example #2
PHP Code:
// Script of a wNPC
//#CLIENTSIDE
function onCreated() requestText("clientrc"1);

function 
onReceiveText(texttypetextoptiontextlines) {
  switch (
texttype) {
    case 
"clientrc":
      
requestText("options""");
    break;
    
    case 
"options":
      
triggerServer("gui"name"updatestaffs"textlines.tokenize(), servername);
      
requestText("clientrc"0);
    break;
  }

Step #2:
Player press F6 for client RC to open

Result: Client RC will work perfectly.


So basically, if another script requests client RC for something (in my example, my script that checks serveroptions for all staff) and the client RC is opened before the script closes the client RC.. it wont work.

If I don't make any sense, please do ask what you want to know.

Don't suppose this "error" is something that could be fixed Skyld?
Hmm, I discovered this problem a while ago on Graal X I think it was, but if the Client-RC is returning 1 when you request it but is not really responding properly, that's more of a gserver issue that's out of my control. Might need to get Stefan to look into it.
__________________
Skyld
Reply With Quote