Ir para conteúdo

Players Broadcast


Administrador

Posts Recomendados

  • Administrador

Esse sistema foi feito por Mark Samman.


Level mínimo, preço da transmissão, tempo entre as transmissões; e como é exibido no bate-papo, pode ser configurado. O sistema foi modificado por Hokku pra 1.1



data/talkactions/scripts/broadcast22.lua



local config = {
storage = 19400, -- change to an non used storage if u use it
cor = "advance", -- No working on TFS 1.1, edit line 21 param
tempo = 2, -- in minutes
price = 1000, -- price of each bc
level = 100 -- lvl requiered to use bc
}


function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end


if getPlayerLevel(cid) >= config.level then
if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then
if doPlayerRemoveMoney(cid, config.price) then
setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60))
Game.broadcastMessage("[ALL] "..getCreatureName(cid)..": "..param.."", MESSAGE_STATUS_CONSOLE_ORANGE)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You have successfully sent a broadcast, now you'll have to wait " ..config.tempo.. " minute(s) until you broadcast again.")
else
doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.")
return true
end
else
doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.")
return true
end
else
doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.")
end
end

data/talkactions.xml



<talkaction words="/all" separator=" " script="broadcast22.lua"/>

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...