# WoW Grinding Calculator

## Recommended Posts

I just finished a World of Warcraft Grinding Calculator.

As some of you already know, grinding in World of Warcraft, is killing monsters to grow levels, and not taking any quests. With this calculator, you can find out how many monsters you will have to kill to grow a level. It also displays a MsgBox with the amount of experience you need to grow to your next level. All you have to do is enter in your level and amount of experience (or leave it blank) and press "Calculate".

Source:

CODE
```#include <GuiConstants.au3>
Global \$CharLvl, \$GrayLvl, \$DesLvl, \$ExpGained, \$Exp2Lvl, \$a[4], \$b[4], \$aLabel[4], \$bLabel[4], \$ZD, \$s;could be less

GuiCreate("WoW Grinding Calculator", 410, 430,-1, -1 , BitOR(\$WS_OVERLAPPEDWINDOW, \$WS_CLIPSIBLINGS))

\$CLvlLabel = GuiCtrlCreateLabel("Character Level:", 10, 40, 80, 20)
\$CLvlInput = GuiCtrlCreateInput("1", 100, 40, 30, 20)
\$ExpLabel = GuiCtrlCreateLabel("Experience:", 230, 40, 60, 20)
\$ExpInput = GuiCtrlCreateInput("0", 310, 40, 60, 20)
\$DLvlLabel = GuiCtrlCreateLabel("Desired Level:", 10, 70, 80, 20)
\$DLvlInput = GuiCtrlCreateInput("2", 100, 70, 30, 20)
\$CalcButton = GUICtrlCreateButton("Calcuate!", 260, 70, 80, 20)

\$Group_5 = GuiCtrlCreateGroup("Need to Kill:", 10, 110, 390, 310)

\$Mobs = GuiCtrlCreateLabel("Mobs Your Level:", 170, 130, 90, 20)
\$MNeededLabel = GUICtrlCreateLabel("", 255, 130, 100, 20)

\$Lvl1a = GuiCtrlCreateLabel("1 Level above you:", 230, 150, 100, 20)
\$aLabel[0] = GuiCtrlCreateLabel("", 335, 150, 50, 20);for later use, simplifying things by putting it here
\$Lvl2a = GuiCtrlCreateLabel("2 levels above you:", 230, 180, 100, 20)
\$aLabel[1] = GuiCtrlCreateLabel("", 335, 180, 50, 20)
\$Lvl3a = GuiCtrlCreateLabel("3 levels above you:", 230, 210, 100, 20)
\$aLabel[2] = GuiCtrlCreateLabel("", 335, 210, 50, 20)
\$Lvl4a = GuiCtrlCreateLabel("4 levels above you:", 230, 240, 100, 20)
\$aLabel[3] = GuiCtrlCreateLabel("", 335, 240, 50, 20)

\$Lvl1b = GuiCtrlCreateLabel("1 level below you:" , 40, 150, 100, 20)
\$bLabel[0] = GuiCtrlCreateLabel("", 145, 150, 85, 20)
\$Lvl2b = GuiCtrlCreateLabel("2 levels below you:", 40, 180, 100, 20)
\$bLabel[1] = GuiCtrlCreateLabel("", 145, 180, 85, 20)
\$Lvl3b = GuiCtrlCreateLabel("3 levels below you:", 40, 210, 100, 20)
\$bLabel[2] = GuiCtrlCreateLabel("", 145, 210, 85, 20)
\$Lvl4b = GuiCtrlCreateLabel("4 levels below you:", 40, 240, 100, 20)
\$bLabel[3] = GuiCtrlCreateLabel("", 145, 240, 85, 20)

\$CreatorLabel = GUICtrlCreateLabel('Created by Starburstman <Hellfire Blades>, Zuluhed', 40, 300)
\$CreditLabel = GUICtrlCreateLabel('Credit Goes to WoWWiki.com for the Calculating Formulas.', 40, 350)

GuiSetState()
While 1
\$msg = GuiGetMsg()
Select
Case \$msg = \$GUI_EVENT_CLOSE
ExitLoop
Case \$msg = \$CalcButton
_GUIExtraction()
_Calculate()
Case Else
;;;
EndSelect
WEnd
Exit

Func _GUIExtraction()
\$Exp2Lvl = Round ( ( (8 * \$CharLvl) + _Diff() ) * _MXP() , -2);XP = ((8 × CL) + Diff(CL)) × MXP(CL)
_ZDCaculate()
If GUICtrlRead(\$ExpLabel) <> 0 Then \$Exp2Lvl -= \$ExpLabel

EndFunc

Func _Diff();used for calculating the difficulty factor for a mob
If \$CharLvl <= 28 Then Return(0)
If \$CharLvl = 29 Then Return(1)
If \$CharLvl = 30 Then Return(3)
If \$CharLvl = 31 Then Return(6)
If \$CharLvl >= 32 And \$CharLvl <= 59 Then Return(5 * (\$CharLvl - 30))
EndFunc

Func _MXP();used for calculating how much experience a same-level mob would get you
Return ( Round(45 + (5 * \$CharLvl) ) )
EndFunc

Func _CalcHigherMob();puts the number of mobs above your level needed to gain a level into an array
For \$x = 0 to 3
\$a[\$x] = (\$CharLvl * 5 + 45) * (1 + 0.05 * (\$x + 1) )

\$a[\$x] = Int(\$Exp2Lvl / \$a[\$x]) +1

;XP = (Char Level * 5 + 45) * (1 + 0.05 * (Mob Level - Char Level) ), where Mob Level > Char Level
Next
EndFunc

Func _CalcLowerMob()
For \$x = 0 to 3
;\$b[\$x] = (\$CharLvl * 5 + 45) * (1 - ( \$x - (\$x + 1) ) / \$ZD)
\$b[\$x] = (\$CharLvl * 5 + 45) * (1 - (\$x + 1) / \$ZD)

\$b[\$x] = Int(\$Exp2Lvl / \$b[\$x]) + 1

Next
;XP = (Char Level * 5 + 45) * (1 - (Char Level - Mob Level)/ZD )
;where Mob Level < Char Level, and Mob Level > Gray Level
EndFunc

Func _CalcSameMob()
\$s = \$Exp2Lvl / _MXP()
EndFunc

Func _ZDCaculate();variable used when calculating experience from lower-level mobs, ZD = Zero Difference
If \$CharLvl >= 1 and \$CharLvl <= 7 Then \$ZD = 5
If \$CharLvl >= 8 and \$CharLvl <= 9 Then \$ZD = 6
If \$CharLvl >= 10 and \$CharLvl <= 11 Then \$ZD = 7
If \$CharLvl >= 12 and \$CharLvl <= 15 Then \$ZD = 8
If \$CharLvl >= 16 and \$CharLvl <= 19 Then \$ZD = 9
If \$CharLvl >= 20 and \$CharLvl <= 29 Then \$ZD = 11
If \$CharLvl >= 30 and \$CharLvl <= 39 Then \$ZD = 12
If \$CharLvl >= 40 and \$CharLvl <= 44 Then \$ZD = 13
If \$CharLvl >= 45 and \$CharLvl <= 49 Then \$ZD = 14
If \$CharLvl >= 50 and \$CharLvl <= 54 Then \$ZD = 15
If \$CharLvl >= 55 and \$CharLvl <= 59 Then \$ZD = 16
;If \$CharLvl = 60 Then \$ZD = 17
If \$CharLvl >= 60 Then MsgBox(0, "Error", "All of the levels above level 59 aren't supported yet.")
EndFunc

Func _GUIUpdate()

For \$x = 0 to 3

If \$a[\$x] > 0 Then
GUICtrlSetState(\$aLabel[\$x], @SW_HIDE)
GUICtrlSetData(\$aLabel[\$x], \$a[\$x])
GUICtrlSetState(\$aLabel[\$x], @SW_SHOW)
EndIf

If \$b[\$x] >0 Then
GUICtrlSetState(\$bLabel[\$x], @SW_HIDE)
GUICtrlSetData(\$bLabel[\$x], \$b[\$x])
GUICtrlSetState(\$bLabel[\$x], @SW_SHOW)
EndIf
Next

GUICtrlSetState(\$MNeededLabel, @SW_HIDE)
GUICtrlSetData(\$MNeededLabel, \$s)
GUICtrlSetState(\$MNeededLabel, @SW_SHOW)

EndFunc

Func _Calculate()
_CalcHigherMob()
_CalcSameMob()
_CalcLowerMob()
_GUIUpdate()
MsgBox(0, "", \$Exp2Lvl)
EndFunc```

