Difference between revisions of "Refresh status"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(q answered. Added code)
imported>Bale
m
Line 5: Line 5:
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Adventuring|
 
  
 
function1={{Function|
 
function1={{Function|
Line 38: Line 37:
 
cli_equiv=The CLI command "refresh" with the parameter "status" has the same function.|
 
cli_equiv=The CLI command "refresh" with the parameter "status" has the same function.|
 
}}
 
}}
 +
 +
[[Category:Adventuring]]

Revision as of 22:19, 21 May 2010

Function Syntax

void refresh_status()

Refreshes your character's status from the caracter pane. This does not effect the relay browser, only mafia's internal information.

Code Samples

Refresh status needs to be used to see if you've gained a new effect.

print("purchasing Ode to Booze from a few buffbots...", "blue");
cli_execute("csend 1 meat to Testudinata");
cli_execute("csend 23 meat to Iocainebot");
int iterations = 0;
while(have_effect($effect[Ode to Booze]) < 1 && iterations < 30) {
   wait(30);
   refresh_status();
   iterations = iterations + 1;
}
if((have_effect($effect[Ode to Booze]) < 1)
   print("failed to get Ode to Booze", "red");

CLI Equivalent

The CLI command "refresh" with the parameter "status" has the same function.