Muert39620@legacy41559547 (talk | contribs) No edit summary |
(boilerplate) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{wowapi}} __NOTOC__ |
||
− | <center>'''''GetRestState''''' - ''Documentation by [[User:EDG|EDG]] (original by [[User:Dga|Dga]])''</center> |
||
− | |||
Returns whether the player is in a [[Rest|rested]] (earning double XP for kills) or normal state. |
Returns whether the player is in a [[Rest|rested]] (earning double XP for kills) or normal state. |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | ; id : Number - Rest state index; observed values are '''1''' if the player is "Rested", '''2''' if the player is in a normal state. |
||
− | |||
+ | ; name : String - Name of the current rest state; observed: "Rested" or "Normal". |
||
− | == Parameters == |
||
+ | ; mult : Number - XP multiplier applied to experience gain from killing monsters in the current rest state. |
||
− | === Arguments === |
||
− | |||
− | :None. |
||
− | |||
⚫ | |||
− | ;''Returns'' |
||
− | |||
− | :;id - rest state Id |
||
− | * '''1''' if the player is in a rested state. |
||
− | * '''2''' if the player is in a normal state. |
||
− | Blizzard code indicates that there may be state up to 5. |
||
− | |||
− | :;name - rest state name, localised (i.e. "Normal", "Rested", ...) |
||
− | |||
− | :;mult - rest state XP multiplier. |
||
− | |||
− | ---- |
||
⚫ | |||
− | |||
⚫ | |||
− | |||
− | '''''Result''''' |
||
− | |||
− | ''rested'' is assigned a value of '''1''' if the player is rested, or a value of '''2''' if the player is earning normal XP. |
||
− | |||
⚫ | |||
− | ---- |
||
⚫ | |||
− | {{WoW API}} |
||
+ | if rested == 1 then |
||
+ | print("You're rested. Now's the time to maximize experience gain!"); |
||
+ | elseif rested == 2 then |
||
+ | print("You're not rested. Find an inn and camp for the night?"); |
||
+ | else |
||
+ | print("You've discovered a hitherto unknown rest state. Would you like some coffee?") |
||
+ | end |
Revision as of 23:59, 27 March 2010
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns whether the player is in a rested (earning double XP for kills) or normal state.
id, name, mult = GetRestState()
Returns
- id
- Number - Rest state index; observed values are 1 if the player is "Rested", 2 if the player is in a normal state.
- name
- String - Name of the current rest state; observed: "Rested" or "Normal".
- mult
- Number - XP multiplier applied to experience gain from killing monsters in the current rest state.
Example
rested = GetRestState(); if rested == 1 then print("You're rested. Now's the time to maximize experience gain!"); elseif rested == 2 then print("You're not rested. Find an inn and camp for the night?"); else print("You've discovered a hitherto unknown rest state. Would you like some coffee?") end