// Pokonaj szkielety i otwórz skrzynię.

function onSpawn (event) {
    // Pet should find the health potion (type is "potion"):
    var potion = pet.findNearestByType("potion");
    // and fetch it:
    pet.fetch(potion);


    // Pet should find the gold key (type is "gold-key"):
    var goldKey = pet.findNearestByType("gold-key");
    // and fetch it:
    pet.fetch(goldKey);
}

// Pet can find more than just items:
var skeleton = pet.findNearestByType("skeleton");
pet.on("spawn", onSpawn);

while(true) {
    if (skeleton.health > 0) {
        hero.attack(skeleton);
    }
    else {
        hero.moveXY(31, 38);
    }
}

 

 

 

 

 

 

 

 

 

 

 

 

   
   

 

 


 

Projektuję strony www Lublin na Joomla i WordPress