Difference between revisions of "My companion"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(r11965)
 
imported>Bale
(see also)
 
Line 32: Line 32:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
}}|
 
}}|
 
+
see_also={{SeeAlso|my_familiar|my_thrall}}|
 
}}
 
}}
  
 
[[Category:Your Character]]
 
[[Category:Your Character]]

Latest revision as of 08:49, 8 November 2014

Function Syntax

string my_companion()

If your current path is Avatar of Jarlsberg this returns your current companion. If you have no current companion or you are not Jarlsberg's Avatar, then this returns an empty string.

Code Samples

Determines Item Drop bonus granted by from Companion.

if( my_path() == "Avatar of Jarlsberg" ) {
   if( my_companion() != "Eggman" )
      print( "You need to equip the Eggman for item drops." );
   else {
      int drop = 50;
      if( have_skill($skill[Working Lunch]) )
         drop += 25;
      print( "The item drop bonus from the Eggman is " + drop );
   }
}

See Also

my_familiar() | my_thrall()