Ir para conteúdo
  • 0

Como colocar sistema de reset no My AAc


scofieldtk2

Pergunta

Alguem poderia me ajudar com esse sistema, sistema do RadBR.? 

Tenho o script, porém não sei como colocar no meu MyAac.

 

Spoiler

<?php

if (!$logged){

include ('login.php');

}

if ($logged)

if ($action == ''){

$main_content .='

Para resetar o personagem escolha o personagem e digite sua senha para confirmação.<br>

Ao resetar seu personagem, o personagem vai para level 8 mantendo o restante dos atributos.<br/><br/>

<form action="?subtopic=reset&action=reset" method="post" >

<div class="TableContainer" >

<table class="Table1" cellpadding="0" cellspacing="0" >

<div class="CaptionContainer" >

<div class="CaptionInnerContainer" >

<span class="CaptionEdgeLeftTop" style="background-image:url(layouts/tibiacom/images/content/box-frame-edge.gif);" /></span>

<span class="CaptionEdgeRightTop" style="background-image:url(layouts/tibiacom/images/content/box-frame-edge.gif);" /></span>

<span class="CaptionBorderTop" style="background-image:url(layouts/tibiacom/images/content/table-headline-border.gif);" ></span>

<span class="CaptionVerticalLeft" style="background-image:url(layouts/tibiacom/images/content/box-frame-vertical.gif);" /></span>

<div class="Text" >Resetar personagem</div>

<span class="CaptionVerticalRight" style="background-image:url(layouts/tibiacom/images/content/box-frame-vertical.gif);" /></span>

<span class="CaptionBorderBottom" style="background-image:url(layouts/tibiacom/images/content/table-headline-border.gif);" ></span>

<span class="CaptionEdgeLeftBottom" style="background-image:url(layouts/tibiacom/images/content/box-frame-edge.gif);" /></span>

<span class="CaptionEdgeRightBottom" style="background-image:url(layouts/tibiacom/images/content/box-frame-edge.gif);" /></span>

</div>

</div>

<tr>

<td>

<div class="InnerTableContainer" >

<table style="width:100%;" >

<tr>

<td class="LabelV" ><span >Nome do personagem:</td>

<td style="width:90%;" >

<select name="reset_name">';

$players_from_logged_acc = $account_logged->getPlayersList();

if(count($players_from_logged_acc) > 0) {

$players_from_logged_acc->orderBy('name');

foreach($players_from_logged_acc as $player) {

$main_content .= '<option value="'.$player->getName().'">'.$player->getName().'</option>';

}

} else {

$main_content .= 'You don\'t have any character on your account.';

}

$main_content .='

</select>

</td>

</tr>

<!--tr>

<td class="LabelV" >

<span >Account Name:</td><td><input type="password" name="reset_acc" size="30" maxlength="29" ></td></tr-->

</table>

</div>

</table>

</div>

</td>

</tr>

<br/>

<table style="width:100%" >

<tr align="center" >

<td>

<table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" >

<div class="BigButton" style="background-image:url(layouts/tibiacom/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(layouts/tibiacom/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="layouts/tibiacom/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=accountmanagement" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url(layouts/tibiacom/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(layouts/tibiacom/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="layouts/tibiacom/images/buttons/_sbutton_back.gif" ></div></div></td></tr></form></table></td></tr></table> 

';

}

if ($action == 'reset'){

$reset_name = stripslashes(ucwords(strtolower(trim($_REQUEST['reset_name']))));

if(check_name($reset_name)) {

$player = $ots->createObject('Player');

$player->find($reset_name);

if($player->isLoaded()) {


$PlayerLevel = $player->getLevel();

$PlayerReset = $player->getCustomField('reset');

$PlayerResetNow = $player->getCustomField('reset') + 1;

$ResetTable = array (

0 => 350,

1 => 350,

2 => 350,

3 => 350,

4 => 350,


5 => 355,

6 => 355,

7 => 355,

8 => 355,

9 => 355,


10 => 360,

11 => 360,

12 => 360,

13 => 360,

14 => 360,


15 => 365,

16 => 365,

17 => 365,

18 => 365,

19 => 365,


20 => 380,

21 => 380,

22 => 380,

23 => 380,

24 => 380,


25 => 390,

26 => 390,

27 => 390,

28 => 390,

29 => 390,


30 => 410,

31 => 410,

32 => 410,

33 => 410,

34 => 410,


35 => 430,

36 => 430,

37 => 430,

38 => 430,

39 => 430,


40 => 450,

41 => 450,

42 => 450,

43 => 450,

44 => 450,


45 => 480,

46 => 480,

47 => 480,

48 => 480,

49 => 480,


50 => 510,

51 => 510,

52 => 510,

53 => 510,

54 => 510,


55 => 550,

56 => 550,

57 => 550,

58 => 550,

59 => 550,

);

$LevelLeft = $ResetTable[$PlayerReset] - $PlayerLevel;

if ($PlayerLevel >= $ResetTable[$PlayerReset]){

$SQL->query ("UPDATE `players` SET  `reset` =  `reset` + '1', level = 8 WHERE  `players`.`id` = '".$player->getId()."' LIMIT 1 ;");

$main_content .= '

<div class="reset_class">

Personagem '.$player->getName().' estava level '.$PlayerLevel.' e foi resetado com sucesso.<br />

Agora o personagem tem '.$PlayerResetNow.' reset(s).

</div>

<br />

<table border="0" cellpadding="0" cellspacing="0" align="center">

<tbody>

<tr>

<td style="border: 0px none;">

<div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">

<div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>

<form action="?subtopic=reset" method="post">

<input class="ButtonText" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" type="image">

</form>

</div>

</div>

</td>

</tr>

</tbody>

</table>

';

}

else {

$main_content .= '

<div class="reset_class">

Você tem '.$PlayerReset.' resets.<br />

Você reseta level '.$ResetTable[$PlayerReset].'.<br />

<span style="color: red;">Faltam '.$LevelLeft.' level(s).</span>

</div>

<br />

<table border="0" cellpadding="0" cellspacing="0" align="center">

<tbody>

<tr>

<td style="border: 0px none;">

<div class="BigButton" style="background-image: url('.$layout_name.'/images/buttons/sbutton.gif);">

<div onmouseover="MouseOverBigButton(this);" onmouseout="MouseOutBigButton(this);"><div class="BigButtonOver" style="background-image: url('.$layout_name.'/images/buttons/sbutton_over.gif);"></div>

<form action="?subtopic=reset" method="post">

<input class="ButtonText" name="Continue" alt="Continue" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" type="image">

</form>

</div>

</div>

</td>

</tr>

</tbody>

</table>

';

}

/**********************************************/

} // Carregar modulos

} // Checar Player Existente

} // Fim page

?>

 

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...