Code thingy

EDIT: New code! This can actually DO things! :'D

http://www.freewebs.com/go5pel/Signature.html


<html>
<body>

<head>

<SCRIPT LANGUAGE="JavaScript">
var effectlisting=new Array();
effectlisting[0]="";
var points=new Array();
points[0]=0;
var coolpoints=new Array();
coolpoints[0]=0;

cycle=0;

function see()
{
effectlisting[cycle]=document.form2.List.value;
document.form2.List.value=document.form2.List.value+"

"+document.form1.select1.value+" Intensity: "+Intensity +"

Duration: " +Duration+" Total Cost: "+

document.form1.Total.value+"\n";
cycle=cycle+1;
effectlisting[cycle]=document.form2.List.value;
points[cycle]=document.form1.Total.value*(1-

(document.form2.option[1].checked*1)*Drawback)+points[cycle-

1];
coolpoints[cycle]=document.form1.Total.value*(1-

(document.form2.option[0].checked*1)*Drawback)+coolpoints

[cycle-1];

pointsupdate()

}

function clear_textbox()
{
if (document.form1.text1.value == "Name of signature")
document.form1.text1.value= "";
}
function clear_desc()
{
if (document.form2.Signature.value == "Signature description

goes here")
document.form2.Signature.value= "";
}

function final()
{
document.write(document.form1.text1.value + "<br>"+

document.form2.Signature.value +"<br>effects list: <br><table

border=1><tr><td>" + effectlisting[cycle].replace(/\n/,

'<br>') + "</td></tr></table> <br>Points spent=" +

document.form2.totalpoints.value + "<br>Cooldown="+

document.form2.coolpoints.value/40 + "<br>");
}


function unsee()
{

cycle=cycle-1;
document.form2.List.value=effectlisting[cycle];
pointsupdate()


}

function pointsupdate()
{

document.form2.totalpoints.value=points[cycle];
document.form2.coolpoints.value=coolpoints[cycle];

}


</SCRIPT>



<?php

