Page 2 of 3

Re: An In-game kill counter?

Posted: Wed Jun 23, 2010 11:08 pm
by NoobHacker
Nerrazzuri wrote:
NoobHacker wrote:
Nerrazzuri wrote:AFAIK, EXP only shows percentage and not the value, I'm not sure if the EXP value has it's own pointer, if you found it, I could make that. =)
can use this array to calculate the value
exp[level]*percentage

Code: Select all

0
15
34
57
92
135
372
560
840
1242
1144
1573
2144
2800
3640
4700
5893
7360
9144
11120
13477
16268
19320
22880
27008
31477
36600
42444
48720
55813
63800
86784
98208
110932
124432
139372
155865
173280
192400
213345
235372
259392
285532
312928
342624
374760
408336
445544
483532
524160
567772
598886
631704
666321
702836
741351
781976
824828
870028
917625
967995
1021041
1076994
1136013
1198266
1263930
1333194
1406252
1483314
1564600
1650340
1740778
1836173
1936794
2042930
2154882
2272970
2397528
2528912
2667496
2813674
2967863
3130502
3302053
3483005
3673873
3875201
4087562
4311559
4547832
4797053
5059931
5337215
5629694
5938202
6263614
6606860
6968915
7350811
7753635
8178534
8626718
9099462
9598112
10124088
10678888
11264090
11881362
12532461
13219239
13943653
14707765
15513750
16363902
17260644
18206527
19204245
20256637
21366700
22537594
23772654
25075395
26449526
27898960
29427822
31040466
32741483
34535716
36428273
38424542
40530206
42751262
45094030
47565183
50171755
52921167
55821246
58880250
62106888
65510344
69100311
72887008
76881216
81094306
85594273
90225770
95170142
100385466
105886589
111689174
117809740
124265714
131075474
138258410
145834970
153826726
162256430
171148082
180526997
190419876
200854885
211861732
223471711
223471711
248635353
262260570
276632449
291791906
307782102
324648562
342439302
361204976
380999008
401877754
423900654
447130410
471633156
497478653
524740482
553496261
583827855
615821622
649568646
685165008
722712050
762316670
804091623
848155844
894634784
943660770
995373379
1049919840
1107455447
1168144006
1232158297
1299680571
1370903066
1446028554
1525246918
1608855764
1697021059
if you released hope you can skin it with maplestory skin =X
Wait, I don't understand, what is this? And it's not that easy to add in that. =/
this is an array just const an array and use data above(each line per member)
int[] exp = {0,15,.........};
currentexp = int[level] * percentage;

Re: An In-game kill counter?

Posted: Thu Jun 24, 2010 1:00 am
by LearningCode
OH!!!
I get it now.

if:
01) level = 2
02) int[2] = 34
03) Current EXP percentage = 50%

Then,

int[level] * Percentage = 34 * 50% = 34 * 0.5
= 17 <---

I see. >.>

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 10:29 am
by Nerrazzuri
Here is a code i made,

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
double MaxExp, CurrentExp, LeftAmount;
int MobExp, MobAmount;
     cout << "Please Insert your Max Exp :" ;
     cin >> MaxExp;
     cout <<"Insert your current Exp value : ";
     cin >> CurrentExp;
     cout << "Enter your Mob Experience : ";
     cin >> MobExp;
     LeftAmount= MaxExp - CurrentExp;
     MobAmount= LeftAmount/MobExp;
     cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
	 system ("Pause");
}
Manual input though, lazy to add in every single exp figure, you can do something like

int lvl1 = 15
int lvl2 = 34
...(add all)

compile and try my code :D

here is my compiled code though, haha, coded in less then 5 min so don't flame me if buggy. :P

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 2:33 pm
by LearningCode
There you go:

Code: Select all

int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};
Guess how I got this? Lol
01) I copy+pasted that EXP table into notepad
02) I added a period (.) in front of each number
03) I used the replace function and replaced all '.' with ', '
04) I then used a javascript, "javascript: document.write(int LevelArray [] { /*Long List of numbers*/};);"
05) I copied the output text and pasted it in this post =)

Tadah!
And it took less than 2minutes <.<

