amarelax 0 Posted November 21, 2020 Report Share Posted November 21, 2020 (edited) 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. Edited November 21, 2020 by amarelax Link to comment https://xtibia.com/forum/topic/252569-scripts-04-para-tfs-13/ Share on other sites More sharing options...
0 Lordfire 309 Posted December 7, 2020 Report Share Posted December 7, 2020 Experimenta deixar assim mesmo no TFS 1.3, tem uma camada de compatibilidade que os teus scripts deveriam funcionar normalmente. amarelax and Frenvius 2 Link to comment https://xtibia.com/forum/topic/252569-scripts-04-para-tfs-13/#findComment-1763764 Share on other sites More sharing options...
Question
amarelax 0
Talkactions
Creaturescripts
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.
Edited by amarelaxLink to comment
https://xtibia.com/forum/topic/252569-scripts-04-para-tfs-13/Share on other sites
1 answer to this question
Recommended Posts