Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-24-2006, 06:20 PM
gamer4lifebitach gamer4lifebitach is offline
Scripter
gamer4lifebitach's Avatar
Join Date: Oct 2005
Location: Illionis, USA
Posts: 25
gamer4lifebitach is on a distinguished road
Send a message via AIM to gamer4lifebitach Send a message via MSN to gamer4lifebitach
RC on Player's Client

I need help im trying to make an RC for like faq's and et's gp's so they dont really need to get access from normal rcs and i just want to make one for fun too so ya please help.

PHP Code:
// NPC Made By *Devenio
//#CLIENTSIDE
function onCreated(){
  new 
GuiWindowCtrl("RC_Window") {
    
RC_Window.destroy();
  }
  
thiso.rcchat = {"Test","Test","Test","Test","Test","Test","Test","Test","Test","Test"};
}
function 
onWeaponfired(){
  
RC_Window.destroy();
  new 
GuiWindowCtrl("RC_Window") {
    
text "Remote Control 2006/08/24 - By *Devenio";
    
profile "RC_Window";
    
x=0;
    
y=0;
    
width 510;
    
height 385;
    
destroyonhide true;
    
canresize false;
    
canclose true;
    
canminimize true;
    
canmaximize false;
    new 
GuiTextEditCtrl("RC_Chatbar") {
      
profile "RC_Chatbar";
      
x=5;
      
y=360;
      
width 500;
      
height 20;
    }
    new 
GuiScrollCtrl("RC_Scrollbar") {
      
profile "RC_Scrollbar";
      
x=484;
      
y=190;
      
width 20;
      
height 170;
    }
    new 
GuiTextListCtrl("RC_Chat") {
      
profile "RC_Chat";
      
x=15;
      
y=195;
      for (
athiso.rcchat) {
        
RC_Chat.addRow(0,a);
      }
    }
  }

__________________

~Contact Information~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #2  
Old 08-24-2006, 10:01 PM
gamer4lifebitach gamer4lifebitach is offline
Scripter
gamer4lifebitach's Avatar
Join Date: Oct 2005
Location: Illionis, USA
Posts: 25
gamer4lifebitach is on a distinguished road
Send a message via AIM to gamer4lifebitach Send a message via MSN to gamer4lifebitach
How do i make a red box show up where you cant dont anything to it but its inside a guiwindow already, and it goes behind text like the text box in the RC2???
__________________

~Contact Information~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #3  
Old 08-24-2006, 10:17 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
Quote:
Originally Posted by gamer4lifebitach
I need help im trying to make an RC for like faq's and et's gp's so they dont really need to get access from normal rcs and i just want to make one for fun too so ya please help.
Well, depending on what you want your Client RC to do, you have two options.
  • Use clientrc stuff, which provides the player with the ability to edit attributes, scripts, server flags etc. However, clientrc requires the player to have a normal RC.
  • Script your own routines for controlling players and such, but you will not be able to access anything RC-like.
Reply With Quote
  #4  
Old 08-24-2006, 10:27 PM
Chris Chris is offline
:pluffy:
Chris's Avatar
Join Date: Jan 2005
Location: im n ur comp, takn up pixelz
Posts: 1,867
Chris is on a distinguished road
RC for fun? Uhh that isn't good. Plus, how did your account name ever get approved?
__________________
Reply With Quote
  #5  
Old 08-25-2006, 12:12 AM
gamer4lifebitach gamer4lifebitach is offline
Scripter
gamer4lifebitach's Avatar
Join Date: Oct 2005
Location: Illionis, USA
Posts: 25
gamer4lifebitach is on a distinguished road
Send a message via AIM to gamer4lifebitach Send a message via MSN to gamer4lifebitach
if you dont like my account well than i dont care, next i want my rc to act like a normal rc (so i go with #1)
__________________

~Contact Information~
Aim: Grind64RyGuy
Email: [email protected]
Client Status:
Reply With Quote
  #6  
Old 08-25-2006, 10:18 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Few things I see wrong with your code right off the bat.

PHP Code:
new GuiWindowCtrl("RC_Window") {
  
RC_Window.destroy();

This should be:
[php]if(RC_Window != NULL) RC_Window.destroy();

PHP Code:
thiso.rcchat = {"Test","Test","Test","Test","Test","Test","Test","Test","Test","Test"}; 
You are not in the scope of another object, so you do not use thiso. like that. It should be: this.rcchat = ...

PHP Code:
RC_Window.destroy(); 
You'll get console errors like mad (especially if this is your first time firing the weapon since it was updated.) Use the method I said previously to destroy the window.

PHP Code:
new GuiWindowCtrl("RC_Window") {
  
profile "RC_Window"
Read the wiki to understand what profiles are. Setting the profile to the window which you are creating will result in some nasty effects. (This goes for all of the other controls you created aswell.)

PHP Code:
new GuiScrollCtrl("RC_Scrollbar") {
  
// ..
}
new 
GuiTextListCtrl("RC_Chat") {

You need to embed the second control in the first (this applies for the comment after this one, too)
PHP Code:
new GuiScrollCtrl("RC_Scrollbar") {
  
// ..
  
new GuiTextListCtrl("RC_Chat") {
    
// ..
  
}

PHP Code:
new GuiTextListCtrl("RC_Chat") { 
You should be using a GuiMLTextCtrl for the chat box. It will be less hassel, and it will give you that red box behind the text.


And something wrong with your attitude:
Quote:
Originally Posted by gamer4lifebitach
if you dont like my account well than i dont care
Your account name MAY be offensive to other people. In the case that it is, you should not react by telling them you don't care. Act like that and people will request deletion of your account by an admin. (You really should read the account creation rules before you create an account, anyway.)
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 09:07 AM.


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