Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Script Help! (https://forums.graalonline.com/forums/showthread.php?t=134259926)

Kamakaze 07-23-2010 02:08 AM

Script Help!
 
Hi, Wasn't quite to sure how to name this topic.
I have scripted a "ban" and "unban" script that I use on a restaurant on UN for "rowdy" kids. Thing is what I was to do is make it so when you "ban" someone it add their account to a GUI and when a person in a certain guild says "banlist" it opens a GUI box with the banned accouts/players from the restaurant. Also, when you "unban" a player/account it removes the account from the GUI so we know it is gone.

If anyone could help me on this, that would be fantastic!
Thanks,
Joker

WhiteDragon 07-23-2010 02:24 AM

If it is already scripted, what do you need help with?

Edit: Nevermind, I see your question now. The best GUI reference is http://wiki.graal.net/index.php/Crea...F_Object_Types under "GUIControl" in that big tree of objects. It shows you what each is and an example. I'm not sure if there is a full-blown tutorial for GUIs or not.

cbk1994 07-23-2010 02:26 AM

Just use the F2 window, it's better if you're not making a full GUI.

PHP Code:

function onPlayerChats() {
  if (
player.chat == "banlist") {
    
sendRPGMessage("<b>Banned players:</b>");
    for (
temp.acc this.banned) {
      
sendRPGMessage(acc);
    }
  }



adam 07-23-2010 02:27 AM

As I recall, this can only be a level npc :p

Kamakaze 07-23-2010 02:29 AM

Quote:

Originally Posted by WhiteDragon (Post 1589147)
If it is already scripted, what do you need help with?

The ban script is already made, what I needed help with is the script that opens a GUI and shows who is banned, and removes them when we unban them :P

Kamakaze 07-23-2010 02:39 AM

Quote:

Originally Posted by cbk1994 (Post 1589148)
Just use the F2 window, it's better if you're not making a full GUI.

PHP Code:

function onPlayerChats() {
  if (
player.chat == "banlist") {
    
sendRPGMessage("<b>Banned players:</b>");
    for (
temp.acc this.banned) {
      
sendRPGMessage(acc);
    }
  }



Ok, so I tried to add this, I guess I may have done something wrong, because it isn't showing the banned players :(

Kamakaze 07-23-2010 03:22 AM

Thanks for everyone that helped, I got it now!! :D


All times are GMT +2. The time now is 12:17 AM.

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