Raffle Permutations! menu

User Tag List

Results 1 to 2 of 2
  1. #1
    chancity's Avatar Legendary
    CoreCoins Purchaser
    Reputation
    686
    Join Date
    Jun 2012
    Posts
    1,153
    Thanks G/R
    27/341
    Trade Feedback
    11 (55%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Raffle Permutations!

    Wrote a script to show all the possible combinations for the raffle. It's pretty useless. Save it in a text document and change the documents extension to .vbs and double click....or open command prompt and run it with cscript.exe.

    Code:
    If Instr(1, WScript.FullName, "CScript", vbTextCompare) = 0 Then 
    	Dim objShell : Set objShell = CreateObject("WScript.Shell") 
    	objShell.Run "cmd.exe /k cscript //nologo """ & WScript.ScriptFullName, 1, False 
    	
    	WScript.Quit 
    Else 
    	Main()
    End If 
    Dim Count : Count = 0
    Private Sub Main()
    	Dim combos : combos = Array("1 ","2 ","3 ","4 ","5 ","6 ","7 ","8 ","9 ","10 ","11 ","12 ","13 ","14 ","15 ","16 ","17 ","18 ","19 ","20 ","21 ","22 ","23 ","24 ","25 ","26 ","27 ","28 ","29 ","30 ","31 ","32 ","33 ","34 ","35 ","36 ")
    	Premutation combos, 0, 2, ""
    	WScript.Echo vbCrlf & Count & "combinations"
    End Sub
    
    Private Sub Premutation(ArrString, Index, Max, str)
    	Dim i, k, NextStr
    	
    	For i = 0 To UBound(ArrString)
    		NextStr = str + ArrString(i)
    		If Index <> Max Then
    			Dim c : c = 0
    			ReDim NewArray(UBound(ArrString) - 1)
    			For k = 0 To UBound(ArrString)
    				If k <> i Then
    					NewArray(c) = ArrString(k)
    					c = c + 1
    				End If
    			Next
    			Premutation NewArray, Index + 1, Max, NextStr
    		Else
    			WScript.Echo NextStr
    			Count = Count + 1
    		End If
    	Next
    End Sub

    Raffle Permutations!
  2. Thanks N/A, Parog, Veritable (3 members gave Thanks to chancity for this useful post)
  3. #2
    Veritable's Avatar OwnedCore News Correspondent
    Reputation
    326
    Join Date
    Apr 2007
    Posts
    369
    Thanks G/R
    52/123
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's cool
    I just thought of a really neat idea.

    A website that would generate a PDF of Raffle Tickets (in pairs) that you could print off and use. The page generated would be based off of input that a user puts on a form.

    You could do something like:

    Select # Of Digits: [ 1 .. 12 ]
    Select Raffle Ticket Style: [ set of images ]
    [ Generate Button ]

    or you could do like


    Paste Data Set: [ Comma Separated Values List ]
    Select Raffle Ticket Style: [ set of images ]
    [ Generate Button ]

    Maybe will do something on it later tonight

Similar Threads

  1. Raffle section
    By Marauding Master in forum Suggestions
    Replies: 6
    Last Post: 03-24-2008, 12:07 AM
  2. Free Account Raffle (Moved)
    By Alicnicus in forum Community Chat
    Replies: 46
    Last Post: 03-21-2008, 08:13 AM
  3. [RAFFLE]Retail US WoW Account
    By C.C. in forum World of Warcraft General
    Replies: 87
    Last Post: 12-01-2007, 12:16 PM
  4. Raffle for Glider key
    By krazy12766 in forum World of Warcraft General
    Replies: 5
    Last Post: 08-09-2007, 08:24 PM
All times are GMT -5. The time now is 07:45 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search