Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: [MODULO] Maximum Reset  (Visto 2608 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline DESINGMASTHER Posteado: July 31, 2020, 11:22:45 PM

  • Colaborador
  • 0 puntos por ventas
  • *
  • Rank: Usuario activo
  • Posts: 67
  • Gracias recibida: 1995
  • pe
[GUÍA] Module Character Reset ->Maximum Reset

WebEngine CMS 1.2.0

ESPAÑOL [TRADUCTOR DE GOOGLE]
WebEngine ha hecho un gran trabajo y quisiera ofrecer mi contribución.
Lo estoy modificando de acuerdo a mi necesidad, respetando todos los estándares de código abordados por el desarrollador.
Si quieres limitar la cantidad de Resets que puede obtener un personaje, solo sigue la guía a continuación.

PORTUGUÊS

O WebEngine fez um ótimo trabalho e gostaria de oferecer minha contribição.
Estou modificando-a de acordo com minha needidade, respetando todos los padrões de código abordados pelo desenvolvedor.
Caso você deseja limitar a quantidade de Resets que um personagem pode obter, apenas siga o guia abaixo.


1- Abrir archivo.
www \ incluye \ languages \ YOUR LANGUAGE \ language.php
Búsqueda por:
$ lang ['error_102'] =

Incluir a continuación:
$ lang ['error_103'] = 'Ya obtuvo el restablecimiento máximo para este personaje.';
Guardar y Salir.

2- Ahora reemplace los archivos descargados en el directorio exacto.
www \ admincp \ modules \ mconfig \ reset.php
www \ incluye \ classes \ class.character.php
www \ incluye \ config \ modules \ usercp.reset.xml













Contraseña : tuservermu.com.ve


Cualquier cosa privado :D

Servicio de adaptacion de template para webengine .
Servicio para desarrollo de template para juegos online.
Servicio de ocnfiguracion de servidores de juegos online

Offline muinternational #1 Posteado: August 08, 2020, 09:36:50 PM

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 324
  • Gracias recibida: 752
  • ar
Hola bro me ayudarias con este problema?





Offline josefh95 #2 Posteado: September 01, 2020, 07:42:39 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 1
  • Gracias recibida: 0
  • pe
Hola bro me ayudarias con este problema?




ALGUIEN POR FAVOR QUE PUEDA DAR UNA SOLUCIÓN A ESTO? A MI TAMBIEN ME ESTA PASANDO


Offline assrub #3 Posteado: September 05, 2020, 01:57:11 PM

  • +3 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 86
  • Gracias recibida: 764
  • ar
Gracias por el aporte, adjunto el codigo para solucionar el problema. cambiar en "admincp\modules\mconfig\reset.php" 
lo escrito por esto:

Code: [Select]
<?php
/**
 * WebEngine CMS
 * https://webenginecms.org/
 * 
 * @version 1.2.0
 * @author Lautaro Angelico <http://lautaroangelico.com/>
 * @copyright (c) 2013-2019 Lautaro Angelico, All Rights Reserved
 * 
 * Licensed under the MIT license
 * http://opensource.org/licenses/MIT
 */

echo '<h2>'.lang('mconfig_reset_txt_1',true).'</h2>';

function saveChanges() {
    global $_POST;
    foreach($_POST as $setting) {
        if(!check_value($setting)) {
            message('error',''.lang('mconfig_reset_txt_2',true).'');
            return;
        }
    }
    $xmlPath = __PATH_MODULE_CONFIGS__.'usercp.reset.xml';
    $xml = simplexml_load_file($xmlPath);
    
    $xml->active = $_POST['setting_1'];
    $xml->resets_enable_zen_requirement = $_POST['setting_2'];
    $xml->resets_price_zen = $_POST['setting_3'];
    $xml->resets_required_level = $_POST['setting_4'];
    $xml->resets_enable_credit_reward = $_POST['setting_5'];
    $xml->resets_credits_reward = $_POST['setting_6'];
    $xml->credit_config = $_POST['setting_7'];
    $xml->resets_required_maximum = $_POST['setting_8'];
    
    $save = $xml->asXML($xmlPath);
    if($save) {
        message('success','Settings successfully saved.');
    } else {
        message('error','There has been an error while saving changes.');
    }
}

if(check_value($_POST['submit_changes'])) {
    saveChanges();
}

loadModuleConfigs('usercp.reset');

$creditSystem = new CreditSystem();
?>
<form action="" method="post">
    <table class="table table-striped table-bordered table-hover module_config_tables">
        <tr>
            <th>Status<br/><span>Enable/disable the character reset module.</span></th>
            <td>
                <? enabledisableCheckboxes('setting_1',mconfig('active'),'Enabled','Disabled'); ?>
            </td>
        </tr>
        <tr>
            <th>Zen Requirement<br/></th>
            <td>
                <? enabledisableCheckboxes('setting_2',mconfig('resets_enable_zen_requirement'),'Enabled','Disabled'); ?>
            </td>
        </tr>
        <tr>
            <th>Zen<br/><span>If zen requirement is enabled, set the price of this feature.</span></th>
            <td>
                <input class="input-small" type="text" name="setting_3" value="<?=mconfig('resets_price_zen')?>"/>
            </td>
        </tr>
        <tr>
            <th>Required Level<br/><span>Required level to reset.</span></th>
            <td>
                <input class="input-small" type="text" name="setting_4" value="<?=mconfig('resets_required_level')?>"/>
            </td>
        </tr>
        <tr>
            <th>Maximum Reset<br/><span>Maximum Reset you can get.</span></th>
            <td>
                <input class="input-small" type="text" name="setting_8" value="<?=mconfig('resets_required_maximum')?>"/>
            </td>
        </tr>
        <tr>
            <th>Credits Reward<br/><span>Enable/disable giving credit(s) reward for every reset.</span></th>
            <td>
                <? enabledisableCheckboxes('setting_5',mconfig('resets_enable_credit_reward'),'Enabled','Disabled'); ?>
            </td>
        </tr>
        <tr>
            <th>Reward<br/><span>If credits reward is enabled, set the amount of credits that will be rewarded for every reset.</span></th>
            <td>
                <input class="input-small" type="text" name="setting_6" value="<?=mconfig('resets_credits_reward')?>"/> credit(s)
            </td>
        </tr>
        <tr>
            <th>Credit Configuration<br/><span></span></th>
            <td>
                <?php echo $creditSystem->buildSelectInput("setting_7", mconfig('credit_config'), "form-control"); ?>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" name="submit_changes" value="Save Changes" class="btn btn-success"/></td>
        </tr>
    </table>
</form>





Offline straiker23 #4 Posteado: July 06, 2022, 06:29:55 PM | Modificado: July 06, 2022, 06:42:23 PM by straiker23

  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 256
  • Gracias recibida: 69
  • do
y el link del archivo? podrias resubirlo porfavor?

PROXIMO PROGRAMADOR! LEARNING..........
SERVICIO DE CONFIGURACION GENERAL, SERVERFILES, WEBSITES ENTRE OTROS.
VENTAS VPS, WEBHOSTING Y EN GENERAL. TU MEJOR OPCION QUE ESPERAS PARA CONTACTARME?
Discord: DarioPerez#0015

Offline RaStraBaN #5 Posteado: December 08, 2022, 02:36:29 PM

  • 0 puntos por ventas
  • *
  • Rank: Avanzado
  • Posts: 122
  • Gracias recibida: 35
  • pa

Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
9 Replies
1910 Views
Last post May 23, 2019, 08:04:50 PM
by milkaritas
13 Replies
2593 Views
Last post July 08, 2017, 11:25:15 PM
by pujosx
11 Replies
3395 Views
Last post January 14, 2023, 12:20:56 AM
by Chonny88
7 Replies
1851 Views
Last post July 24, 2018, 05:42:14 PM
by Cartman
0 Replies
454 Views
Last post May 13, 2020, 01:26:38 AM
by monitor1