Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help with NPC script needed. (https://forums.graalonline.com/forums/showthread.php?t=67451)

killerogue 07-19-2006 06:09 PM

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)

}


Yen 07-19-2006 07:38 PM

All I have to say is..
WHAT THE HELL?

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

killerogue 07-19-2006 08:08 PM

No Yen. I don't. I've been trying to understand however it is useless with no explanations to me from another scripter.

Giltwist2k1 07-19-2006 08:33 PM

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.

Moondeath_2 07-19-2006 08:40 PM

Don't bash on people who are tring to start learning scripting, I used to be a complete noob too. >_>

contiga 07-19-2006 09:21 PM

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";

Omini 07-20-2006 10:59 PM

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!";



KuJi 07-20-2006 11:54 PM

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

^--


All times are GMT +2. The time now is 09:18 PM.

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