Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- specs = {}
- file = File.open("special.txt","r")
- while(!file.eof())
- line = file.gets().chomp()
- line = line.split("\t",2)
- specs[line[0]] = line[1].to_i()
- end
- file.close()
- type = ""
- file = File.open("trainers.txt","r")
- while(!file.eof())
- line = file.gets.chomp()
- line = line.split(": ",2)
- if(line[1].include?("("))
- type = line[1].split(" (",2)[0]
- next
- end
- mons = line[1].split("; ")
- size = mons.size()
- death = "Y"
- size.times() do |i|
- death = "" if(i == size - 1)
- mon = mons[i]
- mon = mon[1,mon.size()].split(" ",2)
- spec = (((8 + specs[mon[1]]) * mon[0].to_i()).to_f() / 50 + 5).to_i()
- puts("#{type} 0x#{line[0]} S#{i} D?#{death}") if(spec == ARGV[0].to_i())
- end
- end
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement