Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-19-2006, 06:09 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Help with NPC script needed.

Did I start this right? At this point I'm trying to teach myself as much as possible and have noone to help me understand.

NPC Code:

function onCreated(){
drawgui();
}

function drawgui(){
LoginWindow.destroy;
new GuiBackgroundCtrl ("LoginWindow");
}
new GuiBitmapButtonCtrl (GuiControl);
mouseoverbitmap -
normalbitmap - string
pressedbitmap - string
text - string
setbitmap (str, int)

}

__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #2  
Old 07-19-2006, 07:38 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
All I have to say is..
WHAT THE HELL?

Read a tutorial, you don't even understand the most basic parts of scripting.
Reply With Quote
  #3  
Old 07-19-2006, 08:08 PM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
No Yen. I don't. I've been trying to understand however it is useless with no explanations to me from another scripter.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #4  
Old 07-19-2006, 08:33 PM
Giltwist2k1 Giltwist2k1 is offline
Registered User
Giltwist2k1's Avatar
Join Date: Jun 2002
Posts: 13
Giltwist2k1 is on a distinguished road
Send a message via ICQ to Giltwist2k1 Send a message via AIM to Giltwist2k1 Send a message via Yahoo to Giltwist2k1
There are a lot of GUI scripts in the forum. You should start by reading them, say this one. The wiki, unforunately, isn't going to be a lot of use to you. Even the more experienced scripters often need to put their heads together to figure things out.

Also, you should look around for the old tutorials for GS1. You need to understand the basic language before you try the advanced stuff like a GUI.
Reply With Quote
  #5  
Old 07-19-2006, 08:40 PM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Don't bash on people who are tring to start learning scripting, I used to be a complete noob too. >_>
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #6  
Old 07-19-2006, 09:21 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Moondeath_2
Don't bash on people who are tring to start learning scripting, I used to be a complete noob too. >_>
Aren't you still?

Anyway, how they put it on the wiki is like, "text - string". Which means, the variable "text" has to be set as in a string, like: text = "Lol";
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #7  
Old 07-20-2006, 10:59 PM
Omini Omini is offline
Millenium Owner
Join Date: Feb 2006
Location: N.Ireland
Posts: 293
Omini is on a distinguished road
Send a message via AIM to Omini Send a message via MSN to Omini Send a message via Yahoo to Omini
If you want the button to be within the window you created, then it has to be something like this

PHP Code:
new GuiWindowCtrl("MyWindow") {
  new 
GuiButtonCtrl("MyButton") {
    
width 70;
    
height 30;
    
10;
    
30;
    
text "Press Me";
  }
}

function 
MyButton.onAction() {
  
player.chat "Yay!";

__________________



Reply With Quote
  #8  
Old 07-20-2006, 11:54 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
Quote:
Originally Posted by Yen
All I have to say is..
WHAT THE HELL?

Read a tutorial, you don't even understand the most basic parts of scripting.

^----^

http://wiki.graal.net/index.php/Gscript

^--
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:34 PM.


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