AceHart
Your Friendly Neighborhood Admin
- Reaction score
- 1,495
You could go with an array of type "item-type", put all your items inside,
and randomly create one.
Now, lets take an example, assuming you fill your array something like this:
set myItems[ 1] = item 1
set myItems[ 2] = item 1
set myItems[ 3] = item 1
set myItems[ 4] = item 1
set myItems[ 5] = item 1
set myItems[ 6] = item 2
set myItems[ 7] = item 2
set myItems[ 8] = item 3
set myItems[ 9] = item 3
set myItems[10] = item 4
Then some trigger along the lines of:
E: Creep dies
C: random integer between 1 and 100 less then 20
A: create myItem[ random between 1 and 10 ] at dying spot
The condition in this trigger makes it so that there's only one chance in five
for an item to actually be dropped.
And, (now it comes ), the item table will make sure,
that item 1 has 1 chance in 2 to come, while, for example, item 3 only has 1 chance in 5.
Adjustable to your tastes and needs.
and randomly create one.
Now, lets take an example, assuming you fill your array something like this:
set myItems[ 1] = item 1
set myItems[ 2] = item 1
set myItems[ 3] = item 1
set myItems[ 4] = item 1
set myItems[ 5] = item 1
set myItems[ 6] = item 2
set myItems[ 7] = item 2
set myItems[ 8] = item 3
set myItems[ 9] = item 3
set myItems[10] = item 4
Then some trigger along the lines of:
E: Creep dies
C: random integer between 1 and 100 less then 20
A: create myItem[ random between 1 and 10 ] at dying spot
The condition in this trigger makes it so that there's only one chance in five
for an item to actually be dropped.
And, (now it comes ), the item table will make sure,
that item 1 has 1 chance in 2 to come, while, for example, item 3 only has 1 chance in 5.
Adjustable to your tastes and needs.