[MOD]Lottery system

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [MOD]Lottery system

      Este mod funciona en las versiones de Xnova con base 2moons 1.8 en adelante.
      EL mod cuenta con una vista para el usuario y otra administrativa.
      Esto solo se aplica para cuando la rifa no esta iniciada.
      En la administrativa puedes ajustar la rifa a tus necesidades con los siguientes valores.
      Costo del ticket:
      • Metal
      • Cristal
      • Deuterio
      • Materia Oscura
      En estos campos determinarás como quieres que el usuario cuando compre el ticket para participar pague.

      Premios:
      • Metal
      • Cristal
      • Deuterio
      • Materia Oscura
      • Regalo de Materia Oscura
      En estos campos definirás la cantidad en el premio en caso de que el usuario gane la rifa obtenga.
      Regalo de Materia Oscura(MO): este campo solo se aplica para cuando insertas el usuario a la rifa de forma manual por la vista administrativa.

      Configuración:
      • Cantidad de ganadores
      • Porcentaje descuento
      • Cantidad de Horas
      • Máximo de tickets
      • Descripción
      Cantidad de ganadores: Este campo se define la cantidad de jugadores que quieres que salgan como ganadores al terminar la rifa.
      Porcentaje descuento: Este campo se define el % que quieres que sea descontado al premio según el lugar del ganador.
      Cantidad de Horas: Este campo se define la cantidad en horas que quieres que dure la rifa activa antes de seleccionar el o los ganadores.
      Máximo de tickets: Este campo se define la cantidad de tickets que puede adquirir cada jugador.

      Queda resaltar que los numero de ticket no le da mas posibilidad al usuario de ganar la rifa, sino que le aumenta el premio según la cantidad de ticket adquirido.
      Descripción: Este campo se define una breve descripción sobre la rifa, o algún dato que deseas agregar.
      NOTA: Abajo de la descripción te aparecerá un botón Nueva Lotería.
      NOTA: Una vez que este iniciada la rifa, aparecerá un botón Terminar Rifa que con esto podrás finalizar la rifa de forma manual.
      PD: Cuando creas la rifa automáticamente manda un mensaje a todos los jugadores diciendo que se ha iniciado la rifa.


      Esto solo se aplica cuando la rifa aya iniciado
      Jugadores:
      • Usuarios Inscritos
      • Inscribir por Transferencia
        • Filtrar
        • Cantidad
      • Ganador
      Usuarios Inscritos: Acá te muestra la lista de los usuarios que se estén inscrito en la rifa.
      Inscribir por Transferencia: Acá mostrara un listado de todos los usuarios registrado en el juego, donde podrás seleccionarlo para añadirlo manualmente en la rifa, y se aplicará el valor que definas en el campo Regalo de (MO).
      Filtrar: Acá puedes hacer un filtro por nombre de usuario.
      Cantidad: Acá es donde se define a la hora de insertar los ticket para el usuario.

      Queda resaltar que aunque pongas una cantidad superior solamente se aplicara dependiendo al valor que se defina en el campo Máximo de tickets
      Ganador: Una vez acabada la rifa te mostrara el listado de los ganadores.
      NOTA: Una vez seleccionado el usuario para insertar debes darle en un boton que dice Registrar
      Vista del Usuario verás-
      Costo del ticket:
      • Metal
      • Cristal
      • Deuterio
      • Materia Oscura
      Donde veras cuanto es que costará el ticket para participar en la rifa.

      Premios:
      • Metal
      • Cristal
      • Deuterio
      • Materia Oscura
      Donde veras de cuanto es el premio de la rifa actual para el o los ganadores.


      Inscribirse:
      • BOLETOS COMPRADOS
      Una vez iniciada te aparecerá un contador que es el tiempo por el cual estará activa la rifa y un botón para registrarse en dicha rifa.
      Boletos Comprados: Acá aparecerá la cantidad de ticket que puedes adquirir y los que tienes adquirido.


      Jugadores:
      • Usuarios Inscritos
      • Ganador
      Usuarios Inscritos: Acá veras una lista de todos los usuarios inscritos en la rifa.
      Ganador: Una vez que se termine la rifa, se mostrarán el o los ganadores de la rifa.


      Añadir en el archivo dbtables.php
      'LOTTERY' => DB_PREFIX.'lottery',
      'CONFLOTTERY' => DB_PREFIX.'lottery_config',

      Lee dentro el archivo readme
      Esperemos que sea de su agrado.
      Files
      • lottery our.zip

        (117.53 kB, downloaded 350 times, last: )
      VERY SAD :/ :/ :/ :/

      The post was edited 1 time, last by yamilrh ().

    • i get this error ....am i supposed to add to dbtables also

      SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%% CONFLOTTERY %% LIMIT 1' at line 1

      Query-Code: select * from %% CONFLOTTERY %% LIMIT 1
      File: / includes / classes / Database.class.php
      Line: 135
    • Me da este error

      Message: Undefined offset: 1
      File: /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      Line: 550
      URL: xnovaone.online/game.php?page=lottery
      PHP-Version: 7.2.33
      PHP-API: fpm-fcgi
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php(550): errorHandler(8, 'Undefined offse...', 'FILEPATH ...', 550, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_63862fe58a6384_89168892(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(103): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #7 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #8 /includes/pages/game/AbstractGamePage.class.php(249): template->display('extends:layout....')
      #9 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #10 /game.php(57): ShowLotteryPage->show()
      #11 {main}
    • tellez wrote:

      Me da este error

      Message: Undefined offset: 1
      File: /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      Line: 550
      URL: xnovaone.online/game.php?page=lottery
      PHP-Version: 7.2.33
      PHP-API: fpm-fcgi
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php(550): errorHandler(8, 'Undefined offse...', 'FILEPATH ...', 550, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_63862fe58a6384_89168892(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(103): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #7 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #8 /includes/pages/game/AbstractGamePage.class.php(249): template->display('extends:layout....')
      #9 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #10 /game.php(57): ShowLotteryPage->show()
      #11 {main}
      abre este fichero y copia lo que esta en la linea 550
      cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      VERY SAD :/ :/ :/ :/
    • yamilrh wrote:

      abre este fichero y copia lo que esta en la linea 550
      cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      The lottery is the next word I make after your video fleet reduc and Shop
    • yamilrh wrote:

      tellez wrote:

      Me da este error

      Message: Undefined offset: 1
      File: /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      Line: 550
      URL: xnovaone.online/game.php?page=lottery
      PHP-Version: 7.2.33
      PHP-API: fpm-fcgi
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php(550): errorHandler(8, 'Undefined offse...', 'FILEPATH ...', 550, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_63862fe58a6384_89168892(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(103): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #7 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #8 /includes/pages/game/AbstractGamePage.class.php(249): template->display('extends:layout....')
      #9 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #10 /game.php(57): ShowLotteryPage->show()
      #11 {main}
      abre este fichero y copia lo que esta en la linea 550cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      - <?php echo $_smarty_tpl->tpl_vars['item']->value[1];?>
    • tellez wrote:

      yamilrh wrote:

      tellez wrote:

      Me da este error

      Message: Undefined offset: 1
      File: /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      Line: 550
      URL: xnovaone.online/game.php?page=lottery
      PHP-Version: 7.2.33
      PHP-API: fpm-fcgi
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php(550): errorHandler(8, 'Undefined offse...', 'FILEPATH ...', 550, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_63862fe58a6384_89168892(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(103): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #7 /incluye/clases/clase.template.php(137): Smarty_Internal_TemplateBase->display('extiende:diseño....')
      #8 /incluye/páginas/juego/AbstractGamePage.class.php(249): template->display('extends:layout....')
      #9 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #10 /juego.php(57): MostrarPáginaLotería->mostrar()
      #11 {principal}
      abre este fichero y copia lo que esta en la linea 550cache/templates/es^8fa58803a5e60ffb0fca9e8bd3a5e22b9e79763f.page.lottery.default.tpl.php
      - <?php echo $_smarty_tpl->tpl_vars['elemento']->valor[1];?>
      eso error te lo dio, cuando creaste la loteria o sin crearla?
      VERY SAD :/ :/ :/ :/
    • tellez wrote:

      Estoy añadiéndola ahora y me arrojó ese error
      no deberia darte ningun error al menos que te saltaras algo o te falte algo. Verifica que estes haciebdo todo correctamente. Los campos en la BD y demas. Prueba llenando todos los valores a la hora de crearla.
      VERY SAD :/ :/ :/ :/
    • Message: Undefined offset: 1
      File: /cache/templates/es^b82e8e8b8bb2645c54bf7d51c3901822a92d4484.page.lottery.default.tpl.php
      Line: 801
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/templates/es^b82e8e8b8bb2645c54bf7d51c3901822a92d4484.page.lottery.default.tpl.php(801): errorHandler(8, 'Undefined offse...', 'C://xampp//htdocs...', 801, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_6387ac2aafcd01_12078191(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(103): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #5 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #6 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #7 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #8 /includes/pages/game/AbstractGamePage.class.php(253): template->display('extends:layout....')
      #9 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #10 /game.php(57): ShowLotteryPage->show()
      #11 {main}


      Continúo con el mismo problema en esta lotería
    • that is a css issue, you need to edit and add <style> or into your css file

      example
      <div id="ally_content" class="conteiner">
      <style>
      #ally_content {
      1. width:714px;
      2. padding: 0;
      3. overflow: hidden;
      4. position: relative;
      5. margin: car;
      6. <style>


    • Russoll wrote:

      that is a css issue, you need to edit and add <style> or into your css file

      example
      <div id="ally_content" class="conteiner">
      <style>
      #ally_content {
      1. width:714px;
      2. padding: 0;
      3. overflow: hidden;
      4. position: relative;
      5. margin: car;
      6. <style>

      A que archivo debería agregar ese code CCS?