Search Results

Search found 2 results on 1 pages for 'stealingmana'.

Page 1/1 | 1 

  • Experience formula with javascript

    - by StealingMana
    I'm having trouble working out a formula using this experience curve to get the total exp after each level. I bet its easy and im just over thinking it. maxlvl = 10; increment = 28; baseexp = 100; function calc(){ for (i = 0;i<(maxlvl*increment);i+=increment){ expperlvl = baseexp + i; document.writeln(expperlvl); } } I figured it out. maxlvl=6; base=200; increment=56; function total(){ totalxp= (base*(maxlvl-1))+(increment*(maxlvl-2)*(maxlvl-1)/2); document.write(totalxp); }

    Read the article

  • How to populate a form list with buttons using javascript

    - by StealingMana
    I made a script that, when you press one button(accessories) the selection(mylist) populates with one array(accessoryData), and when you hit the other button(weapons) the other array(weaponData) populates the selection. However, in the current state of the code the second button press is not re-populating the selection. What is wrong here? Also if there is a more efficient way to do this, that might be helpful. Full code function runList(form, test) { var html = ""; var x; dataType(test); while (x < dataType.length) { html += "<option>" + dataType[x]; x++; } document.getElementById("mylist").innerHTML = html; }

    Read the article

1