Jump to content
  • 0
Dolphin86

Lottery Script Error

Question

3 answers to this question

Recommended Posts

  • 0
chry_fld,144,48,5	script	Gatcha Vending	562,{

	mes "[Gatcha  Ticket Vending]";
	mes "Use your Gatcha Ticket here.";
	next;
	switch(select("- Use:- See possibility:- Exit"))
	{
		case 1:		
			if ( !countitem(.itemuse) ) {
			mes "[Gatcha  Ticket Vending]";
			mes "A "+ getitemname(.itemuse) +" is needed to use this machine";
			close;
			}
			delitem .itemuse, 1;
			getitem .temp_array[rand(0, getarraysize(.temp_array))], 1;
			end;
		case 2:
			next;
			mes "[Gatcha  Ticket Vending]";
			mes "Select possibility.";
			switch(select("- High Chance:- Mid Chance:- Low Chance:- Exit")){
			
				case 1:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(14003);
					mes F_MesItemInfo(40021);
					mes F_MesItemInfo(40028);
					mes F_MesItemInfo(40026);
					end;
				case 2:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(40030);
					mes F_MesItemInfo(40031);
					mes F_MesItemInfo(40039);
					mes F_MesItemInfo(40040);
					end;
					
				case 3:
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(40001);
					mes F_MesItemInfo(40033);
					mes F_MesItemInfo(40035);
					mes F_MesItemInfo(40041);
					mes F_MesItemInfo(40042);
					end;
					
				case 4:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes "Good Bye.";
					close;
			}
			
	}
	
OnInit:
	waitingroom "Gatcha Pot",0,0;
	.itemuse = 40022; 
	setarray .itemid[0], 14003,40021,40028,40026,40030,40031,40039,40040,40001,40033,40035,40041,40042;
	setarray .itemchance[0], 90,90,90,90,70,70,70,70,10,10,10,10,10;
	
	freeloop(1);
	[email protected] = 0;
	for([email protected] = 0; [email protected] < getarraysize(.itemid); [email protected]++) {
		for([email protected] = 0; [email protected] < .itemchance[[email protected]]; [email protected]++) {
			.temp_array[[email protected]] = .itemid[[email protected]];
			[email protected]++;
		}
	}
	freeloop(0);
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0
11 hours ago, EIysium said:
chry_fld,144,48,5	script	Gatcha Vending	562,{

	mes "[Gatcha  Ticket Vending]";
	mes "Use your Gatcha Ticket here.";
	next;
	switch(select("- Use:- See possibility:- Exit"))
	{
		case 1:		
			if ( !countitem(.itemuse) ) {
			mes "[Gatcha  Ticket Vending]";
			mes "A "+ getitemname(.itemuse) +" is needed to use this machine";
			close;
			}
			delitem .itemuse, 1;
			getitem .temp_array[rand(0, getarraysize(.temp_array))], 1;
			end;
		case 2:
			next;
			mes "[Gatcha  Ticket Vending]";
			mes "Select possibility.";
			switch(select("- High Chance:- Mid Chance:- Low Chance:- Exit")){
			
				case 1:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(14003);
					mes F_MesItemInfo(40021);
					mes F_MesItemInfo(40028);
					mes F_MesItemInfo(40026);
					end;
				case 2:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(40030);
					mes F_MesItemInfo(40031);
					mes F_MesItemInfo(40039);
					mes F_MesItemInfo(40040);
					end;
					
				case 3:
					mes "[Gatcha  Ticket Vending]";
					mes F_MesItemInfo(40001);
					mes F_MesItemInfo(40033);
					mes F_MesItemInfo(40035);
					mes F_MesItemInfo(40041);
					mes F_MesItemInfo(40042);
					end;
					
				case 4:
					next;
					mes "[Gatcha  Ticket Vending]";
					mes "Good Bye.";
					close;
			}
			
	}
	
OnInit:
	waitingroom "Gatcha Pot",0,0;
	.itemuse = 40022; 
	setarray .itemid[0], 14003,40021,40028,40026,40030,40031,40039,40040,40001,40033,40035,40041,40042;
	setarray .itemchance[0], 90,90,90,90,70,70,70,70,10,10,10,10,10;
	
	freeloop(1);
	[email protected] = 0;
	for([email protected] = 0; [email protected] < getarraysize(.itemid); [email protected]++) {
		for([email protected] = 0; [email protected] < .itemchance[[email protected]]; [email protected]++) {
			.temp_array[[email protected]] = .itemid[[email protected]];
			[email protected]++;
		}
	}
	freeloop(0);
	end;
}

 

your the best @Elysium but question, what was wrong actually?

Link to comment
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.   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.



×
×
  • Create New...

Important Information

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