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 09-05-2005, 06:16 PM
Silent Silent is offline
<3
Silent's Avatar
Join Date: Mar 2005
Location: England
Posts: 132
Silent is on a distinguished road
Send a message via AIM to Silent Send a message via MSN to Silent
Question 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
__________________
Quote:
Originally Posted by MilkyWay0016
The Bible also says things like...

"Stone disobedient children" (Deuteronomy 21:18-21)
Quote:
Originally Posted by Loriel
Disobedient children are likely enough to get stoned already, I think.
Reply With Quote
  #2  
Old 09-05-2005, 09:21 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
you cannot make a showcharacter NPC using the newbie colors

I think I have reported this bug before
__________________

Reply With Quote
  #3  
Old 09-05-2005, 11:05 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
  #4  
Old 09-05-2005, 11:54 PM
Silent Silent is offline
<3
Silent's Avatar
Join Date: Mar 2005
Location: England
Posts: 132
Silent is on a distinguished road
Send a message via AIM to Silent Send a message via MSN to Silent
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
__________________
Quote:
Originally Posted by MilkyWay0016
The Bible also says things like...

"Stone disobedient children" (Deuteronomy 21:18-21)
Quote:
Originally Posted by Loriel
Disobedient children are likely enough to get stoned already, I think.
Reply With Quote
  #5  
Old 09-06-2005, 01:07 AM
UberModeKappa UberModeKappa is offline
Graal 3D
UberModeKappa's Avatar
Join Date: Mar 2005
Location: New York
Posts: 395
UberModeKappa is an unknown quantity at this point
Send a message via AIM to UberModeKappa
It would be nice if others could see your border color.
Reply With Quote
  #6  
Old 09-19-2005, 08:01 PM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
It would be nice if said border color worked.
__________________
Reply With Quote
  #7  
Old 09-20-2005, 02:32 AM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
Quote:
Originally Posted by calani
It would be nice if said border color worked.
In GS1 it does. But only you can see your own. -.-
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
Reply With Quote
  #8  
Old 09-28-2005, 03:54 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
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?
Reply With Quote
  #9  
Old 09-28-2005, 09:08 AM
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 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", ...};?
__________________
Skyld
Reply With Quote
  #10  
Old 09-28-2005, 10:03 AM
petro1212 petro1212 is offline
Angelus
petro1212's Avatar
Join Date: Mar 2003
Location: The Moon
Posts: 445
petro1212 is on a distinguished road
Send a message via AIM to petro1212 Send a message via MSN to petro1212
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?)
__________________
Reply With Quote
  #11  
Old 09-28-2005, 02:45 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
  #12  
Old 09-28-2005, 11:26 PM
ForgottenLegacy ForgottenLegacy is offline
-Backtoscripts-
Join Date: Aug 2003
Location: California
Posts: 289
ForgottenLegacy is on a distinguished road
Send a message via AIM to ForgottenLegacy
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?
__________________
"The higher you fly, the harder it is to breathe."

[Kaidenn] Maybe I will somehow take control of Lance's body when he isn't looking, have him log onto Kingdoms, update one script, and leave.
[Kaidenn] And leave him exactly where I found him, unchanged and completely unnaware of what just took place the last two minutes.
[GrowlZ] Lance: You might want to lock your bedroom door tonight
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 03:07 AM.


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