Пример #1
0
        }
        print $ToolTips;
    } else {
        print "<br><b>No Items Found</b>";
    }
    print "</center>";
}
// end items
if ($mode == "spawngroups") {
    if ($DisplaySpawnGroupInfo == TRUE) {
        print "</center>";
        $query = "SELECT {$tbspawngroup}.*,{$tbspawn2}.x,{$tbspawn2}.y,{$tbspawn2}.z,{$tbspawn2}.respawntime\n\t\t\tFROM {$tbspawn2},{$tbspawngroup}\n\t\t\tWHERE {$tbspawn2}.zone='{$name}'\n\t\t\tAND {$tbspawngroup}.id={$tbspawn2}.spawngroupID\n\t\t\tORDER BY {$tbspawngroup}.name ASC";
        $result = mysql_query($query) or message_die('zone.php', 'MYSQL_QUERY', $query, mysql_error());
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_array($result)) {
                print "<li><a href=spawngroup.php?id=" . $row["id"] . ">" . $row["name"] . "</a> (" . floor($row["y"]) . " / " . floor($row["x"]) . " / " . floor($row["z"]) . ") (respawn time : " . translate_time($row["respawntime"]) . ")<ul>";
                $query = "SELECT {$tbspawnentry}.npcID,{$tbnpctypes}.name,{$tbspawnentry}.chance,{$tbnpctypes}.level\n\t\t\t\t\tFROM {$tbspawnentry},{$tbnpctypes}\n\t\t\t\t\tWHERE {$tbspawnentry}.npcID={$tbnpctypes}.id\n\t\t\t\t\tAND {$tbspawnentry}.spawngroupID=" . $row["id"] . "\n\t\t\t\t\tORDER BY {$tbnpctypes}.name ASC";
                $result2 = mysql_query($query) or message_die('zone.php', 'MYSQL_QUERY', $query, mysql_error());
                while ($res = mysql_fetch_array($result2)) {
                    print "<li><a href=npc.php?id=" . $res["npcID"] . ">" . $res["name"] . "</a>, chance " . $res["chance"] . "%";
                    print " (level " . $res["level"] . ")";
                }
                print "</ul>";
            }
        } else {
            print "<center><br><b>No Spawns Found</b></center>";
        }
        print "<center>";
    }
}
// end spawngroups
Пример #2
0
if ($dbspelltargets[$spell["targettype"]] != "") {
    print $dbspelltargets[$spell["targettype"]];
} else {
    print "Unknown target (" . $spell["targettype"] . ")";
}
print "</td></tr>";
print "<tr><td nowrap><b>Resist : </b></td><td>" . $dbspellresists[$spell["resist"]] . " (adjust: " . $spell["ResistDiff"] . ")</td></tr>";
if ($spell["TimeOfDay"] == 2) {
    print "<tr><td nowrap><b>Casting restriction : </b></td><td>Nighttime</td></tr>";
}
$duration = CalcBuffDuration($minlvl, $spell["buffdurationformula"], $spell["buffduration"]);
print "<tr><td nowrap><b>Duration : </b></td><td>";
if ($duration == 0) {
    print "Instant";
} else {
    print translate_time($duration * 6) . " ({$duration} ticks)";
}
print "</td></tr>";
for ($i = 1; $i <= 4; $i++) {
    // reagents
    if ($spell["components" . $i] > 0) {
        print "<tr><td nowrap><b>Needed reagent {$i} : </b></td><td>" . "<a href=item.php?id=" . $spell["components" . $i] . ">" . GetFieldByQuery("Name", "SELECT Name FROM {$tbitems} WHERE id=" . $spell["components" . $i]) . " </a>(" . $spell["component_counts" . $i] . ")</td></tr>";
    }
}
print "<tr><td colspan=2><b>Spell effects:</b></td></tr>";
echo '<td align="center" colspan=2><small>';
for ($n = 1; $n <= 12; $n++) {
    SpellDescription($spell, $n);
}
echo '</small></td>';
print "</table></td><td nowrap>";
Пример #3
0
function BuildSpellInfo($spell, $show_name_icon)
{
    global $dbclasses, $dbspelltargets, $dbspellresists, $dbskills, $icons_url, $tbitems, $icons_dir;
    $html_string = "<table border=0 style='padding:5px;width:500px'>";
    if ($show_name_icon) {
        $html_string .= "<tr><td>";
        $html_string .= '<img src="includes/img.php?type=spellimage&id=' . $spell['new_icon'] . '" class="btn btn-default">';
        $html_string .= "</td><td><h2 style='margin-top:0'>" . $spell["name"] . "</h2><hr>";
        $html_string .= "</td></tr>";
    }
    $html_string .= "<tr><td nowrap><b>Classes</b></td><td>";
    $v = "";
    $minlvl = 70;
    for ($i = 1; $i <= 16; $i++) {
        if ($spell["classes{$i}"] > 0 and $spell["classes{$i}"] < 255) {
            $html_string .= "{$v} " . $dbclasses[$i] . " (" . $spell["classes{$i}"] . ")";
            $v = ",";
            if ($spell["classes{$i}"] < $minlvl) {
                $minlvl = $spell["classes{$i}"];
            }
        }
    }
    $html_string .= "</td></tr>";
    if ($spell["you_cast"] != "") {
        $html_string .= "<tr><td nowrap><b>When you cast </b></td><td>" . $spell["you_cast"] . "</td></tr>";
    }
    if ($spell["other_casts"] != "") {
        $html_string .= "<tr><td nowrap><b>When others cast</b></td><td>" . $spell["other_casts"] . "</td></tr>";
    }
    if ($spell["cast_on_you"] != "") {
        $html_string .= "<tr><td nowrap><b>When cast on you </b></td><td>" . $spell["cast_on_you"] . "</td></tr>";
    }
    if ($spell["cast_on_other"] != "") {
        $html_string .= "<tr><td nowrap><b>When cast on other </b></td><td>" . $spell["cast_on_other"] . "</td></tr>";
    }
    if ($spell["spell_fades"] != "") {
        $html_string .= "<tr><td nowrap><b>When fading </b></td><td>" . $spell["spell_fades"] . "</td></tr>";
    }
    $html_string .= "<tr><td nowrap><b>Mana </b></td><td>" . $spell["mana"] . "</td></tr>";
    if ($spell["skill"] < 52) {
        $html_string .= "<tr><td nowrap><b>Skill</b></td><td>" . $dbskills[$spell["skill"]] . "</td></tr>";
    }
    $html_string .= "<tr><td nowrap><b>Casting time</b></td><td>" . $spell["cast_time"] / 1000 . " sec</td></tr>";
    $html_string .= "<tr><td nowrap><b>Recovery time</b></td><td>" . $spell["recovery_time"] / 1000 . " sec</td></tr>";
    $html_string .= "<tr><td nowrap><b>Recast time</b></td><td>" . $spell["recast_time"] / 1000 . " sec</td></tr>";
    $html_string .= "<tr><td nowrap><b>Range</b></td><td>" . $spell["range"] . "</td></tr>";
    $html_string .= "<tr><td nowrap><b>Target</b></td><td>";
    if ($dbspelltargets[$spell["targettype"]] != "") {
        $html_string .= $dbspelltargets[$spell["targettype"]];
    } else {
        $html_string .= "Unknown target (" . $spell["targettype"] . ")";
    }
    $html_string .= "</td></tr>";
    $html_string .= "<tr><td nowrap><b>Resist</b></td><td>" . $dbspellresists[$spell["resist"]] . " (adjust" . $spell["ResistDiff"] . ")</td></tr>";
    if ($spell["TimeOfDay"] == 2) {
        $html_string .= "<tr><td nowrap><b>Casting restriction</b></td><td>Nighttime</td></tr>";
    }
    $duration = CalcBuffDuration($minlvl, $spell["buffdurationformula"], $spell["buffduration"]);
    $html_string .= "<tr><td nowrap><b>Duration</b></td><td>";
    if ($duration == 0) {
        $html_string .= "Instant";
    } else {
        $html_string .= translate_time($duration * 6) . " ({$duration} ticks)";
    }
    $html_string .= "</td></tr>";
    for ($i = 1; $i <= 4; $i++) {
        // reagents
        if ($spell["components" . $i] > 0) {
            $html_string .= "<tr><td nowrap><b>Needed Reagents # {$i} </b></td><td>" . "<a href=item.php?id=" . $spell["components" . $i] . ">" . GetFieldByQuery("Name", "SELECT Name FROM {$tbitems} WHERE id=" . $spell["components" . $i]) . " </a> x " . $spell["component_counts" . $i] . " </td></tr>";
        }
    }
    $html_string .= "<tr><td colspan=2><b>Spell effects:</b></td></tr>";
    $html_string .= "<td></td><td align='left' colspan=1><small>";
    for ($n = 1; $n <= 12; $n++) {
        $html_string .= SpellDescription($spell, $n, false, false);
    }
    $html_string .= "</small></td>";
    $html_string .= "</table>";
    return $html_string;
}
Пример #4
0
if (mysql_num_rows($result) > 0) {
    print "<b>This NPC spawns in : </b>";
    $z = "";
    while ($row = mysql_fetch_array($result)) {
        if ($z != $row["short_name"]) {
            print "<p><a href='zone.php?name=" . $row["short_name"] . "'>" . $row["long_name"] . "</a>";
            $z = $row["short_name"];
            if ($AllowQuestsNPC == TRUE) {
                if (file_exists("{$quests_dir}{$z}/" . str_replace("#", "", $npc["name"]) . ".pl")) {
                    print "<br/><a href='" . $root_url . "quests/index.php?npc=" . str_replace("#", "", $npc["name"]) . "&zone=" . $z . "&amp;npcid=" . $id . "'>Quest(s) for that NPC</a>";
                }
            }
        }
        if ($DisplaySpawnGroupInfo == TRUE) {
            print "<li><a href='spawngroup.php?id=" . $row["spawngroupID"] . "'>" . $row["spawngroup"] . "</a> : " . floor($row["y"]) . " / " . floor($row["x"]) . " / " . floor($row["z"]);
            print "<br/>Spawns every " . translate_time($row["respawntime"]);
        }
    }
}
// factions
$query = "SELECT {$tbfactionlist}.name,\n\t\t\t{$tbfactionlist}.id,\n\t\t\t{$tbnpcfactionentries}.value\n\t\t\tFROM {$tbfactionlist},{$tbnpcfactionentries}\n\t\t\tWHERE {$tbnpcfactionentries}.npc_faction_id=" . $npc["npc_faction_id"] . "\n\t\t\tAND {$tbnpcfactionentries}.faction_id={$tbfactionlist}.id\n\t\t\tAND {$tbnpcfactionentries}.value<0\n\t\t\tGROUP BY {$tbfactionlist}.id";
$result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
if (mysql_num_rows($result) > 0) {
    print "<p><b>Killing this NPC lowers factions with : </b><ul>";
    while ($row = mysql_fetch_array($result)) {
        if ($ShowNPCFactionHits == TRUE) {
            print "<li><a href=faction.php?id=" . $row["id"] . ">" . $row["name"] . "</a> (" . $row["value"] . ")";
        } else {
            print "<li><a href=faction.php?id=" . $row["id"] . ">" . $row["name"] . "</a>";
        }
    }
Пример #5
0
</td>
        <td><?php 
    echo $nick;
    ?>
</td>
        <td><?php 
    echo $score['Sectors'];
    ?>
</td>
        <td><?php 
    echo $score['Divisions'];
    ?>
</td>
        <td><?php 
    echo $score['Buildings'];
    ?>
</td>
        <td><?php 
    echo $score['total'];
    ?>
</td>
        <td><?php 
    echo translate_time($_SERVER['REQUEST_TIME'] - $score['lastUpdate']);
    ?>
</td>
    </tr>
<?php 
    $position++;
}
?>
</table>
Пример #6
0
 $txt = "";
 $spawns = array();
 $loots = array();
 $query = "SELECT {$tbnpctypes}.* FROM {$tbnpctypes} WHERE {$tbnpctypes}.id={$id}";
 $mymob = GetRowByQuery($query);
 $txt = str_replace(array('_', '#'), ' ', $mymob["name"]) . ",";
 $txt .= $dbiracenames[$mymob["race"]] . ",";
 $txt .= $dbclasses[$mymob["class"]] . ",";
 $txt .= $mymob["level"] . ",";
 $query = "SELECT {$tbspawn2}.x,{$tbspawn2}.y,{$tbspawn2}.z,\n             {$tbspawngroup}.name as spawngroup,\n             {$tbspawngroup}.id as spawngroupID,\n             {$tbspawn2}.respawntime\n          FROM {$tbspawnentry},{$tbspawn2},{$tbspawngroup}\n          WHERE {$tbspawnentry}.npcID={$id}\n            AND {$tbspawnentry}.spawngroupID={$tbspawn2}.spawngroupID\n            AND {$tbspawn2}.zone='{$name}'\n            AND {$tbspawnentry}.spawngroupID={$tbspawngroup}.id";
 $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
 if (mysql_num_rows($result) > 0) {
     $cpt = 0;
     while ($row = mysql_fetch_array($result)) {
         $spawns[$cpt] = floor($row["y"]) . " / " . floor($row["x"]) . " / " . floor($row["z"]);
         $spawns[$cpt] .= " (" . translate_time($row["respawntime"]) . ")";
         $cpt++;
     }
 }
 if ($mymob["loottable_id"] > 0 and (!in_array($mymob["class"], $dbmerchants) or $MerchantsDontDropStuff == FALSE)) {
     $query = "SELECT {$tbitems}.id,{$tbitems}.Name,{$tbitems}.itemtype,\n                   {$tblootdropentries}.chance,{$tbloottableentries}.probability,\n                   {$tbloottableentries}.lootdrop_id,{$tbloottableentries}.multiplier\n            FROM {$tbitems},{$tbloottableentries},{$tblootdropentries}\n            WHERE {$tbloottableentries}.loottable_id=" . $mymob["loottable_id"] . "\n              AND {$tbloottableentries}.lootdrop_id={$tblootdropentries}.lootdrop_id\n              AND {$tblootdropentries}.item_id={$tbitems}.id";
     $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
     if (mysql_num_rows($result) > 0) {
         $cpt = 0;
         while ($row = mysql_fetch_array($result)) {
             $loots[$cpt] = $row["Name"];
             $loots[$cpt] .= " (" . $dbitypes[$row["itemtype"]] . ")";
             $cpt++;
         }
     }
 }
Пример #7
0
 $mymob = GetRowByQuery($query);
 if ($ZoneDebug == TRUE) {
     print "<td align=center>" . $_POST["npc"][$i] . "</td>";
 }
 print "<td nowrap><a href=npc.php?id=" . $mymob["id"] . ">" . str_replace(array('_', '#'), ' ', $mymob["name"]) . "</a></td>";
 print "<td nowrap>" . $dbiracenames[$mymob["race"]] . "</td>";
 print "<td nowrap>" . $dbclasses[$mymob["class"]] . "</td>";
 print "<td nowrap align=center>" . $mymob["level"] . "</td>";
 $query = "SELECT {$tbspawn2}.x,{$tbspawn2}.y,{$tbspawn2}.z,\n               {$tbspawngroup}.name as spawngroup,\n               {$tbspawngroup}.id as spawngroupID,\n               {$tbspawn2}.respawntime\n               FROM {$tbspawnentry},{$tbspawn2},{$tbspawngroup}\n               WHERE {$tbspawnentry}.npcID=" . $_POST["npc"][$i] . "\n                 AND {$tbspawnentry}.spawngroupID={$tbspawn2}.spawngroupID\n                 AND {$tbspawn2}.zone='{$name}'\n                 AND {$tbspawnentry}.spawngroupID={$tbspawngroup}.id";
 $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
 if (mysql_num_rows($result) > 0) {
     print "<td nowrap>";
     $sep = "";
     while ($row = mysql_fetch_array($result)) {
         print "{$sep}" . floor($row["y"]) . " / " . floor($row["x"]) . " / " . floor($row["z"]);
         print ", " . translate_time($row["respawntime"]);
         $sep = "<br>";
     }
     print "</td>";
 }
 if ($mymob["loottable_id"] > 0 and (!in_array($mymob["class"], $dbmerchants) or $MerchantsDontDropStuff == FALSE)) {
     $query = "SELECT {$tbitems}.id,{$tbitems}.Name,{$tbitems}.itemtype,\n                     {$tblootdropentries}.chance,{$tbloottableentries}.probability,\n                     {$tbloottableentries}.lootdrop_id,{$tbloottableentries}.multiplier\n              FROM {$tbitems},{$tbloottableentries},{$tblootdropentries}\n              WHERE {$tbloottableentries}.loottable_id=" . $mymob["loottable_id"] . "\n                AND {$tbloottableentries}.lootdrop_id={$tblootdropentries}.lootdrop_id\n              AND {$tblootdropentries}.item_id={$tbitems}.id\n             ";
     $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
     if (mysql_num_rows($result) > 0) {
         print "<td nowrap>";
         $sep = "";
         while ($row = mysql_fetch_array($result)) {
             print "{$sep}<a href=item.php?id=" . $row["id"] . ">" . $row["Name"] . "</a>";
             print ", " . $dbitypes[$row["itemtype"]];
             $sep = "<br>";
         }