My companion

From Kolmafia
Revision as of 08:47, 8 November 2014 by imported>Bale (r11965)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 );
   }
}