Advertisement
Guest User

Untitled

a guest
May 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 21.26 KB | None | 0 0
  1. #include <WinAPI.au3>
  2. #include <GUIConstantsEx.au3>
  3. #include <StaticConstants.au3>
  4. #include <NamedPipes.au3>
  5. #include <GWCAConstants.au3>
  6. #include <ButtonConstants.au3>
  7. #include <ComboConstants.au3>
  8. #include <TabConstants.au3>
  9. #include <WindowsConstants.au3>
  10. #include <StructureConstants.au3>
  11. #include <GWCAInject.au3>
  12. #include <FakorInject.au3>
  13.  
  14.  
  15. Opt("GUIOnEventMode", 1)
  16. GUICtrlSetOnEvent(-1, "_buttons")
  17. GUICreate("S2C - Packet Fakor Tool", 330, 168, 345, 323)
  18.  
  19. GUISetIcon(@ScriptDir&"\icon.ico")
  20. TraySetIcon(@ScriptDir&"\icon.ico")
  21.  
  22.  
  23. $Tab1 = GUICtrlCreateTab(8, 8, 313, 153)
  24.  
  25. ;Tabsheet1 = MAIN
  26. GUICtrlCreateTabItem("Main")
  27. $Pic1 = GUICtrlCreatePic(@ScriptDir&"\data\GRLogo.gif", 16, 120, 276, 36)
  28. GUICtrlCreateGroup("About", 16, 32, 185, 81)
  29. GUICtrlCreateLabel("This tool will send the server to client packets for you. This is only client side and wont add anything to your account. Use at your own risk.", 24, 48, 172, 57)
  30. GUICtrlSetBkColor(-1, 0xFFFFFF)
  31. GUICtrlCreateGroup("", -99, -99, 1, 1)
  32. GUICtrlCreateGroup("How to use", 208, 32, 105, 105)
  33. GUICtrlCreateLabel("You must inject PaketFakor.dll and Graphics.dll with any Injector you want. Both files are in the /data folder.", 216, 48, 92, 81)
  34. GUICtrlSetBkColor(-1, 0xFFFFFF)
  35. GUICtrlCreateGroup("", -99, -99, 1, 1)
  36.  
  37.  
  38. ;Tabsheet2 = EMOTES
  39. GUICtrlCreateTabItem("Emotes")
  40. GUICtrlCreateGroup("/rank Emotes", 16, 32, 94, 59);oben links
  41. GUICtrlSetBkColor(-1, 0xFFFFFF)
  42. $rank = GUICtrlCreateCombo("", 24, 56, 77, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  43. GUICtrlSetData($rank, "|rank3|rank6|rank9|rank12|rank15")
  44. GUICtrlSetOnEvent($rank, "_rankread")
  45. GUICtrlCreateGroup("", -99, -99, 1, 1)
  46.  
  47.  
  48. GUICtrlCreateGroup("/zrank Emotes", 16, 93, 94, 59);unten links
  49. GUICtrlSetBkColor(-1, 0xFFFFFF)
  50. $zrank = GUICtrlCreateCombo("", 24, 117, 77, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  51. GUICtrlSetData($zrank, "|zrank1|zrank2|zrank3|zrank4|zrank5|zrank6|zrank7|zrank8|zrank9|zrank10|zrank11|zrank12")
  52. GUICtrlSetOnEvent($zrank, "_zrankread")
  53. GUICtrlCreateGroup("", -99, -99, 1, 1)
  54.  
  55.  
  56. GUICtrlCreateGroup("Aion Wings", 117, 32, 94, 59);mitte oben
  57. GUICtrlSetBkColor(-1, 0xFFFFFF)
  58. $aionw = GUICtrlCreateCombo("", 125, 56, 77, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  59. GUICtrlSetData($aionw, "|darkwings|whitewings")
  60. GUICtrlSetOnEvent($aionw, "_aionwread")
  61. GUICtrlCreateGroup("", -99, -99, 1, 1)
  62.  
  63.  
  64.  
  65. $Group11 = GUICtrlCreateGroup("Agent Control", 218, 32, 94, 59);oben rechts
  66. GUICtrlSetBkColor(-1, 0xFFFFFF)
  67. $acontrol = GUICtrlCreateCombo("", 226, 56, 77, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  68. GUICtrlSetState($acontrol, $GUI_DISABLE);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  69. GUICtrlSetData($acontrol, "|tumble|defeat")
  70. GUICtrlSetOnEvent($acontrol, "_acontrolread")
  71. GUICtrlCreateGroup("", -99, -99, 1, 1)
  72.  
  73.  
  74. GUICtrlCreateGroup("Misc Emotes", 117, 93, 94, 59);unten rechts
  75. GUICtrlSetBkColor(-1, 0xFFFFFF)
  76. $miscemotes = GUICtrlCreateCombo("", 125, 117, 77, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  77. GUICtrlSetState($miscemotes, $GUI_DISABLE);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  78. GUICtrlSetData($miscemotes, "|RankUp|Balls")
  79. GUICtrlSetOnEvent($miscemotes, "_miscemotesread")
  80. GUICtrlCreateGroup("", -99, -99, 1, 1)
  81.  
  82. GUICtrlCreateGroup("Do Emotes", 218, 93, 94, 59)
  83. GUICtrlSetBkColor(-1, 0xFFFFFF)
  84. $emoteme = GUICtrlCreateRadio("on me", 224, 112, 65, 14)
  85. GUICtrlSetOnEvent($emoteme, "_buttons")
  86. $emotetarget = GUICtrlCreateRadio("on target", 224, 128, 73, 17)
  87. GUICtrlSetOnEvent($emotetarget, "_buttons")
  88.  
  89.  
  90. ;Tabsheet3 = EFFECTS
  91. GUICtrlCreateTabItem("Effects")
  92.  
  93. $Group14 = GUICtrlCreateGroup("Agent Color", 144, 32, 169, 66)
  94. GUICtrlSetBkColor(-1, 0xFFFFFF)
  95. $radiogreen = GUICtrlCreateRadio("", 149, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  96. GUICtrlSetOnEvent($radiogreen, "_buttons")
  97. GUICtrlSetBkColor(-1, 0x00FF00)
  98. $radiolila = GUICtrlCreateRadio("", 173, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  99. GUICtrlSetOnEvent($radiolila, "_buttons")
  100. GUICtrlSetBkColor(-1, 0x0000FF)
  101. $radiolime = GUICtrlCreateRadio("", 197, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  102. GUICtrlSetOnEvent($radiolime, "_buttons")
  103. GUICtrlSetBkColor(-1, 0x00FFFF)
  104. $radiopink = GUICtrlCreateRadio("", 221, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  105. GUICtrlSetOnEvent($radiopink, "_buttons")
  106. GUICtrlSetBkColor(-1, 0xFF00FF)
  107. $radiored = GUICtrlCreateRadio("", 245, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  108. GUICtrlSetOnEvent($radiored, "_buttons")
  109. GUICtrlSetBkColor(-1, 0xFF0000)
  110. $radioyellow = GUICtrlCreateRadio("", 269, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  111. GUICtrlSetOnEvent($radioyellow, "_buttons")
  112. GUICtrlSetBkColor(-1, 0xFFFF00)
  113. $radiobrown = GUICtrlCreateRadio("", 293, 49, 17, 17, -1, $WS_EX_CLIENTEDGE)
  114. GUICtrlSetOnEvent($radiobrown, "_buttons")
  115. GUICtrlSetBkColor(-1, 0x800000)
  116. $paintagent = GUICtrlCreateButton("Paint Up", 152, 72, 153, 17)
  117. GUICtrlSetOnEvent($paintagent, "_buttons")
  118. GUICtrlCreateGroup("", -99, -99, 1, 1)
  119.  
  120.  
  121. GUICtrlCreateGroup("Agent ID", 16, 32, 121, 66)
  122.  
  123. GUICtrlSetBkColor(-1, 0xFFFFFF)
  124. $bkilltarget = GUICtrlCreateButton("Destroy", 24, 51, 49, 36)
  125. GUICtrlSetOnEvent($bkilltarget, "_buttons")
  126. $balivetarget = GUICtrlCreateButton("Restore", 80, 51, 49, 36)
  127. GUICtrlSetOnEvent($balivetarget, "_buttons")
  128. GUICtrlCreateGroup("", -99, -99, 1, 1)
  129.  
  130.  
  131.  
  132.  
  133. $Tabsheet4 = GUICtrlCreateTabItem("Items")
  134.  
  135.  
  136.  
  137.  
  138.  
  139. $Tabsheet6 = GUICtrlCreateTabItem("Agents")
  140. $Group6 = GUICtrlCreateGroup("Choose Agent ID", 16, 32, 121, 97)
  141. GUICtrlSetBkColor(-1, 0xFFFFFF)
  142.  
  143. $agentlooklike = GUICtrlCreateCombo("", 24, 51, 105, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
  144. GUICtrlSetData($agentlooklike, "|RubyDjinn")
  145. GUICtrlSetOnEvent($agentlooklike, "_agentlooklike")
  146.  
  147. $Checkbox2 = GUICtrlCreateCheckbox("Moving Agent", 24, 104, 97, 17)
  148. GUICtrlSetState($Checkbox2, $GUI_DISABLE);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  149. $Checkbox1 = GUICtrlCreateCheckbox("Standing Agent", 24, 80, 97, 17)
  150. GUICtrlSetState($Checkbox1, $GUI_DISABLE);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  151. GUICtrlCreateGroup("", -99, -99, 1, 1)
  152.  
  153.  
  154.  
  155.  
  156.  
  157. GUICtrlCreateGroup("Agent Size", 144, 34, 169, 94)
  158. $hSlider = GUICtrlCreateSlider(152, 96, 153, 25, -1, $WS_EX_STATICEDGE)
  159. GUICtrlSetOnEvent($hSlider, "_buttons")
  160. GUICtrlSetLimit(-1,250,10)
  161. $slotas = GUICtrlCreateLabel("Current Agent Size", 152, 72, 102, 17)
  162. $Label3 = GUICtrlCreateLabel("Previous Agent Size", 152, 51, 101, 17)
  163. $oldsize = GUICtrlCreateLabel("100", 256, 49, 22, 17, -1, $WS_EX_STATICEDGE)
  164. $currentsize  = GUICtrlCreateLabel(GUICtrlRead($hSlider), 256, 71, 22, 17, -1, $WS_EX_STATICEDGE)
  165. GUICtrlCreateGroup("", -99, -99, 1, 1)
  166.  
  167. GUICtrlSetBkColor(-1, 0xFFFFFF)
  168.  
  169.  
  170. $agentspawn = GUICtrlCreateButton("Spawn Agent", 16, 133, 297, 21)
  171. GUICtrlSetOnEvent($agentspawn, "_buttons")
  172. GUICtrlCreateGroup("", -99, -99, 1, 1)
  173.  
  174.  
  175.  
  176.  
  177.  
  178. $Tabsheet5 = GUICtrlCreateTabItem("Misc")
  179. $Group5 = GUICtrlCreateGroup("Custom Packet", 16, 32, 297, 65)
  180. GUICtrlSetBkColor(-1, 0xFFFFFF)
  181. $InputPacket = GUICtrlCreateInput("", 24, 48, 281, 21)
  182. $custompacket = GUICtrlCreateButton("Send Packet", 24, 72, 185, 18)
  183. GUICtrlSetOnEvent($custompacket, "_buttons")
  184. $custominputsave = GUICtrlCreateCheckbox("Save Input", 232, 72, 73, 17)
  185. GUICtrlCreateGroup("", -99, -99, 1, 1)
  186.  
  187.  
  188. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  189. ; FUNKTIONEN DIE NOCH GEORDNET WERDEN MÜSSEN
  190.  
  191.  
  192. func _custompacket()
  193.  
  194. $custompck = GUICtrlRead($InputPacket)
  195.  
  196. If GUICtrlRead($custominputsave) = $GUI_CHECKED Then
  197. IniWrite("S2C.ini", "CustomPackets", @hour&":"&@min&":"&@sec, $custompck)
  198. endif
  199. APICmd("PacketFakor", CreatePck($custompck))
  200. endfunc
  201.  
  202.  
  203. Func _agentsize()
  204.     IniWrite("S2C.ini", "Agentsize", "oldsize", GUICtrlRead($currentsize))
  205.     $prepold = IniRead("S2C.ini", "Agentsize", "oldsize", "Not Found")
  206.     GUICtrlSetData($oldsize,($prepold))
  207.     GUICtrlSetData($currentsize,GUICtrlRead($hSlider))
  208. EndFunc
  209.  
  210.  
  211. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  212. ; FUNKTIONEN DIE NOCH GEORDNET WERDEN MÜSSEN
  213.    
  214.  
  215. GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
  216. GUISetState()
  217.  
  218.  
  219. GUISetState(@SW_SHOW)
  220.  
  221.  
  222.  
  223. Global $pInput = DllStructCreate("byte[256]");char[256]")
  224. Global $pOutput = DllStructCreate("byte[256]");char[256]")
  225. Global $i=1
  226.  
  227.  
  228. While 1
  229.  
  230. myid()
  231. targetid()
  232. emotecheck()
  233. $AgentID = IniRead("S2C.ini", "AgentID", "Dec", "NotFound")
  234. $TargetID = IniRead("S2C.ini", "TargetID", "Dec", "NotFound")
  235.  
  236.  
  237. wend
  238.  
  239.  
  240.  
  241. Func _buttons()
  242.     Switch (@GUI_CtrlId)
  243.         Case $agentspawn
  244.             _agentspawnfunc()
  245.         Case $agentspawn
  246.             _paintagent()  
  247.         Case $custompacket
  248.             _custompacket()
  249.         Case $radiogreen
  250.             _greenagent()
  251.         Case $radiolila
  252.             _lilaagent()
  253.         Case $radiopink
  254.             _pinkagent()
  255.         Case $radiored
  256.             _redagent()
  257.         Case $radiolime
  258.             _limeagent()
  259.         Case $radioyellow
  260.             _yellowagent()     
  261.         Case $radiobrown
  262.             _brownagent()      
  263.         Case $bkilltarget
  264.             _killtarget()  
  265.         Case $balivetarget
  266.             _alivetarget()     
  267.         Case $hSlider
  268.             _agentsize()       
  269.         Case $emoteme
  270.             _emoteme() 
  271.         Case $emotetarget
  272.             _emotetarget()             
  273.     EndSwitch
  274. EndFunc  
  275.  
  276. Func myid()
  277. $oldcbType=$cbType
  278. $cbType = "int"
  279. CmdCB($CA_GetMyId)
  280. $cbType=$oldcbType
  281. IniWrite("S2C.ini", "AgentID", "Dec", $cbVar[0])
  282. IniWrite("S2C.ini", "AgentID", "Hex", ToHex($cbVar[0],4))
  283. EndFunc
  284.  
  285. Func targetid()
  286. $oldcbType=$cbType
  287. $cbType = "int"
  288. CmdCB($CA_GetCurrentTarget)
  289. $cbType=$oldcbType
  290. IniWrite("S2C.ini", "TargetID", "Dec", $cbVar[0])
  291. IniWrite("S2C.ini", "TargetID", "Hex", ToHex($cbVar[0],4))
  292. EndFunc
  293.  
  294.  
  295. Func _exit()
  296.     Exit
  297. EndFunc
  298.  
  299.  
  300. #region emote packets
  301.  
  302.  
  303. Func emotecheck()
  304. If GUICtrlRead($emoteme) = $GUI_CHECKED Then
  305.     $oldcbType=$cbType
  306. $cbType = "int"
  307. CmdCB($CA_GetMyId)
  308. $cbType=$oldcbType
  309. IniWrite("S2C.ini", "Emotes", "Target", $cbVar[0])
  310. endif
  311. If GUICtrlRead($emotetarget) = $GUI_CHECKED Then
  312. $oldcbType=$cbType
  313. $cbType = "int"
  314. CmdCB($CA_GetCurrentTarget)
  315. $cbType=$oldcbType
  316. IniWrite("S2C.ini", "Emotes", "Target", $cbVar[0])
  317. endif
  318. endfunc
  319.  
  320. Func _emoteme()
  321. $oldcbType=$cbType
  322. $cbType = "int"
  323. CmdCB($CA_GetMyId)
  324. $cbType=$oldcbType
  325. IniWrite("S2C.ini", "Emotes", "Target", $cbVar[0])
  326. EndFunc
  327.  
  328. Func _emotetarget()
  329. $oldcbType=$cbType
  330. $cbType = "int"
  331. CmdCB($CA_GetCurrentTarget)
  332. $cbType=$oldcbType
  333. IniWrite("S2C.ini", "Emotes", "Target", $cbVar[0])
  334. EndFunc
  335.  
  336.  
  337.  
  338. Func _rankread()
  339.     ;Ranks for /rank Emote
  340.    
  341. $emoteAgentID = IniRead("S2C.ini", "Emotes", "Target", "NotFound")
  342.    
  343.     $rank3 = "920017000000"&ToHex($emoteAgentID,4)&"00000003000000"
  344.     $rank6 = "920017000000"&ToHex($emoteAgentID,4)&"000006000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  345.     $rank9 = "920017000000"&ToHex($emoteAgentID,4)&"000009000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  346.     $rank12 = "920017000000"&ToHex($emoteAgentID,4)&"00000C000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  347.     $rank15 = "920017000000"&ToHex($emoteAgentID,4)&"00000F000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  348.  
  349.  
  350.     $read = GUICtrlRead($rank)
  351.     If $read = "rank3" Then
  352.     MsgBox(0, "PacketFakor", "Sent /rank 3 (Deer) emote ")
  353.     APICmd("PacketFakor", CreatePck($rank3))
  354.     endif
  355.     If $read = "rank6" Then
  356.     MsgBox(0, "PacketFakor", "Sent /rank 6 (Wolf) emote ")
  357.     APICmd("PacketFakor", CreatePck($rank6))
  358.     endif
  359.     If $read = "rank9" Then
  360.     MsgBox(0, "PacketFakor", "Sent /rank 9 (Tiger) emote ")
  361.     APICmd("PacketFakor", CreatePck($rank9))
  362.     endif
  363.     If $read = "rank12" Then
  364.     MsgBox(0, "PacketFakor", "Sent /rank 12 (Phoenix) emote ")
  365.     APICmd("PacketFakor", CreatePck($rank12))
  366.     endif
  367.     If $read = "rank15" Then
  368.     MsgBox(0, "PacketFakor", "Sent /rank 15 (Dragon) emote ")
  369.     APICmd("PacketFakor", CreatePck($rank15))
  370.     endif
  371. EndFunc
  372.  
  373. Func _zrankread()
  374.     ;Ranks for /zrank Emote
  375.        
  376.     $emoteAgentID = IniRead("S2C.ini", "Emotes", "Target", "NotFound") 
  377.        
  378.     $zrank1 = "920018000000"&ToHex($emoteAgentID,4)&"000001000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  379.     $zrank2 = "920018000000"&ToHex($emoteAgentID,4)&"000002000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  380.     $zrank3 = "920018000000"&ToHex($emoteAgentID,4)&"000003000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  381.     $zrank4 = "920018000000"&ToHex($emoteAgentID,4)&"000004000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  382.     $zrank5 = "920018000000"&ToHex($emoteAgentID,4)&"000005000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  383.     $zrank6 = "920018000000"&ToHex($emoteAgentID,4)&"000006000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  384.     $zrank7 = "920018000000"&ToHex($emoteAgentID,4)&"000007000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  385.     $zrank8 = "920018000000"&ToHex($emoteAgentID,4)&"000008000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  386.     $zrank9 = "920018000000"&ToHex($emoteAgentID,4)&"000009000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  387.     $zrank10 = "920018000000"&ToHex($emoteAgentID,4)&"00000A000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  388.     $zrank11 = "920018000000"&ToHex($emoteAgentID,4)&"00000B000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  389.     $zrank12 = "920018000000"&ToHex($emoteAgentID,4)&"00000C000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  390.  
  391.    
  392.     $read = GUICtrlRead($zrank)
  393.     If $read = "zrank1" Then
  394.     MsgBox(0, "PacketFakor", "Sent /zrank 1 (Copper Spear) emote ")
  395.     APICmd("PacketFakor", CreatePck($zrank1))
  396.     endif
  397.     If $read = "zrank2" Then
  398.     MsgBox(0, "PacketFakor", "Sent /zrank 2 (Silver Spear) emote ")
  399.     APICmd("PacketFakor", CreatePck($zrank2))
  400.     endif
  401.     If $read = "zrank3" Then
  402.     MsgBox(0, "PacketFakor", "Sent /zrank 3 (Golden Spear) emote ")
  403.     APICmd("PacketFakor", CreatePck($zrank3))
  404.     endif
  405.     If $read = "zrank4" Then
  406.     MsgBox(0, "PacketFakor", "Sent /zrank 4 (Golden Spear + Copper Hammer) emote ")
  407.     APICmd("PacketFakor", CreatePck($zrank4))
  408.     endif
  409.     If $read = "zrank5" Then
  410.     MsgBox(0, "PacketFakor", "Sent /zrank 5 (Golden Spear + Silver Hammer) emote ")
  411.     APICmd("PacketFakor", CreatePck($zrank5))
  412.     endif
  413.     If $read = "zrank6" Then
  414.     MsgBox(0, "PacketFakor", "Sent /zrank 6 (Golden Spear + Golden Hammer) emote ")
  415.     APICmd("PacketFakor", CreatePck($zrank6))
  416.     endif
  417.     If $read = "zrank7" Then
  418.     MsgBox(0, "PacketFakor", "Sent /zrank 7 (Golden Spear + Golden Hammer + Copper Axe) emote ")
  419.     APICmd("PacketFakor", CreatePck($zrank7))
  420.     endif
  421.     If $read = "zrank8" Then
  422.     MsgBox(0, "PacketFakor", "Sent /zrank 8 (Golden Spear + Golden Hammer + Silver Axe) emote ")
  423.     APICmd("PacketFakor", CreatePck($zrank8))
  424.     endif
  425.     If $read = "zrank9" Then
  426.     MsgBox(0, "PacketFakor", "Sent /zrank 9 (Golden Spear + Golden Hammer + Golden Axe) emote ")
  427.     APICmd("PacketFakor", CreatePck($zrank9))
  428.     endif
  429.     If $read = "zrank10" Then
  430.     MsgBox(0, "PacketFakor", "Sent /zrank 10 (Golden Spear + Golden Hammer + Golden Axe + Copper Sword) emote ")
  431.     APICmd("PacketFakor", CreatePck($zrank10))
  432.     endif
  433.     If $read = "zrank11" Then
  434.     MsgBox(0, "PacketFakor", "Sent /zrank 11 (Golden Spear + Golden Hammer + Golden Axe + Silver Sword) emote ")
  435.     APICmd("PacketFakor", CreatePck($zrank11))
  436.     endif
  437.     If $read = "zrank12" Then
  438.     MsgBox(0, "PacketFakor", "Sent /zrank 12 (Golden Spear + Golden Hammer + Golden Axe + Golden Sword) emote ")
  439.     APICmd("PacketFakor", CreatePck($zrank12))
  440.     endif
  441. EndFunc
  442.  
  443. Func _aionwread()
  444.    
  445.     $emoteAgentID = IniRead("S2C.ini", "Emotes", "Target", "NotFound")
  446.    
  447.     $whiteaionw = "920016000000"&ToHex($emoteAgentID,4)&"00000C000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  448.     $darkaionw = "920016000000"&ToHex($emoteAgentID,4)&"000001000000920013000000"&ToHex($emoteAgentID,4)&"0000b9403536"
  449.    
  450.     $read = GUICtrlRead($aionw)
  451.     If $read = "whitewings" Then
  452.     MsgBox(0, "PacketFakor", "Sent /aion (White Aion Wings) emote ")
  453.     APICmd("PacketFakor", CreatePck($whiteaionw))
  454.     endif
  455.     If $read = "darkwings" Then
  456.     MsgBox(0, "PacketFakor", "Sent /aion (Dark Aion Wings) emote ")
  457.     APICmd("PacketFakor", CreatePck($darkaionw))
  458.     endif
  459. EndFunc
  460.  
  461. #endregion
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472. #region agent packets
  473.  
  474.  
  475. Func _agentlooklike()
  476.     $read = GUICtrlRead($agentlooklike)
  477.     If $read = "RubyDjinn" Then
  478.             _writerubydjinn()
  479.     endif
  480.        
  481. EndFunc  
  482.  
  483.  
  484.  
  485. Func _writerubydjinn()
  486. IniWrite("S2C.ini", "AgentSpawning", "modelId", "0x10E7")
  487. IniWrite("S2C.ini", "AgentSpawning", "modelFile", "0x0255ED")
  488. IniWrite("S2C.ini", "AgentSpawning", "modelFile2", "0x02560F")
  489. IniWrite("S2C.ini", "AgentSpawning", "spawnagentId", "971")
  490. EndFunc  
  491.  
  492. Func _writemallyx()
  493. IniWrite("S2C.ini", "AgentSpawning", "modelId", "Ich")
  494. IniWrite("S2C.ini", "AgentSpawning", "modelFile", "Bin")
  495. IniWrite("S2C.ini", "AgentSpawning", "modelFile2", "Ein")
  496. IniWrite("S2C.ini", "AgentSpawning", "spawnagentId", "Test")
  497. EndFunc  
  498.  
  499.  
  500. Func _agentspawnfunc()
  501.  
  502. $modelId = IniRead("S2C.ini", "AgentSpawning", "modelId", "NotFound")
  503. $modelFile = IniRead("S2C.ini", "AgentSpawning", "modelFile", "NotFound")
  504. $modelFile2 = IniRead("S2C.ini", "AgentSpawning", "modelFile2", "NotFound")
  505. $spawnagentId = IniRead("S2C.ini", "AgentSpawning", "spawnagentId", "NotFound")&+$i
  506.  
  507.             $i=$i+1
  508.             $cbType="float"
  509.             CmdCB($CA_GetCoords,-2)
  510.             $spawn = "4A 00 "&ToHex($modelId)&" "&ToHex($modelFile)&" 00 00 00 00 00 00 00 "&ToHex(GUICtrlRead($currentsize),2)&" 00 00 00 00 0C 02 00 00 03 0A 04 00 AD 3D 88 D6 C7 E1 B6 1D"
  511.             $spawn&= "4B 00 "&ToHex($modelId)&" 01 00 "&ToHex($modelFile2)
  512.             $spawn&= "8E 00 "&ToHex($spawnagentId)&" 04 00 91 7A 6E D7 BF CF 28 69"
  513.             $spawn&= "E2 00 "&ToHex($spawnagentId)&" 00 00 00 00"
  514.             $spawn&= "15 00 "&ToHex($spawnagentId)&" "&ToHex($modelId,4)&" 00 20 01 09 "&ToHex(_FloatToInt($cbVar[0]))&" "&ToHex(_FloatToInt($cbVar[1]))&" 00 00 00 00 80 3F 00 00 00 00 01 00 00 48 43 00 00 80 3F 00 00 40 41 63 6E 6F 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 7F 00 00 80 7F 00 00 00 00 00 00 00 00 80 7F 00 00 80 7F 00 00"
  515.             $spawn&= "61 00 "&ToHex($spawnagentId)&" 00 00 00 00 00 00 00 00"
  516.             APICmd("PacketFakor", CreatePck($spawn))
  517.  
  518.  
  519. Endfunc
  520.  
  521. #endregion
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. #region effects
  534.  
  535.  
  536. func _killtarget()
  537.     APICmd("PacketFakor", CreatePck("e300"&ToHex($TargetID)&"10000000"))
  538. endfunc
  539.  
  540. func _alivetarget()
  541.     APICmd("PacketFakor", CreatePck("e300"&ToHex($TargetID)&"00000000"))
  542. endfunc
  543.  
  544. func _greenagent()
  545. $color = "92001A000000"&ToHex($AgentID,4)&"000001000000"
  546. APICmd("PacketFakor", CreatePck($color))           
  547. endfunc
  548.  
  549. func _lilaagent()
  550. $color = "92001A000000"&ToHex($AgentID,4)&"000002000000"
  551. APICmd("PacketFakor", CreatePck($color))           
  552. endfunc
  553.  
  554. func _pinkagent()
  555. $color = "92001A000000"&ToHex($AgentID,4)&"000004000000"
  556. APICmd("PacketFakor", CreatePck($color))           
  557. endfunc
  558.  
  559. func _redagent()
  560. $color = "92001A000000"&ToHex($AgentID,4)&"000005000000"
  561. APICmd("PacketFakor", CreatePck($color))           
  562. endfunc
  563.  
  564. func _limeagent()
  565. $color = "92001A000000"&ToHex($AgentID,4)&"000007000000"
  566. APICmd("PacketFakor", CreatePck($color))           
  567. endfunc
  568.  
  569. func _yellowagent()
  570. $color = "92001A000000"&ToHex($AgentID,4)&"000009000000"
  571. APICmd("PacketFakor", CreatePck($color))           
  572. endfunc
  573.  
  574. func _brownagent()
  575. $brown = 10
  576. $color = "92001A000000"&ToHex($AgentID,4)&"0000"&ToHex(GUICtrlRead($brown),2)&"000000"
  577. APICmd("PacketFakor", CreatePck($color))           
  578. endfunc
  579.  
  580. #endregion
  581.  
  582.  
  583.  
  584.  
  585.  
  586. #region funcs
  587.  
  588. Func me()
  589. $oldcbType=$cbType
  590. $cbType = "int"
  591. CmdCB($CA_GetMyId)
  592. $cbType=$oldcbType
  593. return $cbVar[0]
  594. EndFunc
  595.  
  596.  
  597. Func target()
  598. $oldcbType=$cbType
  599. $cbType = "int"
  600. CmdCB($CA_GetCurrentTarget)
  601. $cbType=$oldcbType
  602. return $cbVar[0]
  603. EndFunc
  604.  
  605. Func CreateUGVPck($stat, $agent, $value)
  606.     Return CreatePck("92 00 "&ToHex($stat)&ToHex($agent)&ToHex($value))
  607. EndFunc
  608. Func CreatePck($buffer)
  609.     $buffer = StringStripWS($buffer, 8)
  610.     $aBuf = StringSplit(ToHex(GetBufferLen($buffer),4)&$buffer, "", 2)
  611.     $outBuf = ""
  612.     For $i = 0 To UBound($aBuf)-1 Step 2
  613.         $outBuf &= Chr(Number("0x"&$aBuf[$i]&$aBuf[$i+1]))
  614.     Next
  615.     Return $outBuf
  616. EndFunc
  617.  
  618.  
  619. Func GetBufferLen($buffer)
  620.     Return (StringLen($buffer) / 2)
  621. EndFunc
  622.  
  623.  
  624. Func _FloatToInt2($fFloat)
  625.     Local $tFloat, $tInt
  626.  
  627.     $tFloat = DllStructCreate("float")
  628.     $tInt = DllStructCreate("int", DllStructGetPtr($tFloat))
  629.     DllStructSetData($tFloat, 1, $fFloat)
  630.     Return DllStructGetData($tInt, 1)
  631. EndFunc
  632.  
  633.  
  634. Func SwapEnd($sInput)
  635.     $sReturn = ""
  636.  
  637.     For $i = (StringLen($sInput) / 2) To 0 Step -1
  638.         $sReturn &= StringMid($sInput, 1 + $i * 2, 2)
  639.     Next
  640.  
  641.     Return $sReturn
  642. EndFunc
  643.  
  644.  
  645. Func ToHex($int, $digits = 8)
  646.     Return SwapEnd(Hex($int, $digits))
  647. EndFunc
  648.  
  649.  
  650. Func APICmd($sPipeName, $sCmd)
  651.     Local $iRead = 0
  652.  
  653.     DllStructSetData($pInput, 1, $sCmd)
  654.  
  655.     $bSuccess = _NamedPipes_CallNamedPipe("\\.\\pipe\\" & $sPipeName, DllStructGetPtr($pInput), DllStructGetSize($pInput), _
  656.                                     DllStructGetPtr($pOutput), DllStructGetSize($pOutput), $iRead)
  657.  
  658.     Return DllStructGetData($pOutput, 1)
  659. EndFunc
  660.  
  661. Func APIStreamInit($sPipeName)
  662.     _NamedPipes_WaitNamedPipe("\\.\\pipe\\" & $sPipeName, 1000)
  663.     $hStream = _WinAPI_CreateFile("\\.\\pipe\\" & $sPipeName, 2, 6)
  664.     _NamedPipes_SetNamedPipeHandleState($hStream, 1, 0, 0, 0)
  665.     Return $hStream
  666. EndFunc
  667.  
  668. Func APIStreamCmd($hStream, $sCmd)
  669.     If Not $hStream Then Return
  670.  
  671.     Local $iRead = 0
  672.  
  673.     DllStructSetData($pInput, 1, $sCmd)
  674.  
  675.     _NamedPipes_TransactNamedPipe($hStream, DllStructGetPtr($pInput), DllStructGetSize($pInput), _
  676.                                     DllStructGetPtr($pOutput), DllStructGetSize($pOutput), $iRead)
  677.  
  678.     Return DllStructGetData($pOutput, 1)
  679. EndFunc
  680.  
  681. Func APIStreamClose($hStream)
  682.     If $hStream Then _WinAPI_CloseHandle($hStream)
  683. EndFunc
  684. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement