PDA

View Full Version : Scripted RC Release


Skyld
02-04-2007, 12:44 PM
Being that it is functioning well now, I have decided to release the Scripted RC script. In order to use the Scripted RC on your server, you must have access to a normal RC (listed in staff= in the serveroptions, and have a correct IP address). After that, just ensure the weapon is added to who you want to use it on logon, and then press F6 to open it.

The main capabilities of this Scripted RC are:

Editing player attributes (seperately: /open, /openweapons, /openflags and /openchests)
Editing player local rights
Editing player local bans using the new ban system
Editing player comments
Viewing ban history and staff activity
Disconnecting players (with disconnect reasons)
Resetting attributes
Sending admin messages
Adding (using the Script Menu button to the right of the NC buttons), editing and deleting DB NPCs, weapons and classes in the tabbed script editor
Uploading, downloading and deleting files
Editing server flags, folder configuration and server options
RC chat logging (activated with /set logRCChat true, saved into scriptfiles/<server name>/)

Most RC chat commands (i.e. /openaccess, /opencomments and /reset) should still work.

There are a couple of currently known bugs, which will probably be fixed when I next release the script:

File manager files are not displaying properly always when spaces are in the filenames
NPC attributes and NPC scripts are not always working properly when opened at the same time
The playerlist is known to mess up with lots of players online, miscategorising people

Let me know if you pick up on any other odd problems which should be fixed.

Notes:

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.
If you are having trouble with functions not working, it's possible that your gserver hasn't been updated yet. Try restarting the gserver, and if not, send me a forum PM and let me know what's not working. I think the main thing that won't work is adding DB NPCs perhaps, since I am not sure that all gservers have been updated yet.


Enjoy.

Twinny
02-04-2007, 12:49 PM
Yay for Captain Gscript!!!

Err.....Skyld!!

Devil
02-04-2007, 12:52 PM
Well done Skyld.

Chandler
02-04-2007, 01:53 PM
Amazing, I like it :D

Just found a class error, the horizontal scrollers are out of position. It looks as though it's for most of the tabbed NC horizontal scrollers.

Skyld
02-04-2007, 04:42 PM
Amazing, I like it :D

Just found a class error, the horizontal scrollers are out of position. It looks as though it's for most of the tabbed NC horizontal scrollers.
Okay I'll check that out. It's probably just a wrong extent value.

Twinny
02-04-2007, 05:11 PM
This question goes to Stefan. What happens to people who are in jail levels and need to contact an admin? Will jail people be able to PM people with an active clientrc?

Chompy
02-04-2007, 05:18 PM
Just amazing Skyld!

Skyld, when loading the flags of the player, is it possible to show more then 255 chars..?
Only shows 255 chars for me..

Edit:

I see that if you request the player flags, then echo them, they will return 255 chars max for 1 variable >_<

Can this be fixed or something?

Whenever I edit my attributes it will make the variable with 255 chars, and not what it was when it was setted >_>

godofwarares
02-05-2007, 12:11 AM
Nice Skyld =]

Matt
02-05-2007, 12:35 AM
Nice work, Skyld. I'm adding this to Dark Nations now. ^^

Edit: When i open client RC, the backround images and all buttons don't show. Do we still need the other WEAPONS still (FileBrowser,TextEditor ect..)?

Skyld
02-05-2007, 01:04 PM
Just amazing Skyld!

Skyld, when loading the flags of the player, is it possible to show more then 255 chars..?
Only shows 255 chars for me..

Edit:

I see that if you request the player flags, then echo them, they will return 255 chars max for 1 variable >_<

Can this be fixed or something?

Whenever I edit my attributes it will make the variable with 255 chars, and not what it was when it was setted >_>
There should not be a limit on this, and it's not a limit imposed by the script. I shall see what Stefan says about it.
When i open client RC, the backround images and all buttons don't show. Do we still need the other WEAPONS still (FileBrowser,TextEditor ect..)?
You don't need the other weapons, but you can download the Scripted RC images and such by logging onto Rudora and going into the Updates section of the serverlist.

xXziroXx
02-05-2007, 01:49 PM
There should not be a limit on this, and it's not a limit imposed by the script. I shall see what Stefan says about it.

You don't need the other weapons, but you can download the Scripted RC images and such by logging onto Rudora and going into the Updates section of the serverlist.

Stefan posted about it here: http://forums.graalonline.com/forums/showthread.php?t=71958

Matt
02-05-2007, 03:13 PM
You don't need the other weapons, but you can download the Scripted RC images and such by logging onto Rudora and going into the Updates section of the serverlist.

Thank you. :)

zokemon
02-05-2007, 10:05 PM
Nice job Skyld. I'll try to check it out on Debug.

cbk1994
03-04-2007, 12:04 AM
logging onto Rudora and going into the Updates section of the serverlist.
You mean 'Install Packages'? Nothing in it.

Skyld
03-04-2007, 01:01 AM
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.

Skyld
03-04-2007, 01:01 AM
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
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
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
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:

new GuiButtonCtrl(ScriptedRCScriptEditorStyle)
{
profile = "GuiBlueButtonProfile";

position = {196 + 48, 444};
extent = {48, 31};

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

case "Style":
{
if (this.currentItem == NULL)
{
return;
}
// this.currentItem[1] == script name
// this.currentItem[0] == script type
if (this.currentItem[0] in {"weapon", "class", "npc"})
{
sendToRC( "/style" SPC this.currentItem[0] SPC 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, 07: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:

// 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

// Script of a wNPC
//#CLIENTSIDE
function onCreated() requestText("clientrc", 1);

function onReceiveText(texttype, textoption, textlines) {
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, 08:02 AM
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, 10:18 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:

// 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

// Script of a wNPC
//#CLIENTSIDE
function onCreated() requestText("clientrc", 1);

function onReceiveText(texttype, textoption, textlines) {
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, 10:41 AM
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-16-2007, 12:24 AM
I need the button images x.x

Skyld
05-16-2007, 12:33 AM
I need the button images x.x
Didn't you read the first post?

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, 01:19 AM
I did. There were no files x.x

Switch
05-16-2007, 01:19 AM
Oh wait, there ARE no 'updates' x.x

Skyld
05-16-2007, 01:27 AM
They are listed for me. :|

xXziroXx
05-16-2007, 01: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, 01:31 AM
Okay, but there's nothing there =\
Someone IM me it VIA AIM: sportkid0703

x.x

Switch
05-16-2007, 01:40 AM
Couldn't add it to above, but took screeny

Edit: AHAHAH JUST NOTICED THAT I TOOK IT WHEN MY FRIEND GOT BACK FROM AWAY ON AIM AHAHAHAH :D xD

Twinny
05-16-2007, 10:12 AM
I don't see it either. Will it only give the option for Mac-based operating systems?

Switch
05-16-2007, 10:27 PM
Y'know, I think it is X_X