int insults = 0;
int countInsults() {
int total;
for i from 1 to 8
if(get_property("lastPirateInsult"+i) == "true")
total = total + 1;
if(total > insults) {
print("Learned insult number: "+total, "green");
insults = total;
}
return total;
}
void main() {
while(countInsults() < 7 && my_adventures() > 0)
adventure(1, $location[Barrrneys Barrr]);
print("Done!");
}