JRowe Posted April 30, 2009 Share Posted April 30, 2009 How about in real 3D? I'm skinning the machine chassis and the arm, the wheels already spin when you click on the arm. Script, models, downloads, etc, later today. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Valuater Posted April 30, 2009 Share Posted April 30, 2009 @WideBoy... Nice Job!! @JRowe, looking forward to it!! 8) Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2009 Share Posted April 30, 2009 (edited) Download the spinning 3D slot machine (with no game yet, I'm still working out how to get that part.)Click on the handle to make the wheels spin. Esc, Q, q quits out. There seems to be some sort of odd bug causing a crash on certain clicks.GUIGetCursorInfo() Causing a crash for click testing. I'm looking for a different method now. Just don't do a bunch of random clicking and it will display nicely, though. lol... Edited April 30, 2009 by JRowe [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Valuater Posted April 30, 2009 Share Posted April 30, 2009 That's pretty cool, neat effect. Yours looks more like the "older" one arm bandit, WideBoys looks more like a "modern" digital style. The arm looks awesome when it bounces and snaps back into position, but it doesn't need to spin ( looks a little cheesy) cool guys!! 8) Link to comment Share on other sites More sharing options...
JRowe Posted April 30, 2009 Share Posted April 30, 2009 Thanks! Lol, I thought the arm spinning was kinda neat. The snap-back was an unintended result, turned out well though. Anyway, here's the fixed machine.au3 : CODE #include <GUIConstants.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <WINAPI.au3> #include "IrrlichtPluginUtils.au3" #Include <Misc.au3> Opt("MouseCoordMode", 2) HotKeySet("{ESC}", "Terminate") HotKeySet("{Q}", "Terminate") HotKeySet("{q}", "Terminate") #Region - GUI Create $gui = GUICreate("One Armed Bandit", 1024, 768, -1, -1, -1, $WS_EX_LAYERED) GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($gui, 0x010101) CreateDeviceOnWindow( $gui, $EDT_BURNINGSVIDEO, 10, 10, 1024, 768, 32, 0, 0 ) GUISetState() WinSetOnTop("One Armed Bandit", "", 1) Global $Reel[4] Global $Pot = IniRead("SlotWinnings.ini", "Pot", "Pot", "1000") Global $BackGround = 0xD8A308 Global $WhiteColor = 0xFFFFFF Global $MAXBET = 10 $Points = "" $Bet = 0 $Credits = $Pot $Wheel1IsTurning = 0 $Wheel2IsTurning = 0 $Wheel3IsTurning = 0 ;Getting meshs $MachineMesh = GetMesh( "Machine.obj" ) $ArmMesh = GetMesh( "Arm.obj" ) $WheelMesh = GetMesh( "Wheel2.obj") $Machine = AddMeshSceneNode( $MachineMesh ) $Arm = AddMeshSceneNode( $ArmMesh ) SetPosition($Arm, 0, 0, 4) SetRotation( $Arm, 0, 90, 0 ) $Wheel1 = AddMeshSceneNode( $WheelMesh ) SetScale( $Wheel1, .73, .73, .73 ) SetPosition($Wheel1, 0, 0, -2.4) SetRotation( $Wheel1, 0, 90, 0 ) $Wheel2 = AddMeshSceneNode( $WheelMesh ) SetScale( $Wheel2, .73, .73, .73 ) SetPosition($Wheel2, 0, 0, -.10) SetRotation( $Wheel2, 0, 90, 0 ) $Wheel3 = AddMeshSceneNode( $WheelMesh ) SetScale( $Wheel3, .73, .73, .73 ) SetPosition($Wheel3, 0, 0, 2.3) SetRotation( $Wheel3, 0, 90, 0 ) SetPosition($Machine, 0, -12, 0) SetRotation( $Machine, 0, 90, 0 ) $Camera = AddCameraSceneNode( 0, 20, 0, 0, 0, 0, 0 ) SetMaterialFlag( $Wheel1, $EMF_LIGHTING, 0 ) SetMaterialFlag( $Wheel2, $EMF_LIGHTING, 0 ) SetMaterialFlag( $Wheel3, $EMF_LIGHTING, 0 ) SetMaterialFlag( $Machine, $EMF_LIGHTING, 0) SetMaterialFlag( $Arm, $EMF_LIGHTING, 0 ) #Region - GUI SelectLoop GUISetStyle($WS_POPUP, -1, $gui) _WinAPI_SetLayeredWindowAttributes($gui, 0xABCDEF, 255) $Y = 0 $ArmRotation = 0 $Rotations1 = 0 $Rotations2 = 0 $Rotations3 = 0 $WheelsTurning = 0 $Wheel1Rate = 24 $Wheel2Rate = 24 $Wheel3Rate = 24 While IrrRun( ) $Y = $Y + 1 If $Y >15 Then $Y = 0 If $Wheel1IsTurning = 1 Then $WheelsTurning = 1 EndIf If $Wheel2IsTurning = 1 Then $WheelsTurning = 1 EndIf If $Wheel2IsTurning = 1 Then $WheelsTurning = 1 EndIf $mousePos = MouseGetPos() If GetSceneNodeFromScreenCoordinatesBB( $mousePos[0], $mousePos[1]) = $Arm Then If _IsPressed("01") And $WheelsTurning = 0 Then ;MsgBox(0,"Woot", "Worked") ArmPulled() EndIf EndIf If $Wheel1IsTurning = 1 Then SetRotation( $Wheel1, 0, 90, -$Wheel1Rate*$Rotations1 ) EndIf If $Wheel2IsTurning = 1 Then SetRotation( $Wheel2, 0, 90, -$Wheel2Rate*$Rotations2 ) EndIf If $Wheel3IsTurning = 1 Then SetRotation( $Wheel3, 0, 90, -$Wheel3Rate*$Rotations3 ) EndIf SetRotation( $Arm, 0, 90, -$Y*$ArmRotation ) BeginScene( true, true, 0, 171, 205, 239 ) SceneDraw( ) GuiDraw( ) EndScene( ) Sleep(10) If $Rotations1 > 1 Then $Wheel1IsTurning = 1 If $Rotations2 > 1 Then $Wheel2IsTurning = 1 If $Rotations3 > 1 Then $Wheel3IsTurning = 1 If $Rotations1 > 1 Then $Rotations1 = $Rotations1 - 1 If $Rotations2 > 1 Then $Rotations2 = $Rotations2 - 1 If $Rotations3 > 1 Then $Rotations3 = $Rotations3 - 1 If $Rotations1 <= 1 Then $Wheel1IsTurning = 0 If $Rotations2 <= 1 Then $Wheel2IsTurning = 0 If $Rotations3 <= 1 Then $Wheel3IsTurning = 0 If $Wheel1IsTurning = 0 And $Wheel2IsTurning = 0 And $Wheel3IsTurning = 0 Then $WheelsTurning = 0 EndIf $ArmRotation = $ArmRotation - 1 If $ArmRotation <= 0 Then $ArmRotation = 0 WEnd Func _WinAPI_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $dwFlages = 0x03, $isColorRef = False) If $dwFlages = Default Or $dwFlages = "" Or $dwFlages < 0 Then $dwFlages = 0x03 If Not $isColorRef Then $i_transcolor = Hex(String($i_transcolor), 6) $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2)) EndIf Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $dwFlages) Select Case @error Return SetError(@error, 0, 0) Case $Ret[0] = 0 Return SetError(4, _WinAPI_GetLastError(), 0) Case Else Return 1 EndSelect EndFunc;==>_WinAPI_SetLayeredWindowAttributes Func ArmPulled() If $Rotations1 <= 1 Then $Rotations1 = Random(10,200,1) EndIf If $Rotations2 <= 1 Then $Rotations2 = Random(10,200,1) EndIf If $Rotations3 <= 1 Then $Rotations3 = Random(10,200,1) EndIf $ArmRotation = 90 EndFunc Func Terminate() IniWrite("SlotWinnings.ini", "Pot", "Pot", $Credits) Exit 0 EndFunc No more crashing. All that's here is basic spin tests and a randomly timed spin function. There are 15 separate "slots" on each wheel, 3 each of the 7, cherry, bar, 2bar, and 3bar. [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
billthecreator Posted May 4, 2009 Author Share Posted May 4, 2009 Brand new version: Actual Reels that spin. New design too. I will be working on a design that looks like a slot machine, im just releasing this now. Notice. it is very very hard now to get points. (not as easy anymore) [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
gseller Posted May 4, 2009 Share Posted May 4, 2009 OK, WOW! That is cool! I am sleepy tho and did not see in your code, how/where are you controlling the speed of the reels. they spin a little long for me.. LOL Link to comment Share on other sites More sharing options...
WideBoyDixon Posted May 4, 2009 Share Posted May 4, 2009 I'd really like to take a look at this but I can't because the reels don't display *at all* for me WBD [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
billthecreator Posted May 5, 2009 Author Share Posted May 5, 2009 (edited) for some reason, that happened to someone else. i think i did something wrong with the new script. i need to look at it thoroughly. and for some reason, i can see the reels... WEIRD Edited May 5, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
billthecreator Posted May 5, 2009 Author Share Posted May 5, 2009 Ok. problem fixed. If you dont have the new font, it will install it for you. And the problem that the reels weren't showing is fixed. [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
BigDod Posted May 6, 2009 Share Posted May 6, 2009 Ok. problem fixed.If you dont have the new font, it will install it for you.And the problem that the reels weren't showing is fixed.No reels here but that could be because bmp's not included in download. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
billthecreator Posted May 6, 2009 Author Share Posted May 6, 2009 No reels here but that could be because bmp's not included in download.I think i fixed the problem you were having... i uploaded the new version on first post. [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
BigDod Posted May 6, 2009 Share Posted May 6, 2009 I now have reels but are there supposed to be blanks on the reels. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
billthecreator Posted May 6, 2009 Author Share Posted May 6, 2009 (edited) I now have reels but are there supposed to be blanks on the reels.i put a lost file extractor on there. try using that to get the files. if that doesnt work. delete all the files from the directories, and run it again. maybe that will work..EDIT:I think i miss-read your post. are you asking if there are supposed to be blanks, or aren't there supposed to be blank, (like they're not there, and they should be)? Edited May 6, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
billthecreator Posted May 15, 2009 Author Share Posted May 15, 2009 Version 7.0.0.10 New Layout Background changes to the time of day [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
Achilles Posted May 15, 2009 Share Posted May 15, 2009 Colors.au3? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
billthecreator Posted May 15, 2009 Author Share Posted May 15, 2009 (edited) sorry. you dont need that au3. so the either delete the include, or get the new version... sorry about that Edited May 15, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
aphesia Posted June 21, 2009 Share Posted June 21, 2009 hmm i´m getting this error: line 404 (file "...\slotmachine\include\bass.au3" ) return seterror(0 "" , $bass_ret_[0]) return seterror(0 "" , $bass_ret_ÊRROR error: subscript used with non-array variable whats the problem? Link to comment Share on other sites More sharing options...
billthecreator Posted June 21, 2009 Author Share Posted June 21, 2009 hmm i´m getting this error: line 404 (file "...\slotmachine\include\bass.au3" ) return seterror(0 "" , $bass_ret_[0]) return seterror(0 "" , $bass_ret_ÊRROR error: subscript used with non-array variable whats the problem? I have no idea. ill take a look.... [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now