Postado Julho 26, 2014 10 anos Estava procurando um script desse aqui no forum achei, porem nao funciona no meu servidor (8.0) http://www.tibiaking.com/forum/topic/34763-pedido-sistema-de-broadcast-para-players-pago/ Gostaria da mesma funçao ID do dinheiro 2160 preço 20k por uso, com intervalo de 5minutos. Valeu function onLove() if getPlayerTrueLove(girlfriend) then doPlayerBeHappy(cid, true) doRemoveVirginity(cid, true) else doSendCancel(cid,"you do not know how good it feels to be loved") end end
Postado Julho 29, 2014 10 anos Autor Por gentileza function onLove() if getPlayerTrueLove(girlfriend) then doPlayerBeHappy(cid, true) doRemoveVirginity(cid, true) else doSendCancel(cid,"you do not know how good it feels to be loved") end end
Postado Julho 29, 2014 10 anos Solução local config = { storage = 19400, -- storage em que será salvo o tempo cor = "green", -- de acordo com o constant.lua da lib tempo = 1, -- em minutos price = 100000, -- preço pra usar o broadcast level = 500 -- level pra poder utilizar o broadcast } 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)) doBroadcastMessage("[/all] "..getCreatureName(cid)..": "..param.."", config.cor) 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
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.