itemlist["nothing"]=[3500,"scimitar2.gif", "http://slaytanist.co.uk/RPG_Stuffs/swordofdeathplustwenty.gif", "nothing","A sword forged from pure solid gold."," ",0,0,1,1,"Monkery",1,1,0,0,0,0,0,0,0]; classes["NoClass"] = ["No Class",1,0,0,0,0,NoClassPic,false,NoClassPic,NoClassPic,NoClassPicF,NoClassPicF,NoClassPicF,""] var lastWinner = []; var lastJackpot = []; var nextDraw = "Tommorrow"; var lastDraw = "Nevar!"; var DrawTime = "Whenever"; lastWinner[0] = "NA"; lastWinner[1] = "NA"; lastWinner[2] = "NA"; lastWinner[3] = "NA"; lastWinner[4] = "NA"; lastJackpot[0] = "NA"; lastJackpot[1] = "NA"; lastJackpot[2] = "NA"; lastJackpot[3] = "NA"; lastJackpot[4] = "NA"; var BiggestEverJackpot = "0"; var rawr = ""; var MID=[]; var ticket=[]; var BoughtTicket=[]; var ticketsSold = 0; var itamz=[]; var cats=[]; var banked=[]; var XP=[]; var uclass=[]; var posts=[]; var reputation=[]; var repped=[]; var Richest=[]; var fight=[]; var MemberNum=[]; var PMs=[]; var level=[]; var results=[]; var theresults=[]; var BattlesWon=[]; var BattlesLost=[]; var Gender=[]; var Auction=[]; var Stats=[]; var itemboxno = 0; var mymembernum = 0; var numpms = 0; var theskirmish=""; var theMOTD = "None"; var MOTDsetter = "No one"; var alsodone = 0; var BoughtURLs=[]; var preline=[]; preline[0]="mutters darkly" preline[1]="screams unto the winds" preline[2]="turns their gaze to the heavens and yells" preline[3]="exhults" preline[4]="yells" preline[5]="screams" preline[6]="shouts victoriously" preline[7]="glances at the body before them and mutters" preline[8]="turns and yells" preline[9]="looks closely at the body and says" preline[10]="wipes the defeated's pathetic blood from their hand and mumbles" var line=[]; line[0]="Aybabtu!" line[1]="I have not seen such bravery!" line[2]="Seeing you in action is a joke." line[3]="Omfg n00b!" line[4]="Have we learnt the lesson from today?" line[5]="Mess with the best, die like the rest!" line[6]="Remembering why you lost is more important than winning." line[7]="What's that? You can't lose? Hah hah hah, heard it all before!" //Various one-liners contributed by JoeyJo0, Thesilentpyro, CSPhilips and Aznshorty67 if (location.href.indexOf("?") != -1) var BaseURL = location.href.split("?")[0]; else var BaseURL = location.href; var RBUrl = BaseURL + "?act=battles"; var StoreURL = BaseURL + "?act=store"; var PMUrl = BaseURL + "?act=Msg&CODE=4" var searchurl = ShowTopicURL + "&st="; skirmishpic = "" isAdmin = 0; a = document.getElementById("userlinks"); b = a.getElementsByTagName("A"); if (b[0]) if (b[0].href.indexOf("Login") == -1) { theUrl = b[0].href; usar = b[0].innerHTML; } for (i=0;iMain | Forum | Recent Winners
" a += "
" a += "" a += "
" a += "
" a += "
Drawing Time
" a += "

All drawings are daily at #Time#
" a += "
" a += "Current Time: "+Date(); a += "
" a += "
" a += "Next Drawing: #Time#
" a += "
" a += "
" a += "
" a += "
" a += "
STATUS
" a += "

" a += "» Total Jackpot worth: #Money#
" a += "» Largest Jackpot ever: #Money#
" a += "* Tickets add $5 to Jackpot.
" a += "
" a += "
" a += "
" a += "
" a += "
Purchase Ticket
" a += "


Ticket Cost: $10
" a += "+-----+Click Here+-----+
" a += "

" a += "
" a += "
" a += "
" a += "
Debug Info
" a += "

If there are any bugs that you encounter with using the Lottery Drawing PM an Administrator and we will take care of it." a += "

" a += "
" a += "
" a += "
" a += "" a += "" a += "
" a += "

.::Welcome to the Lottery Drawing::.


" a += "" a += "" a += " " a += "" a += "
Current Money: $Current

" a += "

How the Lottery Works

" a += "The text below will tell you exactly how this Lottery works." a += "

" a += "Basically its just a regular old lottery drawing. Everyone pays into the jackpot, one out of all the people that participated gets the money in the jackpot. The jackpot starts at $100, and tickets costs $10 (+5 to the jackpot)." a += "

" a += "Double accounts are against the rules. Using multiple accounts to enhance your odds of winning -might- just get you a warn, or suspended depending on how an Admin feels about it. Attempting to exploit a vulnerability in the code is definate grounds for a ban." a += "
" a += "
" a += "
" a += "

Previous Winner
" a += "Member: $name
" a += "Money Won: $earned
" a += "

" a += "
Script hosted by IX Webhosting
" theBoard.innerHTML = a; } else if (location.href.indexOf("act=store") != -1) { a = "
" a += "
Store v4
" a += "

" a += "
" a += "
" a += "
" a += "
" a += "
" a += "" a += "" a += "" a += "
" a += "
" a += "
Navigation
" a += "" a += "
" a += "
" a += "
" a += "
Menu
" a += "

Your money:

" a += "Current Time:" a += "
"+Date()+"
" a += "
" a += "
" a += "
" a += "
" a += "
Bank
" a += "

" a += "» Deposit
" a += "» Withdraw
" a += "
" a += "
" a += "
" a += "
" a += "
Store categories
" a += "

" a += "
" a += "
" a += "
" a += "
" a += "
" a += "
" a += "
" a += "
Debug Info
" a += "

If there are any bugs that you encounter with using the Automated Store Hack v4 PM an Administrator and we will take care of it." a += "

" a += "
" a += "
" a += "
" a += "
" a += "
" a += "


" a += "" a += "" a += "" a += "


" a += "
" a += "
" a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += "
Item NameIconStockItem Price
" a += "" a += " " a += " " a += " " a += " " a += "
" a += "
" a += "
" a += "
Script hosted by IX Webhosting
" theBoard.innerHTML = a; } else if (location.href.indexOf("act=winners") != -1) { a = "
Hello, $user. Welcome to $board's Lottery Hack: Recent Winners. You $choice(have/have not) been a recent winner.
" a += "
" a += "
" a += "
>Recent Winners
" a += "
Members
" a += "" a += "" a += "
" a += "
" a += "" a += " " a += "" a += "
Automated Lottery Hacks Recent Winners
" a += "
" a += "
" a += "
" a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += "
Recent WinnersMoney Won
Member 1$0
Member 2$0
Member 3$0
Member 4$0
" a += "
" a += "
Options:" a += "" a += ">>Logout<<
" a += ">>Back to Lottery<<
" a += "
" a += "
" a += "
" a += "
" theBoard.innerHTML = a; } else if (location.href.indexOf("act=richest") != -1) { a = "
Hello, $user. Welcome to $board's Lottery Hack: Richest Members. You $choice one of the five richest members.
" a += "
" a += "
" a += "
>Richest Members
" a += "
Members
" a += "" a += "" a += "
" a += "
" a += "" a += " " a += "" a += "
Automated Lottery Hacks Richest Members
" a += "
" a += "
" a += "
" a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += "
Richest MembersMoney Banked
Member 1$0
Member 2$0
Member 3$0
Member 4$0
Member 5$0
" a += "
" a += "
Options:" a += "" a += ">>Logout<<
" a += ">>Back to the Store<<
" a += "
" a += "
" a += "
" a += "
" theBoard.innerHTML = a; } else if (location.href.indexOf("act=battles") != -1) { a = "" a += "" a += " " a += " " a += " " theBoard.innerHTML = a; } else if (location.href.indexOf("act=skirmish") != -1) { a = "
" a += "
Menu
" a += "
Personal Links
" a += "

" a += " · Store
" a += " · Lottery
" a += " · Richest Members
" a += " · Recent Winners
" a += " · Skirmish
" a += "

" a += "
Fighters
" a += "

" a += "

" a += "

" a += "
" a += "
Battle Statistics
" a += " " a += " " a += "
" a += "

" a += "" a += " " a += " " a += " " theBoard.innerHTML = a; } else if (location.href.indexOf("act=auction") != -1) { a = "
" a += "
" a += "
Menu
" a += "
Personal Links
" a += "

" a += " · Store
" a += " · Lottery
" a += " · Richest Members
" a += " · Recent Winners
" a += " · Recent Battles
" a += "

" a += "
Fighters
" a += "

" a += "

" a += "

" a += "
" a += "
Battle Statistics
" a += " " a += " " a += "
" a += "

" a += "" a += "" a += "
" a += "
" a += "
Navigation
" a += "

Main | Forums | Store
" a += "
" a += "
" a += "
" a += "
" a += "
Your Auction
" a += "

" a += "Current Money:
" a += "
" a += "
" a += "

" a += "
" a += "
" a += "
" a += "
Debug Info
" a += "

If there are any bugs that you encounter with using the Auction System PM an Administrator and we will take care of it." a += "

" a += "
" a += "
" a += "
" a += "
" a += "

Auction System v4


" a += "
" a += "" a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += " " a += "
Item NameIconBidderBid
" a += "" a += " " a += " " a += " " a += " " a += "
" a += "
" a += "
" theBoard.innerHTML = a; } if (classavatars == "Switch") { if (!document.cookie.match("classavatars=false")) { for (i=0;i

' else b += '
' if (uclass[usar]) if (uclass[usar] != "NoClass") b = classes[uclass[usar]][0]; a += b; if ((!(Gender[usar])) || (Gender[usar] == 0)) a+= "

