AccueilDernières imagesRechercherS'enregistrerConnexion

Forum de graphisme, codage et game design proposant des tutoriels, astuces, libres services et commandes dans les domaines de l'infographie amateur, de l'intégration web (HTML et CSS essentiellement) ainsi que dans la conception de RPG sur forum.

Le Deal du moment : -38%
Ecran PC gaming 23,8″ – ACER KG241Y P3bip ...
Voir le deal
99.99 €

    Editing my calculator

    OPRevolution
    OPRevolution
    MasculinAge : 34Messages : 144

    Sam 13 Sep 2014 - 2:43

    Ma demande



    Hello! I just need help for change my calculator template.

    Schéma(s) et Eléments
    Schémas : Calculator
    Tailles des éléments : -x-
    Version de votre forum : PHPBB2,


    Ressources
    My calculator is that http://onepiecephantasytest.forumeiros.com/h1-calculadora-de-atributos

    But I need more organized, like this or something similar : https://i.imgur.com/XQbLTih.png
    But I don't know how can I do this...
    Can somebody help me?

    Code:
    <html>

    <head>
    <meta charset="UTF-8">
    <title>Calculadora de Atributos</title>
    <title></title>
    <script language="Javascript">
    function soma(){

    document.getElementById("hpgigante").value = '0';
    document.getElementById("hpmeiogigante").value = '0';
    document.getElementById("hpth").value = '0';
    document.getElementById("hphe").value = '0';
    document.getElementById("spgigante").value = '0';
    document.getElementById("spmeiogigante").value = '0';
    document.getElementById("spth").value = '0';
    document.getElementById("sphe").value = '0';
    document.getElementById("dan").value = '0';
    document.getElementById("ace").value = '0';
    document.getElementById("esq").value = '0';
    document.getElementById("blo").value = '0';
    document.getElementById("acr").value = '0';
    document.getElementById("edu").value = '0';
    document.getElementById("cot").value = '0';
    document.getElementById("res").value = '0';
    document.getElementById("rac").value = '0';
    document.getElementById("man").value = '0';
    document.getElementById("apa").value = '0';
    document.getElementById("ctr").value = '0';
    document.getElementById("vel").value = '0';
     
    var str = parseFloat(document.getElementById("str").value); var ra = parseFloat(document.getElementById("ra").value);
    var dex = parseFloat(document.getElementById("dex").value); var rb = parseFloat(document.getElementById("rb").value);
    var agi = parseFloat(document.getElementById("agi").value); var rc = parseFloat(document.getElementById("rc").value);
    var con = parseFloat(document.getElementById("con").value); var rd = parseFloat(document.getElementById("rd").value);
    var per = parseFloat(document.getElementById("per").value); var re = parseFloat(document.getElementById("re").value);
    var int = parseFloat(document.getElementById("int").value); var rf = parseFloat(document.getElementById("rf").value);
    var spr = parseFloat(document.getElementById("spr").value); var rg = parseFloat(document.getElementById("rg").value);
    var luc = parseFloat(document.getElementById("luc").value); var rh = parseFloat(document.getElementById("rh").value);
    var log = parseFloat(document.getElementById("log").value); var ri = parseFloat(document.getElementById("ri").value);
    var pes = parseFloat(document.getElementById("pes").value); var rj = parseFloat(document.getElementById("rj").value);
    var car = parseFloat(document.getElementById("car").value); var rk = parseFloat(document.getElementById("rk").value);
    var wil = parseFloat(document.getElementById("wil").value); var rl = parseFloat(document.getElementById("rl").value);
     
    document.getElementById("hpgigante").value = con * 14 + 20;
    document.getElementById("hpmeiogigante").value = con * 12 + 20;
    document.getElementById("hpth").value = con * 11 + 20;
    document.getElementById("hphe").value = con * 10 + 20;
    document.getElementById("spgigante").value = (dex + wil) * 1 + 20;
    document.getElementById("spmeiogigante").value = (dex + wil) * 3 + 20;
    document.getElementById("spth").value = (dex + wil) * 4 + 20;
    document.getElementById("sphe").value = (dex + wil) * 5 + 20;
    document.getElementById("dan").value = ((ra + str*3) + rb + dex/2 + rc + agi/2);
    document.getElementById("ace").value = ((rb + dex*3) + ri + log/2 + rh + luc/2);
    document.getElementById("esq").value = ((rc + agi*3) + re + per/2 + rh + luc/2);
    document.getElementById("blo").value = ((rd + con*3) + ra + str/2 + rb + dex/2);
    document.getElementById("acr").value = ((re + per*3) + rc + agi/2 + rd + con/2);
    document.getElementById("edu").value = ((rk + car*3) + rf + int/2 + rj + pes/2);
    document.getElementById("cot").value = ((rg + spr*3) + ri + log/2 + rl + wil/2);
    document.getElementById("res").value = ((rl + wil*3) + ra + str/2 + rd + con/2);
    document.getElementById("rac").value = ((ri + log*3) + rf + int/2 + re + per/2);
    document.getElementById("man").value = ((rj + pes*3) + rk + car/2 + rg + spr/2);
    document.getElementById("apa").value = ((rh + luc*3) + rk + car/2 + rj + pes/2);
    document.getElementById("ctr").value = ((rf + int*3) + rg + spr/2 + rl + wil/2);
    document.getElementById("vel").value = (rb + dex + rc + agi)/10 + 1;
    }
    </script>
    </head>
     
    <body bgcolor=white><div style="text-align: center;"><img src="http://i.imgur.com/qC6CQHX.png"><br /></div><br>
    <br>
    <br>
    <br>
    <br><font style="color: ;"><div align=right>Força: <input type="text" id="str" value="0" onblur="soma()">    Bônus: <input type="text" id="ra" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Destreza: <input type="text" id="dex" value="0" onblur="soma()">    Bônus: <input type="text" id="rb" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Agilidade: <input type="text" id="agi" value="0" onblur="soma()">    Bônus: <input type="text" id="rc" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Constituição: <input type="text" id="con" value="0" onblur="soma()">    Bônus: <input type="text" id="rd" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Percepção: <input type="text" id="per" value="0" onblur="soma()">    Bônus: <input type="text" id="re" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Inteligência: <input type="text" id="int" value="0" onblur="soma()">    Bônus: <input type="text" id="rf" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Espírito: <input type="text" id="spr" value="0" onblur="soma()">    Bônus: <input type="text" id="rg" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Sorte: <input type="text" id="luc" value="0" onblur="soma()">    Bônus: <input type="text" id="rh" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Lógica: <input type="text" id="log" value="0" onblur="soma()">    Bônus: <input type="text" id="ri" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Persuasão: <input type="text" id="pes" value="0" onblur="soma()">    Bônus: <input type="text" id="rj" value="0" onblur="soma()"></font><br>
    <font style="color: ">Carisma: <input type="text" id="car" value="0" onblur="soma()">    Bônus: <input type="text" id="rk" value="0" onblur="soma()"></font><br>
    <font style="color: ;">Força de Vontade: <input type="text" id="wil" value="0" onblur="soma()">    Bônus: <input type="text" id="rl" value="0" onblur="soma()"></font><br><hr size="1">
     
    <font style="color: red;">Pontos de Vida de Gigantes:<input type="button" id="hpgigante"><br>
    Pontos de Vida de Meio-Gigantes:<input type="button" id="hpmeiogigante"><br>
    Pontos de Vida da maioria dos Tritões e Humanóides:<input type="button" id="hpth"><br>
    Pontos de Vida de Humanos normais e Estrelas-do-Mar:<input type="button" id="hphe"><br></font>
    <font style="color: green;">Pontos de Vigor de Gigantes:<input type="button" id="spgigante"><br>
    Pontos de Vigor de Meio-Gigantes:<input type="button" id="spmeiogigante"><br>
    Pontos de Vigor da maioria dos Tritões e Humanóides:<input type="button" id="spth"><br>
    Pontos de Vigor de Humanos normais e Estrelas-do-Mar:<input type="button" id="sphe"><br></font>
    <font style="color: ;">Dano:<input type="button" id="dan"></font><br>
    <font style="color: ;">Acerto:<input type="button" id="ace"></font><br>
    <font style="color: ;">Esquiva:<input type="button" id="esq"></font><br>
    <font style="color: ;">Bloqueio:<input type="button" id="blo"></font><br>
    <font style="color: ;">Aceleração:<input type="button" id="acr"></font><br>
    <font style="color: ;">Educação:<input type="button" id="edu"></font><br>
    <font style="color: ;">Concentração:<input type="button" id="cot"></font><br>
    <font style="color: ;">Resistência:<input type="button" id="res"></font><br>
    <font style="color: ;">Raciocínio:<input type="button" id="rac"></font><br>
    <font style="color: ;">Manipulação:<input type="button" id="man"></font><br>
    <font style="color: ;">Aparência:<input type="button" id="apa"></font><br>
    <font style="color: ;">Auto-Controle:<input type="button" id="ctr"></font><br>
    Velocidade de Ataque:<input type="button" id="vel"></font><br></div></font>
    <br>
    <div style="text-align: center;"><img src="http://i.imgur.com/ZrKORjt.png"><br /></div>
    </body>
    </html>


    Autres précisions ?
    None


    Dernière édition par OPRevolution le Dim 14 Sep 2014 - 15:55, édité 1 fois



    Editing my calculator 2a98cj9
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Sam 13 Sep 2014 - 4:11

    Hi ^^

    So, here is what I did : http://libertia.forum-canada.com/h4-calculator

    Is it all you want?
    OPRevolution
    OPRevolution
    MasculinAge : 34Messages : 144

    Sam 13 Sep 2014 - 4:42

    Yeah ONYX! Thats it!
    Are you able to center it more with the images?
    If not, let it, is so good anyway.

    Thats great! really really great
    Thank you a lot for your help ^^

    I think it is solved moderators.
    Can be locked ^___^



    Editing my calculator 2a98cj9
    Onyx
    Onyx
    FémininAge : 30Messages : 3350

    Sam 13 Sep 2014 - 6:23

    They cannot lock it, I still didn't give you the code Razz

    Here it is :
    Code:
    <html>
    <head>
    <meta charset="UTF-8" />
    <title>Calculadora de Atributos</title>
    <script language="Javascript">
    function soma(){

    document.getElementById("hpgigante").value = '0';
    document.getElementById("hpmeiogigante").value = '0';
    document.getElementById("hpth").value = '0';
    document.getElementById("hphe").value = '0';
    document.getElementById("spgigante").value = '0';
    document.getElementById("spmeiogigante").value = '0';
    document.getElementById("spth").value = '0';
    document.getElementById("sphe").value = '0';
    document.getElementById("dan").value = '0';
    document.getElementById("ace").value = '0';
    document.getElementById("esq").value = '0';
    document.getElementById("blo").value = '0';
    document.getElementById("acr").value = '0';
    document.getElementById("edu").value = '0';
    document.getElementById("cot").value = '0';
    document.getElementById("res").value = '0';
    document.getElementById("rac").value = '0';
    document.getElementById("man").value = '0';
    document.getElementById("apa").value = '0';
    document.getElementById("ctr").value = '0';
    document.getElementById("vel").value = '0';
     
    var str = parseFloat(document.getElementById("str").value); var ra = parseFloat(document.getElementById("ra").value);
    var dex = parseFloat(document.getElementById("dex").value); var rb = parseFloat(document.getElementById("rb").value);
    var agi = parseFloat(document.getElementById("agi").value); var rc = parseFloat(document.getElementById("rc").value);
    var con = parseFloat(document.getElementById("con").value); var rd = parseFloat(document.getElementById("rd").value);
    var per = parseFloat(document.getElementById("per").value); var re = parseFloat(document.getElementById("re").value);
    var int = parseFloat(document.getElementById("int").value); var rf = parseFloat(document.getElementById("rf").value);
    var spr = parseFloat(document.getElementById("spr").value); var rg = parseFloat(document.getElementById("rg").value);
    var luc = parseFloat(document.getElementById("luc").value); var rh = parseFloat(document.getElementById("rh").value);
    var log = parseFloat(document.getElementById("log").value); var ri = parseFloat(document.getElementById("ri").value);
    var pes = parseFloat(document.getElementById("pes").value); var rj = parseFloat(document.getElementById("rj").value);
    var car = parseFloat(document.getElementById("car").value); var rk = parseFloat(document.getElementById("rk").value);
    var wil = parseFloat(document.getElementById("wil").value); var rl = parseFloat(document.getElementById("rl").value);
     
    document.getElementById("hpgigante").value = con * 14 + 20;
    document.getElementById("hpmeiogigante").value = con * 12 + 20;
    document.getElementById("hpth").value = con * 11 + 20;
    document.getElementById("hphe").value = con * 10 + 20;
    document.getElementById("spgigante").value = (dex + wil) * 1 + 20;
    document.getElementById("spmeiogigante").value = (dex + wil) * 3 + 20;
    document.getElementById("spth").value = (dex + wil) * 4 + 20;
    document.getElementById("sphe").value = (dex + wil) * 5 + 20;
    document.getElementById("dan").value = ((ra + str*3) + rb + dex/2 + rc + agi/2);
    document.getElementById("ace").value = ((rb + dex*3) + ri + log/2 + rh + luc/2);
    document.getElementById("esq").value = ((rc + agi*3) + re + per/2 + rh + luc/2);
    document.getElementById("blo").value = ((rd + con*3) + ra + str/2 + rb + dex/2);
    document.getElementById("acr").value = ((re + per*3) + rc + agi/2 + rd + con/2);
    document.getElementById("edu").value = ((rk + car*3) + rf + int/2 + rj + pes/2);
    document.getElementById("cot").value = ((rg + spr*3) + ri + log/2 + rl + wil/2);
    document.getElementById("res").value = ((rl + wil*3) + ra + str/2 + rd + con/2);
    document.getElementById("rac").value = ((ri + log*3) + rf + int/2 + re + per/2);
    document.getElementById("man").value = ((rj + pes*3) + rk + car/2 + rg + spr/2);
    document.getElementById("apa").value = ((rh + luc*3) + rk + car/2 + rj + pes/2);
    document.getElementById("ctr").value = ((rf + int*3) + rg + spr/2 + rl + wil/2);
    document.getElementById("vel").value = (rb + dex + rc + agi)/10 + 1;
    }
    </script>
    </head>
     
    <body><div style="text-align: center;">
    <img src="http://i.imgur.com/qC6CQHX.png" />
    <br />
    <br />
    <br />
    <br />
    <table align="center" width="750" style="padding-right: 50px;">
      <tbody>
        <tr>
          <td colspan="2" align="right">Força: <font style="color: ;">Velocidade de Ataque:<input type="button" id="vel" /></font><br />
          <font style="color: red;">
            Pontos de Vida de Gigantes:<input type="button" id="hpgigante" /><br />
            Pontos de Vida de Meio-Gigantes:<input type="button" id="hpmeiogigante" /><br />
            Pontos de Vida da maioria dos Tritões e Humanóides:<input type="button" id="hpth" /><br />
            Pontos de Vida de Humanos normais e Estrelas-do-Mar:<input type="button" id="hphe" /><br />
          </font>
          <font style="color: green;">Pontos de Vigor de Gigantes:<input type="button" id="spgigante" /><br />
            Pontos de Vigor de Meio-Gigantes:<input type="button" id="spmeiogigante" /><br />
            Pontos de Vigor da maioria dos Tritões e Humanóides:<input type="button" id="spth" /><br />
            Pontos de Vigor de Humanos normais e Estrelas-do-Mar:<input type="button" id="sphe" /><br /><br /><br /></font>
          </td>
        </tr>
        <tr>
          <td align="right" width="550">
            <font style="color: ;">Força: <input type="text" id="str" value="0" onblur="soma()" />    Bônus: <input type="text" id="ra" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Destreza: <input type="text" id="dex" value="0" onblur="soma()" />    Bônus: <input type="text" id="rb" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Agilidade: <input type="text" id="agi" value="0" onblur="soma()" />    Bônus: <input type="text" id="rc" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Constituição: <input type="text" id="con" value="0" onblur="soma()" />    Bônus: <input type="text" id="rd" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Percepção: <input type="text" id="per" value="0" onblur="soma()" />    Bônus: <input type="text" id="re" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Inteligência: <input type="text" id="int" value="0" onblur="soma()" />    Bônus: <input type="text" id="rf" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Espírito: <input type="text" id="spr" value="0" onblur="soma()" />    Bônus: <input type="text" id="rg" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Sorte: <input type="text" id="luc" value="0" onblur="soma()" />    Bônus: <input type="text" id="rh" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Lógica: <input type="text" id="log" value="0" onblur="soma()" />    Bônus: <input type="text" id="ri" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Persuasão: <input type="text" id="pes" value="0" onblur="soma()" />    Bônus: <input type="text" id="rj" value="0" onblur="soma()" /></font><br />
            <font style="color: ">Carisma: <input type="text" id="car" value="0" onblur="soma()" />    Bônus: <input type="text" id="rk" value="0" onblur="soma()" /></font><br />
            <font style="color: ;">Força de Vontade: <input type="text" id="wil" value="0" onblur="soma()" />    Bônus: <input type="text" id="rl" value="0" onblur="soma()" /></font>
          </td>
          <td align="right" width="150">
            <font style="color: ;">Dano:<input type="button" id="dan" /></font><br />
            <font style="color: ;">Acerto:<input type="button" id="ace" /></font><br />
            <font style="color: ;">Esquiva:<input type="button" id="esq" /></font><br />
            <font style="color: ;">Bloqueio:<input type="button" id="blo" /></font><br />
            <font style="color: ;">Aceleração:<input type="button" id="acr" /></font><br />
            <font style="color: ;">Educação:<input type="button" id="edu" /></font><br />
            <font style="color: ;">Concentração:<input type="button" id="cot" /></font><br />
            <font style="color: ;">Resistência:<input type="button" id="res" /></font><br />
            <font style="color: ;">Raciocínio:<input type="button" id="rac" /></font><br />
            <font style="color: ;">Manipulação:<input type="button" id="man" /></font><br />
            <font style="color: ;">Aparência:<input type="button" id="apa" /></font><br />
            <font style="color: ;">Auto-Controle:<input type="button" id="ctr" /></font>
          </td>
        </tr>
      </tbody>
    </table>
    <br />
    <br />
    <img src="http://i.imgur.com/ZrKORjt.png" /><br /></div>
    </body>
    </html>



    OPRevolution
    OPRevolution
    MasculinAge : 34Messages : 144

    Sam 13 Sep 2014 - 11:21

    Hahaha, is because i've caught it by ctrl + u...
    Thank you a lot Onyx!

    Youre amazing!



    Editing my calculator 2a98cj9
    Contenu sponsorisé


      La date/heure actuelle est Ven 22 Nov 2024 - 16:51