Jump to content
  • 0
Sign in to follow this  
AnimeRO

how to fix this newbie about switch

Question

i am trying to make a refine quest if select case 0; he will change my +8 item to a clean custom item and  if i select case 0; he will change it to other custom item

heres my script

 

turbo_room,63,98,4    script    test    4_M_BIBI,{

switch(select("Case 0","Case 1")) {

Case 0:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
mes " Sorry, but you haven't brought the requirements"; 
close;
}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        //getitem getarg(0), 1;
        delitem2 25226,1,1,8,0,0,0,0,0;
        getitem 30205,1;            

        close;
        break;
        
Case 1:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
mes " Sorry, but you haven't brought the requirements"; 
close;
}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        //getitem getarg(0), 1;
        delitem2 25225,1,1,8,0,0,0,0,0;
        getitem 30208,1;            

        close;
        break;
        
}
    }

    
    
    

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
turbo_room,63,98,4	script	test	4_M_BIBI,{

switch(select("Case 0","Case 1")) {

case 0:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
		mes " Sorry, but you haven't brought the requirements"; 
		close;
		}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        delitem2 25226,1,1,8,0,0,0,0,0;
        getitem 30205,1;            

        close;
        break;
        
case 1:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
		mes " Sorry, but you haven't brought the requirements"; 
		close;
}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        delitem2 25225,1,1,8,0,0,0,0,0;
        getitem 30208,1;            

        close;
        break;
        
}
    }

what seems to be the problem? the only thing that i found wrong is the case format and spacing.

try this code

Share this post


Link to post
Share on other sites
  • 0
turbo_room,63,98,4	script	test	4_M_BIBI,{

switch(select("Case 0","Case 1")) {

case 1:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
		mes " Sorry, but you haven't brought the requirements"; 
		close;
		}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        delitem2 25226,1,1,8,0,0,0,0,0;
        getitem 30205,1;            

        close;
        break;
        
case 2:
    
        if(countitem2(25226,1,8,0,0,0,0,0) < 1){ 
		mes " Sorry, but you haven't brought the requirements"; 
		close;
}

        mes "Bwahahahah";
        mes "Thank you for your help!!";
        delitem2 25225,1,1,8,0,0,0,0,0;
        getitem 30208,1;            

        close;
        break;
        
}
    }

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.