Vicate Posted December 20, 2009 Posted December 20, 2009 Hello :] I'm trying to create a 'stat calculator' for Mario Kart Wii. Basically, I have the stats of all karts/bikes and the stat-bonuses each character gives. I'd just like to create a program that calculates the stats for each char+kart combination. Inaccurate example: Let's say the 'Dolphin Chaser' Bike has 20 drift, and the Standard Kart has 10 drift. Let's also say that when driving with Bowser you have a +6 drift bonus, while Toad only gives a +2 drift bonus. I'm making the program with two drop-down (combo) boxes, one with karts+bikes and one with characters. I'd like to get it working to where (using the example): If you'd select the 'Dolphin Chaser' and 'Toad', it would display a 22(20+2) drift, whereas if you're driving with the same vehicle but with 'Bowser', it would display 26(20+6) drift, etc. Here's what I have so far, I'm just having difficulties getting it to add the information (using GUICtrlSetData): #include <GUIConstantsEx.au3> #Region ====GUI AREA=== GUICreate("Mario Kart Wii Calculator", 283, 165, 337, 285) ; will create a dialog box that when displayed is centered $Kart = GUICtrlCreateCombo("Select Kart/Bike", 10, 10) GUICtrlSetData(-1, "Bit Bike|Dolphin Dasher", 'Select Kart/Bike') $Char = GUICtrlCreateCombo("Select Character", 10, 40) GUICtrlSetData(-1, "Toadette|Bowser", 'Select Character') GUISetState() #EndRegion ===GUI AREA=== #Region ===BUTTONS=== While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE WEnd #EndRegion ===BUTTONS=== #Region ===BULK=== Func Calculate() $kRead = GUICtrlRead($Kart) $cRead = GUICtrlRead($Char) EndFunc #EndRegion ===BULK=== #Region ===SCRAP=== ;If $ Then ;GUICtrlSetData($DriftTotal, "Drift: " & $DriftK + $DriftC) <---Possibly the right way to go #EndRegion ===SCRAP=== Any help is greatly appreciated. Thanks in advance. -Chris
Mat Posted December 20, 2009 Posted December 20, 2009 Any help? expandcollapse popup#include <GUIConstantsEx.au3> #Region ====GUI AREA=== GUICreate("Mario Kart Wii Calculator", 283, 165, 337, 285) ; will create a dialog box that when displayed is centered $Kart = GUICtrlCreateCombo("Select Kart/Bike", 10, 10) GUICtrlSetData(-1, "Bit Bike|Dolphin Dasher", 'Select Kart/Bike') $Char = GUICtrlCreateCombo("Select Character", 10, 40) GUICtrlSetData(-1, "Toadette|Bowser", 'Select Character') GUISetState() #EndRegion ====GUI AREA=== #Region ===BUTTONS=== While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Kart, $Char Calculate ($Kart, $Char) EndSwitch WEnd #EndRegion ===BUTTONS=== #Region ===BULK=== Func Calculate($Kart, $Char) $kRead = GUICtrlRead($Kart) $cRead = GUICtrlRead($Char) $Total = 0 Switch $kRead Case "Bit Bike" $Total += 10 Case "Dolphin Dasher" $Total += 20 EndSwitch Switch $cRead Case "Toadette" $Total += 2 Case "Bowser" $Total += 6 EndSwitch MsgBox (0, "Result", $Total) EndFunc ;==>Calculate #EndRegion ===BULK=== #Region ===SCRAP=== ;If $ Then ;GUICtrlSetData($DriftTotal, "Drift: " & $DriftK + $DriftC) <---Possibly the right way to go #EndRegion ===SCRAP=== Mat AutoIt Project Listing
KaFu Posted December 20, 2009 Posted December 20, 2009 Something like this? Merry Christmas! expandcollapse popup#include <GUIConstantsEx.au3> GUICreate("Mario Kart Wii Calculator", 283, 165, 337, 285) ; will create a dialog box that when displayed is centered $Kart = GUICtrlCreateCombo("Select Kart/Bike", 10, 10) GUICtrlSetData(-1, "Bit Bike|Dolphin Dasher", 'Select Kart/Bike') $Char = GUICtrlCreateCombo("Select Character", 10, 40) GUICtrlSetData(-1, "Toadette|Bowser", 'Select Character') $Value_Label = GUICtrlCreateLabel("Value 0",10,140,130) GUISetState() Global $sSelection_Save Global $Value = 0 While 1 sleep(10) $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE then ExitLoop $sSelection = GUICtrlRead($Kart) & GUICtrlRead($Char) if $sSelection <> $sSelection_Save Then $Value = 0 Switch GUICtrlRead($Kart) Case "Bit Bike" $Value += 20 Case "Dolphin Dasher" $Value += 10 EndSwitch Switch GUICtrlRead($Char) Case "Toadette" $Value += 2 Case "Bowser" $Value += 6 EndSwitch GUICtrlSetData($Value_Label,"Value: " & $Value) $sSelection_Save = $sSelection endif WEnd OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
KaFu Posted December 20, 2009 Posted December 20, 2009 Any help?... barely beaten ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Vicate Posted December 21, 2009 Author Posted December 21, 2009 (edited) Thank you both for your replies :] Mat, that's just what I wanted, thanks! EDIT: Nevermind, guys. I got it. Thanks for your help Edited December 21, 2009 by Vicate
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now