echo("<SCRIPT LANGUAGE=\"JavaScript\">



function argle(e)
{
bargle=0

for (i=e; i>=0; i--)
{
bargle=bargle+i;
}
return(bargle);
}



function refresh()
{


Intensity=document.form1.Int.value*1;
Duration=document.form1.Dur.value*1;
Cost=document.form1.Cost.value*1;
Stacking=document.form1.Stack.value*1;
Base=document.form1.Base.value*1;
Drawback=document.form1.Drawback.value*1;

document.form1.Total.value=((Intensity*Cost+(argle(Intensity

-1)*Stacking))*Duration+Base)*(1-2*Drawback);
Total=document.form1.Total.value;
}







function update_label()
{
n=document.form1.select1.value;
switch(n)
{
");

$sql_csatlakozas = mysql_connect("localhost",

"root","********");
mysql_selectdb("rern", $sql_csatlakozas);
$sql = "select effect_name as eff, description as des, base,

cost, stack, drawback from effect order by drawback,

effect_name";
$eredmeny1 = mysql_query($sql, $sql_csatlakozas);
while ($sor1 = mysql_fetch_array($eredmeny1, MYSQL_ASSOC))
{
echo("case \"$sor1[eff]\":
document.form1.Comments.value= \"$sor1[des]\";
document.form1.Base.value=\"$sor1[base]\";
document.form1.Cost.value=\"$sor1[cost]\";
document.form1.Stack.value=\"$sor1[stack]\";
document.form1.Drawback.value=\"$sor1[drawback]\";
break;
");
}
echo("
}
refresh();
}
</SCRIPT>");
?>
</head>


<form name="form1">
<input type=text name="text1" value="Name of signature"

onFocus=clear_textbox()><br>
<select name="select1" onchange=update_label()>


<?php


$sql_csatlakozas = mysql_connect("localhost",

"root","***********");
mysql_selectdb("rern", $sql_csatlakozas);
$sql = "select effect_name as eff, description as des,

drawback from effect order by drawback, effect_name";

$eredmeny = mysql_query($sql, $sql_csatlakozas);
while ($sor = mysql_fetch_array($eredmeny, MYSQL_ASSOC))

{
echo("<option>$sor[eff]</option>
");

}
echo("</select>");
?>
<br>
<table border="1" >
<tr>
<td rowspan=3>
<TEXTAREA name="Comments" readonly rows=15

cols=22></TEXTAREA>
</td>
<td align="right">Cost= <input type=text name="Cost"

readonly></td>
<td align="right">Intensity: <input type=text name="Int"

value=1 maxlength=3 size="2" onchange=refresh()  

value=1></td><tr>
<td align="right">Stacking Cost= <input type=text

name="Stack" readonly ></td>
<td align="right">Duration: <input type=text name="Dur"

value=1 maxlength=3 size="2" onchange=refresh()

></td></tr><tr>
<td align="right">Base Cost= <input type=text name="Base"

readonly></td>
<td align="right">Total: <input type=text name="Total"  

value="00" size="2" readonly></td>
</tr>
</table>
<input type=hidden name="Drawback" value=0>
</form>
<INPUT type="submit" Value="Add to effects list" onclick=see

()>
<INPUT type="submit" Value="Remove last effect"

onclick=unsee()>

<form name="form2" method="post">
<TEXTAREA name="List" readonly cols=60></TEXTAREA>
<br><table border="1">
<tr><td>
Points used so far: <input type=text name="totalpoints"

readonly size="2" value=0>
<br>Cooldown calculated from: <input type=text

name="coolpoints" readonly size="2" value=0><br>
Drawback deducted from:
<br>
<INPUT type="radio" name="option" value="base"> Base cost
<INPUT type="radio" name="option" value="cooldown"  CHECKED>

Cooldown
</td>
<td><TEXTAREA name="Signature" cols=33 rows=5

onFocus=clear_desc()>Signature description goes

here</TEXTAREA></td></tr>
</table>
</form>
<input type=submit value="Describe signature" onclick=final

()>
</body>
</html>
That's hawt. :'D
http://www.freewebs.com/go5pel/Signature.html

Shury is hosting it so you can just click on the link and save yourself some trouble

EDIT: gah, should've edited in first post >.<
That's...sick...(awesome)
New and improved code thingy! It can actually DO things XD Edited into first post.
Updated again. Final version for now... once you are finished you just have to click "describe", then copy paste what appears into the registration area (or wherever it goes)^^
I'm back with a new little code thingy!
This time it's... a shuffler. You input anything, press shuffle, and the script randomly shuffles it.

Nothing much, I just didn't feel like searching for my cards when building/testing the deck by myself, so I made it to test random draws, see how "lucky" my "hand" is. I will probably add some more functions later.

Copy it to a .txt file, rename it to .php then open in firefox

<html>
<body>
<head>
<SCRIPT LANGUAGE="JavaScript">
function addcard()
{
var card=document.getElementById("card").value;
var deck=document.getElementById("deck");
var newnode=document.createElement("option");
var cardnode= document.createTextNode(card);
if (card!="")
{
deck.size++
newnode.appendChild(cardnode);
deck.appendChild(newnode);
}
}
function removecard()
{
var deck=document.getElementById("deck");
var i;
if (deck.value!="")
{
for(i=deck.options.length-1;i>=0;i--)
{
if(deck.options[i].selected)
{deck.remove(i)
f=i;
}
}
deck.size--
if (deck.options.length!=f)
{
deck.options[f].selected="true";
}
else
{
e=deck.options.length-1;
deck.options[e].selected="true";
}
}
}
function shuffle()
{
var sd = new Array();
for(i=deck.options.length-1;i>=0;i--)
{
sd[i]=deck.options[i].value;
deck.remove(i)
}
for(i=sd.length-1;i>=0;i--)
{
var rand=Math.floor((i+1)*Math.random());
var card=sd[rand];
var newnode=document.createElement("option");
var cardnode= document.createTextNode(card);
newnode.appendChild(cardnode);
deck.appendChild(newnode);
sd.splice(rand,1);
}
}
</SCRIPT>
</head>
<table>
<tr>
<td>
<INPUT id="card" name="Card" value="" size="10">
<INPUT type="Submit" value="Add card to deck" onclick="addcard();">
<br>
<SELECT id="deck" size="0"></SELECT>
</td>
<td>
<INPUT type="Submit" value="Remove card from deck" onclick="removecard();">
<br>
<INPUT type="Submit" value="Shuffle" onclick="shuffle();">
</td>
</tr>
</body>
</html>
Why hello there! I am your friendly neighborhood Rulesman! I have this block of code that I want to share with you! And what does it do, you may ask? Well... the results are in my signature.
Dees breaks mah mind.

D:

Cool though.
I now vote that rulesman attacks a sig regestry thread whenever someone screws up...

also, avitar must be P. write shouting "objection!!!"
Why hello there! Can I interest you in any of my merchandise? Come now, check out my inventory. You can find every battle chip in the multiverse right here!

You may get the chip of your dreams at the lowly price of your eternal soul. A bargain, isn't it? Tell you what, cause I'm a nice guy I will even let you check them out for free.

((Knight here. This is the chip list, similar to the rules list a bit above. You can search for stuff just by typing the name in (should you not know the effects of a chip you just got for example). I had to condense it a lot, and categories are not yet ready. Think of it as a kind of beta version. If you find something amiss/find an error, be sure to tell. Have fun ^^))
Fucking amazing.
Yo! I'm reviving the sig-generator, due to popular demand. The one in the first post is still working, but I'm looking for ways to improve it (needs some updating too), so give some goddamn feedback. Thank you.

Quote (Knight)

Yo! I'm reviving the sig-generator, due to popular demand. The one in the first post is still working, but I'm looking for ways to improve it (needs some updating too), so give some goddamn feedback. Thank you.

can we have a close button in the actual pop up window? sometimes they cover up their own start things and it becomes impossible to close...

Quote (Chipsman)

You can find every battle chip in the multiverse right here!

You know, I didn't think I had any fans from my adventures...

Anyway, how about pics? I had to go in manually to add the backgrounds on my pop-ups, is there any way you can get it to do it automatically if we refer to the picture's location (URL)?

Quote (Sj)

Quote (Chipsman)

You can find every battle chip in the multiverse right here!

You know, I didn't think I had any fans from my adventures...

Anyway, how about pics? I had to go in manually to add the backgrounds on my pop-ups, is there any way you can get it to do it automatically if we refer to the picture's location (URL)?

http://z10.invisionfree.com/RockmanChaosNe...p?showtopic=349
Scroll down.
What am I looking for?

EDIT: Okay, you misunderstood me, click on my links and you'll see what I meant.
Nope, still no idea, sorry. xD
Guys, the box thing is Drakim's turf. I can't touch it. BUT! Niax you can include a close button by putting the link <a href="javascript: togglebar('*insert name of togglebar*'); void(0);">close</a> inside the box. Spread the word and ask people to do so if you wish.