Jump to content
  • 0

Skip a hair color


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Hi all.

I'm wondering how to remove a hair palette. Hair palette 26 seems to error for me, does anyone know how i can put a "Hair color 26 was removed" message?


mes "[stylist]";
mes "What can I do for you?";
setarray .@Styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color");
setarray .@Look[1],7,1,6;
set .@s, select("Cloth color:Hairstyle:Hair color");
set .@Revert, getlook(.@Look[.@s]); set .@Style,1;
while(1) {
setlook .@Look[.@s], .@Style;
message strcharinfo(0),"This is style #"+.@Style+".";
set .@menu$, " ~ Next (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
switch(select(.@menu$)) {
case 1: set .@Style, ((.@Style!=.@Styles[.@s])?.@Style+1:1); break;
case 2: set .@Style, ((.@Style!=1)?.@Style-1:.@Styles[.@s]); break;
case 3: message strcharinfo(0),"Choose a style between 1 - "+.@Styles[.@s]+".";
input .@Style,0,.@Styles[.@s];
if (!.@Style) set .@Style, rand(1,.@Styles[.@s]);
break;
case 4: set .@Style, .@Revert; setlook .@Look[.@s], .@Revert; break; }
} end;
}

Thank you!

Edited by HristDead
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

while(1) {
if (.@style == 26 && .@s == 2) {
 mes "Hair Color #26 Has Issues.";
 mes "Skipping to Hair #27";
 close2;
 set .@style, 27;
}

setlook .@Look[.@s], .@Style;
message strcharinfo(0),"This is style #"+.@Style+".";
set .@menu$, " ~ Next (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
switch(select(.@menu$)) {
case 1: set .@Style, ((.@Style!=.@Styles[.@s])?.@Style+1:1); break;
case 2: set .@Style, ((.@Style!=1)?.@Style-1:.@Styles[.@s]); break;
case 3: message strcharinfo(0),"Choose a style between 1 - "+.@Styles[.@s]+".";
input .@Style,0,.@Styles[.@s];
if (!.@Style) set .@Style, rand(1,.@Styles[.@s]);
break;
case 4: set .@Style, .@Revert; setlook .@Look[.@s], .@Revert; break; }
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

when hair color 27 and select Previous option should skip 26

set .@style, (@menu==2||@menu==3?27:25);

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

@ QQ... that doesn't check the condition WHEN the hair style is 26... it simply states that if .@menu is 2 or 3 that it will be 27 or 25.... aka, no other hair options at all... ONLY 27 or 25....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

sorry, I misread option 2 , it should be option 1

so what I mean is

if (.@style == 26 && .@s == 3) {
 mes "Hair Color #26 Has Issues.";
 mes "Skipping to Hair #"+(@menu==1||@menu==3?27:25);
 close2;
 set .@style, (@menu==1||@menu==3?27:25);
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

ah ok, you meant changing my if to go "back forth" since previous and next both call the same function... that makes sense ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...