Enthrone familiar: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
moved Enthrone to Enthrone (CLI): Also an ASH command for this, now.
 
imported>Bale
one very important problem to fix.
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#REDIRECT [[Enthrone (CLI)]]
{{
#vardefine:name|enthrone_familiar}}{{
#vardefine:return_type|boolean}}{{
 
FunctionPage|
name={{#var:name}}|
 
function1={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
parameter1={{Param|familiar|target}}|
p1desc={{Pspan|target}} is the familiar to enthrone.|
}}|
 
function_description=Enthrones the specified familiar. Returns false if something goes wrong with the enthroning process (e.g. the player does not have the specified familiar in his terrarium, or the player does not have a Crown of Thrones).|
 
code1={{CodeSample|
title=Code Sample|
description=Returns true if the El Vibrato Megadrone is successfully equipped to the Crown of Thrones.|
code=
<syntaxhighlight>
boolean enthrone_megadrone() {
  if (my_enthroned_familiar()!=$familiar[el vibrato megadrone])
      return enthrone_familiar($familiar[megadrone]);
  return false;
}
</syntaxhighlight>}}|
 
see_also={{SeeAlso|my_enthroned_familiar|equipped_item}}|
special=This command automatically equips the Crown of Thrones if it is not currently equipped.|
cli_equiv=The CLI command [[enthrone (CLI)|enthrone]] has similar functionality.|
}}
 
[[Category:Equipment]]

Latest revision as of 06:55, 24 July 2010

Function Syntax

boolean enthrone_familiar(familiar target )

  • target is the familiar to enthrone.

Enthrones the specified familiar. Returns false if something goes wrong with the enthroning process (e.g. the player does not have the specified familiar in his terrarium, or the player does not have a Crown of Thrones).

Code Sample

Returns true if the El Vibrato Megadrone is successfully equipped to the Crown of Thrones.

boolean enthrone_megadrone() {
   if (my_enthroned_familiar()!=$familiar[el vibrato megadrone])
      return enthrone_familiar($familiar[megadrone]);
   return false;
}

CLI Equivalent

The CLI command enthrone has similar functionality.

See Also

my_enthroned_familiar() | equipped_item()

Special

This command automatically equips the Crown of Thrones if it is not currently equipped.