Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. global up := "up"
  3. global down := "down"
  4. global left := "left"
  5. global right := "right"
  6.  
  7. global start := "1"
  8. global LP := "a"
  9. global MP := "s"
  10. global HP := "d"
  11. global LK := "z"
  12. global MK := "x"
  13. global HK := "c"
  14.  
  15. global helpers
  16.  
  17. helpers=
  18. (
  19. Collosus,LP MP MK
  20. PsyLock,MK
  21. Sentinel,MP MK HP
  22. Shadow Charlie, LP MK HP
  23. )
  24.  
  25. helper_list=
  26. loop parse, helpers, `n,`r
  27. {
  28.     if not a_loopfield
  29.         continue
  30.     loop parse, a_loopfield, `,
  31.     {
  32.         if a_index = 1
  33.         {
  34.             helper_list=%helper_list%%a_loopfield%|
  35.         }
  36.         else
  37.             break
  38.     }
  39.        
  40. }
  41. stringreplace helper_list, helper_list,`n,|,a
  42. stringreplace helper_list, helper_list,Collosus|,Collosus|| ; make collosus selected by default
  43. gui, font, s13
  44.  
  45. gui, font, bold
  46. gui, add, text, xm y+20 w80 , CHARACTERS:
  47. gui, font, norm
  48. gui, add, text,y+1,F12: Shadow Lady`nF11: Red Venom`nF10: Gold War Machine`nF9: Lilith`nF8: Orange Hulk`nF7: Roll
  49. gui, font, bold
  50. gui, add, text, xm y+20 w80 , ASSISTS (HOLD):
  51. gui, font, norm
  52. gui, add, text,y+1,F6: Helper
  53. gui, font, s10
  54. gui, add, dropdownlist, x+5 vHelperDDL w100, %helper_list%
  55. ;`nF5: Sentinel`nF4: Shadow
  56.  
  57. /*
  58. Gui, Font, S12 CDefault, Calibri
  59. Gui, Add, GroupBox, x6 y-3 w250 h350 , Hotkeys
  60. Gui, Add, Text, x16 y27 w120 h20 , Red Venom
  61. Gui, Add, Edit, x106 y27 w140 h30 , Edit
  62. Gui, Add, Text, x16 y67 w120 h20 , Gold WM
  63. Gui, Add, Edit, x106 y67 w140 h30 , Edit
  64. Gui, Add, Text, x16 y107 w120 h20 , Shadow Lady
  65. Gui, Add, Text, x16 y147 w120 h20 , Lilith
  66. Gui, Add, Text, x16 y187 w120 h20 , Orange Hulk
  67. Gui, Add, Text, x16 y227 w120 h20 , Roll
  68. Gui, Add, Text, x16 y267 w120 h20 , Random
  69. Gui, Add, Edit, x106 y107 w140 h30 , Edit
  70. Gui, Add, Edit, x106 y147 w140 h30 , Edit
  71. Gui, Add, Edit, x106 y187 w140 h30 , Edit
  72. Gui, Add, Edit, x106 y227 w140 h30 , Edit
  73. Gui, Add, Edit, x106 y267 w140 h30 , Edit
  74. Gui, Add, Button, x266 y247 w200 h100 +, Save
  75. Gui, Add, Button, x86 y307 w80 h30 , Default
  76. Gui, Add, Text, x276 y27 w40 h20 , Up
  77. Gui, Add, Edit, x316 y27 w140 h30 , Edit
  78. Gui, Add, Text, x276 y67 w60 h20 , Down
  79. Gui, Add, Edit, x316 y67 w140 h30 , Edit
  80. Gui, Add, Text, x276 y107 w40 h20 , Left
  81. Gui, Add, Edit, x316 y107 w140 h30 , Edit
  82. Gui, Add, Text, x276 y147 w40 h20 , Right
  83. Gui, Add, Edit, x316 y147 w140 h30 , Edit
  84. Gui, Add, GroupBox, x266 y-3 w200 h240 , Inputs
  85. Gui, Add, Button, x326 y187 h358 w477 w80 h30 , Default
  86. ; Generated using SmartGUI Creator 4.0
  87. ;Gui, Show,  New GUI Window
  88. */
  89. gui, show,, MvC HELPER
  90.  
  91. return
  92. #ifwinnotactive NoteWorthy Composer
  93. !x::
  94. {
  95.     exitsleep = Yes
  96.     return
  97. }
  98.  
  99. f6::
  100. /*
  101. MARVEL VS. CAPCOM REFERENCE LAYOUT
  102. LP=A MP=S HP=D
  103. LK=Z MK=X HK=C
  104.  
  105.  
  106. start=1
  107. lp=A
  108. mp=S
  109. mk=X
  110. tooltip COLLOSUS ACTIVATED
  111.  
  112. sleep 5
  113. send {%start% down}
  114. send {%lp% down}
  115. send {%mp% down}
  116. send {%mk% down}
  117.  
  118. keywait F6,Up
  119.  
  120. sleep 5
  121. send {%start% up}
  122. send {%lp% up}
  123. send {%mp% up}
  124. send {%mk% up}
  125.  
  126. tooltip
  127. return
  128.  
  129. */
  130.  
  131. guicontrolget, helperDDL
  132. correct_code=
  133.  
  134. loop parse, helpers, `n,`r
  135. {
  136.     if not a_loopfield
  137.         continue
  138.    
  139.     name=
  140.     code=
  141.     loop parse, A_Loopfield, csv
  142.     {
  143.         if a_index = 1
  144.             name = %a_loopfield%
  145.         else if a_index = 2
  146.             code = %a_loopfield%
  147.     }
  148.    
  149.     if (name = helperDDL)
  150.     {
  151.         correct_code = %code%
  152.         break
  153.     }
  154.    
  155. }
  156.  
  157. if not correct_code
  158.     correct_code := "LP MP MK"
  159.  
  160. button1=
  161. button2=
  162. button3=
  163.  
  164. correct_code = %correct_code% ;trim white space
  165. loop parse, correct_code, %a_space%
  166. {
  167.     if a_index = 1
  168.         button1 = %a_loopfield%
  169.     if a_index = 2
  170.         button2 = %a_loopfield%
  171.     if a_index = 3
  172.         button3 = %a_loopfield%
  173. }
  174.  
  175. if button1
  176.     button1 := %button1% ; "convert LP to a, etc."
  177. if button2
  178.     button2 := %button2%
  179. if button3
  180.     button3 := %button3%
  181.  
  182. tooltip %HelperDDL% Activated
  183.  
  184. sleep 5
  185.  
  186. send {%start% down}
  187. if button1
  188.     send {%button1% down}
  189. if button2
  190.     send {%button2% down}
  191. if button3
  192.     send {%button3% down}
  193.  
  194. keywait F6,Up
  195.  
  196. sleep 5
  197.  
  198. send {%start% up}
  199. if button1
  200.     send {%button1% up}
  201. if button2
  202.     send {%button2% up}
  203. if button3
  204.     send {%button3% up}
  205.  
  206. tooltip
  207. return
  208.  
  209. f5::
  210.  
  211. start=1
  212. mp=S
  213. hp=D
  214. mk=X
  215. tooltip SENTINEL ACTIVATED
  216.  
  217. sleep 5
  218. send {%start% down}
  219. send {%mp% down}
  220. send {%hp% down}
  221. send {%mk% down}
  222.  
  223. keywait F5,Up
  224.  
  225. sleep 5
  226. send {%start% up}
  227. send {%mp% up}
  228. send {%hp% up}
  229. send {%mk% up}
  230.  
  231. tooltip
  232. return
  233.  
  234. f4::
  235.  
  236. start=1
  237. lp=A
  238. hp=D
  239. mk=X
  240. tooltip SHADOW ACTIVATED
  241.  
  242. sleep 5
  243. send {%start% down}
  244. send {%lp% down}
  245. send {%hp% down}
  246. send {%mk% down}
  247.  
  248. keywait F4,Up
  249.  
  250. sleep 5
  251. send {%start% up}
  252. send {%lp% up}
  253. send {%hp% up}
  254. send {%mk% up}
  255.  
  256. tooltip
  257. return
  258.  
  259. f7::
  260. {
  261.     PickRoll()
  262.     return
  263. }
  264.  
  265. f8::
  266. {  
  267.     PickOrangeHulk()
  268.     return
  269. }
  270.  
  271. f9::
  272. {  
  273.     PickLilith()
  274.     return 
  275. }
  276.  
  277. f10::
  278. {
  279.     PickGoldWM()
  280.     return
  281. }
  282.  
  283. f11::
  284. {
  285.     PickRedVenom()
  286.     return
  287. }
  288.  
  289. f12::
  290. {
  291.     PickShadowLady()
  292.     return
  293. }
  294.  
  295. PickRoll()
  296. {
  297.    
  298.     code := "Right, Left, Left, Down, Down, Right, Right, Down, Down, Left, Left, Up, Right, Up, Up, Right, Right"
  299.     loop parse, code, `,,%a_space%
  300.     {
  301.         move(%a_loopfield%)
  302.     }
  303.  
  304.     return
  305.    
  306. }
  307.  
  308. PickOrangeHulk()
  309. {
  310.     code := "Left, Right, Right, Down, Down, Left, Left, Right, Right, Down, Down, Left, Left, Up, Up, Up, Up, Down, Down, Right, Right, Up, Up, Down, Down, Down, Down, Up, Up, Up, Up, Left, Up"
  311.    
  312.     loop parse, code, `,,%a_space%
  313.     {
  314.         move(%a_loopfield%)
  315.     }
  316.  
  317.     return
  318. }
  319.  
  320. PickLilith()
  321. {
  322.    
  323.     code := "Right, Left, Left, Down, Down, Right, Right, Up, Up, Down, Down, Down, Down, Left, Left, Up, Up, Up, Up, Right, Left, Down, Down, Down, Down, Right, Right, Up, Up, Up, Up, Left, left, Down, Down, Down, Down, Right, Down"
  324.  
  325.     loop parse, code, `,,%a_space%
  326.     {
  327.         move(%a_loopfield%)
  328.     }
  329.  
  330.     return
  331.  
  332. }
  333.  
  334. PickGoldWm()
  335. {
  336.    
  337.     code := "Right, Left, Left, Down, Down, Right, Right, Down, Down, Left, Left, Up, Up, Up, Up, Right, Right, Left, Left, Down, Down, Down, Down, Right, Right, Up, Up, Left, Left, Down, Down, Right, Right, Up, Up, Up, Up, Up"
  338.    
  339.     loop parse, code, `,,%a_space%
  340.     {
  341.         move(%a_loopfield%)
  342.     }
  343.  
  344.     return
  345. }
  346.  
  347. PickRedVenom()
  348. {
  349.     code := "Left, Right, Down, Down, Down, Down, Left, Up, Up, Up, Up, Right, Right, Down, Down, Left, Left, Down, Down, Right, Right, Up, Up, Up, Up, Left, Left, Up"
  350.    
  351.     loop parse, code, `,,%a_space%
  352.     {
  353.         move(%a_loopfield%)
  354.     }
  355.  
  356.     return
  357.    
  358. }
  359.  
  360. PickShadowLady()
  361. {
  362.    
  363.    
  364.     move(up)
  365.     move(right)
  366.     move(right)
  367.     move(down)
  368.     move(down)
  369.     move(down)
  370.     move(down) 
  371.     move(left)
  372.     move(left)
  373.     move(up)
  374.     move(up)
  375.     move(up)
  376.     move(up)
  377.     move(right)
  378.     move(right)
  379.     move(left)
  380.     move(left)
  381.     move(down)
  382.     move(down)
  383.     move(right)
  384.     move(right)
  385.     move(down)
  386.     move(down)
  387.     move(left)
  388.     move(left)
  389.     move(up)
  390.     move(up)
  391.     move(right)
  392.     move(right)
  393.     move(up)
  394.     move(up)
  395.     move(left)
  396.     move(left)
  397.     move(down)
  398.     move(down)
  399.     move(down)
  400.     move(down)
  401.     move(down)
  402.     return
  403.    
  404. }
  405.  
  406. Move(direction)
  407. {
  408.     delay = 5
  409.    
  410.     sleep 5
  411.     if (direction = "up")
  412.     {
  413.        
  414.         send {Up down}
  415.         sleep %delay%
  416.         send {Up up}
  417.     }
  418.     else if (direction = "down")
  419.     {
  420.         send {down down}
  421.         sleep %delay%
  422.         send {Down up}
  423.     }
  424.     else if (direction = "left")
  425.     {
  426.         send {Left down}
  427.         sleep %delay%
  428.         send {Left up}
  429.     }
  430.     else if (direction = "right")
  431.     {
  432.         send {Right down}
  433.         sleep %delay%
  434.         send {Right up}
  435.     }
  436.    
  437.     return
  438. }
  439.  
  440. !c::
  441. {
  442.    
  443.     WinTitle = Edit cheat settings
  444.     ControlName = SysListView321
  445.    
  446.     IfWinExist %WinTitle%
  447.     {
  448.     }
  449.     else
  450.     {
  451.         msgbox window not found
  452.         return
  453.     }
  454.        
  455.    
  456.     LVSel(WinTitle, ControlName, 1)
  457.     Control, Choose, 2, ComboBox1, %WinTitle%
  458.    
  459.     LVSel(WinTitle, ControlName, 2)
  460.     Control, Choose, 2, ComboBox1, %WinTitle%
  461.    
  462.     ;LVSel(WinTitle, ControlName, 3)
  463.     ;Control, Choose, 4, ComboBox1, %WinTitle%
  464.    
  465.     LVSel(WinTitle, ControlName, 10)
  466.     Control, Choose, 2, ComboBox1, %WinTitle%
  467.    
  468.     LVSel(WinTitle, ControlName, 11)
  469.     Control, Choose, 2, ComboBox1, %WinTitle%
  470.    
  471.     LVSel(WinTitle, ControlName, 12)
  472.     Control, Choose, 2, ComboBox1, %WinTitle%
  473.    
  474.     LVSel(WinTitle, ControlName, 42)
  475.     Control, Choose, 2, ComboBox1, %WinTitle%
  476.    
  477.     LVSel(WinTitle, ControlName, 44)
  478.     Control, Choose, 2, ComboBox1, %WinTitle%
  479.    
  480.     return
  481. }
  482.  
  483. LVSel(WinTitle,NNListview,r=1)
  484. {
  485.     r-=1
  486.     LVIS_FOCUSED:=1  
  487.     LVIS_SELECTED:=2
  488.     LVM_SETITEMSTATE:=0x102B
  489.     VarSetCapacity(LVITEM, 20, 0) ;to receive LVITEM
  490.     NumPut(LVIS_FOCUSED | LVIS_SELECTED, LVITEM, 12)  ; state
  491.     NumPut(LVIS_FOCUSED | LVIS_SELECTED, LVITEM, 16)  ; stateMask
  492.     RemoteBuf_Open(hLVITEM, WinExist(WinTitle), 20)  ; MASTER_ID = the ahk_id of the process owning the SysListView32 control
  493.     RemoteBuf_Write(hLVITEM, LVITEM,20)
  494.     SendMessage,LVM_SETITEMSTATE,r,RemoteBuf_Get(hLVITEM),%NNListview%,%WinTitle%   ; supposing the cntrlNN is SysListView321
  495.     RemoteBuf_Close(hLVITEM)
  496. }
  497.  
  498. ;   Title:  Remote Buffer
  499. ;           *Read and write process memory*
  500. ;
  501.  
  502. /*-------------------------------------------------------------------------------
  503.     Function: Open
  504.               Open remote buffer
  505.  
  506.     Parameters:
  507.             H       - Reference to variable to receive remote buffer handle
  508.             hwnd    - HWND of the window that belongs to the process
  509.             size    - Size of the buffer
  510.  
  511.     Returns:
  512.             Error message on failure
  513.  */
  514. RemoteBuf_Open(ByRef H, hwnd, size) {
  515.     static MEM_COMMIT:=0x1000, PAGE_READWRITE:=4
  516.  
  517.     WinGet, pid, PID, ahk_id %hwnd%
  518.     hProc   := DllCall( "OpenProcess", "uint", 0x38, "int", 0, "uint", pid) ;0x38 = PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE
  519.     IfEqual, hProc,0, return A_ThisFunc ">   Unable to open process (" A_LastError ")"
  520.      
  521.     bufAdr  := DllCall( "VirtualAllocEx", "PTR", hProc, "PTR", 0, "PTR", size, "uint", MEM_COMMIT, "uint", PAGE_READWRITE)
  522.     IfEqual, bufAdr,0, return A_ThisFunc ">   Unable to allocate memory (" A_LastError ")"
  523.  
  524.     ; Buffer handle structure:
  525.      ;  @0: hProc
  526.      ;  @4: size
  527.      ;  @8: bufAdr
  528.     VarSetCapacity(H, A_PtrSize*3, 0 )
  529.     NumPut( hProc,  H, 0,"PTR")
  530.     NumPut( size,   H, A_PtrSize,"PTR")
  531.     NumPut( bufAdr, H, A_PtrSize*2,"PTR")
  532. }
  533.  
  534. /*----------------------------------------------------
  535.     Function: Close
  536.               Close the remote buffer
  537.  
  538.     Parameters:
  539.               H - Remote buffer handle
  540.  */
  541. RemoteBuf_Close(ByRef H) {
  542.     static MEM_RELEASE := 0x8000
  543.    
  544.     handle := NumGet(H, 0,"PTR")
  545.     IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"
  546.     adr    := NumGet(H, A_PtrSize*2,"PTR")
  547.  
  548.     r := DllCall( "VirtualFreeEx", "PTR", handle, "PTR", adr, "PTR", 0, "uint", MEM_RELEASE)
  549.     ifEqual, r, 0, return A_ThisFunc ">   Unable to free memory (" A_LastError ")"
  550.     DllCall( "CloseHandle", "PTR", handle )
  551.     VarSetCapacity(H, 0 )
  552. }
  553.  
  554. /*----------------------------------------------------
  555.     Function:   Read
  556.                 Read from the remote buffer into local buffer
  557.  
  558.     Parameters:
  559.          H          - Remote buffer handle
  560.          pLocal     - Reference to the local buffer
  561.          pSize      - Size of the local buffer
  562.          pOffset    - Optional reading offset, by default 0
  563.  
  564. Returns:
  565.          TRUE on success or FALSE on failure. ErrorMessage on bad remote buffer handle
  566.  */
  567. RemoteBuf_Read(ByRef H, ByRef pLocal, pSize, pOffset := 0){
  568.     handle := NumGet( H, 0,"PTR"),   size:= NumGet( H, A_PtrSize,"PTR"),   adr := NumGet( H, A_PtrSize*2,"PTR")
  569.     IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"   
  570.     IfGreaterOrEqual, offset, %size%, return A_ThisFunc ">   Offset is bigger then size"
  571.  
  572.     VarSetCapacity( pLocal, pSize )
  573.     return DllCall( "ReadProcessMemory", "PTR", handle, "PTR", adr + pOffset, "PTR", &pLocal, "PTR", size, "PTR", 0 ), VarSetCapacity(pLocal, -1)
  574. }
  575.  
  576. /*----------------------------------------------------
  577.     Function:   Write
  578.                 Write local buffer into remote buffer
  579.  
  580.     Parameters:
  581.          H          - Remote buffer handle
  582.          pLocal     - Reference to the local buffer
  583.          pSize      - Size of the local buffer
  584.          pOffset    - Optional writting offset, by default 0
  585.  
  586.     Returns:
  587.          TRUE on success or FALSE on failure. ErrorMessage on bad remote buffer handle
  588.  */
  589.  
  590. RemoteBuf_Write(Byref H, byref pLocal, pSize, pOffset:=0) {
  591.     handle:= NumGet( H, 0,"PTR"),   size := NumGet( H, A_PtrSize,"PTR"),   adr := NumGet( H, A_PtrSize*2,"PTR")
  592.     IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"   
  593.     IfGreaterOrEqual, offset, %size%, return A_ThisFunc ">   Offset is bigger then size"
  594.  
  595.     return DllCall( "WriteProcessMemory", "PTR", handle,"PTR", adr + pOffset,"PTR", &pLocal,"PTR", pSize, "PTR", 0 )
  596. }
  597.  
  598. /*----------------------------------------------------
  599.     Function:   Get
  600.                 Get address or size of the remote buffer
  601.  
  602.     Parameters:
  603.          H      - Remote buffer handle
  604.          pQ     - Query parameter: set to "adr" to get address (default), to "size" to get the size or to "handle" to get Windows API handle of the remote buffer.
  605.  
  606.     Returns:
  607.          Address or size of the remote buffer
  608.  */
  609. RemoteBuf_Get(ByRef H, pQ:="adr") {
  610.     return pQ = "adr" ? NumGet(H, A_PtrSize*2,"PTR") : pQ = "size" ? NumGet(H, A_PtrSize,"PTR") : NumGet(H,"PTR")
  611. }
  612.  
  613. /*---------------------------------------------------------------------------------------
  614. Group: Example
  615. (start code)
  616.     ;get the handle of the Explorer window
  617.        WinGet, hw, ID, ahk_class ExploreWClass
  618.  
  619.     ;open two buffers
  620.        RemoteBuf_Open( hBuf1, hw, 128 )        
  621.        RemoteBuf_Open( hBuf2, hw, 16  )
  622.  
  623.     ;write something
  624.        str := "1234"
  625.        RemoteBuf_Write( hBuf1, str, strlen(str) )
  626.  
  627.        str := "_5678"
  628.        RemoteBuf_Write( hBuf1, str, strlen(str), 4)
  629.  
  630.        str := "_testing"
  631.        RemoteBuf_Write( hBuf2, str, strlen(str))
  632.  
  633.  
  634.     ;read
  635.        RemoteBuf_Read( hBuf1, str, 10 )
  636.        out = %str%
  637.        RemoteBuf_Read( hBuf2, str, 10 )
  638.        out = %out%%str%
  639.  
  640.        MsgBox %out%
  641.  
  642.     ;close
  643.        RemoteBuf_Close( hBuf1 )
  644.        RemoteBuf_Close( hBuf2 )
  645. (end code)
  646.  */
  647.  
  648. /*-------------------------------------------------------------------------------------------------------------------
  649.     Group: About
  650.     o Ver 2.0 by majkinetor. See http://www.autohotkey.com/forum/topic12251.html
  651.     o Code updates by infogulch
  652.     o Licenced under Creative Commons Attribution-Noncommercial <http://creativecommons.org/licenses/by-nc/3.0/>.  
  653.  */
  654.  
  655. guiclose:
  656. exitapp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement