Refresh status: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle Created page with '{{ #vardefine:name|refresh_status}}{{ #vardefine:return_type|void}}{{ FunctionPage| name={{#var:name}}| function_category=Adventuring| function1={{Function| name={{#var:name}}|…' |
imported>Malurth m Grammar. |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 14: | Line 13: | ||
}}| | }}| | ||
function_description=Refreshes your character's status | function_description=Refreshes your character's status from the character pane. This does not affect the relay browser, only mafia's internal information.| | ||
code1={{CodeSample| | |||
title=Code Samples| | |||
description=Refresh status needs to be used to see if you've gained a new effect.| | |||
code= | |||
<syntaxhighlight> | |||
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"); | |||
</syntaxhighlight> | |||
}}| | |||
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]] |
Latest revision as of 18:22, 31 December 2010
Function Syntax
void refresh_status()
Refreshes your character's status from the character pane. This does not affect 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.