HPMPEXP hack

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   HPMPEXP hack
Cyperangel
CZ Newbie
Cyperangel has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 06, 2004
0.00 posts per day
Posts: 13
Points: 2,904
   
Hello there.

Ive downloaded the EXP hack you have in your downloads section, and installed it on my site, as per the instructions in the downloaded zip...

But, on your site here, you have them locatet at the bottom of the post, instead of below the users name and avatar. Would it be possible to get a walkthru on how to do that?

And, second part, but more importantly: No matter how many posts I make a day on my forum, the MP bar never moves, and my HP never gets above 18 percent. The xp bar moves just fine, although im curious as to how many posts is needed to obtain the varying levels.

Think those two items might be something you could help me with?

Oh, and i use phpnuke 6.9
[ Register or login to view links on this board. ] for a look at it....



Back to top Reply with quote
#2   re: HPMPEXP hack
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
HP is determined by your average posts per day.
MP is determined by your join date related to your post count.
EXP goes up each time you post, and when you get to 100%, you gain a level and the EXP drops to 0 again.

The mp doesnt move much i have noticed that but erery where i read about it they say that it shouldnt move much. There mostly for fun anyways. Im also pretty sure if you installed some of the rpg mods it would change the levels too.


To place them under the post box you just move the table down in the vewtopc_body.tpl to under the under the post box. Then you have to change the rowspan on the main table to include one more row. Adjust the EXPHPMP so that it is parrallel.

Here is the table that I inserted under the postbox


<td class="{postrow.ROW_CLASS}" colspan="2" width="100%">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
<td width="10%">
<!-- [BEGIN LEVEL MOD] -->
          <span class="postdetails">
          <nobr><b>Level : {postrow.POSTER_LEVEL}</b></nobr>
</td>
<td width="30%">
          <table cellspacing="0" cellpadding="0" border="0">
          <tr>
                  <td align="left"><span class="postdetails">HP:</span></td>
                  <td align="right"><span class="postdetails"><b>{postrow.POSTER_HP}</b></span></td>
                  <td></td>
                    <td>
                          <table cellspacing="0" cellpadding="0" border="0">
                          <tr>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/hp_bar_left.gif" width="2" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/hp_bar_fil.gif" width="{postrow.POSTER_HP_WIDTH}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/hp_bar_fil_end.gif" width="1" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_emp.gif" width="{postrow.POSTER_HP_EMPTY}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_right.gif" width="1" height="12" /></td>
                         </table>
                  </td>
                <td align="left"><span class="gen">{postrow.POSTER_HP_WIDTH}%</span></td>
          </tr>
          </table>
</td>
<td width="30%">
          <table cellspacing="0" cellpadding="0" border="0">
          <tr>
                  <td align="left"><span class="postdetails">MP:</span></td>
                  <td align="right"><span class="postdetails"><b>{postrow.POSTER_MP}</b></span></td>
                  <td></td>
                            <td>
                          <table cellspacing="0" cellpadding="0" border="0">
                          <tr>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/mp_bar_left.gif" width="2" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/mp_bar_fil.gif" width="{postrow.POSTER_MP_WIDTH}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/mp_bar_fil_end.gif" width="1" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_emp.gif" width="{postrow.POSTER_MP_EMPTY}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_right.gif" width="1" height="12" /></td>
                                                 </table>
                  </td>
                <td align="left"><span class="gen">{postrow.POSTER_MP_WIDTH}%</span></td>
          </tr>
          </table>
</td>
<td width="30%">
          <table cellspacing="0" cellpadding="0" border="0">
          <tr>
                  <td align="left"><span class="postdetails">EXP:</span></td>
                  <td align="right"><span class="postdetails"><b>{postrow.POSTER_EXP}</b></span></td>
                  <td></td>
                            <td>
                          <table cellspacing="0" cellpadding="0" border="0">
                          <tr>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/exp_bar_left.gif" width="2" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/exp_bar_fil.gif" width="{postrow.POSTER_EXP_WIDTH}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/exp_bar_fil_end.gif" width="1" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_emp.gif" width="{postrow.POSTER_EXP_EMPTY}" height="12" /></td>
                          <td><img src="themes/YOUR_THEME/forums/images/levelmod/level_bar_right.gif" width="1" height="12" /></td>
                                                </table>
                  </td>
                <td align="left"><span class="gen">{postrow.POSTER_EXP_WIDTH}%</span></td>
          </tr>
          </table>
          </span>
          <!-- [END LEVEL MOD] -->


This table may not work because my viewtopic is really hacked icon_mrgreen.gif



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: HPMPEXP hack
Cyperangel
CZ Newbie
Cyperangel has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 06, 2004
0.00 posts per day
Posts: 13
Points: 2,904
   
Hm, for some reason I was under the impression, that you spend MP every time you postet. (at least that is what the commentary in teh code itself led me to belive) Which was why i was wondering why it didnt move at all....

Seing how i only got a mere 18 MP on my forum account, and a post should cost around 2,5 (still grabbing this from the code) Then it should be possible to see a change in the MP after say.. the 5th post... But its still at full.

Ill see what i can figure out about inserting it below the postbox, im not that good at figuring the pure tpl files out, so i might come back for more help. I hope you dont mind.


Thank you very much once more.

Cyperangel

PS. The main table is in the same tpl file right?



Back to top Reply with quote
#4   re: HPMPEXP hack
Cyperangel
CZ Newbie
Cyperangel has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 06, 2004
0.00 posts per day
Posts: 13
Points: 2,904
   
Okies, i got it nudged into the right place icon_biggrin.gif

Thanks again.

Im still wondering about the MP tho.. here is a few quotes from the code itself:



* Max MP is based on level, and increases with level
* Each post a user makes costs them mp,
* and a user regenerates mp proportional to how
* many days they have been registered


So, in theory it should decrease each time I make a post. Yet it stays steadily at 100%

Im also having a spot of trouble with the HP bar, I seem to be stuck at max 18 % health, even though I set the



* This value determines the 'average' posts per day.
* The admin may redefine this variable as he wishes.
* Higher values will generally decrease users' HP, and
* lower values will generally increase users' HP.
*
* Note: Do NOT set this value to zero (0).
* This -may- be set to a fractional value (eg, 5.1, 3.1415)
*
*/

$level_avg_ppd = 5;

to 1.

It seems to work on your forums though. Any chance i could be told what you set it to?



Back to top Reply with quote
#5   re: HPMPEXP hack
Cyperangel
CZ Newbie
Cyperangel has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 06, 2004
0.00 posts per day
Posts: 13
Points: 2,904
   
I would really love to see a fix for this, if at all possible.

The MP bar does not move anything at all, which is kindda sad, since its supposed to.

Anyone who can tell me what to change, so it will start moving?

Ive insertet all the code taht i can find about MP right below here:


/* Determine MP
*
* MP is calculated by how long the user has been around
* and how often they post.
*
* Max MP is based on level, and increases with level
* Each post a user makes costs them mp,
* and a user regenerates mp proportional to how
* many days they have been registered
*
*/

//Number of days the user has been at the forums.
$level_user_days = max(1, round( ( time() - strtotime($profiledata['user_regdate']) ) / 86400 ));

/* The mp cost for one post.
* Raising this value will generally decrease the current
* mp for most posters.
* This may be set to a decimal value (eg, 2, 2.1, 3.141596)
* This should NOT be set to 0
*/
$level_post_mp_cost = 2.5;

/* This determines how much mp a user regenerates per day
* Raising this value will generally increase the current
* mp for most posters.
* This may be set to a decimal value (eg, 3, 3.5, 2.71828)
* This should NOT be set to 0
*/
$level_mp_regen_per_day = 4;

if($level_level < 1)
{
   $level_mp = '0 / 0';
   $level_mp_percent = 0;
}
else
{
   $level_max_mp = floor( (pow( $level_level, (1/4) ) ) * (pow( 10, pow( $level_level+2, (1/3) ) ) ) / (pi()) );
   
   $level_mp_cost = $postrow[$i]['user_posts'] * $level_post_mp_cost;
   $level_mp_regen = max(1, $level_user_days * $level_mp_regen_per_day);
   
   $level_cur_mp = floor($level_max_mp - $level_mp_cost + $level_mp_regen);
   $level_cur_mp = max(0, $level_cur_mp);
   $level_cur_mp = min($level_max_mp, $level_cur_mp);
   
   $level_mp = $level_cur_mp . ' / ' . $level_max_mp;
   $level_mp_percent = floor($level_cur_mp / $level_max_mp * 100 );
   
}


This was to be insertet into the usercp_viewprofile file...

There is another place it is mentioned as well: in the viewtopic.php file:


/* Determine MP
*
* MP is calculated by how long the user has been around
* and how often they post.
*
* Max MP is based on level, and increases with level
* Each post a user makes costs them mp,
* and a user regenerates mp proportional to how
* many days they have been registered
*
*/
//Number of days the user has been at the forums.
$level_user_days = max(1, round( ( time() - $postrow[$i]['user_regdate'] ) / 86400 ));

/* The mp cost for one post.
* Raising this value will generally decrease the current
* mp for most posters.
* This may be set to a decimal value (eg, 2, 2.1, 3.141596)
* This should NOT be set to 0
*/
$level_post_mp_cost = 2.5;

/* This determines how much mp a user regenerates per day
* Raising this value will generally increase the current
* mp for most posters.
* This may be set to a decimal value (eg, 3, 3.5, 2.71828)
* This should NOT be set to 0
*/
$level_mp_regen_per_day = 4;

if($level_level < 1)
{
        $level_mp = '0 / 0';
        $level_mp_percent = 0;
}
else
{
        $level_max_mp = floor( (pow( $level_level, (1/4) ) ) * (pow( 10, pow( $level_level+2, (1/3) ) ) ) / (pi()) );

        $level_mp_cost = $postrow[$i]['user_posts'] * $level_post_mp_cost;
        $level_mp_regen = max(1, $level_user_days * $level_mp_regen_per_day);

        $level_cur_mp = floor($level_max_mp - $level_mp_cost + $level_mp_regen);
        $level_cur_mp = max(0, $level_cur_mp);
        $level_cur_mp = min($level_max_mp, $level_cur_mp);

        $level_mp = $level_cur_mp . ' / ' . $level_max_mp;
        $level_mp_percent = floor($level_cur_mp / $level_max_mp * 100 );

}


Anybody at all?


Back to top Reply with quote
#6   re: HPMPEXP hack
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
Taut has been a member for over 20 year's 20 Year Member
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.72 posts per day
Posts: 5530
Points: 481,695
   
have you tried posting in phpbb forums? since they were the creators they might have a better idea for you as to how to get this to run the way you want it


taut



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum