function script gacha1 {
setarray .i1[1],909,908,521,575,512,531,558,533,514; // Common Items
set .i1rand,rand(1,9); // Randomize Common Items; just change max amount if you add items
setarray .i2[1],40740,40929,40777,40786,40776,40785,40517,40590; // Rare Items
set .i2rand,rand(1,8); // Randomize Rare Items; just change max amount if you add items
setarray .i3[1],41161,41156,20500,20727,40591; // Super Rare Items
set .i3rand,rand(1,5); //Randomize Super Rare Items; just change max amount if you add items
setarray .i4[1],24004,24010; // Hyper Rare Items
set .i4rand,rand(1,2); //Randomize Super Rare Items; just change max amount if you add items
set .chance, rand(100);
// Hyper Rare Item
if (.chance < 1){
getitem .i4[.i4rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i4[.i4rand])+"] super rare.",0;
end;
}
// Super Rare Item
else if (.chance < 4){
getitem .i3[.i3rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i3[.i3rand])+"] rare.",0;
end;
}
// Rare Item
else if (.chance < 15){
getitem .i2[.i2rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i2[.i2rand])+"] ga begitu rare.",0;
end;
}
// Common Items
else {
getitem .i1[.i1rand],1;
end;
}
}
I want to make the "Hyper Rare Item" become 0,5% chance.
how can i make it like that?
please help, thanks a lot
Question
AHMADSHIDQI
function script gacha1 { setarray .i1[1],909,908,521,575,512,531,558,533,514; // Common Items set .i1rand,rand(1,9); // Randomize Common Items; just change max amount if you add items setarray .i2[1],40740,40929,40777,40786,40776,40785,40517,40590; // Rare Items set .i2rand,rand(1,8); // Randomize Rare Items; just change max amount if you add items setarray .i3[1],41161,41156,20500,20727,40591; // Super Rare Items set .i3rand,rand(1,5); //Randomize Super Rare Items; just change max amount if you add items setarray .i4[1],24004,24010; // Hyper Rare Items set .i4rand,rand(1,2); //Randomize Super Rare Items; just change max amount if you add items set .chance, rand(100); // Hyper Rare Item if (.chance < 1){ getitem .i4[.i4rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(.i4[.i4rand])+"] super rare.",0; end; } // Super Rare Item else if (.chance < 4){ getitem .i3[.i3rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(.i3[.i3rand])+"] rare.",0; end; } // Rare Item else if (.chance < 15){ getitem .i2[.i2rand],1; announce "["+strcharinfo(0)+"] won a ["+getitemname(.i2[.i2rand])+"] ga begitu rare.",0; end; } // Common Items else { getitem .i1[.i1rand],1; end; } }
I want to make the "Hyper Rare Item" become 0,5% chance.
how can i make it like that?
please help, thanks a lot
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.