Doublexp doubleskill.png Double Exp & Skill: Matar monstros rende o dobro de pontos de experiência. O progresso de skills é duas vezes mais rápido! Doublexp doubleskill.png
Bone Overlord.gif The Roost of the Graveborn Quest Spoiler!
Domine Graveborn: todos os bosses e mecânicas ilustradas!
Saiba mais ➔
Winter Tree.png Winter Update 2025
Acompanhe tudo sobre o Winter Update 2025!
Saiba mais ➔
Stag.gif The Order of the Stag Quest Spoiler!
Conheça Isle of Ada: sua quest, missões secundárias e todos os bosses!
Saiba mais ➔

Tibia Wiki:Exercise Weapons Calculator/Codigo: mudanças entre as edições

De Tibia Wiki - A Enciclopédia do Tibia
Ir para navegação Ir para pesquisar
 
(10 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
<pre id="exercise_weapons_html">
<pre id="exercise_weapons_html">
<table class="main_table">
<div class="exercise-training">
        <tr>
    <div class="et-menu side-by-side-07">
        <td style="height: 30px;" colspan="2">
      <div class="title-menu">
            <div id="title" class="titulo">Hot Cuisine Calculator System</div>
        <h4 id="hot-title">Calculadora de tempo de Exercise Weapons</h4>
        </td>
      </div>
        </tr>
      <br>
        <tr>
      <div class="subtitulo">
        <td>
          <h5>Normal Weapons:</h5>
            <table style="width:100%;height:40px;">
      </div>
                <tr>
      <br>
                    <td style="width: 48%; vertical-align: top;">
      <div id="normal-weapons-select" class="weapon-select"></div>
                        <table style="width:100%;">
      <br>
                            <tr>
      <div class="subtitulo">
                                <td>
          <h5>Durable Weapons:</h5>
                                    <div id="title" class="titulo">Normal Weapons:</div>
      </div>
                                    <div id="normal-weapons-select"></div>
      <br>
                                </td>
      <div id="durable-weapons-select" class="weapon-select"></div>
                              </tr>
      <br>
                              <tr>
      <div class="subtitulo">
                                <td>
          <h5>Lasting Weapons:</h5>
                                  <div id="title" class="titulo">Durable Weapons:</div>
      </div>
                                  <div id="durable-weapons-select"></div>
      <br>
                                </td>
      <div id="lasting-weapons-select" class="weapon-select"></div>
                              </tr>
      <br>
                              <tr>
      <div id="ewc-version" class="version"></div>
                                <td>
    </div>
                                  <div id="title" class="titulo">Lasting Weapons:</div>
    <div class="content side-by-side">
                                  <div id="lasting-weapons-select"></div>
      <div style="height: 60px; vertical-align: top;">
                                </td>
        <div class="subtitulo">
                            </tr>
          <h5>Quantidade de Cargas:</h5>
                        </table> 
        </div>
                    </td>
        <input type="number" id="qtdCharges" name="qtdCharges" value="1" min="1" oninput="updateTime()"><br>
                    <td style="width: 48%; vertical-align: top;">
        <div class="subtitulo">
                            <table style="height:100%;">
          <h5>Tempo das Cargas:</h5>
                                <tr>
        </div>
                                    <td style="height: 60px; vertical-align: top;">
        <div class="time-box">
                                        <div class="titulo">Quantidade de Cargas:</div>
          <label id="time-label"></label>
                                        <input type="number" id="qtdCharges" name="qtdCharges" value="1" min="1" oninput="updateTime()"><br>
        </div>
                                    </td>
      </div>
                                </tr>
    </div>
                                <tr>
  </div>
                                    <td style="width: 48%; vertical-align: top;">
                                        <div class="titulo">Tempo das Cargas:</div>
                                        <div class="ingredients-list" style="max-height: 485px; overflow: auto; vertical-align: top;">
                                            <label id="time-label"></label>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                    </td>
                </tr>
            </table>
        </td>
        </tr>
    </table>
</pre>
</pre>
<pre id="exercise_weapons_css">
<pre id="exercise_weapons_css">
.main_table {
.exercise-training {
  border: #7B6E4C 1px solid;
    display: flex;
  background: #181E23;
    width: 500px;
  margin: 2px;
    border-radius: 5px;
  -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    border: 2px solid #a2a9b1;
  -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    background: #ffffff;
  box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    margin: 2px;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
    -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
  font-size: 13px;
    -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
  color: #B2A898;
    box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    font-family: Verdana, Arial, Times New Roman, sans-serif;
    color: #000000;
    border-spacing: 0px;
}
.display-flex {
    display: flex;
}
.side-by-side {
    flex: 1; /* Distribute available space equally */
}
.side-by-side-07 {
    flex: 0.7; /* Distribute available space equally */
}
.et-menu {
    background-color: #c7451d;
    color: #ffffff;
    float: left;
    max-width: 280px;
    padding: 10px;
    border-bottom-left-radius: 3px;
    border-top-left-radius: 3px;
}
}


.title-menu {
    width: 100%;
    border-bottom: 1px solid black;
    padding-bottom: 5px;
}
.title-menu > h4 {
    color: #ffffff;
}
.titulo {
.titulo {
  position: relative;
    position: relative;
  margin: 1px 2px 0 2px;
    margin: 0px;
  border: #7B6E4C 1px solid;
    padding: 0;
  background: #11161A;
    text-align: center;
  padding: 0 auto;
    font-weight: bold;
  height: 24px;
    cursor: default;
  line-height: 24px;
}
  text-align: center;
.titulo > h4 {
  font-weight: bold;
    color: #fff
  font-size: 12px;
}
  cursor: default;
.subtitulo {
    float: left;
    width: 100%;
    margin-left: 5px;
}
.subtitulo > h5 {
    float: left;
    margin-top: 1em;
    margin-bottom: 1em;
}
}
 
.et-menu > .subtitulo > h5 {
.quantity-box {
    color: #ffffff;
  position: relative;
  width: 34px;
  margin: 1px 2px 0 2px;
  border: #7B6E4C 1px solid;
  background: #11161A;
  height: 15px;
  line-height: 15px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  cursor: default;
}
}


.title-box {
.time-box {
  position: relative;
    border: black 1px solid;
  margin: 1px 2px 0 2px;
    border-radius: 5px;
  border: #7B6E4C 1px solid;
    border-left: #c7451d 5px solid;
  background: #11161A;
    background: #f8f8f8;
  line-height: 50px;
    border-collapse: separate;
  text-align: center;
    width: calc(100% - 20px);
  font-weight: bold;
    height: 24px;
  font-size: 12px;
    margin: 0px 5px 0px 5px;
  cursor: default;
    padding: 1px 1px 1px 1px;
  height: 56px;
    line-height: 18px;
  width: 100%;
    text-align: center;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    /* font-family: Verdana, Arial, Times New Roman, sans-serif; */
    font-size: 13px;
    color: black;
}
}


#qtdCharges {
.time-box > label {
   background: #11161A;
   line-height: 24px;
  width: 273px;
  height: 18px;
  margin: 5px 0px 0 2px;
  padding: 1px 1px 1px 1px;
  border: #CBB47A 1px solid;
  border-collapse: separate;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
  font-size: 13px;
  color: #B2A898;
}
}


Linha 128: Linha 137:
   font-family: Verdana, Arial, Times New Roman, sans-serif;
   font-family: Verdana, Arial, Times New Roman, sans-serif;
   font-size: 13px;
   font-size: 13px;
   color: #B2A898;
   color: #000000;
   display: block;
   display: block;
   text-align: center;
   text-align: center;
}
.weapon-select {
  padding: 10px 0px 0px 0px;
}
}


.link-system {
.weapon-select > div {
     color: #CBB47A !important;
     height: 5px;
    display: flex;
    align-items: center;
    width: fit-content;
    float: left;
    margin-left: 5px;
}
}


#normal-weapons-select, #durable-weapons-select, #lasting-weapons-select, .ingredients-list {
.weapon-select > div > label {
   background: #11161A;
   font-weight: bold;
  margin: 5px 2px 2px 2px;
   font-size: 12px;
  padding: 10px;
  border: #CBB47A 1px solid;
   border-collapse: separate;
}
}


Linha 148: Linha 162:
   width: 20px;
   width: 20px;
   height: 20px;
   height: 20px;
}
.image-box {
  position: relative;
  margin: 1px 2px 0 2px;
  border: #7B6E4C 1px solid;
  background: #11161A;
  padding: 0 auto;
  height: 34px;
  width: 34px;
  text-align: center;
  cursor: default;
}
}


