Bullet Posted February 26, 2010 Share Posted February 26, 2010 expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> WinActivate("game") #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("macro", 631, 123, 234, 178) $Heal = GUICtrlCreateButton("Heal", 8, 16, 75, 25, $WS_GROUP) $Button1 = GUICtrlCreateButton("Mana", 8, 49, 75, 25, $WS_GROUP) GUICtrlCreateInput("", 88, 48, 49, 21) $Button2 = GUICtrlCreateButton("Bind F4", 8, 80, 75, 25, $WS_GROUP) GUICtrlCreateInput("", 88, 81, 49, 21) GUICtrlCreateInput("", 88, 16, 49, 21) $hp = GUICtrlCreateLabel("Coloque o HP necessário para healar. A magia de cura deve estar na hotkey F5.", 144, 16, 384, 17) $Label2 = GUICtrlCreateLabel("Coloque a Mana necessária para usar poções de mana.", 144, 48, 268, 17) $Label3 = GUICtrlCreateLabel("Substitua a Hotkey F4 por qualquer outra tecla do seu teclado.", 144, 82, 300, 17) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($Heal, "Heal") #EndRegion ### END Koda GUI section ### Global $Paused HotKeySet("{INS}", "TogglePause") HotKeySet("{DELETE}", "_Heal") While 1 = 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE EndSwitch Sleep(50) WEnd Exit Func _Heal() While 1 = 1 If PixelGetColor($hp,240) = 0x101008 then Sleep(200) ControlSend("game", "", "", "{F5}") Sleep(800) EndIf Sleep(100) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(1000) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Well, Idk where is the problem, but probally it is when i call the function clicking on the button. Or probally when I type the pixel x position - string $hp it doesnt work. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 26, 2010 Moderators Share Posted February 26, 2010 Bullet,Have you read the Announcement at the top of the forum? Does the game you are trying bot allow you to do such things?Please either show us where in the rules of the game it says you can use bots - or explain why your bot does not go against the rules set out in the announcement. Then we will be delighted to help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bullet Posted February 26, 2010 Author Share Posted February 26, 2010 Bullet,Have you read the Announcement at the top of the forum? Does the game you are trying bot allow you to do such things?Please either show us where in the rules of the game it says you can use bots - or explain why your bot does not go against the rules set out in the announcement. Then we will be delighted to help. M23This is a macro for Dungeon Siege, there isnt any rules against cheating in this game, also It is for my own since this game is offline I dont see any problems creating tools to make the game a bit less hard. Link to comment Share on other sites More sharing options...
GodlessSinner Posted February 26, 2010 Share Posted February 26, 2010 (edited) GUICtrlSetOnEvent($Heal, "Heal")- Heal & _Heal is not the same. Edited February 26, 2010 by Godless _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
Bullet Posted February 26, 2010 Author Share Posted February 26, 2010 (edited) - Heal & _Heal is not the same.thank you, but still doesnt work.If I use a value instead of the string $hp it works, so the problem is probally in the Input Box.edit: got it, working well.I have another doubt, If position x=14 it result in 1% of HP and If position x=131 = 100% of HPexample: If PixelGetColor($hp,240) = 0x101008 thenfor $hp = 14.there is any way to turn this range 14~131 in a percentage? Edited February 26, 2010 by Bullet Link to comment Share on other sites More sharing options...
GodlessSinner Posted February 26, 2010 Share Posted February 26, 2010 Then add Global $hp at start of your script.. _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
GodlessSinner Posted February 26, 2010 Share Posted February 26, 2010 131 - 14 = 117 117/100 = 1.17 1% = 1.17, then (current value - 14)/1.17 = x% _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
Bullet Posted February 26, 2010 Author Share Posted February 26, 2010 131 - 14 = 117117/100 = 1.171% = 1.17, then(current value - 14)/1.17 = x%thanks god. 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