Hello. I'm new to programming and am trying to make what I thought was going to be a simple automating shopping bot.
This program has a few tasks it needs to perform.
1)It needs to click on an NPC.
2)It needs to check for the variables I specify on items in the shop.
3)If the variables are found it needs to click on said item and a yes button.
4)If the item(s) are purchased or the variables are not found it needs to close the shop window.
5)It needs to sleep for a specified amount of time before repeating everything.
Here's what I have so far:
Code:
Private Sub Command1_Click()
End Sub
Private Sub Combo3_Change()
End Sub
Private Sub atype_Change()
End Sub
Private Sub a1_Click()
If atype.ListIndex = -1 Then Exit Sub
chose1.AddItem atype.Text
atype.RemoveItem atype.ListIndex
End Sub
Private Sub a2_Click()
If ael.ListIndex = -1 Then Exit Sub
chose1.AddItem ael.Text
ael.RemoveItem ael.ListIndex
End Sub
Private Sub a3_Click()
If atype.ListIndex = -1 Then Exit Sub
chose1.AddItem asuf.Text
asuf.RemoveItem asuf.ListIndex
End Sub
Private Sub a4_Click()
If atype.ListIndex = -1 Then Exit Sub
chose2.AddItem wel.Text
wel.RemoveItem wel.ListIndex
End Sub
Private Sub a5_Click()
If atype.ListIndex = -1 Then Exit Sub
chose2.AddItem wsuf.Text
wsuf.RemoveItem wsuf.ListIndex
End Sub
Private Sub Form_Load()
With atype
.AddItem "Leather"
.AddItem "Wooden"
.AddItem "Chain"
.AddItem "Copper"
.AddItem "Bronze"
.AddItem "Iron"
.AddItem "Cloth"
.AddItem "Pupil"
.AddItem "Desert"
.AddItem "Berserker"
.AddItem "Viking"
.AddItem "Gladiator"
.AddItem "Blood"
.AddItem "Initiate"
.AddItem "Traveler"
.AddItem "Thief"
.AddItem "Rogue"
.AddItem "Novice"
.AddItem "Apprentice"
.AddItem "Druidic"
.AddItem "Shaman"
.AddItem "Conjuror"
.AddItem "Wizard"
End With
With ael
.AddItem "All"
.AddItem "Sand"
.AddItem "Earth"
.AddItem "Granite"
.AddItem "Rock"
.AddItem "Air"
.AddItem "Breeze"
.AddItem "Gust"
.AddItem "Wind"
.AddItem "Flame"
.AddItem "Burn"
.AddItem "Fire"
.AddItem "Inferno"
.AddItem "Aqua"
.AddItem "Water"
.AddItem "Wave"
.AddItem "Tidal"
.AddItem "Cold"
.AddItem "Snow"
.AddItem "Frost"
.AddItem "Ice"
.AddItem "Shock"
.AddItem "Zap"
.AddItem "Volt"
.AddItem "Lightning"
.AddItem "Shadow"
.AddItem "Dark"
.AddItem "Shade"
.AddItem "Unholy"
.AddItem "Bright"
.AddItem "Light"
.AddItem "Radiant"
.AddItem "Gleaming"
.AddItem "Poison"
.AddItem "Taint"
.AddItem "Bio"
.AddItem "Venom"
.AddItem "Alleviation"
.AddItem "Soothe"
.AddItem "Remedy"
.AddItem "Pure"
End With
With asuf
.AddItem "Thorns"
.AddItem "Spikes"
.AddItem "Razors"
.AddItem "Ages"
.AddItem "Ease"
.AddItem "Sapling"
.AddItem "Vine"
.AddItem "Oak"
.AddItem "Spirit"
.AddItem "Soul"
.AddItem "Wanderer"
.AddItem "Wayfarer"
.AddItem "Pacing"
.AddItem "Haste"
.AddItem "Speed"
.AddItem "Jackal"
.AddItem "Fox"
.AddItem "Wolf"
.AddItem "Tiger"
.AddItem "Newt"
.AddItem "Frog"
.AddItem "Lizard"
.AddItem "Snake"
.AddItem "Snail"
.AddItem "Tortoise"
.AddItem "Feather"
.AddItem "Wings"
End With
With wel
.AddItem "All"
.AddItem "Sand"
.AddItem "Earth"
.AddItem "Granite"
.AddItem "Rock"
.AddItem "Air"
.AddItem "Breeze"
.AddItem "Gust"
.AddItem "Wind"
.AddItem "Flame"
.AddItem "Burn"
.AddItem "Fire"
.AddItem "Inferno"
.AddItem "Aqua"
.AddItem "Water"
.AddItem "Wave"
.AddItem "Tidal"
.AddItem "Cold"
.AddItem "Snow"
.AddItem "Frost"
.AddItem "Ice"
.AddItem "Shock"
.AddItem "Zap"
.AddItem "Volt"
.AddItem "Lightning"
.AddItem "Shadow"
.AddItem "Dark"
.AddItem "Shade"
.AddItem "Unholy"
.AddItem "Bright"
.AddItem "Light"
.AddItem "Radiant"
.AddItem "Gleaming"
.AddItem "Poison"
.AddItem "Taint"
.AddItem "Bio"
.AddItem "Venom"
.AddItem "Alleviation"
.AddItem "Soothe"
.AddItem "Remedy"
.AddItem "Pure"
End With
With wsuf
.AddItem "Blundering"
.AddItem "Leech"
.AddItem "Locust"
.AddItem "Bat"
.AddItem "Wraith"
.AddItem "Ages"
.AddItem "Bear"
.AddItem "Ease"
.AddItem "Magus"
.AddItem "Rabbit"
.AddItem "Cheetah"
End With
End Sub
Private Sub m1_Click()
If atype.ListIndex = -1 Then Exit Sub
m1.AddItem atype.Text
atype.RemoveItem atype.ListIndex
End Sub
Private Sub r1_Click()
If chose1.ListIndex = -1 Then Exit Sub
atype.AddItem chose1.Text
chose1.RemoveItem chose1.ListIndex
End Sub
Private Sub r2_Click()
If chose1.ListIndex = -1 Then Exit Sub
ael.AddItem chose1.Text
chose1.RemoveItem chose1.ListIndex
End Sub
Private Sub r3_Click()
If chose1.ListIndex = -1 Then Exit Sub
asuf.AddItem chose1.Text
chose1.RemoveItem chose1.ListIndex
End Sub
Private Sub r4_Click()
If chose2.ListIndex = -1 Then Exit Sub
wel.AddItem chose1.Text
chose2.RemoveItem chose2.ListIndex
End Sub
Private Sub r5_Click()
If chose2.ListIndex = -1 Then Exit Sub
wsuf.AddItem chose1.Text
chose2.RemoveItem chose2.ListIndex
End Sub
Code:
Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_MBUTTONDOWN = &H207
Public Const WM_MBUTTONUP = &H208
Public Sub mainproc()
End Sub
Can someone help me with what I need to do next?
Edit: In the GUI the top left list box is from an older screen shot before I decided to just list all the armor types regardless of armor class.