Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] <@1211541485963575399> I wanted it for a month or 2 months or 6 months or 1 year, you know?

[DiscordArchive] <@1211541485963575399> I wanted it for a month or 2 months or 6 months or 1 year, you know?

[DiscordArchive] <@1211541485963575399> I wanted it for a month or 2 months or 6 months or 1 year, you know?

rektbyfaith
Administrator
0
05-30-2025, 04:55 PM
#1
Archived author: Underwalker • Posted: 2025-05-30T16:55:53.910000+00:00
Original source

<@1211541485963575399> I wanted it for a month or 2 months or 6 months or 1 year, you know?
rektbyfaith
05-30-2025, 04:55 PM #1

Archived author: Underwalker • Posted: 2025-05-30T16:55:53.910000+00:00
Original source

<@1211541485963575399> I wanted it for a month or 2 months or 6 months or 1 year, you know?

rektbyfaith
Administrator
0
05-30-2025, 05:00 PM
#2
Archived author: Underwalker • Posted: 2025-05-30T17:00:58.351000+00:00
Original source

I didn't find the game time in the database, is there?
rektbyfaith
05-30-2025, 05:00 PM #2

Archived author: Underwalker • Posted: 2025-05-30T17:00:58.351000+00:00
Original source

I didn't find the game time in the database, is there?

rektbyfaith
Administrator
0
05-30-2025, 05:05 PM
#3
Archived author: Ryan Turner • Posted: 2025-05-30T17:05:02.456000+00:00
Original source

I've answered this to you before. `totaltime` in `characters` is the table that contains in second how much time each player has played
rektbyfaith
05-30-2025, 05:05 PM #3

Archived author: Ryan Turner • Posted: 2025-05-30T17:05:02.456000+00:00
Original source

I've answered this to you before. `totaltime` in `characters` is the table that contains in second how much time each player has played

rektbyfaith
Administrator
0
05-30-2025, 05:07 PM
#4
Archived author: Underwalker • Posted: 2025-05-30T17:07:49.993000+00:00
Original source

<@151411715769106432>
rektbyfaith
05-30-2025, 05:07 PM #4

Archived author: Underwalker • Posted: 2025-05-30T17:07:49.993000+00:00
Original source

<@151411715769106432>

rektbyfaith
Administrator
0
05-30-2025, 05:07 PM
#5
Archived author: Underwalker • Posted: 2025-05-30T17:07:52.220000+00:00
Original source

I want the time to end in 30 days, understand, not wasted time!
rektbyfaith
05-30-2025, 05:07 PM #5

Archived author: Underwalker • Posted: 2025-05-30T17:07:52.220000+00:00
Original source

I want the time to end in 30 days, understand, not wasted time!

rektbyfaith
Administrator
0
05-30-2025, 05:08 PM
#6
Archived author: Underwalker • Posted: 2025-05-30T17:08:10.840000+00:00
Original source

totolatime no
rektbyfaith
05-30-2025, 05:08 PM #6

Archived author: Underwalker • Posted: 2025-05-30T17:08:10.840000+00:00
Original source

totolatime no

rektbyfaith
Administrator
0
05-30-2025, 06:06 PM
#7
Archived author: Yuppls • Posted: 2025-05-30T18:06:42.198000+00:00
Original source

<@231918788977623051> Assuming you're doing this to sell some form of membership, understand you're not allowed to use azerothcore for that.
rektbyfaith
05-30-2025, 06:06 PM #7

Archived author: Yuppls • Posted: 2025-05-30T18:06:42.198000+00:00
Original source

<@231918788977623051> Assuming you're doing this to sell some form of membership, understand you're not allowed to use azerothcore for that.

rektbyfaith
Administrator
0
05-30-2025, 06:23 PM
#8
Archived author: Underwalker • Posted: 2025-05-30T18:23:45.304000+00:00
Original source

<@1211541485963575399> ok
rektbyfaith
05-30-2025, 06:23 PM #8

Archived author: Underwalker • Posted: 2025-05-30T18:23:45.304000+00:00
Original source

