Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement
NoPlayTime();

Arguments
none

Returns
Returns true if you have played more than 5 hours and is in a tired state. This is a global account function that affects all characters. Otherwise it returns nil, if you are either only half affected of the tired state or not affected of it at all. This function is only working in continents like Asia where you have the rested system enabled, US and EU are not under such limitations.

Example

Based on the official function, changed a bit to output the text in the chat rather than the tooltip on your avatar:

if ( PartialPlayTime() ) then
   DEFAULT_CHAT_FRAME:AddMessage(format(PLAYTIME_TIRED, REQUIRED_REST_HOURS - floor(GetBillingTimeRested()/60)));
elseif ( NoPlayTime() ) then
   DEFAULT_CHAT_FRAME:AddMessage(format(PLAYTIME_UNHEALTHY, REQUIRED_REST_HOURS - floor(GetBillingTimeRested()/60)));
else
   DEFAULT_CHAT_FRAME:AddMessage("You are not limited by PartialPlayTime nor NoPlayTime.");
end
Related

Take a look on the PartialPlayTime() API and the GetBillingTimeRested() API.

Advertisement