Postado Setembro 21, 2012 12 anos Autor Olá galera o que eu estou pedindo eu ja vi em vários ot's, pesquisei muito no google, forums, etc e não achei. O Sistema Vip que eu preciso eu creio que é muito simples, eu ja consegui adidionar ele para comprar no shop e está alterando a tabela vip_time, mas eu preciso de mais duas coisas nesse sistema: O que eu preciso é o seguinte: O player vai no shop, escolhe a quantidade de dias e quando ele confirmar será adicionado no seu nome a tag [VIP] e irá alterar a tabela do player "promotion" para 1. Eu tenho um sistema desse por talkaction que é o seguinte: function onSay(cid, words, param, channel) local name = getCreatureName(cid) sorcerer = { pcoin = 19000, level = 1, text = "Parabens", } druid = { pcoin = 19000, level = 1, text = "Parabens", } paladin = { pcoin = 19000, level = 1, text = "Parabens", } knight = { pcion = 19000, level = 1, text = "Parabens", } if getPlayerVocation(cid) == 1 then voc = sorcerer elseif getPlayerVocation(cid) == 2 then voc = druid elseif getPlayerVocation(cid) == 3 then voc = paladin elseif getPlayerVocation(cid) == 4 then voc = knight else voc = nil end if voc ~= nil then if getPlayerLevel(cid) >= voc.level then if doPlayerRemoveItem(cid,6527,1) == TRUE then setPlayerPromotionLevel(cid, 1) db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") doSendMagicEffect(getCreaturePosition(cid),14) doSendAnimatedText(getCreaturePosition(cid),voc.text,49) setPlayerStorageValue(cid,1082,1) else doPlayerSendTextMessage(cid,18,"Voce precisa de Vip Coins para ser Vip.") end else doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.") end else doPlayerSendTextMessage(cid,18,"Voce ja e Vip.") end return TRUE end Nele o player digita !buyvip e depois disso ele recebe promotion e o [Vip] no nome. Esse sistema é bom, mas pena que é só eterno. Aguardo a ajuda de vocês, muito obrigado! -------------------------------------------------- Edit: Meu system vip do site é o seguinte: 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) { } Editado Setembro 21, 2012 12 anos por Winicius (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.