Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Sep 24th, 2017, 05:30am

Coding Forum
Important News
Remember to add where the code goes in the headers/footers.

Also, please check the list of codes on the Hacks board, especially if you have an error. The code may already have been corrected.
Thanks.
Welcome to the Conforums Hacks Board!

Please follow these simple rules.

1. No spamming.
2. Do not advertise your board in here!
3. Keep on topic, or the thread will be locked.
4. No flame wars.
5. No bringing up old topics.

Please note: For codes other than those submitted in the Hacks Forum, please ask for permission to use from the creator. Be aware that coding queries in the Coding Forum become public domain. If you still seek coding help but find it inconvenient to display it publicly then please PM one of the moderators. We encourage all queries to be submitted here in hopes to help other members who might have the same question. Thank you.

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
Gizzy



« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Money/Points hack?  (Read 4660 times)
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Money/Points hack?
« Thread started on: Jan 19th, 2012, 02:07am »

This code is working:

Code:
<script type="text/javascript">
<!--
/*
Money Hack v3 - Global footer

Created by Ross, Concept by Peter

This code cannot be reposted at anywhere other than ProBoards Support without permission.

This header must stay intact at all times.
*/

// The value of money a member should gain for each post
var MoneyPerPost = 5;

// What do you want to call your money?
var NameOfMoney = 'Money';

// The symbol that will appear next to the money
var SymbolOfMoney = '';


// No need to edit below
var re = /\[M:(-)?(\d+)\]/im

function updateMon() {
var monChange = document.getElementById('monChange');
var curMon = document.getElementById('monDisplay');
var monType = document.getElementById('monType');
  mon = parseInt(curMon.value.replace( SymbolOfMoney , '' ),10) + parseInt( ( ( monType.value == '-' ) ? '-' : '' ) + monChange.value, 10 )
  monChange.value = 0;
if(isNaN(mon)) {
  alert('You must enter a numerical value')
  return false;
}
  curMon.value = SymbolOfMoney + mon;
return true;
}

function fNum(num){
    if(!isNaN(num)){
       num = num.toLocaleString().replace(/\.\d+/, "");
    } else {
       num = 0;
    }
    return num;
}

function saveMon() {
updateMon();
var newMon = document.getElementById('monDisplay').value.replace( SymbolOfMoney , '' );
  newMon -= (parseInt((document.modifyForm.posts.value) * MoneyPerPost, 10));
   document.modifyForm.customtitle.value += '[M:'+newMon+']';
return true;
}

var td = document.getElementsByTagName('td');
for(i=0; i<td.length; i++) {
  if(td.item(i).width == '20%' && td.item(i).vAlign == 'top' && td.item(i).parentNode.innerHTML.match(/Posts: (.+?)</)) {
   curMon = (RegExp.$1.replace(/,/g,'') * MoneyPerPost);
   curMon += td.item(i).innerHTML.match(re)? parseInt((RegExp.$1+RegExp.$2), 10) : 0;
    if(td.item(i).lastChild.nodeName.toLowerCase() != 'br')
     td.item(i).appendChild(document.createElement('br'));
   td.item(i).appendChild(document.createTextNode(NameOfMoney +': '+ SymbolOfMoney + fNum(curMon)));
   td.item(i).innerHTML = td.item(i).innerHTML.replace(/<br>\[M:(-)?(\d+)\](<br>member is)/i,'$3').replace(/(<br>(.+?))\[M:(-)?(\d+)\](<br>)/i,'$1$5').replace(/\[M:(-)?(\d+)\]/gim,'');
}
 else if(location.href.match(/ion=viewpro/) && td.item(i).width == '25%' && td.item(i).innerHTML.match(/>Posts:</)) {
   var monTitle = document.createElement('font');
    monTitle.size = '2';
    monTitle.appendChild(document.createTextNode(NameOfMoney+':'));
   var userMon = document.createElement('font');
    userMon.size = '2';
    userMon.appendChild(document.createTextNode(SymbolOfMoney+fNum(curMon)));
   monRow = td.item(i).parentNode.parentNode.insertRow(6);
   monRow.insertCell(0).appendChild(monTitle);
   monRow.insertCell(1).appendChild(userMon);
  break;
 }
}

