PDA

View Full Version : runescape experience script


gamesinwild
03-07-2007, 12:09 PM
This was a script made by me, most of it. This was a runescape experience table, of course, in runescape.

<script>
<!--
document.close();
document.open();
document.writeln('<PRE>');

points = 0;
output = 0;
minlevel = 2;
maxlevel = 200;

for (lvl = 1; lvl <= maxlevel; lvl++)
{
points += Math.floor(lvl + 300 * Math.pow(2, lvl / 7.));
if (lvl >= minlevel)
document.writeln('Level ' + (lvl) + ' - ' + output + ' xp');
output = Math.floor(points / 4);
}

document.writeln('</PRE>');
document.close();
</script>

nexosis
03-18-2007, 01:51 PM
nice script...you used looping

Kor
03-19-2007, 08:41 AM
document.write() is not a dynamic method to create elements on the page. You should have used DOM.

<script> should be defined, as there is not only one type of script code the browser is able to interpret

<script type="text/javascript">

Thus, gamesinwild, you should consider changing the code accordingly.