- Szczegóły
- 1735
// Zbierz skarb i ucieknij.
// Przygotuj bohatera i zwierzaka.
pet.moveXY(32, 28);
hero.moveXY(10, 19);
// Odwróć uwagę szkieletów.
// Zbierz skarb i ucieknij.
// Przygotuj bohatera i zwierzaka.
pet.moveXY(32, 28);
hero.moveXY(10, 19);
// Odwróć uwagę szkieletów.
// Użyj swojej nowej umiejętności by wybrać co zrobić : hero.time
while(true) {
// Jesli jest to 10 pierwszych sekund ,atakuj.
if (hero.time < 10) {
var enemy = hero.findNearestEnemy();
hero.attack(enemy);
}
Ważna jest broń - kusza strzelająca trzema bełtami i zbroja
// Go to the far right edge of the level to find new areas.
// Check the guide for more details.
while(true) {
var flag = hero.findFlag("green");
var enemy = hero.findNearestEnemy();
hero.moveXY(hero.pos.x + 5, hero.pos.y);
if (flag) {
hero.jumpTo(flag.pos.x , flag.pos.y);
hero.pickUpFlag(flag);
}
if (enemy) {
hero.attack(enemy);
}
}
===============
Inne rozwiązanie
==========
// Go to the far right edge of the level to find new areas.
// Check the guide for more details.
while (true) {
hero.moveXY(hero.pos.x +10, hero.pos.y);
var flag = hero.findFlag("green");
var enemy = hero.findNearestEnemy();
var item = hero.findNearestItem();
if (!enemy && item && item.type == "potion") {
hero.moveXY(item.pos.x, item.pos.y);
}
if (flag) {
hero.moveXY(flag.pos.x, flag.pos.y);
hero.pickUpFlag(flag);
}
var enemy = hero.findNearestEnemy();
if (enemy) {
hero.attack(enemy);
}
}
Projektuję strony www Lublin na Joomla i WordPress
Problem jest taki że przy 3 przeciwniku trzeba się przemieścić bo inaczej nie wyszukuje go, i trzeba aktywować potem ducha
// Twój bohater nie zna imion wrogów!
// Okulary dają ci zdolność findNearestEnemy.
// Assign the result of hero.findNearestEnemy() to the variable enemy1:
var enemy1 = hero.findNearestEnemy();
// enemy1 now refers to the nearest enemy. Use the variable to attack!
hero.attack(enemy1);
hero.attack(enemy1);
// Keep moving right, but adjust up and down as you go.
while(true) {
var enemy = hero.findNearestEnemy();
var xPos = hero.pos.x + 5;
var yPos = 17;
if(enemy) {
// Adjust y up or down to get away from yaks.
if(enemy.pos.y > hero.pos.y) {
// If the Yak is above you, subtract 3 from yPos.
yPos -= 3;
}
// Get to the oasis. Watch out for new enemies: ogre scouts!
// Go up and right by adding to the current X and Y position.
while(true) {
// If there's an enemy, attack.
var enemy = hero.findNearestEnemy();
if (enemy) {
hero.attack(enemy);
// Ucieknij na prawą stronę doliny..
// Funkcja porusza bohaterem w dól i w prawo.
function moveDownRight(shift) {
hero.moveXY(hero.pos.x + shift, hero.pos.y - shift);
}
// Funkcja porusza bohaterem w górę i w prawo.
function moveUpRight(shift) {
// Uzupełnij tą funkcję.
hero.moveXY(hero.pos.x + shift, hero.pos.y + shift);
}
// Get to the Oasis by moving down 10m at a time.
// Build fences 20m to the left of each ogre.
while(true) {
var enemy = hero.findNearestEnemy();
if (enemy) {
// buildXY a "f