Difference between pages "Soulsauce cost" and "My companion"
(Difference between pages)
Jump to navigation
Jump to search
imported>Darzil (Created page with "{{ #vardefine:name|soulsauce_cost}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}...") |
imported>Bale (r11965) |
||
Line 1: | Line 1: | ||
{{ | {{ | ||
− | #vardefine:name| | + | #vardefine:name|my_companion}}{{ |
− | #vardefine:return_type| | + | #vardefine:return_type|string}}{{ |
FunctionPage| | FunctionPage| | ||
− | |||
name={{#var:name}}| | name={{#var:name}}| | ||
Line 11: | Line 10: | ||
aggregate={{#var:aggregate}}| | aggregate={{#var:aggregate}}| | ||
return_type={{#var:return_type}}| | return_type={{#var:return_type}}| | ||
− | return_also={{#var:return_also}} | + | return_also={{#var:return_also}} |
− | |||
− | |||
}}| | }}| | ||
− | function_description= | + | function_description=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.| |
+ | |||
+ | code1={{CodeSample| | ||
+ | title=Code Samples| | ||
+ | description=Determines Item Drop bonus granted by from Companion.| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | 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 ); | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | }}| | ||
}} | }} | ||
− | [[Category: | + | [[Category:Your Character]] |
Revision as of 08:47, 8 November 2014
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 );
}
}