• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC Convert from Gesior to ZnoteAcc

Xarvi

New Member
Joined
Aug 20, 2020
Messages
51
Reaction score
2
Hey. Someone will explain to me how to convert the script from Gesior to Znote ? what functions to change etc.
PHP:
<style>
    .bounty_hunter_header {
        font-size: 16px;
    }
    .bounty_hunter_text {
        font-size: 15px;
        color: black;
        text-align: left;
        padding: 4px;
    }
    .bounty_hunter_table_header {
        font-size: 14px;
        color: white;
        background-color: #505050;
        text-align: center;
    }
    .lightRow {
        font-size: 14px;
        color: black;
        background-color: #F1E0C6;
        text-align: center;
    }
   .darkRow {
        font-size: 14px;
        color: black;
        background-color: #D4C0A1;
        text-align: center;
    }

</style>
<?php
////////////// CONFIG START /////////////////////////
$customCurrency = ''; // If you are using a custom currency add the name here
$imgPath = 'http://outfit-images.ots.me/animatedOutfits1090/animoutfit.php'; // Path to your images (default is Gesior 10.90 animated outfit images)
////////////// CONFIG END /////////////////////////
$main_content .= '
<center><h2>Bounty Hunters System</h2>
<table border="2" cellpadding="4" cellspacing="1" width="100%">
<tr class="bounty_hunter_table_header">
        <td class="bounty_hunter_header" colspan="2">General Information</td>
    </tr>
    <div>
 <img src="images/bounty.png" alt="myPic" />
 </div>
    <tr class="lightRow">
        <td><strong>Command:</strong></td>
        <td>!hunt playerName, points/gold'. (($customCurrency != '') ? '/'. $customCurrency.'' : '') . ', amount</td>
    </tr>
    <tr class="darkRow">
        <td colspan="2"><strong>Examples</strong></td>
    </tr>
    <tr class="lightRow">
        <td><strong>Add by points</strong></td>
        <td><strong>!hunt John, points, 10</strong><br/>Add bounty on player named John worth 10 points.<strong><br/>Min = 10<br/>Max = 500</strong></td>
    </tr>
    <tr class="darkRow">
        <td><strong>Add by gold</strong></td>
        <td><strong>!hunt John, gold, 100000</strong><br/>Add bounty on player named John worth 100,000 gold coins.<strong><br/>Min = 10cc<br/>Max = 100cc</strong></td>
    </tr>
    ';
    if ($customCurrency != '') {
        $main_content .= '
        <tr class="lightRow">
            <td><strong>Add by '.$customCurrency.'</strong></td>
            <td><strong>!hunt John, '.$customCurrency.', 20</strong><br/>Add bounty on player named John worth 20 '.$customCurrency.'.</td>
        </tr>
        ';   
    }
$main_content .= '
</table>
<br/>
';

$main_content .= '
<table border="2" cellpadding="4" cellspacing="1" width="100%">
    <tr class="bounty_hunter_table_header">
        <td>Hunted by</td>
        <td>Reward</td>
        <td>Player Hunted</td>
        <td>Outfit</td>
        <td>Killed by</td>
    </tr>';
$num = 0;
$bountys = $SQL->query('SELECT A.* , B.name AS hunted_by, C.name AS player_hunted, D.name AS killed_by
                        FROM bounty_hunter_system AS A
                        LEFT JOIN players AS B ON A.hunter_id = B.id
                        LEFT JOIN players AS C ON A.target_id = C.id
                        LEFT JOIN players AS D ON A.killer_id = D.id
                        ORDER BY A.killed,A.prize DESC');
if ($bountys->rowCount() > 0) {
    foreach($bountys as $bounty)
    {
        if ($bounty['killed_by']){
            $killed_by = '<a href="?subtopic=characters&name='.$bounty['killed_by'].'">'.$bounty['killed_by'].'</a>';
        } else {
            $killed_by = 'still alive';
        }
        $skill = $SQL->query('SELECT * FROM '.$SQL->tableName('players').' WHERE '.$SQL->fieldName('id').' = '.$bounty['target_id'].'')->fetch();
        $main_content .= '
            <TR class="'.(($num % 2 == 0) ? "lightRow" : "darkRow").'">
                <TD><center><b><a href="?subtopic=characters&name='.$bounty['hunted_by'].'">'.$bounty['hunted_by'].'</a></b></center></td>
                <TD><center><b>'.$bounty['prize'].' '.$bounty['currencyType'].'</b></center></td>
                <TD><center><b><a href="?subtopic=characters&name='.$bounty['player_hunted'].'">'.$bounty['player_hunted'].'</a></b></center></td>
                <TD><div style="position: relative; width: 32px; height: 32px;"><div style="background-image: url(\''.$imgPath.'?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'\'); position: absolute; width: 64px; height: 80px; background-position: bottom right; background-repeat: no-repeat; right: 0px; bottom: 0px;"></div></div></td>
                <TD><center><b>'.$killed_by.'</b></center></td>
            </TR>';
        $num++;
    }
} else {
    $main_content.='<TR class="lightRow"><TD colspan=5><center>Currently there are not any bounty hunter offers.</center></td></TR>';
}
$main_content .='</table>';
?>
 
Someone can help me ?
This script working on Znote:
PHP:
<?php require_once 'engine/init.php';
include 'layout/overall/header.php'; ?>

<?php
    $cache = new Cache('engine/cache/bountyhunters');
    if ($cache->hasExpired()) {
        $bounties = mysql_select_multi('SELECT A.* , B.name AS hunted_by, C.name AS player_hunted, D.name AS killed_by
                        FROM bounty_hunter_system AS A
                        LEFT JOIN players AS B ON A.hunter_id = B.id
                        LEFT JOIN players AS C ON A.target_id = C.id
                        LEFT JOIN players AS D ON A.killer_id = D.id
                        ORDER BY A.killed,A.prize DESC');
        $cache->setContent($bounties);
        $cache->save();
    } else {
        $bounties = $cache->load();
    }
?>

<script type="text/javascript">
function show_hide(flip)
{
    var tmp = document.getElementById(flip);
    if(tmp)
        tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
</script>
<a onclick="show_hide('commands'); return false;" style="cursor: pointer;">Click here to show the Instructions</a><br/>
<div id="commands" style="display: none;">
<table border="0" cellspacing="1" cellpadding="4" width="100%">
    <tr bgcolor="#505050"><td class="white"><b>Instructions<b></td></tr>
    <td><center><h2>Commands</h2>
    <b>You can choose gold or premium points !</b><br>
    <small>Example: <b>!hunt PlayerName, gold, 100000<br><br>Example: <b>!hunt PlayerName, points, 10<br><br><br><font color="green">Money is added to your bank account automatically if you get a Bounty Kill.</font></small><br></center></td>
</table>
</div>

    <?php
    if (empty($bounties) || $bounties === false) {
    ?>
    <table border="0" cellspacing="1" cellpadding="4" width="100%">
        <tr bgcolor="#505050">
            <td class="white">
                <b>Bounty Hunters</b>
            </td>
        </tr>
        <tr bgcolor="#D4C0A1">
            <td><center>Currently there are no bounty hunter offer!</center></td>
        </tr>
    </table>
    <?php } else {
    ?>
  
<table border="0" cellspacing="1" cellpadding="4" width="100%">
    <tr bgcolor="#505050">
        <td class="white" width="10%"><center><b>Player Hunted</b></center></td>
        <td class="white" width="10%"><center><b>Reward</b></center></td>
        <td class="white" width="10%"><center><b>Hunted by</b></center></td>
        <td class="white" width="10%"><center><b>Killed by</b></center></td>
    </tr>
    <?php
    foreach ($bounties as $bounty) {
    if ($bounty['killed_by']){
            $killed_by = '<a href="characterprofile.php?name='.$bounty['killed_by'].'">'.$bounty['killed_by'].'</a>';
    } else {
            $killed_by = 'Still Alive';
    }
    $cost = round($bounty['prize'] / 1000, 2);
    ?>
    <tr bgcolor="#F1E0C6">
        <td class="white"><center><a href="characterprofile.php?name=<?php echo $bounty['player_hunted'] ?>"><?php echo $bounty['player_hunted'] ?></a></center></td>
        <td class="white"><center><b><?php echo $cost ?>k</b><br><small><?php echo $bounty['prize'] ?>gp</small></center></td>
        <td class="white"><center><a href="characterprofile.php?name=<?php echo $bounty['hunted_by'] ?>"><?php echo $bounty['hunted_by'] ?></a></center></td>
        <td class="white"><center><?php echo $killed_by ?></center></td>
    </tr> <?php } } ?>
</table>
      
<?php include 'layout/overall/footer.php'; ?>

player on the server can use commands for gold or premium points (!hunt Name, gold, 100 or !hunt Name, points, 100)
The script above displays gold correctly as a reward but displays premium points as gold
2.png
 
Back
Top