Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==============================Variables==============================
- Private noDartMode As Boolean = False
- Private noDartChangeDart As Boolean = False
- Private noDartDragoonMode As Byte = 0
- Private noDartLV As Short = 0
- Private noDartHP As Short = 0
- Private noDartAT As Short = 0
- Private noDartMAT As Short = 0
- Private noDartDF As Short = 0
- Private noDartMDF As Short = 0
- Private noDartSPD As Short = 0
- Private noDartDLV As Byte = 0
- Private noDartDAT As Short = 0
- Private noDartDMAT As Short = 0
- Private noDartDDF As Short = 0
- Private noDartDMDF As Short = 0
- Private noDartSaveAHIT As Short = 0
- Private noDartSaveMHIT As Short = 0
- Private noDartSaveAAV As Short = 0
- Private noDartSaveMAV As Short = 0
- Private noDartSaveHP As Short = 0
- Private noDartSaveMP As Short = 0
- Private noDartSaveSP As Short = 0
- Private noDartSaveAddSP As Short = 0
- Private noDartSaveAddDMG As Short = 0
- Private dartReplaceMode As Byte = 0
- Private switchToCharacter As Byte = 0
- Private waitForSpecial As Short = -1
- ==============================Game Loop (Runs always)==============================
- If (encounterValue = 0) Then
- ...
- Else
- If ((encounterValue >= 2500 And encounterValue <= 5130) And noDartMode = True And noDartChangeDart = False) Then
- writeByte(&HB125F0, 0)
- noDartChangeDart = True
- End If
- End If
- ...
- If (encounterValue = 0) Then
- writeShort(&HB1E488, 1)
- ItemChanges()
- If (noDartMode) Then
- If (switchToCharacter = 1) Then
- noDartSaveHP = readShort(&HB128C8)
- noDartSaveMP = readShort(&HB128CA)
- noDartSaveSP = readShort(&HB128CC)
- ElseIf (switchToCharacter = 2) Then
- noDartSaveHP = readShort(&HB128F4)
- noDartSaveMP = readShort(&HB128F6)
- noDartSaveSP = readShort(&HB128F8)
- ElseIf (switchToCharacter = 3) Then
- noDartSaveHP = readShort(&HB12920)
- noDartSaveMP = readShort(&HB12922)
- noDartSaveSP = readShort(&HB12924)
- ElseIf (switchToCharacter = 4) Then
- noDartSaveHP = readShort(&HB1294C)
- noDartSaveMP = readShort(&HB1294E)
- noDartSaveSP = readShort(&HB12950)
- ElseIf (switchToCharacter = 5) Then
- noDartSaveHP = readShort(&HB12978)
- noDartSaveMP = readShort(&HB1297A)
- noDartSaveSP = readShort(&HB1297C)
- ElseIf (switchToCharacter = 6) Then
- noDartSaveHP = readShort(&HB129A4)
- noDartSaveMP = readShort(&HB129A6)
- noDartSaveSP = readShort(&HB129A8)
- ElseIf (switchToCharacter = 7) Then
- noDartSaveHP = readShort(&HB129D0)
- noDartSaveMP = readShort(&HB129D2)
- noDartSaveSP = readShort(&HB129D4)
- End If
- End If
- End If
- If (noDartMode And encounterValue <= 5130) Then
- If (readByte(&HB155D0) = 12 Or readByte(&HB155D0) = 23 Or readByte(&HB155D0) = 8) Then
- writeByte(&HB155D0, 2)
- End If
- End If
- ==============================Battle End (One time on battle complete)==============================
- noDartChangeDart = False
- noDartDragoonMode = 0
- waitForSpecial = -1
- If (encounterValue = 9999) Then
- stsProgram.Text = "Unknown enemy data."
- Else
- If (noDartMode) Then
- writeByte(&HB125F0, switchToCharacter)
- End If
- End If
- ==============================Battle Loop (Loops every X00MS during battle)==============================
- If (noDartMode = True And dartReplaced = False) Then
- If (dartReplaceMode = 0) Then
- If (readByte(characterAddresses(0) - &HA4) >= 15 And readByte(characterAddresses(0) - &HA8) = 8) Then
- System.Threading.Thread.Sleep(1500)
- writeByte(characterAddresses(0) - &HA4, 16)
- If (readByte(characterAddresses(0) + &H7) = 0) Then
- writeByte(characterAddresses(0) + &H7, 32)
- End If
- writeByte(characterAddresses(0) - &H2, 1)
- writeShort(characterAddresses(0) + &H2, 100)
- dartReplaceMode = 1
- End If
- ElseIf (dartReplaceMode = 1) Then
- If (readByte(characterAddresses(0) - &HA4) = 96) Then
- writeByte(characterAddresses(0) - &HA4, 32)
- writeByte(&HAC5FCC, 1)
- dartReplaceMode = 2
- End If
- ElseIf (dartReplaceMode = 2) Then
- Dim characterAction As Byte = readByte(characterAddresses(0) - &HA8)
- If (characterAction = 24 Or characterAction = 26 Or characterAction = 136 Or characterAction = 138) Then
- writeShort(characterAddresses(0) + &H44, readShort(characterAddresses(0) + &H44) + 255)
- writeByte(&HB125F0, switchToCharacter)
- dartReplaceMode = 3
- End If
- ElseIf (dartReplaceMode = 3) Then
- Dim characterAction As Byte = readByte(characterAddresses(0) - &HA8)
- If (characterAction = 8) Then
- writeByte(characterAddresses(0) - &H2, noDartDLV)
- writeShort(characterAddresses(0) + &H34, noDartSaveAHIT)
- writeShort(characterAddresses(0) + &H36, noDartSaveMHIT)
- writeShort(characterAddresses(0) + &H38, noDartSaveAAV)
- writeShort(characterAddresses(0) + &H3A, noDartSaveMAV)
- partySlots(0) = readByte(&HB125F0)
- If (noDartDLV = 0) Then
- writeByte(characterAddresses(0) + &H6, 0)
- writeShort(characterAddresses(0) + &H2, 0)
- writeShort(characterAddresses(0) + &H4, 0)
- writeShort(characterAddresses(0) + &HA, 0)
- End If
- If (ubZeroSP = False) Then
- writeShort(characterAddresses(0) + &H2, noDartSaveSP)
- End If
- writeShort(characterAddresses(0), noDartSaveHP)
- writeShort(characterAddresses(0) + &H4, noDartSaveMP)
- If (readShort(characterAddresses(0)) > readShort(characterAddresses(0) + &H8)) Then
- writeShort(characterAddresses(0), readShort(characterAddresses(0) + &H8))
- End If
- If (readShort(characterAddresses(0) + &H4) > readShort(characterAddresses(0) + &HA)) Then
- writeShort(characterAddresses(0) + &H4, readShort(characterAddresses(0) + &HA))
- End If
- dartReplaceMode = 4
- If (additionChanges) Then
- If (partySlots(0) = 1) Then
- If (readByte(&HB128D9) = 12) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 2.285)))
- End If
- End If
- If (partySlots(0) = 3) Then
- If (readByte(&HB12931) = 15) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) + 60)))
- ElseIf (readByte(&HB12931) = 16) Then
- writeShort(characterAddresses(0) + &H114, CShort(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 1.4)))
- ElseIf (readByte(&HB12931) = 17) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 1.1666)))
- End If
- End If
- If (partySlots(0) = 5) Then
- If (readByte(&HB12989) = 12) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 2.285)))
- End If
- End If
- If (partySlots(0) = 6) Then
- If (readByte(&HB129B5) = 27) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 0.75)))
- End If
- End If
- If (partySlots(0) = 7) Then
- If (readByte(&HB129E1) = 19) Then
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 2)))
- ElseIf (readByte(&HB129E1) = 20) Then
- writeShort(characterAddresses(0) + &H112, 80)
- writeByte(characterAddresses(0) + &H114, CByte(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 2)))
- ElseIf (readByte(&HB129E1) = 21) Then
- writeShort(characterAddresses(0) + &H112, 50)
- writeShort(characterAddresses(0) + &H114, CUShort(Math.Ceiling(readByte(characterAddresses(0) + &H114) * 4)))
- End If
- End If
- End If
- If (halfSP) Then
- Dim equippedAddition = readByte(&HB128AD + (&H2C * partySlots(0)))
- Dim levelOffset = 0
- If (partySlots(0) = 0) Then
- levelOffset = equippedAddition
- ElseIf (partySlots(0) = 1 Or partySlots(0) = 5) Then
- levelOffset = equippedAddition - 8
- ElseIf (partySlots(0) = 3) Then
- levelOffset = equippedAddition - 14
- ElseIf (partySlots(0) = 4) Then
- levelOffset = equippedAddition - 29
- ElseIf (partySlots(0) = 6) Then
- levelOffset = equippedAddition - 23
- ElseIf (partySlots(0) = 7) Then
- levelOffset = equippedAddition - 19
- End If
- Dim additionLevel = readByte(&HB128AE + (&H2C * (partySlots(0)) + levelOffset))
- Dim totalSP = readShort(&HB128A2 + (&H2C * partySlots(0)))
- Dim spMulti As UShort = 65535
- If (partySlots(0) < 9) Then
- If (partySlots(0) = 0) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 0) Then
- spMulti = 65535 - 50 + 1
- ElseIf (equippedAddition = 1) Then
- spMulti = 0
- ElseIf (equippedAddition = 2) Then
- spMulti = 75
- ElseIf (equippedAddition = 3) Then
- spMulti = 0
- ElseIf (equippedAddition = 4) Then
- spMulti = 75
- ElseIf (equippedAddition = 5) Then
- spMulti = 65535 - 50 + 1
- ElseIf (equippedAddition = 6) Then
- spMulti = 65535 - 20 + 1
- End If
- Else
- spMulti = 65535 - 50 + 1
- End If
- ElseIf (partySlots(0) = 1 Or partySlots(0) = 5) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 8) Then
- spMulti = 65535 - 25 + 1
- ElseIf (equippedAddition = 9) Then
- spMulti = 65535 - 50 + 1
- ElseIf (equippedAddition = 10) Then
- spMulti = 75
- ElseIf (equippedAddition = 11) Then
- spMulti = 65535 - 40 + 1
- ElseIf (equippedAddition = 12) Then
- spMulti = 75
- End If
- Else
- spMulti = 65535 - 50 + 1
- If (equippedAddition = 11) Then
- spMulti = 65535 - 40 + 1
- End If
- End If
- ElseIf (partySlots(0) = 2 Or partySlots(0) = 8) Then
- Dim shanaSP As Long = shanaSPScan()
- writeByteU(shanaSP, 17)
- writeByteU(shanaSP + &H4, 25)
- writeByteU(shanaSP + &H8, 35)
- writeByteU(shanaSP + &HC, 50)
- writeByteU(shanaSP + &H10, 75)
- ElseIf (partySlots(0) = 3) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 15) Then
- spMulti = 75
- Else
- spMulti = 65535 - 50 + 1
- End If
- Else
- spMulti = 65535 - 50 + 1
- End If
- ElseIf (partySlots(0) = 4) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 29) Then
- spMulti = 65535 - 25 + 1
- ElseIf (equippedAddition = 30) Then
- spMulti = 65535 - 40 + 1
- ElseIf (equippedAddition = 31) Then
- spMulti = 0
- ElseIf (equippedAddition = 32) Then
- spMulti = 65535 - 20 + 1
- ElseIf (equippedAddition = 33) Then
- spMulti = 65535 - 30 + 1
- ElseIf (equippedAddition = 34) Then
- spMulti = 50
- End If
- Else
- spMulti = 65535 - 50 + 1
- If (equippedAddition = 30) Then
- spMulti = 65535 - 40 + 1
- ElseIf (equippedAddition = 32) Then
- spMulti = 65535 - 40 + 1
- ElseIf (equippedAddition = 33) Then
- spMulti = 65535 - 30 + 1
- End If
- End If
- ElseIf (partySlots(0) = 6) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 23) Then
- spMulti = 65535 - 10 + 1
- ElseIf (equippedAddition = 24) Then
- spMulti = 0
- ElseIf (equippedAddition = 25) Then
- spMulti = 70
- ElseIf (equippedAddition = 26) Then
- spMulti = 65535 - 10 + 1
- ElseIf (equippedAddition = 27) Then
- spMulti = 65535 - 50 + 1
- End If
- Else
- spMulti = 65535 - 50 + 1
- If (equippedAddition = 24) Then
- spMulti = 65535 - 45 + 1
- ElseIf (equippedAddition = 25) Then
- spMulti = 65535 - 20 + 1
- ElseIf (equippedAddition = 26) Then
- spMulti = 65535 - 10 + 1
- End If
- 'stsGame.Text = "" & (characterAddresses(i) + &H112) & "/" & equippedAddition & "/" & additionLevel & "/" & spMulti
- End If
- ElseIf (partySlots(0) = 7) Then
- If (additionLevel = 5) Then
- If (equippedAddition = 19) Then
- spMulti = 65535 - 25 + 1
- ElseIf (equippedAddition = 20) Then
- If (additionChanges) Then
- spMulti = 0
- Else
- spMulti = 65535 - 40 + 1
- End If
- ElseIf (equippedAddition = 21) Then
- If (additionChanges) Then
- spMulti = 65535 - 25 + 1
- Else
- spMulti = 65535 - 50 + 1
- End If
- End If
- Else
- If (equippedAddition = 19) Then
- spMulti = 65535 - 50 + 1
- ElseIf (equippedAddition = 20) Then
- spMulti = 65535 - 40 + 1
- ElseIf (equippedAddition = 21) Then
- If (additionChanges) Then
- spMulti = 65535 - 20 + 1
- Else
- spMulti = 65535 - 50 + 1
- End If
- End If
- End If
- End If
- If (spMulti <> 65535) Then
- writeShort(characterAddresses(0) + &H112, spMulti)
- End If
- End If
- End If
- dartReplaced = True
- End If
- End If
- End If
- For i As Integer = 0 To 2
- If (partySlots(0) < 9) Then
- If (i = 0 And dartReplaced) Then
- If (waitForSpecial = -1) Then
- For x As Integer = 0 To 2
- If ((readByte(characterAddresses(x) - &HA8) = 24 Or readByte(characterAddresses(x) - &HA8) = 11) And partySlots(x) < 9) Then
- waitForSpecial = x
- End If
- Next
- End If
- If (waitForSpecial = -1) Then
- If ((readByte(characterAddresses(0) - &HA8) >= 8 And readByte(characterAddresses(0) - &HA8) <= 18) And readByte(characterAddresses(0) - &HA4) <= 15 And readByte(characterAddresses(0) - &H54) <> 6) Then
- If (readByte(characterAddresses(0) - &HA8) = 10 And readByte(characterAddresses(0) - &HA4) = 96) Then
- Else
- If (readByte(characterAddresses(0) - &HA4) = switchToCharacter) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- Else
- If (readByte(characterAddresses(0) - &HA4) >= 15) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- Else
- If (readByte(characterAddresses(0) - &HA8) = 2) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- Else
- If (readByte(&HAC5FCC) >= 1) Then
- If (noDartDragoonMode = 0) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- ElseIf (noDartDragoonMode = 1) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- ElseIf (noDartDragoonMode = 2) Then
- writeByte(characterAddresses(0) + &H26A, 0)
- End If
- Else
- writeByte(characterAddresses(0) + &H26A, 0)
- End If
- End If
- End If
- End If
- End If
- Else
- If (readByte(characterAddresses(0) - &HA8) = 2) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- Else
- If (readByte(&HAC5FCC) >= 1) Then
- If (noDartDragoonMode = 0) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- ElseIf (noDartDragoonMode = 1) Then
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- ElseIf (noDartDragoonMode = 2) Then
- writeByte(characterAddresses(0) + &H26A, 0)
- End If
- Else
- writeByte(characterAddresses(0) + &H26A, switchToCharacter)
- End If
- End If
- End If
- Else
- writeByte(characterAddresses(0) + &H26A, 0)
- If (readByte(characterAddresses(waitForSpecial) - &HA4) >= 96) Then
- If (readByte(&HAC5FE9) = 255) Then
- writeByte(&HAC5FE8, partySlots(waitForSpecial))
- writeByte(&HB1E504, partySlots(waitForSpecial))
- End If
- waitForSpecial = -1
- End If
- End If
- End If
- ...
- End If
- Next
- ==============================Battle Load (One time on battle entry)==============================
- If (enemyAddresses(0) > 0) Then
- stsProgram.Text = "Stats changed. Reading values..."
- If (noDartMode) Then
- System.Threading.Thread.Sleep(2000)
- writeShort(characterAddresses(0) - &H2, noDartLV)
- writeShort(characterAddresses(0) + &H8, noDartHP)
- writeShort(characterAddresses(0) + &H2C, readShort(characterAddresses(0) + &H2C) + noDartAT)
- writeShort(characterAddresses(0) + &H2E, readShort(characterAddresses(0) + &H2E) + noDartMAT)
- writeShort(characterAddresses(0) + &H30, readShort(characterAddresses(0) + &H30) + noDartDF)
- writeShort(characterAddresses(0) + &H32, readShort(characterAddresses(0) + &H32) + noDartMDF)
- writeShort(characterAddresses(0) + &H2A, readShort(characterAddresses(0) + &H2A) + noDartSPD)
- writeShort(characterAddresses(0) + &HA4, noDartDAT)
- writeShort(characterAddresses(0) + &HA6, noDartDMAT)
- writeShort(characterAddresses(0) + &HA8, noDartDDF)
- writeShort(characterAddresses(0) + &HAA, noDartDMDF)
- writeShort(characterAddresses(0) + &H112, noDartSaveAddSP)
- writeShort(characterAddresses(0) + &H114, noDartSaveAddDMG)
- noDartSaveAHIT = readByte(characterAddresses(0) + &H34)
- noDartSaveMHIT = readByte(characterAddresses(0) + &H36)
- noDartSaveAAV = readByte(characterAddresses(0) + &H38)
- noDartSaveMAV = readByte(characterAddresses(0) + &H3A)
- writeShort(characterAddresses(0) + &H34, 0)
- writeShort(characterAddresses(0) + &H36, 0)
- writeShort(characterAddresses(0) + &H38, 100)
- writeShort(characterAddresses(0) + &H3A, 100)
- Dim levelStart As Integer = &HB128A6 '2C
- Dim helmetStart As Integer = &HB128A9 '2C
- Dim accStart As Integer = &HB128AC '2C
- Dim dragon As Byte = &H5A
- Dim ring As Byte = &H79
- Dim healthRing As Byte = &HB2
- Dim swapHPChangeCheck = 0.0
- If (readShort(characterAddresses(0) + &H118) = dragon) Then
- swapHPChangeCheck += 0.5
- End If
- If (readShort(characterAddresses(0) + &H11E) = ring) Then
- swapHPChangeCheck += 0.5
- End If
- If (readShort(characterAddresses(0) + &H11E) = healthRing) Then
- swapHPChangeCheck += 1
- End If
- If (swapHPChangeCheck >= 0.5) Then
- hpChangeCheck(0) = Math.Round(noDartHP * (swapHPChangeCheck + 1))
- End If
- If (swapHPChangeCheck >= 0.5 And breakHp = False) Then
- If (hpChangeCheck(0) > 9999) Then
- hpChangeCheck(0) = 9999
- End If
- End If
- If (noDartDLV > 0) Then
- Dim maxMP = 0
- Dim totalMP = 0
- If (noDartDLV = 1) Then
- maxMP = 20
- ElseIf (noDartDLV = 2) Then
- maxMP = 40
- ElseIf (noDartDLV = 3) Then
- maxMP = 60
- ElseIf (noDartDLV = 4) Then
- maxMP = 80
- ElseIf (noDartDLV = 5) Then
- maxMP = 100
- End If
- If (readShort(characterAddresses(0) + &H118) = &H5B) Then
- totalMP = 0.5
- End If
- If (readShort(characterAddresses(0) + &H11E) = &H7A) Then
- totalMP = 1
- End If
- writeShort(characterAddresses(0) + &HA, Math.Round(maxMP * (totalMP + 1)))
- End If
- End If
- For i As Integer = 0 To 2
- originalCharacterStats(i, 0) = readShort(characterAddresses(i) + &H8)
- originalCharacterStats(i, 1) = readShort(characterAddresses(i) + &H2C)
- originalCharacterStats(i, 2) = readShort(characterAddresses(i) + &H2E)
- originalCharacterStats(i, 3) = readShort(characterAddresses(i) + &H30)
- originalCharacterStats(i, 4) = readShort(characterAddresses(i) + &H32)
- originalCharacterStats(i, 5) = readShort(characterAddresses(i) + &H2A)
- If (hpChangeCheck(i) > 1) Then
- writeShort(characterAddresses(i) + &H8, CUShort(hpChangeCheck(i)))
- originalCharacterStats(i, 0) = readShort(characterAddresses(i) + &H8)
- End If
- Next
- Else
- ...
- End If
- If (noDartMode = True And cboAddition.SelectedIndex = 0) Then
- btnUnequipDart_Click()
- End If
- ...
- ==============================Setup (Pre battle)==============================
- Private Sub btnUnequipDart_Click() Handles btnUnequipDart.Click
- If (noDartMode) Then
- btnUnequipDart.Background = New SolidColorBrush(Color.FromArgb(255, 255, 168, 168))
- noDartMode = False
- writeByte(&HB128A8, 255)
- writeByte(&HB128A9, 255)
- writeByte(&HB128AA, 255)
- writeByte(&HB128AB, 255)
- writeByte(&HB128AC, 255)
- writeByte(&HB12898, 3)
- Else
- If (readByte(&HB12898) = 0) Then
- stsProgram.Text = "Please click on Check Dart first"
- Exit Sub
- End If
- Dim address As Integer = &HB12750
- Dim firstFreeSlot = -1
- Dim freeSlots = 0
- For i As Integer = 0 To 254
- If (readByte(address) = 255) Then
- If (firstFreeSlot < 0) Then
- firstFreeSlot = address
- End If
- freeSlots += 1
- End If
- address += 1
- Next
- If (freeSlots >= 5 Or (readByte(&HB128A8) = 255 And readByte(&HB128A9) = 255 And readByte(&HB128AA) = 255 And readByte(&HB128AB) = 255 And readByte(&HB128AC) = 255)) Then
- writeByte(firstFreeSlot, readByte(&HB128A8))
- writeByte(firstFreeSlot + 1, readByte(&HB128A9))
- writeByte(firstFreeSlot + 2, readByte(&HB128AA))
- writeByte(firstFreeSlot + 3, readByte(&HB128AB))
- writeByte(firstFreeSlot + 4, readByte(&HB128AC))
- writeByte(&HB128A8, 255)
- writeByte(&HB128A9, 255)
- writeByte(&HB128AA, 255)
- writeByte(&HB128AB, 255)
- writeByte(&HB128AC, 255)
- writeByte(&HB12898, 0)
- noDartMode = True
- btnUnequipDart.Background = New SolidColorBrush(Color.FromArgb(255, 168, 211, 255))
- battleTimer.Interval = TimeSpan.FromMilliseconds(400)
- stsProgram.Text = "No Dart activated, please select an addition."
- Else
- stsProgram.Text = "You do not have enough free slots."
- End If
- End If
- End Sub
- Private Sub cboAddition_Click() Handles cboAddition.SelectionChanged
- If (noDartMode = False) Then
- stsProgram.Text = "Switched back to Dart."
- writeByte(&HB128AD, 0)
- switchToCharacter = 0
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- If (cboAddition.SelectedIndex = 0) Then
- stsProgram.Text = "Switched back to Dart."
- writeByte(&HB128AD, 0)
- switchToCharacter = 0
- If (noDartMode) Then
- btnUnequipDart_Click()
- End If
- ElseIf (cboAddition.SelectedIndex = 1) Then
- switchToCharacter = 2
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- stsProgram.Text = "You will switch to Shana in battle."
- writeByte(&HB128AD, 255)
- writeByte(&HB128A8, readByte(&HB12900))
- writeByte(&HB128A9, readByte(&HB12901))
- writeByte(&HB128AA, readByte(&HB12902))
- writeByte(&HB128AB, readByte(&HB12903))
- writeByte(&HB128AC, readByte(&HB12904))
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 0
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB128FE), &HB6930C, &HB69678, readByte(&HB128FF))
- ElseIf (cboAddition.SelectedIndex >= 2 And cboAddition.SelectedIndex <= 6) Then
- switchToCharacter = 1
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 2
- If (readByte(&HB128DA + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 50
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 35
- ElseIf (selectedAddition = 3) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 75
- ElseIf (selectedAddition = 4) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 35
- End If
- writeByte(&HB128D9, selectedAddition + 8)
- stsProgram.Text = "You will switch to Lavitz in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 6)
- writeByte(&HB128A8, readByte(&HB128D4))
- writeByte(&HB128A9, readByte(&HB128D5))
- writeByte(&HB128AA, readByte(&HB128D6))
- writeByte(&HB128AB, readByte(&HB128D7))
- writeByte(&HB128AC, readByte(&HB128D8))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB128D2), &HB68F3C, &HB69618, readByte(&HB128D3))
- ElseIf (cboAddition.SelectedIndex >= 7 And cboAddition.SelectedIndex <= 10) Then
- switchToCharacter = 3
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 7
- If (readByte(&HB12932 + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 0
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 200
- ElseIf (selectedAddition = 3) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 150
- End If
- writeByte(&HB12931, selectedAddition + 14)
- stsProgram.Text = "You will switch to Rose in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 7)
- writeByte(&HB128A8, readByte(&HB1292C))
- writeByte(&HB128A9, readByte(&HB1292D))
- writeByte(&HB128AA, readByte(&HB1292E))
- writeByte(&HB128AB, readByte(&HB1292F))
- writeByte(&HB128AC, readByte(&HB12930))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB1292A), &HB69124, &HB69648, readByte(&HB1292B))
- ElseIf (cboAddition.SelectedIndex >= 11 And cboAddition.SelectedIndex <= 13) Then
- switchToCharacter = 7
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 11
- If (readByte(&HB129E2 + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 50
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 50
- End If
- writeByte(&HB129E1, selectedAddition + 19)
- stsProgram.Text = "You will switch to Kongol in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 8)
- writeByte(&HB128A8, readByte(&HB129DC))
- writeByte(&HB128A9, readByte(&HB129DD))
- writeByte(&HB128AA, readByte(&HB129DE))
- writeByte(&HB128AB, readByte(&HB129DF))
- writeByte(&HB128AC, readByte(&HB129E0))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB129DA), &HB6879C, &HB69528, readByte(&HB1292B))
- ElseIf (cboAddition.SelectedIndex >= 14 And cboAddition.SelectedIndex <= 18) Then
- switchToCharacter = 6
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 14
- If (readByte(&HB129B6 + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 75
- noDartSaveAddDMG = 50
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 100
- noDartSaveAddDMG = 35
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 0
- ElseIf (selectedAddition = 3) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 134
- ElseIf (selectedAddition = 4) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 200
- End If
- writeByte(&HB129B5, selectedAddition + 23)
- stsProgram.Text = "You will switch to Meru in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 9)
- writeByte(&HB128A8, readByte(&HB129B0))
- writeByte(&HB128A9, readByte(&HB129B1))
- writeByte(&HB128AA, readByte(&HB129B2))
- writeByte(&HB128AB, readByte(&HB129B3))
- writeByte(&HB128AC, readByte(&HB129B4))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB129AE), &HB68D54, &HB695B8, readByte(&HB129AF))
- ElseIf (cboAddition.SelectedIndex >= 19 And cboAddition.SelectedIndex <= 24) Then
- switchToCharacter = 4
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 19
- If (readByte(&HB1295E + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 50
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 35
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 102
- noDartSaveAddDMG = 0
- ElseIf (selectedAddition = 3) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 4) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 5) Then
- noDartSaveAddSP = 200
- noDartSaveAddDMG = 67
- End If
- writeByte(&HB1295D, selectedAddition + 29)
- stsProgram.Text = "You will switch to Haschel in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 10)
- writeByte(&HB128A8, readByte(&HB12958))
- writeByte(&HB128A9, readByte(&HB12959))
- writeByte(&HB128AA, readByte(&HB1295A))
- writeByte(&HB128AB, readByte(&HB1295B))
- writeByte(&HB128AC, readByte(&HB1295C))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB1292A), &HB68B6C, &HB69588, readByte(&HB1292B))
- ElseIf (cboAddition.SelectedIndex >= 25 And cboAddition.SelectedIndex <= 29) Then
- switchToCharacter = 5
- If (readByte(&HB125F4) = switchToCharacter) Then
- cboAddition.SelectedIndex = 0
- Exit Sub
- End If
- Dim selectedAddition = cboAddition.SelectedIndex - 25
- If (readByte(&HB1298A + selectedAddition) < 5) Then
- stsProgram.Text = "This addition is not maxed. "
- Exit Sub
- End If
- If (selectedAddition = 0) Then
- noDartSaveAddSP = 45
- noDartSaveAddDMG = 50
- ElseIf (selectedAddition = 1) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 100
- ElseIf (selectedAddition = 2) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 35
- ElseIf (selectedAddition = 3) Then
- noDartSaveAddSP = 0
- noDartSaveAddDMG = 75
- ElseIf (selectedAddition = 4) Then
- noDartSaveAddSP = 240
- noDartSaveAddDMG = 35
- End If
- writeByte(&HB12989, selectedAddition + 8)
- stsProgram.Text = "You will switch to Albert in battle."
- writeByte(&HB128AD, cboAddition.SelectedIndex + 11)
- writeByte(&HB128A8, readByte(&HB12984))
- writeByte(&HB128A9, readByte(&HB12985))
- writeByte(&HB128AA, readByte(&HB12986))
- writeByte(&HB128AB, readByte(&HB12987))
- writeByte(&HB128AC, readByte(&HB12988))
- CalculateSwitchToStats(readByte(&HB128A6), readByte(&HB12982), &HB68F3C, &HB69618, readByte(&HB12983))
- End If
- End Sub
- Private Sub CalculateSwitchToStats(level As Byte, sLevel As Byte, address As Integer, dAddress As Integer, dLevel As Byte)
- noDartLV = sLevel
- noDartDLV = dLevel
- level = level - 1
- sLevel = sLevel - 1
- dLevel = dLevel - 1
- noDartHP = readShort(address + (sLevel * 8))
- noDartSPD = CShort(readByte(&HB68987 + (level * 8))) - CShort(readByte((address + 3) + (sLevel * 8)))
- noDartSPD = noDartSPD * -1
- noDartAT = CShort(readByte(&HB68988 + (level * 8))) - CShort(readByte((address + 4) + (sLevel * 8)))
- noDartAT = noDartAT * -1
- noDartMAT = CShort(readByte(&HB68989 + (level * 8))) - CShort(readByte((address + 5) + (sLevel * 8)))
- noDartMAT = noDartMAT * -1
- noDartDF = CShort(readByte(&HB6898A + (level * 8))) - CShort(readByte((address + 6) + (sLevel * 8)))
- noDartDF = noDartDF * -1
- noDartMDF = CShort(readByte(&HB6898B + (level * 8))) - CShort(readByte((address + 7) + (sLevel * 8)))
- noDartMDF = noDartMDF * -1
- If (dLevel = -1) Then
- noDartDAT = 0
- noDartDMAT = 0
- noDartDDF = 0
- noDartDMDF = 0
- Else
- noDartDAT = readByte((dAddress) + (dLevel * 8))
- noDartDMAT = readByte((dAddress + 1) + (dLevel * 8))
- noDartDDF = readByte((dAddress + 2) + (dLevel * 8))
- noDartDMDF = readByte((dAddress + 3) + (dLevel * 8))
- End If
- End Sub
- ==============================In Battle Hotkey==============================
- If (command = (KEY_L1 + KEY_L2)) Then
- If (noDartMode) Then
- If (noDartDragoonMode = 0 Or noDartDragoonMode = 1) Then
- noDartDragoonMode = 2
- stsGame.Text = "No Dart Dragoon Mode changed to Magic."
- Else
- noDartDragoonMode = 1
- stsGame.Text = "No Dart Dragoon Mode changed to Addition."
- End If
- If (noDartDragoonMode = 2) Then
- writeAOB(&HB1E31C, "FF FF FF FF FF FF FF FF")
- writeAOB(&HB1E301, "FF FF FF FF FF FF FF FF")
- If (switchToCharacter = 1) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "05")
- writeAOB(&HB1E301, "05")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "07")
- writeAOB(&HB1E302, "07")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "06")
- writeAOB(&HB1E303, "06")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "08")
- writeAOB(&HB1E304, "08")
- End If
- ElseIf (switchToCharacter = 2) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "0B")
- writeAOB(&HB1E301, "0B")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "0A")
- writeAOB(&HB1E302, "0A")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "0C")
- writeAOB(&HB1E303, "0C")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "0D")
- writeAOB(&HB1E304, "0D")
- End If
- ElseIf (switchToCharacter = 3) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "0F")
- writeAOB(&HB1E301, "0F")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "10")
- writeAOB(&HB1E302, "10")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "12")
- writeAOB(&HB1E303, "12")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "13")
- writeAOB(&HB1E304, "13")
- End If
- ElseIf (switchToCharacter = 4) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "14")
- writeAOB(&HB1E301, "14")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "15")
- writeAOB(&HB1E302, "15")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "16")
- writeAOB(&HB1E303, "16")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "17")
- writeAOB(&HB1E304, "17")
- End If
- ElseIf (switchToCharacter = 5) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "0E")
- writeAOB(&HB1E301, "0E")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "1A")
- writeAOB(&HB1E302, "1A")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "11")
- writeAOB(&HB1E303, "11")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "08")
- writeAOB(&HB1E304, "08")
- End If
- ElseIf (switchToCharacter = 6) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "18")
- writeAOB(&HB1E301, "18")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "19")
- writeAOB(&HB1E302, "19")
- End If
- If (noDartDLV >= 3) Then
- writeAOB(&HB1E31E, "1B")
- writeAOB(&HB1E303, "1B")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31F, "1C")
- writeAOB(&HB1E304, "1C")
- End If
- ElseIf (switchToCharacter = 7) Then
- If (noDartDLV >= 1) Then
- writeAOB(&HB1E31C, "1D")
- writeAOB(&HB1E301, "1D")
- End If
- If (noDartDLV >= 2) Then
- writeAOB(&HB1E31D, "1E")
- writeAOB(&HB1E302, "1E")
- End If
- If (noDartDLV >= 5) Then
- writeAOB(&HB1E31D, "1E")
- writeAOB(&HB1E303, "1E")
- End If
- End If
- End If
- SuccessfulHotkey()
- End If
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement