while (true) {
var item = hero.findNearestItem();
if (item) {
// If item.type isn't equal to "gem":
if (item.type != "gem") {
// Move to the item's position.
hero.moveXY(item.pos.x, item.pos.y);
}
}
}
Projektuję strony www Lublin na Joomla i WordPress