if(document.modifyForm && document.modifyForm.customtitle) {

if(document.modifyForm.personaltext.value.match(re) && !document.modifyForm.customtitle.value.match(re))
  {
   document.modifyForm.customtitle.value += '[M:'+RegExp.$1+RegExp.$2+']';
   document.modifyForm.personaltext.value = document.modifyForm.personaltext.value.replace(re,'');
  }

curMon = document.modifyForm.customtitle.value.match(re)? parseInt(RegExp.$1+RegExp.$2, 10) : 0;
Posts = document.modifyForm.posts.value.match(/(-)?(\d+)/)? parseInt((RegExp.$1+RegExp.$2), 10) :  0;
curMon += (Posts * MoneyPerPost)
document.modifyForm.customtitle.value = document.modifyForm.customtitle.value.replace(re,'');

  document.modifyForm.customtitle.maxLength = 490;

var display = document.createElement('input');
  display.type = 'text';
  display.id = 'monDisplay';
  display.size = parseInt(curMon.toString().length, 10) + 2;
  display.disabled = true;
  display.value = SymbolOfMoney + curMon;

var type = document.createElement('select');
  type.id = 'monType';
  type.appendChild(document.createElement('option'));
   type.firstChild.appendChild(document.createTextNode('+'));
  type.appendChild(document.createElement('option'));
   type.lastChild.appendChild(document.createTextNode('-'));
   type.lastChild.value = '-';

var mon = document.createElement('input');
  mon.type = 'text';
  mon.id = 'monChange';
  mon.size = 5;
  mon.value = 0;

var update = document.createElement('input');
  update.type = 'button';
  update.value = 'Update';
  update.onclick = function(){ updateMon(); };
  
var editMon = document.createElement('font');
  editMon.appendChild(type);
  editMon.appendChild(document.createTextNode(' '));
  editMon.appendChild(mon);
  editMon.appendChild(document.createTextNode(' '));
  editMon.appendChild(update);

var newTitle = document.createElement('font');
  newTitle.size = '2';
  newTitle.appendChild(document.createTextNode(NameOfMoney +': '));
  newTitle.appendChild(display);

var newDes = document.createElement('font');
  newDes.size = '1';
  newDes.appendChild(document.createTextNode('Here you can edit the amount of '+NameOfMoney+' a member has. Just enter the value of ' +NameOfMoney+ ' to add or subtract.'));

var target = document.modifyForm.customtitle.parentNode.parentNode.parentNode.parentNode.insertRow(2);
  target.insertCell(0).appendChild(newTitle);
  target.insertCell(1).appendChild(editMon)
  target.insertCell(2).appendChild(newDes);

document.getElementsByName('profileaction').item(0).onclick = function() { saveMon(); };

}
//-->
</script> 


BUT I can't edit how many points they have...I know this is for Proboards, but is there a way that I can edit the amount of points through the user profile?
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #1 on: Jan 19th, 2012, 08:33am »

I CAN add that, but due to my respect for Ross I am going to ask his permission to edit his code. I have him on my MSN list so Its just a matter of catching him online.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #2 on: Jan 20th, 2012, 03:11am »

grin grin grin grin grin grin Thank you so much!!!! I've been looking for this for so long!!!
User IP Logged

User ImageUser Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #3 on: Jan 22nd, 2012, 7:06pm »

I found this money hack (made for Conforums) and EVERYTHING works perfectly, except one thing. When you go to edit the points it looks like this:

User Image

And it brings you to this page:

User Image

The thing is, no matter how many times you press save RPG settings, nothing happens.

Here are the codes:

Main Footers:
Code:
<script type="text/javascript">
/* RPG Me V1.0 SL Version
Created by CrAzY_J
Do no redistribute this code without the creator's permission*/

var mmu = 2; //Points
var hmu = 0; // Contest Wins
var amu = 0; //Items Purchased
var smu = 0.25; //Reputation

/*Do not edit beyon this point*/
var TD = document.body.getElementsByTagName( "td" );
var TB = document.body.getElementsByTagName( "table" );

function AddRP()
{
if( TD.item(5).innerHTML.match(/admin/))
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD.item(t).className == "titlebg" && TD.item(t).innerHTML.match(/Edit\sProfile/))
{
var Ahref = document.createElement( "a" );
Ahref.href = this.location.href+"&rp";
Ahref.appendChild( document.createTextNode( 'RPG Stats' ));
TD.item(t).getElementsByTagName( 'b' ).item(0).appendChild( document.createTextNode(' '));
TD.item(t).getElementsByTagName( 'b' ).item(0).appendChild( Ahref );
document.creator.usertext.parentNode.parentNode.parentNode.style.display = "none";
}
}
}
}