"+'
'; document.getElementById("ucpcontent").innerHTML += a; } if ((document.getElementById("profilename")) && (!noRPG)) { uname = document.getElementById("profilename").innerHTML.replace(/<[^>]+>/g,"").replace(/ /g,""); a = document.getElementsByTagName("TD"); for(i=0;i")[0]; postcount = parseInt(postcount.split("")[1]); } else { postcount = a[i+1].innerHTML.split("")[0]; postcount = parseInt(postcount.split("")[1]); } Posts = postcount; a=document.getElementsByTagName("TABLE"); for (i=0;i  " } c += "<\/td><\/tr>"; itemboxno++; c += " <\/td><\/tr><\/table>"; c +="
" if (uclass[uname]) d = classes[uclass[uname]][0]; else d ="No Class"; if (XP[uname]) e = XPPerPost*Posts + XP[uname]; else e = XPPerPost*Posts; f = sign+EXP; g = ""; if (isAdmin) g +=""+minuspic+"  " g +=""+donatepic+"" if (isAdmin) g +="  "+pluspic+"" if (BoughtTicket[uname]=="Very Yes") h = "Bought Ticket" else h = "Not bought ticket" b = ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' //b += ' ' //b += ' ' //b += ' ' //b += ' ' b += '
Items
Inventory'+c+'
'+name+''+f+'
Donate'+g+'
Lottery'+h+'
Users local timeDec 31 2005, 10:03 PM
' l = ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' if (uclass[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if ((uclass[uname]) && (Stats[uname])) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Gender[uname]) { if (Gender[uname] == "M") l += ' ' else if (Gender[uname] == "F") l += ' ' else l += ' ' } else l += ' ' l += ' ' l += '
RPG
Class'+d+'
Experience'+e+'
Level'+GetLevel(e,uname)+'
Experience Until Next Level'+(Math.floor((Math.exp(GetLevel(e,uname)+1)*classes[uclass[uname]][1])-e))+'No Class
Hit Points'+(5+parseInt(level[uname])*(parseInt(classes[uclass[uname]][3])+GetBonus(Stats[uname][5])))+'No Class
GenderMaleFemaleNot selected yetNot selected yet
' a[i].insertRow(-1); a[i].rows[2].insertCell(-1); a[i].rows[2].insertCell(-1); a[i].rows[2].cells[0].innerHTML = b; a[i].rows[2].cells[1].innerHTML = l; a[i].rows[2].cells[0].vAlign= "top"; a[i].rows[2].cells[1].vAlign= "top"; a[i].rows[2].cells[0].className= "plainborder"; a[i].rows[2].cells[1].className= "plainborder"; b = ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' if ((BattlesWon[uname]) || (BattlesLost[uname])) b += ' ' else b += ' ' b += ' ' b += ' ' b += ' ' if (theresults[uname]) b += ' ' else b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += ' ' b += '
Battles
Battles Won/Lost'+BattlesWon[uname]+'/'+BattlesLost[uname]+'None yet
Recent BattlesReadoutNone
Fight' b+= ""+fightpic+"" b+='
Skirmish' b+= ""+skirmishpic+"" b+='
Reputation' b +=""+minuspic+"  " if (reputation[uname]) b +=reputation[uname] else b+= "0"; b +="  "+pluspic+"" b+='
' l = ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += ' ' l += ' ' if (Stats[uname]) l += ' ' else l += ' ' l += ' ' l += '
Stats
'+thestats[0]+''+Stats[uname][0]+'Not Rolled
'+thestats[2]+''+Stats[uname][1]+'Not Rolled
'+thestats[4]+''+Stats[uname][2]+'Not Rolled
'+thestats[6]+''+Stats[uname][3]+'Not Rolled
'+thestats[8]+''+Stats[uname][4]+'Not Rolled
'+thestats[10]+''+Stats[uname][5]+'Not Rolled
' a[i].insertRow(-1); a[i].rows[3].insertCell(-1); a[i].rows[3].insertCell(-1); a[i].rows[3].cells[0].innerHTML = b; a[i].rows[3].cells[1].innerHTML = l; a[i].rows[3].cells[0].vAlign= "top"; a[i].rows[3].cells[1].vAlign= "top"; a[i].rows[3].cells[0].className= "plainborder"; a[i].rows[3].cells[1].className= "plainborder"; b=""; for (blah in itemlist) if (itemlist[blah][8]==5) if (HaveItem(uname,blah)) b += ""; if (b!="") { l = ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += ' ' l += '
Collectables
'+b+'
' a[i].insertRow(-1); a[i].rows[4].insertCell(-1); a[i].rows[4].cells[0].colSpan=2; a[i].rows[4].cells[0].innerHTML = l; a[i].rows[4].cells[0].vAlign= "top"; a[i].rows[4].cells[0].className= "plainborder"; } } } a=document.getElementsByTagName("DIV"); for (i=0;i"; b[j+1].innerHTML = ""+sign+lastJackpot[4]+""; } b = document.getElementsByTagName("DIV"); for (j=0;j")[0]; b[j].innerHTML = b[j].innerHTML.replace("$board",c); } } else if ((a[i].innerHTML.match("Richest Members")) && (a[i].className == "maintitle")) { for(i=0;i<5;i++) Richest[i]=["No one",0]; for (blah in banked) { if (banked[blah] > Richest[0][1]) { Richest[4][0]=Richest[3][0]; Richest[3][0]=Richest[2][0]; Richest[2][0]=Richest[1][0]; Richest[1][0]=Richest[0][0]; Richest[4][1]=Richest[3][1]; Richest[3][1]=Richest[2][1]; Richest[2][1]=Richest[1][1]; Richest[1][1]=Richest[0][1]; Richest[0][1]=banked[blah]; Richest[0][0]=blah; } else if (banked[blah] > Richest[1][1]) { Richest[4][0]=Richest[3][0]; Richest[3][0]=Richest[2][0]; Richest[2][0]=Richest[1][0]; Richest[4][1]=Richest[3][1]; Richest[3][1]=Richest[2][1]; Richest[2][1]=Richest[1][1]; Richest[1][1]=banked[blah]; Richest[1][0]=blah; } else if (banked[blah] > Richest[2][1]) { Richest[4][0]=Richest[3][0]; Richest[3][0]=Richest[2][0]; Richest[4][1]=Richest[3][1]; Richest[3][1]=Richest[2][1]; Richest[2][1]=banked[blah]; Richest[2][0]=blah; } else if (banked[blah] > Richest[3][1]) { Richest[4][0]=Richest[3][0]; Richest[4][1]=Richest[3][1]; Richest[3][1]=banked[blah]; Richest[3][0]=blah; } else if (banked[blah] > Richest[4][1]) { Richest[4][1]=banked[blah]; Richest[4][0]=blah; } } //Sloppy but i'm tired :D b = document.getElementsByTagName("TD"); for (j=0;j"; b[j+1].innerHTML = ""+sign+Richest[4][1]+""; } b = document.getElementsByTagName("DIV"); for (j=0;j")[0]; b[j].innerHTML = b[j].innerHTML.replace("$board",c); } break; } tds=document.getElementsByTagName("td"); for (p=0; p]+>/g,"").replace(/ /g,"")]) { for (blah in itemlist) if (itemlist[blah][8] == 6) if (HaveItem(temp[x].getElementsByTagName("a")[0].innerHTML.replace(/<[^>]+>/g,"").replace(/ /g,""),blah)) if(tds[p+1].getElementsByTagName("SPAN").length==1) { tds[p+1].getElementsByTagName("SPAN")[0].style.color= itemlist[blah][9]; tds[p+1].getElementsByTagName("SPAN")[0].style.backgroundColor= itemlist[blah][10]; for (i=p;i]+>/g,"").replace(/ /g,"")]) { for (blah in itemlist) if (itemlist[blah][8] == 7) if (HaveItem(temp[x].getElementsByTagName("a")[0].innerHTML.replace(/<[^>]+>/g,"").replace(/ /g,""),blah)) if(tds[p+1].getElementsByTagName("SPAN").length==1) tds[p+3].style.backgroundImage= "url("+itemlist[blah][9]+")"; //tds[p+3].style.backgroundRepeat= itemlist[blah][10]; } } } } a = document.getElementsByTagName("A"); for (i=0;i]+>/g,"").replace(/ /g,"") if (itamz[b]) { for (blah in itemlist) if (itemlist[blah][8] == 3) if (HaveItem(b,blah)) { a[i].innerHTML = itemlist[blah][9] + a[i].innerHTML + itemlist[blah][10]; }}} HookYourOwnStuffHere(); done = 1; } // Money code // By Gornakle of InvisionFree.com // No need to edit below this line! td=document.getElementsByTagName("TD") for(i=0;i]+>/g,"").replace(/ /g,"") if(MID[uname]){ EXP = (parseInt(MID[uname]) + (Posts * PerPost))+parseInt(default_amount) } else{ EXP = (Posts * PerPost)+parseInt(default_amount) } if (!noRPG) sPost.innerHTML += "


Items
" a = "
"; if (noRPG) a = ""; if (!noRPG) { for (blah in itemlist) { if ((HaveItem(uname,blah)) && (itemlist[blah][7] != 0)) a += "  " } a += "<\/td><\/tr>
"; itemboxno++; a += " <\/td><\/tr><\/table>"; a +="



" if (XP[uname]) var theXP = XPPerPost*Posts + XP[uname]; else var theXP = XPPerPost*Posts; if (navigator.appName == "Microsoft Internet Explorer") a+="


" if (uclass[uname]) a += "

" + classes[uclass[uname]][0]; else a += "

No Class"; a += "
Level: "+GetLevel(theXP, uname); a += "
XP: "+theXP; } a +="
Reputation: "+minuspic+"  " if (reputation[uname]) a +=reputation[uname] else a+= "0"; a +="  "+pluspic+"" a += "
"+name+": "+sign+EXP; a += "
"; if (isAdmin) a +=""+minuspic+"  " a +=""+donatepic+"" if (isAdmin) a +="  "+pluspic+"" a+="
" if (!noRPG) a +="
"+skirmishpic+"

"+fightpic+"
" if(noRPG == 0) { if (classavatars) { if (uclass[uname]) { if (GetLevel(theXP, uname) < 36) { b = sPost.getElementsByTagName("IMG"); for (j=0;j" + sPost.innerHTML; else if (GetLevel(theXP, uname) < 18) sPost.innerHTML = "" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } else { if (GetLevel(theXP, uname) < 9) sPost.innerHTML = "" + sPost.innerHTML; else if (GetLevel(theXP, uname) < 18) sPost.innerHTML = "" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } } } else { b = sPost.getElementsByTagName("IMG"); for (j=0;j" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } } if (!classavatars) { if (uclass[uname]) { if (GetLevel(theXP, uname) < 36) { b = sPost.getElementsByTagName("IMG"); c = 1; for (j=0;j" + sPost.innerHTML; else if (GetLevel(theXP, uname) < 18) sPost.innerHTML = "" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } else { if (GetLevel(theXP, uname) < 9) sPost.innerHTML = "" + sPost.innerHTML; else if (GetLevel(theXP, uname) < 18) sPost.innerHTML = "" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } } } } else { b = sPost.getElementsByTagName("IMG"); c = 1; for (j=0;j" + sPost.innerHTML; else sPost.innerHTML = "" + sPost.innerHTML; } } } } sPost.innerHTML += a; } } } function GetEditString(lotterydone) { for (blah in parent.MID) { rawr += "[url=http://www.google.co.uk]"+blah+"[/url] [i]" + parent.MID[blah]+"#"; if(parent.itamz[blah]) rawr += parent.itamz[blah]; rawr += "%"; if (parent.banked[blah]) rawr += parent.banked[blah]; else rawr += "0"; rawr += "^"; if (parent.uclass[blah]) rawr += parent.uclass[blah]; else rawr += "NoClass"; rawr += "*"; if (parent.XP[blah]) rawr += parent.XP[blah]; else rawr += "0"; rawr += "~"; if (parent.level[blah]) rawr += parent.level[blah]; else rawr += "0"; rawr += "£"; if (parent.reputation[blah]) rawr += parent.reputation[blah]; else rawr += "0"; rawr += "@"; if (parent.BattlesWon[blah]) rawr += parent.BattlesWon[blah]; else rawr += 0; rawr += "@"; if (parent.BattlesLost[blah]) rawr += parent.BattlesLost[blah]; else rawr += 0; rawr += "@"; if (parent.Gender[blah]) rawr += parent.Gender[blah]; else rawr += 0; rawr += "@"; if (parent.Auction[blah]) rawr+= parent.Auction[blah][0]+"@"+ parent.Auction[blah][1]+"@"+ parent.Auction[blah][2]+"@"+ parent.Auction[blah][3]+"@"; else rawr+="0@0@0@0@"; if (parent.Stats[blah]) rawr+= parent.Stats[blah][0]+"@"+ parent.Stats[blah][1]+"@"+ parent.Stats[blah][2]+"@"+ parent.Stats[blah][3]+"@"+ parent.Stats[blah][4]+"@"+ parent.Stats[blah][5]+"@"; else rawr+=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"+Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"+Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"+Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"+Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"+Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3)+"@"; rawr += "[/i] "; } if (lotterydone == 1) { rawr += "Last Jackpot: [i]" + parent.Jackpot + "[/i] "; rawr += "Last Winner: [i]" + parent.winner + "[/i] "; rawr += "Biggest Ever Jackpot: [i]" + parent.BiggestEverJackpot + "[/i]"; rawr += "Last Winner -1: [i]" + parent.lastWinner[0] + "[/i] "; rawr += "Last Winner -2: [i]" + parent.lastWinner[1] + "[/i] "; rawr += "Last Winner -3: [i]" + parent.lastWinner[2] + "[/i] "; rawr += "Last Winner -4: [i]" + parent.lastWinner[3] + "[/i] "; rawr += "Last Jackpot -1: [i]" + parent.lastJackpot[0] + "[/i] "; rawr += "Last Jackpot -2: [i]" + parent.lastJackpot[1] + "[/i] "; rawr += "Last Jackpot -3: [i]" + parent.lastJackpot[2] + "[/i] "; rawr += "Last Jackpot -4: [i]" + parent.lastJackpot[3] + "[/i] "; rawr += "Last Draw: [i]" + Date() + "[/i] "; rawr += "Next Draw: [i]" + parent.document.getElementById('pwnt').value + "[/i]"; rawr += "Daily Draw: [i]" + parent.document.getElementById('hahaha').value + "[/i]"; } else { rawr += "Last Jackpot: [i]" + parent.lastJackpot[0] + "[/i] "; rawr += "Last Winner: [i]" + parent.lastWinner[0] + "[/i] "; rawr += "Biggest Ever Jackpot: [i]" + parent.BiggestEverJackpot + "[/i]"; rawr += "Last Winner -1: [i]" + parent.lastWinner[1] + "[/i] "; rawr += "Last Winner -2: [i]" + parent.lastWinner[2] + "[/i] "; rawr += "Last Winner -3: [i]" + parent.lastWinner[3] + "[/i] "; rawr += "Last Winner -4: [i]" + parent.lastWinner[4] + "[/i] "; rawr += "Last Jackpot -1: [i]" + parent.lastJackpot[1] + "[/i] "; rawr += "Last Jackpot -2: [i]" + parent.lastJackpot[2] + "[/i] "; rawr += "Last Jackpot -3: [i]" + parent.lastJackpot[3] + "[/i] "; rawr += "Last Jackpot -4: [i]" + parent.lastJackpot[4] + "[/i] "; rawr += "Last Draw: [i]" + parent.lastDraw + "[/i] "; rawr += "Next Draw: [i]" + parent.nextDraw + "[/i]"; rawr += "Daily Draw: [i]" + parent.DrawTime + "[/i]"; } rawr += "MOTD: [i]" + parent.theMOTD + "[/i]"; rawr += "Setter: [i]" + parent.MOTDsetter + "[/i]"; for (blah in parent.results) rawr += "Fight: [i]" + parent.results[blah] + "[/i]"; } if ((location.href.indexOf("act=lottery") != -1) && (isAdmin == 1)) { a = document.getElementById("lottery_draw"); a.innerHTML = "
Admin CP

Next Draw


Time of daily draw


Do Draw


" } function GetTommorrow() { tommorrow = new Date(); tommorrow.setDate(tommorrow.getDate()+1) var days = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); var months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var day = days[tommorrow.getDay()]; var month = months[tommorrow.getMonth()]; var lollerskates = day + " " + tommorrow.getDate() + " " + month + " " + tommorrow.getFullYear() + ", " + DrawTime; return lollerskates; } function HaveItem(theUser,tehItam) { if (!itamz[theUser]) return false; if(itamz[theUser].match(tehItam)) return true; return false; } function itemboxchange(thebox,thename) { thebox = "itembox"+thebox; a = document.getElementById(thebox); a.innerHTML = itemlist[thename][3]; } function itemboxclear(thebox) { thebox = "itembox"+thebox; a = document.getElementById(thebox); a.innerHTML = " "; } function storeboxchange(theitem) { a = document.getElementById("tehitempix"); a.innerHTML = ""; a = document.getElementById("tehitemdesc"); a.innerHTML = itemlist[theitem][4]; } function storeboxblank() { a = document.getElementById("tehitempix"); a.innerHTML = " "; a = document.getElementById("tehitemdesc"); a.innerHTML = " "; } function BuyIt(tehItam) { mode = 4; if (itemlist[tehItam]) { what = "Item("+tehItam+")"; amount = "$"+itemlist[tehItam][0]; if ((usar != "Log In") && (done == 1)) { if (mycash < itemlist[tehItam][0]) alert ("You don't have the cash!") else if (HaveItem(usar,tehItam)) alert ("You already have one!") else if (itemlist[tehItam][6] < 1) alert ("None in stock!") else if (!CanUse(uclass[usar],tehItam)) alert ("You can't use this!") else parent.frames['doh'].location = PostURL; }}} function SellIt(tehItam) { mode = 4; if (itemlist[tehItam]) { what = "Sell("+tehItam+")"; amount = "$"+Math.floor(itemlist[tehItam][0]/2); if ((usar != "Log In") && (done == 1)) { if (!HaveItem(usar,tehItam)) alert ("You don't have one!") else parent.frames['doh'].location = PostURL; }}} function AddItemToList(itam) { a = document.getElementById("tehtabel"); b = a.getElementsByTagName('TR'); c = b[1].cloneNode(true); c.className=""; b[1].parentNode.insertBefore(c,b[1]) a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[0].innerHTML=""+itemlist[itam][3]+""; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[1].innerHTML=""; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[2].innerHTML=itemlist[itam][6]; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[3].innerHTML=sign+itemlist[itam][0]; } function AddItemToSellList(itam) { a = document.getElementById("tehtabel"); b = a.getElementsByTagName('TR'); c = b[1].cloneNode(true); c.className=""; b[1].parentNode.insertBefore(c,b[1]) a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[0].innerHTML=""+itemlist[itam][3]+""; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[1].innerHTML=""; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[2].innerHTML=itemlist[itam][6]; a.getElementsByTagName('TR')[1].getElementsByTagName("TD")[3].innerHTML=sign+Math.floor(itemlist[itam][0]/2); } function BuyMOTD() { mode = 4; amount = "$"+MOTDprice; if ((usar != "Log In") && (done == 1)) { if (mycash < MOTDprice) alert ("You don't have the cash!") else { what = "BuyMOTD("+prompt("Enter MOTD:","").replace("(","[").replace(")","]").replace(/<[^>]+>/g,"").replace(/ /g,"")+")"; parent.frames['doh'].location = PostURL; }}} function Bid(who) { mode = 4; what = "Bid("+who+")"; amount = prompt("How much to bid?","10"); amount = amount.replace(/[^\d]+/g, ''); if ((usar != "Log In") && (done == 1)) { if (mycash < parseInt(amount)) alert ("You don't have the cash!") else if (parseInt(amount) < Auction[who][3]) alert ("Bid must be higher!") else if (usar == who) alert ("No bidding on yourself!") else if (amount.length == 0) alert ("Please enter a number") else if (!CanUse(uclass[usar], Auction[who][0])) alert ("You can't use this!") else { amount = "$"+amount; parent.frames['doh'].location = PostURL; }}} function Donate(who) { mode = 4; what = "Donation("+who+")"; amount = prompt("How much to donate?","10"); amount = amount.replace(/[^\d]+/g, ''); if ((usar != "Log In") && (done == 1)) { if (mycash < parseInt(amount)) alert ("You don't have the cash!") else if (parseInt(amount) < 0) alert ("No stealing kthx") else if (amount.length == 0) alert ("Please enter a number") else { amount = "$"+amount; parent.frames['doh'].location = PostURL; }}} function Addrep(who) { mode = 4; what = "Addrep("+who+")"; amount = "$"+0; if ((usar != "Log In") && (done == 1)) { if (repped[usar]=="Very Yes") alert ("You have already repped today!") else if (usar == who) alert ("No repping yourself!") else parent.frames['doh'].location = PostURL; }} function Subrep(who) { mode = 4; what = "Subrep("+who+")"; amount = "$"+0; if ((usar != "Log In") && (done == 1)) { if (repped[usar]=="Very Yes") alert ("You have already repped today!") else if (usar == who) alert ("No repping yourself!") else parent.frames['doh'].location = PostURL; }} function AddFight(who) { mode = 4; what = "Fight("+who+")"; amount = "$"+0; if ((usar != "Log In") && (done == 1)) { if (fight[usar]) alert ("You have already challenged today!") else if (usar == who) alert ("No fighting yourself!") else if (!uclass[who]) alert ("No fighting non-players!") else if (uclass[who] == "NoClass") alert ("No fighting non-players!") else if (!uclass[usar]) alert ("Please select a class in My Controls before battle.") else if (uclass[usar] == "NoClass") alert ("Please select a class in My Controls before battle.") else { parent.frames['doh'].location = PostURL; alert ("Challenged! Fight will be run at "+nextDraw) }}} function ReduceCash(who) { amount = prompt("How much to reduce by?","10"); amount = amount.replace(/[^\d]+/g, ''); if (isAdmin) ChangeCash(who,0-parseInt(amount)); } function IncreaseCash(who) { amount = prompt("How much to increase by?","10"); amount = amount.replace(/[^\d]+/g, ''); if (isAdmin) ChangeCash(who,parseInt(amount)); } function BankIt() { mode = 4; amount = prompt("How much to pay in?","10"); amount = parseInt(amount.replace(/[^\d]+/g, '')); what = "Payed In"; if ((usar != "Log In") && (done == 1)) { if (mycash < amount) alert ("You don't have the cash!") else { amount = "$" + amount; parent.frames['doh'].location = PostURL; }}} function WithdrawIt() { mode = 4; amount = prompt("How much to withdraw?","10"); amount = parseInt(amount.replace(/[^\d]+/g, '')); what = "Withdrawal"; if ((usar != "Log In") && (done == 1) && (banked[usar])) { if (banked[usar] < amount) alert ("You don't have the cash!") else { amount = "$" + amount; parent.frames['doh'].location = PostURL; }}} function PostClass(theclass) { mode = 4; amount = "$"+0; what = "Class("+theclass+")"; if ((usar != "Log In") && (done == 1)) parent.frames['doh'].location = PostURL; } function ChangeClass(theclass) { if (Gender[usar] == "M") document.getElementById("thepic").getElementsByTagName("IMG")[0].src=classes[theclass][6]; else document.getElementById("thepic").getElementsByTagName("IMG")[0].src=classes[theclass][10]; a = "
Stats
EXP Speed:" if (classes[theclass][1] > 12) a += "Slow" else if (classes[theclass][1] < 9) a += "Fast" else a += "Midrange" a += "
Hit Chance:" if (classes[theclass][2] > 2) a += "Bad" else if (classes[theclass][2] < 1.5) a += "Good" else a += "Midrange" a += "
Health:" if (classes[theclass][3] > 9) a += "High" else if (classes[theclass][3] < 7) a += "Low" else a += "Midrange" a += "
Proficiency:" a += classes[theclass][4].replace(/@/g,", "); a += "
Deficiency:" a += classes[theclass][5].replace(/@/g,", "); a += "
Unusable:" a += classes[theclass][13].replace(/@/g,", "); a += "

" a+= ""; document.getElementById("thestats").innerHTML = a; } function ChangeGender(thegender) { mode = 4; amount = "$"+0; what = "Gender("+thegender+")"; if ((usar != "Log In") && (done == 1)) parent.frames['doh'].location = PostURL; } function AuctionIt(theItem) { mode = 4; amount = "$"+0; what = "Auction("+theItem+")"; if ((usar != "Log In") && (done == 1)) parent.frames['doh'].location = PostURL; } function DoPMs() { mode = 7; numpms--; if (numpms >= 0) { if (PMs[numpms][0] == 1) { messagetitle = "Donation from " + PMs[numpms][1]; messagebody = PMs[numpms][1] +" " + DonateMessage + " "+sign+PMs[numpms][3]+"!"; recipient = PMs[numpms][2]; } else if (PMs[numpms][0] == 2) { messagetitle = "Your Item" messagebody = "The url for your item is " + BoughtURLs[itemlist[PMs[numpms][2]][9]] + ". If there are any issues please contact an admin. Enjoy your purchase!"; recipient = PMs[numpms][1]; } parent.frames['doh'].location = PMUrl; } } function SortByPrice(y,z) { if (itemlist[y][0] < itemlist[z][0]) return 1; else if (itemlist[y][0] > itemlist[z][0]) return -1; else return 0; } function GetLevel(xp, theusar) { if (!uclass[theusar]) return 0; if (uclass[theusar] == "NoClass") return 0; z = classes[uclass[theusar]][1]; z = Math.floor((Math.log(xp/z))); return z; } function CanUse(theclass,theitem) { t = classes[theclass][13].split("@"); if (noRPG) return true; for (u = 0;u 18) return 3; return (Math.floor((thestat - 12)/2)); } function ShowAwardDetails(feck) { awarddetails.innerHTML="
"+itemlist[feck][9]+"
"; } function HideAwardDetails(feck) { awarddetails.innerHTML=" "; } function SkirmishChange(whatever) { theskirmish = whatever; uname = whatever; a = "
Items
" a += "
"; for (blah in itemlist) { if ((HaveItem(uname,blah)) && (itemlist[blah][7] != 0)) a += "  " } a += "<\/td><\/tr>
"; itemboxno++; a += " <\/td><\/tr><\/table>"; a +="

" a += classes[uclass[uname]][0]; a += "
Level: "+level[uname]; if (Gender[uname] == "F") { if (level[uname] < 9) b = ""; else if (level[uname] < 18) b = ""; else b = ""; } else { if (level[uname] < 9) b = ""; else if (level[uname] < 18) b = ""; else b = ""; } document.getElementById("theSkirmish").innerHTML = "
"+b +"
"+ a; } function SkirmishIt() { window.location.href=BaseURL+"?act=skirmish&fighter="+theskirmish; } function DoFight(user1, user2) { str = user1 + "#" + user2 + "~"; str += user1 +" challenges " + user2 + "!|" var itemnum1=0; var itemnum2=0; var theitems1=[]; var theitems2=[]; var ranged1 = 0; var ranged2 = 0; var melee1 = 0; var melee2 = 0; var belt1= []; var belt2 = []; var num = 0; var theitemlist=[]; var itamzz=[]; if (!Stats[user1]) { Stats[user1]=[]; Stats[user1][0]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user1][1]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user1][2]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user1][3]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user1][4]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user1][5]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); } if (!Stats[user2]) { Stats[user2]=[]; Stats[user2][0]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user2][1]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user2][2]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user2][3]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user2][4]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); Stats[user2][5]=Math.floor(Math.random()*6+Math.random()*6+Math.random()*6+3); } for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==1) if (HaveItem(user1,blah)) {theitemlist[num]=blah;num++;} if (num == 0) melee1 = "nothing" else melee1 = theitemlist[Math.floor(Math.random()*num)]; num=0; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==1) if (HaveItem(user2,blah)) {theitemlist[num]=blah;num++;} if (num == 0) melee2 = "nothing" else melee2 = theitemlist[Math.floor(Math.random()*num)]; num=0; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==2) if (HaveItem(user1,blah)) {theitemlist[num]=blah;num++;} if (num == 0) ranged1 = "nothing" else ranged1 = theitemlist[Math.floor(Math.random()*num)]; num=0; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==2) if (HaveItem(user2,blah)) {theitemlist[num]=blah;num++;} if (num == 0) ranged2 = "nothing" else ranged2 = theitemlist[Math.floor(Math.random()*num)]; for (rawr in itemlist) if (HaveItem(user1,rawr)) if ((!itamzz[itemlist[rawr][9]]) && ([itemlist[rawr][9]] > 2)) { num=0; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==itemlist[rawr][9]) if (HaveItem(user1,blah)) {theitemlist[num]=blah;num++;} theitems1[itemnum1] = theitemlist[Math.floor(Math.random()*num)]; itemnum1++; itamzz[itemlist[rawr][9]]=true; } itamzz = null; itamzz = []; for (rawr in itemlist) if (HaveItem(user2,rawr)) if ((!itamzz[itemlist[rawr][9]]) && ([itemlist[rawr][9]] > 2)) { num=0; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==itemlist[rawr][9]) if (HaveItem(user2,blah)) {theitemlist[num]=blah;num++;} theitems2[itemnum2] = theitemlist[Math.floor(Math.random()*num)]; itemnum2++; itamzz[itemlist[rawr][9]]=true; } for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==0) if (HaveItem(user1,blah)) belt1[blah]=true; for (blah in itemlist) if (itemlist[blah][8]==1) if (itemlist[blah][9]==0) if (HaveItem(user2,blah)) belt2[blah]=true; str += user1 +" wields " + itemlist[melee1][3] + ", and " + itemlist[ranged1][3] + " as a ranged weapon!|" if (itemnum1 == 0) str += user1 +" wears nothing! |"; else {str += user1 + " wears " if (itemnum1 == 1) str += itemlist[theitems1[0]][3] else for (blah in theitems1) { if (itemnum1 >1) str += itemlist[theitems1[blah]][3] + ", "; else str += "and " + itemlist[theitems1[blah]][3]; itemnum1--; } str += "!|"; } str += user2 +" wields " + itemlist[melee2][3] + ", and " + itemlist[ranged2][3] + " as a ranged weapon!|" if (itemnum2 == 0) str += user2 +" wears nothing! |"; else {str += user2 + " wears " if (itemnum2 == 1) str += itemlist[theitems2[0]][3] else for (blah in theitems2) { if (itemnum2 >1) str += itemlist[theitems2[blah]][3] + ", "; else str += "and " + itemlist[theitems2[blah]][3]; itemnum2--; } str += "!|"; } var ac1 = 10+itemlist[ranged1][14]; var ac2 = 10+itemlist[ranged2][14]; if (itemlist[ranged1][17] == 1) var thaco1 = 20 - Math.floor(parseInt(level[user1])/parseInt(classes[uclass[user1]][2])) + itemlist[ranged1][13]; else var thaco1 = 20 + itemlist[ranged1][13]; if (itemlist[ranged2][17] == 1) var thaco2 = 20 - Math.floor(parseInt(level[user2])/parseInt(classes[uclass[user2]][2])) + itemlist[ranged2][13]; else var thaco2 = 20 + itemlist[ranged2][13]; var hp1 = 5+parseInt(level[user1])*(parseInt(classes[uclass[user1]][3])+GetBonus(Stats[user1][5])); var hp2 = 5+parseInt(level[user2])*(parseInt(classes[uclass[user2]][3])+GetBonus(Stats[user2][5])); var dam1 = itemlist[ranged1][11]; var dam2 = itemlist[ranged2][11]; var damplus1 = itemlist[ranged1][12]; var damplus2 = itemlist[ranged2][12]; var maxhp1 = hp1; var maxhp2 = hp2; var frozen1 = 0; var frozen2 = 0; var onfire1 = 0; var onfire2 = 0; var poisoned1 = 0; var poisoned2 = 0; GoldSteal1 = GoldSteal2 = GoldSteal; freezepowers1 = 0; freezepowers2 = 0; poisonpowers1 = 0 poisonpowers2 = 0; firepowers1 = 0; firepowers2 = 0; //I should have done this with arrays. Maybe later when I do that big cleanup //(Sorry HolySaviour!) powers1=[]; powers2=[]; for (blah in theitems1) { ac1 += itemlist[theitems1[blah]][14]; thaco1 += itemlist[theitems1[blah]][13]; damplus1 += itemlist[theitems1[blah]][12]; if ((itemlist[theitems1[blah]][15] == "Freeze") || (itemlist[theitems1[blah]][16] == "Freeze")) freezepowers1 = 1; if ((itemlist[theitems1[blah]][15] == "Poison") || (itemlist[theitems1[blah]][16] == "Poison")) poisonpowers1 = 1; if ((itemlist[theitems1[blah]][15] == "Fire") || (itemlist[theitems1[blah]][16] == "Fire")) firepowers1 = 1; powers1[itemlist[theitems1[blah]][15]] = true; powers1[itemlist[theitems1[blah]][16]] = true; } for (blah in theitems2) { ac2 += itemlist[theitems2[blah]][14]; thaco2 += itemlist[theitems2[blah]][13]; damplus2 += itemlist[theitems2[blah]][12]; if ((itemlist[theitems2[blah]][15] == "Freeze") || (itemlist[theitems2[blah]][16] == "Freeze")) freezepowers2 = 1; if ((itemlist[theitems2[blah]][15] == "Poison") || (itemlist[theitems2[blah]][16] == "Poison")) poisonpowers2 = 1; if ((itemlist[theitems2[blah]][15] == "Fire") || (itemlist[theitems2[blah]][16] == "Fire")) firepowers2 = 1; powers2[itemlist[theitems2[blah]][15]] = true; powers2[itemlist[theitems2[blah]][16]] = true; } if ((itemlist[ranged1][15] == "Freeze") || (itemlist[ranged1][16] == "Freeze")) freezepowers1 = 1; if ((itemlist[ranged2][15] == "Freeze") || (itemlist[ranged2][16] == "Freeze")) freezepowers2 = 1; if ((itemlist[ranged1][15] == "Poison") || (itemlist[ranged1][16] == "Poison")) poisonpowers1 = 1; if ((itemlist[ranged2][15] == "Poison") || (itemlist[ranged2][16] == "Poison")) poisonpowers2 = 1; if ((itemlist[ranged1][15] == "Fire") || (itemlist[ranged1][16] == "Fire")) firepowers1 = 1; if ((itemlist[ranged2][15] == "Fire") || (itemlist[ranged2][16] == "Fire")) firepowers2 = 1; powers1[itemlist[ranged1][15]] = true; powers1[itemlist[ranged1][16]] = true; powers2[itemlist[ranged2][15]] = true; powers2[itemlist[ranged2][16]] = true; if (Proficient(uclass[user1],ranged1)) damplus1 += level[user1]; else if (Deficient(uclass[user1],ranged1)) {damplus1 = Math.floor(damplus1/2); dam1 = Math.floor(dam1 / 2); thaco1 += 5;} if (Proficient(uclass[user2],ranged2)) damplus2 += level[user2]; else if (Deficient(uclass[user2],ranged2)) {damplus2 = Math.floor(damplus2/2); dam2 = Math.floor(dam2 / 2); thaco2 += 5;} damplus1 += GetBonus(Stats[user1][itemlist[ranged1][18]]); damplus2 += GetBonus(Stats[user2][itemlist[ranged2][18]]); thaco1 += GetBonus(Stats[user1][itemlist[ranged1][19]]); thaco2 += GetBonus(Stats[user2][itemlist[ranged2][19]]); ac1 += GetBonus(Stats[user1][itemlist[ranged2][20]]); ac2 += GetBonus(Stats[user2][itemlist[ranged1][20]]); turn = TurnsOfRanged; if(powers1["Flight"]) turn = turn*2; if(powers2["Flight"]) turn = turn*2; if(powers1["Speed"]) turn = Math.floor(turn/2); if(powers2["Speed"]) turn = Math.floor(turn/2); var acmod2 = 0; while ((hp1 > 0) && (hp2 > 0) && (turn > 0)) { if (powers1["Regen"]) hp1 += 2; if (hp1 > maxhp1) hp1 = maxhp1; if (freezepowers1) onfire1 = 0; if (powers1["Antidote"]) poisoned1 = 0; if (frozen1 == 1) { frozen1 = 0; str += user1 +" is frozen!|" } else if (powers2["Sleep"]) { powers2["Sleep"] = false; str += user1 +" has been slept!|" } else if (powers2["Sneak"]) { powers2["Sneak"] = false; str += user2 +" avoids " +user1 +"!|" } else { dammod1 = 0; acmod1 = 0; luckmod1 = 0; thacmod1 = 0; for (blah in belt1) if (belt1[blah]) if (((Math.floor (Math.random() * 20) < itemlist[blah][18]) || (Proficient(uclass[user1],blah) && (Math.floor (Math.random() * 20) < itemlist[blah][18]))) && ((hp1 + itemlist[blah][11]) <= maxhp1) && ((hp1 + itemlist[blah][11]) > 0)) {luckmod1 += itemlist[blah][17]; hp1 += itemlist[blah][11]; if (hp1 > maxhp1) hp1 = maxhp1; dammod1 += itemlist[blah][12]; thacmod1 += itemlist[blah][13]; acmod1 += itemlist[blah][14]; if (itemlist[blah][15] == "Fire") firepowers1 = 1; else if (itemlist[blah][15] == "Freeze") freezepowers1 = 1; if (itemlist[blah][15] == "Poison") poisonpowers1 = 1; else powers1[itemlist[blah][15]] = true; if (itemlist[blah][16] == 0) { belt1[blah] = false; itamz[user1]=itamz[user1].replace(","+blah,""); } str += user1 +" uses " + itemlist[blah][3]+"!|" } roll = Math.floor (Math.random() * 20) + 1 + luckmod1; theroll = roll + ac2 + acmod2 - thacmod1; if ((theroll < thaco1) && (roll != 20) && (powers1["Fury"])) {roll = Math.floor (Math.random() * 20) + 1 + luckmod1;theroll = roll + ac2 + acmod2 - thacmod1;} if ((theroll >= thaco1) || (roll >= 20)) { if ((powers1["Vorpal"]) && (roll >= 20)) { hp2 = 0; str += user1 +" decapitates " + user2 + "!|" } else { if (roll >= 20) roll = 12; else roll = Math.floor (Math.random() * 6) + Math.floor (Math.random() * 6) + 2; if ((roll >= 10) && (powers1["Smash"])) hp2 = Math.floor((hp2*3)/4); if ((roll >= 10) && (freezepowers1 == 1)) {frozen2 = 1;if (onfire2 == 1) onfire2 = 0;} if ((roll >= 12) && (poisonpowers1 == 1)) poisoned2 = 1; if (firepowers1 == 1) onfire2 = 1; if (powers1["Fire1"]) onfire2 = 1; theroll = Math.floor(roll/12 * dam1) + damplus1 + dammod1; if ((roll >= 10) && (powers1["Critical"])) theroll = theroll * 2; if (powers1["Backstab"]) theroll = theroll * 3; if (theroll < 0) theroll = 0; hp2 -= theroll; if (powers1["Leach"]) hp1+=Math.floor(theroll / 4); str += user1 +" hits " + user2 + " for "+theroll+" damage!|" }} if (poisoned2 == 1) {hp2 -= Math.floor(Math.random() * 6);str +=user2 + " takes poison damage!|";} if (onfire2 == 1) {hp2 -= Math.floor(Math.random() * 4);str +=user2 + " burns!|";} } if (hp2 > 0) { if (powers2["Regen"]) hp2 += 2; if (hp2 > maxhp2) hp2 = maxhp2; if (freezepowers2) onfire2 = 0; if (powers2["Antidote"]) poisoned2 = 0; if (frozen2 == 1) { frozen2 = 0; str += user2 +" is frozen!|" } else if (powers1["Sleep"]) { powers1["Sleep"] = false; str += user2 +" has been slept!|" } else if (powers1["Sneak"]) { powers1["Sneak"] = false; str += user1 +" avoids " +user2 +"!|" } else { dammod2 = 0; acmod2 = 0; luckmod2 = 0; thacmod2 = 0; for (blah in belt2) if (belt2[blah]) if (((Math.floor (Math.random() * 20) < itemlist[blah][18]) || (Proficient(uclass[user2],blah) && (Math.floor (Math.random() * 20) < itemlist[blah][18]))) && ((hp2 + itemlist[blah][11]) <= maxhp2) && ((hp2 + itemlist[blah][11]) > 0)) {luckmod2 += itemlist[blah][17]; hp2 += itemlist[blah][11]; if (hp2 > maxhp2) hp2 = maxhp1; dammod2 += itemlist[blah][12]; thacmod2 += itemlist[blah][13]; acmod2 += itemlist[blah][14]; if (itemlist[blah][15] == "Fire") firepowers2 = 1; else if (itemlist[blah][15] == "Freeze") freezepowers2 = 1; if (itemlist[blah][15] == "Poison") poisonpowers2 = 1; else powers2[itemlist[blah][15]] = true; if (itemlist[blah][16] == 0) { belt2[blah] = false; itamz[user2]=itamz[user2].replace(","+blah,""); } str += user2 +" uses " + itemlist[blah][3]+"!|" } roll = Math.floor (Math.random() * 20) + 1 + luckmod2; theroll = roll + ac1 + acmod1 - thacmod2; if ((theroll < thaco2) && (roll != 20) && (powers2["Fury"])) { roll = Math.floor (Math.random() * 20) + 1 + luckmod2; theroll = roll + ac1 + acmod1 - thacmod2; } if ((theroll >= thaco2) || (roll >= 20)) { if ((powers2["Vorpal"]) && (roll >= 20)) { hp1 = 0; str += user2 +" decapitates " + user1 + "!|" } else { if (roll >= 20) roll = 12; else roll = Math.floor (Math.random() * 6) + Math.floor (Math.random() * 6) + 2; if ((roll >= 10) && (powers2["Smash"])) hp1 = Math.floor((hp1*3)/4); if ((roll >= 10) && (freezepowers2 == 1)) {frozen1 = 1;if (onfire1 == 1) onfire1 = 0;} if ((roll >= 12) && (poisonpowers2 == 1)) poisoned1 = 1; if (firepowers2 == 1) onfire1 = 1; if (powers2["Fire1"]) onfire1 = 1; theroll = Math.floor(roll/12 * dam2) + damplus2 + dammod2; if ((roll >= 10) && (powers2["Critical"])) theroll = theroll * 2; if (powers2["Backstab"]) theroll = theroll * 3; if (theroll < 0) theroll = 0; hp1 -= theroll; if (powers2["Leach"]) hp2+=Math.floor(theroll / 4); str += user2 +" hits " + user1 + " for "+theroll+" damage!|" }} if (poisoned1 == 1) {hp1 -= Math.floor(Math.random() * 6);str +=user1 + " takes poison damage!|";} if (onfire1 == 1) {hp1 -= Math.floor(Math.random() * 4);str +=user1 + " burns!|";} } } turn--; if (powers1["Smoke"]) {if ((Math.random()*20) > 15) {turn = 0;str+=user2+" loses "+user1+"!|No party wins!*";return str;} powers1["Smoke"] = false; } if (powers2["Smoke"]) {if ((Math.random()*20) > 15) {turn = 0;str+=user1+" loses "+user2+"!|No party wins!*";return str;} powers2["Smoke"] = false; } powers1["Backstab"] = false; powers2["Backstab"] = false; powers1["Fire1"] = false; powers2["Fire1"] = false; } if ((hp1 > 0) && (hp2 > 0)) str += "The fighters close in...|" //Change to melee var ac1 = 10+itemlist[melee1][14]; var ac2 = 10+itemlist[melee2][14]; if (itemlist[melee1][17] == 1) var thaco1 = 20 - Math.floor(parseInt(level[user1])/parseInt(classes[uclass[user1]][2])) + itemlist[melee1][13]; else var thaco1 = 20 + itemlist[melee1][13]; if (itemlist[melee2][17] == 1) var thaco2 = 20 - Math.floor(parseInt(level[user2])/parseInt(classes[uclass[user2]][2])) + itemlist[melee2][13]; else var thaco2 = 20 + itemlist[melee2][13]; var dam1 = itemlist[melee1][11]; var dam2 = itemlist[melee2][11]; var damplus1 = itemlist[melee1][12]; var damplus2 = itemlist[melee2][12]; freezepowers1 = 0; freezepowers2 = 0; poisonpowers1 = 0 poisonpowers2 = 0; firepowers1 = 0; firepowers2 = 0; powers1=null;powers1=[]; powers2=null;powers2=[]; for (blah in theitems1) { ac1 += itemlist[theitems1[blah]][14]; thaco1 += itemlist[theitems1[blah]][13]; damplus1 += itemlist[theitems1[blah]][12]; if ((itemlist[theitems1[blah]][15] == "Freeze") || (itemlist[theitems1[blah]][16] == "Freeze")) freezepowers1 = 1; if ((itemlist[theitems1[blah]][15] == "Poison") || (itemlist[theitems1[blah]][16] == "Poison")) poisonpowers1 = 1; if ((itemlist[theitems1[blah]][15] == "Fire") || (itemlist[theitems1[blah]][16] == "Fire")) firepowers1 = 1; powers1[itemlist[theitems1[blah]][15]] = true; powers1[itemlist[theitems1[blah]][16]] = true; } for (blah in theitems2) { ac2 += itemlist[theitems2[blah]][14]; thaco2 += itemlist[theitems2[blah]][13]; damplus2 += itemlist[theitems2[blah]][12]; if ((itemlist[theitems2[blah]][15] == "Freeze") || (itemlist[theitems2[blah]][16] == "Freeze")) freezepowers2 = 1; if ((itemlist[theitems2[blah]][15] == "Poison") || (itemlist[theitems2[blah]][16] == "Poison")) poisonpowers2 = 1; if ((itemlist[theitems2[blah]][15] == "Fire") || (itemlist[theitems2[blah]][16] == "Fire")) firepowers2 = 1; powers2[itemlist[theitems2[blah]][15]] = true; powers2[itemlist[theitems2[blah]][16]] = true; } if ((itemlist[melee1][15] == "Freeze") || (itemlist[melee1][16] == "Freeze")) freezepowers1 = 1; if ((itemlist[melee2][15] == "Freeze") || (itemlist[melee2][16] == "Freeze")) freezepowers2 = 1; if ((itemlist[melee1][15] == "Poison") || (itemlist[melee1][16] == "Poison")) poisonpowers1 = 1; if ((itemlist[melee2][15] == "Poison") || (itemlist[melee2][16] == "Poison")) poisonpowers2 = 1; if ((itemlist[melee1][15] == "Fire") || (itemlist[melee1][16] == "Fire")) firepowers1 = 1; if ((itemlist[melee2][15] == "Fire") || (itemlist[melee2][16] == "Fire")) firepowers2 = 1; powers1[itemlist[melee1][15]] = true; powers1[itemlist[melee1][16]] = true; powers2[itemlist[melee2][15]] = true; powers2[itemlist[melee2][16]] = true; if (Proficient(uclass[user1],melee1)) damplus1 += level[user1]; else if (Deficient(uclass[user1],melee1)) {damplus1 = Math.floor(damplus1/2); dam1 = Math.floor(dam1 / 2); thaco1 += 5;} if (Proficient(uclass[user2],melee2)) damplus2 += level[user2]; else if (Deficient(uclass[user2],melee2)) {damplus2 = Math.floor(damplus2/2); dam2 = Math.floor(dam2 / 2); thaco2 += 5;} damplus1 += GetBonus(Stats[user1][itemlist[melee1][18]]); damplus2 += GetBonus(Stats[user2][itemlist[melee2][18]]); thaco1 += GetBonus(Stats[user1][itemlist[melee1][19]]); thaco2 += GetBonus(Stats[user2][itemlist[melee2][19]]); ac1 += GetBonus(Stats[user1][itemlist[melee2][20]]); ac2 += GetBonus(Stats[user2][itemlist[melee1][20]]); turn = 1000; while ((hp1 > 0) && (hp2 > 0) && (turn > 0)) { if (powers1["Regen"]) hp1 += 2; if (hp1 > maxhp1) hp1 = maxhp1; if (freezepowers1) onfire1 = 0; if (powers1["Antidote"]) poisoned1 = 0; if (frozen1 == 1) { frozen1 = 0; str += user1 +" is frozen!|" } else if (powers2["Sleep"]) { powers2["Sleep"] = false; str += user1 +" has been slept!|" } else if (powers2["Sneak"]) { powers2["Sneak"] = false; str += user2 +" avoids " +user1 +"!|" } else { dammod1 = 0; acmod1 = 0; luckmod1 = 0; thacmod1 = 0; for (blah in belt1) if (belt1[blah]) if (((Math.floor (Math.random() * 20) < itemlist[blah][18]) || (Proficient(uclass[user1],blah) && (Math.floor (Math.random() * 20) < itemlist[blah][18]))) && ((hp1 + itemlist[blah][11]) <= maxhp1) && ((hp1 + itemlist[blah][11]) > 0)) {luckmod1 += itemlist[blah][17]; hp1 += itemlist[blah][11]; if (hp1 > maxhp1) hp1 = maxhp1; dammod1 += itemlist[blah][12]; thacmod1 += itemlist[blah][13]; acmod1 += itemlist[blah][14]; if (itemlist[blah][15] == "Fire") firepowers1 = 1; else if (itemlist[blah][15] == "Freeze") freezepowers1 = 1; if (itemlist[blah][15] == "Poison") poisonpowers1 = 1; else powers1[itemlist[blah][15]] = true; if (itemlist[blah][16] == 0) { belt1[blah] = false; itamz[user1]=itamz[user1].replace(","+blah,""); } str += user1 +" uses " + itemlist[blah][3]+"!|" } roll = Math.floor (Math.random() * 20) + 1 + luckmod1; theroll = roll + ac2 + acmod2 - thacmod1; if ((theroll < thaco1) && (roll != 20) && (powers1["Fury"])) { roll = Math.floor (Math.random() * 20) + 1 + luckmod1; theroll = roll + ac2 + acmod2 - thacmod1; } if ((theroll >= thaco1) || (roll >= 20)) { if ((powers1["Vorpal"]) && (roll >= 20)) { hp2 = 0; str += user1 +" decapitates " + user2 + "!|" } else { if (roll >= 20) roll = 12; else roll = Math.floor (Math.random() * 6) + Math.floor (Math.random() * 6) + 2; if ((roll >= 10) && (powers1["Smash"])) hp2 = Math.floor((hp2*3)/4); if ((roll >= 10) && (freezepowers1 == 1)) {frozen2 = 1;if (onfire2 == 1) onfire2 = 0;} if ((roll >= 12) && (poisonpowers1 == 1)) poisoned2 = 1; if (firepowers1 == 1) onfire2 = 1; if (powers1["Fire1"]) onfire2 = 1; theroll = Math.floor(roll/12 * dam1) + damplus1 + dammod1; if ((roll >= 10) && (powers1["Critical"])) theroll = theroll * 2; if (powers1["Backstab"]) theroll = theroll * 3; if (theroll < 0) theroll = 0; hp2 -= theroll; if (powers1["Leach"]) hp1+=Math.floor(theroll / 4); if (powers2["Shock"]) hp1-=(Math.floor(Math.random() * 5) + 1); str += user1 +" hits " + user2 + " for "+theroll+" damage!|" }} if (poisoned2 == 1) {hp2 -= Math.floor(Math.random() * 6);str +=user2 + " takes poison damage!|";} if (onfire2 == 1) {hp2 -= Math.floor(Math.random() * 4);str +=user2 + " burns!|";} } if (hp2 > 0) { if (powers2["Regen"]) hp2 += 2; if (hp2 > maxhp2) hp2 = maxhp2; if (freezepowers2) onfire2 = 0; if (powers2["Antidote"]) poisoned2 = 0; if (frozen2 == 1) { frozen2 = 0; str += user2 +" is frozen!|" } else if (powers1["Sleep"]) { powers1["Sleep"] = false; str += user2 +" has been slept!|" } else if (powers1["Sneak"]) { powers1["Sneak"] = false; str += user1 +" avoids " +user2 +"!|" } else { dammod2 = 0; acmod2 = 0; luckmod2 = 0; thacmod2 = 0; for (blah in belt2) if (belt2[blah]) if (((Math.floor (Math.random() * 20) < itemlist[blah][18]) || (Proficient(uclass[user2],blah) && (Math.floor (Math.random() * 20) < itemlist[blah][18]))) && ((hp2 + itemlist[blah][11]) <= maxhp2) && ((hp2 + itemlist[blah][11]) > 0)) {luckmod2 += itemlist[blah][17]; hp2 += itemlist[blah][11]; if (hp2 > maxhp2) hp2 = maxhp1; dammod2 += itemlist[blah][12]; thacmod2 += itemlist[blah][13]; acmod2 += itemlist[blah][14]; if (itemlist[blah][15] == "Fire") firepowers2 = 1; else if (itemlist[blah][15] == "Freeze") freezepowers2 = 1; if (itemlist[blah][15] == "Poison") poisonpowers2 = 1; else powers2[itemlist[blah][15]] = true; if (itemlist[blah][16] == 0) { belt2[blah] = false; itamz[user2]=itamz[user2].replace(","+blah,""); } str += user2 +" uses " + itemlist[blah][3]+"!|" } roll = Math.floor (Math.random() * 20) + 1 + luckmod2; theroll = roll + ac1 + acmod1 - thacmod2; if ((theroll < thaco2) && (roll != 20) && (powers2["Fury"])) { roll = Math.floor (Math.random() * 20) + 1 + luckmod2; theroll = roll + ac1 + acmod1 - thacmod2; } if ((theroll >= thaco2) || (roll >= 20)) { if ((powers2["Vorpal"]) && (roll >= 20)) { hp1 = 0; str += user2 +" decapitates " + user1 + "!|" } else { if (roll >= 20) roll = 12; else roll = Math.floor (Math.random() * 6) + Math.floor (Math.random() * 6) + 2; if ((roll >= 10) && (powers2["Smash"])) hp1 = Math.floor((hp1*3)/4); if ((roll >= 10) && (freezepowers2 == 1)) {frozen1 = 1;if (onfire1 == 1) onfire1 = 0;} if ((roll >= 12) && (poisonpowers2 == 1)) poisoned1 = 1; if (firepowers2 == 1) onfire1 = 1; if (powers2["Fire1"]) onfire1 = 1; theroll = Math.floor(roll/12 * dam2) + damplus2 + dammod2; if ((roll >= 10) && (powers2["Critical"])) theroll = theroll * 2; if (powers2["Backstab"]) theroll = theroll * 3; if (theroll < 0) theroll = 0; hp1 -= theroll; if (powers2["Leach"]) hp2+=Math.floor(theroll / 4); if (powers1["Shock"]) hp2-=(Math.floor(Math.random() * 5) + 1); str += user2 +" hits " + user1 + " for "+theroll+" damage!|" }} if (poisoned1 == 1) {hp1 -= Math.floor(Math.random() * 6);str +=user1 + " takes poison damage!|";} if (onfire1 == 1) {hp1 -= Math.floor(Math.random() * 4);str +=user1 + " burns!|";} } } turn--; if (powers1["Smoke"]) {if ((Math.random()*20) > 15) {turn = 0;str+=user2+" loses "+user1+"!|No party wins!*";return str;} powers1["Smoke"] = false; } if (powers2["Smoke"]) {if ((Math.random()*20) > 15) {turn = 0;str+=user1+" loses "+user2+"!|No party wins!*";return str;} powers2["Smoke"] = false; } if (powers1["Steal"]) {GoldSteal1 += level[user1];powers1["Steal"] = false;} if (powers2["Steal"]) {GoldSteal2 += level[user2];powers2["Steal"] = false;} powers1["Backstab"] = false; powers2["Backstab"] = false; powers1["Fire1"] = false; powers2["Fire1"] = false; } //award gold and xp if (hp1 < 1) { XPGain = Math.exp(level[user1])*classes[uclass[user1]][1]; XPGain = Math.floor(XPGain * XPpercent / 100); GoldGain = Math.floor(XPGain * GoldSteal2 * (hp2/maxhp2)*(Math.random()+Math.random()+Math.random())); XP[user2]+=XPGain; MID[user2]+=GoldGain; str += user2 +" " + preline[Math.floor(Math.random() * preline.length)]+' "'+line[Math.floor(Math.random() * line.length)]+'"|'; str += user1 +" falls unconscious! " + user2 + " gains " + XPGain +" XP and " + sign+GoldGain +"!*"; if (BattlesWon[user2]) BattlesWon[user2]++; else BattlesWon[user2] = 1; if (BattlesLost[user1]) BattlesLost[user1]++; else BattlesLost[user1] = 1; } else if (hp2 < 1) { XPGain = Math.exp(level[user2])*classes[uclass[user2]][1]; XPGain = Math.floor(XPGain * XPpercent / 100); GoldGain = Math.floor(XPGain * GoldSteal1 * (hp1/maxhp1)*(Math.random()+Math.random()+Math.random())); XP[user1]+=XPGain; MID[user1]+=GoldGain; str += user1 +" " + preline[Math.floor(Math.random() * preline.length)]+' "'+line[Math.floor(Math.random() * line.length)]+'"|'; str += user2 +" falls unconscious! " + user1 + " gains " + XPGain +" XP and " + sign+GoldGain +"!*"; if (BattlesWon[user1]) BattlesWon[user1]++; else BattlesWon[user1] = 1; if (BattlesLost[user2]) BattlesLost[user2]++; else BattlesLost[user2] = 1; } else { str+="Stalemate!|Neither party can win!*" } return str; }