Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Scripted RC Release (https://forums.graalonline.com/forums/showthread.php?t=71944)

Skyld 03-04-2007 01:01 AM

Quote:

Originally Posted by cbkbud (Post 1284198)
You mean 'Install Packages'? Nothing in it.

Yes, that's because the server has been cleared recently. I'll readd the package tomorrow, or I'll get Stefan to put it on the login server.

cbk1994 03-04-2007 01:20 AM

Quote:

Originally Posted by Skyld (Post 1284216)
Yes, that's because the server has been cleared recently. I'll readd the package tomorrow, or I'll get Stefan to put it on the login server.

I uploaded it on Vivitron, hit F8 -> Start -> Update Packages -> Vivitron -> Client-RC Images -> Install.

Also, just had an idea.
Since the tab button doesn't work in script editor its really hard to format code. So what about a button in the window that says 'Format Code' and does the command "/style weapon/npc/script name" or whatever the command is.

Skyld 03-04-2007 01:23 AM

Quote:

Originally Posted by cbkbud (Post 1284226)
I uploaded it on Vivitron, hit F8 -> Start -> Update Packages -> Vivitron -> Client-RC Images -> Install.

Also, just had an idea.
Since the tab button doesn't work in script editor its really hard to format code. So what about a button in the window that says 'Format Code' and does the command "/style weapon/npc/script name" or whatever the command is.

Post that in the stickied "Scripted RC" thread and I'll try to remember to add it in my next update.

cbk1994 03-04-2007 04:50 AM

Quote:

Originally Posted by cbkbud (Post 1284226)
I uploaded it on Vivitron, hit F8 -> Start -> Update Packages -> Vivitron -> Client-RC Images -> Install.

Also, just had an idea.
Since the tab button doesn't work in script editor its really hard to format code. So what about a button in the window that says 'Format Code' and does the command "/style weapon/npc/script name" or whatever the command is.

Okay, I'm not going to wait for the next release, right? I modified the code slightly, very easy fix. If you want to install it, I'll tell you how.

Use the find function to find "new GuiButtonCtrl(ScriptedRCScriptEditorDelete)".
Right above that line, add this code:
PHP Code:

    new GuiButtonCtrl(ScriptedRCScriptEditorStyle)
    {
      
profile "GuiBlueButtonProfile";
    
      
position = {196 48444};
      
extent = {4831};
      
      
vertSizing "top";
      
      
text "Style";
      
      
thiso.catchEvent(this"onAction""onScriptEditorButton");
    } 

now using the search function again, search for "function onScriptEditorButton(obj)". Scroll down a bit until you see "case "Delete":".
On the line above that, add this code
PHP Code:

    case "Style":
    {
      if (
this.currentItem == NULL)
      {
        return;
      }
      
// this.currentItem[1] == script name
      // this.currentItem[0] == script type
      
if (this.currentItem[0in {"weapon""class""npc"})
      {
        
sendToRC"/style" SPC this.currentItem[0SPC this.currentItem[1] );
      }
      break;
    } 

If the compiler spits out errors, you did something wrong. Try redownloading the script and adding this again if you can't find the problem.

Thanks so much for releasing this Skyld! Can't wait for the online tile editor now! Then I can go back to MACINTOSH! :D

xXziroXx 05-03-2007 06:56 AM

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?

xXziroXx 05-03-2007 07:02 AM

Quote:

Originally Posted by Twinny (Post 1305197)
Perhaps make it send the close clientrc command and then the establish clientrc one on F6?

That's what I did in example #2.

Skyld 05-03-2007 09:18 AM

Re: Rudora DB NPCs
 
Quote:

Originally Posted by xXziroXx (Post 1305196)
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.

xXziroXx 05-03-2007 09:41 AM

Quote:

Originally Posted by Skyld (Post 1305215)
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.

Would appreciate if you would. :)

Switch 05-15-2007 11:24 PM

I need the button images x.x

Skyld 05-15-2007 11:33 PM

Quote:

Originally Posted by Switch (Post 1308166)
I need the button images x.x

Didn't you read the first post?
Quote:

Originally Posted by Skyld
  • If you are having trouble with images not loading, log onto Rudora and go into Updates. You'll find a package with Scripted RC images there, which should install the images and work across servers.


Switch 05-16-2007 12:19 AM

I did. There were no files x.x

Switch 05-16-2007 12:19 AM

Oh wait, there ARE no 'updates' x.x

Skyld 05-16-2007 12:27 AM

They are listed for me. :|

xXziroXx 05-16-2007 12:29 AM

Logon Rudora > Press F8 > Click on the "Start" button in the bottom left of the screen > Chose "Install Packages" and install the Scripted RC buttons.

Voilá.

Switch 05-16-2007 12:31 AM

Okay, but there's nothing there =\
Someone IM me it VIA AIM: sportkid0703

x.x


All times are GMT +2. The time now is 09:33 AM.

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