kushovu
NXA
- Joined
- Jan 27, 2009
- Messages
- 75
- Reaction score
- 13
After some days trying to make this work i found this post:
[Znote AAC] Shop Category
And there i got the necesary for start working on this Pack so lets start:
First you need to open your "config.php" file and find this:
Code:
// If useDB is false, this array list will be used for shop offers.
$config['shop_offers'] = array(
// offer 1
1 => array(
'type' => 1, // 1 = item id offers, 2 = premium days [itemid ignored], 3 = sex change[itemid & count ignored], 4+ = custom.
'itemid' => 2160, // item to get in-game
'count' => 5, //if type is 2, this represents premium days
'description' => "Crystal coin.", // Description shown on website
'points' => 100, // How many points this offer costs
),
// offer 2
2 => array(
'type' => 1,
'itemid' => 2392,
'count' => 1,
'description' => "Fire sword.",
'points' => 10,
),
// offer 3
3 => array(
'type' => 2,
'itemid' => 12466, // Item to display on page
'count' => 7,
'description' => "Premium membership.",
'points' => 25,
),
// offer 4
4 => array(
'type' => 3,
'itemid' => 12666,
'count' => 3,
'description' => "Change character gender.",
'points' => 10,
),
5 => array(
'type' => 3,
'itemid' => 12666,
'count' => 0,
'description' => "Change character gender.",
'points' => 20,
),
5 => array(
'type' => 4,
'itemid' => 12666,
'count' => 1,
'description' => "Change character name.",
'points' => 20,
),
);
?>
And replace it with a simple include:
Code:
// If useDB is false, this array list will be used for shop offers.
include 'shopitems.php';
?>
Now we need to make some changes at "Shop.php" for making it the principal page for category selection
You should find this table:
Code:
<table>
<tr class="yellow">
<td>Description:</td>
<?php if ($config['shop']['showImage']) { ?><td>Image:</td><?php } ?>
<td>Count/duration:</td>
<td>Points:</td>
<td>Action:</td>
</tr>
<?php
foreach ($shop_list as $key => $offers) {
echo '<tr class="special">';
echo '<td>'. $offers['description'] .'</td>';
if ($config['shop']['showImage']) echo '<td><img src="http://'. $config['shop']['imageServer'] .'/'. $offers['itemid'] .'.'. $config['shop']['imageType'] .'" alt="img"></td>';
if ($offers['type'] == 2) echo '<td>'. $offers['count'] .' Days</td>';
else if ($offers['type'] == 3 && $offers['count'] == 0) echo '<td>Unlimited</td>';
else echo '<td>'. $offers['count'] .'x</td>';
echo '<td>'. $offers['points'] .'</td>';
echo '<td>';
?>
<form action="" method="POST">
<input type="hidden" name="buy" value="<?php echo (int)$key; ?>">
<input type="submit" value=" PURCHASE " class="needconfirmation" data-item-name="<?php echo $offers['description']; ?>" data-item-cost="<?php echo $offers['points']; ?>">
</form>
<?php
echo '</td>';
echo '</tr>';
}
?>
</table>
And replace all with this include:
Code:
<table>
<?php include 'layout/overall/menu.php'; ?>
</table>
Now for the Style you should go to "/layout/overall/head.php"
and add this line after the Style.css line:
Code:
<link rel="stylesheet" type="text/css" href="layout/css/menu.css" />
And finnally import this files:
WWW.rar
I want to specially thank to @Znote For all hard work and for this awsome Web Script!
Also thanks to @zibos because he do the basics for making categories
and last but not less important thanks to @Saldivar Because He helped me a lot with the research and the items id and description
Any suggestion are acepted!
Have a nice day!
Attachments
-
WWW.rar39.3 KB · Views: 111 · VirusTotal
Last edited by a moderator: