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 01-05-2002, 08:34 AM
XeroMaster XeroMaster is offline
Registered User
Join Date: Dec 2001
Location: Washington-=USA=-
Posts: 143
XeroMaster is on a distinguished road
Send a message via AIM to XeroMaster Send a message via Yahoo to XeroMaster
cloths changer

can some one tell me how I might make a cloths changer?
I want it to have 5 slots
and saves the following

head
sleeves
skin
belt
coat
shoes
hat
+ the outline of your body..(normaly black)
thanks
__________________
OUT OF MY MIND!
BACK IN 5 MIN.
AIM=Da First Bug
[email protected]
Reply With Quote
  #2  
Old 01-05-2002, 08:55 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
...

these can easily be changed with the message codes at the bottom, and saved with strings.

you could have something like:

setstring client.suit1,#C0,#C1,ect,ect,ect,ect;

and the outline is #C5, which stefan didnt bother adding into newfeatures or commands.rtf.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #3  
Old 01-05-2002, 08:58 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
saving example:
setstring outfit1_c0,#C0;
loading example:
setplayerprop #C0,#s(outfit1_c0);
Reply With Quote
  #4  
Old 01-05-2002, 09:01 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
hmmm

that would work python, but the player flag list would get filled up quick!

it would be better to use
setstring client.suit1,#C0,ect,ect....,ect;

and use
setplayerprop #C0,#I(client.suit1,0);


that way, it wouldnt take up so many lines in the flag section.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #5  
Old 01-05-2002, 09:57 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Re: hmmm

Quote:
Originally posted by mikepg
that would work python, but the player flag list would get filled up quick!

it would be better to use
setstring client.suit1,#C0,ect,ect....,ect;

and use
setplayerprop #C0,#I(client.suit1,0);


that way, it wouldnt take up so many lines in the flag section.
normally u use addstring or replacestring for stringlists because this would't probably work
the string u get with your script:

example
client.suit1=black,yellow,white,red

what stringlist look like:
client.suit1="black","yellow","white","red"

so u couldn't normally read the parts with #I
__________________
No Webhost at the moment
Reply With Quote
  #6  
Old 01-06-2002, 02:39 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
Re: Re: hmmm

Quote:
Originally posted by TDO2000


normally u use addstring or replacestring for stringlists because this would't probably work
the string u get with your script:

example
client.suit1=black,yellow,white,red

what stringlist look like:
client.suit1="black","yellow","white","red"

so u couldn't normally read the parts with #I
no, youre wrong. graal does not put ""s in because those are characters. The only way one of those is used, is if you have a comma in the string ie: "black, is good",yellow;
and you have to put "" in manually. You think I'm wrong still, go test this script i just wrote:

NPC Code:

// NPC made by War Lord Mpg2
// suit1=head,body,skin,feet,coat
if (playerenters) {
timeout = .1;
setstring suit1,#3,#8,#C0,#C3,#C1;
setplayerprop #3,head816.png;
setplayerprop #8,body2.png;
setplayerprop #C0,blue;
setplayerprop #C3,black;
setplayerprop #C1,white;
}
if (playertouchsme) {
}
if (playerchats&&strequals(#c,load)) {
setplayerprop #3,#I(suit1,0);
setplayerprop #8,#I(suit1,1);
setplayerprop #C0,#I(suit1,2);
setplayerprop #C3,#I(suit1,3);
setplayerprop #C1,#I(suit1,4);
setplayerprop #c,loaded!;
}



then come back and tell me im wrong
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #7  
Old 01-06-2002, 04:13 AM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
just use addstring dude and watch the string after this...

if(playerenters){
addstring test,lala;
addstring test,lala2;
}

would be:
test="lala","lala2"
__________________
No Webhost at the moment
Reply With Quote
  #8  
Old 01-06-2002, 04:54 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
tell your mom i said hi.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #9  
Old 01-06-2002, 04:55 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
oh and thanks
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #10  
Old 01-06-2002, 05:14 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
Quote:
Originally posted by TDO2000
just use addstring dude and watch the string after this...

if(playerenters){
addstring test,lala;
addstring test,lala2;
}

would be:
test="lala","lala2"

why would you want to do that? The only time i can think of when you want to use "addstring" is when you have strings set already, and you want to add on to it without changing information. Going back to the topic...addstring is not needed here. my way works fine. it works, i scripted, i tested it.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
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 06:24 PM.


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