What you'll need (to understand)
An event with 2 pages
Three variables
Two 'caught fish' items
A fishing rod item
Two 'bait' items
A good few conditional branches
First, make your fish items. For now, we'll go with yellow fish and grey fish. The yellow fish is the rare one in this case. Make your fishing rod item as well.
The fishing bait, i used worms and maggots, worms being the more effective ones
On the event, make it same layer, action key activated and put it on the water next to the shore. the first page says only 'there are fish in the water'.
The second page is where the fun starts. Set the precondition to 'item 'fishing rod' held', so it only starts if you're holding the fishing rod.
On that page, set your three variables.
Fishing: random number 1-30
This will be the chances of catching fish
Waiting Time: random number 1-3
This will be the chances of long or short waits
Lost Bait: random number 1-4
This will be the chances of losing bait when nothing is caught.
Right, first, the message 'do you want to fish?', followed by a select choice 'yes' and 'no'. Leave 'no' empty.
For 'yes', put a message 'which bait will you use'? and another select choice with 'worms' and 'maggots'
We'll do maggots first.
Put a conditional with execute handler on and set it to check for items: maggots 'held'. If we jump straight to the 'else' handler, we can put in a message saying 'you have no maggots' and that'll be that. you can't fish without bait.
In the handler for having maggots, there's a few more conditional branches involved.
First, put in another branch and set it to check the variable 'waiting time' for a number. If the number selected is 1, then set a 'wait 8.0 Sec' command. In the else handler, put another branch, checking the same waiting time variable and put a command for 'wait 12.0 sec'.
In that else handler, put a command for 'wait 4.0 sec'.
Before we even get to catching the fish now, we have a randomly determined wait of 4, 8 or 12 seconds.
This is what it should look like just now.
<> Variable Oper: [xxxxFishing] set rnd [1-30]
<> Variable Oper: [yyyyWaitingTime] set rnd [1-3]
<> Variable Oper: [zzzzLostBait] set rnd [1-3]
<> Message: start fishing?
<> Show choices: yes/no
: [yes] handler
<> Message: Which bait?
<> Show choices: Maggots/Worms
: [Maggots] handler
<> Branch if maggots possessed
<> branch if var [yyyywaitingtime] is 1
<> wait 8.0 sec
<>
: else handler
<> branch if var [yyyywaitingtime] is 2
<> wait 12.0 sec
<>
: else handler
<> wait 4.0 sec
<>
: end
<>
: end
<>
: else handler
<> message: you have no maggots
Simple, huh?
Now, we determine fish catching rates.
At the end of the branch for checking [yyyywaitingtime] variable, set another branch to check [xxxxfishing] and set it to, say 15 or more.
After that, put a command in for a message saying 'caught a grey fish', then any sound effects or whatever that you wish, and in the item manager, give the hero a grey fish and remove a maggot.
In the else handler, if the [xxxxfishing] number selected was not 15 or more, then set a message saying 'no fish were caught'. Now, put one last branch for the maggot choice and have this branch check [zzzzlostbait] and set it to see if the random number is 1. Under that, set a command to remove 1 maggot. You can leave the else handler empty, or just not put one.
This means that whe you fish with maggots, you have a 15/30 (50%) chance of catching a grey fish, and catching nothing. Then, after that you have a 1/4 (25%) chance of losing bait anyways, either fish nibbled it, or it dropped off the hook, whatever. You could even put a message saying 'lost some maggots'.
How should it look so far:
<> Variable Oper: [xxxxFishing] set rnd [1-30]
<> Variable Oper: [yyyyWaitingTime] set rnd [1-3]
<> Variable Oper: [zzzzLostBait] set rnd [1-3]
<> Message: start fishing?
<> Show choices: yes/no
: [yes] handler
<> Message: Which bait?
<> Show choices: Maggots/Worms
: [Maggots] handler
<> Branch if maggots possessed
<> branch if var [yyyywaitingtime] is 1
<> wait 8.0 sec
<>
: else handler
<> branch if var [yyyywaitingtime] is 2
<> wait 12.0 sec
<>
: else handler
<> wait 4.0 sec
<>
: end
<> branch if var [xxxxfishing] is 15 or more
<> message: caught a grey fish
<> change items: grey fish 1 add
<> change items: maggots 1 remove
<>
: else handler
<> message: nothing was caught
<> branch if var [zzzzlostbait] is 1
<> change items: maggots 1 remove
<>
: end
<>
: end
<>
: end
<>
: else handler
<> message: you have no maggots
<>
: end
<>
: [worms] handler
Okay, now we have the maggots finished totally. If you understood that, setting up the worms should be a breeze, because it's pretty much the same, but the chances aer changed, and there is one more fork, to give way to letting the yellow fish be caught.
Set the timers for [yyyywaitingtime] to be shorter, just by a bit though, but other than that, keep it the same. Then, put in the branches for worms and the catchin' chances, again just the same except that the first [xxxxfishing] check should be for 28 or more, then message saying caught yellow fish. then, set another branch to check if [xxxxfishing] is 5 or more and set it to give you one grey fish, and in that else handler, set it to then say you caught nothing. That's a 2/30 chance of getting a yellow, 23/30 chance of catching a grey, and 5/30 chance of getting nothing.
Finish up with setting another branch to see if any bait was lost if nothing was caught. and leave all the branches to end there!
This is how it should look now:
<> Variable Oper: [xxxxFishing] set rnd [1-30]
<> Variable Oper: [yyyyWaitingTime] set rnd [1-3]
<> Variable Oper: [zzzzLostBait] set rnd [1-3]
<> Message: start fishing?
<> Show choices: yes/no
: [yes] handler
<> Message: Which bait?
<> Show choices: Maggots/Worms
: [Maggots] handler
<> Branch if maggots possessed
<> branch if var [yyyywaitingtime] is 1
<> wait 8.0 sec
<>
: else handler
<> branch if var [yyyywaitingtime] is 2
<> wait 12.0 sec
<>
: else handler
<> wait 4.0 sec
<>
: end
<> branch if var [xxxxfishing] is 15 or more
<> message: caught a grey fish
<> change items: grey fish 1 add
<> change items: maggots 1 remove
<>
: else handler
<> message: nothing was caught
<> branch if var [zzzzlostbait] is 1
<> change items: maggots 1 remove
<>
: end
<>
: end
<>
: end
<>
: else handler
<> message: you have no maggots
<>
: end
<>
: [worms] handler
<> branch if worms possessed
<> branch if var [yyyywaitingtime] is 1
<> wait 4.0 sec
<>
: else handler
<> branch if [yyyywaitingtime] is 2
<> wait 8.0 sec
<>
: else handler
<> wait 2.0 sec
<>
: end
<>
: end
<> branch if var [xxxxfishing] is 28 or more
<> message: caught a yellow fish
<> change items: yellow fish 1 add
<> change items: worms 1 remove
<>
: else handler
<> branch if var [xxxxfishing] is 5 or more
<> message: caught a grey fish
<> change items: grey fish 1 add
<> worms 1 remove
: else handler
<> message: no fish were caught
<> branch if var [zzzzlostbait] is 1
<> change items: worms 1 remove
<>
: end
<>
: end
<>
: end
<>
: else handler
<> message: you have no worms
<>
: end
<>
: end
<>
: [no] handler
<>
: end
<>
I can only hope that was simple enough.