Convertscript
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Convertscript

Started by Str?m@p?gen?, 22 October, 2003, 23:19:58

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Str?m@p?gen?

Hi!
I?am looking for a script thats convert swedish money to  euro, dollar, pund, danish, and so on. anybody know such a scrip? or can make on?

 

Optimus

hi me want 1 that makes gold :]

but if you really do want 1 go ahead maybe some 1 is kind enough to make you 1

;)

pHaTTy

sorry :(  i wud have liked to try this one, but i have not time as i have to install my linux partitions agen, setup all devices, and lotsa other stuff b4 i erase windows full stop :)

but if i do get a little time i will give it a shot

btw you will probably have to give me the change ratio
Resistance is futile!

servaks

Ratio +/- cahnges every day...

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

well average wud do until i made a backbone for the script, so it can be changed
Resistance is futile!

Str?m@p?gen?

here is a site http://www.forex.se/ where u an the latest curancy

tezlo

#6
rates = dofile("rates.dat") or {}

function save()
	local f = openfile("rates.dat", "w+")
	write(f, "rates = {\n")
	for currency, rate in rates do
		write(f, "\t"..format("[%q]", currency).." = "..rate..",\n")
	end write(f, "}") closefile(f)
end

function DataArrival(user, data)
	if strsub(data, 1, 1) ~= "<" then return end
	local s, e, cmd, args = strfind(data, "^%b<> %!(%S*)%s*(.*)|$")
	if s then
		cmd = strlower(cmd)
		if cmd == "rconv" then
			local s, e, currency, amount = strfind(args, "^(%a+)%s*(%d*)$")
			if not s then user:SendData(">> syntax: !rconv  [amount]") return 1 end
			local rate = rates[currency]
			if not rate then user:SendData(">> unknown currency") return 1 end
			amount = tonumber(amount)
			if amount and amount ~= 1 then currency = currency.."s" else amount = 1 end
			user:SendData(">> "..amount.." "..currency.." = "..rate*amount.." kronen or whatever")
		elseif cmd == "rset" then
			if not user.bOperator then user:SendData(">> you cant change conversion rates") return 1 end
			local s, e, currency, value = strfind(args, "^(%a+) ([%d%.]+)$")
			if not s then user:SendData(">> syntax: !rset  ") return 1 end
			user:SendData(">> 1 "..currency.." = "..value.." kronen or whatever")
			rates[currency] = tonumber(value) save()
		else return
		end return 1
	end
end -- tezlo

OPs can !rset
anyone can !rconv [amount]

SMF spam blocked by CleanTalk