Danter14 Professional

  • Male
  • 40
  • Member since Jan 11th 2017
Last Activity

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

  • yamilrh -

    en algún punto será que liberes 2moons para php >8.x

  • spacebouncers -

    Hello, 2 moons classic theme in a game, fleet rapid settings in the battle engine work irregularly and the battle engine does not give the correct results according to the rapid settings.
    Did you have a study that includes fleet powers and rapid settings?
    For example, is it possible to integrate fleet data according to speedsim data? If you have such a study, can you help me?

  • JoseJorgeGC -

    Hola, estoy editando el admin panel de tu 2moons 2.0 y tengo un problema con las variables del TopNav. Elimine los frames y por lo tanto ahora no carga la función ShowTopNav que es la que me cargaba esas variables a los tpl. Copie la función para el overview del admin pero me gustaría saber si existe alguna manera más óptima de hacerlo que no te tenga que copiar la función ShowTopNav en cada función del panel de administración.

    Imagine algo como poner esas variables como globales pero no se si eso se puede hacer en la parte del panel de administración.

    Disculpa la molestia, gracias x adelantado.

  • venus00 -

    Danter Podria escribirme al whatsapp se me presento 1 problema... +53*******

    • Danter14 -

      Hello, I don't have WhatsApp, sorry.

    • venus00 -

      Ok...Mira cuando le doy reiniciar universo se queda la pagina en blanco no hace nada...!!!!

    • venus00 -

      lo otro es que se paro la produccion de recursos del universo completo...esto paso cuanto toque en el panel de admin---- Información ---- seleccione 1 jugador ----luego fui a ID, Nombres y Coordenadas ... Edite 1 planeta y le baje los recursos que tenia ...!!!!!! luego de eso los recursos no suben

    • Danter14 -

      so for the first possible that the link of the page is not good during processing or just that there is an error during processing. for the resources look in database if the planet is not with negative resources.

    • venus00 -

      no no es 1 solo planeta..es la produccion completa asi me cree 1 nueva cuenta..esta parada por completo...Y ya la suvi en el panel de admin y nada.

  • JoseJorgeGC -

    Saludos, todavia crees productivo lanzar a produccion el 2moons 2.0 o crees que es mejor usar otra version del.juego como New Stars o Steemnova? Gracias por adelantado.

  • yamilrh -

    Me había dado error de caracteres, y luego que se publico vi que estaba tu respuesta, he borrado la mia.

  • Lechi -

    Hola, quisiera añadir un nuevo material en mi servidor, estoy copiando los datos del deuterio, pero no consigo que funcione.
    Podrías crear un manual de los pasos a seguir para crear un nuevo recurso.
    2Moons Version: 1.8.git
    Desde ya muchas gracias por tu tiempo.

  • sven -

    The fees are calculated. That works, thanks for that, but no 1500 DM are calculated as set in the admin panel. Do I have to set this separately in the file? Thank you for your trouble

  • sven -

    thank you vor your great support!! you the best ! Maybe you can help me by the Trader:-)

    • Danter14 -

      Yes I am currently looking at the code for the trader

    • sven -

      thank you but the code from you is not work the Trader works without DM:-(

    • sven -

      <?php

      /**
      * 2Moons
      * by Jan-Otto Kröpke 2009-2016
      *
      * For the full copyright and license information, please view the LICENSE
      *
      * @package 2Moons
      * @author Jan-Otto Kröpke <slaver7@gmail.com>
      * @copyright 2009 Lucky
      * @copyright 2016 Jan-Otto Kröpke <slaver7@gmail.com>
      * @licence MIT
      * @version 1.8.0
      * @link github.com/jkroepke/2Moons
      */


      class ShowTraderPage extends AbstractGamePage
      {
      public static $requireModule = MODULE_TRADER;

      function __construct()
      {
      parent::__construct();
      }

      public static $Charge = array(
      901 => array(901 => 1, 902 => 2, 903 => 4),
      902 => array(901 => 0.5, 902 => 1, 903 => 2),
      903 => array(901 => 0.25, 902 => 0.5, 903 => 1),
      );

      public function show()
      {
      global $LNG, $USER, $resource;

      $darkmatter_cost_trader = Config::get()->darkmatter_cost_trader;

      $this->assign(array(
      'tr_cost_dm_trader' => sprintf($LNG['tr_cost_dm_trader'], pretty_number($darkmatter_cost_trader), $LNG['tech'][921]),
      'charge' => self::$Charge,
      'resource' => $resource,
      'requiredDarkMatter' => $USER['darkmatter'] < $darkmatter_cost_trader ? sprintf($LNG['tr_not_enought'], $LNG['tech'][921]) : false,
      ));

      $this->display("page.trader.default.tpl");
      }
      if ($tradeSum > 0)
      {
      $USER[$resource[921]] -= Config::get()->darkmatter_cost_trader;
      }
      function trade()
      {
      global $USER, $LNG;

      if ($USER['darkmatter'] < Config::get()->darkmatter_cost_trader) {
      $this->redirectTo('game.php?page=trader');
      }

      $resourceID = HTTP::_GP('resource', 0);

      if(!in_array($resourceID, array_keys(self::$Charge))) {
      $this->printMessage($LNG['invalid_action'], array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));
      }

      $tradeResources = array_values(array_diff(array_keys(self::$Charge[$resourceID]), array($resourceID)));
      $this->tplObj->loadscript("trader.js");
      $this->assign(array(
      'tradeResourceID' => $resourceID,
      'tradeResources' => $tradeResources,
      'charge' => self::$Charge[$resourceID],
      ));

      $this->display('page.trader.trade.tpl');
      }

      function send()
      {
      global $USER, $PLANET, $LNG, $resource;

      if ($USER['darkmatter'] < Config::get()->darkmatter_cost_trader) {
      $this->redirectTo('game.php?page=trader');
      }

      $resourceID = HTTP::_GP('resource', 0);

      if(!in_array($resourceID, array_keys(self::$Charge))) {
      $this->printMessage($LNG['invalid_action'], array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));
      }

      $getTradeResources = HTTP::_GP('trade', array());

      $tradeResources = array_values(array_diff(array_keys(self::$Charge[$resourceID]), array($resourceID)));
      $tradeSum = 0;

      $sum=0;

      foreach($tradeResources as $tradeRessID)
      {
      $tradeAmount = max(0, round((float) $getTradeResources[$tradeRessID]));

      $sum+= $tradeAmount * self::$Charge[$resourceID][$tradeRessID];
      }

      if($sum>$PLANET[$resource[$resourceID]])
      {
      $this->printMessage(sprintf($LNG['tr_not_enought'], $LNG['tech'][$resourceID]), array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));

      }

      $sum=0;
      foreach($tradeResources as $tradeRessID)
      {
      $tradeAmount = max(0, round((float) $getTradeResources[$tradeRessID]));
      $sum+= $tradeAmount * self::$Charge[$resourceID][$tradeRessID];
      }
      if($sum>$PLANET[$resource[$resourceID]])
      {
      $this->printMessage(sprintf($LNG['tr_not_enought'], $LNG['tech'][$resourceID]), array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));
      }
      foreach($tradeResources as $tradeRessID)
      {
      $tradeAmount = max(0, round((float) $getTradeResources[$tradeRessID]));
      if(empty($tradeAmount) || !isset(self::$Charge[$resourceID][$tradeRessID]))
      {
      continue;
      }
      if(isset($PLANET[$resource[$resourceID]]))
      {
      $usedResources = $tradeAmount * self::$Charge[$resourceID][$tradeRessID];
      if($usedResources > $PLANET[$resource[$resourceID]])
      {
      $this->printMessage(sprintf($LNG['tr_not_enought'], $LNG['tech'][$resourceID]), array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));
      }
      else
      {
      $tradeSum += $tradeAmount;
      $PLANET[$resource[$resourceID]] -= $usedResources;
      }
      }
      elseif(isset($USER[$resource[$resourceID]]))
      {
      if($resourceID == 921)
      {
      $USER[$resource[$resourceID]] -= Config::get()->darkmatter_cost_trader;
      }
      $usedResources = $tradeAmount * self::$Charge[$resourceID][$tradeRessID];
      if($usedResources > $USER[$resource[$resourceID]])
      {
      $this->printMessage(sprintf($LNG['tr_not_enought'], $LNG['tech'][$resourceID]), array(array(
      'label' => $LNG['sys_back'],
      'url' => 'game.php?page=trader'
      )));
      }
      else
      {
      $tradeSum += $tradeAmount;
      $USER[$resource[$resourceID]] -= $usedResources;
      }
      if($resourceID == 921)
      {
      $USER[$resource[$resourceID]] += Config::get()->darkmatter_cost_trader;
      }
      }
      else
      {
      throw new Exception('Unknown resource ID #'.$resourceID);
      }
      if(isset($PLANET[$resource[$tradeRessID]]))
      {
      $PLANET[$resource[$tradeRessID]] += $tradeAmount;
      }
      elseif(isset($USER[$resource[$tradeRessID]]))
      {
      $USER[$resource[$tradeRessID]] += $tradeAmount;
      }
      else
      {
      throw new Exception('Unknown resource ID #'.$tradeRessID);
      }
      }

    • sven -

      who is the mistake?

  • sven -

    hi i have a question in 2 moons 2.0 in the Admin Panel when i will klick i have this error can you help me???

    [05-Apr-2023 20:32:48] USER ERROR: "Permission error!"
    File: /www/htdocs/w01d6aeb/mkmatz.eno-intern.de/U700/includes/pages/adm/ShowConfigModsPage.php | Line: 13
    URL: mkmatz.eno-intern.de/U700/admin.php?page=configmods | Version: 2.0.git
    Stack trace:
    #0 /admin.php(70): include_once()
    #1 {main}

    • Danter14 -

      Hello, you don't have the right to execute this file, you can delete this line if you don't want to bother with this error because it can come from a lot of problems.

      if (!allowedTo(str_replace(array(dirname(__FILE__), '\\', '/', '.php'), '', __FILE__))) throw new Exception("Permission error!");

  • yamilrh -

    Saludos, para que sirve los puntos de recompensas en el mod quests

  • sven -

    <a href-"game.php?page-moonBuy"><i class-"far fa-moon"></i> {$LNG.ov_create_moon}</a> can you help what is here wrong?

    • Danter14 -

      <a href="game.php?page-moonBuy"><i class="far fa-moon"></i> {$LNG.ov_create_moon}</a>

      You had it in my file if yes tell me that I correct it

    • sven -

      yes can you give me yours? now i have this mistake




      Message: SQLSTATE[HY000]: General error: 1034 Index for table 'uni1_planets' is corrupt; try to repair it

      Query-Code:SELECT * FROM uni1_planets WHERE id = ;
      File: /includes/classes/Database.class.php
      Line: 126
      URL: localhost/game/2Moons/2moons/game.php
      PHP-Version: 7.3.33
      PHP-API: apache2handler
      2Moons Version: 2.0.git
      Debug Backtrace:
      #0 /includes/classes/Database.class.php(202): Database->_query('SELECT * FROM u...', Array, 'select')
      #1 /includes/common.php(174): Database->selectSingle('SELECT * FROM %...', Array)
      #2 /game.php(24): require('D://xamp//htdocs//...')

    • sven -

      can you tell me what the mistake is?

    • Danter14 -

      The error you have is that it can't find your planet ID

  • yamilrh -

    hola, conoces alguna herramienta o algo que me pueda permitir bloquear el acceso a mi xnova, para aquellos usuarios que usan proxy anónimos o vpn

  • Nykus -

    what is the latest version, I've been a little out of date :)

  • Nykus -

    hola

  • Jekill -

    Hola Danter14 envie una propuesta mediante una conversacion, pudieras responder?

  • Russoll -

    hey i was wondering if you are going to release an update so v2 can work with higher php version

    • Danter14 -

      hello, yes I am working on the code to make everything work perfectly in php 8.1 6

  • sven -

    hi warum kann man oben 2 moons nicht mehr spielen? ich würde es gerne weiter verwalten wen es die möglichkeit gibt

  • yamilrh -

    Hola, hace mucho que ya no se muestra activo como antes, por fin 2moons 3.0

    • Danter14 -

      Hello, in view of the number of votes the project is on hold because 9 votes for 689 members currently on the forum. I don't want to waste time on developing a new web and mobile version if it's not tracked and without feedback.

    • yamilrh -

      si entiendo perfectamente.

    • Yaro2709 -

      Извините, что вмешиваюсь в разговор, но я считаю, что если совершенно ничего не делать, то 2Moons умрет. Хоть активность и желает лучшего, но следует понять, что она упала именно из-за консервативности общества и его "ленивости" (конечно "жадность" и "корысть" людей тоже сыграла свою роль в развитие 2Moons). Если все же вы захотите вернуться к разработке, то я был бы рад вас видеть в проекте New-Star. Совершенно недавно я подключил к нему мульти-дизайность, поэтому вы с лёгкостью сможете разрабатывать свой дизайн поверх движка.

    • Danter14 -

      Regarding 2moons in itself I understand that if nothing is done it will fall into oblivion I agree with you above.

      2moons is an open source code I understand that certain is not for the disclosure of the improvements which it brings because it also puts a time of design, for the beginner developer what saddens me is that it does not make any more learning of development at the slightest problem it directly requires a resolution by another person.

      In terms of multi-design, I also developed it.

      For the new 2moons, I had thought of doing it directly on a cell phone via an application because we are not going to lie to each other all through cellphones now

    • yamilrh -

      Pienso que una nueva versión de 2moon requiere de nueva tecnología, depurar el código que por muchos años se lleva arrastrando curre de tantas mano que paso al ser open source. Pero se necesita 2moons 3.0 :) now

  • SAAS -

    Hello! which files to edit here to add new raw material, so that it would be ok
    thx

  • Jekill -

    Buenas, le hice un par de correciones al 2Moons 2.0 para PHP 7.4.5 y no se a donde podria subirla. Saludos!

  • Pesadilla -

    Buenas danter14 perdón incomodar con un tema ya gasta y sobre la perdida de recurso en el movimiento de flotas hay algún modo de solucionar ese problema es cuando despliegas el recurso llega el ms pero los recursos se pierden sin llegar al destino

  • Pesadilla -

    WARNING
    Message: session_start(): Unable to clear session lock record
    File: /includes/classes/Session.class.php
    Line: 137
    URL: xnova.nat.cu/game.php?page=alliance
    PHP-Version: 7.2.24
    PHP-API: fpm-fcgi
    2Moons Version: 2.2.git
    Debug Backtrace:
    #0 [internal function]: errorHandler(2, 'session_start()...', 'FILEPATH ...', 137, Array)
    #1 /includes/classes/Session.class.php(137): session_start()
    #2 /includes/common.php(114): Session::load()
    #3 /game.php(24): require_once('FILEPATH ...')
    #4 {main}

  • yamilrh -

    cuando nos deleitaras con 2moon 3.0 :)

    • yamilrh -

      esta version el diseño lo pensastes responsive para cualquier tipo de dispositivos, o solamente esta diseñado para pc¿

    • Danter14 -

      I am still working on it, as soon as a test version is available you will be well informed

    • yamilrh -

      thanks

  • Pesadilla -

    eso no resuelve el problema pq deja de cumplir su funcion

  • Pesadilla -

    Fatal error: Cannot redeclare class FlyingFleetHandler in /srv/www/www.xnova.nat.cu/htdocs/includes/classes/class.FlyingFleetHandler.php on line 18

    entonces como pasa eso si solo lo realizo una vez no hay como solucionar ese error

    • Skylon -

      Lo arregle al quitar las llamadas (require y require_once) de la clase ShowAlliancePage.class.php.
      El tema es que hace dos llamadas a la clase class.FlyingFleetHandler.php y crea este conflicto.

      Debes poner una sola llamada que sirva para ambas funciones de la clase ShowAlliancePage

  • Pesadilla -

    Fatal error: Cannot redeclare class FlyingFleetHandler in /srv/www/www.xnova.nat.cu/htdocs/includes/classes/class.FlyingFleetHandler.php on line 18

  • Skylon -

    How can I put temporary ships.
    For example, ships that are available only on specific dates or for a defined period of time.
    I was studying the function isElementBuyable but I would like some advice from you before entering to modify code unnecessarily.

    • Danter14 -

      You have more possibility to do that, be you made an addition for example of a column in the database is to change the display code is of construction or to do it in raw code.

  • yamilrh -

    amigo me sucede lo siguiente, cuando espio un enemigo veo la flota que le mantienen en posicion en dicho planeta pero esta flota aun no se a estacionado en este planeta, como corrijo eso?