Miscellaneous Functions: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
imported>Alacrity
mNo edit summary
Line 1: Line 1:
[http://oiyaoi.ifrance.com/images/small/codici-di/ codici di sblocco per lg] [http://akmokanzen.ifrance.com/images/small/il-re.htm il re leone si avvicina] [http://girlwho-is.ifrance.com/img/styles/editor-programmazione.htm editor programmazione] [http://lovereceier.ifrance.com/lib/amd-athlon.htm amd athlon64 3000 socket 939 venice] [http://kalian42.ifrance.com/text/directory/giochi-di/ giochi di elicotteri] [http://lovereceier.ifrance.com/lib/back-to.htm back to street] [http://kalian42.ifrance.com/text/directory/nikon-digital/ nikon digital flash] [http://kalian42.ifrance.com/text/directory/agenzia-matrimoniale/ agenzia matrimoniale on line] [http://oiyaoi.ifrance.com/images/small/krizia-profumi/ krizia profumi] [http://lordsander.ifrance.com/topic/cbr.htm cbr 600 2001] [http://lovereceier.ifrance.com/lib/casting-gf.htm casting gf5] [http://demurediablo.ifrance.com/library/html/ed-hunter/ ed hunter iron maiden] [http://girlwho-is.ifrance.com/img/styles/accessori-i.htm accessori i mate] [http://girlwho-is.ifrance.com/img/styles/hard-disk.htm hard disk sata] [http://lordsander.ifrance.com/topic/correo-electronico.htm correo electronico] [http://singaporepets.ifrance.com/library/html/gruppi-elettrogeni.htm gruppi elettrogeni valex] [http://speedofsoun.ifrance.com/text/directory/mayra.htm mayra] [http://lordsander.ifrance.com/topic/hotel-houston.htm hotel houston] [http://oiyaoi.ifrance.com/images/small/sito-di/ sito di playboy] [http://tat-ooin.ifrance.com/resources/articles/nastase.htm nastase] [http://oiyaoi.ifrance.com/images/small/buon-anno/ buon anno] [http://voltia.ifrance.com/content/view/coppia-scambista.htm coppia scambista] [http://lordsander.ifrance.com/topic/gaetano-donizetti.htm gaetano donizetti 1797 1848] [http://speedofsoun.ifrance.com/text/directory/incidente-senna.htm incidente senna] [http://oiyaoi.ifrance.com/images/small/depressione-ansiosa/ depressione ansiosa reattiva maggiore] [http://highbulp.ifrance.com/images/small/leave-get/ leave get up jojo] [http://tizolaa.ifrance.com/web/www-immagini/ www immagini cani carlini] [http://toofarfrommaybe.ifrance.com/view/new/classic-car/ classic car] [http://lordsander.ifrance.com/topic/los-fronterizos.htm los fronterizos] [http://girlwho-is.ifrance.com/img/styles/dlink-pci.htm d-link pci usb] [http://tat-ooin.ifrance.com/resources/articles/diffusione-sonora.htm diffusione sonora] [http://speedofsoun.ifrance.com/text/directory/dvd-player.htm dvd player portable] [http://lordsander.ifrance.com/topic/albergo-riviera.htm albergo riviera adriatica] [http://lordsander.ifrance.com/topic/sound-blaster.htm sound blaster bulk] [http://oiyaoi.ifrance.com/images/small/ice-cream/ ice cream car] [http://toofarfrommaybe.ifrance.com/view/new/il-tredici/ il tredici non risponde] [http://singaporepets.ifrance.com/library/html/etichette-cd.htm etichette cd] [http://lordsander.ifrance.com/topic/il-decameron.htm il decameron] [http://noxuhax.ifrance.com/content/view/toxisity.htm toxisity] [http://noxuhax.ifrance.com/content/view/tamron.htm tamron 90] [http://lovereceier.ifrance.com/lib/un-burattino.htm un burattino di nome pinocchio] [http://jdawsona.ifrance.com/data/mojarras/ mojarras] [http://kalian42.ifrance.com/text/directory/cinque-giorni/ cinque giorni michele zarillo] [http://girlwho-is.ifrance.com/img/styles/winxp-pro.htm winxp pro] [http://toofarfrommaybe.ifrance.com/view/new/alamo-bay/ alamo bay] [http://yeeden.ifrance.com/img/styles/olivetti-dcopia/ olivetti d-copia 200] [http://girlwho-is.ifrance.com/img/styles/video-onde.htm video onde alex baroni] [http://noxuhax.ifrance.com/content/view/il-resto.htm il resto e nella mente] [http://demurediablo.ifrance.com/library/html/kim-possible/ kim possible. secret files] [http://demurediablo.ifrance.com/library/html/game-zone/ game zone] [http://voltia.ifrance.com/content/view/stampante-laser.htm stampante laser a colori professionale] [http://singaporepets.ifrance.com/library/html/www-fnac.htm www fnac it] [http://broadwaylili.ifrance.com/content/view/pirelli-calzature.htm pirelli calzature uomo p] [http://singaporepets.ifrance.com/library/html/i-was.htm i was born to try] [http://girlwho-is.ifrance.com/img/styles/ladri-per.htm ladri per amore] [http://deviantrus.ifrance.com/topic/motore-ricerca/ motore ricerca midi] [http://igaros.ifrance.com/lib/receitafederal/ receitafederal] [http://voltia.ifrance.com/content/view/escort-cosworth.htm escort cosworth] [http://highbulp.ifrance.com/images/small/mx/ mx 300] [http://highbulp.ifrance.com/images/small/noleggio-auto/ noleggio auto morgan] [http://demurediablo.ifrance.com/library/html/i-simpson/ i simpson. greatest hits] [http://tizolaa.ifrance.com/web/wp-cp/ wp cp1] [http://singaporepets.ifrance.com/library/html/memoria-sdram.htm memoria sdram acquisto] [http://kalian42.ifrance.com/text/directory/la-calunnia/ la calunnia] [http://voltia.ifrance.com/content/view/testi-canzoni.htm testi canzoni toxicity] [http://yeeden.ifrance.com/img/styles/body-lana/ body lana abbigliamento per neonati] [http://highbulp.ifrance.com/images/small/videocamere-samsung/ videocamere samsung ego] [http://lovereceier.ifrance.com/lib/mapeche.htm mapeche] [http://toofarfrommaybe.ifrance.com/view/new/frusta-bondage/ frusta bondage] [http://deviantrus.ifrance.com/topic/lettori-di/ lettori di card] [http://toofarfrommaybe.ifrance.com/view/new/www-gonline/ www gonline com br] [http://girlwho-is.ifrance.com/img/styles/lefta-outside.htm lefta outside alone] [http://lovereceier.ifrance.com/lib/tally.htm tally 9132] [http://lordsander.ifrance.com/topic/chitarra-suona.htm chitarra suona] [http://toofarfrommaybe.ifrance.com/view/new/boom-boom/ boom boom boom boom] [http://singaporepets.ifrance.com/library/html/scultura.htm scultura] [http://demurediablo.ifrance.com/library/html/mypal-a/ mypal a620 asus] [http://jdawsona.ifrance.com/data/roleplayinggames-com/ roleplayinggames com] [http://tizolaa.ifrance.com/web/michelle-hunzicher/ michelle hunzicher calendario] [http://lordsander.ifrance.com/topic/bleem.htm bleem2] [http://kalian42.ifrance.com/text/directory/traghetti-procida/ traghetti procida] [http://oiyaoi.ifrance.com/images/small/meteoriti/ meteoriti] [http://yeeden.ifrance.com/img/styles/lg-digitale/ lg digitale terrestre] [http://broadwaylili.ifrance.com/content/view/wireless-tv.htm wireless tv lcd] [http://highbulp.ifrance.com/images/small/dielectric/ dielectric] [http://voltia.ifrance.com/content/view/condizionatori-classe.htm condizionatori classe energetica b] [http://highbulp.ifrance.com/images/small/soluzione-final/ soluzione final fantasy x] [http://akmokanzen.ifrance.com/images/small/semi-di.htm semi di sesamo] [http://yeeden.ifrance.com/img/styles/manolete/ manolete] [http://lordsander.ifrance.com/topic/musica-do.htm musica do the o c] [http://lordsander.ifrance.com/topic/haiducii-dragostea.htm haiducii dragostea din tei haiducii vs] [http://tizolaa.ifrance.com/web/foto-di/ foto di catrina del gf 5] [http://tizolaa.ifrance.com/web/chat-sicilia/ chat sicilia] [http://toofarfrommaybe.ifrance.com/view/new/costantino-vitigliano/ costantino vitigliano official site] [http://highbulp.ifrance.com/images/small/lg-plasma/ lg plasma 42px4rv] [http://demurediablo.ifrance.com/library/html/disco-mare/ disco mare 2002] [http://yeeden.ifrance.com/img/styles/luomo-del/ luomo del klan] [http://tizolaa.ifrance.com/web/stay-shakes/ stay shakes] [http://demurediablo.ifrance.com/library/html/testo-breath/ testo breath easy blue] [http://tat-ooin.ifrance.com/resources/articles/pelleterie.htm pelleterie] [http://lordsander.ifrance.com/topic/www-ecdl.htm www ecdl it] [http://deviantrus.ifrance.com/topic/volkswagen-/ volkswagen          passat 1.8i aut. clx] [http://akmokanzen.ifrance.com/images/small/squadre-serie.htm squadre serie d] [http://tat-ooin.ifrance.com/resources/articles/the-mask.htm the mask of phantasm] [http://lovereceier.ifrance.com/lib/polipone.htm polipone] [http://demurediablo.ifrance.com/library/html/s-francesco/ s. francesco di sales] [http://lovereceier.ifrance.com/lib/batterie-duracell.htm batterie duracell plus] [http://speedofsoun.ifrance.com/text/directory/dolci-riso.htm dolci riso] [http://singaporepets.ifrance.com/library/html/doanload.htm doanload] [http://highbulp.ifrance.com/images/small/cbc/ cbc] [http://yeeden.ifrance.com/img/styles/l-americano/ l americano] [http://tizolaa.ifrance.com/web/gold/ gold] [http://noxuhax.ifrance.com/content/view/ufficio-teramo.htm ufficio teramo] [http://igaros.ifrance.com/lib/luomo-che/ luomo che non sapeva amare] [http://tizolaa.ifrance.com/web/congelatore-a/ congelatore a cassetti smeg] [http://igaros.ifrance.com/lib/raf-vita/ raf vita storie e pensieri di un alieno] [http://voltia.ifrance.com/content/view/showtvnet.htm showtvnet] [http://singaporepets.ifrance.com/library/html/desislava.htm desislava] [http://lordsander.ifrance.com/topic/lazzarini.htm lazzarini] [http://jdawsona.ifrance.com/data/dragonball-z/ dragonball z clips] [http://tat-ooin.ifrance.com/resources/articles/firmware-philips.htm firmware philips] [http://oiyaoi.ifrance.com/images/small/visure-pra/ visure pra] [http://broadwaylili.ifrance.com/content/view/yeu.htm yeu] [http://lovereceier.ifrance.com/lib/kazim-koyuncu.htm kazim koyuncu sevval sam] [http://oiyaoi.ifrance.com/images/small/residence-venere/ residence venere chianciano terme siena toscana it] [http://jdawsona.ifrance.com/data/reggiseno-ferretto/ reggiseno ferretto] [http://tizolaa.ifrance.com/web/agriturismo-san/ agriturismo san vito lo capo] [http://demurediablo.ifrance.com/library/html/jose/ jose] [http://girlwho-is.ifrance.com/img/styles/application-engineer.htm application engineer (italia nord ovest)] [http://voltia.ifrance.com/content/view/foto-di.htm foto di valeria marini] [http://kalian42.ifrance.com/text/directory/intel-processori/ intel processori dual core] [http://speedofsoun.ifrance.com/text/directory/castele-cat.htm castele cat] [http://jdawsona.ifrance.com/data/grande-fratello/ grande fratello 2 mascia] [http://oiyaoi.ifrance.com/images/small/ducati-/ ducati 900 ss] [http://speedofsoun.ifrance.com/text/directory/la-tortura.htm la tortura delle vergini] [http://jdawsona.ifrance.com/data/mitiaro/ mitiaro] [http://deviantrus.ifrance.com/topic/la-seconda/ la seconda dimensione] [http://akmokanzen.ifrance.com/images/small/card-hard.htm card hard] [http://singaporepets.ifrance.com/library/html/campeggio-isola.htm campeggio isola d elba] [http://toofarfrommaybe.ifrance.com/view/new/land-sea/ land sea palmari] [http://toofarfrommaybe.ifrance.com/view/new/carmenelectra/ carmenelectra] [http://singaporepets.ifrance.com/library/html/dhfh.htm dhfh] [http://jdawsona.ifrance.com/data/lettini-da/ lettini da viaggio bimbo] [http://voltia.ifrance.com/content/view/dana-e.htm dana e roby] [http://speedofsoun.ifrance.com/text/directory/dragons-tea.htm dragons tea din tei] [http://broadwaylili.ifrance.com/content/view/carnaby-street.htm carnaby street london england] [http://voltia.ifrance.com/content/view/www-viamichelin.htm www viamichelin] [http://highbulp.ifrance.com/images/small/sistema-dolby/ sistema dolby sorround 5 1] [http://highbulp.ifrance.com/images/small/nvidia-geforce/ nvidia geforce 6600 256mb pci-express tv] [http://singaporepets.ifrance.com/library/html/www-new.htm www new york visit com] [http://akmokanzen.ifrance.com/images/small/roubaix.htm roubaix] [http://noxuhax.ifrance.com/content/view/ati-sapphire.htm ati sapphire 9250 256] [http://highbulp.ifrance.com/images/small/revo/ revo 2013] [http://tizolaa.ifrance.com/web/esami-avvocato/ esami avvocato roma] [http://voltia.ifrance.com/content/view/philips-monitor.htm philips monitor 17 crt] [http://demurediablo.ifrance.com/library/html/generation-golf/ generation golf] [http://broadwaylili.ifrance.com/content/view/panca-multiuso.htm panca multiuso] [http://kalian42.ifrance.com/text/directory/search-gogle/ search gogle] [http://tizolaa.ifrance.com/web/umberta-comi/ umberta comi sex gratis] [http://lordsander.ifrance.com/topic/philips-.htm philips 28 tv] [http://kalian42.ifrance.com/text/directory/cartoon-bondage/ cartoon bondage] [http://jdawsona.ifrance.com/data/translate/ translate] [http://toofarfrommaybe.ifrance.com/view/new/diavolino/ diavolino] [http://igaros.ifrance.com/lib/cristano-ronaldo/ cristano ronaldo] [http://akmokanzen.ifrance.com/images/small/rommel-la.htm rommel la volpe del deserto] [http://lovereceier.ifrance.com/lib/randy-quaid.htm randy quaid] [http://yeeden.ifrance.com/img/styles/elgaucho/ elgaucho] [http://oiyaoi.ifrance.com/images/small/monitor-tv/ monitor tv lcd samsung] [http://kalian42.ifrance.com/text/directory/singola-di/ singola di udine] [http://akmokanzen.ifrance.com/images/small/mayara.htm mayara] [http://akmokanzen.ifrance.com/images/small/la-casa.htm la casa senza amore] [http://speedofsoun.ifrance.com/text/directory/zionn-y.htm zionn y lennox] [http://oiyaoi.ifrance.com/images/small/lancio-coltelli/ lancio coltelli] [http://singaporepets.ifrance.com/library/html/paopop.htm paopop] [http://broadwaylili.ifrance.com/content/view/video-erotici.htm video erotici gratuiti] [http://tizolaa.ifrance.com/web/napoli-/ napoli - ibiza] [http://lovereceier.ifrance.com/lib/casting-per.htm casting per fotomodelle] [http://singaporepets.ifrance.com/library/html/razza-padrona.htm razza padrona] [http://yeeden.ifrance.com/img/styles/sancho/ sancho] [http://voltia.ifrance.com/content/view/barcellona-napoli.htm barcellona napoli] [http://lordsander.ifrance.com/topic/antenna-amplificata.htm antenna amplificata per auto] [http://lovereceier.ifrance.com/lib/hp-.htm hp 6840 wireless] [http://oiyaoi.ifrance.com/images/small/studio-di/ studio di funzioni] [http://tat-ooin.ifrance.com/resources/articles/scheda-video.htm scheda video gainward] [http://broadwaylili.ifrance.com/content/view/didll-mania.htm didll mania] [http://lovereceier.ifrance.com/lib/vomero.htm vomero] [http://lordsander.ifrance.com/topic/cani-razze.htm cani razze foto] [http://speedofsoun.ifrance.com/text/directory/foto-capezzoli.htm foto capezzoli] [http://yeeden.ifrance.com/img/styles/wecker/ wecker] [http://deviantrus.ifrance.com/topic/tesi-in/ tesi in economia e gestione delle impres] [http://demurediablo.ifrance.com/library/html/display/ display 8850] [http://broadwaylili.ifrance.com/content/view/incidentale.htm incidentale] [http://akmokanzen.ifrance.com/images/small/alfa-q.htm alfa q4] [http://girlwho-is.ifrance.com/img/styles/xxx-anal.htm xxx anal vree] [http://tat-ooin.ifrance.com/resources/articles/italiano-ucciso.htm italiano ucciso quatrocchi] [http://igaros.ifrance.com/lib/immagini-e/ immagini e artwork da phantom kingdom] [http://deviantrus.ifrance.com/topic/asiacarrera/ asiacarrera] [http://tat-ooin.ifrance.com/resources/articles/peuterey-it.htm peuterey it] [http://tizolaa.ifrance.com/web/wasn-t/ wasn t] [http://igaros.ifrance.com/lib/hot-videos/ hot videos] == Part 6 - Miscellaneous ==
== Part 6 - Miscellaneous ==
<p><em>Mostly internal stuff. Some good for everyone, some only for ASH wizards.</em></p>
<p><em>Mostly internal stuff. Some good for everyone, some only for ASH wizards.</em></p>


Line 6: Line 6:


<p><strong>boolean cli_execute( string command )</strong><br />
<p><strong>boolean cli_execute( string command )</strong><br />
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you&#8217;re careful and not an asshat, for raw URLs.<br />
See the [http://kolmafia.sourceforge.net/scripting.html CLI manual] for more details.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]]</p>
 
<p><strong>void wait( int delay )</strong><br />
Does nothing for the desired number of seconds.</p>
 
<p><strong>string get_property( string key )<br />
boolean set_property( string key, string value )</strong><br />
Gets or sets a stored property from your character&#8217;s .kcs file.<br />
The KoLmafia [[%28ASHRM%29_KoLMafia_Properties|properties]] page contains details on many of the keys that are available for access.<br />
<em>Sample</em>:[[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]]</p>
 
<p><strong>boolean file_to_map( string file_to_load, map map_to_fill )<br />
boolean map_to_file( map map_to_save, string file_to_write )</strong><br />
Loads and saves maps as tab-delimited text files.</p>
 
<p><strong>int random( int range )</strong><br />
Generates a random integer between 0 and (range-1) inclusive.</p>
 
<p><strong>int round( float ratio )<br />
int floor( float ratio )<br />
int ceil( float ratio )<br />
int truncate( float ratio )</strong><br />
Returns an integer near the given real number.  Respectively, it returns the nearest, next lowest, next highest, and decimal-stripped integer.</p>
 
<p><strong>int count( map )</strong><br />
Returns the number of defined keys for the aggregate.</p>
 
<p><strong>void clear( map )</strong><br />
Remove all keys from a map. </p>
 
<p><strong>void disable( string function_name )<br />
void enable( string function_name )</strong><br />
For debugging purposes disables or enables the indicated function</p>
 
<p><strong>float square_root( float value )</strong><br />
returns the square root of the passed value</p>
 
<p><strong>string today_to_string()</strong><br />
Returns today&#8217;s (real-world) date in the form yyyymmdd.  It is based on your computer&#8217;s system date</p>

Revision as of 23:12, 19 August 2007

Part 6 - Miscellaneous

Mostly internal stuff. Some good for everyone, some only for ASH wizards.

void print( string helloworld )
Prints the given string to the graphical CLI window and to the status line of the main Adventuring window

boolean cli_execute( string command )
Executes the given command as if it were entered into the graphical CLI window. This can be used for CLI commands or, if you’re careful and not an asshat, for raw URLs.
See the CLI manual for more details.
Sample:Hedging

void wait( int delay )
Does nothing for the desired number of seconds.

string get_property( string key )
boolean set_property( string key, string value )

Gets or sets a stored property from your character’s .kcs file.
The KoLmafia properties page contains details on many of the keys that are available for access.
Sample:Battlefield_gather

boolean file_to_map( string file_to_load, map map_to_fill )
boolean map_to_file( map map_to_save, string file_to_write )

Loads and saves maps as tab-delimited text files.

int random( int range )
Generates a random integer between 0 and (range-1) inclusive.

int round( float ratio )
int floor( float ratio )
int ceil( float ratio )
int truncate( float ratio )

Returns an integer near the given real number. Respectively, it returns the nearest, next lowest, next highest, and decimal-stripped integer.

int count( map )
Returns the number of defined keys for the aggregate.

void clear( map )
Remove all keys from a map.

void disable( string function_name )
void enable( string function_name )

For debugging purposes disables or enables the indicated function

float square_root( float value )
returns the square root of the passed value

string today_to_string()
Returns today’s (real-world) date in the form yyyymmdd. It is based on your computer’s system date