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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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