Have servant

From Kolmafia
Revision as of 06:51, 19 October 2015 by imported>Relyk (Created page with "{{ #vardefine:name|have_servant}}{{ #vardefine:return_type|boolean}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

boolean have_servant(servant check_me )

  • check_me is the servant to check for

Returns true if you have the specified servant check_me, and false otherwise. Returns false if you are not Ed the Undying.

Code Samples

Lists out all the familiars you currently have and the total number you have over the total available.

int total, have;
foreach it in $familiars[] {
   total += 1;
   if (have_familiar(it)) {
      print("You have the familiar "+it+"!", "blue");
      have +=1;
   }
}
print("");
print("You have "+have+"/"+total+" available familiars.", "green");

CLI Equivalent

The CLI command "familiar" with the parameter "list" functions similarly.

See Also

use_familiar()

Special

Note that in Bad Moon it only checks the familiars you have acquired in the current run.