My primestat: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>Heeheehee
m Fixed to be more correct.
Line 18: Line 18:
code1={{CodeSample|
code1={{CodeSample|
title=Code Samples|
title=Code Samples|
description=The following example attempts to create as many scrumpdiddlyumptious solutions as you have scrumptious reagents if you are a mysticality class.|
description=The following example attempts to create as many scrumpdiddlyumptious solutions as you have scrumptious reagents if you can access the Mysticality guild store.|
code=
code=
<syntaxhighlight>
<syntaxhighlight>
if(my_primestat() == $stat[mysticality]) {
if(my_primestat() == $stat[mysticality] || (my_class() == $class[Accordion Thief] && my_level() > 9) && guild_store_available()) {
// We need access to this guild store -- Mysticality classes just need the store unlocked, while Accordion thieves also need to be level 9 or greater.
   retrieve_item(item_amount($item[scrumptious reagent]) , $item[delectable catalyst]);
   retrieve_item(item_amount($item[scrumptious reagent]) , $item[delectable catalyst]);
   use(item_amount($item[delectable catalyst]) , $item[delectable catalyst]);
   use(item_amount($item[delectable catalyst]) , $item[delectable catalyst]);

Revision as of 04:31, 12 March 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.

if(my_primestat() == $stat[mysticality] || (my_class() == $class[Accordion Thief] && my_level() > 9) && guild_store_available()) {
// We need access to this guild store -- Mysticality classes just need the store unlocked, while Accordion thieves also need to be level 9 or greater.
   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).