Difference between pages "My audience" and "Get chateau"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Bale
(categories)
 
imported>Relyk
 
Line 1: Line 1:
 
{{
 
{{
#vardefine:name|my_audience}}{{
+
#vardefine:name|get_chateau}}{{
#vardefine:return_type|int}}{{
+
#vardefine:return_type|int [item]}}{{
 +
#vardefine:aggregate|yes}}{{
  
 
FunctionPage|
 
FunctionPage|
 
 
name={{#var:name}}|
 
name={{#var:name}}|
  
Line 14: Line 14:
 
}}|
 
}}|
  
function_description=If you are in the {{kolwiki|Avatar of Sneaky Pete}} challenge path, this will return the current value of your audience. If the audience loves you, the value will be positive. If the audience hates you, the value will be negative. A neutral value is zero.|
+
function_description=Returns a map of your campground items as integers, keyed by item names.
 +
<ul>
 +
<li> Most values will be 1 to represent the item exists.</li>
 +
<li> Not all items will be included, players must purchase at least one item for each spot to appear.</li>
 +
<li> Your painting is accessed separately with its own properties.</li>
 +
</ul>|
  
 
code1={{CodeSample|
 
code1={{CodeSample|
title=Code Samples|
+
title=Code Sample|
description=The following example reports on your audience.|
+
description=The following checks if Chateau Mantegna is available and then prints the contents and painting status.|
 
code=
 
code=
 
<syntaxhighlight>
 
<syntaxhighlight>
if( my_audience() == -50 )
+
  if(to_boolean(get_property("chateauAvailable")))
  print( "It would be impossible to hate you any more than this audience hates you. Monster. I wanna Riot!" );
+
  {
if( my_audience() < -30 )
+
    int [item] chateau = get_chateau();
  print( "It is only because you wear Pete's shirt that you can aspire to be this despicable." );
+
    foreach furniture in chateau
else if( my_audience() < 0 )
+
    {
  print( "The audience really dislikes you." );
+
      print(furniture + " " + chateau[furniture]);
else if( my_audience() == 0 )
+
    }
  print( "You're kinda... meh." );
 
else if( my_audience() == 50 )
 
  print( "OMG! OMG! OMG! I cannot believe I could be so lucky as to meet you! I love you! Please party with me!" );
 
else if( my_audience() > 30 )
 
  print( "It is only because you wear Pete's shirt that you can aspire to be this wonderful." );
 
else
 
  print( "The audience loves you and I also love you." );
 
</syntaxhighlight>
 
}}|
 
  
see_also={{SeeAlso|my_meat|my_mp}}|
+
    string painting = get_property("chateauMonster");
 +
    string fought = get_property("_chateauMonsterFought");
 +
    print(painting + " " + fought);
 +
  }
 +
</syntaxhighlight>}}|
  
 +
see_also={{SeeAlso|get_campground}}|
 
}}
 
}}
  
[[Category:Your Character]] [[Category:Skills and Effects]]
+
[[Category:Item Management]]

Revision as of 12:31, 29 April 2015

Function Syntax

int [item] get_chateau()

Returns a map of your campground items as integers, keyed by item names.

  • Most values will be 1 to represent the item exists.
  • Not all items will be included, players must purchase at least one item for each spot to appear.
  • Your painting is accessed separately with its own properties.

Code Sample

The following checks if Chateau Mantegna is available and then prints the contents and painting status.

  if(to_boolean(get_property("chateauAvailable")))
  {
    int [item] chateau = get_chateau();
    foreach furniture in chateau
    {
      print(furniture + " " + chateau[furniture]);
    }

    string painting = get_property("chateauMonster");
    string fought = get_property("_chateauMonsterFought");
    print(painting + " " + fought);
  }

See Also

get_campground()