Probability increase

I am trying to make a simple rpg game. I am trying to implement some kind of probability system where, for example, if i 'buy' a special sword, it is going to increase the likelihood of my character picking up some special items. Say, +3% chance to pick up a special item.
thank you!
thank you!
Comments
Create an integer attribute called "Special Pickup Chance - SPC" and set it at 0. Then, on a timer, do a change attribute that sets SPC to random(0,100) (This will choose a random number between 0-100).
If your hero picks up the special sword, then have a rule that says "if SPC <= 3, collect special item". Lets say your hero picks up a better sword, that gives hero a 5% chance to collect a special item. Change your rule to say "if SPC <= 5, collect special item". I'm working on an RPG as well, and as far as I can tell, this is the best way to do probabilities.