"Guess the number"

  • ArtMaster
    20th Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • MasterMind555
    20th Nov 2011 Member 0 Permalink
    @ArtMaster (View Post)
    Do "Guess the element" with hints
  • ArtMaster
    20th Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • mniip
    20th Nov 2011 Developer 0 Permalink
    it thought there are no other ways to close TPT excep unpausing SOAP thingy
  • ArtMaster
    20th Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • keperitan
    20th Nov 2011 Member 0 Permalink
    Hack available. Basically the game is more user-friendly, produces 50 every time, you can't lose, you only need to play fewer times to win and you win infinitely more cash.

    num=50
    win=1
    tries=0
    hack=0

    tpt.message_box("Hello","Welcome to...".."'Guess the Number' ".."game")
    function mynum(inp)
          if (inp<0) or (inp>100) then
          tpt.message_box("ERROR","Out of bounds or invalid character.")
          num=50

          elseif inp>num then
          tries=tries+1      
          tpt.message_box("Wrong", "I rigged the game to produce 50 every time")
          num=math.random50

          elseif inp<num then
          resetwins()
          tries=tries+1
          tpt.message_box("Wrong", "I rigged the game to produce 50 every time")
          resetwins()
          num=50

          elseif inp==num then
          tpt.message_box("You won! ","Attempts:"..tries..", ".."Wins:"..win)
          win=win+1
          num=50
          reset()
        end
    end

    function tir()
        if hack=20 then
          tpt.message_box("Attempts end","Bye")
          os.exit()

          elseif win >= 5 then
          tpt.message_box("You won the game!","ArtMaster owes you".."$"..math.floor(100^os.clock()^os.clock()^os.clock())) 
          os.exit()
        end
    end

    function reset()
        tries=1
    end

    function resetwins()
        win=1
    end

    tpt.register_step(tir)
    tpt.register_step(mynum)