Your pick code throws 4 dice with 10 eyes and checks if at least one fits, and then picks an item randomly.
Which means your script decides if it should give loot or not (Which contradicts your 4. Rule) but in case it drops an item, it gives every item an equal chance to be dropped.
Except Yggrasil Berry, which gets a 1% chance to be dropped regardless of if there was already a drop, which also contradicts your 4. Rule.
Here is what I would do to change your script to make it fit your given rules:
prt_fild00,278,237,0 script Fishing School 10065,{
if (!isequipped(.rod)) {
dispbottom("[Fishing] You need a Fishing Rod.");
end;
}
specialeffect(EF_BUBBLE, "Fishing School");
soundeffect("_attack_axe.wav", 0);
dispbottom("[Fishing] Casting...");
progressbar("ffffff", .cast_delay);
.@pick = rand(1, .catch_weight_sum);
for(.@i = 0; .@i < getarraysize(.catches); .@i += 2) {
.@pick -= .catches[.@i + 1];
if(.@pick <= 0) {
.@catch = .catches[.@i];
break;
}
}
getitem(.@catch, 1);
specialeffect2(610);
soundeffectall("see_otter_damage.wav", 0, strcharinfo(3));
dispbottom("[Fishing] You got "+ getitemname(.@catch) + ".");
end;
OnInit:
.rod = 2764;
.cast_delay = 5;
// Red Herb 40%; Yellow Herb 30%; White Herb 20%, Blue Herb 10%, Yggdrasil Berry 0.01%
setarray(.catches, 507, 4000, 508, 3000, 509, 2000, 510, 1000, 607, 1);
for(.@i = 0; .@i < getarraysize(.catches); .@i += 2)
.catch_weight_sum = .catches[.@i + 1];
}