Jump to content
Sign in to follow this  
Dragon10660

maybe someone can help me figure this out/help me

Recommended Posts

Dragon10660

ok im makeing this program for a game

this program is for useing some scrolls in this game

the stuff with <----- is wat i need help with

this code was done in koda

#include <GUIConstants.au3>

Opt("TrayMenuMode", 1)
#Region ### START Koda GUI section ### Form=e:\scroll user v1.kxf
$Form1_1 = GUICreate("Form1", 633, 494, 191, 142)
GUISetBkColor(0xFFFFFF)
$Main = GUICtrlCreateTab(0, 0, 633, 41)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Settings = GUICtrlCreateTabItem("Settings")
$Checkbox1 = GUICtrlCreateCheckbox("DodgeCheckBox", 80, 48, 17, 17)
$Checkbox2 = GUICtrlCreateCheckbox("DrugCheckBox", 80, 88, 17, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Sp/ExpCheckBox", 80, 128, 17, 17)
$Checkbox4 = GUICtrlCreateCheckbox("MoveCheckBox", 80, 160, 17, 17)
$Label2 = GUICtrlCreateLabel("Drug Scroll", 0, 88, 56, 17)
$Label3 = GUICtrlCreateLabel("Sp/Exp Scroll", 0, 128, 69, 17)
$Label4 = GUICtrlCreateLabel("Moving Scroll", 0, 160, 68, 17)
$DodgingProgress = GUICtrlCreateProgress(96, 224, 521, 17)
$DrugProgress = GUICtrlCreateProgress(96, 264, 521, 17)
$SpProgress = GUICtrlCreateProgress(96, 304, 521, 17)
$MovingProgress = GUICtrlCreateProgress(96, 344, 521, 17)
$Dodge2 = GUICtrlCreateList("", 184, 48, 49, 19)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
$Drug1 = GUICtrlCreateList("", 120, 88, 49, 19)
GUICtrlSetData(-1, "F1|F2|F3|F4")
$Dodge = GUICtrlCreateList("", 120, 48, 49, 19)
GUICtrlSetData(-1, "F1|F2|F3|F4")
$Drug2 = GUICtrlCreateList("", 184, 88, 49, 19)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
$Sp1 = GUICtrlCreateList("", 120, 120, 49, 19)
GUICtrlSetData(-1, "F1|F2|F3|F4")
$Sp2 = GUICtrlCreateList("", 184, 120, 49, 19)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
$Move1 = GUICtrlCreateList("", 120, 160, 49, 19)
GUICtrlSetData(-1, "F1|F2|F3|F4")
$Move2 = GUICtrlCreateList("", 184, 160, 49, 19)
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9")
$Label5 = GUICtrlCreateLabel("Dodge Timer", 0, 224, 65, 17)
$Label6 = GUICtrlCreateLabel("Drug Timer", 0, 264, 56, 17)
$Label7 = GUICtrlCreateLabel("Sp/Exp Timer", 0, 304, 69, 17)
$Label8 = GUICtrlCreateLabel("Moving Timer", 0, 344, 68, 17)
$Label1 = GUICtrlCreateLabel("Dodging Scroll", 0, 48, 73, 17)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Roha\My Documents\My Pictures\website\brand.gif", 328, 48, 257, 169, 0)
$About = GUICtrlCreateTabItem("About")
GUICtrlCreateEdit("", 40, 94, 337, 233)
GUICtrlSetData(-1, StringFormat("Thank You For Choosing My Tool\r\n\r\nHere a little Msg To Tell You What My Tool Does \r\n\r\nMy Tool Uses The Silkroad Event Scrolls\r\n\r\n\r\n\r\n\r\n\r\nBest Regards Dragon10660"))
GUICtrlSetState(-1, $GUI_DISABLE)
$Credits = GUICtrlCreateTabItem("Credits")
TraySetClick("9")
$MenuItem1 = TrayCreateItem("Getting Started")
$MenuItem2 = TrayCreateItem("Credits")
$MenuItem4 = TrayCreateItem("About ")
$MenuItem3 = TrayCreateItem("Exit")
$MenuItem6 = GUICtrlCreateMenu("&Info")
$MenuItem5 = GUICtrlCreateMenu("&Exit")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(10)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

i want it so that the dodging does every 1h and time work / pauses with it

for the drug its every 30mins

for the sp/xp its every 20 mins

and moveing scroll every 20mins

i want so when i hit the checkbox for dodging it start time and the 1hr start progress bar

when i uncheck it it stop timer and the progressbar time

same way with all of them

F1 F2 F3 F4 states the skill tab in the game 123456789 states the key slot in the game

so if i select skill tab F1 keyslot 3 it press F1 then keyslot 3 but only for dogeing or witch every one its by

ask if u need more instructions

if someone can help i will appreciate it thnx

Edited by Dragon10660

Share this post


Link to post
Share on other sites
martin

Could you reduce your request to one simple problem with the minimum code to show what you are trying to do and with an explaination of what you want to achieve. I don't find your notes give me enough information to know what is wanted, and having 5 controls all required to do the same things makes no sense to me.

EDIT: This post is no longer relevant because Dragon10660 changed the script and comments he posted.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Dragon10660

i added wat the 5 functions are for in above txt

Share this post


Link to post
Share on other sites
Mike23

dunno if its possible with autoit ;)

