<?php ob_start(); require_once 'ustawienia/ustawienia.php'; require_once 'funkcje/podstawowe.php'; isUser($config); $player = getUser($config); require_once 'funkcje/HeroMgr.php'; $HeroMgr = new HeroMgr(); $HeroMgr->action($config, $player->usr_id); $HeroMgr->spells_end($config, $player); call("update arena_map inner join arena_users on m_who = usr_id set m_who = 0, m_status = 1 where last_action <= unix_timestamp() - 100"); call("update arena_map set m_subtype = m_refresh_who, m_refresh = 0, m_status = 0, m_fight = 0, m_type = 6 where m_refresh <= unix_timestamp() and m_refresh > 0 and m_who = 0"); if (!empty($_GET['where'])) { $_GET['where'] = intV($_GET['where']); hero_go($player->usr_id, $_GET['where']); } $pos = get_row("select m_x as x , m_y as y from arena_map where m_who = " . $player->usr_id . " limit 1"); if (empty($pos)) { hero_drop_to_map($player->usr_id, $player->last_pos_map); reload($config, 'map', ''); } $maps = get_all("select m_id, m_type, m_subtype, login, hero, m_who, mo_name from arena_map left join arena_users on m_who = usr_id left join arena_monsters on mo_id = m_subtype where m_ms_id = " . $player->last_pos_map . " and ( m_x >= " . $pos->x . " - 3) and (m_x <= " . $pos->x . " + 3) and ( m_y >= " . $pos->y . " - 3) and (m_y <= " . $pos->y . " + 3) order by m_x asc, m_y asc limit 49"); $echo = ''; if (is_array($maps)) { foreach ($maps as $map) { switch ($map->m_type) { case 2: $echo .= "<div style='width:60px; height:60px; float:left; background-image: url(www/grass.gif)'><img src='www/tree02.gif' alt='' border=0 width='60px' height='60px'/></div>"; break; case 3: