1. Welcome to SMT Gaming! Please create an account and take a look around! :D
    Dismiss Notice

Archived Free Forum Raffle (Closed)

Discussion in 'General Discussion' started by Emunator, Oct 4, 2016.

How many times should the program run through the names.

  1. 100

    25.0%
  2. 500

    0 vote(s)
    0.0%
  3. 1000

    0 vote(s)
    0.0%
  4. 10000

    75.0%
  1. Emunator

    Emunator Junior Trade Moderator Forum Moderator [Lifetime Donor]

    Aug 23, 2016


    Hey guys!

    I'm bored and have 3 Mayflower Mercenary cosmetics I have never used, so I'm giving them away in a raffle.

    How I'm determining the winner:
    To determine the winner, I'm going to collect all the names of people who enter. After I'm satisfied with the number of people, I'm going comment the entries are closed and create a program with all your names listed, and have the program randomly select names randomly a number a times. (Not sure how many times, and yes, im bored)) Each time your name is selected, you'll receive 1 point/vote to your name. Person with the most wins!

    The Prize:
    -3 cosmetics worth together about 7 ref.
    -I'm probably gonna run the program again if enough people, and the winner of the 2nd round will get 3-5 ref, possible a 3rd time if there is even more entries.

    How to enter:
    Just simply comment below saying you want to enter, or whatever. Once I'm satisfied I have enough people I'll comment saying entries are closed and I'll begin.

    So yeah, you have nothing to lose, comment and enter! Please
    The more people the better!
     
  2. Makaveli

    Makaveli TF2 Rapid Fire Manager Division Manager Development Team Junior Trade Moderator Forum Moderator

    May 27, 2016


    EmuChamp.
     
    • Like Like x 1
    • Quirky

      Quirky Senior Server Moderator

      Apr 12, 2016


    • Enstage

      Enstage Owner

      Feb 17, 2015


      Wew, I'm here.


      I'm bored too, so I wrote a PHP thingo to do this (pseudo)randomly.

      ignore my stfu operator
      PHP:
      <?php
      $names
      =['name1','name2','name3'];
      $scores=[];
      for(
      $i=0;$i<10000;$i++)@$scores[$names[mt_rand(0,count($names)-1)]]++;
      print_r($scores);
       
      • Informative Informative x 1
      • Cenden

        Cenden Retired

        May 14, 2016


      • Boxinvader

        Boxinvader Active Member

        Jul 4, 2016


      • Shadoo

        Shadoo Retired

        Feb 16, 2016


      • Emunator

        Emunator Junior Trade Moderator Forum Moderator [Lifetime Donor]

        Aug 23, 2016


        Yay for people commenting! :innocent::innocent:


        My code is similar in GML, I could use a for statement to replace the ugly if statements in my code, but no need for optimization in a simple small program.
        Code:
        if votecount<1000
        {
            randomize() //This randomizes the seed
            vote=choose(1,2,3,4) ;
            if vote=1{Name1+=1} ;
            if vote=2{Name2+=1} ;
            if vote=3{Name3+=1} ;
            if vote=4{Name4+=1} ;
            votecount+=1
        } ;
        
        And it'd come out like this with just the small code above^
        Ofcoarse when I make the real thing I'll be making a bigger window and making it look nice, with peoples avatars+names with some simple graphics along with who is the winner and stuff. Also the values/outcome will be drastically different with more people in the mix.
         
      • Enstage

        Enstage Owner

        Feb 17, 2015


        I have never seen GML before...why are IF statements acting like loops here? Or have you got a loop outside the portion you copied and this is the part thats being looped over? Certainly looks like that would be the case.
         
      • Emunator

        Emunator Junior Trade Moderator Forum Moderator [Lifetime Donor]

        Aug 23, 2016


        I made it into a loop lol.
        I should use for() to do it properly or even repeat() (Repeat loops it, but it loops it instantly in gml)
        But yeah, cbf to optimize atm, 2am just to show you :sleeping:
         
      • Enstage

        Enstage Owner

        Feb 17, 2015


        This makes no sense to me.

        Have you looped it like, from console (I'm assuming GML is CLI)...yet somehow the script is maintaining scope..?
         
      • Emunator

        Emunator Junior Trade Moderator Forum Moderator [Lifetime Donor]

        Aug 23, 2016


        Theres 2 other scripts maintaining the scopes and value to stop it from throwing "WTF IS THIS VALUE?!?!" I only showed the main one thats actually generating the votes.
         
      • Enstage

        Enstage Owner

        Feb 17, 2015


        Right, OK. Good to know.
         
      • Kool

        Kool [Lifetime Donor]

        Dec 10, 2015


        Ok I'll join



        I'M IN BOI
         
      • ATOMIC

        ATOMIC New Member

        Oct 5, 2016


        I was forced to join ;-;
         
        • Like Like x 1
        • Funny Funny x 1
        • Ellie Goulding

          Ellie Goulding [Lifetime Donor]

          Apr 1, 2016


          I was told there was free candy here?
           
          • Like Like x 1
          • Enstage

            Enstage Owner

            Feb 17, 2015


            first post for first rank

            ok sorry bad joke
             
            • Like Like x 1
            • Funny Funny x 1
            • Emunator

              Emunator Junior Trade Moderator Forum Moderator [Lifetime Donor]

              Aug 23, 2016


              Okay, I'm accepting no more entries.
              I'm going to create it and start it now.

              My next comment will show the 3 winners once they have been chosen!
               
              • Like Like x 1
              • Enstage

                Enstage Owner

                Feb 17, 2015


                gg guys i win
                 
                • Funny Funny x 1