but when i wanne make a delay on a windows based device in C or C++. i use the windows clock time.

some1 else needs to tell you if that is possible with autoIT. maybe you can include windows.c somehow :(

then you wil have something like get current time.

drugs time = curunt time + 20 min

if current time == drugs time then

sell drugs ^_^

mike

Share this post


Link to post
Share on other sites
Dragon10660

u not for selling its for useing them

i made this script but i need it in a GUI and More Selections

but i made the new one in Koda though

Global $Paused = False
Global $Dodge = False
Global $Drug = False
Global $Exp = False
Global $Move = False

Global $DodgeTimer, $DrugTimer, $ExpTimer, $MoveTimer

HotKeySet("{F5}", "_Switch");"TogglePause"
HotKeySet("{F1}", "_Switch");"DodgeStart"
HotKeySet("{F2}", "_Switch");"DrugStart"
HotKeySet("{F3}", "_Switch");"ExpStart"
HotKeySet("{F6}", "_Switch");"MoveStart"
HotKeySet("{ESC}", "Terminate");"Terminate" / Exit

ToolTip('F5=Pause ESC=Exit F1=Dodge F2=Drug F3=Sp F6=Move"', 0, 0)

Opt("TrayMenuMode",1)
$getstartitem = TrayCreateItem("Getting Started")
$buttonitem  = TrayCreateItem("EveryThing To Know")
$versionitem    = TrayCreateItem("Version Info")
$credititem  = TrayCreateItem("Credits")
$aboutitem      = TrayCreateItem("About")
$changelogitem  = TrayCreateItem("Change Log")
$exititem      = TrayCreateItem("Exit")


While 1
    _PerformActions()
    Sleep(10);Always put a Sleep in your main loop, otherwise the CPU is stressed
    $msg = TrayGetMsg()
    
Select
    Case $msg = 0
            ContinueLoop
        Case $msg = $getstartitem   
            MsgBox(64,"How This Program Works","Go Ahead And Press What Ever HotKey Btw U Can Run 1-4 Scrolls At One Time U want Between DodgingScroll|DrugOfTyphoon|Exp/SpScroll   [Note] It Will Use Until u Quit Program Times Are Correct For Scrolls.")
        Case $msg = $versionitem
            MsgBox(64,"Version","Version 1.3 Copyighted  By ¤Dragon10660¤ ©")
        Case $msg = $credititem 
            MsgBox(64,"Credits","Made By ¤Dragon10660¤ Thanks Hussert For Your Help Thnx Bro And Epvpers For Ur Site ")
        Case $msg = $aboutitem
            Msgbox(64,"About","Scroll User Is A Program Made For Silkroad Drugs/Scrolls")
        Case $msg = $buttonitem 
            MsgBox(64,"EveryThing You Need To Know","F1 Dodging Scroll Slot 6 | F2 DrugOfTyphoon Slot 7 | F3 Sp/Exp Scroll Slot 8 | F6 Moving Scroll Slot 9")
        Case $msg = $changelogitem  
            MsgBox(64,"Change Log","Version 1.1---Fixed Bug With only useing 1 Scroll---Version 1.2 Added Moving Scroll Version 1.3---Reorganized The Code To Work Better And Faster")    
        Case $msg = $exititem
            ExitLoop
    EndSelect
    

WEnd

Func _Switch()
    
;----- Toggle actions -----
    Switch @HotKeyPressed;which hotkey was pressed?...
        Case "{F5}";toggle pause
            $Paused = Not $Paused
        Case "{F1}";toggle Dodge
            $Dodge = Not $Dodge
        Case "{F2}";toggle Drug
            $Drug = Not $Drug
        Case "{F3}";toggle Exp
            $Exp = Not $Exp
        Case "{F6}";toggle Move
            $Move = Not $Move
    EndSwitch

EndFunc;==>_Switch


Func _PerformActions()

;----- Check Paused -----
    If $Paused = True Then
        ToolTip('Script is "Paused"', 0, 0)
        Return
    EndIf
    
    
;----- Check Dodge -----
    If $Dodge = True And TimerDiff($DodgeTimer) > 3600000 Then; Timer Set To 1hr
        $DodgeTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Dodge Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("6")
    EndIf
    
;----- Check Drug -----
    If $Drug = True And TimerDiff($DrugTimer) > 1800000 Then; Timer Set To 30mins
        $DrugTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Drug Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("7")
    EndIf 
    

;----- Check Exp -----
    If $Exp = True And TimerDiff($ExpTimer) > 1200000 Then; Timer Set To 20mins
        $ExpTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Sp Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("8")
    EndIf
    
    
;----- Check Move -----
    If $Move = True And TimerDiff($MoveTimer) > 1200000 Then; Time Set To 20mins
        $MoveTimer = TimerInit()
        WinActivate("SRO_Client")
        ToolTip('Sp Started"', 0, 0)
        Send("{F4}")
        Sleep("1500")
        Send("9")
    EndIf
    
EndFunc;==>_PerformActions


Func Terminate()
    Exit 0
EndFunc;==>Terminate
Edited by Dragon10660

Share this post


Link to post
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
Sign in to follow this  

×