[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?
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?
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?
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
Archived author: Underwalker • Posted: 2025-05-30T17:07:49.993000+00:00
Original source
<@151411715769106432>
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!
Archived author: Underwalker • Posted: 2025-05-30T17:08:10.840000+00:00
Original source
totolatime no
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.
Archived author: Underwalker • Posted: 2025-05-30T18:23:45.304000+00:00
Original source
<@1211541485963575399> ok
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)
```
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 )