#qtdCharges {
#qtdCharges {
  border: #7B6E4C 1px solid;
    border: black 1px solid;
  background: #3d5361;
    border-radius: 5px;
  height: 18px;
    border-left: #c7451d 5px solid;
  line-height: 18px;
    background: #f8f8f8;
  text-align: center;
    border-collapse: separate;
  display: inline-block;
    width: calc(100% - 20px);
  vertical-align: top;
    height: 24px;
  white-space: nowrap;
    margin: 0px 5px 0px 5px;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
    padding: 1px 1px 1px 1px;
  font-size: 13px;
    line-height: 18px;
  color: #B2A898;
    text-align: center;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    /* font-family: Verdana, Arial, Times New Roman, sans-serif; */
    font-size: 13px;
    color: black;
}
}


/* Tooltip */
/* Tooltip */
 
.tip {
.tip2 {
    font-family: Verdana, Arial, Times New Roman, sans-serif;
  background-color: #F2F2F2;
    font-size: 12px;;
  border-radius: 2px;
    background-color: #ffffff;
  box-shadow: 0 0 6px #B2B2B2;
    border-radius: 2px;
  display: none;
    box-shadow: 0 0 6px #888;
  position: absolute;
    display: none;
  padding: 10px;
    position: absolute;
  z-index: 1;
    padding: 10px;
    z-index: 1;
    color: #000;
}
}
.tooltip {
.tooltip {
  position: relative;
    position: relative;
}
}
.tooltip,
.tooltip,
.tooltip:hover + .tip2,
.tooltip:hover + .tip,
.tip2:hover {
.tip:hover {
  display: block;
    display: block;
}
.tooltip > a {
  text-decoration: none;
}
.inspect-label {
    margin: 5px;
    line-height: 15px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    justify-content: center;
    align-items: center;
    color: #ffbf00;
}
.version {
    text-align: center;
    padding: 5px;
    margin-top: 15px;
    border-top: 1px solid black;
    font-size: 12px;
    font-weight: bold;
}
}
</pre>
</pre>
<pre id="exercise_weapons_js">
<pre id="exercise_weapons_js">
var version = "1.0";
var ewc_version = "v2.1.0";
         const exercise_weapons = {
         const exercise_weapons = {
           "normal": [
           "normal": [
Linha 219: Linha 248:
               image: "https://www.tibiawiki.com.br/images/f/fa/Exercise_Club.gif",
               image: "https://www.tibiawiki.com.br/images/f/fa/Exercise_Club.gif",
               link: "https://www.tibiawiki.com.br/wiki/Exercise_Club"
               link: "https://www.tibiawiki.com.br/wiki/Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
             },
             },
             {
             {
Linha 237: Linha 272:
               image: "https://www.tibiawiki.com.br/images/9/93/Exercise_Wand.gif",
               image: "https://www.tibiawiki.com.br/images/9/93/Exercise_Wand.gif",
               link: "https://www.tibiawiki.com.br/wiki/Exercise_Wand"
               link: "https://www.tibiawiki.com.br/wiki/Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/7/7b/Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Wraps"
             }
             }
           ],
           ],
