Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-07-2006, 04:04 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
Question 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;
}

Reply With Quote
  #2  
Old 02-07-2006, 04:31 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to 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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #3  
Old 02-07-2006, 06:23 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #4  
Old 02-07-2006, 06:52 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by ApothiX
I don't think you can change the attributes of a showani in old gscript, though
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.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
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 12:25 AM.


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