Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Showcharacter colors[5]? (https://forums.graalonline.com/forums/showthread.php?t=61026)

Silent 09-05-2005 06:16 PM

Showcharacter colors[5]?
 
There is a documented "colors[5]" - on a normal Graal body, it doesn't exist.

Okay, I can live with (seemingly) useless values, but it seems serverside showcharacter npcs need it. For example, this shows up as the default no-colors-set character (red and black outfit with orange skin):
NPC Code:
function onCreated() {
showcharacter();
head = "head0.png";
body = "body.png";
colors[0] = "orange";
colors[1] = "white";
colors[2] = "blue";
colors[3] = "red";
colors[4] = "black";
nick = "Placeholder";
shield = "shield1.gif";
shieldpower = 1;
dir = 2;
}


This, however:
NPC Code:
function onCreated() {
showcharacter();
head = "head0.png";
body = "body.png";
colors[0] = "orange";
colors[1] = "white";
colors[2] = "blue";
colors[3] = "red";
colors[4] = "black";
colors[5] = "";
nick = "Placeholder";
shield = "shield1.gif";
shieldpower = 1;
dir = 2;
}


Displays correctly. Why?

Not sure if this should be in the Tech Support section, move it if you like o.O

Evil_Trunks 09-05-2005 09:21 PM

you cannot make a showcharacter NPC using the newbie colors

I think I have reported this bug before

Admins 09-05-2005 11:05 PM

Interesting, didn't know of this problem. The problem seems to be that the colors are only sent if they are modified, but the default colors are different on clientside and serverside. I can change it to so that the npcserver is using the same default colors like the clientside. Until that is fixed you could theoretically modify one color to a different value and then set it back to the good value.
colors[5] is there as placeholder, on clientside you can use it for modifying the border color, but it is is not sent. If you modify it on serverside then it has no visible effect, but is making the npcserver send the colors.

Silent 09-05-2005 11:54 PM

Quote:

Originally Posted by Stefan
I can change it to so that the npcserver is using the same default colors like the clientside. Until that is fixed you could theoretically modify one color to a different value and then set it back to the good value.

Alright, that works, thanks ^^

UberModeKappa 09-06-2005 01:07 AM

It would be nice if others could see your border color.

calani 09-19-2005 08:01 PM

It would be nice if said border color worked.

ForgottenLegacy 09-20-2005 02:32 AM

Quote:

Originally Posted by calani
It would be nice if said border color worked.

In GS1 it does. :D But only you can see your own. -.-

jake13jake 09-28-2005 03:54 AM

It would be nice if colors had integer values
And you could set the array
player.color = {1,2,3,4};
or even
player.color = {"blue","green","red","yellow"};

It's just so much less typing.
I remember trying this a while ago, didn't work. Could it have been added?

Skyld 09-28-2005 09:08 AM

Quote:

Originally Posted by jake13jake
It would be nice if colors had integer values
And you could set the array
player.color = {1,2,3,4};
or even
player.color = {"blue","green","red","yellow"};

It's just so much less typing.
I remember trying this a while ago, didn't work. Could it have been added?

Did you also try player.colors = {"red", "green", ...};?

petro1212 09-28-2005 10:03 AM

Ummm side note. I haven't actualy tested this yet but using "value's" for body colours e.g 1 2 3 ect
Stefan said this was unstable last time atleast if it exceeds 12. Not only is it so that other people can't see the colours your wearing.. if its unstable it should have been disabled on v4 right? Just wondering if it still works and incase it does it should get fixed I guess

(Don't ask me why its unstable.. stefan just said that on rc ages ago when I asked him if there was a patern in the way the colours were sorted... I think it might be linked to the fact that the npcserver wishes to save it in the "red,blue,yellow,black ect order and if you have a number set that doesn't fit this it might lead to a unforseen error?)

Admins 09-28-2005 02:45 PM

v2 doesn't check if the color value is in the good range, if you use illegal color values it will show other colors but it might crash the client.

ForgottenLegacy 09-28-2005 11:26 PM

Quote:

Originally Posted by Stefan
v2 doesn't check if the color value is in the good range, if you use illegal color values it will show other colors but it might crash the client.

From what I ssee, it causes the client to freeze or some sort, allowing them to, appearing to other players, instantly move from one area to another in the same level. Is there a scriptaround for this?


All times are GMT +2. The time now is 08:54 AM.

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