Difference between revisions of "Enthrone familiar"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m (New page, crude code sample.)
imported>Heeheehee
(Changed some details to be more correct. Can someone double check the special? I'm fairly sure that's the case.)
Line 12: Line 12:
 
return_type={{#var:return_type}}|
 
return_type={{#var:return_type}}|
 
return_also={{#var:return_also}}|
 
return_also={{#var:return_also}}|
parameter1={{Param|slot|check}}|
+
parameter1={{Param|familiar|target}}|
p1desc={{Pspan|check}} is the item slot to check|
+
p1desc={{Pspan|target}} is the familiar to enthrone.|
 
}}|
 
}}|
  
function_description=Enthrones the specified familiar if you have the Crown of Thrones equipped.|
+
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|
 
code1={{CodeSample|
Line 24: Line 24:
 
<syntaxhighlight>
 
<syntaxhighlight>
 
boolean enthrone_megadrone() {
 
boolean enthrone_megadrone() {
   if (equipped_item($slot[hat])==$item[Crown of Thrones] && my_enthroned_familiar()!=$familiar[el vibrato megadrone])
+
   if (my_enthroned_familiar()!=$familiar[el vibrato megadrone])
 
       return enthrone($familiar[megadrone]);
 
       return enthrone($familiar[megadrone]);
 
   return false;
 
   return false;
Line 31: Line 31:
  
 
see_also={{SeeAlso|my_enthroned_familiar|equipped_item}}|
 
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" has similar functionality.|
 
cli_equiv=The CLI command "enthrone" has similar functionality.|
 
}}
 
}}

Revision as of 04:03, 21 May 2010

Function Syntax

boolean enthrone(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[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.