A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] TradeVIP
2
509
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Campones
Registrado: 07/05/15
Posts: 13
Reputação: 0
Gênero: Masculino
Estou usando um script de tradevip.
Ele funciona normalmente, porém está com um bug que depois de ser usado várias vezes ele não transfere a VIP, o trade funciona, mas quando os dois jogadores aceitam o VIP nao vai para a conta.
Poderiam ajudar a solucionar esse erro? REP+
talkaction:
local config = { itemid = 5957, storage1 = 224413} function onSay(cid, words, param, param2, channel) if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") local creature = getCreatureByName(t[1]) if not creature and isPlayer(creature) and not isPlayerGhost(creature) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end if os.time() > getPlayerStorageValue(cid, config.storage1) then local days = tonumber(t[2]) if days < 2 then doPlayerSendCancel(cid, "O mínimo que você pode transferir é de 2 dias.") return true end if days and type(days) == 'number' and getPlayerPremiumDays(cid) - 2 >= days then doStartTrade(cid, creature, doPlayerAddItem(cid, config.itemid, 1)) doPlayerSendTextMessage(creature, MESSAGE_INFO_DESCR, "O Jogador " .. getPlayerName(cid) .. " deu trade em você, e está disposto a trocar " .. days .. " dia(s) de VIP.") setPlayerStorageValue(cid, config.storage1, days) else doPlayerSendCancel(cid, "Você não pode transferir essa quantidade de VIP.") end end return trueendcreaturescript:
function onTradeAccept(cid, target, item)local storage1 = 224413if getPlayerStorageValue(cid, storage1) > 0 then local sto = getPlayerStorageValue(cid, storage2) doPlayerRemovePremiumDays(cid, sto) doPlayerAddPremiumDays(target, sto) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você trocou "..sto.." dia(s) de premium, Parabéns.") doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "Você realizou uma troca e adquiriu "..sto.." dia(s) de premium, Parabéns.") setPlayerStorageValue(cid, storage1, 0)endreturn trueend