Jump to content
  • 0

Question

Posted

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;
				}

 

4 answers to this question

Recommended Posts

  • 0
Posted

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]
  • MVP 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...