7h331337 Posted July 24, 2008 Share Posted July 24, 2008 (edited) ok u no thos games when u shoot the screen well this i just the same but its in auto it EDIT: i fixed my mistake thanks to Andreik & Szhlopp for pointing it out EDIT:added monoceres idea with the moust and put a 1sec dalay on it so it lets u reload firstshoot.zip Edited July 24, 2008 by 7h331337 Link to comment Share on other sites More sharing options...
Szhlopp Posted July 24, 2008 Share Posted July 24, 2008 ok u no thos games when u shoot the screen well this i just the same but its in auto it Cool script! Change the "GUIcreate("", 49 48" to "48, 48" and you will eliminate the white bar on the right hand side of the bullet hole=) Func kick() $pos = MouseGetPos() GUICreate("", 48, 48, $pos[0] - 35, $pos[1] - 45, $ws_popup, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $gui) GUICtrlCreatePic(@ScriptDir & "\BulletHole.gif", 0, 0, 0, 0) SoundPlay(@ScriptDir & "\Pump Shotgun 68953.wav") GUISetState(@SW_SHOW) EndFunc ;==>kick RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
Andreik Posted July 24, 2008 Share Posted July 24, 2008 (edited) Funny muttley I don;t undestand this line GUICtrlCreatePic(@ScriptDir & "\Pump Shotgun 68953.wav", 0, 0, 0, 0) GuiCtrlCreatePic can use wav files? Edited July 24, 2008 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
7h331337 Posted July 24, 2008 Author Share Posted July 24, 2008 Funny muttley I don;t undestand this line GUICtrlCreatePic(@ScriptDir & "\Pump Shotgun 68953.wav", 0, 0, 0, 0) GuiCtrlCreatePic can use wav files?soz abt that lol cant belev i mist that lol i will delet it Link to comment Share on other sites More sharing options...
Szhlopp Posted July 24, 2008 Share Posted July 24, 2008 Funny muttley I don;t undestand this line GUICtrlCreatePic(@ScriptDir & "\Pump Shotgun 68953.wav", 0, 0, 0, 0) GuiCtrlCreatePic can use wav files? Yeah that one messed me up too. I just ignored it as the script worked LOL RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
gseller Posted July 24, 2008 Share Posted July 24, 2008 Cool!! I Love it! Get rid of frustration... Link to comment Share on other sites More sharing options...
monoceres Posted July 24, 2008 Share Posted July 24, 2008 (edited) Fun idea, however.. Add this to shoot with the mouse: #include <misc.au3> ;..... While 1 If _IsPressed("01") Then kick() Sleep(25) WEnd And for Christ sake, sleep your main loop muttley Edited July 24, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
smashly Posted July 24, 2008 Share Posted July 24, 2008 Rock'n , Nice work, luv it.. Buwahaha muttley Thank You#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}", "_Quit") HotKeySet("{space}", "_Shoot") While 1 Sleep(10) WEnd Func _Shoot() $pos = MouseGetPos() GUICreate("", 48, 48, $pos[0] - 24, $pos[1] - 24, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic(@ScriptDir & "\BulletHole.gif", 0, 0, 0, 0) SoundPlay(@ScriptDir & "\Pump Shotgun 68953.wav") GUISetState(@SW_SHOW) EndFunc Func _Quit() Exit EndFunc Cheers Link to comment Share on other sites More sharing options...
Paulie Posted July 24, 2008 Share Posted July 24, 2008 (edited) Some minor changes: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}", "Quit") HotKeySet("{space}", "kick") HotKeySet("{END}", "Clear") Global $Window[1] Global $Count = 0 While 1 Sleep(100) WEnd Func Quit() Exit EndFunc ;==>main Func kick() HotKeySet("{SPACE}", "Filler") $Count += 1 ReDim $Window[$Count] $pos = MouseGetPos() $Window[$Count - 1] = GUICreate("", 48, 48, $pos[0] - 24, $pos[1] - 24, $ws_popup, BitOR($ws_ex_layered, $ws_ex_toolwindow)) GUICtrlCreatePic(@ScriptDir & "\BulletHole.gif", 0, 0, 48,48) SoundPlay(@ScriptDir & "\Pump Shotgun 68953.wav") GUISetState(@SW_SHOW) HotKeySet("{SPACE}", "Kick") EndFunc ;==>kick Func Filler() EndFunc ;==>Filler Func Clear() For $X = UBound($Window) - 1 To 0 Step -1 GUIDelete($Window[$X]) Next $Count = 0 EndFunc ;==>Clear Edited July 24, 2008 by Paulie Link to comment Share on other sites More sharing options...
newbiescripter Posted July 24, 2008 Share Posted July 24, 2008 (edited) Nice Script I made this little change: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> Global $Window[1] Global $devil, $randomX, $randomY Global $Count = 0 Global $sizeX = 100, $sizeY = $sizeX *1.25 HotKeySet("{ESC}","_Terminate") HotKeySet("{END}", "_Clear") _setDevil() While 1 If _IsPressed("01") Then _Shoot() Sleep(25) WEnd Func _Shoot() $Count += 1 ReDim $Window[$Count] $pos = MouseGetPos() $Window[$Count - 1] = GUICreate("", 48, 48, $pos[0] - 24, $pos[1] - 24, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic(@ScriptDir & "\BulletHole.gif", 0, 0, 0, 0) SoundPlay(@ScriptDir & "\Pump Shotgun 68953.wav") GUISetState(@SW_SHOW) If (_hitIt($pos[0],$pos[1]) == True) Then TrayTip("Nice Shot!!!","You killed a devil..",10) GUIDelete($devil) _setDevil() Else TrayTip("Bad Shot!!!","Kill the devil your bastard..",10) EndIf Sleep(800) EndFunc Func _Clear() For $X = UBound($Window) - 1 To 0 Step -1 GUIDelete($Window[$X]) Next $Count = 0 EndFunc Func _setDevil() $randomX = Random(0+$sizeX,@DesktopWidth-$sizeX,1) $randomY = Random(0+$sizeY,@DesktopHeight-$sizeY,1) $devil = GUICreate("", $sizeX, $sizeY, $randomX, $randomY, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST)) GUICtrlCreatePic(@ScriptDir & "\DevilHead.gif",0,0,$sizeX,$sizeY) GUISetState(@SW_SHOW) EndFunc Func _hitIT($x,$y) If ($randomX+$sizeX/8 < $x And $x < $randomX+$sizeX-$sizeX/8 And $randomY+$sizeY/8 < $y And $y < $randomY+$sizeY-$sizeY/8) Then Return True Else Return False EndIf EndFunc Func _Terminate() TrayTip("","",10) Exit EndFuncoÝ÷ Ù¦zfÞ®Ú£ 塧mè"}ø¥zÆ¥²^ªÝ°@ÈM©§¶¥¢pØm+-¢f¤z+Z+mé¨çî«¢+Ù]¡¥±Ä(}ÍÑÙ¥° ¤(%]¡¥±¡5½¡M°Ì¤±ÐìÐìÀ¤($%%}%ÍAÉÍÍ ÅÕ½ÐìÀÄÅÕ½Ðì¤Q¡¸}M¡½½Ð ¤($%M±À ÈÔ¤(%]¹(%U%±Ñ ÀÌØíÙ¥°¤(%M±À ÄÀÀÀ¤)]¹ Edited July 25, 2008 by newbiescripter Link to comment Share on other sites More sharing options...
7h331337 Posted July 25, 2008 Author Share Posted July 25, 2008 wow the devil is great idea that is so fun Link to comment Share on other sites More sharing options...
DexterMorgan Posted July 25, 2008 Share Posted July 25, 2008 This is great code Link to comment Share on other sites More sharing options...
someone Posted July 25, 2008 Share Posted July 25, 2008 (edited) I think this is really cool, I modified it a bit to pull randomly from different pics and give you a few weapon choices. Just download and unzip the Images folder and put it in the same place as the script. I can't search around right now for differnt sound bites so I just commented the sound clip out. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> #include <Array.au3> #Include <File.au3> HotKeySet("{ESC}", "Quit") HotKeySet("{space}", "Shoot") HotKeySet("{1}", "Filler") HotKeySet("{2}", "Filler") HotKeySet("{3}", "Filler") HotKeySet("{4}", "Filler") Global $Window[1] Global $Count = 0 Global $Weapon = "Pistol" Global $aBBGun Global $aPistol Global $aShotgun Global $aHammer Global $ImagesDir = @ScriptDir & "\Images\" Images($aBBGun, $aPistol, $aShotgun, $aHammer) Global $aWeapon = $aPistol While 1 Sleep(10) Select Case _IsPressed("01") Shoot() Case _IsPressed("31") ; 1 key $aWeapon = $aBBGun $Weapon = "BBGun" ToolTip("Eh, today is OK", Default, Default, "BB Gun") Case _IsPressed("32") ; 2 key $aWeapon = $aPistol $Weapon = "Pistol" ToolTip("Today sucks", Default, Default, "Pistol") Case _IsPressed("33") ; 3 key $aWeapon = $aShotgun $Weapon = "Shotgun" ToolTip("Stupid world", Default, Default, "Shotgun") Case _IsPressed("34") ; 4 key $aWeapon = $aHammer $Weapon = "Hammer" ToolTip("All work and no play makes Homer something something", Default, Default, "Hammer") EndSelect WEnd Func Quit() Exit EndFunc ;==>main Func Shoot() HotKeySet("{SPACE}", "Filler") $Count += 1 ReDim $Window[$Count] $pos = MouseGetPos() $Window[$Count - 1] = GUICreate("", 48, 48, $pos[0] - 24, $pos[1] - 24, $ws_popup, BitOR($ws_ex_layered, $ws_ex_toolwindow, $WS_EX_TOPMOST)) $Random = Random(1, $aWeapon[0], 1) GUICtrlCreatePic($ImagesDir & $Weapon & "\" & $aWeapon[$Random], 0, 0, 48, 48) ;GUICtrlCreatePic(@ScriptDir & "\BulletHole.gif", 0, 0, 48,48) GUISetState(@SW_SHOW) ;SoundPlay(@ScriptDir & "\Pump Shotgun 68953.wav", 1) HotKeySet("{SPACE}", "Shoot") ToolTip("") EndFunc ;==>Shoot Func Filler() EndFunc ;==>Filler Func Clear() For $X = UBound($Window) - 1 To 0 Step -1 GUIDelete($Window[$X]) Next $Count = 0 EndFunc ;==>Clear Func Images(ByRef $aBBGun, ByRef $aPistol, ByRef $aShotgun, ByRef $aHammer, $Dir = $ImagesDir) $aBBGun = _FileListToArray($Dir & "BBGun", "*", 1) ;_ArrayDisplay($aBBGun, "BBGun") $aPistol = _FileListToArray($Dir & "Pistol", "*", 1) ;_ArrayDisplay($aPistol, "Pistol") $aShotgun= _FileListToArray($Dir & "Shotgun", "*", 1) ;_ArrayDisplay($aShotgun, "Shotgun") $aHammer = _FileListToArray($Dir & "Hammer", "*", 1) ;_ArrayDisplay($aHammer, "Hammer") EndFunc Very cool 7h331337!! Edited August 1, 2008 by someone While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
7h331337 Posted July 25, 2008 Author Share Posted July 25, 2008 IT WHONT SHOOT OR PLAY SOUD Link to comment Share on other sites More sharing options...
sensalim Posted July 25, 2008 Share Posted July 25, 2008 I get an error on line 61, subscript used with non-Array variable... Link to comment Share on other sites More sharing options...
sensalim Posted July 25, 2008 Share Posted July 25, 2008 The one with devilhead works. Though "Kill the devil your bastard.." should be changed to "Kill the devil, you bastard..." Link to comment Share on other sites More sharing options...
someone Posted July 25, 2008 Share Posted July 25, 2008 I would guess what is happening for you is the _filelisttoarray isn't finding its target... is the script in the same directory as the folder? (but not in the folder?) I disabled the sound (commented line 65), but can you be more descriptive? I didn't change the code that much... I tried running the code with 3.2.12 and 3.2.13.5 and it worked fine While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
sensalim Posted July 25, 2008 Share Posted July 25, 2008 (edited) Ok it works now. The zip (or rar, whatever) extracted as Images\Images\ I just moved them and now it works. Cool job! Now to find appropriate .wav files... Edit: Would be nice to have different delay for each weapon. Pistol: 100 (milli second) BB gun and shotgun: 1000 Hammer: 2000 How about ammo? (unlimited of course, I meant reload delay). Edited July 25, 2008 by sensalim Link to comment Share on other sites More sharing options...
someone Posted July 25, 2008 Share Posted July 25, 2008 (edited) The delay could be handled a few ways... I *think* it might work best to use the sound clip as a delay. If you uncomment the soundplay line, you'll notice the script halts until the clip is finished playing. I think that could work well as you could control the delay in each weapon... hard to say without some testing though. I think reloading could be cool, but then you have to get into some kind of display to tell you how many bullets left... so I avoided it. Would be cool though. What I would really like is a better way of controlling how big the picture is. I'm not sure how you could do that without a lot of messy code. Sure theres a way I'm not thinking of PS Anyone catch the, 'all work and no play make homer something something'? I can't remember if thats the exact quote or not but any US tv fans should know where that comes from Edited July 25, 2008 by someone While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd Link to comment Share on other sites More sharing options...
sensalim Posted July 25, 2008 Share Posted July 25, 2008 Yes I notice that. Simpsons. Found any audio clips yet ? 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