Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-09-2005, 03:08 AM
Andares Andares is offline
Scr1pt3r-ish
Andares's Avatar
Join Date: Mar 2004
Posts: 55
Andares is on a distinguished road
Send a message via AIM to Andares
RC Update

I got peeved with not being able to start client RC back up after closing it so I made this.

Installation Instructions:
NOTE: This only works on GScript2-enabled servers.
1. Open the client RC's script.
2. Put this function directly below onCreated() (You don't have to, but it makes things simpler so people don't stick it inside a function or anything.)
3. Hit r to start the RC back up again. Yay!

NPC Code:

function onKeyPressed() {
if(params[1] == "r") {
rcoptions.loadvars("rcoptions.txt");
createVars();
createBackround();
}
}

__________________
Quote:
<Wan> Can I have a poll? Do people mind if I talk about sexual intercourse between two human beings?
<Kai> Wan, I think the problem is that it's basically ALL you talk about
<Wan> Ahhhhhh
Aim: AtariTandy | Job: Sanstrata)
Reply With Quote
  #2  
Old 02-09-2005, 05:02 AM
Luciano Luciano is offline
Registered User
Luciano's Avatar
Join Date: Jan 2005
Posts: 320
Luciano is on a distinguished road
Quote:
Originally Posted by Andares
I got peeved with not being able to start client RC back up after closing it so I made this.

Installation Instructions:
NOTE: This only works on GScript2-enabled servers.
1. Open the client RC's script.
2. Put this function directly below onCreated() (You don't have to, but it makes things simpler so people don't stick it inside a function or anything.)
3. Hit r to start the RC back up again. Yay!

NPC Code:

function onKeyPressed() {
if(params[1] == "r") {
rcoptions.loadvars("rcoptions.txt");
createVars();
createBackround();
}
}

w00t for Jacco!
Reply With Quote
  #3  
Old 02-09-2005, 05:14 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by Andares
I got peeved with not being able to start client RC back up after closing it so I made this.

Installation Instructions:
NOTE: This only works on GScript2-enabled servers.
1. Open the client RC's script.
2. Put this function directly below onCreated() (You don't have to, but it makes things simpler so people don't stick it inside a function or anything.)
3. Hit r to start the RC back up again. Yay!

NPC Code:

function onKeyPressed() {
if(params[1] == "r") {
rcoptions.loadvars("rcoptions.txt");
createVars();
createBackround();
}
}

Errr... I really think this was not really necessary to say x.x Anyone who has access to NC on a server with GScript2 should be competent enough to do this =/ Also createVars() and createBackground() are assuming that you're using an RC that has those vars... and if you wanted to make it simpler on yourself, you could've done onCreated(); and be done with it.
__________________
Who has time for life these days?
Reply With Quote
  #4  
Old 02-09-2005, 06:23 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
NPC Code:

function onWeaponfired() {
this.RC_Created=1-this.RC_Created;
if (this.RC_Created == 1) {
RemoteControl_Backround.show();
rcoptions.loadvars("rcoptions.txt");
createVars();
createBackround();
} else RemoteControl_Backround.hide();
}



I agree, anyone with NC can create such additions, like line count for NC xD
Reply With Quote
  #5  
Old 02-09-2005, 12:30 PM
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
There is no need to flame him; he was only trying to help people.

This modification might help to reduce the chance that the RC window is cleared:
NPC Code:
function onKeyPressed() {
if (RemoteControl_Window.visible == false) {
if(params[1] == "r") {
rcoptions.loadvars("rcoptions.txt");
createVars();
createBackround();
}
}
}

__________________
Skyld
Reply With Quote
  #6  
Old 02-10-2005, 03:35 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
I don't think the RC window is actually destroyed when you close it, so you can actually just do:

NPC Code:
function onKeyPressed(scancode, asciival) {
if(asciival == "r") {
if(!RemoteControl_Window.visible) {
RemoteControl_Window.show();
}
}
}



That way, the RC Chat won't be cleared, so you will still get the messages that were recieved while the window was hidden
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #7  
Old 03-10-2005, 10:46 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
I binded mine to F6. And Hey PS, not on aim anymo?
Reply With Quote
Reply


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 03:47 AM.


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