|
Post by Wormopolis on Nov 8, 2011 22:01:17 GMT -8
this line
clnArea.firstChild.nextSibling.firstChild.innerHTML=clnArea.firstChild.nextSibling.firstChild.innerHTML.replace(/customt itle/,'custpoints');
has a space in the word "customtitle" that needs to be removed
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 8, 2011 23:21:58 GMT -8
|
|
|
Post by Wormopolis on Nov 9, 2011 19:19:36 GMT -8
I didnt account for 0 posts when I added in that last variable to make it work for everyone.
find this line
if (cptmpval>nwRankArray[aa][0]) {
change to
if (cptmpval>=nwRankArray[aa][0]) {
|
|
|
Post by Wormopolis on Nov 9, 2011 19:34:48 GMT -8
actually just recopy. I changed another line for that as well
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 9, 2011 21:10:56 GMT -8
Just recopy the entire code? Edit: I guessed yes and it works!! Thanks so much ^_^
|
|
|
Post by Wormopolis on Nov 9, 2011 21:16:11 GMT -8
excellent. thank you for giving me a place to sort that out.
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 9, 2011 21:34:49 GMT -8
Your welcome ^_^ I thought I'd be best to do that so you can have a nose around see if any other codes I had in might be conflicting etc
|
|
|
Post by Wormopolis on Nov 9, 2011 23:11:11 GMT -8
nah... it wasnt any other codes on that one. I didnt forsee the necessary changes that would need to run without having manual points put in. but you made a good suggestion for that. maybe more people will try it out.
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 13, 2011 1:33:27 GMT -8
Wormo I've thought of another funky idea for this code -shot- The ability to offer different options dependant on the group id
so say rogue assassin is id 5 brotherhood assassin is id 4 and templar knight is id 7
if a members group id matched say the brotherhood assassins group id it'd show one set of ranks dependant on number etc
|
|
|
Post by Wormopolis on Nov 13, 2011 10:43:15 GMT -8
you lost me?
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 13, 2011 10:55:04 GMT -8
Okay I'll try and explain it better ^.^;;
Each group has its own id when its set in the profile and stuff yes? It tells what colour and stuff to show yep?
What I'm asking is if there's any way this code could be modified so that if the group id is say for example '4' it would display the relevant rank text for that group. So say if 4 is an assassin and I'd put in 51 points it'd show the rank as 'messenger' which it is for the assassin. But then say I put in 200 points on someone who was id 7 which is Templar it'd show the rank as Templar Knight, with each group having its own array set of points and ranks
|
|
|
Post by Wormopolis on Nov 13, 2011 12:10:04 GMT -8
var nwRankArray=new Array(); nwRankArray['default']=[ [0,'noob'], //points count , 'title' add in more to your hearts desire [1,'lessnoob'], [10,'Squire'], [50,'Knight'], [100,'King'], [500,'Deity'], [1000,'Super Deity'], [5000,'Way too much time on their hands'], [10000,'FractionOfWormo'] //no comma last line ]; nwRankArray['group1']=[ [0,'ant'], [1,'termite'], [10,'grasshopper'], [50,'roach'], [100,'beetle'], [500,'mantis'], [1000,'spider'], [5000,'super spider'], [10000,'alien bug'] //no comma last line ];
replace
for (aa=nwRankArray.length-1; aa>=0; aa--) { if (cptmpval>=nwRankArray[aa][0]) { rankresult=nwRankArray[aa][1]; break; } }
with
var uname=tds[wcp].getElementsByTagName('b')[0].firstChild; var gname=uname.className; var workingArray=(nwRankArray[gname] ? nwRankArray[gname] : nwRankArray['default']); for (aa=workingArray.length-1; aa>=0; aa--) { if (cptmpval>=workingArray[aa][0]) { rankresult=workingArray[aa][1]; break; } }
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 13, 2011 12:51:34 GMT -8
Thankies ^_^ It should reduce the number of member groups I need now xD
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 16, 2011 0:20:34 GMT -8
Wormo its me again - sorry ^.^:;; just checked in Opera after a friend let me know that they were having issues with it in Opera to find that it only puts [wCP:51] in custom title on there, any chance of a fix?
|
|
|
Post by Wormopolis on Nov 16, 2011 10:09:19 GMT -8
I dont have Opera
|
|