Talkactions
function onSay(cid, words, param, param2, channel) local t = string.explode(param, ",") local target = getCreatureByName(t[1]) local points = tonumber(t[2]) local item = 2233 local storage = 21223 if(param == '') then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") end if (target ~= nil) and isPlayer(target) and not isPlayerGhost(target) then if (points ~= nil) and (type(points) == 'number') and (points>0) then if getPlayerVipPoints(cid) > points then local addItem = doPlayerAddItem(cid, item, 1) doStartTrade(cid, target, addItem) doItemSetAttribute(addItem, "description", "Transferência de "..points.." premium points.") doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você deu trade no jogador "..getPlayerName(target)..", com a intenção de trocar "..points.." premium points.") doPlayerSendTextMessage(target, MESSAGE_INFO_DESCR, "O Jogador "..getPlayerName(cid).." deu trade em você, e está disposto a trocar "..points.." premium points.") setPlayerStorageValue(cid, storage, points) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem essa quantidade de premium points.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end return true end
Creaturescripts
function onTradeAccept(cid, target, item) local storage = 21223 local sto = getPlayerStorageValue(cid, storage) if sto > 0 then doPlayerRemoveVipPoints(cid, sto) doPlayerAddVipPoints(target, sto) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você trocou "..sto.." premium points, Parabéns.") doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, "Você realizou uma troca e adquiriu "..sto.." premium points, Parabéns.") setPlayerStorageValue(cid, storage, 0) end return true end
Olá queria saber se alguém consegue passar esse scripts para tfs 1.3, eu já passei a função doStartTrade para tfs 1.3 só preciso do scripts agora.