Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Old Scripting Engine (GS1) (https://forums.graalonline.com/forums/forumdisplay.php?f=154)
-   -   changing img body colors (https://forums.graalonline.com/forums/showthread.php?t=63968)

excaliber7388 02-07-2006 04:04 AM

changing img body colors
 
I'm creating an outfit viewer, the script below is the portion of the script that allows the player to see and choose their outfit, but my problem is the colors on the body don't match, since this is not an NPC, but a showimg, i was wondering if it would be possible to make it look like the actual outfit, with the right colors. I've seen it happen for the current outfit you are using when you first use it, but it doesn't change the colors of the others? How would I do this? (The current script is below)
NPC Code:
//#CLIENTSIDE
if(weaponfired && this.inuse==0)
{
this.inuse=1;
disabledefmovement;
this.outfit=1;
timeout=.05;
}
else if(keypressed && strequals(#p(1),D) && this.inuse==1)
{
enabledefmovement;
this.inuse=0;
for(this.i=1000;this.i<1005;this.i++)
{
hideimg this.i;
}
}
if(keypressed && strequals(#p(1),S) && this.inuse==1)
{
setplayerprop #8, #s(client.body#v(this.outfit));
setplayerprop #3, #s(client.head#v(this.outfit));
setplayerprop #2,#s(client.shield#v(this.outfit));
setplayerprop #1,#s(client.sword#v(this.outfit));
setplayerprop #C0,#s(client.skin#v(this.outfit));
setplayerprop #C1,#s(client.coat#v(this.outfit));
setplayerprop #C2,#s(client.sleeves#v(this.outfit));
setplayerprop #C3,#s(client.shoes#v(this.outfit));
setplayerprop #C4,#s(client.belt#v(this.outfit));
enabledefmovement;
this.inuse=0;
for(this.i=1000;this.i<1005;this.i++)
{
hideimg this.i;
}
}
if(timeout && this.inuse==1)
{
if(keydown(3) && this.outfit<7)
{
this.outfit++;
sleep .25;
}
if(keydown(1) && this.outfit>1)
{
this.outfit--;
sleep .25;
}
showimg 1000,#s(client.head#v(this.outfit)),playerx+.4,pla yery-3;
changeimgpart 1000,0,64,32,32;
changeimgvis 1000,3;
showimg 1001,#s(client.body#v(this.outfit)),playerx+.4,pla yery-2;
changeimgpart 1001,64,0,32,32;
showimg 1002,#s(client.shield#v(this.outfit)),playerx+.5,p layery-1.5;
changeimgpart 1002,15,0,15,50;
showtext 1003,playerx-5,playery-4.5,Arial,b,Outfit # #v(this.outfit) name #s(client.name#v(this.outfit));
showimg 1004,#s(client.sword#v(this.outfit)),playerx-.5,playery-2.5;
changeimgpart 1004,0,0,9,34;
timeout=.05;
}


napo_p2p 02-07-2006 04:31 AM

The 'else if(keypressed ..)', for loops to hide images, and the sleeps in the timeout are bothering me :(.

But to accomplish what you want, a showani would be best.

ApothiX 02-07-2006 06:23 AM

Quote:

Originally Posted by napo_p2p
The 'else if(keypressed ..)', for loops to hide images, and the sleeps in the timeout are bothering me :(.

But to accomplish what you want, a showani would be best.

I don't think you can change the attributes of a showani in old gscript, though :frown:

napo_p2p 02-07-2006 06:52 AM

Quote:

Originally Posted by ApothiX
I don't think you can change the attributes of a showani in old gscript, though :frown:

Ahh yes, I forgot about that. I don't think so either.

Exal, I thought DR was GS2 enabled? If it is, disable v2 (it is going to happen soon anyway, so it can't hurt), and explore the wonders of GS2 ;).

As an alternative though, you can just have the player's look reflect the preview of the outfit. If you REALLY want it in the gui, then use a showani and have it mimic the player's look.


All times are GMT +2. The time now is 10:57 PM.

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