Jump to content

Help ?


omfg2007
 Share

Recommended Posts

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) _
        )
Link to comment
Share on other sites

Something like this you need??

#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... :)

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...