Example #1
0
       <a onClick="return confirm('Really Delete Pet entry for <?php 
echo getNPCName($npcid);
?>
?');" href="index.php?editor=npc&z=<?php 
echo $currzone;
?>
&zoneid=<?php 
echo $currzoneid;
?>
&npcid=<?php 
echo $npcid;
?>
&action=57"><img src="images/remove3.gif" border="0" title="Delete Pet entry"></a>
       </div>  
       Pet data for <?php 
echo getNPCName($npcid);
?>
 (<?php 
echo $npcid;
?>
) 
       </div>
        <div class="table_content">
       <div style="padding: 5px 0px 0px 20px;">
          Type: <?php 
echo $type;
?>
<br>
          Petpower: <?php 
echo $petpower;
?>
Example #2
0
function get_spawngroups($search)
{
    global $mysql, $npcid, $spawngroup_limit;
    if ($search != '') {
        $minx = $_POST['minx'];
        $maxx = $_POST['maxx'];
        $miny = $_POST['miny'];
        $maxy = $_POST['maxy'];
        $limit = $_POST['limit'];
        $npcname = $_POST['npcname'];
        if ($spawngroup_limit != '' && ($limit < 1 || $limit > $spawngroup_limit)) {
            $limit = $spawngroup_limit;
        }
        if ($spawngroup_limit == '' && ($limit < 1 || $limit > 150)) {
            $limit = 150;
        }
        if ($npcname != '') {
            $query = "SELECT spawngroupID FROM spawn2 LEFT JOIN spawnentry USING (spawngroupID) LEFT JOIN spawngroup ON (spawn2.spawngroupID = spawngroup.id) LEFT JOIN npc_types ON (spawnentry.npcID = npc_types.id) WHERE spawn2.zone = '{$search}' AND spawn2.x >= {$minx} AND spawn2.x <= {$maxx} AND spawn2.y >= {$miny} AND spawn2.y <= {$maxy} AND npc_types.name rlike \"{$npcname}\" group by spawngroupID limit {$limit}";
        } else {
            $query = "SELECT spawngroupID FROM spawn2 LEFT JOIN spawnentry USING (spawngroupID) LEFT JOIN spawngroup ON (spawn2.spawngroupID = spawngroup.id) WHERE spawn2.zone = '{$search}' AND spawn2.x >= {$minx} AND spawn2.x <= {$maxx} AND spawn2.y >= {$miny} AND spawn2.y <= {$maxy} group by spawngroupID limit {$limit}";
        }
    } else {
        $query = "SELECT * FROM spawnentry WHERE npcID={$npcid} ORDER BY spawngroupID";
    }
    $results = $mysql->query_mult_assoc($query);
    if (!$results) {
        return;
    }
    for ($x = 0; $x < count($results); $x++) {
        $id = $results[$x]['spawngroupID'];
        $query = "SELECT name, spawn_limit, dist, max_x, min_x, max_y, min_y, delay, mindelay, despawn, despawn_timer FROM spawngroup WHERE id={$id}";
        $result = $mysql->query_assoc($query);
        $results[$x]['name'] = $result['name'];
        $results[$x]['spawn_limit'] = $result['spawn_limit'];
        $results[$x]['dist'] = $result['dist'];
        $results[$x]['max_x'] = $result['max_x'];
        $results[$x]['min_x'] = $result['min_x'];
        $results[$x]['max_y'] = $result['max_y'];
        $results[$x]['min_y'] = $result['min_y'];
        $results[$x]['delay'] = $result['delay'];
        $results[$x]['mindelay'] = $result['mindelay'];
        $results[$x]['despawn'] = $result['despawn'];
        $results[$x]['despawn_timer'] = $result['despawn_timer'];
        $query = "SELECT count(*) AS count FROM spawn2 WHERE spawngroupID={$id}";
        $result = $mysql->query_assoc($query);
        $results[$x]['count'] = $result['count'];
        $query = "SELECT * FROM spawnentry WHERE spawngroupID={$id}";
        $results2 = $mysql->query_mult_assoc($query);
        foreach ($results2 as $r2) {
            $r2['name'] = getNPCName($r2['npcID']);
            $results[$x]['npcs'][] = $r2;
        }
        if ($search != '') {
            $query = "SELECT npcID FROM spawnentry WHERE spawngroupID={$id} limit 1";
            $result = $mysql->query_assoc($query);
            $results[$x]['npcid'] = $result['npcID'];
        }
    }
    return $results;
}
Example #3
0
        <td align="center" width="45%"><strong>Currency</strong></td>
        <td width="10%">&nbsp;</td>
      </tr>
<?php 
    $x = 0;
    foreach ($altcur_npcs as $npc) {
        ?>
      <tr bgcolor="#<?php 
        echo $x % 2 == 0 ? "BBBBBB" : "AAAAAA";
        ?>
">
        <td align="center" width="45%"><a href="index.php?editor=npc&npcid=<?php 
        echo $npc['id'];
        ?>
"><?php 
        echo getNPCName($npc['id']);
        ?>
 (<?php 
        echo $npc['id'];
        ?>
)</a></td>
        <td align="center" width="45%"><?php 
        echo get_currency_name($npc['alt_currency_id']);
        ?>
 (<?php 
        echo $npc['alt_currency_id'];
        ?>
)</td>
        <td align="right" width="10%"><a href="index.php?editor=altcur&npcid=<?php 
        echo $npc['id'];
        ?>
Example #4
0
        break;
    case 'quest':
        $breadcrumbs = "<a href='index.php?editor=" . $editor . "'>Quest Editor</a>";
        break;
    case 'inv':
        $breadcrumbs = "<a href='index.php?editor=" . $editor . "'>Player Inventory</a>";
        break;
    case 'keys':
        $breadcrumbs = "<a href='index.php?editor=" . $editor . "'>Player Keys</a>";
        break;
}
if ($z != '') {
    $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&z=" . $z . "&zoneid=" . getZoneIDByName($z) . "'>" . getZoneLongName($z) . "</a>";
}
if ($npcid != '' && $npcid != 'ID' && $editor != 'altcur' && $editor != 'qglobal') {
    $breadcrumbs .= " >> " . getNPCName($npcid) . " ({$npcid})";
}
if ($fid != '') {
    $breadcrumbs .= " >> " . getFactionName($fid);
}
if ($tskid != '') {
    $breadcrumbs .= " >> " . getTaskTitle($tskid);
}
if ($ts != '') {
    $breadcrumbs .= " >> " . "<a href='index.php?editor=" . $editor . "&ts=" . $ts . "'>" . $tradeskills[$ts] . "</a>";
}
if ($rec != '0') {
    $breadcrumbs .= " >> " . getRecipeName($rec);
}
if ($spellset != '') {
    $breadcrumbs .= " >> " . getSpellsetName($spellset);
Example #5
0
        ?>
</td>
<?php 
        if ($v['effect'] == 2 || $v['effect'] == 3) {
            ?>
          <td align="center" width="10%"><a href="index.php?editor=npc&z=<?php 
            echo get_zone_by_npcid($v['effectvalue']);
            ?>
&zoneid=<?php 
            echo get_zoneid_by_npcid($v['effectvalue']);
            ?>
&npcid=<?php 
            echo $v['effectvalue'];
            ?>
"><?php 
            echo getNPCName($v['effectvalue']);
            ?>
</td>
<?php 
        }
        if ($v['effect'] == 1 || $v['effect'] == 4) {
            ?>
          <td align="center" width="10%"><?php 
            echo $v['effectvalue'];
            ?>
</td>
<?php 
        }
        if ($v['effect'] == 0) {
            ?>
          <td align="center" width="10%"><?php 
Example #6
0
          <td align="center" width="5%"><?php 
        echo $v['max_level'];
        ?>
</td>
          <td align="center" width="10%"><?php 
        echo $advtype[$v['type']];
        ?>
</td>
<?php 
        if ($v['type'] == 1 || $v['type'] == 4) {
            ?>
          <td align="center" width="18%"><a href="index.php?editor=npc&z=$z&npcid=<?php 
            echo $v['type_data'];
            ?>
"><?php 
            echo getNPCName($v['type_data']);
            ?>
</td>
<?php 
        }
        if ($v['type'] == 3) {
            ?>
          <td align="center" width="18%"><a href="index.php?editor=items&z=<?php 
            echo $currzone;
            ?>
&zoneid=<?php 
            echo $currzoneid;
            ?>
&npcid=<?php 
            echo $npcid;
            ?>
Example #7
0
function suggest_new_lootdrop()
{
    global $mysql, $npcid;
    $ltid = $_GET['ltid'];
    $query = "SELECT MAX(id) AS id FROM lootdrop";
    $result = $mysql->query_assoc($query);
    $id = $result['id'] + 1;
    $name = getNPCName($npcid);
    $name = $ltid . "_" . $name . "_";
    return array("id" => $id, "name" => $name);
}
Example #8
0
          <td align="center" width="8%"><?php 
echo $skill_level;
?>
</td>
          <td align="center" width="8%"><?php 
echo $chance;
?>
%</td>
<?php 
if ($npc_id > 0) {
    ?>
          <td align="center" width="10%"> <a href="index.php?editor=npc&z=$z&npcid=<?php 
    echo $npc_id;
    ?>
"><?php 
    echo getNPCName($npc_id);
    ?>
</td>
<?php 
}
?>
      
<?php 
if ($npc_id < 1) {
    ?>
     
          <td align="center" width="8%"><?php 
    echo $npc_id;
    ?>
</td>
<?php 
Example #9
0
 case 43:
     // Change NPC level
     check_authorization();
     $body = new Template("templates/npc/npc.changelevel.tmpl.php");
     $body->set('npcid', $npcid);
     $body->set('currzone', $z);
     $body->set('currzoneid', $zoneid);
     break;
 case 44:
     // Edit NPC Level
     check_authorization();
     $body = new Template("templates/npc/npc.editlevel.tmpl.php");
     $body->set('currzone', $z);
     $body->set('currzoneid', $zoneid);
     $body->set('npcid', $npcid);
     $body->set('npc_name', getNPCName($npcid));
     $body->set('genders', $genders);
     $body->set('factions', $factions);
     $body->set('yesno', $yesno);
     $body->set('skilltypes', $skilltypes);
     $body->set('bodytypes', $bodytypes);
     $body->set('races', $races);
     $body->set('classes', $classes);
     $body->set('specialattacks', $specialattacks);
     $body->set('faction_values', $faction_values);
     $body->set('pet', get_ispet());
     $vars = npc_info();
     if ($vars) {
         foreach ($vars as $key => $value) {
             $body->set($key, $value);
         }
Example #10
0
        ?>
</td>
          <?php 
        if ($atype == '2') {
            ?>
          <td align="center" width="5%"><a href="index.php?editor=npc&z=<?php 
            echo get_zone_by_npcid($v['entry']);
            ?>
&zoneid=<?php 
            echo get_zoneid_by_npcid($v['entry']);
            ?>
&npcid=<?php 
            echo $v['entry'];
            ?>
"><?php 
            echo getNPCName($v['entry']);
            ?>
</td>
          <?php 
        }
        ?>
          <?php 
        if ($atype != '2') {
            ?>
          <td align="center" width="20%"><a href="index.php?editor=items&tskid=<?php 
            echo $id;
            ?>
&id=<?php 
            echo $v['entry'];
            ?>
&action=2"><?php 
Example #11
0
          <td align="center"><strong>Expires</strong></td>
          <td width="5%">&nbsp;</td>
        </tr>
<?$x=0;
foreach($qglobals as $qglobal):?>
        <tr bgcolor="#<? echo ($x % 2 == 0) ? "BBBBBB" : "AAAAAA";?>">
          <td align="center"><?php 
echo $qglobal['name'];
?>
</td>
          <td align="center"><?php 
echo $qglobal['value'];
?>
</td>
          <td align="center"><?echo ($qglobal['charid'] > 0) ? '<a href="index.php?editor=player&playerid=' . $qglobal['charid'] . '">' . getPlayerName($qglobal['charid']) . '</a>' : "ANY";?></td>
          <td align="center"><?echo ($qglobal['npcid'] > 0) ? '<a href="index.php?editor=npc&npcid=' . $qglobal['npcid'] . '">' . getNPCName($qglobal['npcid']) . '</a>' : "ANY";?></td>
          <td align="center"><?echo ($qglobal['zoneid'] > 0) ? getZoneName($qglobal['zoneid']) : "ANY";?></td>
          <td align="center"><?echo ($qglobal['expdate'] != '') ? get_real_time($qglobal['expdate']) : "NEVER";?></td>
          <td align="right"><a href="index.php?editor=qglobal&name=<?php 
echo $qglobal['name'];
?>
&charid=<?php 
echo $qglobal['charid'];
?>
&npcid=<?php 
echo $qglobal['npcid'];
?>
&zoneid=<?php 
echo $qglobal['zoneid'];
?>
&action=4"><img src="images/edit2.gif" width="13" height="13" border="0" title="Edit Quest Global"></a>&nbsp;<a onClick="return confirm('Really delete quest global?');" href="index.php?editor=qglobal&name=<?php 
Example #12
0
        ?>
">
          <td align="center"><?php 
        echo $qglobal['name'];
        ?>
</td>
          <td align="center"><?php 
        echo $qglobal['value'];
        ?>
</td>
          <td align="center"><?php 
        echo $qglobal['charid'] > 0 ? '<a href="index.php?editor=player&playerid=' . $qglobal['charid'] . '">' . getPlayerName($qglobal['charid']) . '</a>' : "ANY";
        ?>
</td>
          <td align="center"><?php 
        echo $qglobal['npcid'] > 0 ? '<a href="index.php?editor=npc&npcid=' . $qglobal['npcid'] . '">' . getNPCName($qglobal['npcid']) . '</a>' : "ANY";
        ?>
</td>
          <td align="center"><?php 
        echo $qglobal['zoneid'] > 0 ? getZoneName($qglobal['zoneid']) : "ANY";
        ?>
</td>
          <td align="center"><?php 
        echo $qglobal['expdate'] != '' ? get_real_time($qglobal['expdate']) : "NEVER";
        ?>
</td>
          <td align="right"><a href="index.php?editor=qglobal&name=<?php 
        echo $qglobal['name'];
        ?>
&charid=<?php 
        echo $qglobal['charid'];
Example #13
0
function MarkQuestNPC()
{
    global $mysql, $quest_path;
    $query = "UPDATE npc_types SET isquest = 0";
    $mysql->query_no_result($query);
    $query = "SELECT id FROM npc_types";
    $results = $mysql->query_mult_assoc($query);
    foreach ($results as $r) {
        $npcid = $r['id'];
        $name = getNPCName($npcid);
        $npcname = str_replace("`", "-", $name);
        $zone = get_zone_by_npcid($npcid);
        $zonepath = "{$quest_path}/{$zone}";
        $temppath = "{$quest_path}/templates";
        $LuafullpathID = "{$zonepath}/{$npcid}.lua";
        $LuafullpathName = "{$zonepath}/{$npcname}.lua";
        $LuafulltempID = "{$temppath}/{$npcid}.lua";
        $LuafulltempName = "{$temppath}/{$npcname}.lua";
        $fullpathID = "{$zonepath}/{$npcid}.pl";
        $fullpathName = "{$zonepath}/{$npcname}.pl";
        $fulltempID = "{$temppath}/{$npcid}.pl";
        $fulltempName = "{$temppath}/{$npcname}.pl";
        if (file_exists($LuafullpathID) || file_exists($LuafullpathName) || file_exists($LuafulltempID) || file_exists($LuafulltempName) || file_exists($fullpathID) || file_exists($fullpathName) || file_exists($fulltempID) || file_exists($fulltempName)) {
            $query = "UPDATE npc_types SET isquest = 1 WHERE id={$npcid}";
            $mysql->query_no_result($query);
        }
    }
}
Example #14
0
        ?>
%</td>
<?php 
        if ($v['npc_id'] > 0) {
            ?>
          <td align="center" width="10%"> <a href="index.php?editor=npc&z=<?php 
            echo get_zone_by_npcid($v['npc_id']);
            ?>
&zoneid=<?php 
            echo get_zoneid_by_npcid($v['npc_id']);
            ?>
&npcid=<?php 
            echo $v['npc_id'];
            ?>
"><?php 
            echo getNPCName($v['npc_id']);
            ?>
</td>
<?php 
        }
        ?>
      
<?php 
        if ($v['npc_id'] < 1) {
            ?>
     
          <td align="center" width="8%"><?php 
            echo $v['npc_id'];
            ?>
</td>
<?php