omfg2007 Posted December 11, 2007 Posted December 11, 2007 Hey im trying to make a program for a game thaty will give me information but i cant seem to do a few things I have looked all over the forums but dont know how *Make a % for the hp and mp using the curent / max *100=% *progress bar to show the % along with max and min *and have it autop update every 3 secs or so Thanks for all the help in advance and i apreciate it heres the code #include "_silkroadtool.au3" Local $pidSRO = WinGetProcess("SRO_Client") msgbox(0,"","X: " & _PositionX($pidSRO) & @LF & _ "X: " & _PositionY($pidSRO) & @LF & _ "Level: " & _Level($pidSRO) & @LF & _ "CurrentHP: " & _CurrentHP($pidSRO) & @LF & _ "MaxHP: " & _MaxHP($pidSRO) & @LF & _ "CurrentMP: " & _CurrentMP($pidSRO) & @LF & _ "MaxMP: " & _MaxMP($pidSRO) _ )
omfg2007 Posted December 11, 2007 Author Posted December 11, 2007 i odnt know hopw to set it to work like i want it to be like at the hp%
JustinReno Posted December 11, 2007 Posted December 11, 2007 GuiCtrlSetData($Progress, _CurrentHP($pidSRO))?
BrettF Posted December 11, 2007 Posted December 11, 2007 Something like this you need?? expandcollapse popup#include <GUIConstants.au3> ; Declare the inital values for HP etc... $HP = _CurrentHP($pidSRO) $HP_MAX = _MaxHP($pidSRO) $MP = _CurrentMP($pidSRO) $MP_MAX = _MaxMP($pidSRO) ;Calculate the Percenage $MP_PERCENT = Round($MP / $MP_MAX * 100, 0) $HP_PERCENT = Round($HP / $HP_MAX * 100, 0) ;Create the GUI $MAIN_GUI = GUICreate("Silkroad Online", 240, 50) ;Create a lable to tell us what we are seeing GUICtrlCreateLabel("HP", 8, 8, 19, 17) ;Create the progress to show us what we are seeing $HP_PROGRESS = GUICtrlCreateProgress(32, 6, 150, 17) ;Set the limit of it to 100. GUICtrlSetLimit(-1, 100, 0) ;Set the progress to show the % of the field. GUICtrlSetData(-1, $HP_PERCENT) ;Do the same for MP $HP_STATS = GUICtrlCreateLabel($HP & "/" & $HP_MAX, 192, 8, 36, 17) GUICtrlCreateLabel("MP", 8, 30, 20, 17) $MP_PROGRESS = GUICtrlCreateProgress(32, 28, 150, 17) GUICtrlSetLimit(-1, 100, 0) GUICtrlSetData(-1, $MP_PERCENT) $MP_STATS = GUICtrlCreateLabel($MP & "/" & $MP_MAX, 192, 30, 36, 17) ;Show our GUI GUISetState(@SW_SHOW) ;Start the message loop While 1 ;Get the message $nMsg = GUIGetMsg() ;Start the switch...case...event loop Switch $nMsg ;If $nMsg = to the exit button then Case $GUI_EVENT_CLOSE ;Exit Exit EndSwitch WEnd Now to update it... Look at TimerInit and TimerDiff. All you have to do is ReDeclare the varibles, and then set the data again (GUICTRLSETDATA().) See if you can try to work that bit out... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
SroMaster Posted December 13, 2007 Posted December 13, 2007 hey omfg2007 its m e 0x33 any way it works i seen that guy modified it but the problem is that when you hit the hide button does it suppost to hide the sroclient full screen to be minimized or or minimize the script it self.? [center]dbod.rar player created by auto3.0Visit Topic here==>[font="Arial Black"]CLICK HERE[/font]<==PovClipse tutorial:Similar to auto it , with this you can make anything[/center]
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