Crome_BAD Posted October 8, 2005 Share Posted October 8, 2005 (edited) Hey guys, im making a littler calculator for Diablo Open BNET to calculate your mana regeneration and the equation uses brackets....but AU3 says syntax error....hes my code so far...there will be alot more...lol but i JUST started, i wanted to see if brackets worked... $max_mana = "1570000" $manaregen_percent = "15300" $MaxManaRegen = 25 * [[ 256 * $max_mana / (25 * 120)] * (100 + $manaregen_percent) / 100] / 256 MsgBox(36, "Max Mana Regen", "You MAX mana regen would be " & $MaxManaRegen & ", With " & $max_mana & " max mana, and " & $manaregen_percent & " mana regen %") Any ideas how to get around these brackets? or am i missing somthing. I copied the equation exact... Crome EDIT: sorry guys, lack of sleep has impaired my brain and eye sight, i could just turn the brackets into ().....this is a pointless post...please delete guys... Edited October 8, 2005 by Crome_BAD Link to comment Share on other sites More sharing options...
HardCopy Posted October 8, 2005 Share Posted October 8, 2005 (edited) $MaxManaRegen = 25 * (( 256 * $max_mana / (25 * 120)) * (100 + $manaregen_percent) / 100) / 256 need round brackets not square (Although the results look a bit large to me) square use for arrays i.e $Array[10] = array with 10 elements HardCopy Edited October 8, 2005 by HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
w0uter Posted October 8, 2005 Share Posted October 8, 2005 didnt you see this:EDIT: sorry guys, lack of sleep has impaired my brain and eye sight, i could just turn the brackets into ().....this is a pointless post...please delete guys... My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
HardCopy Posted October 8, 2005 Share Posted October 8, 2005 didnt you see this:Obviously not, however my post was more relevant than yours Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
layer Posted October 8, 2005 Share Posted October 8, 2005 (edited) Yea, I just learned in school that brackets can usually be replaced with parenthesis, since we're required to use TI-83 Texas Instrument Calculators. Edited October 8, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
Crome_BAD Posted October 8, 2005 Author Share Posted October 8, 2005 Its all good guys, i might as well explain my reasoning. If you have played Open Battle.net for Diablo II then your aware that it is a openly hacked environment (thats the difference between closed and open). Anyways, to make a character worthy of dueling others, alot of math is involved....wellll heres the eqaution.. 25 * [[ 256 * your_max_mana / (25 * 120)] * (100 + your_mana_regen%) / 100] / 256 What this equation gives you is the amount of mana you can regenerate every 1.5-2 seconds i believe. And i was just tired of having to figure that all out on paper when i have a nice GUI setting and the capabilities of creating a nice little proggy that could inturns help others with this same flaw of mine. I stayed up all last night testing different values to input to the equation (whih is why im EXTREMELLY tired now...lol) and about 8:45 this morning i realized...wow, AutoIt is the east and best way to accomplish this without hassle...sooo....here i am Crome Link to comment Share on other sites More sharing options...
w0uter Posted October 8, 2005 Share Posted October 8, 2005 Obviously not, however my post was more relevant than yoursand the pot said the kettel was black ... My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll 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