My primestat: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>ZammyWarrior
No edit summary
imported>PhilmASTErpLus
Reformatted code
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''stat my_primestat()'''<br/>
{{
Returns the stat associated with your class.
#vardefine:name|my_primestat}}{{
[[Category:Your Character | My primestat()]]
#vardefine:return_type|stat}}{{
[[Category:Ash Functions |My primestat()]]
 
[[Category:Needs Code Samples | My primestat()]]
FunctionPage|
<pre>#If primestat returns mysticality, script will retrieve X amount of delectable catalyst
name={{#var:name}}|
#(X = amount of scrumptious reagents in inventory). Then it will use all of the delectable catalyst in your inventory.
 
#Designed to create scrumpdiosldajksd solutions equal to the amount of scrumptious reagents in your inventory.
function1={{Function|
if(my_primestat() == $stat[mysticality]){
name={{#var:name}}|
retrieve_item(item_amount($item[scrumptious reagent]), $item[delectable catalyst]);
aggregate={{#var:aggregate}}|
use(item_amount($item[delectable catalyst]), $item[delectable catalyst]);
return_type={{#var:return_type}}|
return_also={{#var:return_also}}
}}|
 
function_description=Returns the stat associated with your class.|
 
code1={{CodeSample|
title=Code Samples|
description=The following example attempts to create as many scrumpdiddlyumptious solutions as you have scrumptious reagents if you can access the Mysticality guild store. Since Accordion Thieves above level 9 can also access {{kolwiki|Gouda's Grimoire and Grocery}}, this code checks for it as well.|
code=
<syntaxhighlight>
if ((my_primestat() == $stat[mysticality] || (my_class() == $class[Accordion Thief] && my_level() > 9))
      && guild_store_available())
{
  retrieve_item(item_amount($item[scrumptious reagent]) , $item[delectable catalyst]);
  use(item_amount($item[delectable catalyst]) , $item[delectable catalyst]);
}
}
</pre>
</syntaxhighlight>
}}|
 
see_also={{SeeAlso|retrieve_item|item_amount|use}}|
special=When not logged in, this function returns $stat[moxie] (Needs spading).
}}
 
[[Category:Your Character]]

Latest revision as of 19:58, 16 September 2010

Function Syntax

stat my_primestat()

Returns the stat associated with your class.

Code Samples

The following example attempts to create as many scrumpdiddlyumptious solutions as you have scrumptious reagents if you can access the Mysticality guild store. Since Accordion Thieves above level 9 can also access Gouda's Grimoire and Grocery, this code checks for it as well.

if ((my_primestat() == $stat[mysticality] || (my_class() == $class[Accordion Thief] && my_level() > 9))
      && guild_store_available())
{
   retrieve_item(item_amount($item[scrumptious reagent]) , $item[delectable catalyst]);
   use(item_amount($item[delectable catalyst]) , $item[delectable catalyst]);
}

See Also

retrieve_item() | item_amount() | use()

Special

When not logged in, this function returns $stat[moxie] (Needs spading).