We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Admin Advanced Lottery Code Generator; By .Scott
Topic Started: Jan 23 2010, 12:49 AM (137 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: .Scott
Admin Advanced Lottery Code Generator
 
Code Name: Admin Advanced Lottery Code Generator
Description: Allows the use of a Lottery Code Generator to Admins only, with the choices of as many numbers as you want, and will pick 1 of those numbers you have down out at random. This is placed in the My Controls section and will be on the left hand side menu. Also you can charge money in a topic for people to buy a lottery ticket which this has no money hack with it so use a seperate one.
Preview of it in Use/Screenshot: Posted Image
Where it goes: Footer
Quote:
 
<script>
//Admin Advanced Lottery Code Generator
//By slayer766 of thecodingzone.com

//Set Lottery Price Here
var LotteryPrice = "$1,000";
//Set Possible Numbers Here, you can add as many as you want
var RandomNum = [2,44,8,57,12,6];


a = document.getElementById("userlinks").getElementsByTagName("a");
for(r=0;r<a.length;r++){
if(a[r].href.match("admin")){
var c = document.getElementById("ucpmenu");
if(c){
c.innerHTML+="<div class='pformstrip'>Lottery Area</div><p>· <a href='"+location.href.split("?")[0]+"?act=UserCP&CODE=Lottery'>Lottery Generator</a></p>";
}
}
}

if(location.href.match("Lottery")){
a='<br /><br /><table width="50%" border="1" cellspacing="5" cellpadding="5" align="center"><tr><th align="center">*Note* Price: <i>'+LotteryPrice+'</i></th><th align="center">Overall Numbers</th></tr><tr><th rowspan="6" valign="top"><br /><div class="pformstrip">Generate Number</div><br /><br /><input type="button" onclick="ShowNum()" value="Generate Now!"><br /><br /><fieldset>Winning Number: <i><span id="winnum" style="color:green"></span></i></fieldset><br /></th></tr>';
for(q in RandomNum){
a+='<tr><td>'+RandomNum[q]+'</td></tr>';
}
a+='</table>';
document.getElementById("ucpcontent").innerHTML="<div class='maintitle'>Lottery Generator</div>"+a;
}

function ShowNum(){
document.getElementById("winnum").innerHTML=RandomNum[Math.floor(Math.random()*RandomNum.length)];
}
</script>[/b][/i]


You can change what's in RED to whatever you want it to be.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply