hi,
im currently modifying quest shop. i added a success rate when requirements are submitted. it works well especially if its an equipment but when i start making useable items such as potions, here comes the problem:
i tried making 503(quest item) x 10pcs. yes, success rate worked however, it works as bundle. i mean success rates applied to all 10 pcs of 503. the way how i wanted the success rate is to work on each of the 10x of 503 item i crafted. so probably around 5-7pcs will successfully be crafted and everything else wont.
here is how I coded it. (i cant copy paste the code since im on mobile cuz our internet connection is under repair)
.@rate = 50;
if(.@rate >= rand(0,100)) {
getitem .@q[0],.@q[2];
}
note: this is from quest_shop of euphy at npc/custom/quest/ folder
thanks
edit: SOLVED BY USING LOOP