Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

CTF - capture flag

http://www.tibiaking.com/forum/topic/27376-ctf-capture-the-flag-20autom%C3%A1tico/

 

O meu server não tem aquela função de inciar X hora por ser rev 3884, 0.4 qnd eu boto da erro então tentei colocar por globalevents pra começar de tanto em tanto tempo, mas tadando bug:

Event onthink not found <data/globa../scripts/CTFMAX.lua

 

 

 

 

<globalevent name="CTFCheck" interval="5000" event="script" value="CTFMax.lua"/>

 

 

 

 

CTFMax.lua

 

  Citar

--[[
Capture The Flag System
Author: Maxwell Denisson(MaXwEllDeN)
Version: 2.0
Contact: maxwellmda@gmail.com
]]
 
 
local CTF = CTF_LIB
 
local function sendEffect()
if (getGlobalStorageValue(16505) > 0) then
doSendAnimatedText(CTF.tppos, "CTF ON", math.random(180))
addEvent(sendEffect, 750)
end
end
 
function onTimer(interval)
local time = os.date("*t")
 
if (isInArray(CTF.days, time.wday)) then
doBroadcastMessage("[CTF] Está aberto em Konoha para novos participantes, em ".. CTF.timeclose .." minuto(s) não será mais possível entrar!")
setGlobalStorageValue(16705, 1)
 
addEvent(CTF.start, CTF.timeclose * 60 * 1000)
 
local teelz = doCreateItem(1387, 1, CTF.tppos)
doItemSetAttribute(teelz, "aid", 47521)
sendEffect()
end
 
return true
end
 

Resolvido por macalo

Ir para solução
Postado
  • Solução
<globalevent name="CTFCheck" time="20:13" event="script" value="CTFMax.lua"/>
--[[
Capture The Flag System
Author: Maxwell Denisson(MaXwEllDeN)
Version: 2.0
Contact: maxwellmda@gmail.com
]]




local CTF = CTF_LIB


local function sendEffect()
if (getGlobalStorageValue(16505) > 0) then
doSendAnimatedText(CTF.tppos, "CTF ON", math.random(180))
addEvent(sendEffect, 750)
end
end


function onTime(interval)
local time = os.date("*t")


if (isInArray(CTF.days, time.wday)) then
doBroadcastMessage("[CTF] Está aberto em Konoha para novos participantes, em ".. CTF.timeclose .." minuto(s) não será mais possível entrar!")
setGlobalStorageValue(16705, 1)


addEvent(CTF.start, CTF.timeclose * 60 * 1000)


local teelz = doCreateItem(1387, 1, CTF.tppos)
doItemSetAttribute(teelz, "aid", 47521)
sendEffect()
end


return true
end

testa esse ai

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo