Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Playerlist Changes (https://forums.graalonline.com/forums/showthread.php?t=134266349)

Gunderak 04-30-2012 09:58 AM

Playerlist Changes
 
As most of you would of noticed (probably) the playerlist subheadings have changed from eg "Admins" to "--- Staff ---".
Now if you are like me and don't like the change you may use this script on your server.
PHP Code:

//#CLIENTSIDE
function onCreated(){
  
//Defines the names to replace.
  //If you are going to change it it works like this:
  // "before name", "after name".
  
temp.replace = {
    {
"--- Staff ---",    "Staff"},
    {
"--- Buddies ---""Buddies"},
    {
"--- Guild ---",   "Guild"},
    {
"--- Players ---""Players"},
    {
"--- Ignore ---",  "Ignore"},
    {
"--- Offline ---""Offline"},
  };
  
//Sleeps for two seconds so when the actual
  //player list script is initialized it doesn't replace
  //what we are going to change; with what it wants.
  
sleep(2);
  
//Loops through all the names to replace and replaces them.
  
for(temp.0temp.replace.size(); temp.++){
    
temp.PlayerList_List.findtext(replace[i][0]);
    
PlayerList_List.rows[temp.r].text replace[i][1];
  }
  
//Focuses on the playerlist then graal to make the changes
  //come into effect.
  
PlayerList_List.MakeFirstResponder(true);
  
GraalControl.MakeFirstResponder(true);



Skyld 04-30-2012 02:33 PM

I expect when you say "you may use this script on your server", you are promoting the idea that this script is added to your players when you log in. This is a bad idea, because if we ever make further changes to the playerlist, your script may cause undefined behaviour, and it will also likely affect the playerlist script after the player has switched to another server.

As such, I advise you don't use this.

Gunderak 04-30-2012 02:47 PM

I'd glad fully remove this script and not promote it at all of you renamed the headings back ;)
But I suppose I could try and make it check if a row exists first and if not then return?
And I have tested it to a degree, if no row exists with the name; it skips it.

Skyld 04-30-2012 03:19 PM

Quote:

Originally Posted by Gunderak (Post 1693382)
I'd glad fully remove this script and not promote it at all of you renamed the headings back ;)

It was not me who changed them. ;)
Quote:

Originally Posted by Gunderak
But I suppose I could try and make it check if a row exists first and if not then return?
And I have tested it to a degree, if no row exists with the name; it skips it.

Well, I don't generally promote anything that modifies the default scripts whatsoever, unless using documented public functions.

Gunderak 04-30-2012 04:34 PM

Fair enough, but I will be using this script.
It looks so messy with --- name ---.

BlueMelon 04-30-2012 05:32 PM

In all honesty who cares if there is a --- before and after the title. Keep this for yourself, I'm sure not many people will use it anyway. Its not a big deal.

Dragon551 04-30-2012 05:37 PM

I like the new look.

Deas_Voice 04-30-2012 06:34 PM

i suggest adding a playerlist option, so you can toggle between the two. lolmao


All times are GMT +2. The time now is 07:40 PM.

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