Now I think all you need is just 'What's your level?'
instead of 'What's your max exp?'

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
double CurrentExp = 99999999999;
int MobAmount, MobExp;
int Level = 999; //Using some huge number for fun <.<
int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};

     while (Level > 200 && Level < 1) {
          cout << "Please Insert current Level :" ;
          cin >> Level;
//So that we don't get some dumbass who puts his level as 657 or 0 or -1
     }
          cout <<"Insert your current Exp value : ";
          cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
          cout << "Enter your Mob Experience : ";
          cin >> MobExp;

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
     system ("Pause");
}
I free-handed, so there will be errors <.<

[EDIT]
I currently don't have a compiler anywhere, so.. =/

[EDIT=2]
I should have called it EXPArray =/

[EDIT = 3]
I think you will also need this:

Code: Select all

while (CurrentExp >= LevelArray[Level]) {
      cout <<"Insert your current Exp value : ";
      cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
}
So..

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
double CurrentExp = 99999999999; //Using some huge number for fun <.<
int MobAmount, MobExp;
int Level = 999; //Using some huge number for fun <.<
int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};

     while (Level > 200 && Level < 1) {
          cout << "Please Insert current Level :" ;
          cin >> Level;
//So that we don't get some dumbass who puts his level as 657 or 0 or -1
     }
     while (CurrentExp >= LevelArray[Level]) {
          cout <<"Insert your current Exp value : ";
          cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
     }
          cout << "Enter your Mob Experience : ";
          cin >> MobExp;

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
     system ("Pause");
}

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 2:53 pm
by Nerrazzuri
LearningCode wrote:There you go:

Code: Select all

int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};
Guess how I got this? Lol
01) I copy+pasted that EXP table into notepad
02) I added a period (.) in front of each number
03) I used the replace function and replaced all '.' with ', '
04) I then used a javascript, "javascript: document.write(int LevelArray [] { /*Long List of numbers*/};);"
05) I copied the output text and pasted it in this post =)

Tadah!
And it took less than 2minutes <.<

Now I think all you need is just 'What's your level?'
instead of 'What's your max exp?'

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
double CurrentExp = 99999999999;
int MobAmount, MobExp;
int Level = 999; //Using some huge number for fun <.<
int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};

     while (Level > 200 && Level < 1) {
          cout << "Please Insert current Level :" ;
          cin >> Level;
//So that we don't get some dumbass who puts his level as 657 or 0 or -1
     }
          cout <<"Insert your current Exp value : ";
          cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
          cout << "Enter your Mob Experience : ";
          cin >> MobExp;

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
     system ("Pause");
}
I free-handed, so there will be errors <.<

[EDIT]
I currently don't have a compiler anywhere, so.. =/

[EDIT=2]
I should have called it EXPArray =/

[EDIT = 3]
I think you will also need this:

Code: Select all

while (CurrentExp >= LevelArray[Level]) {
      cout <<"Insert your current Exp value : ";
      cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
}
So..

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
double CurrentExp = 99999999999; //Using some huge number for fun <.<
int MobAmount, MobExp;
int Level = 999; //Using some huge number for fun <.<
int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};

     while (Level > 200 && Level < 1) {
          cout << "Please Insert current Level :" ;
          cin >> Level;
//So that we don't get some dumbass who puts his level as 657 or 0 or -1
     }
     while (CurrentExp >= LevelArray[Level]) {
          cout <<"Insert your current Exp value : ";
          cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/
     }
          cout << "Enter your Mob Experience : ";
          cin >> MobExp;

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
     system ("Pause");
}
Add a conditional loop, if...else to prompt the error message when users input a value more than 200 or less than 1. :P

Great one though, I might make one using ReadPointer to read the experience percentage and do some easy maths, users only need to input the MobExp and you'll get the amount.

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 3:09 pm
by LearningCode
Surely you can add the conditions yourself T.T

Code: Select all

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
int CurrentExp = 99999999999; //I still think CurrentExp should be an integer =/
int MobAmount, MobExp;
int Level = 9001; //It's over 9000!!

