#----------------------------------------------------------------------------- # ☆ Cheat::Code[:cheating_is_baaddd__mkaayyyy] #----------------------------------------------------------------------------- # You may not want all cheat codes to reward the player. # This cheat will create a file to inform the player how bad cheating actually # is. It will then proceed to open the file an inordinate amount of times. # This is to ensure the user fully understands -> Cheating is bad, M'Kay? #----------------------------------------------------------------------------- Code[:cheating_is_baaddd__mkaayyyy] = { type: :trigger, keys: [:R,:X,:Y,:RIGHT,:UP]*2, call: Proc.new do # Makes File badaray = [*'a'..'z'] + [*'A'..'Z'] badstrg = "CHEATING IS BAD, M'KAY ??" badmkay = "badmkay.txt" File.open(badmkay,"w") do |file| 999.times do |id| if (rand > 0.5) file << badstrg else file << (0..rand(99)).reduce("") { |r| r << badaray.sample } end end end # Launches Notice to cheater. # make vbadstr true to open all notepads at once. # Personally, I think having to close one at a time is more inconvenient. vbadstr = false ? "start " : "" vbadkay = "#{vbadstr}notepad #{badmkay}" 99.times { system badmkay } end, }