Ir para conteúdo

[Gesior Acc] Vendedo Vip Pelo Pacc


Posts Recomendados

  • 2 weeks later...
  • Respostas 38
  • Created
  • Última resposta

Top Posters In This Topic

Pra quem usa Gesior ACC!

Boa galera, vejo que tem uma grande quantidade de pessoas que necessitam desse sistema para seu OTserv.

Depois varias tentativas, pesquisas, conseguir concluir os coder necessarios com ajuda de um amigo de outro fórum o Samme.

 

Vamos lá... Como não o tem o que explicar e nem precisa, apenas faça isso:

 

Vai até htdocs/shopsystem.php, procura por:

 

if($buy_offer['type'] == 'pacc')

 

Selecione todos esse coder a seguir:

 

 

                                        if($buy_offer['type'] == 'pacc') {
                                           $player_premdays = $buy_player_account->getCustomField('premdays');
                                           $player_lastlogin = $buy_player_account->getCustomField('lastday');
                                           $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).',  '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
                                           $SQL->query($save_transaction);
                                           $buy_player_account->setCustomField('premdays', $player_premdays+$buy_offer['days']);
                                           $account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
                                           $user_premium_points = $user_premium_points - $buy_offer['points'];
                                           if($player_premdays == 0) {
                                               $buy_player_account->setCustomField('lastday', time());
                                           }
                                           $main_content .= '<center><h2>Premium ACcount added!</h2><b>'.$buy_offer['days'].' days</b> of Premium Account added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
                                           }

 

E substiuir por:

 

Vipsystem by Mock

                                        if($buy_offer['type'] == 'pacc') {
                                           $player_vip_time = $buy_player_account->getCustomField('vip_time');
                                           $player_lastlogin = $buy_player_account->getCustomField('lastday');
                                           $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).',  '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
                                           $SQL->query($save_transaction);
                                           if($player_vip_time > 0)
                                               $buy_player_account->setCustomField('vip_time', $player_vip_time + $buy_offer['days'] * 86400);
                                           else
                                               $buy_player_account->setCustomField('vip_time', time() + $buy_offer['days'] * 86400);
                                           $buy_player_account->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
                                           $user_premium_points = $user_premium_points - $buy_offer['points'];
                                           if ($player_vip_days >= 1) {
                                           }
                                           $main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
                                           }

 

Vip system by Kydrai.

                                        if($buy_offer['type'] == 'pacc') {
                                           $player_viptime = $buy_player_account->getCustomField('viptime');
                                           $player_lastlogin = $buy_player_account->getCustomField('lastday');
                                           $save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).',  '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
                                           $SQL->query($save_transaction);
                                           if($player_viptime > 0)
                                               $buy_player_account->setCustomField('viptime', $player_viptime + $buy_offer['days'] * 86400);
                                           else
                                               $buy_player_account->setCustomField('viptime', time() + $buy_offer['days'] * 86400);
                                           $buy_player_account->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
                                           $user_premium_points = $user_premium_points - $buy_offer['points'];
                                           if ($player_vip_days >= 1) {
                                           }
                                           $main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' days</b> of VIP days added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
                                           }

 

Bom, esse sistema funciona perfeitamente.

 

E lembre-se na sua database tem que ter vip_time na tabela account.

 

Espero acabar com o pesadelo de varias pessoas ;DD

 

 

cara baixei seu gesio acc modificado e acho que le ja veio configurado pq la ja estava substituido, e tbm a database ja executei o comando mais como saber se esto vip ou nao, n aparesse nenhuma msg quando eu logo. so queria saber isso, e to achando que o seu gesio ja vem modificado por que ja tinha la a substituiçao se nao, esta modificado avisa por favor.

Link para o comentário
Compartilhar em outros sites

  • 1 month later...
  • 3 months later...
  • 2 weeks later...

#Lamark

Já viu websites de OTServ, que vende pontos para comprar itens, premiums?

Este código vende o Premium sem precisar dos pontos, vende automaticamente sem precisar de pontos.

 

Foi o que eu entendi!

Link para o comentário
Compartilhar em outros sites

  • 3 months later...

×
×
  • Criar Novo...