Datatype Conversions: Difference between revisions
imported>Efilnikufecin No edit summary |
imported>Efilnikufecin New conversion methods |
||
Line 3: | Line 3: | ||
These functions will convert 1 type of data to another. | These functions will convert 1 type of data to another. | ||
<p><strong>string | <p><strong>string to_string( variable )</strong><br /> | ||
Converts in-game variables to printable counterparts. The print command will cast non-string values properly now, but these are still useful for building URLs and setting properties.<br /> | |||
accepts: boolean, int, float, item, zodiac, location, familiar, class, stat, skill, effect, slot, element, monster</p> | |||
Converts in-game variables to printable counterparts. The print command will cast non-string values properly now, but these are still useful for building URLs and setting properties.</p> | |||
<p><strong> | <p><strong>int to_int( variable )</strong><br /> | ||
Converts the ASH-based object into the number that will be recognized by the KoL server. Needed when you’re building raw URLs from time to time.<br /> | |||
accepts: String, float, item, zodiac, location, familiar, skill, effect, slot, element, monster<br /> | |||
item | may accept: boolean, class, stat</p> | ||
zodiac | |||
location | |||
familiar | |||
skill | |||
effect | |||
slot | |||
element | |||
monster | |||
<p><strong> | <p><strong>boolean to_boolean( variable )</strong><br /> | ||
Converts the ASH-based object into boolean.<br /> | |||
Accepts: String<br /> | |||
may accept: Int</p> | |||
<p><strong> | <p><strong>float to_float( variable )</strong><br /> | ||
Converts the ASH-based object into a float.<br /> | |||
Accepts: String<br /> | |||
may accept: int</p> | |||
<p><strong> | <p><strong>item to_item( variable )</strong><br /> | ||
Converts the ASH-based object into an item.<br /> | |||
Accepts: string, int | |||
</p> | |||
<p><strong> | <p><strong>zodiac to_zodiac( variable )</strong><br /> | ||
Converts the ASH-based object into a zodiac.<br /> | |||
Accepts: string | |||
</p> | |||
<p><strong>location to_location( variable )</strong><br /> | |||
Converts the ASH-based object into a location.<br /> | |||
Accepts: string, int | |||
</p> | |||
<p><strong>familiar to_familiar( variable )</strong><br /> | |||
Converts the ASH-based object into a familiar.<br /> | |||
Accepts: string, int | |||
</p> | |||
<p><strong>class to_class( variable )</strong><br /> | |||
Converts the ASH-based object into a class.<br /> | |||
Accepts: string | |||
</p> | |||
<p><strong>stat to_stat( variable )</strong><br /> | |||
Converts the ASH-based object into a stat.<br /> | |||
Accepts: string | |||
</p> | |||
<p><strong>skill to_skill( variable )</strong><br /> | |||
Converts the ASH-based object into a skill.<br /> | |||
Accepts: string, int, effect | |||
</p> | |||
<p><strong>effect to_effect( variable )</strong><br /> | |||
Converts the ASH-based object into an effect.<br /> | |||
Accepts: string, int, skill | |||
</p> | |||
<p><strong>slot to_slot( variable )</strong><br /> | |||
Converts the ASH-based object into a slot.<br /> | |||
Accepts: string, int, item | |||
</p> | |||
<p><strong>element to_element( variable )</strong><br /> | |||
Converts the ASH-based object into an element.<br /> | |||
Accepts: string, int | |||
</p> | |||
<p><strong>monster to_monster( variable )</strong><br /> | |||
Converts the ASH-based object into a monster.<br /> | |||
Accepts: string, int | |||
</p> |
Revision as of 16:00, 26 June 2007
Data Type Conversions
These functions will convert 1 type of data to another.
string to_string( variable )
Converts in-game variables to printable counterparts. The print command will cast non-string values properly now, but these are still useful for building URLs and setting properties.
accepts: boolean, int, float, item, zodiac, location, familiar, class, stat, skill, effect, slot, element, monster
int to_int( variable )
Converts the ASH-based object into the number that will be recognized by the KoL server. Needed when you’re building raw URLs from time to time.
accepts: String, float, item, zodiac, location, familiar, skill, effect, slot, element, monster
may accept: boolean, class, stat
boolean to_boolean( variable )
Converts the ASH-based object into boolean.
Accepts: String
may accept: Int
float to_float( variable )
Converts the ASH-based object into a float.
Accepts: String
may accept: int
item to_item( variable )
Converts the ASH-based object into an item.
Accepts: string, int
zodiac to_zodiac( variable )
Converts the ASH-based object into a zodiac.
Accepts: string
location to_location( variable )
Converts the ASH-based object into a location.
Accepts: string, int
familiar to_familiar( variable )
Converts the ASH-based object into a familiar.
Accepts: string, int
class to_class( variable )
Converts the ASH-based object into a class.
Accepts: string
stat to_stat( variable )
Converts the ASH-based object into a stat.
Accepts: string
skill to_skill( variable )
Converts the ASH-based object into a skill.
Accepts: string, int, effect
effect to_effect( variable )
Converts the ASH-based object into an effect.
Accepts: string, int, skill
slot to_slot( variable )
Converts the ASH-based object into a slot.
Accepts: string, int, item
element to_element( variable )
Converts the ASH-based object into an element.
Accepts: string, int
monster to_monster( variable )
Converts the ASH-based object into a monster.
Accepts: string, int