Based on Ayon's script, since it hasn't been worked on in a long time and it's the newest one available. Same commands still apply.
!convert N FROM TO
N is the number (can be decimal)
FROM is the origin currency
TO is the destination currency
Updates:
on $*:text:/[`@!.]currency \d+(.\d+)? \w+/Si:#:{
if (%aflood. [ $+ [ $nick ] ]) halt
;set -u5 %aflood. [ $+ [ $nick ] ] 1
if (!$4) {
.notice $nick Syntax: [`!@.]currency [AMOUNT] [FROM] [TO]
return
}
sockclose currency
sockopen currency www.google.com 80
sockmark currency $+(/finance/converter?a=,$2,&from=,$upper($3),&to=,$upper($4))
%# = #
}
on *:sockopen:currency:{
var %% = sockwrite -n $sockname
%% GET $sock($sockname).mark HTTP/1.0
%% Connection: Keep-Alive
%% $crlf
}
on *:sockread:currency:{
var %s
sockread %s
if (*<div id=currency_converter_result>* iswm %s) {
tokenize 32 $nohtml(%s)
msg %# $cx($1) $2-3 $cx($4) $5
}
}
; Written by http://zigwap.com/mirc
alias noHTML return $regsubex($1, /<[^>]+(?:>|$)|^[^<>]+>/g, $null)
; Written by Ouims irc.SwiftIRC.net:#mSL
; Modified by evilMonkey irc.SwiftIRC.net:#mSL
alias cx {
var %x = $1
tokenize 46 %x
if (.* iswm %x) tokenize 46 0 $+ %x
return $iif($0 == 1,$bytes($1,b) $+ .00,$bytes($1,b) $+ . $+ $left($2,2) $+ $iif($len($2) == 1,0))))
}
Works good! Even better idea, you know how you can type any calculation in the google search bar and it will return an answer? Instead of making just a currency you can make everything. type in 10 feet in yards or feet in 2 miles and it always returns an answer in that little box. Just a thought, there were some but they dont work no more. Anyways this one is nice!
You need to use the right dollar text. 'dollars' doesn't mean anything. AUD or USD etc
[14:46] <@User> !currency 4.5 EUR USD
[14:46] <@Bot> 4.50 EUR = 5.10 USD