// Zostałeś złapany w pułapkę Burli !
// Wyślij swojego zwierzaka po miksturę zdrowia!
function goFetch() {
// Możesz użyj pętli w funkcji .
while(true) {
var potion = hero.findNearestItem();
if(potion) {
// Use pet.fetch to fetch the potion.
pet.fetch(potion);
}
}
}
// When your pet is summoned, it triggers a "spawn" event.
// This tells your pet to run the goFetch function at the start of the level:
pet.on("spawn", goFetch);
Projektuję strony www Lublin na Joomla i WordPress