Go Back   UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats > Anti-Cheat Software & Programming > Visual Basic

- Sponsored Advertisement -
http://www.myfpscheats.com/

Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Visual Basic
hacking programming reversing
You are Unregistered, please register to gain Full access.    
Reply
 
Thread Tools

Lottery Number Picker
Old 02-14-2010, 05:53 AM   #1
n00bie

charlie6696's Avatar

Join Date: Feb 2010
Posts: 9
Reputation: 296
Rep Power: 27
charlie6696 has just realized Linux>Windowscharlie6696 has just realized Linux>Windowscharlie6696 has just realized Linux>Windows
Lottery Number Picker

I wanted to make a lottery number picker, i have it working except for the fact that you can't have two of the same numbers in you pick, so can anyone tell me a way to avoid having two of the same numbers.

UC-Downloads - Multiplayer Game Hacking and Cheat Downloads - VB lottery number picker
charlie6696 is offline

Reply With Quote


Old 02-14-2010, 04:32 PM   #2
Level 3

mandai's Avatar

Join Date: May 2007
Location: UK
Posts: 433
Reputation: 1953
Rep Power: 85
mandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating community
Major Slant Champion
Try adding the numbers you are going to use to a list, then after each add check through to see if they already exist in it.

Code:
Dim numbers As List(Of Integer) = New List(Of Integer)
again:
Dim mynum As Integer = 0 'next number example
 
If (numbers.Contains(mynum)) Then
 'make mynum equal something else
 GoTo again
Else
 numbers.Add(mynum)
EndIf
 
For i As Integer = 0 To numbers.Count - 1
 Console.WriteLine("Number " & i & " is " & numbers(i))
Next

Last edited by mandai; 02-14-2010 at 04:34 PM.
mandai is offline

Reply With Quote

Old 02-14-2010, 04:53 PM   #3
Posting Well

DrewDrops's Avatar

Join Date: Feb 2010
Posts: 26
Reputation: 10
Rep Power: 25
DrewDrops has made posts that are generally average in quality
how about using rand() ?
DrewDrops is offline

Reply With Quote

Old 02-14-2010, 11:13 PM   #4
Level 3

mandai's Avatar

Join Date: May 2007
Location: UK
Posts: 433
Reputation: 1953
Rep Power: 85
mandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating community
Major Slant Champion
Yes the mynum is an example. You can make it equal Random.Next(x, y) and you should get your expected results.

Well also you will have to put in your loop and make it finish after the maximum number of numbers per entry etc but this is just to show how to add numbers to a list then check if one matches whats already in it.

Last edited by mandai; 02-14-2010 at 11:17 PM.
mandai is offline

Reply With Quote

Old 02-14-2010, 11:39 PM   #5
Level Neo-Nazi

Big Dave's Avatar

Join Date: May 2007
Location: ˙sʇǝuɹǝʇuı ǝɥʇ
Posts: 1,122
Reputation: 44174
Rep Power: 522
Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!Big Dave has a huge epeen!
Recognitions:
The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote by UnKnoWnCheaTs staff, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community. Member of the Month
Points: 33,198, Level: 27
Points: 33,198, Level: 27 Points: 33,198, Level: 27 Points: 33,198, Level: 27
Activity: 1.1%
Activity: 1.1% Activity: 1.1% Activity: 1.1%
Last Achievements
I approved your file.
__________________
http://i49.tinypic.com/j993tj.png


CSS hax: 0% AAO hax: 0%
Gaying up my signature with pointless progress meters in a vain attempt to show off: 100%
Big Dave is offline

Reply With Quote

Old 02-15-2010, 10:16 PM   #6
Level 3

mandai's Avatar

Join Date: May 2007
Location: UK
Posts: 433
Reputation: 1953
Rep Power: 85
mandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating communitymandai is an oracle in the cheating community
Major Slant Champion
Ok I just got a look at your source and my main question is why so many switch case options? I almost wonder if its worth making a program just to generate those sequences of code.

And whats with the (Rnd() * x) for? are you trying to set some sort of range? If so I'd recommend using Random.Next(minimum, maximum). Also can't you just use keyX.ToString() when putting the numbers in the textboxes?.

I'd make this in 2 mins but I have no idea what your minimum/maximum ranges are.
mandai is offline

Reply With Quote

Old 03-12-2010, 01:40 PM   #7
n00bie

sheepking's Avatar

Join Date: Mar 2010
Posts: 6
Reputation: 10
Rep Power: 24
sheepking has made posts that are generally average in quality
I don't know what I'm talking about but don't you mean something like this:

Code:
dim lotterynumber1 as byte
dim lotterynumber2 as byte
'.
'.
'.

if lotterynumber2 = lotterynumber1 then 'Means if lotterynumber2 is the same as lotterynumber1 the program rolls lotterynumber2 again?
lotterynumber2 = random.next(x, y)
else
end if
or something like this just with every combination of those numbers? xD

Last edited by sheepking; 03-12-2010 at 01:43 PM.
sheepking is offline

Reply With Quote
Reply  

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit



Tags
lottery, number, picker
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 07:46 AM.