simple mining

xienne15

New member
Messages
120
Points
0
I want to request a mining script.

This is how it works:

1) The player should have Pick (ID:25000)

if (countitem(25000 > 1) {It will mine different minerals with % chancesMinerals

25001 20% chance to get

25002 50% chance to get

25003 80% chance to get

25004 2% chance to get

there is also a chance that it will fail. 50%

2) When the player mined 25001 it will say after mining

mes "You successfully mined a 25001";close;
and when the mined 25002 it will say

mes "You successfully mined a 25002";close;
and so on

And when it failed to mine it will say

mes "You failed to mine.";close;
After each use of the Pick 25000, it will be deleted

Code:
delitem 25000,1;
 
Yeah. Just think of each set like a fraction; 1/5 = 20%, 1/2 = 50%, 4/5 = 80%, 1/50 = 2%, and so on.

 
Update:

Revised the algorithm to determine success rate. Please re-download the file for the newest version.

 
Back
Top