Dark Savior,
Create A New Template "rpg_reset_stats" And Put The Following Code In The Template.
Code:
<table bgcolor="{pagebgcolor}" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="right" width="100%"><normalfont><a href="member.php?s=&action=reset_stats">Reset RPG Stats</a></normalfont></td>
</tr>
</table>
<br>
Create Another Template "redirect_statsreset" And Put The Following Code In The Template.
Code:
$bbuserinfo[username], Your RPG stats have successfully been reset.
Then make the following changes to member.php file.
Open member.php ( 3 )
Find: ( 1 )
PHP Code:
$templatesused = 'register_birthday,modifyprofile_customtext,register_customfields,usercpnav,modifyprofile';
Replace With:
PHP Code:
$templatesused = 'register_birthday,modifyprofile_customtext,register_customfields,usercpnav,modifyprofile,rpg_reset_stats';
Find: ( 2 )
PHP Code:
eval("dooutput(\"".gettemplate("modifyprofile")."\");");
Above It Add:
PHP Code:
eval ( "\$reset_stats = \"" . gettemplate ( "rpg_reset_stats" ) . "\" ) ;" ) ;
Find: ( 3 )
PHP Code:
// ############################### start modify password ###############################
Above It Add:
PHP Code:
/***************************************************\
|* START RPG STATS RESET *|
\***************************************************/
if ( $action == "reset_stats" ) :
if ( !$bbuserinfo['userid'] ) :
show_nopermission ( ) ;
endif ;
$DB_site->query ( "
UPDATE user SET maxhp=0, hp=0, maxpp=0, pp=0, maxma=0, ma=0, ap=0, xp=0, alignment=0, rpgrace=0, element=0, rpgclass=0, rpggender=0, rpgtype=0, inbattle=0
WHERE userid=$bbuserinfo[userid]" ) ;
$goto = "member.php?s=&action=editprofile" ;
eval ( "standardredirect ( \"" . gettemplate ( "redirect_statsreset" ) . "\",\"$goto\" ) ;" ) ;
endif ;
/***************************************************\
|* END RPG STATS RESET *|
\***************************************************/
And Then In The modifyprofile template place the variable:
where you like the link to show, you can edit the template to however you feel necessary too. I have not tested this, but if you have any problems let me know and I will see what I can do.
Cheers,
g-force2k2