how to fix this newbie about switch

AnimeRO

New member
Messages
4
Points
0
Github
AnimeRO
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;
        
}
    }

 
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

 
Code:
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;
        
}
    }
 
Back
Top