Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Disabling nicknames? (https://forums.graalonline.com/forums/showthread.php?t=75111)

Sum41Freeeeek 07-05-2007 08:00 AM

Disabling nicknames?
 
I have a huge spar level on Era where people are seated around the arena, but their nicknames get in the way. I know you can easily disable nicknames in the options but I was wondering how to do this via script, can anyone help me out?

Twinny 07-05-2007 08:11 AM

Could temporarily set enablefeatures to exclude nicknames...

PHP Code:

Value      Description
1     M key 
(map)
2     P key (pause)
4     Q key (weapon select)
8     R key (show ratings)
0x10     S+A key combination for dropping items
0x20     S
+D key combination for switching weapons
0x40     TAB key 
(if disabled then you cannot switch to the chat field with TAB)
0x80     Display of chat text
0x100     Display of the hearts over player heads
0x200     Display of nicknames
0x400     Toall
/PM-icons on the minimap
0x800     Right
-click on players opens their profile
0x1000     Emoticons 
(disable it if you want to do other stuff with control+keys)
0x2000     Alt+for making snapshots (deprecated)
0x4000     Alt+8/for zooming (deprecated)
0x8000     Allows F2 output (savelog()/echo())
allfeatures     All of the previously stated feature flags enabled 

So enablefeatures(allfeatures - 0x200);

You'll just have to find out what the current enablefeatures is set at.

Sum41Freeeeek 07-05-2007 08:21 AM

that would just do it in the level, right?
I think I understand, thanks.

TheJames 07-05-2007 09:45 AM

//#CLIENTSIDE
function onCreated() onPlayerEnters();{
enablefeatures(allfeatures - 0x200);
}

Thats GS2 Command, I suck at GS2. So I don't know if its right?

GS1

//#CLIENTSIDE
if (created||playerenters){
enablefeatures(allfeatures - 0x200);
}

Then a command for the level adjacent to it for it leaving the level. So It enables the nickname text again. OR Just a command in a script for that specific level, disabling the nicknames/text.

cbk1994 07-05-2007 11:31 PM

You should figure out when the player leaves the level, and then set it to normal.

Besides that, this is fine:
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
enablefeaturesallfeatures 0x200 );



Sum41Freeeeek 07-06-2007 01:45 AM

So, in the spar arena, I would put

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
enablefeaturesallfeatures 0x200 );


then at unstick me, or whereever they'll be warped out, i'll put

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
enablefeatures0x200 );


this way nicknames are disabled in the arena, but when you get warped to unstick me it enables.
I don't want to use enablefeature( allfeatures); because that might interfere with other stuff on Era, such as disabling S + A and S + D combinations for dropping/switching items.

Rapidwolve 07-06-2007 02:02 AM

When you use enablefeatures( 0x200); thats the only feature that is enabled.

cbk1994 07-06-2007 02:38 AM

Quote:

Originally Posted by Sum41Freeeeek (Post 1326014)
So, in the spar arena, I would put

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
enablefeaturesallfeatures 0x200 );


then at unstick me, or whereever they'll be warped out, i'll put

PHP Code:

//#CLIENTSIDE
function onCreated()
{
  
enablefeatures0x200 );


this way nicknames are disabled in the arena, but when you get warped to unstick me it enables.
I don't want to use enablefeature( allfeatures); because that might interfere with other stuff on Era, such as disabling S + A and S + D combinations for dropping/switching items.

You need to figure out where Era is setting these stats.

More than likely in some system NPC, so just get one of the NATs to change this for you. Because if you do it in your level, it's going to enable everything except names.

If you do it outside, you're going to enable NOTHING except names.

So really, you're stuck.
I'd suggest talking to the NATs, they can do this very easily.

Bl0nkt 07-06-2007 04:01 AM

Frankie, if you use that script things like pause will be enabled again.

Sum41Freeeeek 07-06-2007 07:09 AM

yeah, that's what I'm worried about.
snake says he added something a long time ago to disable certain things in levels, i'll have kinetaro or someone check the system npc.

cbk1994 07-06-2007 10:09 PM

Quote:

Originally Posted by Sum41Freeeeek (Post 1326097)
yeah, that's what I'm worried about.
snake says he added something a long time ago to disable certain things in levels, i'll have kinetaro or someone check the system npc.

Incase Era has really bad NATs, here's some code they could use:
Weapon/GUI-Script +Features
PHP Code:

//#CLIENTSIDE
function onCreated()
{
  if ( 
player.level.name == "sparlevel.nw" )
  {
    
enablefeaturesallfeatures 0x200 // disable all the other feautres
  
}
  else
  {
    
enablefeaturesallfeatures ); // disable all the other features
  
}
}
function 
onPlayerEnters()
{
  
onCreated();



Sum41Freeeeek 07-06-2007 10:25 PM

I think Vulcan put something like that in the -System npc for me, thanks for the help though guys.

zokemon 07-09-2007 04:22 PM

Yeah, always check with the head of the scripting department (usually the head developer or so) or the Manager (if they have a good enough knowledge of scripting or how it works) before using enablefeatures()/showstats() somewhere.


All times are GMT +2. The time now is 04:24 AM.

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