Difference between pages "Steal" and "Stat modifier"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>Bale
(this was missing)
 
imported>Bale
m
 
Line 1: Line 1:
 
{{
 
{{
#vardefine:name|steal}}{{
+
#vardefine:name|stat_modifier}}{{
#vardefine:return_type|buffer}}{{
+
#vardefine:return_type|stat}}{{
  
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=In-combat Consulting|
 
  
 
function1={{Function|
 
function1={{Function|
Line 12: Line 11:
 
return_type={{#var:return_type}}|
 
return_type={{#var:return_type}}|
 
return_also={{#var:return_also}}|
 
return_also={{#var:return_also}}|
 +
parameter1={{Param|item|check_me}}|
 +
parameter2={{Param|string|modifier_name}}|
 
}}|
 
}}|
  
function_description=Attempts to pickpocket during a consult script, and returns the html response text from said attempt.|
+
function2={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|string|check_me}}|
 +
parameter2={{Param|string|modifier_name}}|
 +
}}|
 +
function_description=Returns a stat if {{pspan|check_me}} is stat specific.|
  
needscode=yes|
+
code1={{CodeSample|
 +
title=Code Sample|
 +
description=Prints the stats which are equalized by the effects of various equalizing potions.|
 +
code=
 +
<syntaxhighlight>
 +
stat st;
 +
foreach eff in $effects[] {
 +
  st = stat_modifier( eff , "Equalize" );
 +
  if(st != $stat[none])
 +
      print(eff +" equalizes all stats to "+ st);
 +
}
 +
</syntaxhighlight>}}|
  
see_also={{SeeAlso|attack|throw_item|throw_items|use_skill}}|
+
 
cli_equiv=The CCS entry of "try to steal an item" accomplishes the same function. (You can change your CCS with the command "ccs" on the CLI.)|
+
more_info= See [http://kolmafia.us/showthread.php?802 this thread] for details.|
more_info= See [[Custom_Combat_Script#Consult_Scripts|Consult Scripts]] for more information.|
 
special=Returns an empty buffer if used outside of a consult script.|
 
 
}}
 
}}
 +
 +
[[Category:Modifier Functions]]

Latest revision as of 05:25, 22 May 2010

Function Syntax

stat stat_modifier(item check_me ,string modifier_name )

stat stat_modifier(string check_me ,string modifier_name )

Returns a stat if check_me is stat specific.

Code Sample

Prints the stats which are equalized by the effects of various equalizing potions.

stat st;
foreach eff in $effects[] {
   st = stat_modifier( eff , "Equalize" );
   if(st != $stat[none])
      print(eff +" equalizes all stats to "+ st);
}

More Information

See this thread for details.