Can anyone make this script work >.< thank yooou!!
function script specialbox {
setarray .i1[0],909,910; // Common Items
set .i1rand,rand(0,1); // Randomize Common Items; just change max amount if you add items
setarray .i2[0],911,912; // Rare Items
set .i2rand,rand(0,1); // Randomize Rare Items; just change max amount if you add items
setarray .i3[0],2199,1599; // Super Rare Items
set .i3rand,rand(0,1); //Randomize Super Rare Items; just change max amount if you add items
set .chance, rand(100);
// Super Rare Item 1%
if (.chance == 1){
getitem .i[.i3rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i3rand])+"] from the Special Box.",0;
end;
}
// Rare Item 10%
else if (.chance <= 2 && .chance >= 11){
getitem .i[.i2rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i2rand])+"] from the Special Box.",0;
end;
}
// Common Items
else {
getitem .i1[.i1rand],1;
end; }
}
Question
Noire
Can anyone make this script work >.< thank yooou!!
function script specialbox {
setarray .i1[0],909,910; // Common Items
set .i1rand,rand(0,1); // Randomize Common Items; just change max amount if you add items
setarray .i2[0],911,912; // Rare Items
set .i2rand,rand(0,1); // Randomize Rare Items; just change max amount if you add items
setarray .i3[0],2199,1599; // Super Rare Items
set .i3rand,rand(0,1); //Randomize Super Rare Items; just change max amount if you add items
set .chance, rand(100);
// Super Rare Item 1%
if (.chance == 1){
getitem .i[.i3rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i3rand])+"] from the Special Box.",0;
end;
}
// Rare Item 10%
else if (.chance <= 2 && .chance >= 11){
getitem .i[.i2rand],1;
announce "["+strcharinfo(0)+"] won a ["+getitemname(.i[.i2rand])+"] from the Special Box.",0;
end;
}
// Common Items
else {
getitem .i1[.i1rand],1;
end; }
}
Link to comment
Share on other sites
3 answers 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.