Post by Peter on Oct 31, 2004 13:08:51 GMT
Code created by Cheater[/color]
Main Footer:
Board Footers:
Main Footer:
<script language="javascript">
<!--
/* Money hack v2 by cHEaTer ;) */
/* Money changeable in profile by admin */
var money_sign = "$"; //This is sign in front of the money. (ex. $100, $) For no sign, give value "".
var money_incr = 10; //Money you get for each post you have (if the money is undefined)
var money_name = "Money"; //The name of the money. (ex. Money: $100, Money)
var money = 0;
var constant = false;
var profile_ok = (document.creator) ? true : false;
if (location.href.match('=profile') && !location.href.match('profile2') && profile_ok) {
var profile_form = document.creator;
if (profile_form.usertext.value.match(/\[\[\[Money=(\d+)\]\]\]/)) {
money = RegExp.$1;
constant = true;
profile_form.usertext.value = profile_form.usertext.value.replace('[[[Money=' + money + ']]]', '')
} else {
if (profile_form.settings6) {
money = parseFloat(profile_form.settings6.value) * money_incr;
}
if (profile_form.usertext.value.match(/\[\[\[Money=\+(.+)\]\]\]/)) {
var add = RegExp.$1;
money = parseFloat(add);
profile_form.usertext.value = profile_form.usertext.value.replace('[[[Money=+' + add + ']]]', '');
}
}
tables = document.getElementsByTagName('table');
for (i = 0; i < tables.length; i++) {
if (tables[i].innerHTML.match('settings6') && !tables[i].innerHTML.match('msn')) {
NewRow = tables[i].insertRow(7);
money_c1 = NewRow.insertCell();
money_c2 = NewRow.insertCell();
money_c1.width = 320;
money_c1.innerHTML = "<font size=2><b>" + money_name + ": </b><b" + "r><font size=1>Leave blank to undefine money.</font></font>";
money_c2.innerHTML = "<input type=text name='money_text' value='" + money + "'> <input type=\"checkbox\" id='constant'><font size=1>Money Constant? (Money will not increase with posts. If unchecked, amount of money in text box will be added to the amount of posts times money_incr.</font>";
}
}
}
function editMoney() {
profile_form.usertext.value = profile_form.usertext.value.replace('[', '[');
profile_form.usertext.value = profile_form.usertext.value.replace(']', ']');
if (profile_form.money_text) {
if (profile_form.money_text.value != "") {
if (profile_form.constant.checked) {
profile_form.usertext.value += "[[[Money=" + profile_form.money_text.value + "]]]";
} else {
profile_form.usertext.value += "[[[Money=+" + profile_form.money_text.value + "]]]";
}
}
}
profile_form.usertext.style.display = "none";
}
if (profile_ok) {
input = document.getElementsByTagName('input');
for (i = 0; i < input.length; i++) {
if (input[i].value == "Change profile") {
input[i].outerHTML = input[i].outerHTML.replace('>',' onClick="editMoney()">');
}
}
}
if (location.href.match('profile2') || location.href.match('viewprofile')) {
var money = 0;
var tds = document.getElementsByTagName('td');
for (i = 0; i < tds.length; i++) {
if (tds[i].width == "30%" || tds[i].width == "20%") {
if(tds[i].innerHTML.match(/\[\[\[Money=(\d+)\]\]\]/)) {
money = RegExp.$1;
tds[i].innerHTML = tds[i].innerHTML.replace('[[[Money=' + money + ']]]','');
} else {
if (tds[i].innerHTML.match(/Posts: (.+)/)) {
money = parseFloat(RegExp.$1) * money_incr;
if (tds[i].innerHTML.match(/\[\[\[Money=\+(.+)\]\]\]/)) {
var add = RegExp.$1;
money += parseFloat(add);
tds[i].innerHTML = tds[i].innerHTML.replace('[[[Money=+' + add + ']]]', '');
}
}
}
tds[i].innerHTML = tds[i].innerHTML.replace('Posts:',money_name + ': ' + money_sign + money + '<b' + 'r>Posts:');
}
}
}
//-->
</script>
Board Footers:
<script language="javascript">
<!--
/* Money hack v2 by cheater007 ;) */
/* Money changeable in profile by admin */
//Vars same as main footer
money_sign = "$";
money_name = "Money";
money_incr = 10;
var money = 0;
var tds = document.getElementsByTagName('td');
for (i = 0; i < tds.length; i++) {
if (tds[i].width == "20%") {
if(tds[i].innerHTML.match(/\[\[\[Money=(\d+)\]\]\]/)) {
money = RegExp.$1;
tds[i].innerHTML = tds[i].innerHTML.replace('[[[Money=' + money + ']]]','');
} else {
if (tds[i].innerHTML.match(/Posts: (.+)/)) {
money = parseFloat(RegExp.$1) * money_incr;
if (tds[i].innerHTML.match(/\[\[\[Money=\+(.+)\]\]\]/)) {
var add = RegExp.$1;
money += parseFloat(add);
tds[i].innerHTML = tds[i].innerHTML.replace('[[[Money=+' + add + ']]]', '');
}
}
}
tds[i].innerHTML = tds[i].innerHTML.replace('Posts:',money_name + ': ' + money_sign + money + '<b' + 'r>Posts:');
}
}
//-->
</script>