I tried this and it gave me a random quantity, not item number.
The variable controls
how many of something you get, and would work better for random amounts of gold.
The "operand" (number of) has 2 options: set or variable.
I'm guessing it's supposed to say:
QUOTE
Play SE: "Chest" 80,100
Set move route: this event (wait)
direction fix off
turn left
wait 3 frames
turn right
wait: 3 frames
control self switch A = ON
control variables {0005:random treasure] = Random No, (1.....20)
change items: [potion] + variable [05. random treasure]
text: \ v[5 ] was found!
The text part shows the result of the variable (it gave me 2, rather than item #2). The part where it says "potion" is unavoidable.
Otherwise it'd work fine. Best try a script instead.
This post has been edited by Alt_Jack: Jul 19 2010, 01:08 PM