View Map

"; } else { $row["minimap"] = << THEVERYENDOFYOU; } // Travel To handling. $row["travelto"] = ""; // First we build the query string. $townstring = "("; $townslist = explode(",",$userrow["townslist"]); foreach($townslist as $a=>$b) { $townstring .= "id='$b' OR "; } $townstring = rtrim($townstring, " OR "); $townstring .= ") AND world='".$userrow["world"]."'"; // Then we do the query. $traveltoquery = dorow(doquery("SELECT id,name FROM <> WHERE $townstring ORDER BY id"), "id"); // Finally we build the link list. foreach ($traveltoquery as $a => $b) { $row["travelto"] .= "".$b["name"]."
\n"; } // And then we're done with this panel. return parsetemplate(gettemplate("panels_left"), $row); } function panelright() { global $controlrow; $row["babblebox"] = ""; $row["whosonline"] = ""; // Babblebox. if ($controlrow["showshout"] == 1) { $row["babblebox"] = "
Babblebox
"; $row["babblebox"] .= "

"; } // Who's Online. if ($controlrow["showonline"] == 1) { $row["whosonline"] = "
Who's Online
"; $users = dorow(doquery("SELECT * FROM <> WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'"), "id"); $number = count($users); $row["whosonline"] .= "There are $number user(s) online within the last 10 minutes: "; foreach ($users as $a => $b) { if ($b["guild"] != 0) { $charname = "[".$b["guildtag"]."]".$b["charname"].""; } else { $charname = $b["charname"]; } $row["whosonline"] .= "$charname, "; } $row["whosonline"] = rtrim($row["whosonline"], ", "); } // And then we're done with this panel. return parsetemplate(gettemplate("panels_right"), $row); } function paneltop($loggedin = true) { global $acctrow, $userrow; if ($loggedin == true || isset($acctrow)) { if (empty($userrow) || !isset($userrow) || $userrow === false) { $userrow = []; $userrow["charname"] = "No Characters Yet"; $userrow["guild"] = 0; } //if ($acctrow["authlevel"] == 255) { $admin = " (Admin)"; } else { $admin = ""; } $admin = ""; if ($userrow["guild"] != 0) { $charname = "[".$userrow["guildtag"]."]".$userrow["charname"].""; } else { $charname = $userrow["charname"]; } $top = "
\n
$charname$admin
\n"; $top .= "[ Log Out | Account | Characters | Help ]\n"; $top .= "
\n"; } else { $top = "
\n
Not Logged In
\n"; $top .= "[ Log In | Register | Help ]\n"; $top .= "
\n"; } return $top; } function panelbottom() { global $userrow, $spells; $row = array(); if ($userrow["charpicture"] != "") { $row["charpicture"] = $userrow["charpicture"]; } else { $row["charpicture"] = "images/users/nopicture.gif"; } // Do quickspell stuff. $quickhealid = 0; $quickhealvalue = 0; if ($userrow["currentaction"] == "Exploring") { for ($i=1; $i<11; $i++) { if ($userrow["spell".$i."id"] != 0) { if ($spells[$userrow["spell".$i."id"]]["fname"] == "heal") { if ($spells[$userrow["spell".$i."id"]]["value"] > $quickhealvalue) { $quickhealvalue = $spells[$userrow["spell".$i."id"]]["value"]; $quickhealid = $spells[$userrow["spell".$i."id"]]["id"]; } } } } } if ($quickhealid != 0) { $row["quickheal"] = "(Heal)"; } else { $row["quickheal"] = ""; } // Do the rest of it. $row["level"] = $userrow["level"]; if ($userrow["levelup"] > 0) { $row["levelup"] = "(".$userrow["levelup"]." LP)"; } else { $row["levelup"] = ""; } if ($userrow["levelspell"] > 0) { $row["levelspell"] = "(".$userrow["levelspell"]." SP)"; } else { $row["levelspell"] = ""; } $row["experience"] = number_format($userrow["experience"]); $row["gold"] = number_format($userrow["gold"]); $row["weapon"] = $userrow["item1name"]; $row["armor"] = $userrow["item2name"]; $row["helmet"] = $userrow["item3name"]; $row["shield"] = $userrow["item4name"]; $row["hpbar"] = statusbars("hp", $userrow["currenthp"], $userrow["maxhp"]); $row["mpbar"] = statusbars("mp", $userrow["currentmp"], $userrow["maxmp"]); $row["tpbar"] = statusbars("tp", $userrow["currenttp"], $userrow["maxtp"]); return parsetemplate(gettemplate("panels_bottom"),$row); } function panelmiddle() { global $userrow, $townrow, $worldrow; return gettemplate("panels_middle"); } function statusbars($stat, $current, $max) { $row = array(); switch ($stat) { case "hp": $row["bigname"] = "Hit Points"; $row["littlename"] = "HP"; break; case "mp": $row["bigname"] = "Magic Points"; $row["littlename"] = "MP"; break; case "tp": $row["bigname"] = "Travel Points"; $row["littlename"] = "TP"; break; case "exp": $row["bigname"] = "Experience"; $row["littlename"] = "Exp"; break; } $row["width"] = ceil(($current / $max) * 100); if ($row["width"] >= 66) { $row["color"] = "green"; } if ($row["width"] < 66 && $row["width"] >= 33) { $row["color"] = "yellow"; } if ($row["width"] < 33) { $row["color"] = "red"; } $row["current"] = $current; $row["max"] = $max; return parsetemplate(gettemplate("statusbars"),$row); } ?>