Dragon-Scourge/mapmini.php
Jamin Blount bcc5476d1f Beta 3 Build 13
2.04.2006 - Build 13 (Unlucky):
-
- Dying now properly takes you back to the actual lat/lon of the world's
first town (rather than 0,0 every time).
- Added 160+ new monsters for the later realms.
- Buy Maps now correctly only shows available maps from the Realm you're
in.
- Fixed some weirdness with the Travel To menu in the second Realm.
- Added storyline/quests.
- Added item drops from monsters.
- Monsters now have a chance to swing first, and to block you from
running.
- Added Quick Heal to panel_bottom.
- Users who are already a member of a guild no longer see the "Apply to
Join" link on the Guild List page.
- Added Honor Points to guilds.
* plus 1 point per member.
* plus floored square root of total combined member experience.
* plus 2 points per member PVP win.
* minus 1 point per member PVP loss.
* Calculated every 24 hours automatically, and upon every
approve/remove/leave.
* Displayed on the Guild List page.
- Added stats for your current items on the first Buy screen.
- You cannot create/join a guild until Level 10 to help prevent bank
abuse.
- Added PVP logging - wins, losses, and highest lvl character killed.
- Hall of Fame now shows top 25 chars.
- Hall of Fame now uses stock mysql_fetch_array() instead of custom
dorow().
- Items now have a 1 in 5 chance of having prefixes/suffixes (it used to
be 50:50).
- Added email verification support.
2017-02-05 11:52:51 -06:00

62 lines
2.3 KiB
PHP

<?php // mapmini.php :: minimap flash controller.
include("lib.php");
include("globals.php");
$perpix = 100 / ($worldrow["size"] * 2);
$text = "&";
// First do towns.
$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns"));
$text .= "towns=".sizeof($towns)."&";
$count = 0;
foreach($towns as $a=>$b) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "town".$count."_x=".$x."&";
$text .= "town".$count."_y=".$y."&";
$count++;
}
// Then do your character.
$lat = $userrow["latitude"];
$lon = $userrow["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "player_x=".$x."&";
$text .= "player_y=".$y."&";
// Then do everyone else.
$users = doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users");
$text .= "users=".mysql_num_rows($users)."&";
$count = 0;
while ($b = mysql_fetch_array($users)) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "user".$count."_x=".$x."&";
$text .= "user".$count."_y=".$y."&";
$count++;
}
// Then do quests.
if ($userrow["story"] != "0" && $userrow["story"] != "9999") {
$lat = $userrow["storylat"];
$lon = $userrow["storylon"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "story=1&";
$text .= "story_x=".$x."&";
$text .= "story_y=".$y."&";
$text .= "story_name=Quest&";
} else { $text .= "story=0&"; }
echo($text);
?>