Haganezuka Posted November 5, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 4 Joined: 08/14/16 Last Seen: April 2 Share Posted November 5, 2019 Hello rAthena i just want to ask how to enable multiple if else scenario. if(select("Change Hairstyle:Don't Change") == 1) { if (countitem(6707) > 0) { mes "[Kaniki]"; mes "Great, you brought"; mes "a New Kaniki Hair Style Coupon!"; mes "Alright, which hairstyle"; mes "did you want to have?"; next; if (Sex == SEX_MALE) { if(select("Emergency Heal Perm:Aura Blade Cut:Jupon Katana:Jupitel Thunder:Deadly Poison:Earth Spike") == 1) { delitem 6707,1; // New_Style_Coupon setlook 1,24; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,25; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,26; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,27; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,28; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,29; } Quote Link to comment Share on other sites More sharing options...
0 Moooooon-Aisha Posted November 5, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 19 Joined: 09/08/17 Last Seen: April 13, 2023 Share Posted November 5, 2019 (edited) else if(){ ... } else if(){ ... } else{ ... } Better if you use switch switch(select(...)){ case 1: ... break; case 2: ... break; case 3: ... break; case 4: ... break; } end; Edited November 5, 2019 by OppaiDragon 1 Quote Link to comment Share on other sites More sharing options...
0 Zell Posted November 5, 2019 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 412 Reputation: 266 Joined: 04/25/12 Last Seen: Yesterday at 01:17 AM Share Posted November 5, 2019 I think he wants something like this: if( SEX == SEX_MALE ) { setarray .@hair_name$[1],"Emergency Heal Perm", "Aura Blade Cut", "Jupon Katana", "Jupitel Thunder", "Deadly Poison"," Earth Spike"; setarray .@hair_style[1],24, 25, 26, 27, 28, 29; } .@option = select( implode( .@hair_name$, ":" ) ); .@option--; delitem 6707,1; setlook 1,.@hair_style[.@i]; {/code] 1 Quote Link to comment Share on other sites More sharing options...
0 Haganezuka Posted November 5, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 4 Joined: 08/14/16 Last Seen: April 2 Author Share Posted November 5, 2019 thanks @OppaiDragon and @Zell now i don't know how which one am i gonna pick. Quote Link to comment Share on other sites More sharing options...
0 Moooooon-Aisha Posted November 5, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 19 Joined: 09/08/17 Last Seen: April 13, 2023 Share Posted November 5, 2019 10 hours ago, wakefield21 said: thanks @OppaiDragon and @Zell now i don't know how which one am i gonna pick. Both will work just fine, whichever will suit your taste. Quote Link to comment Share on other sites More sharing options...
Question
Haganezuka
Hello rAthena i just want to ask how to enable multiple if else scenario.
if(select("Change Hairstyle:Don't Change") == 1) { if (countitem(6707) > 0) { mes "[Kaniki]"; mes "Great, you brought"; mes "a New Kaniki Hair Style Coupon!"; mes "Alright, which hairstyle"; mes "did you want to have?"; next; if (Sex == SEX_MALE) { if(select("Emergency Heal Perm:Aura Blade Cut:Jupon Katana:Jupitel Thunder:Deadly Poison:Earth Spike") == 1) { delitem 6707,1; // New_Style_Coupon setlook 1,24; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,25; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,26; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,27; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,28; }else{ delitem 6707,1; // New_Style_Coupon setlook 1,29; }
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.