Heißt also ich müsste bei den ComboBoxen prinzipiell das gleiche machen...
EDIT: Hab was Gutes gefunden: _GUICtrlComboBoxEx_AddString(), damit kann ich dem String einen Parameter zuordnen...
Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIComboBoxEx.au3>
$Form2 = GUICreate("", 117, 171)
$Dex = GUICtrlCreateInput("Dex", 8, 40, 97, 25)
$Level = GUICtrlCreateInput("Level", 8, 8, 97, 25)
;combobox1 start
$Job = _GUICtrlComboBoxEx_Create($Form2,"",8, 104, 97, 120)
Global $jtz[13] = ["Vagrant","Mercenary","Acrobat","Assist","Magician","Knight","Blade","Jester","Ranger","Ringmaster","Billposter","Psykeeper","Elementor"]
Global $tjob[13] = [75,80,75,70,65,60,90,85,75,70,85,70,70]
_GUICtrlComboBoxEx_BeginUpdate($Job)
For $j = 0 To 12
_GUICtrlComboBoxEx_AddString($Job,$jtz[$j],-1,-1,-1,-1,$tjob[$j])
Next
_GUICtrlComboBoxEx_EndUpdate($Job)
;combobox1 end
;combobox2 start
$Weapon = _GUICtrlComboBoxEx_Create($Form2,"",8,72,97,120)
Global $jsz[10] = ["Sword (One Handed)","Sword (Two Handed)","Axe (One Handed)","Axe (Two Handed)","Stick","Knuckle","Wand","Staff","Yoyo","Bow"]
Global $twep[10] = [0.085,0.035,0.06,0.030,0.05,0.07,0.025,0.045,0.075,0.07]
_GUICtrlComboBoxEx_BeginUpdate($Weapon)
For $j = 0 To 9
_GUICtrlComboBoxEx_AddString($Weapon,$jsz[$j],-1,-1,-1,-1,$twep[$j])
Next
_GUICtrlComboBoxEx_EndUpdate($Weapon)
;combobox2 end
$Calculate = GUICtrlCreateButton("Calculate", 16, 136, 89, 25)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Calculate
$read1 = GUICtrlRead($Dex)
$read2 = GUICtrlRead($Level)
$read3 = _GUICtrlComboBoxEx_GetCurSel($Job)
$read4 = _GUICtrlComboBoxEx_GetCurSel($Weapon)
$jparam = _GUICtrlComboBoxEx_GetItemParam($Job,$read3)
$wparam = _GUICtrlComboBoxEx_GetItemParam($Weapon,$read4)
_calculate($read1,$read2,$wparam,$jparam)
EndSwitch
WEnd
Func _calculate($sdex,$slvl,$mod_wep,$mod_job)
Local $imodx[19] = [0.08,0.16,0.24,0.32,0.4,0.48,0.56,0.64,0.72,0.8,0.88,0.96,1.04,1.12,1.2,1.3,1.38,1.5,1.5]
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
For $i=0 To 18
If $imod>$i And $imod<$i+1 Then
$step3 = Round(Round(50 / (200 - $step1) * 0.5 + $imodx[$i],2) * 50)
MsgBox(0,"","Your Attackspeed in % is:" & @crlf &$step3)
ExitLoop
EndIf
Next
Else
MsgBox(0,"","Failed, over 187")
EndIf
Else
MsgBox(0,"","Failed, wrong Parameters")
EndIf
EndFunc
Iwie scheint _GUICtrlComboBoxEx_AddString($Weapon,$jsz[$j],-1,-1,-1,-1,$twep[$j]) die 0.0... in 0 umzuwandeln oô