Hello,
I presents my works with nicaw(download)
SMS Shop(item/player) + show EQ + my skin for nicaw acc
Features:
Buy points:
-dotpay
-paygol
Points
-player buy points for account
-admin panel - shop history for all accounts (only for dotpay)
Item Shop
-admin panel add items from shop
-player buy items for points
Player Shop
-in acc panel: add, remove player from shop
-if someone buys yours character, points will be add in your account
-required lvl player to add in shop - config
-if player is in shop have namelock, can to play
Addition:
-show eq, cap, soul, hp and mana in character (soul off for 7.4 - config)
-show points in account
-free pacc for new account (config how many day)
-free premium points for new account (config, how many)
sorry for my bad english
-tested on nicaw for avesta
Install:
-download pack
1.
Premium points show in account
add in account.php
under:
add:
in class/account.php add
before:
add:
===================================================
2.
pacc and free premium points for new acc:
in class/account.php add
in function:
static public function Create($accno, $password, $email, $rlname = '', $location = '')
under:
add:
in config add:
===================================================
3.
Show EQ, HP, MANA in character
add to config:
add folder:
replace/change "character.php"
in class/player.php
this:
change to:
under:
add:
under:
add:
under:
add:
===================================================
4.
Shop system:
-add item to shop - admin
-shop history - admin
-buy points
-buy items
-sell players
-buy players
add filder( if u not add in "Show EQ, HP, MANA=Ł
"items"
SQL:
add to config:
add in your acc folder:
in admin.php add:
under:
add:
in account.php add:
under:
add:
before:
add:
add to navigation.xml:
if u dont work paygol use this tutorial:
http://otland.net/f502/gesior-acc-paygol-gotowy-sms-shop-system-dla-polakow-i-zagranicy-krok-po-kroku-170150/
news:
account:
add character to shop:
character added to shop:
add character to shop, when a character is in shopt:
remove character from shop:
account, when a character is in shopt:
character lookup:
shop admin, add item:
admin panel, buy points history:
item shop:
player shop:
comment please
I presents my works with nicaw(download)
SMS Shop(item/player) + show EQ + my skin for nicaw acc
Features:
Buy points:
-dotpay
-paygol
Points
-player buy points for account
-admin panel - shop history for all accounts (only for dotpay)
Item Shop
-admin panel add items from shop
-player buy items for points
Player Shop
-in acc panel: add, remove player from shop
-if someone buys yours character, points will be add in your account
-required lvl player to add in shop - config
-if player is in shop have namelock, can to play
Addition:
-show eq, cap, soul, hp and mana in character (soul off for 7.4 - config)
-show points in account
-free pacc for new account (config how many day)
-free premium points for new account (config, how many)
sorry for my bad english
-tested on nicaw for avesta
Install:
-download pack
1.
Premium points show in account
add in account.php
under:
PHP:
<?php
if(isset($account->attrs['premend']) && $account->attrs['premend'] > time()) {
echo '<b>Premium status:</b> You have ';
$days = ceil(($account->attrs['premend'] - time())/(3600*24));
if($days <= 5) echo '<b style="color: red">';
else echo '<b>';
echo $days.'</b> day(s) left';
}
?>
add:
PHP:
</br>
<?php
//points system dodany do strony gracza, dodana funkcja "$this->attrs['points'] = (int) $acc['points'];" w class/account.php punkty odczytywane z accounts, nie z players
if ($account->attrs['points']) {
echo '<b>Shop points status:</b> You have ';
$points = ceil(($account->attrs['points']));
if($points <= 5) echo '<b style="color: red">';
else echo '<b>';
echo $points.'</b> point(s)';
}
?>
in class/account.php add
before:
PHP:
$this->attrs['accno'] = (int) $acc['id'];
add:
PHP:
$this->attrs['points'] = (int) $acc['points'];
===================================================
2.
pacc and free premium points for new acc:
in class/account.php add
in function:
static public function Create($accno, $password, $email, $rlname = '', $location = '')
under:
PHP:
unset($d);
$d['id'] = $accno;
$d['password'] = Account::encodePassword($password);
add:
PHP:
//pacc for new account configure
{global $cfg;
$pacday = ($cfg['pac_day']);
$pa = ceil((time()) + (86400 * $pacday));
$d['premend'] = $pa;
}
//premium points for new account configure
{global $cfg;
$pr_points = ($cfg['pr_points']);
$d['points'] = $pr_points;
}
in config add:
PHP:
#Pacc for new acc:
$cfg['pac_day'] = 46;
#Free premium points for new acc
$cfg['pr_points'] = 50;
===================================================
3.
Show EQ, HP, MANA in character
add to config:
PHP:
//specx edited
# Whether to SHOW EQ in character search eq, hp, mana, exp /made by specx
$cfg['show_items'] = true;
# Show soul points. Use it for ot > 7.4
$cfg['show_soul'] = false;
add folder:
PHP:
"items"
replace/change "character.php"
in class/player.php
this:
PHP:
class Player {
private $attrs, $skills, $storage, $deaths, $guild, $is_online, $sql;
change to:
PHP:
class Player {
private $attrs, $skills, $storage, $deaths, $guild, $is_online, $sql, $items;
under:
PHP:
private function load_skills() {
if(empty($this->attrs['id'])) throw new PlayerNotLoadedException();
$this->sql->myQuery('SELECT * FROM `player_skills` WHERE `player_id` = '.$this->sql->quote($this->attrs['id']));
while($a = $this->sql->fetch_array()) {
$this->skills[$a['skillid']]['skill'] = (int)$a['value'];
$this->skills[$a['skillid']]['tries'] = (int)$a['count'];
}
return true;
}
add:
PHP:
/// SHOW EQ
private function load_items() {
if(empty($this->attrs['id'])) throw new PlayerNotLoadedException();
$this->sql->myQuery ("SELECT * FROM `player_items` WHERE (`player_id` = '".$this->sql->quote($this->attrs['id'])."') ORDER BY FIELD(`pid`, 2, 1, 3, 6, 4, 5, 9, 7, 10, 8) ASC");
//$this->sql->myQuery('SELECT * FROM `player_items` WHERE `pid` <=10 AND `player_id` = '.$this->sql->quote($this->attrs['id']).') ORDER BY FIELD(`pid`, 2, 1, 3, 6, 4, 5, 9, 7, 10, 8) ASC';
//$this->sql->myQuery('SELECT * FROM `player_items` WHERE `pid` = 2 AND `player_id` = '.$this->sql->quote($this->attrs['id']));
while($a = $this->sql->fetch_array())
{
//org $this->items[$a['pid']]['item'] = (int)$a['itemtype'];
$this->items[$a['pid']]['item'] = (int)$a['itemtype'];
}
return true;
}
///
under:
PHP:
$this->attrs['guildnick'] = (string) $player['guildnick'];
add:
PHP:
///SHOW EQ
$this->attrs['cap'] = (int) $player['cap'];
$this->attrs['soul'] = (int) $player['soul'];
$this->attrs['health'] = (int) $player['health'];
$this->attrs['healthmax'] = (int) $player['healthmax'];
$this->attrs['mana'] = (int) $player['mana'];
$this->attrs['manamax'] = (int) $player['manamax'];
$this->attrs['experience'] = (int) $player['experience'];
///
under:
PHP:
}elseif($attr == 'skills') {
if(empty($this->skills)) $this->load_skills();
return $this->skills;
add:
PHP:
///SHOW EQ
}elseif($attr == 'items') {
if(empty($this->items)) $this->load_items();
return $this->items;
///
===================================================
4.
Shop system:
-add item to shop - admin
-shop history - admin
-buy points
-buy items
-sell players
-buy players
add filder( if u not add in "Show EQ, HP, MANA=Ł
"items"
SQL:
PHP:
ALTER TABLE `accounts` ADD `points` int(11) NOT NULL;
ALTER TABLE `accounts` ADD `points_history` int(11) NOT NULL;
ALTER TABLE `players` ADD `shop` int(11) NOT NULL;
ALTER TABLE `players` ADD `price` int(11) NOT NULL;
CREATE TABLE IF NOT EXISTS `shop` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`info` text NOT NULL,
`price` int(11) NOT NULL,
`image` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
add to config:
PHP:
#Whether to Sell Player panel in account
$cfg['show_sell_player_panel'] = true;
# Level at which player can be sold in shop
$cfg['player_lvl_sell'] = 5;
add in your acc folder:
PHP:
shop_history.php
shopadd.php
add_points.php
add_sms_points.php
add_sms_points_paygol.php
paygol.php
add_player.php
remove_player.php
shop_player2.php
buy_player.php
shop.php
buy.php
in admin.php add:
under:
PHP:
<li onclick="self.window.location.href='tools/php_info.php'" style=" background-image: url(resource/information.png);">PHP Info</li>
add:
PHP:
</br>
<li onclick="self.window.location.href='shop_history.php'" style=" background-image: url(resource/book_open.png);">Shop History</li>
<li onclick="self.window.location.href='shopadd.php'" style=" background-image: url(resource/add.png);">Add item to shop</li>
in account.php add:
under:
PHP:
<li onclick="ajax('ajax','modules/character_create.php','',true)" style="background-image: url(resource/user_add.png);">Create Character</li>
add:
PHP:
<li onclick="self.window.location.href='add_player.php'" style=" background-image: url(resource/add.png);">Add Character to shop</li>
<li onclick="self.window.location.href='remove_player.php'" style=" background-image: url(resource/cross.png);">Remove Character from shop</li>
before:
PHP:
?>
<div id="ajax"></div>
</div>
<div class="bot"></div>
</div>
<?php
include ("footer.inc.php");
?>
add:
PHP:
///SHOW CHARACTER IN SHOP
$acc = $account->attrs['accno'];
echo '<h3>Characters in Shop</h3>'."\n";
$wynik44 = mysql_query("SELECT id, name, level, vocation, price FROM players WHERE shop = 1 AND account_id = $acc")
or die('query error');
if(mysql_num_rows($wynik44) > 0) {
echo "<table class=color2 bordercolor=#FFFFFF width=100% cellpadding=4 cellspacing=0 border=1>";
echo "<th class=color0>Name:</th> <th class=color0>Level:</th> <th class=color0>Vocation:</th> <th class=color0>Points:</th></th>";
echo "<tr>";
while($r = mysql_fetch_assoc($wynik44))
{
$id_player = $r['id'];
echo ' <td><center><a href="characters.php?player_name='.($r['name']).'">'.$r['name'].'</a></center></td>';
echo "<td><center> ".$r['level']."</center></td>";
if ($r['vocation'] == 1)
{
echo "<td><center> Sorcerer</center></td>";
}
elseif ($r['vocation'] == 2)
{
echo "<td><center> Druid</center></td>";
}
elseif ($r['vocation'] == 3)
{
echo "<td><center> Paladin</center></td>";
}
elseif ($r['vocation'] == 4)
{
echo "<td><center> Knight</center></td>";
}
elseif ($r['vocation'] == 5)
{
echo "<td><center> Master Sorcerer</center></td>";
}
elseif ($r['vocation'] == 6)
{
echo "<td><center> Elder Druid</center></td>";
}
elseif ($r['vocation'] == 7)
{
echo "<td><center> Royal Paladin</center></td>";
}
elseif ($r['vocation'] == 8)
{
echo "<td><center> Elite Knight</center></td>";
}
echo "<td><center>".$r['price']."</center></td>";
echo "</tr>";
}
echo "</table>";
}
else
{
echo '<img src="resource/user_red.png"/>';
echo " You don't have player in shop";
}
//end character in shop
add to navigation.xml:
PHP:
<category name="SHOP">
<item href="shop.php">Buy item</item>
<item href="shop_player2.php">Buy Player</item>
<item href="add_points.php">Add points</item>
</category>
if u dont work paygol use this tutorial:
http://otland.net/f502/gesior-acc-paygol-gotowy-sms-shop-system-dla-polakow-i-zagranicy-krok-po-kroku-170150/
news:
account:
add character to shop:
character added to shop:
add character to shop, when a character is in shopt:
remove character from shop:
account, when a character is in shopt:
character lookup:
shop admin, add item:
admin panel, buy points history:
item shop:
player shop:
comment please
Attachments
-
SMS Shop(itemplayer) + show EQ + my skin for nicaw acc v3.rar2.7 MB · Views: 298 · VirusTotal