Code:
BW_8158.name = "Ignite"
BW_8161.name = "Flame Shield"
BW_8164.name = "Flames of Rhuin"
'If Casting() = 8164 Or Casting() = 8163 Or Casting() = 8161 Or Casting() = 8158 Then MemAPI.Poke(gproc, Player.entity + Offset.castOffset, ByteIntOff)
If Casting() > 0 Then MemAPI.Poke(gproc, Player.entity + Offset.castOffset, ByteIntOff) 'Reset casting
If G_cooldown And Not cooldownCheck(G_cooldown_timestamp, G_cooldown, 1050) Then Exit Sub 'Global cooldown
'Fireball cooldown
timecheck = DateTime.Now - BW_fireball_timestamp
If timecheck.TotalMilliseconds >= 1125 And BW_fireball_cooldown = True Then BW_fireball_cooldown = False
'Sear cooldown
timecheck = DateTime.Now - BW_sear_timestamp
If timecheck.TotalMilliseconds >= 5125 And BW_sear_cooldown = True Then BW_sear_cooldown = False
'Firecage cooldown
timecheck = DateTime.Now - BW_fcage_timestamp
If timecheck.TotalMilliseconds >= 30125 And BW_fcage_cooldown = True Then BW_fcage_cooldown = False
If BW_8158.cooldown And cooldownCheck(BW_8158.timestamp, BW_8158.cooldown, 10050) Then BW_8158.cooldown = False 'Ignite cooldown
If BW_8164.cooldown And cooldownCheck(BW_8164.timestamp, BW_8164.cooldown, 216000000) Then BW_8164.cooldown = False 'Flames of rhuin cooldown
If BW_8161.cooldown And cooldownCheck(BW_8161.timestamp, BW_8161.cooldown, 216000000) Then BW_8161.cooldown = False 'Flame shield cooldown
'Buffs
If BW_8164.cooldown = False And Player.intAPC >= 30 Then
state.Text = BW_8164.name : pressKey(Keys.D6)
globalCd() : BW_8164 = cooldownActivate()
Exit Sub
End If
If BW_8161.cooldown = False And Player.intAPC >= 30 Then
state.Text = BW_8161.name : pressKey(Keys.D7)
globalCd() : BW_8161 = cooldownActivate()
Exit Sub
End If
If Enemy.bolFlag = True And Pathmode = False Then
If Enemy.distance > 1200 Then
Player.run = True
Exit Sub
ElseIf Enemy.distance < 1200 And Player.run = True Then
Player.run = False
End If
'Meltdown
If Enemy.distance <= 1125 And BW_Combustion > 35 Then
state.Text = "Casting Meltdown"
keybd_event(Keys.D4, MapVirtualKey(Keys.D4, 0), 0, 0)
keybd_event(Keys.D4, MapVirtualKey(Keys.D4, 0), 2, 0)
BW_Combustion = 0
G_cooldown_timestamp = DateTime.Now
G_cooldown = True
End If
'Ignite
If Enemy.distance <= 1125 And Player.intAPC >= 35 And BW_ignite_cooldown = False And spellIgnite.Checked Then
state.Text = "Casting Ignite"
keybd_event(Keys.D2, MapVirtualKey(Keys.D2, 0), 0, 0)
keybd_event(Keys.D2, MapVirtualKey(Keys.D2, 0), 2, 0)
G_cooldown_timestamp = DateTime.Now
G_cooldown = True
BW_Combustion += 5
BW_ignite_timestamp = DateTime.Now
BW_ignite_cooldown = True
Exit Sub
End If
'Scorched Earth
If Enemy.distance <= 350 And Player.intAPC >= 35 And spellSEarth.Checked Then
state.Text = "Casting Scorched Earth"
keybd_event(Keys.D8, MapVirtualKey(Keys.D8, 0), 0, 0)
keybd_event(Keys.D8, MapVirtualKey(Keys.D8, 0), 2, 0)
BW_Combustion += 10
G_cooldown_timestamp = DateTime.Now
G_cooldown = True
Exit Sub
End If
'Fireball
If Enemy.distance > 450 And BW_fireball_cooldown = False And Player.intAPC >= 30 And Player.run = False And Player.turn = False And spellFireball.Checked _
Or Enemy.distance > 350 And BW_fireball_cooldown = False And BW_sear_cooldown = True And spellSEarth.CheckState = False And Player.intAPC >= 30 And Player.run = False And Player.turn = False And spellFireball.Checked Then
state.Text = "Casting Fireball"
keybd_event(Keys.D1, MapVirtualKey(Keys.D1, 0), 0, 0)
keybd_event(Keys.D1, MapVirtualKey(Keys.D1, 0), 2, 0)
G_cooldown_timestamp = DateTime.Now
G_cooldown = True
BW_fireball_cooldown = True
While Casting() > 0
BW_fireball_timestamp = DateTime.Now
End While
BW_Combustion += 10
Exit Sub
End If
'Sear
If BW_sear_cooldown = False And Enemy.distance <= 1200 And Player.run = False And Player.turn = False And spellSear.Checked Then
state.Text = "Casting Sear"
keybd_event(Keys.D3, MapVirtualKey(Keys.D3, 0), 0, 0)
keybd_event(Keys.D3, MapVirtualKey(Keys.D3, 0), 2, 0)
G_cooldown_timestamp = DateTime.Now
G_cooldown = True
BW_sear_cooldown = True
While Casting() > 0
BW_sear_timestamp = DateTime.Now
End While
BW_Combustion += 25
Exit Sub
End If
Else
If Player.run = True And Pathmode = False Then
Player.run = False
Player.turn = False
Exit Sub
End If
End If