Let's do it the easy way.
We could remove all the random part since you only use one item.
But you don't gave me the part where giveReward(cid) is called
Just search for:
doPlayerAddItem(cid,rare,1)
doPlayerAddItem(cid,semi,1)
doPlayerAddItem(cid,aver,1)
Change all the 1 to 100.