Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] I've seen your code for the buffs and find it interesting, but is there a way to add a timer to reus

[DiscordArchive] I've seen your code for the buffs and find it interesting, but is there a way to add a timer to reus

[DiscordArchive] I've seen your code for the buffs and find it interesting, but is there a way to add a timer to reus

rektbyfaith
Administrator
0
09-11-2023, 03:53 PM
#1
Archived author: Rintaro Tsumugi • Posted: 2023-09-11T15:53:15.569000+00:00
Original source

I've seen your code for the buffs and find it interesting, but is there a way to add a timer to reuse the command every 5 hours?
rektbyfaith
09-11-2023, 03:53 PM #1

Archived author: Rintaro Tsumugi • Posted: 2023-09-11T15:53:15.569000+00:00
Original source

I've seen your code for the buffs and find it interesting, but is there a way to add a timer to reuse the command every 5 hours?

rektbyfaith
Administrator
0
09-11-2023, 03:58 PM
#2
Archived author: Roboto • Posted: 2023-09-11T15:58:09.315000+00:00
Original source

<https://www.azerothcore.org/pages/eluna/Global/GetCurrTime.html>
rektbyfaith
09-11-2023, 03:58 PM #2

Archived author: Roboto • Posted: 2023-09-11T15:58:09.315000+00:00
Original source

<https://www.azerothcore.org/pages/eluna/Global/GetCurrTime.html>

rektbyfaith
Administrator
0
09-11-2023, 04:00 PM
#3
Archived author: Roboto • Posted: 2023-09-11T16:00:05.399000+00:00
Original source

Create a table and store the current time after using the command. When a player uses the command, check if the current time minus their last use time is bigger than 5 hours
rektbyfaith
09-11-2023, 04:00 PM #3

Archived author: Roboto • Posted: 2023-09-11T16:00:05.399000+00:00
Original source

Create a table and store the current time after using the command. When a player uses the command, check if the current time minus their last use time is bigger than 5 hours

rektbyfaith
Administrator
0
09-11-2023, 04:08 PM
#4
Archived author: Rintaro Tsumugi • Posted: 2023-09-11T16:08:43.408000+00:00
Original source

function Buffcommand(event, player, cmd, chatHandler)
if cmd:lower() == "buff" then
player:AddAura(48074, player)
player:AddAura(48170, player)
player:AddAura(43223, player)
player:AddAura(36880, player)
player:AddAura(467, player)
player:AddAura(48469, player)
player:AddAura(48162, player)
player:SendBroadcastMessage("Vous avez été buffer, profitez-en !")
currTime = GetCurrTime(300, player)
return false
end
end

local PLAYER_EVENT_ON_COMMAND = 42
RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, Buffcommand) its okey no?
rektbyfaith
09-11-2023, 04:08 PM #4

Archived author: Rintaro Tsumugi • Posted: 2023-09-11T16:08:43.408000+00:00
Original source

function Buffcommand(event, player, cmd, chatHandler)
if cmd:lower() == "buff" then
player:AddAura(48074, player)
player:AddAura(48170, player)
player:AddAura(43223, player)
player:AddAura(36880, player)
player:AddAura(467, player)
player:AddAura(48469, player)
player:AddAura(48162, player)
player:SendBroadcastMessage("Vous avez été buffer, profitez-en !")
currTime = GetCurrTime(300, player)
return false
end
end

local PLAYER_EVENT_ON_COMMAND = 42
RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, Buffcommand) its okey no?

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)