MA

[Encerrado] TradeVIP

Por marcos6, 13 de mar. de 2017 em Tópicos Sem Resposta

2
509
marcos6M
13 de março de 2017 às 11:19

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 trueend 

creaturescript:

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 

 

8 meses depois...
StigalS
29 de novembro de 2017 às 15:17
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