mrbloody369 Posted September 18, 2007 Share Posted September 18, 2007 (edited) For the last two week I've gotten adicted to IllusionsRO a private server based off Ragnarok Online, like most private servers of RO it has custome rate's for every thing, their for not calc to help me on my ways as a BlackSmith in the game.I was given the formulas to base the main calc on:Main Calc(lvl 1 items)Skill Value (5*skill lvl)+ Job * 0.2 + DEX * 0.1 + LUK * 0.1 + 50lvl 2 items have a 20% less chance to makelvl 3 items have a 30% less chance to make~~~~Bare in mind , I'm new to autoit and this is my first real GUI expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\matthew bloodgood\my documents\test\b-ilro_blacksmith_cala.kxf $dlgTabbed = GUICreate("Bloody's RevIllusion BlackSmithing Calc (Beta vs 2.0.0.2) ", 671, 148, 192, 119) GUISetIcon("D:\005.ico") $pr=0 $wl=0 $PageControl1 = GUICtrlCreateTab(103, 8, 400, 55) $TabSheet1 = GUICtrlCreateTabItem("Dagger") $Combo1 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," KNIFE | CUTTER | MAIN GAUCHE | DIRK | DAGGER | STILETTO | GLADIUS | DAMASCUS ") GUICtrlSetState(-1,$GUI_SHOW) ;~~ SHOW FIRST ;~~ End Tab 1 (0) $TabSheet2 = GUICtrlCreateTabItem(" Sword ") $Combo2 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," SWORD | FALCHION | BLADE | RAPIER | SCIMITAR | RING POMMEL SABER | SABER | HAEDONGGUM | TSURUGI | FLAMBERGE ") ;~~ end tab 2 (1) $TabSheet3 = GUICtrlCreateTabItem("Two-Handed Sword") $Combo3 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," KATANA | SLAYER | BASTARD SWORD | TWO-HANDED SWORD | BROAD SWORD | CLAYMORE ") ;~~ End tab 3 (2) $TabSheet4 = GUICtrlCreateTabItem(" Axe") $Combo4 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," AXE | BATTLE AXE | HAMMER | BUSTER | TWO-HANDED AXE ") ;~~ Eand tab 4 (3) $TabSheet5 = GUICtrlCreateTabItem("Brass Knuckle") $Combo5 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," WAGHNAK | KNUCKLE DUSTER | STUDDED KNOKLES | FIST | CLAW | FINGER ") ;~~ Eand tab 5 (4) $TabSheet6 = GUICtrlCreateTabItem(" Spear") $Combo9 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," JAVELIN | SPEAR | PIKE | GUISARME | GLAIVE | PARTIZAN | TRIDENT | HALBERD | LANCE ") ;~~ Eand tab 6 (5) $TabSheet7 = GUICtrlCreateTabItem(" Mace") $Combo10 = GUICtrlCreateCombo("NONE", 136, 35, 330, 25) GUICtrlSetData(-1," CLUB | MACE | SMASHER | FAIL | CHAIN | MORNING STAR | SWORD MACE | STUNNER ") ;~~ Eand tab 6 (5) GUICtrlCreateTabItem("") ;~End Tab items $EXIT = GUICtrlCreateButton("&EXIT", 270, 104, 75, 25, 0) $OK = GUICtrlCreateButton("&OK", 350, 104, 75, 25, 0) $JOB = GUICtrlCreateInput("0", 56, 8, 33, 21) $DEX = GUICtrlCreateInput("0", 56, 40, 33, 21) $LUC = GUICtrlCreateInput("0", 56, 72, 33, 21) $Label1 = GUICtrlCreateLabel("JOB LVL", 8, 13, 46, 17) $Label2 = GUICtrlCreateLabel("DEX LVL", 8, 44, 48, 17) $Label3 = GUICtrlCreateLabel("LUC LVL", 8, 76, 47, 17) $SLVL = GUICtrlCreateInput("1", 56, 104, 33, 21) $Label4 = GUICtrlCreateLabel("Skill LvL", 8, 109, 44, 17) $Combo6 = GUICtrlCreateCombo("No ANVIL", 112, 72, 145, 25) GUICtrlSetData(-1," Normal Anvil | Oridecon Anvil | Golden Anvil | Emperium ") $Combo7 = GUICtrlCreateCombo(" No Star Crumb ", 272, 72, 145, 25) GUICtrlSetData(-1," 1 Star Crum | 2 Star Crum | 3 Star Crum ") ;~~ -15% Per Star Crum $Combo8 = GUICtrlCreateCombo("NO Ench. Stone", 112, 104, 145, 25) GUICtrlSetData(-1," Flame Heart | Mystic Frozen | Grat Nature | Rought Wind ") ;~~ Elem. Stone -20% $Group1 = GUICtrlCreateGroup("Percentage", 520, 16, 137, 105) $Label5 = GUICtrlCreateLabel($pr, 536, 48, 97, 52) GUICtrlSetFont(-1, 30, 400, 0, "MS Sans Serif") GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;~~End interface While 1 Switch GUIGetMsg() Case $OK $id = _getBOX() $LVL = _getLVL() $Avilt = _getANVIL() $Stone = _getESTONE() $Crum = _getSCRUM() $SKilvl = _getskill() Sleep(100) $SL = GUICtrlRead($SLVL) $J = GUICtrlRead($JOB) $D = GUICtrlRead($DEX) $L = GUICtrlRead($LUC) $An = GUICtrlRead($Avilt) $t = _total() Sleep(200) While 2 If $J = 0 Or $D = 0 Or $L = 0 Or $LVL = 0 or $SL = 0 or $SL >= 4 Then MsgBox(1,"ERROR","Please enter an number from 1~999 in all input boxes & or select a weopon to make") ExitLoop Else If $LVL > $SKilvl Then MsgBox(1,"Can Not Make","You can not make this item") ExitLoop Else If $Crum = 3 & $Stone = 0.20 Then MsgBox(1,"Can Not Make","It is not posable to make this item") ExitLoop Else $t = _total() GUICtrlSetData($Label5, $t) ExitLoop EndIf EndIf EndIf WEnd Case $GUI_EVENT_CLOSE, $EXIT ExitLoop EndSwitch Wend Func _total() If $LVL = 1 Then If $Avilt >= 0 & $Stone >= 0 & $LVL = 1 & $Crum >= 0 Then $crumy = $Crum $stoner = $Stone $any = $Avilt $totals1 = (5 * $SL) + ($J * 0.2) + ($D * 0.1) + ($L * 0.1) + 50 $totals2 = $totals1 * (($crumy + $stoner) - $any) $total = $totals1 - $totals2 Return $total EndIf;~Compleat EndIf ;~~ If $LVL = 2 Then $normbase2 = (5 * $SL) + ($J * 0.2) + ($D * 0.1) + ($L * 0.1) +50 $basepercent = $normbase2-$normbase2*.2 ;~~ If $Avilt >= 0 & $Stone >= 0 & $LVL = 2 & $Crum >= 0 Then $crumy = $Crum $stoner = $Stone $any = $Avilt $totals2 = $normbase2 * (($crumy + $stoner + .2) - $any) $total = $normbase2 - $totals2 Return $total EndIf;~End stone test lvl 2 with out anvil EndIf If $LVL = 3 Then ;~~ $normbase3 = (5 * $SL) + ($J * 0.2) + ($D * 0.1) + ($L * 0.1) +50 $basepercent = $normbase3-$normbase3*.3 ;~~ If $Avilt >= 0 & $Stone >= 0 & $LVL = 3 & $Crum >= 0 Then $crumy = $Crum $stoner = $Stone $any = $Avilt $totals3 = $normbase3 * (($crumy + $Stone + .3) - $any) $total = $normbase3 - $totals3 Return $total EndIf;~End stone test lvl 3 with out anvil EndIf EndFunc Func _getskill() Switch GUICtrlRead($SLVL) Case '1',' 1','1 ' $s = 1 Case '2',' 2','2 ' $s = 2 Case '3',' 3','3 ' $s = 3 EndSwitch Return $s EndFunc Func _getBOX() Switch GUICtrlRead($PageControl1) ;get active tab page index Case 0 ;dagger $box = $Combo1 Case 1 ;1h sword $box = $Combo2 Case 2 ;2h sword $box = $Combo3 Case 3 ;Axe $box = $Combo4 Case 4 ;Brass Knuckle $box = $Combo5 Case 5 ;Spear $box = $Combo9 Case 6 ;club $box = $Combo10 EndSwitch Return $box ;send value to $box EndFunc ;end _getBOX Func _getLVL() Switch GUICtrlRead($id) Case 'NONE' $WL = 0 Case ' SWORD ',' FALCHION ',' BLADE ',' KNIFE ',' CUTTER ',' MAIN GAUCHE ',' KATANA ',' AXE ',' BATTLE AXE ',' CLUB ',' MACE ',' WAGHNAK ',' JAVELIN ',' SPEAR ',' PIKE ' $WL = 1 ;~END WL 1 Case ' RAPIER ',' SCIMITAR ',' RING POMMEL SABER ',' DIRK ',' DAGGER ',' STILETTO ',' SLAYER ',' BASTARD SWORD ',' HAMMER ',' SMASHER ',' FAIL ',' CHAIN ',' KNUCKLE DUSTER ',' STUDDED KNOKLES','GUISARME','GLAIVE','PARTIZAN' $WL = 2 ;~END WL 2 Case ' SABER ' ,' HAEDONGGUM ',' TSURUGI ',' FLAMBERGE ',' GLADIUS ',' DAMASCUS ',' TWO-HANDED SWORD ',' BROAD SWORD ',' CLAYMORE ',' BUSTER ',' TWO-HANDED AXE ',' MORNING STAR ',' SWORD MACE ',' STUNNER ',' FIST ',' CLAW ',' FINGER ',' TRIDENT ',' HALBERD ',' LANCE ' $WL = 3 ;~END WL 3 EndSwitch Return $WL EndFunc ;~end _getlvl Func _getANVIL() ;~haven't in tthe calc yet Switch GUICtrlRead($Combo6) Case 'No ANVIL' $Anvil = 0 Case ' Normal Anvil ' $Anvil = 0 Case ' Oridecon Anvil ' $Anvil = 0.03 Case ' Golden Anvil ' $Anvil = 0.05 Case ' Emperium ' $Anvil = 0.1 EndSwitch Return $Anvil EndFunc ;~end getANVIL "$Anvil" Func _getESTONE() ;~haven't in tthe calc yet Switch GUICtrlRead($Combo8) Case 'NO Ench. Stone' $ESTONE = 0 Case ' Star Crum ',' Flame Heart ',' Mystic Frozen ',' Grat Nature ',' Rought Wind ' $ESTONE = 0.20 EndSwitch Return $ESTONE EndFunc ;~end getSTONE "$ESTONE" Func _getSCRUM() ;~ is all messed up Switch GUICtrlRead($Combo7) Case ' No Star Crumb ' $SCrum = 0 Case ' 1 Star Crum ' $SCrum = 0.15 Case ' 2 Star Crum ' $SCrum = 0.30 Case ' 3 Star Crum ' $SCrum = 0.45 EndSwitch Return $SCrum EndFunc ;~~end getSCRUM "$SCrum"Mental remindersNormal Anvil add 0%Ordecon Anvil adds 3% chance to make item Golden Anvil adds 5% chance to make itemEmperium adds 10% chance to make itemIf an elemental stone is add it will have a 20% les chance to make the itemIt 1 star crumb is add it will have a 15% les chance to make the itemIt 2 star crumb is add it will have a 30% les chance to make the itemIt 3 star crumb is add it will have a 45% les chance to make the itemAnd can add Elemental stone and up to 2 star crumb's when making a weopon, for a max of 60% less chance on top of evey thing...The following is still a work in progress(To do list)a)Upload compiled script and au3 file(compliled exe is ziped in 7-zipand .rar) Updated Sept. 25 2007 Test and make sure all calcalashions are corect. Make sure all weopons and skill lvl required are corect. Get the elem.Stones & crub's calc to work (func is messed up). Fixed 4-20-2008 Crash of the program when their are no values in all 3 lvl input boxes.4-20-20081) Find out fix why calc is 1~5% off when calc lvl 2~3 items then using max2) Reduce code again after all issues are salved3) update as newer items are lisedlast) make a skin for the GUI(na)update 4-20-2008Version 2.0.0.2 .au3 and rar uploaded~need new read me file <.< update laterReduced the code by 50%~~~~~If I made any error please set me strait.Mr. BP.S.I will be constenly updating script and my spelling error's as I noties them.read_me_first.txtBlackSmith_Calc.rarB_ILRO_Blacksmith_Cala.au3 Edited April 20, 2008 by mrbloody369 Favorite Quotes"If you apply your mind you can create any thing you can dream of" "Any thing can get done by simply click of a button" Link to comment Share on other sites More sharing options...
gseller Posted September 19, 2007 Share Posted September 19, 2007 Looks nice, I am not a gamer so I would not know how to use it. Or is it for real blacksmithing? I don't know how to do that eithr. I do like the work you have done with tabs tho.. Nice layout. Link to comment Share on other sites More sharing options...
Achilles Posted September 25, 2007 Share Posted September 25, 2007 Good work on this! I have a few suggestions thoughAdd $CBS_DROPDOWNLIST to all your combo boxes, this will prohibit the user from editing the text Arrange the combo box in the tabs section so that it's centered vertically within the height of the tabArrange the labels left of the inputboxes so they're centered (you could use $SS_CENTERIMAGE I think...)"Percentige" should be "Percentage"You might want to get rid of the tray icon if you don't plan on using it for anythingThese are just concerning the GUI... I would (and hopefully will) check this more thoroughly but I'm freaking busy with 4 "Advanced Placement" courses and soccer practices for two hours everyday... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
mrbloody369 Posted September 25, 2007 Author Share Posted September 25, 2007 The following has been Updated Sept-25-207 Uploaded the following: New version ot the au3 and a rar & 7-zip of the new compiled exe (added rar since some people dont like 7-zip) read-me-first.txt (instructions how to use the program) I fixed & checked the following: All mathamatical error's have been delt with. Anvil combobox now works for all lvl's XD @gesller "Nice layout" Thanks but I ow that to the "Koda" program for making it easy to lay every thing out. And their is an read_me_first.txt now to exsplane how to use the program. @Piano Man Thank you for all your suggestions "Percentige" should be "Percentage" I cant belive I missed that. Will be fixed befor next Update Add $CBS_DROPDOWNLIST to all your combo boxes, this will prohibit the user from editing the text. I don't know if I want to do that just yet, becuse I like to let the user to change their input any time to see what the diffrence would be. As for the following: Arrange the combo box in the tabs section so that it's centered vertically within the height of the tab Arrange the labels left of the inputboxes so they're centered (you could use $SS_CENTERIMAGE I think..) Nice idea I'll work that shortly. You might want to get rid of the tray icon if you don't plan on using it for anything. I just left that in to make it easyer for some to close the program if it froze up on them, but will be removed soon. Thank you both for the feed back!! Mr. B Favorite Quotes"If you apply your mind you can create any thing you can dream of" "Any thing can get done by simply click of a button" Link to comment Share on other sites More sharing options...
Achilles Posted September 25, 2007 Share Posted September 25, 2007 $CBS_DROPDOWNLIST doesn't prohibit the user from changing their choice, it just makes them choose from the list. Look at this: #include <GUIConstants.au3> GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo ("item1", 10,10, -1, -1, $CBS_DROPDOWNLIST); create first item GUICtrlSetData(-1,"item2|item3","item3"); add other item snd set a new default GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
mrbloody369 Posted October 4, 2007 Author Share Posted October 4, 2007 (edited) I made a few changes to the scrip today. "Percentige" should be "Percentage" is fixed, and some nic-picking at spacing and the layout mostly. The corrections are in the script on the first post only. I will not be uploading any thing new for some thing this small, this time around. But expect a new version of the calc towards the end of next week if time is on my side.. Mr. B Edited October 4, 2007 by mrbloody369 Favorite Quotes"If you apply your mind you can create any thing you can dream of" "Any thing can get done by simply click of a button" Link to comment Share on other sites More sharing options...
mrbloody369 Posted April 20, 2008 Author Share Posted April 20, 2008 Edited the scripted and chopped it down by 50% compared to old script, got some old crash bug fixed. ~Got Stones and Element's to work(mostly) ~Bug found calc off by 1~5% when calc lvl 2-3 items when using the max ~ can subtract 0- .04 and get a +.04 instead of -.04 Mr B Favorite Quotes"If you apply your mind you can create any thing you can dream of" "Any thing can get done by simply click of a button" Link to comment Share on other sites More sharing options...
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