Site em Manutenção!


    [Gesior Acc] Vendedo Vip Pelo Pacc

    Compartilhe
    avatar
    Administrador
    Admin
    Admin

    Mensagens : 381
    ZXG Coins : 2892
    Data de inscrição : 11/02/2012
    Idade : 19
    Localização : Bom Jesus do Itabapoana

    [Gesior Acc] Vendedo Vip Pelo Pacc

    Mensagem por Administrador em Seg Fev 13, 2012 1:51 pm

    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 .= '

    Premium ACcount added!

    '.$buy_offer['days'].' days of Premium Account added to the account of player '.$buy_player->getName().' for '.$buy_offer['points'].' premium points from your account.
    Now you have '.$user_premium_points.' premium points.

    [Você precisa estar registrado e conectado para ver este link.]
    ';
    }

    E substiuir por:

    Vipsystem by Mock and Lukeskywalker
    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 .= '

    VIP Days added!

    '.$buy_offer['days'].' days of VIP days added to the account of player '.$buy_player->getName().' for '.$buy_offer['points'].' premium points from your account.
    Now you have '.$user_premium_points.' premium points.

    [Você precisa estar registrado e conectado para ver este link.]
    ';
    }

    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 .= '

    VIP Days added!

    '.$buy_offer['days'].' days of VIP days added to the account of player '.$buy_player->getName().' for '.$buy_offer['points'].' premium points from your account.
    Now you have '.$user_premium_points.' premium points.

    [Você precisa estar registrado e conectado para ver este link.]
    ';
    }

    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

      Data/hora atual: Qui Nov 22, 2018 5:19 am