Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-30-2012, 09:58 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
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);

__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 04-30-2012 at 10:09 AM..
Reply With Quote
  #2  
Old 04-30-2012, 02:33 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
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.
__________________
Skyld
Reply With Quote
  #3  
Old 04-30-2012, 02:47 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
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.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #4  
Old 04-30-2012, 03:19 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 Gunderak View Post
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.
__________________
Skyld
Reply With Quote
  #5  
Old 04-30-2012, 04:34 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Fair enough, but I will be using this script.
It looks so messy with --- name ---.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #6  
Old 04-30-2012, 05:32 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
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.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #7  
Old 04-30-2012, 05:37 PM
Dragon551 Dragon551 is offline
Alfonso :3
Dragon551's Avatar
Join Date: Mar 2006
Location: In a pocket.
Posts: 712
Dragon551 is a splendid one to beholdDragon551 is a splendid one to beholdDragon551 is a splendid one to beholdDragon551 is a splendid one to beholdDragon551 is a splendid one to behold
Send a message via AIM to Dragon551 Send a message via MSN to Dragon551
I like the new look.
__________________
-Alfonso (AGT)


---------------------
---------------------
#AGT
Reply With Quote
  #8  
Old 04-30-2012, 06:34 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
i suggest adding a playerlist option, so you can toggle between the two. lolmao
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
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 10:50 AM.


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