Subdomain Posts
Haskell | 1 day ago
Haskell | 5 days ago
Haskell | 5 days ago
Haskell | 5 days ago
Haskell | 5 days ago
Haskell | 5 days ago
JavaScript | 7 days ago
None | 7 days ago
Haskell | 9 days ago
Haskell | 9 days ago
Recent Posts
None | 14 sec ago
INI file | 23 sec ago
Z80 Assembler | 37 sec ago
None | 50 sec ago
None | 51 sec ago
PHP | 1 min ago
None | 1 min ago
MySQL | 1 min ago
None | 1 min ago
Bash | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 31st of Jan 2010 06:08:25 PM
Download |
Raw |
Embed |
Report
module Main where
import Text.ParserCombinators.Parsec
import Data
.ByteString
.Lex
.Double
import qualified Data.ByteString.Char8 as B
str2float x = case (readDouble x) of
Nothing -> 0
Just (k,rest) -> k
cleanstr s = [ n | n <- s , n/='\r']
tfarm (s1:s2:s3:s4:s5:s6:s7:s8:[]) = [(s1,s2,s3,s4,s5,s6,s7,str2float $ B.pack s8)]
tfarm (s1:s2:s3:s4:s5:s6:s7:s8:t) = (s1,s2,s3,s4,s5,s6,s7,str2float $ B.pack s8):tfarm t
makestr
(s1
,s2
,s3
,s4
,s5
,s6
,s7
,s8
) = "\n<strategy class=\"Farmizzator\" desc=\"Farm"++s1
++ "\" enabled=\"true\" uid=\""++s2
++s3
++"\">\n"++"<target x=\""++s2
++"\" y=\""++s3
++"\" movement=\"attack\" rate=\""++show (37/s8
)++ "\"/>\n"++"<troops type=\"Clubswinger\" min=\"3\" randomise=\"true\" allowLess=\"true\">10</troops>\n"++"</strategy>\n"
main = do
Submit a correction or amendment below.
Make A New Post