function EditRP()
{
for( z = 4 ; z < TB.length ; z ++ )
TB.item(z).style.display = "none";
document.title = "Edit RPG";
var Posts = parseInt(document.creator.settings6.value);
var Mon = (document.creator.usertext.value.match( /trm%m:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*mmu);
var Heal = (document.creator.usertext.value.match( /trm%.+?%h:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*hmu);
var Magic = (document.creator.usertext.value.match( /trm%.+?%a:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*amu);
var Stam = (document.creator.usertext.value.match( /trm%.+?%s:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*smu);
var cTB = '<table width = "" class = "bordercolor" cellSpacing = "1" cellPadding = "0" align = "center"><tr><td>'
cTB += '<table width "100%" cellPadding = "4" align = "center"><tr><td class = "titlebg" align = "center">'
cTB += '<font size = "2" class = "titletext"><b>RPG Stats:</b>'
cTB += '</font></td></tr></table></td></tr>'
cTB += '<tr><td><table width = "100%" cellPadding = "4" align = "center"><tr>'
cTB += '<td class = "windowbg" align = "center" width = "40%"><b>Points:</b></td>'
cTB += '<td class = "windowbg" align = "center" width = "30%"><input id = "mon" value = "'+Mon+'"></td>'
cTB += '<td class = "windowbg" align = "center" width = "10%"><a href = "javascript:add(\'mon\')">'
cTB += '<b>+</b></a>/<a href = "javascript:reduce(\'mon\')"><b>-</b></a><td></tr>'
cTB += '<tr><td class = "windowbg" align = "center" width = "40%"><b>Contest Wins:</b></td>'
cTB += '<td class = "windowbg" align = "center" width = "30%"><input id = "heal" value = "'+Heal+'"></td>'
cTB += '<td class = "windowbg" align = "center" width = "10%"><a href = "javascript:add(\'heal\')">'
cTB += '<b>+</b></a>/<a href = "javascript:reduce(\'heal\')"><b>-</b></a><td></tr>'
cTB += '<tr><td class = "windowbg" align = "center" width = "40%"><b>Items Purchased:</b></td>'
cTB += '<td class = "windowbg" align = "center" width = "30%"><input id = "magic" value = "'+Magic+'"></td>'
cTB += '<td class = "windowbg" align = "center" width = "10%"><a href = "javascript:add(\'magic\')">'
cTB += '<b>+</b></a>/<a href = "javascript:reduce(\'magic\')"><b>-</b></a><td></tr>'
cTB += '<tr><td class = "windowbg" align = "center" width = "40%"><b>Reputation:</b></td>'
cTB += '<td class = "windowbg" align = "center" width = "30%"><input id = "stam" value = "'+Stam+'"></td>'
cTB += '<td class = "windowbg" align = "center" width = "10%"><a href = "javascript:add(\'stam\')">'
cTB += '<b>+</b></a>/<a href = "javascript:reduce(\'stam\')"><b>-</b></a></td></tr></table>'
cTB += '</td></tr><tr><td><table width "100%" cellPadding = "4" align="center"><tr><td class = "titlebg">'
cTB += '<b>Current password</b> <input type="password" id="pass"><br />'
cTB += '<input type = "button" value = "Reset All RPG Stats" onClick = "Reset()">'
cTB += '<input type = "button" value = "save RPG Settings" onClick = "savedata()"></td></tr></table></td></tr></table>';
document.write(cTB);
}

function Reset()
{
getId('mon').value = 0
getId('heal').value = 0
getId('magic').value = 0
getId('stam').value = 0
}
function savedata()
{
document.creator.usertext.value = "trm%m:" +getId('mon').value+ "%h:"+ getId('heal').value+ "%a:" +getId('magic').value+ "%s:"+ getId('stam').value +"%";
document.creator.cpass.value = getId('pass').value;
document.creator.submit(true);
}

function profile()
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD.item(t).width == "30%" && TD.item(t).innerHTML.match(/Posts:\s(\d+)/))
{
var Posts = parseInt(RegExp.$1);
var Mon = ( TD.item(t).innerHTML.match( /trm%m:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*mmu);
var Heal = ( TD.item(t).innerHTML.match( /trm%.+?%h:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*hmu);
var Magic = ( TD.item(t).innerHTML.match( /trm%.+?%a:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*amu);
var Stam = ( TD.item(t).innerHTML.match( /trm%.+?%s:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*smu);
TD.item(t).innerHTML += "Points: "+ Mon +"<br />Contest Wins: "+ Heal +"<br />Items Purchased: "+ Magic +"<br />Reputation: "+Stam;
TD.item(t).innerHTML = TD.item(t).innerHTML.replace(/trm%.+?s:\d+%/,'');
}
}
}


function add(elem)
{
getId(elem).value = Math.floor(parseInt(getId(elem).value) +1);
}

function reduce(elem)
{
getId(elem).value = Math.floor(parseInt(getId(elem).value) -1);
}

function getId(id)
{
return document.getElementById(id);
}
if(this.location.href.match(/profile&/))
AddRP();
if(this.location.href.match(/&rp/))
EditRP()
if(this.location.href.match(/view(profile(2)?)?/))
profile()
</script> 



Board Footers:
Code:
<script type="text/javascript">
/* RPG Me V1.0 SL Version
Created by CrAzY_J
Do no redistribute this code without the creator's permission*/

var mmu = 2; //Points
var hmu = 0; // Contest Wins
var amu = 0; //Items Purchased
var smu = 0.25; //Reputation


/*Do not edit beyon this point*/
var TD = document.body.getElementsByTagName( "td" );
var TB = document.body.getElementsByTagName( "table" );


function miniprofile()
{
for( t = 0 ; t < TD.length ; t ++ )
{
if( TD.item(t).width == "20%" && TD.item(t).innerHTML.match(/Posts:\s(\d+)/))
{
var Posts = parseInt(RegExp.$1);
var Mon = ( TD.item(t).innerHTML.match( /trm%m:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*mmu);
var Heal = ( TD.item(t).innerHTML.match( /trm%.+?%h:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*hmu);
var Magic = ( TD.item(t).innerHTML.match( /trm%.+?%a:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*amu);
var Stam = ( TD.item(t).innerHTML.match( /trm%.+?%s:(\d+)%/ ))? RegExp.$1 : Math.floor(Posts*smu);
TD.item(t).innerHTML += "Points: "+ Mon +"<br />Contest Wins: "+ Heal +"<br />Items Purchased: "+ Magic +"<br />Reputation: "+Stam;
TD.item(t).innerHTML = TD.item(t).innerHTML.replace(/trm%.+?s:\d+%/,'');
}
}
}

if(this.location.href.match(/display/))
miniprofile()
</script> 
« Last Edit: Jan 22nd, 2012, 7:11pm by LegosHurtMyFeet » User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #4 on: Jan 22nd, 2012, 7:43pm »

Reading it, It didnt seem like it was broken. Ill make a test forum and work on it.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #5 on: Jan 22nd, 2012, 8:02pm »

I've tested it on 2 different forums and they both did the same thing. undecided On my other one it was the only codes I'd used on the whole forum so I don't think it's clashing with any other codes.
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #6 on: Jan 23rd, 2012, 09:30am »

on Jan 22nd, 2012, 8:02pm, LegosHurtMyFeet wrote:
I've tested it on 2 different forums and they both did the same thing. undecided On my other one it was the only codes I'd used on the whole forum so I don't think it's clashing with any other codes.


Well on a test forum I can have the code in a live setting and fiddle with it until I find the problem =)
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #7 on: Jan 23rd, 2012, 5:31pm »

Thanks! I'm really excited about this one!!
User IP Logged

User ImageUser Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #8 on: Jan 31st, 2012, 2:46pm »

undecided
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #9 on: Jan 31st, 2012, 2:52pm »

Im sorry Lego. Really sorry. I havent been feeling well. Im kinda sick and I havent had the drive to do anything. I just need time.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #10 on: Feb 12th, 2012, 7:48pm »

I feel ya, I was sick too! And the 31st was my 17th birthday sad
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #11 on: Feb 12th, 2012, 8:00pm »

Alright monday or tuesday I should be getting back into the swing of things.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #12 on: Feb 20th, 2012, 4:41pm »

Now the RPG Stats next to the Edit Profile text doesn't show up. sad I don't know what happened.
User IP Logged

User ImageUser Image
Dalton
Ex-Shiny Gold Star Club Member
Conforums Administrator


member is offline

Avatar



AIM
Homepage PM

Gender: Male
Posts: 1764
xx Re: Money/Points hack?
« Reply #13 on: Feb 20th, 2012, 7:19pm »

I dont know but Im writing a new one for you, I started it last night.
User IP Logged

User Image
LegosHurtMyFeet
Member


member is offline

Avatar




PM

Gender: Female
Posts: 80
xx Re: Money/Points hack?
« Reply #14 on: Jul 22nd, 2012, 8:12pm »

huh

User Image
User IP Logged

User ImageUser Image
Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls