Jump to content

LibertyMan

Active Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by LibertyMan

  1. Basically, Before downloading something for 50 days I would love to connect to there server and check if my key is good and working. - (Old Key IS MINE) * Would rather re-download then to re-buy for the money * * I've just got cheap now, Much rather check before downloading * After typing this out,.. It looks like i might still have to download then do some reverse engineering... I still might want to go about this, just for the learning part. I have no idea how to start this... Edit!!!! If this is any part of hacking, I'm very sorry I didn't know. But they do allow you to connect so? If im doing any wrong sorry looks legit to me. - Im not trying to change any server stuff, Just pulling and sending standard data.
  2. I'm very new to whatever Im about to tackle. I need to connect to a server check my key. Would TCP be my best-bet? sleepy and just want to make sure. -thanks
  3. Thank you Smashly but I've got it to work and even changed from select to switch For $i = 192 to $y ; 286 ; The Start For $j = 285 to $x ; 193 ; The End $test = PixelGetColor ($j,$i) Switch $test ToolTip(Hex($test,6)) Case Hex($test,6) = $Green ToolTip("Green") Sleep(3000) Case Hex($test,6) = $Yellow ToolTip("Yellow") Sleep(3000) _WriteLog() Case Hex($test,6) = $Purple ToolTip("Purple") Sleep(3000) Case Hex($test,6) = $White ToolTip("White") Sleep(3000) Case $test = $Blue ToolTip("Blue") Sleep(3000) Case Hex($test,6) = $Orange ToolTip("Orange") Sleep(3000) Case Hex($test,6) = $Red ToolTip("Red") Sleep(3000) EndSwitch Next Next
  4. Heh,.. forgot to add hex On $test Updating first post and changing to solved. Thank you.. Case $test = $Yellow ToolTip("Yellow") Sleep(3000) _WriteLog() Case $test = $Purple ToolTip("Purple") Sleep(3000) Case $test = $White ToolTip("White") Sleep(3000) Case $test = $Blue ToolTip("Blue") Sleep(3000) Case $test = $Orange ToolTip("Orange") Sleep(3000) Case $test = $Red ToolTip("Red") Sleep(3000) Case Else ToolTip("Cant Find Matching Color YET!") ;Sleep(4000) EndSelect EndIf Next Next
  5. Next Next should be at end... My problem is not that, updated first post so peoples may know. My problem is detecting the color... It's pulling the hex numbers, but not saying the color n text. Edited: Thought maybe I wrote the case wrong or something?... Case Hex($test,6) = hex(0X30E730,6) Tooltip("GREEN") Sleep(3000) and even Case $test = 30E730 Tooltip("GREEN") Sleep(3000)
  6. I must be doing wrong, help me please... It's not finding the color and running tooltip() The Color is there & the color is already in hex form... ;Pre-Set Colors! ---> Start Global $Green = "30E730" , $Yellow = "CACA2E" , $Purple = "D21CD2" , $White = "F7F7F7" , $Blue = "2289E2" , $Orange = "F69535" , $Red = "FE6161" ;End Pre-Set Colors --> End $x = 315 $y = 217 For $y2 = 192 to $y ; 286 ; The Start For $x2 = 285 to $x ; 193 ; The End $test = PixelGetColor ($x2,$y2) If Hex($test,6) = $Green Or $Yellow Or $Purple Or $White Or $Blue Or $Orange Or $Red Then Case $test = $Yellow ToolTip("Yellow") Sleep(3000) _WriteLog() Case $test = $Purple ToolTip("Purple") Sleep(3000) Case $test = $White ToolTip("White") Sleep(3000) Case $test = $Blue ToolTip("Blue") Sleep(3000) Case $test = $Orange ToolTip("Orange") Sleep(3000) Case $test = $Red ToolTip("Red") Sleep(3000) Case Else ToolTip("Cant Find Matching Color YET!") ;Sleep(4000) EndSelect EndIf Next Next
  7. This uses your Internet Explorer Browser but you can hide that.. _IECreate - AutoIt Help File ; ******************************************************* ; Example 1 - Create a browser window and navigate to a website ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("www.autoitscript.com") ; ******************************************************* ; Example 2 - Create new browser windows pointing to each of 3 different URLs ; if one does not already exist ($f_tryAttach = 1) ; do not wait for the page loads to complete ($f_wait = 0) ; ******************************************************* ; #include <IE.au3> _IECreate ("www.autoitscript.com", 1, 1, 0) _IECreate ("my.yahoo.com", 1, 1, 0) _IECreate ("www.google.com", 1, 1, 0) ; ******************************************************* ; Example 3 - Attempt to attach to an existing browser displaying a particular website URL ; Create a new browser and navigate to that site if one does not already exist ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("www.autoitscript.com", 1) ; Check @extended return value to see if attach was successful If @extended Then MsgBox(0, "", "Attached to Existing Browser") Else MsgBox(0, "", "Created New Browser") EndIf ; ******************************************************* ; Example 4 - Create an empty browser window and populate it with custom HTML ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate () $sHTML = "<h1>Hello World!</h1>" _IEBodyWriteHTML ($oIE, $sHTML) ; ******************************************************* ; Example 5 - Create an invisible browser window, navigate to a website, ; retrieve some information and Quit ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("http://sourceforge.net", 0, 0) ; Display the innerText on an element on the page with a name of "sfmarquee" $oMarquee = _IEGetObjByName ($oIE, "sfmarquee") MsgBox(0, "SourceForge Information", $oMarquee.innerText) _IEQuit ($oIE) ; ******************************************************* ; Example 6 - Create a browser window attached to a new instance of iexplore.exe ; This is often necessary in order to get a new session cookie context ; (session cookies are shared among all browser instances sharing the same iexplore.exe) ; ******************************************************* ; #include <IE.au3> ShellExecute ("iexplore.exe", "about:blank") WinWait ("Blank Page") $oIE = _IEAttach ("about:blank", "url") _IELoadWait ($oIE) _IENavigate ($oIE, "www.autoitscript.com")
  8. I hope they see there's no harm in this.. sorry if people think so. I just want to see how high i can actually get that score and make it even smarter later. Thought it would be a nice project to learn from. no harm done?
  9. EDIT: after im done ill post? Please don't flame me for asking something like this, & no I don't have any code yet. I would like to start off right. I just recently got my internet back up, but while I was offline bejeweled2 "game" became my friend. Now I would like to make something for this game, Something where it's going to auto play for that max score. You match any 3 colored jewels up which then pops where you gain some points & the stack falls and new one's are places on-top. " You can only move any jewel up, right, down, left, which you click on " I was thinking the basic: PixelSearch(left,top,right,bottom,color[,shade-variation[,step,[hwnd]]]) But how would i go about? A? Get ever jewels color on the screen save as some .txt file and so forth? Some help or idea would be nice. <Image>
  10. Thank you for the help, all of you!
  11. thank you, so if my work is in five .au3 files all #includes are on top of my main .Au3, Then Compile and anyone can run just the Main.Au3 on any computer? with out with out autoIt installed? Thank, again.
  12. In most scrip's you see #Include <GuiEdit.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListBoxConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Now my question is how can I put them with my program with out open source?.. Would i just build it all in one file or file install or something like that? would this be called Bundle.. im sure someone here can help me out. thanks -LibertyMan
  13. Yes Jchd, your right, and thank you. + for you trail's and error's gets the job done
  14. Thank you for trying to help me. Na, I already have the numbers there 0,-1,-2,-3,-4,-5,-6,...(-25) I want to change them like so, If $whatever = 0 then $whatever = 0 ElseIf $whatever = -1 then $whatever = 25 endif Do i have to do the same all the way through or something more simple like.. "Jchd" - I think your right but.. If $whatever > 0 then $Whatever = 26 + $Whatever Ill go test now.
  15. First thank you for looking at my topic, and i've been delete this over and over if $Whatever = 0 then $whatever = 0 ElseIf $Whatever = -1 then $Whatever = 25 ElseIf $Whater = -2 then $whatever = 24 EndIf Is there any way to speed this up? Some more simple few lines and not 50+ lines? Thanks, LibertyMan
  16. na, im not making any game. Im trying to learn new things by making my own auto complete task thing. After much tons of reading and still no sleep, I found atan was wrong but atan2 was what I i needed. * Still reading * and trying to learn so, Topic is still open
  17. anybody? Let me try and say better what im asking for. Im trying to learn Rotations in-game,. Say im facing Unknown or South -90, I want to turn North which is +90 then walk my distance to point B. The walking part is easy i belive with CurrentLoc and Target Loc i can watch this count down to zero which equals me being n that area, right? Im just stumped how to turn your player to the known Rot/Direction... Ive been using this: $result = atan(($posy1-$posy2)/($posx2-$posx1)) But... Im just so lost,
  18. Ill be honest, I dont understand this yet but im reading. I understand what you have wrote but not so much in AutoIt and math... Heres something else im going by another code snip. trying to understand this one as well... $radToDeg = -180 / $pi $result = atan(($posy1-$posy2)/($posx2-$posx1)) * $radToDeg if $posx2 < $posx1 Then if $result < 0 Then $result = 270 + $result Else $result = 270 + $result EndIf EndIf if $posx2 >= $posx1 Then if $result < 0 Then $result = 90 + $result Else $result = 90 + $result EndIf EndIf $result = $result-360 $result = floor(($result - $result) - $result) if $result = "360" Then $result = 0 EndFunc
  19. With none stop searching, I just cant find help on this. As said, I understand or at least want to belive i can comprehend some of this. If you can help me out on this, I could be just fine. Ax = Current Pos Bx = Targets Pos If $Bx > $Ax Then ;we need to head east-ish. Why would this be east,How would we know its not West or any other point? Is it because X is left and right which equal West and East & Y is up and down which equal North and South? And now how would we go about knowing The Target is North-East or South-East? Is it because If the Target is bigger it must be infront of us, and if its small then it must be behind us which in are terms equal to smaller? Please im new to this and trying to learn, If you want to call me names please do so, just tell me what im missing. Ill be here all night trying to learn this, Thanks.
  20. Im trying to rotate in my single player game, Which will then walk to the destination after the rotation is done. Thank you on some of the links, which im reading right now. This Would be the last code ive seen which should work but I would rather make my own learn and understand it. Heres the code anyways. Link Func DistAndDir( $Ax, $Ay, $CurHeading, $Bx, $By, $OutDistance, $OutHdgChange) ;assume X is positive-right, Y is positive-down ;heading is weird, see further down. ;distance is simple Pythagoras... ;Distance-squared = X-difference-squared + Y-difference-squared Local $XDiff = $Ax - $Bx Local $YDiff = $Ay - $By Local $DistanceSquared = ($XDiff * $XDiff) + ($YDiff * $YDiff) $OutDistance = Sqrt($DistanceSquared) ;now let's work out the bearing, which is based on ATan of the X- and Y-differences ;and then resolved into the appropriate quadrant Const $TO_DEGREES = 180 / (4 * ATan(1)) Local $QuadrantBearing = ATan($XDiff / $YDiff) * $TO_DEGREES Local $RealBearing If $Bx > $Ax Then ;we need to head east-ish If $By > $Ay Then ;we need to head southeast $RealBearing = 180 - $QuadrantBearing ElseIf $By = $Ay ;we need to head pure east $RealBearing = 090 Else ;we need to head northeast $RealBearing = $QuadrantBearing EndIf ElseIf $Bx = $Ax ;we need to head pure north/south If $By > $Ay Then ;we need to head south $RealBearing = 180 Else ;it's north $RealBearing = 000 EndIf Else ;we need to head west-ish If $By > $Ay Then ;we need to head southwest $RealBearing = 180 + $QuadrantBearing ElseIf $By = $Ay ;we need to head pure west $RealBearing = 270 Else ;we need to head northwest $RealBearing = 360 - $QuadrantBearing EndIf EndIf ;and finally work out the change in heading, in game-heading terms $OutHdgChange = $CurHeading - _dad_RealHeadingToGameHeading($RealBearing) ;ensure it's in +/-180 While $OutHdgChange >= 180 Do $OutHdgChange = $OutHdgChange - 360 While $OutHdgChange < -180 Do $OutHdgChange = $OutHdgChange + 360 EndFunc ;Real heading game-heading ; 000 -90 ; 090 +/-180 ; 180 +90 ; 270 000 Func _dad_GameHeadingToRealHeading( Const $GameHeading) Local $liResult $liResult = 270 - $GameHeading While $liResult >= 360 Do $liResult = $liResult - 360 While $liResult < 0 Do $liResult = $liResult + 360 Return $liResult EndFunc Func _dad_RealHeadingToGameHeading( Const $RealHeading) Local $liResult $liResult = -90 - $RealHeading While $liResult >= 180 Do $liResult = $liResult - 360 While $liResult < -180 Do $liResult = $liResult + 360 Return $liResult EndFunc
  21. I know this subject might have been asked and yes ive looked them over but theres things I still need to ask. To make this easy, Heres this so called list of what I might do... First we need to know: CurrentRot( N: 0 , S -90 , W: -180 & or W: 179, N: 0 & or 90 ) X,Y and Z(If theres one) Target/Targets X,Y and Z(If theres one) - Im pretty sure with this info, we might start.. $radToDeg = -180 / $pi $result = atan(($posy1-$posy2)/($posx2-$posx1)) * $radToDeg we used this to find the direction, right.. I understand after CurrentRot = $result then we can press W to walk forward till we reach ($CurrentLocX+$CurrentLocY),($ToposX+$ToposY) ; I have it for the most part or so I think, but i dont understand how we know which way North East South & West. Sorry if this post is wacked. Ive been trying to learn this for weeks and I know it shouldnt be this hard.
×
×
  • Create New...