Can someone check what to fix here? This script supposedly will check if a player has either item ids 7784 to 7786 and they must have at least 1. Then the script will read if they got 7784, they will receive a random rental item. Same goes with 7785 and 7784. Can someone check what I did wrong here hahaha. Thank you
P_Yes4:
next;
if(#cgp == 0 && countitem(7784) = 0) goto Lnenough;
else if(#cgp == 1 && countitem(7785) = 0) goto Lnenough;
else if(#cgp == 2 && countitem(7786) = 0) goto Lnenough;
if(#cgp == 0) delitem 7784,1;
mes "[Freebies NPC]";
mes "Well, here you go! Thanks and enjoy the game!";
switch(rand(15)){
case 0:
rentitem 5776,86400;
break;
case 1:
rentitem 19517,86400;
break;
case 2:
rentitem 19515,86400;
break;
}
set #costumegpack,1;
else if(#cgp == 1) delitem 7785,1;
mes "[Freebies NPC]";
mes "Well, here you go! Thanks and enjoy the game!";
switch(rand(15)){
case 0:
rentitem 19510,86400;
break;
case 1:
rentitem 19522,86400;
break;
case 2:
rentitem 19521,86400;
break;
}
set #costumegpack,1;
else if(#cgp == 2) delitem 7786,1;
mes "[Freebies NPC]";
mes "Well, here you go! Thanks and enjoy the game!";
switch(rand(15)){
case 0:
rentitem 19516,86400;
break;
case 1:
rentitem 19513,86400;
break;
case 2:
rentitem 19509,86400;
break;
}
set #costumegpack,1;
close;