<@1211541485963575399> ok

rektbyfaith
Administrator
0
05-30-2025, 07:10 PM
#9
Archived author: iThorgrim • Posted: 2025-05-30T19:10:05.701000+00:00
Original source

More "simple" without DB query
```lua
-- CONFIGURATION
local MAX_ACCOUNT_PLAYTIME_SECONDS = 600 -- 10 minutes
local LOGOUT_DELAY_MS = 5000 -- 5 second delay for safe logout

local function SafeLogout(event, delay, repeats, player)
player:LogoutPlayer(true)
end

local function VerifyTotalPlayedTime(event, delay, repeats, player)
player:SendBroadcastMessage("You have exceeded the maximum playtime of " .. MAX_ACCOUNT_PLAYTIME_SECONDS .. " seconds. You will be logged out.")
player:RegisterEvent(SafeLogout, LOGOUT_DELAY_MS, 1)
end

local function OnPlayerLogin(event, player)
if (player:GetTotalPlayedTime() >= MAX_ACCOUNT_PLAYTIME_SECONDS) then
VerifyTotalPlayedTime(event, 0, 0, player)
return
end

local register_event = player:RegisterEvent(VerifyTotalPlayedTime, MAX_ACCOUNT_PLAYTIME_SECONDS * 1000, 1)
player:SetData("VerifyTotalPlayedTimeEvent", register_event)
end
RegisterPlayerEvent(3, OnPlayerLogin)

local function OnPlayerLogout(event, player)
local register_event = player:GetData("VerifyTotalPlayedTimeEvent")
if register_event then
player:RemoveEventById(register_event)
player:RemoveData("VerifyTotalPlayedTimeEvent")
end
end
RegisterPlayerEvent(4, OnPlayerLogout)
```
rektbyfaith
05-30-2025, 07:10 PM #9

Archived author: iThorgrim • Posted: 2025-05-30T19:10:05.701000+00:00
Original source

More "simple" without DB query
```lua
-- CONFIGURATION
local MAX_ACCOUNT_PLAYTIME_SECONDS = 600 -- 10 minutes
local LOGOUT_DELAY_MS = 5000 -- 5 second delay for safe logout

local function SafeLogout(event, delay, repeats, player)
player:LogoutPlayer(true)
end

local function VerifyTotalPlayedTime(event, delay, repeats, player)
player:SendBroadcastMessage("You have exceeded the maximum playtime of " .. MAX_ACCOUNT_PLAYTIME_SECONDS .. " seconds. You will be logged out.")
player:RegisterEvent(SafeLogout, LOGOUT_DELAY_MS, 1)
end

local function OnPlayerLogin(event, player)
if (player:GetTotalPlayedTime() >= MAX_ACCOUNT_PLAYTIME_SECONDS) then
VerifyTotalPlayedTime(event, 0, 0, player)
return
end

local register_event = player:RegisterEvent(VerifyTotalPlayedTime, MAX_ACCOUNT_PLAYTIME_SECONDS * 1000, 1)
player:SetData("VerifyTotalPlayedTimeEvent", register_event)
end
RegisterPlayerEvent(3, OnPlayerLogin)

local function OnPlayerLogout(event, player)
local register_event = player:GetData("VerifyTotalPlayedTimeEvent")
if register_event then
player:RemoveEventById(register_event)
player:RemoveData("VerifyTotalPlayedTimeEvent")
end
end
RegisterPlayerEvent(4, OnPlayerLogout)
```

rektbyfaith
Administrator
0
05-30-2025, 07:14 PM
#10
Archived author: iThorgrim • Posted: 2025-05-30T19:14:20.374000+00:00
Original source

Oh it's accout related !! ( so the version of <@1211541485963575399> it's good )
rektbyfaith
05-30-2025, 07:14 PM #10

Archived author: iThorgrim • Posted: 2025-05-30T19:14:20.374000+00:00
Original source

Oh it's accout related !! ( so the version of <@1211541485963575399> it's good )

Recently Browsing
 
Recently Browsing