Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("", 117, 171)
$Dex = GUICtrlCreateInput("Dex", 8, 40, 97, 25)
$Level = GUICtrlCreateInput("Level", 8, 8, 97, 25)
$Job = GUICtrlCreateCombo("Job", 8, 104, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Vagrant|Mercenary|Acrobat|Assist|Magician|Knight|Blade|Jester|Ranger|Ringmaster|Billposter|Psykeeper|Elementor")
$Weapon = GUICtrlCreateCombo("Weapon", 8, 72, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Sword (One Handed)|Sword (Two Handed)|Axe (One Handed)|Axe (Two Handed)|Stick|Knuckle|Wand|Staff|Yoyo|Bow")
$Calculate = GUICtrlCreateButton("Calculate", 16, 136, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Calculate
$read1 = GUICtrlRead($Dex)
$read2 = GUICtrlRead($Level)
$read4 = GUICtrlRead($Job)
$read3 = GUICtrlRead($Weapon)
If $read4 = "Vagrant" Or $read4 = "Acrobat" Or $read4 = "Ranger" Then
Local $tjob = 75
ElseIf $read4 = "Magician" Then
Local $tjob = 65
ElseIf $read4 = "Mercenary" Then
Local $tjob = 80
ElseIf $read4 = "Assist" Or $read4 = "Ringmaster" Or $read4 = "Elementor" Or $read4 = "Psykeeper" Then
Local $tjob = 70
ElseIf $read4 = "Jester" Or $read4 = "Billposter" Then
Local $tjob = 85
ElseIf $read4 = "Blade" Then
Local $tjob = 90
ElseIf $read4 = "Knight" Then
Local $tjob = 60
EndIf
If $read3 = "Knuckle" Or $read3 = "Bow" Then
Local $twep = 0.070
ElseIf $read3 = "Sword (One Handed)" Then
Local $twep = 0.085
ElseIf $read3 = "Axe (One Handed)" Then
Local $twep = 0.060
ElseIf $read3 = "Axe (Two Handed)" Then
Local $twep = 0.030
ElseIf $read3 = "Sword (Two Handed)" Then
Local $twep = 0.035
ElseIf $read4 = "Stick" Then
Local $twep = 0.050
ElseIf $read4 = "Wand" Then
Local $twep = 0.025
ElseIf $read4 = "Staff" Then
Local $twep = 0.045
ElseIf $read4 = "Yoyo" Then
Local $twep = 0.075
EndIf
_calculate($read1,$read2,$twep,$tjob)
EndSwitch
WEnd
Func _calculate($sdex,$slvl,$mod_wep,$mod_job)
;If IsInt($slvl) And $slvl >= 1 And IsInt($sdex) And $sdex >= 15 Then
$step1 = Round(($slvl / 8 + $sdex * 4) * $mod_wep + $mod_job - 3)
If $step1 < 187 Then
$imod = $step1 * 0.1
MsgBox(0,"",$imod)
If $imod > 0 And $imod < 1 Then
Local $imodx = 0.08
ElseIf $imod >= 1 And $imod < 2 Then
Local $imodx = 0.16
ElseIf $imod >= 2 And $imod < 3 Then
Local $imodx = 0.24
ElseIf $imod >= 3 And $imod < 4 Then
Local $imodx = 0.32
ElseIf $imod >= 4 And $imod < 5 Then
Local $imodx = 0.4
ElseIf $imod >= 5 And $imod < 6 Then
Local $imodx = 0.48
ElseIf $imod >= 6 And $imod < 7 Then
Local $imodx = 0.56
ElseIf $imod >= 7 And $imod < 8 Then
Local $imodx = 0.64
ElseIf $imod >= 8 And $imod < 9 Then
Local $imodx = 0.72
ElseIf $imod >= 9 And $imod < 10 Then
Local $imodx = 0.8
ElseIf $imod >= 10 And $imod < 11 Then
Local $imodx = 0.88
ElseIf $imod >= 11 And $imod < 12 Then
Local $imodx = 0.96
ElseIf $imod >= 12 And $imod < 13 Then
Local $imodx = 1.04
ElseIf $imod >= 13 And $imod < 14 Then
Local $imodx = 1.12
ElseIf $imod >= 14 And $imod < 15 Then
Local $imodx = 1.2
ElseIf $imod >= 15 And $imod < 16 Then
Local $imodx = 1.3
ElseIf $imod >= 16 And $imod < 17 Then
Local $imodx = 1.38
ElseIf $imod >= 17 And $imod < 18 Then
Local $imodx = 1.5
ElseIf $imod >= 18 And $imod < 19 Then
Local $imodx = 1.5
EndIf
$step2 = Round(50 / (200 - $step1) * 0.5 + $imodx,2)
$step3 = Round($step2 * 50)
MsgBox(0,"","Your Attackspeed in % is:" & @crlf &$step3)
Else
MsgBox(0,"","Failed, over 187")
EndIf
;EndIf
EndFunc
Kleiner Attackspeed-Kalkulator für Flyff (ohne Buffs) xD
Code:
If IsInt($slvl) And $slvl >= 1 And IsInt($sdex) And $sdex >= 15 Then
...
EndIf
Mit der Abfrage funzt _calculate nich mehr... find nur gerade nich den Fehler
EDIT:
Code:
StringIsDigit($slvl) And $slvl >= 1 And StringIsDigit($sdex) And $sdex >= 15
Hm... naja hier mal der fertige Kalkulator xD
Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("", 117, 171)
$Dex = GUICtrlCreateInput("Dex", 8, 40, 97, 25)
$Level = GUICtrlCreateInput("Level", 8, 8, 97, 25)
$Job = GUICtrlCreateCombo("Job", 8, 104, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Vagrant|Mercenary|Acrobat|Assist|Magician|Knight|Blade|Jester|Ranger|Ringmaster|Billposter|Psykeeper|Elementor")
$Weapon = GUICtrlCreateCombo("Weapon", 8, 72, 97, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Sword (One Handed)|Sword (Two Handed)|Axe (One Handed)|Axe (Two Handed)|Stick|Knuckle|Wand|Staff|Yoyo|Bow")
$Calculate = GUICtrlCreateButton("Calculate", 16, 136, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Calculate
$read1 = GUICtrlRead($Dex)
$read2 = GUICtrlRead($Level)
$read4 = GUICtrlRead($Job)
$read3 = GUICtrlRead($Weapon)
If $read4 = "Vagrant" Or $read4 = "Acrobat" Or $read4 = "Ranger" Then
Local $tjob = 75
ElseIf $read4 = "Magician" Then
Local $tjob = 65
ElseIf $read4 = "Mercenary" Then
Local $tjob = 80
ElseIf $read4 = "Assist" Or $read4 = "Ringmaster" Or $read4 = "Elementor" Or $read4 = "Psykeeper" Then
Local $tjob = 70
ElseIf $read4 = "Jester" Or $read4 = "Billposter" Then
Local $tjob = 85
ElseIf $read4 = "Blade" Then
Local $tjob = 90
ElseIf $read4 = "Knight" Then
Local $tjob = 60
EndIf
If $read3 = "Knuckle" Or $read3 = "Bow" Then
Local $twep = 0.070
ElseIf $read3 = "Sword (One Handed)" Then
Local $twep = 0.085
ElseIf $read3 = "Axe (One Handed)" Then
Local $twep = 0.060
ElseIf $read3 = "Axe (Two Handed)" Then
Local $twep = 0.030
ElseIf $read3 = "Sword (Two Handed)" Then
Local $twep = 0.035
ElseIf $read4 = "Stick" Then
Local $twep = 0.050
ElseIf $read4 = "Wand" Then
Local $twep = 0.025
ElseIf $read4 = "Staff" Then
Local $twep = 0.045
ElseIf $read4 = "Yoyo" Then
Local $twep = 0.075
EndIf
_calculate($read1,$read2,$twep,$tjob)
EndSwitch
WEnd
Func _calculate($sdex,$slvl,$mod_wep,$mod_job)
If StringIsDigit($slvl) And $slvl >= 1 And StringIsDigit($sdex) And $sdex >= 15 Then
$step1 = Round(($slvl / 8 + $sdex * 4) * $mod_wep + $mod_job - 3)
If $step1 < 187 Then
$imod = $step1 * 0.1
MsgBox(0,"",$imod)
If $imod > 0 And $imod < 1 Then
Local $imodx = 0.08
ElseIf $imod >= 1 And $imod < 2 Then
Local $imodx = 0.16
ElseIf $imod >= 2 And $imod < 3 Then
Local $imodx = 0.24
ElseIf $imod >= 3 And $imod < 4 Then
Local $imodx = 0.32
ElseIf $imod >= 4 And $imod < 5 Then
Local $imodx = 0.4
ElseIf $imod >= 5 And $imod < 6 Then
Local $imodx = 0.48
ElseIf $imod >= 6 And $imod < 7 Then
Local $imodx = 0.56
ElseIf $imod >= 7 And $imod < 8 Then
Local $imodx = 0.64
ElseIf $imod >= 8 And $imod < 9 Then
Local $imodx = 0.72
ElseIf $imod >= 9 And $imod < 10 Then
Local $imodx = 0.8
ElseIf $imod >= 10 And $imod < 11 Then
Local $imodx = 0.88
ElseIf $imod >= 11 And $imod < 12 Then
Local $imodx = 0.96
ElseIf $imod >= 12 And $imod < 13 Then
Local $imodx = 1.04
ElseIf $imod >= 13 And $imod < 14 Then
Local $imodx = 1.12
ElseIf $imod >= 14 And $imod < 15 Then
Local $imodx = 1.2
ElseIf $imod >= 15 And $imod < 16 Then
Local $imodx = 1.3
ElseIf $imod >= 16 And $imod < 17 Then
Local $imodx = 1.38
ElseIf $imod >= 17 And $imod < 18 Then
Local $imodx = 1.5
ElseIf $imod >= 18 And $imod < 19 Then
Local $imodx = 1.5
EndIf
$step2 = Round(50 / (200 - $step1) * 0.5 + $imodx,2)
$step3 = Round($step2 * 50)
MsgBox(0,"","Your Attackspeed in % is:" & @crlf &$step3)
Else
MsgBox(0,"","Failed, over 187")
EndIf
Else
MsgBox(0,"","Failed, wrong Parameters")
EndIf
EndFunc