Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2011
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Process priority, , Realtime
  2. SendMode Input
  3. SetFormat float, 0.14
  4.  
  5.  
  6. dec2hex(n) {
  7.    oIF := A_FormatInteger
  8.    SetFormat,Integer, hex
  9.    n := StrLen(n+0) ? n+0 : n
  10.    SetFormat,Integer, % oIF ; %
  11.    return n
  12. }
  13.  
  14. HexToFloat(d) {
  15.     global
  16.       Return (1-2*(d>>31)) * (2**((d>>23 & 255)-127)) * (1+(d & 8388607)/8388608) ; 2**23
  17. }
  18.  
  19. FloatToHex(f) {
  20.    form := A_FormatInteger
  21.    SetFormat Integer, HEX
  22.    v := DllCall("MulDiv", Float,f, Int,1, Int,1, UInt)
  23.    SetFormat Integer, %form%
  24.    Return v
  25. }
  26.  
  27. hex2dec(n) {
  28.    x := ((substr(n,1,2)!="0x") ? "0x" : "") n
  29.    if ! StrLen(x+0)
  30.       return n
  31.    oIF := A_FormatInteger
  32.    SetFormat,Integer, d
  33.    x += 0
  34.    SetFormat,Integer, % oIF ;%
  35.    return x
  36. }
  37.  
  38. float2dec(f) {
  39. global
  40. h := floattohex(f)
  41. d := hex2dec(h)
  42. return d
  43. }
  44.  
  45. dec2float(d) {
  46. global
  47. SetFormat, integer, hex
  48. result := number+0
  49. result := hextofloat(result)
  50. SetFormat, integer, decimal
  51. return result
  52. }
  53.  
  54. track = 500
  55. Totalplayersmem = 0x4029CEC0
  56. 1xmem = 0x4029CFC0
  57. 1ymem = 0x4029CFC4
  58. 1zmem = 0x4029CFC8
  59. 2xmem = 0x4029D1C0
  60. 2ymem = 0x4029D1C4
  61. 2zmem = 0x4029D1C8
  62. 3xmem = 0x4029D3C0
  63. 3ymem = 0x4029D3C4
  64. 3zmem = 0x4029D3C8
  65. 4xmem = 0x4029D5C0
  66. 4ymem = 0x4029D5C4
  67. 4zmem = 0x4029D5C8
  68. 5xmem = 0x4029D7C0
  69. 5ymem = 0x4029D7C4
  70. 5zmem = 0x4029D7C8
  71. 6xmem = 0x4029D9C0
  72. 6ymem = 0x4029D9C4
  73. 6zmem = 0x4029D9C8
  74. 7xmem = 0x4029DA90
  75. 7ymem = 0x4029DAC4
  76. 7zmem = 0x4029DAC8
  77. 8xmem = 0x4029DBC0
  78. 8ymem = 0x4029DBC4
  79. 8zmem = 0x4029DBC8
  80. shotsfired1 = 0x4029CF0C
  81. shotsfired2 = 0x4029D10C
  82. shotsfired3 = 0x4029D30C
  83. shotsfired4 = 0x4029D50C
  84. shotsfired5 = 0x4029D70C
  85. shotsfired6 = 0x4029D90C
  86. shotsfired7 = 0x4029DB0C
  87. shotsfired8 =  0x4029DD0C
  88. color1 = 0x4029CEE8
  89. color2 = 0x4029D0E8
  90. color3 = 0x4029D2E8
  91. color4 = 0x4029D4E8
  92. color5 = 0x4029D6E8
  93. color6 = 0x4029D8E8
  94. color7 = 0x4029DAE8
  95. color8 = 0x4029DCE8
  96. ping1 = 0x4029CFA4                                                                                                  ;0x4029CFB4?
  97. ping2 = 0x4029D1A4
  98. ping3 = 0x4029D3A4
  99. ping4 = 0x4029D5A4
  100. ping5 = 0x4029D7A4
  101. ping6 = 0x4029D9A4
  102. ping7 = 0x4029DBA4
  103. ping8 = 0x4029DDA4
  104. staticoid1 = 0x4029CEFE
  105. staticoid2 = 0x4029D0FE
  106. staticoid3 = 0x4029D2FE
  107. staticoid4 = 0x4029D4FE
  108. staticoid5 = 0x4029D6FE
  109. staticoid6 = 0x4029D8FE
  110. staticoid7 = 0x4029DAFE
  111. staticoid8 = 0x4029DCFE
  112.  
  113.  
  114.  
  115.  
  116.  
  117. $F1::
  118. WriteMemory(1036831949, 0x40610980,"Halo Console (1)")              ; pistol chillout damage max min minmax set to 0.1
  119. WriteMemory(1036831949, 0x40610984,"Halo Console (1)")
  120. WriteMemory(1036831949, 0x40610988,"Halo Console (1)")
  121.  
  122. settimer dynfind, 500                                                                                   ; 'dynfind' finds dynamic
  123. totalplayersd := ReadMemory(0x4029CEC0,"Halo Console (1)")          ; find total players # in server
  124. tpsh := dec2hex(totalplayersd)
  125. stringright totalplayers, tpsh, 1
  126.  
  127. map := ReadMemory(0x00630E94,"Halo Console (1)")                        ; read what map is loaded
  128. if (map = 1818847331)                                                                               ; if chillout loaded
  129. {
  130.     mc = 3864986859                                                                                 ; master chief object = this
  131.     pi = 3831694063                                                                                 ; pistol object = this
  132. }
  133.  
  134. loop
  135. {
  136.     loopnumber = 1
  137.     loop %track%
  138.     {
  139.         sleep 1                                                                                             ; sleep 1 millasecond. this is too slow.
  140.         pcheck = 1
  141.         loop %totalplayers%                                                                         ; track and log players past positions
  142.         {
  143.             xdec := ReadMemory(%pcheck%xmem,"Halo Console (1)")
  144.             xhex := dec2hex(xdec)
  145.             %pcheck%x%loopnumber% := hextofloat(xhex)
  146.             ydec := ReadMemory(%pcheck%ymem,"Halo Console (1)")
  147.             yhex := dec2hex(ydec)
  148.             %pcheck%y%loopnumber% := hextofloat(yhex)
  149.             pcheck := pcheck + 1
  150.         }
  151.         pcheck = 1
  152.         loop %totalplayers%                                                                         ; check if players have fired a shot
  153.         {
  154.             %pcheck%shotsfired := ReadMemory(shotsfired%pcheck%,"Halo Console (1)")
  155.             if (%pcheck%shotsfired != %pcheck%shotsfiredold)                ; this address increases as shots are fired. so the latest memory is compared to the old, to see if shots have been fired.
  156.             {
  157.                 weapond := ReadMemory(pistolmem%pcheck%,"Halo Console (1)")     ; check if weapon equiped is pistol
  158.                 weapon := dec2hex(weapond)
  159.                 StringRight objtocheckhz, weapon, 4
  160.                 objtocheck := hex2dec(objtocheckhz)
  161.                 asdf := objtocheck * 12
  162.                 objtocheckd := 1074071148 + asdf   
  163.                 objtocheckh := dec2hex(objtocheckd)
  164.                 objmetamemd := ReadMemory(objtocheckh,"Halo Console (1)")
  165.                 objmetamemh := dec2hex(objmetamemd)
  166.                 objmeta := ReadMemory(objmetamemh,"Halo Console (1)")
  167.                 if (objmeta = pi)
  168.                 {
  169.                     gosub hitcheck                                                                                      ; If pistol equipped and shots fired, check if aiming = hit
  170.                     %pcheck%shotsfiredold := %pcheck%shotsfired
  171.                     break
  172.                 }
  173.             }
  174.             %pcheck%shotsfiredold := %pcheck%shotsfired
  175.             pcheck := pcheck + 1
  176.         }
  177.         loopnumber := loopnumber + 1
  178.     }
  179. }  
  180.  
  181.  
  182. hitcheck:
  183. dirrection1d := dyn%pcheck%d + 548                                                  ; get X and Y positions of shooter
  184. dirrection2d := dyn%pcheck%d + 552
  185. pistolxm := dec2hex(dirrection1d)
  186. pistolym := dec2hex(dirrection2d)
  187. pistolxd := ReadMemory(pistolxm,"Halo Console (1)")
  188. pistolyd := ReadMemory(pistolym,"Halo Console (1)")
  189. pistolxh := dec2hex(pistolxd)
  190. pistolyh := dec2hex(pistolyd)
  191. pistolx := hextofloat(pistolxh)
  192. pistoly := hextofloat(pistolyh)
  193. yshooter := %pcheck%y%loopnumber%
  194. xshooter := %pcheck%x%loopnumber%
  195. m := pistoly / pistolx                                                                              ; get direction of shooter's bullet
  196.  
  197. b := yshooter - (m * xshooter)
  198.  
  199. ping := ReadMemory(ping%pcheck%,"Halo Console (1)")             ; get shooters ping, so later we can grab appropriate past enemy positions.
  200. color := ReadMemory(color%pcheck%,"Halo Console (1)")               ; get color to skip over teamates.
  201. positioncheck := loopnumber - 17                                                        ; this is the amount to go back in the player position history
  202. if (positioncheck < 1)
  203. {
  204.     positioncheck := track + positioncheck
  205. }
  206. loopplayer = 1
  207. loop %totalplayers%
  208. {
  209.     colortest := ReadMemory(color%loopplayer%,"Halo Console (1)")
  210.     if (colortest = color)
  211.     {
  212.         loopplayer := loopplayer + 1                                                                                                ; off for self testing (?)
  213.         continue
  214.     }
  215.     xcheck := %loopplayer%x%positioncheck%                                                                     
  216.     ycheck := %loopplayer%y%positioncheck%
  217.     ytest := (m * xcheck) + b
  218.    
  219.     if (ytest < ycheck + 0.26)                                                                                                      ;   threshold within which a hit has happened.
  220.     {
  221.         if (ytest > ycheck - 0.25)
  222.         {
  223.             gosub dodamage                                                                                                          ; if shot intersects with enemy, then go do damage.
  224.             break
  225.         }
  226.     }
  227.     loopplayer := loopplayer + 1
  228. }
  229. return
  230.  
  231.  
  232.  
  233. dodamage:
  234. healthd := dyn%loopplayer%d + 224
  235. shieldd := dyn%loopplayer%d + 228
  236. shieldcharged := dyn%loopplayer%d + 260         ; 1074161868 charge 1074161608 dyn
  237. healthh := dec2hex(healthd)
  238. shieldh := dec2hex(shieldd)
  239. shieldchargeh := dec2hex(shieldcharged)
  240. shielddec := ReadMemory(shieldh,"Halo Console (1)")
  241. shieldhi := dec2hex(shielddec)
  242. shield := hextofloat(shieldhi)
  243. shieldnewt := shield - .20
  244. if (shieldnewt < 0)
  245. {
  246.     shieldnew = 0
  247.     healthdi := ReadMemory(healthh,"Halo Console (1)")
  248.     healthhi := dec2hex(healthdi)
  249.     health := hextofloat(healthhi)
  250.     newhealth := health - .5
  251.     if (newhealth < 0)
  252.         newhealth = 0.01
  253.     newhealthh := floattohex(newhealth)
  254.     newhealthd := hex2dec(newhealthh)
  255.     WriteMemory(newhealthd, healthh,"Halo Console (1)")
  256. }
  257. else
  258.     shieldnew := shieldnewt
  259. shieldnewh := floattohex(shieldnew)
  260. shieldnewd := hex2dec(shieldnewh)
  261. WriteMemory(shieldnewd, shieldh,"Halo Console (1)")
  262. WriteMemory(524450, shieldchargeh,"Halo Console (1)")           ;   8ish seconds.
  263. return
  264.  
  265.  
  266.  
  267. dynfind:
  268. dynloop = 1
  269. loop %totalplayers%
  270. {
  271.     test := ReadMemory(staticoid%dynloop%,"Halo Console (1)")
  272.     testa := dec2hex(test)
  273.     StringRight oid%dynloop%, testa, 4
  274.     if (oid%dynloop% != oid%dynloop%old and oid%dynloop% != ffff)          
  275.     {
  276.         objlistod = 1074071140                                                                          ;   begining of player list or something
  277.         loop 300
  278.         {
  279.             objlistoh := dec2hex(objlistod)
  280.             objlisto := ReadMemory(objlistoh,"Halo Console (1)")
  281.             objlistoh := dec2hex(objlisto)
  282.             StringRight objlistohr, objlistoh, 4
  283.             oidt := oid%dynloop%
  284.             ifinstring objlistohr, %oidt%
  285.             {
  286.                 dynmd := objlistod + 8
  287.                 dynmh := dec2hex(dynmd)
  288.                 dyn%dynloop%d := ReadMemory(dynmh,"Halo Console (1)")
  289.                 pistolmem%dynloop% := dyn%dynloop%d + 280
  290.                 break
  291.             }
  292.             objlistod := objlistod + 12
  293.         }
  294.     }
  295.     oid%dynloop%old := oid%dynloop%
  296.     dynloop := dynloop + 1
  297. }
  298. return
  299.  
  300.  
  301.  
  302. $f2::
  303. htest := dyn1d + 224
  304. hteh := dec2hex(htest)
  305. clipboard = %hteh%
  306. return
  307.  
  308. $F3::
  309. loopplayer = 1
  310. gosub dodamage
  311. return
  312.  
  313. $F8::
  314. reload
  315.  
  316. $f9::
  317. exitapp
  318.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement