viewing paste Get Item with Percent ? | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
-   script  Sample  -1,{
OnNPCKillEvent:
set .@Random,rand(100);
if( .@Random < 1 ){ // 1%
    setarray .@ItemList,501,502,503;
}else if( .@Random < 3 ){ // 3%
    setarray .@ItemList,504,505,506;
}else if( .@Random < 10 ){ // 10%
    setarray .@ItemList,504,505,506;
}else{ // More than 10%
    setarray .@ItemList,504,505,506;
}
if( getarraysize( .@ItemList ) )
    getitem .@ItemList[ rand(getarraysize( .@ItemList )) ],1;
end;
}
Viewed 1224 times, submitted by Emistry.