Busco algún mod de alarma

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

    • yamilrh wrote:

      tellez wrote:

      Busco algún mod que haga sonar el navegador cuando esté recibiendo algún ataque o algo por el estilo. Muchas gracias de antemano.
      Esto debería servirte alerts
      Si pero busco uno que transmita sonidos. Ejemplo: Cuando te llegue un mensaje.
    • tellez wrote:

      yamilrh wrote:

      tellez wrote:

      Busco algún mod que haga sonar el navegador cuando esté recibiendo algún ataque o algo por el estilo. Muchas gracias de antemano.
      Esto debería servirte alerts
      Si pero busco uno que transmita sonidos. Ejemplo: Cuando te llegue un mensaje.
      Añade además en main.navigation.tpl

      HTML Source Code

      1. <div style="height:0; overflow:hidden;" loop="false;" id="music">
      2. <audio id="beepataks" preload="auto">
      3. <source src="{$dpath}/sound/sirena.mp3">
      4. <source src="{$dpath}/sound/sirena.ogg">
      5. </audio>
      6. <script type="text/javascript">
      7. var ataks = "{$totalAttacks}";
      8. var spio = "{$totalSpio}";
      9. var unic = "{$unicAttacks}";
      10. var rakets = "{$totalRockets}";
      11. document.getElementById('beepataks').volume={$sirena};
      12. setInterval(function() { AJAX() }, 5000);
      13. </script>
      14. </div>
      Display All
      VERY SAD :/ :/ :/ :/
    • this is what you will need e file creatShowScanPage.class.php

      Source Code

      1. class ShowScanPage extends AbstractGamePage
      2. {
      3. function __construct()
      4. {
      5. parent::__construct();
      6. }
      7. function Show()
      8. {
      9. global $USER;
      10. $db = Database::get();
      11. $Alarm = $db->selectSingle("SELECT COUNT(`fleet_target_owner`) as nr FROM uni".$USER['universe']."_fleets WHERE `fleet_target_owner` = '". $USER['id'] ."' AND (`fleet_mission` = '1' OR `fleet_mission` = '2' OR `fleet_mission` = '9') AND `fleet_mess` ='0';");
      12. echo $Alarm['nr'];
      13. exit;
      14. }
      15. }
      Display All
    • also create a script json.js place it in scripts/game

      Source Code

      1. function AJAX()
      2. {
      3. jQuery.post("./json.php", {'ataks': ataks, 'spio': spio, 'unic': unic, 'rakets': rakets, 'ajax': 1, 'msg': msg}, function(data)
      4. {
      5. var indicators = document.getElementById('indicators');
      6. var newemail = document.getElementById('new_email');
      7. var beepataks = document.getElementById('beepataks');
      8. var msgaudio = document.getElementById('msgaudio');
      9. if(data.ICOFLEET)
      10. {
      11. indicators.innerHTML = data.ICOFLEET;
      12. if(data.SOUNDATAKS){
      13. beepataks.play();
      14. }
      15. if( msg < data.msg){
      16. if(data.SOUNDMSG){
      17. msgaudio.play();}
      18. }
      19. ataks = data.ataks;
      20. spio = data.spio;
      21. unic = data.unic;
      22. rakets = data.rakets;
      23. msg = data.msg;
      24. }
      25. }, "json"
      26. );
      27. }
      Display All
    • in the main.navigation
      at top of tpl

      <script type="text/javascript">
      setInterval(function() { AJAX() }, 5000);
      </script>
      <script type="text/javascript" src="./scripts/game/json.js"></script>

      at bottom add

      <div style="height:0; overflow:hidden;" loop="false;" id="music">
      <audio id="beepataks" preload="auto">
      <source src="./sound/sirena.mp3"></source>
      <source src="./sound/sirena.ogg"></source>
      </audio>
      <audio id="msgaudio" preload="auto">
      <source src="./sound/msg.mp3"></source>
      <source src="./sound/msg.ogg"></source>
      </audio>
      <script type="text/javascript">
      var ataks = "{$ataks}";
      var spio = "{$spio}";
      var unic = "{$unic}";
      var rakets = "{$rakets}";
      var msg = {$new_message};
      document.getElementById('msgaudio').volume={$msgvolume};
      document.getElementById('beepataks').volume={$volume};
      </script>
    • Russoll wrote:

      ok you need to post the errors , without seeing them you cant get the help needed

      most of these errors are because you may not of added all the code in the mod
      Ahora mismo no tiene ningun error. Sencillamente no hace su función de alarma. No suena, no da ninguna señal