Linha 257: Linha 298:
               image: "https://www.tibiawiki.com.br/images/3/31/Durable_Exercise_Club.gif",
               image: "https://www.tibiawiki.com.br/images/3/31/Durable_Exercise_Club.gif",
               link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Club"
               link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
             },
             },
             {
             {
Linha 275: Linha 322:
               image: "https://www.tibiawiki.com.br/images/2/25/Durable_Exercise_Wand.gif",
               image: "https://www.tibiawiki.com.br/images/2/25/Durable_Exercise_Wand.gif",
               link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Wand"
               link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/7/7b/Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Wraps"
             }
             }
           ],
           ],
Linha 295: Linha 348:
               image: "https://www.tibiawiki.com.br/images/3/3b/Lasting_Exercise_Club.gif",
               image: "https://www.tibiawiki.com.br/images/3/3b/Lasting_Exercise_Club.gif",
               link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Club"
               link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
             },
             },
             {
             {
Linha 313: Linha 372:
               image: "https://www.tibiawiki.com.br/images/1/1c/Lasting_Exercise_Wand.gif",
               image: "https://www.tibiawiki.com.br/images/1/1c/Lasting_Exercise_Wand.gif",
               link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Wand"
               link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/1/12/Lasting_Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Wraps"
             }
             }
           ]
           ]
         }
         }


         const weapons = ["Axe", "Bow", "Club", "Sword", "Rod", "Wand"]
         const weapons = ["Axe", "Bow", "Club", "Shield", "Sword", "Rod", "Wand", "Wraps"]


         var calcTime = (charges) => {
         var calcTime = (charges) => {
Linha 363: Linha 428:
         var populateNormalWeaponSelect = (weapon) => {
         var populateNormalWeaponSelect = (weapon) => {
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           image = "<span class=\"tooltip\"><img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\" /></span><span class=\"tip2\" id=\"fonte3\"><a href=\"" + weapon.link + "\" target=\"blank\">" + weapon.name + ": " + weapon.charges +"</a></span>";
           let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> &#9432; </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
 
           $("#normal-weapons-select").append("<div><input type=\"checkbox\" id=\"normal-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"normal-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
           $("#normal-weapons-select").append("<div style=\"margin-top: 5px; height: 5px; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; width: fit-content;\"><input type=\"checkbox\" id=\"normal-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"normal-weapon\"> " + weapon.name + "</label></div><br>");
         }
         }


         var populateDurableWeaponSelect = (weapon) => {
         var populateDurableWeaponSelect = (weapon) => {
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           image = "<span class=\"tooltip\"><img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\" /></span><span class=\"tip2\" id=\"fonte3\"><a href=\"" + weapon.link + "\" target=\"blank\">Durable " + weapon.name + ": " + weapon.charges +"</a></span>";
           let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> &#9432; </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
 
           $("#durable-weapons-select").append("<div><input type=\"checkbox\" id=\"durable-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"durable-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
           $("#durable-weapons-select").append("<div style=\"margin-top: 5px; height: 5px; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; width: fit-content;\"><input type=\"checkbox\" id=\"durable-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"durable-weapon\"> " + weapon.name + "</label></div><br>");
         }
         }


         var populateLastingWeaponSelect = (weapon) => {
         var populateLastingWeaponSelect = (weapon) => {
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
           image = "<span class=\"tooltip\"><img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\" /></span><span class=\"tip2\" id=\"fonte3\"><a href=\"" + weapon.link + "\" target=\"blank\">Lasting " + weapon.name + ": " + weapon.charges +"</a></span>";
           let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> &#9432; </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
 
           $("#lasting-weapons-select").append("<div><input type=\"checkbox\" id=\"lasting-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"lasting-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
           $("#lasting-weapons-select").append("<div style=\"margin-top: 5px; height: 5px; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; width: fit-content;\"><input type=\"checkbox\" id=\"lasting-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"lasting-weapon\"> " + weapon.name + "</label></div><br>");
         }
         }


Linha 402: Linha 464:


         $(document).ready(function() {
         $(document).ready(function() {
             $("#title").text("Exercise Weapons Time Calculator - " + version);
             $("#ewc-version").text(ewc_version);
             populateWeaponSelect();
             populateWeaponSelect();
             updateSelectedWeapon(document.getElementById("normal-weapon"));
             updateSelectedWeapon(document.getElementById("normal-weapon"));
         });
         });
</pre>
</pre>

Edição atual tal como às 16h04min de 4 de março de 2025

<div class="exercise-training">
    <div class="et-menu side-by-side-07">
      <div class="title-menu">
        <h4 id="hot-title">Calculadora de tempo de Exercise Weapons</h4>
      </div>
      <br>
      <div class="subtitulo">
          <h5>Normal Weapons:</h5>
      </div>
      <br>
      <div id="normal-weapons-select" class="weapon-select"></div>
      <br>
      <div class="subtitulo">
          <h5>Durable Weapons:</h5>
      </div>
      <br>
      <div id="durable-weapons-select" class="weapon-select"></div>
      <br>
      <div class="subtitulo">
          <h5>Lasting Weapons:</h5>
      </div>
      <br>
      <div id="lasting-weapons-select" class="weapon-select"></div>
      <br>
      <div id="ewc-version" class="version"></div>
    </div>
    <div class="content side-by-side">
      <div style="height: 60px; vertical-align: top;">
        <div class="subtitulo">
          <h5>Quantidade de Cargas:</h5>
        </div>
        <input type="number" id="qtdCharges" name="qtdCharges" value="1" min="1" oninput="updateTime()"><br>
        <div class="subtitulo">
          <h5>Tempo das Cargas:</h5>
        </div>
        <div class="time-box">
          <label id="time-label"></label>
        </div>
      </div>
    </div>
  </div>
.exercise-training {
    display: flex;
    width: 500px;
    border-radius: 5px;
    border: 2px solid #a2a9b1;
    background: #ffffff;
    margin: 2px;
    -webkit-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    -moz-box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 10px 2px rgba(255, 255, 255, 1);
    font-family: Verdana, Arial, Times New Roman, sans-serif;
    color: #000000;
    border-spacing: 0px;
}
.display-flex {
    display: flex;
}
.side-by-side {
    flex: 1; /* Distribute available space equally */
}
.side-by-side-07 {
    flex: 0.7; /* Distribute available space equally */
}
.et-menu {
    background-color: #c7451d;
    color: #ffffff;
    float: left;
    max-width: 280px;
    padding: 10px;
    border-bottom-left-radius: 3px;
    border-top-left-radius: 3px;
}

.title-menu {
    width: 100%;
    border-bottom: 1px solid black;
    padding-bottom: 5px;
}
.title-menu > h4 {
    color: #ffffff;
}
.titulo {
    position: relative;
    margin: 0px;
    padding: 0;
    text-align: center;
    font-weight: bold;
    cursor: default;
}
.titulo > h4 {
    color: #fff
}
.subtitulo {
    float: left;
    width: 100%;
    margin-left: 5px;
}
.subtitulo > h5 {
    float: left;
    margin-top: 1em;
    margin-bottom: 1em;
}
.et-menu > .subtitulo > h5 {
    color: #ffffff;
}

.time-box {
    border: black 1px solid;
    border-radius: 5px;
    border-left: #c7451d 5px solid;
    background: #f8f8f8;
    border-collapse: separate;
    width: calc(100% - 20px);
    height: 24px;
    margin: 0px 5px 0px 5px;
    padding: 1px 1px 1px 1px;
    line-height: 18px;
    text-align: center;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    /* font-family: Verdana, Arial, Times New Roman, sans-serif; */
    font-size: 13px;
    color: black;
}

.time-box > label {
  line-height: 24px;
}

#time-label {
  background: transparent;
  font-family: Verdana, Arial, Times New Roman, sans-serif;
  font-size: 13px;
  color: #000000;
  display: block;
  text-align: center;
}
.weapon-select {
  padding: 10px 0px 0px 0px;
}

.weapon-select > div {
    height: 5px;
    display: flex;
    align-items: center;
    width: fit-content;
    float: left;
    margin-left: 5px;
}

.weapon-select > div > label {
  font-weight: bold;
  font-size: 12px;
}

input[type=checkbox] {
  width: 20px;
  height: 20px;
}

#qtdCharges {
    border: black 1px solid;
    border-radius: 5px;
    border-left: #c7451d 5px solid;
    background: #f8f8f8;
    border-collapse: separate;
    width: calc(100% - 20px);
    height: 24px;
    margin: 0px 5px 0px 5px;
    padding: 1px 1px 1px 1px;
    line-height: 18px;
    text-align: center;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    /* font-family: Verdana, Arial, Times New Roman, sans-serif; */
    font-size: 13px;
    color: black;
}

/* Tooltip */
.tip {
    font-family: Verdana, Arial, Times New Roman, sans-serif;
    font-size: 12px;;
    background-color: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 6px #888;
    display: none;
    position: absolute;
    padding: 10px;
    z-index: 1;
    color: #000;
}
.tooltip {
    position: relative;
}
.tooltip,
.tooltip:hover + .tip,
.tip:hover {
    display: block;
}
.tooltip > a {
  text-decoration: none;
}
.inspect-label {
    margin: 5px;
    line-height: 15px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    justify-content: center;
    align-items: center;
    color: #ffbf00;
}
.version {
    text-align: center;
    padding: 5px;
    margin-top: 15px;
    border-top: 1px solid black;
    font-size: 12px;
    font-weight: bold;
}
var ewc_version = "v2.1.0";
        const exercise_weapons = {
          "normal": [
            {
              name: "Exercise Axe",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/d/dd/Exercise_Axe.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Axe"
            },
            {
              name: "Exercise Bow",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/2/29/Exercise_Bow.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Bow"
            },
            {
              name: "Exercise Club",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/f/fa/Exercise_Club.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
            },
            {
              name: "Exercise Sword",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/c/c5/Exercise_Sword.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Sword"
            },
            {
              name: "Exercise Rod",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/e/e8/Exercise_Rod.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Rod"
            },
            {
              name: "Exercise Wand",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/9/93/Exercise_Wand.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 500,
              image: "https://www.tibiawiki.com.br/images/7/7b/Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Wraps"
            }
          ],
          "durable": [
            {
              name: "Exercise Axe",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/1/10/Durable_Exercise_Axe.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Axe"
            },
            {
              name: "Exercise Bow",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/e/e0/Durable_Exercise_Bow.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Bow"
            },
            {
              name: "Exercise Club",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/3/31/Durable_Exercise_Club.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
            },
            {
              name: "Exercise Sword",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/2/2a/Durable_Exercise_Sword.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Sword"
            },
            {
              name: "Exercise Rod",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/3/3e/Durable_Exercise_Rod.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Rod"
            },
            {
              name: "Exercise Wand",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/2/25/Durable_Exercise_Wand.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 1800,
              image: "https://www.tibiawiki.com.br/images/7/7b/Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Durable_Exercise_Wraps"
            }
          ],
          "lasting": [
            {
              name: "Exercise Axe",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/4/44/Lasting_Exercise_Axe.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Axe"
            },
            {
              name: "Exercise Bow",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/7/7c/Lasting_Exercise_Bow.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Bow"
            },
            {
              name: "Exercise Club",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/3/3b/Lasting_Exercise_Club.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Club"
            },
            {
              name: "Exercise Shield",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/2/26/Exercise_Shield.gif",
              link: "https://www.tibiawiki.com.br/wiki/Exercise_Shield"
            },
            {
              name: "Exercise Sword",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/d/db/Lasting_Exercise_Sword.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Sword"
            },
            {
              name: "Exercise Rod",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/3/31/Lasting_Exercise_Rod.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Rod"
            },
            {
              name: "Exercise Wand",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/1/1c/Lasting_Exercise_Wand.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Wand"
            },
            {
              name: "Exercise Wraps",
              charges: 14400,
              image: "https://www.tibiawiki.com.br/images/1/12/Lasting_Exercise_Wraps.gif",
              link: "https://www.tibiawiki.com.br/wiki/Lasting_Exercise_Wraps"
            }
          ]
        }

        const weapons = ["Axe", "Bow", "Club", "Shield", "Sword", "Rod", "Wand", "Wraps"]

        var calcTime = (charges) => {
          let hour = getHour(charges * 2);
          let minutes = getMinute(charges * 2);
          let seconds = getSeconds(charges * 2);
          return ((hour < 10) ? "0" + hour : hour) + ":" + ((minutes < 10) ? "0" + minutes : minutes) + ":" + ((seconds < 10) ? "0" + seconds : seconds) + "h";
        }

        var getHour = (time) => {          
          return Math.floor(time / 3600);
        }

        var getMinute = (time) => {
          return Math.floor((time % 3600) / 60);
        }

        var getSeconds = (time) => {
          return time % 60;
        }

        var getRandomWeapon = () => {
          let randomIndex = Math.floor(Math.random() * weapons.length);
          return weapons[randomIndex];
        }

         // Popula o Select de Items.
         var populateWeaponSelect = async () => {
            $("#normal-weapons-select").empty();
            $("#durable-weapons-select").empty();
            $("#lasting-weapons-select").empty();

            let selectedWeaponClass = getRandomWeapon();
            if (exercise_weapons != null) { // Verifica se a lista de weapons não é nula
                let normal_weapon = exercise_weapons["normal"].find(weapon => weapon.name.includes(selectedWeaponClass));
                let durable_weapon = exercise_weapons["durable"].find(weapon => weapon.name.includes(selectedWeaponClass));
                let lasting_weapon = exercise_weapons["lasting"].find(weapon => weapon.name.includes(selectedWeaponClass));
                
                populateNormalWeaponSelect(normal_weapon);
                populateDurableWeaponSelect(durable_weapon);
                populateLastingWeaponSelect(lasting_weapon);
            }
        };

        var populateNormalWeaponSelect = (weapon) => {
          let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
          let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> ⓘ </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
          $("#normal-weapons-select").append("<div><input type=\"checkbox\" id=\"normal-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"normal-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
        }

        var populateDurableWeaponSelect = (weapon) => {
          let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
          let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> ⓘ </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
          $("#durable-weapons-select").append("<div><input type=\"checkbox\" id=\"durable-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"durable-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
        }

        var populateLastingWeaponSelect = (weapon) => {
          let image = "<img style=\"width: 25px; height 25px;\" src=\""+ weapon.image + "\"/>";
          let tooltip = "<span class=\"tooltip\"><a href=\"" + weapon.link + "\" target=\"blank\"><div class=\"inspect-label\"> ⓘ </div></a></span><span class=\"tip\" id=\"fonte3\">" + weapon.name + ": " + weapon.charges +"</span>"
          $("#lasting-weapons-select").append("<div><input type=\"checkbox\" id=\"lasting-weapon\" name=\"" + weapon.name + "\" value=\"" + weapon.charges + "\" onchange=\"updateSelectedWeapon(this)\">" + image + "<label for=\"lasting-weapon\"> " + weapon.name + "</label>" + tooltip + "</div><br>");
        }

        var updateSelectedWeapon = (weapon) => {
          document.getElementById("normal-weapon").checked = false;
          document.getElementById("durable-weapon").checked = false;
          document.getElementById("lasting-weapon").checked = false;
          weapon.checked = true;
          updateQtdCharges(weapon.value);
        }

        var updateQtdCharges = (charges) => {
          document.getElementById("qtdCharges").value = charges;
          updateTime();
        }

        var updateTime = () => {
          let charges = document.getElementById("qtdCharges").value;
          let time = calcTime(charges);          
          $("#time-label").text(time);
        }

        $(document).ready(function() {
            $("#ewc-version").text(ewc_version);
            populateWeaponSelect();
            updateSelectedWeapon(document.getElementById("normal-weapon"));
        });