int LevelArray [] = { 0, 15, 34, 57, 92, 135, 372, 560, 840,1242, 1144,1573, 2144,2800, 3640,4700, 5893,7360, 9144,11120, 13477,16268, 19320,22880, 27008,31477, 36600,42444, 48720,55813, 63800,86784, 98208,110932, 124432 ,139372, 155865,173280, 192400,213345, 235372,259392, 285532,312928, 342624,374760, 408336,445544, 483532,524160, 567772,598886, 631704,666321, 702836,741351, 781976,824828, 870028,917625, 967995,1021041, 1076994,1136013, 1198266,1263930, 1333194,1406252, 1483314,1564600, 1650340,1740778, 1836173,1936794, 2042930,2154882, 2272970,2397528, 2528912,2667496, 2813674,2967863, 3130502,3302053, 3483005,3673873, 3875201,4087562, 4311559,4547832, 4797053,5059931, 5337215,5629694, 5938202,6263614, 6606860,6968915, 7350811,7753635, 8178534,8626718, 9099462,9598112, 10124088,10678888, 11264090,11881362, 12532461,13219239, 13943653,14707765, 15513750,16363902, 17260644,18206527, 19204245,20256637, 21366700,22537594, 23772654,25075395, 26449526,27898960, 29427822,31040466, 32741483,34535716, 36428273,38424542, 40530206,42751262, 45094030,47565183, 50171755,52921167, 55821246,58880250, 62106888,65510344, 69100311,72887008, 76881216,81094306, 85594273,90225770, 95170142,100385466, 105886589,111689174, 117809740,124265714, 131075474,138258410, 145834970,153826726, 162256430,171148082, 180526997,190419876, 200854885,211861732, 223471711,223471711, 248635353,262260570, 276632449,291791906, 307782102,324648562, 342439302,361204976, 380999008,401877754, 423900654,447130410, 471633156,497478653, 524740482,553496261, 583827855,615821622, 649568646,685165008, 722712050,762316670, 804091623,848155844, 894634784,943660770, 995373379,1049919840, 1107455447,1168144006,1232158297,1299680571,1370903066,1446028554,1525246918,1608855764,1697021059};

     while (Level > 200 || Level < 1) { /* Woops, I made it && just now, should be || xD*/
          cout << "Please Insert current Level :" ;
          cin >> Level;
          //So that we don't get some dumbass who puts his level as 657 or 0 or -1
          if (Level > 200) {
               cout << "The level specified is too high.";
          }
          else if (Level < 1) {
               cout << "The level specified is too low.";
          }
     }
     while (CurrentExp >= LevelArray[Level] || CurrentExp < 0) {
          cout <<"Insert your current Exp value : ";
          cin >> CurrentExp; //I don't get it, why is CurrentEXP a double value? It should be an integer =/

          if (CurrentExp >= LevelArray[Level]) {
               cout << "The Current Exp specified is too high.";
          }
          else if (CurrentExp < 0) {
               cout << "The Current Exp specified is too low.";
          }
     }
          cout << "Enter your Mob Experience : ";
          cin >> MobExp;

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;
     system ("Pause");
}
I made a few mistakes earlier on =x
But I've corrected them this time xD

[EDIT]
I think..
That there are cases where MobAmount might be 0, because MobAmount is an integer and might actually be 0.05
It'll then become 0

So, we should put a condition where if MobAmount == 0, it'll become 1, or something like that xD

Code: Select all

          MobAmount= (LevelArray[Level] - CurrentExp)/MobExp;
          if (MobAmount < 1) {
               MobAmount = 1;
          }
          cout << "The monster you have to kill in order to level up is : " << MobAmount << endl;

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 4:05 pm
by Nerrazzuri
Ah, I'm lazy to do it, if someone needs, just copy and paste the code into the editor and compile.
Easy. @@

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 5:27 pm
by iLostMyBallz
Wad are those @_@ my eyes spoil liao

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 5:41 pm
by LearningCode
It's the end-product of my lack of C++ knowledge and Nerra's laziness =/

Re: An In-game kill counter?

Posted: Fri Jun 25, 2010 5:56 pm
by Nerrazzuri
LearningCode wrote:It's the end-product of my lack of C++ knowledge and Nerra's laziness =/
Nah you are just humble. I can see your C++ knowledge is better than mine :P