I have a problem with the fishing script, I just want to make it grants player 40% to get the fish, and 10% being teleported to the iz_dun05. I have modified it several times but it did not grant a 40% chance to get the fish etc. So I would be grateful if someone tells me how to edit the if random(1,100) function. Here's the script
dewata,246,60,0 script Fishing Hole 844,{
//Fishing rod
set .@Rod,2764;
//Fishing Lure
set .@Lure,2775;
//Auto-Fish
set .@Auto,1;
//Auto-Fish on Fail
set .@AutoFail,1;
Fish:
if (isequipped(.@Rod)) && (isequipped(.@Lure)){
specialeffect EF_BUBBLE,"Fishing Hole";
//soundeffect "fishingrod.wav",0;
dispbottom "[Fishing] Casting...";
set .@fcast,15;
if (isequipped(2550)) { //Fisher's Muffler
set .@fcast,.@fcast - 2;
}
if (isequipped(2443)) { //Fisher's Boots
set .@fcast,.@fcast - 2;
}
if (isequipped(2764)) { //Fishing Pole
set .@fcast,.@fcast - 3;
}
if (isequipped(2775)) { //Fishing Lure
set .@fcast,.@fcast - 1;
}
progressbar "ffffff",.@fcast;
if (rand(1,10) == 7){
getitem 6096,1; //Fish with Blue Back
specialeffect2 EF_TEMP_OK;
//soundeffectall "success.wav",0,strcharinfo(3);
mapannounce strcharinfo(3),strcharinfo(0)+" has caught a fish!",bc_map,"0xff77ff";
if(.@Auto==1){
goto Fish;}else{
end;}
}
if (rand(1,10) == 1) {
dispbottom "[Fishing] Kraken drags your feet!!!";
warp "iz_dun05",0,0;
}
else {
dispbottom "[Fishing] Nothing was caught...";
if(.@AutoFail == 1){
goto Fish;} else{
end;}
}
if (rand(1,100) == 1){
setarray .@Rare[0],13890,616,17229;
set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))];
getitem .@RareCatch,1; //Reward
mapannounce strcharinfo(3),strcharinfo(0)+" has got a "+getitemname(.@RareCatch)+"!",bc_map,"0x33CC00";
}
if(.@Auto == 1){
goto Fish;} else{
end;}
}
else {
dispbottom "[Fishing] You need a Rod and Lure.";
end;
}
}