(My WoW SN is Starburstman, and I play on Zuluhed, in the "Hellfire Blades" Guild.)

Note: The calculator does not work over level 59, because I couldn't find the formulas I needed to make it work for lvls 60 - 69. I haven't tested this yet, but I think if it messes up, it will only be 1 monster off. The "Desired Level" Input also does nothing, so don't try to use it.

To-Do List: (not in any specific order)

1. Make it work for levels 60 - 69

2. Make the "Desired Level" Input work

3. XSkin?

Please report any bugs that you find here.

Compiled Script here: WoWGC.exe

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

##### Share on other sites

EzSkin worked best for this one

just played with it for a minute or two....

Just create the skin design you want with EzSkin

```#region ; Code generated by EzSkin_1-2-3, Created by Valuater

#include <GUIConstants.au3>
#include <EzSkin.au3>

Global \$CharLvl, \$GrayLvl, \$DesLvl, \$ExpGained, \$Exp2Lvl, \$a[4], \$b[4], \$aLabel[4], \$bLabel[4], \$ZD, \$s;could be less

\$EzGUI = EzSkinGUICreate("WoW Grinding Calculator",400, 400)
\$EzIcon = EzSkinIcon(\$EzGUI)

\$CLvlLabel = GuiCtrlCreateLabel("Character Level:", 20, 60, 80, 20)
\$CLvlInput = GuiCtrlCreateInput("1", 110, 60, 30, 20)
\$ExpLabel = GuiCtrlCreateLabel("Experience:", 180, 60, 60, 20)
\$ExpInput = GuiCtrlCreateInput("0", 260, 60, 60, 20)
\$DLvlLabel = GuiCtrlCreateLabel("Desired Level:", 20, 90, 80, 20)
\$DLvlInput = GuiCtrlCreateInput("2", 110, 90, 30, 20)
\$CalcButton = EzSkinButton("Calcuate!", 230, 90, 80, 30)

\$Group_5 = GUICtrlCreateLabel("Need to Kill: ---------------------------------------------------------------------------------------------", 20, 130, 360, 20)

\$Mobs = GuiCtrlCreateLabel("Mobs Your Level:", 150, 150, 90, 20)
\$MNeededLabel = GUICtrlCreateLabel("", 255, 150, 100, 20)

\$Lvl1a = GuiCtrlCreateLabel("1 Level above you:", 230, 170, 100, 20)
\$aLabel[0] = GuiCtrlCreateLabel("", 335, 170, 50, 20);for later use, simplifying things by putting it here
\$Lvl2a = GuiCtrlCreateLabel("2 levels above you:", 230, 200, 100, 20)
\$aLabel[1] = GuiCtrlCreateLabel("", 335, 200, 50, 20)
\$Lvl3a = GuiCtrlCreateLabel("3 levels above you:", 230, 230, 100, 20)
\$aLabel[2] = GuiCtrlCreateLabel("", 335, 230, 50, 20)
\$Lvl4a = GuiCtrlCreateLabel("4 levels above you:", 230, 260, 100, 20)
\$aLabel[3] = GuiCtrlCreateLabel("", 335, 260, 50, 20)

\$Lvl1b = GuiCtrlCreateLabel("1 level below you:" , 40, 170, 100, 20)
\$bLabel[0] = GuiCtrlCreateLabel("", 145, 170, 85, 20)
\$Lvl2b = GuiCtrlCreateLabel("2 levels below you:", 40, 200, 100, 20)
\$bLabel[1] = GuiCtrlCreateLabel("", 145, 200, 85, 20)
\$Lvl3b = GuiCtrlCreateLabel("3 levels below you:", 40, 230, 100, 20)
\$bLabel[2] = GuiCtrlCreateLabel("", 145, 230, 85, 20)
\$Lvl4b = GuiCtrlCreateLabel("4 levels below you:", 40, 260, 100, 20)
\$bLabel[3] = GuiCtrlCreateLabel("", 145, 260, 85, 20)

\$CreatorLabel = GUICtrlCreateLabel('Created by Starburstman <Hellfire Blades>, Zuluhed', 40, 300)
\$CreditLabel = GUICtrlCreateLabel('Credit Goes to WoWWiki.com for the Calculating Formulas.', 40, 320)

GuiSetState()

While 1
EzSkinOver()
\$msg = GUIGetMsg()
Select
Case \$msg = \$GUI_EVENT_CLOSE Or \$msg = \$EzIcon[1]
ExitLoop
Case \$msg = \$EzIcon[2]
GuiSetstate(@SW_MINIMIZE, \$EzGUI)
Case \$msg = \$CalcButton
_GUIExtraction()
_Calculate()
Case Else
;;;
EndSelect

WEnd

Func _GUIExtraction()
\$Exp2Lvl = Round ( ( (8 * \$CharLvl) + _Diff() ) * _MXP() , -2);XP = ((8 × CL) + Diff(CL)) × MXP(CL)
_ZDCaculate()
If GUICtrlRead(\$ExpLabel) <> 0 Then \$Exp2Lvl -= \$ExpLabel

EndFunc

Func _Diff();used for calculating the difficulty factor for a mob
If \$CharLvl <= 28 Then Return(0)
If \$CharLvl = 29 Then Return(1)
If \$CharLvl = 30 Then Return(3)
If \$CharLvl = 31 Then Return(6)
If \$CharLvl >= 32 And \$CharLvl <= 59 Then Return(5 * (\$CharLvl - 30))
EndFunc

Func _MXP();used for calculating how much experience a same-level mob would get you
Return ( Round(45 + (5 * \$CharLvl) ) )
EndFunc

Func _CalcHigherMob();puts the number of mobs above your level needed to gain a level into an array
For \$x = 0 to 3
\$a[\$x] = (\$CharLvl * 5 + 45) * (1 + 0.05 * (\$x + 1) )

\$a[\$x] = Int(\$Exp2Lvl / \$a[\$x]) +1

;XP = (Char Level * 5 + 45) * (1 + 0.05 * (Mob Level - Char Level) ), where Mob Level > Char Level
Next
EndFunc

Func _CalcLowerMob()
For \$x = 0 to 3
;\$b[\$x] = (\$CharLvl * 5 + 45) * (1 - ( \$x - (\$x + 1) ) / \$ZD)
\$b[\$x] = (\$CharLvl * 5 + 45) * (1 - (\$x + 1) / \$ZD)

\$b[\$x] = Int(\$Exp2Lvl / \$b[\$x]) + 1

Next
;XP = (Char Level * 5 + 45) * (1 - (Char Level - Mob Level)/ZD )
;where Mob Level < Char Level, and Mob Level > Gray Level
EndFunc

Func _CalcSameMob()
\$s = \$Exp2Lvl / _MXP()
EndFunc

Func _ZDCaculate();variable used when calculating experience from lower-level mobs, ZD = Zero Difference
If \$CharLvl >= 1 and \$CharLvl <= 7 Then \$ZD = 5
If \$CharLvl >= 8 and \$CharLvl <= 9 Then \$ZD = 6
If \$CharLvl >= 10 and \$CharLvl <= 11 Then \$ZD = 7
If \$CharLvl >= 12 and \$CharLvl <= 15 Then \$ZD = 8
If \$CharLvl >= 16 and \$CharLvl <= 19 Then \$ZD = 9
If \$CharLvl >= 20 and \$CharLvl <= 29 Then \$ZD = 11
If \$CharLvl >= 30 and \$CharLvl <= 39 Then \$ZD = 12
If \$CharLvl >= 40 and \$CharLvl <= 44 Then \$ZD = 13
If \$CharLvl >= 45 and \$CharLvl <= 49 Then \$ZD = 14
If \$CharLvl >= 50 and \$CharLvl <= 54 Then \$ZD = 15
If \$CharLvl >= 55 and \$CharLvl <= 59 Then \$ZD = 16
;If \$CharLvl = 60 Then \$ZD = 17
If \$CharLvl >= 60 Then MsgBox(0, "Error", "All of the levels above level 59 aren't supported yet.")
EndFunc

Func _GUIUpdate()

For \$x = 0 to 3

If \$a[\$x] > 0 Then
GUICtrlSetState(\$aLabel[\$x], @SW_HIDE)
GUICtrlSetData(\$aLabel[\$x], \$a[\$x])
GUICtrlSetState(\$aLabel[\$x], @SW_SHOW)
EndIf

If \$b[\$x] >0 Then
GUICtrlSetState(\$bLabel[\$x], @SW_HIDE)
GUICtrlSetData(\$bLabel[\$x], \$b[\$x])
GUICtrlSetState(\$bLabel[\$x], @SW_SHOW)
EndIf
Next

GUICtrlSetState(\$MNeededLabel, @SW_HIDE)
GUICtrlSetData(\$MNeededLabel, \$s)
GUICtrlSetState(\$MNeededLabel, @SW_SHOW)

EndFunc

Func _Calculate()
_CalcHigherMob()
_CalcSameMob()
_CalcLowerMob()
_GUIUpdate()
MsgBox(0, "", \$Exp2Lvl)
EndFunc```

8)

##### Share on other sites

Looking at the image valuater has supplied. How you can kill a mob that is 1, 2, 3 or 4 levels below your level, when you are a level 1..

##### Share on other sites

I made the GUI with EzSkin... but I can't get the close and minimize pictures to work.

EDIT: did some testing... and got them to work

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

##### Share on other sites

Yeah, Manadar... I didn't feel like fixing that, too much time, and it can be overridden with common sense.

Edited by Kickassjoe

What goes around comes around... Payback's a bitch.

## Create an account

Register a new account

×

• Wiki

• Back

• Git