<% if session("username")="" then Response.Redirect("login.asp") end if %> Fight
 
<% chkmenu=10 %>
<%set rs = server.CreateObject("ADODB.RECORDSET") rs.open "SELECT * FROM livefight where player1 =" & session("petselected") & " or player2 =" & session("petselected") &";",conn if rs.eof then Response.Redirect("arena.asp?s=1") end if player1 = rs("player1") player2 = rs("player2") if rs("type")= 1 then pl1 = rs("player1") pl2 = rs("player2") else pl1 = rs("player2") pl2 = rs("player1") end if session("fightid") = rs("fightid") rs.close rs.open "SELECT UserPetTable.status,UserPetTable.userpetName, PetTable.smallimg,PetTable.petName, UserPetTable.creationDate, livefight.strength1, livefight.player1 FROM livefight INNER JOIN (PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId) ON livefight.player1 = UserPetTable.userPetId WHERE (((livefight.player1)="&player1&"));",conn set rsp = server.CreateObject("ADODB.RECORDSET") rsp.open "select * from ad where fightid=" & session("fightid"),conn%> <%if cint(rsp("did")) > 0 and cint(rsp("aid")) > 0 then attacker=rsp("aid") defender=rsp("did") end if %> "> <% rsp.close%> <%if request("p") = 1 then Response.write("
Please Choose Weapon First
") end if%>
   
Player 1 stats
" width="40" height="40">
Name <%=rs("userpetname")%>
Type <%=rs("petname")%>
Age <%if not rs("status") = "Growing" then%> <%dte = datediff ("d",Cdate(rs("creationdate")),Now)%> <%=dte%> <%else%> Growing <%end if%>
Wins <% rs.close rs.open "SELECT Count(FightHistoryTable.userpetid) AS CountOfuserpetid, FightHistoryTable.Result FROM FightHistoryTable GROUP BY FightHistoryTable.userpetid, FightHistoryTable.Result HAVING (((FightHistoryTable.userpetid)="&player1&") AND ((FightHistoryTable.Result)='WIN'));",conn if not rs.eof then %> <%=rs("countofuserpetid")%> <%else%> 0 <%end if%>
Loses <% rs.close rs.open "SELECT Count(FightHistoryTable.userpetid) AS CountOfuserpetid, FightHistoryTable.Result FROM FightHistoryTable GROUP BY FightHistoryTable.userpetid, FightHistoryTable.Result HAVING (((FightHistoryTable.userpetid)="&player1&") AND ((FightHistoryTable.Result)='LOSE'));",conn if not rs.eof then %> <%=rs("countofuserpetid")%> <%else%> 0 <%end if%>
<% set ar = Server.CreateObject("ADODB.RECORDSET") ar.open "select * from userpettable where userpetid="& attacker,conn set at = Server.CreateObject("ADODB.RECORDSET") at.open "SELECT livefight.strength1 FROM livefight WHERE (((livefight.player1)="&attacker&"));",conn if not at.eof then strength = at("strength1") else at.close at.open "SELECT livefight.strength2 FROM livefight WHERE (((livefight.player2)="&attacker&"));",conn strength = at("strength2") end if %>
Attacker
Name: <%=ar("userpetname")%>
Strength: <%=strength%>
<% set ar = Server.CreateObject("ADODB.RECORDSET") ar.open "select * from userpettable where userpetid="& defender,conn set at = Server.CreateObject("ADODB.RECORDSET") at.open "SELECT livefight.strength1 FROM livefight WHERE (((livefight.player1)="&defender&"));",conn if not at.eof then strength = at("strength1") else at.close at.open "SELECT livefight.strength2 FROM livefight WHERE (((livefight.player2)="&defender&"));",conn strength = at("strength2") end if %>
Defender
Name: <%=ar("userpetname")%>
Strength: <%=strength%>
"> <% rs.close rs.open "SELECT UserPetTable.status, UserPetTable.userpetName, PetTable.smallimg, PetTable.petName, UserPetTable.creationDate, livefight.strength1, livefight.player2 FROM (PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId) INNER JOIN livefight ON UserPetTable.userPetId = livefight.player2 WHERE (((livefight.player2)=" & player2 & "));",conn %>
Player 2 stats
" width="40" height="40">
Name <%=rs("userpetname")%>
Type <%=rs("petname")%>
Age <%if not rs("status") = "Growing" then%> <%dte = datediff ("d",Cdate(rs("creationdate")),Now)%> <%=dte%> <%else%> Growing <%end if%>
Wins <% rs.close rs.open "SELECT Count(FightHistoryTable.userpetid) AS CountOfuserpetid, FightHistoryTable.Result FROM FightHistoryTable GROUP BY FightHistoryTable.userpetid, FightHistoryTable.Result HAVING (((FightHistoryTable.userpetid)="&player1&") AND ((FightHistoryTable.Result)='WIN'));",conn if not rs.eof then %> <%=rs("countofuserpetid")%> <%else%> 0 <%end if%>
Loses <% rs.close rs.open "SELECT Count(FightHistoryTable.userpetid) AS CountOfuserpetid, FightHistoryTable.Result FROM FightHistoryTable GROUP BY FightHistoryTable.userpetid, FightHistoryTable.Result HAVING (((FightHistoryTable.userpetid)="&player1&") AND ((FightHistoryTable.Result)='LOSE'));",conn if not rs.eof then %> <%=rs("countofuserpetid")%> <%else%> 0 <%end if%>
     
<% set weapon = Server.CreateObject("ADODB.RECORDSET") weapon.open "SELECT weapontable.weaponName,weapontable.weaponid FROM (weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId) INNER JOIN LevelWeaponTable ON weapontable.levelId = LevelWeaponTable.levelId WHERE (((weaponPetTable.userpetId)=" & attacker & ") AND ((LevelWeaponTable.levelName) like 'Hand Guns'));",conn %>
Hand Weapons Hand Guns Assault Weapons Explosive Devices Heavy Artillery
<% hw=1 if not weapon.eof then while not weapon.eof%> <% hw = hw + 1 weapon.movenext wend end if weapon.close weapon.open "SELECT weapontable.weaponName,weapontable.weaponid FROM (weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId) INNER JOIN LevelWeaponTable ON weapontable.levelId = LevelWeaponTable.levelId WHERE (((weaponPetTable.userpetId)=" & attacker & ") AND ((LevelWeaponTable.levelName) like 'Assault Weapons'));",conn %>
   <%=weapon("weaponName")%>
<% hg = 1 if not weapon.eof then while not weapon.eof%> <% hg = hg + 1 weapon.movenext wend end if weapon.close weapon.open "SELECT weapontable.weaponName,weapontable.weaponid FROM (weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId) INNER JOIN LevelWeaponTable ON weapontable.levelId = LevelWeaponTable.levelId WHERE (((weaponPetTable.userpetId)=" & attacker & ") AND ((LevelWeaponTable.levelName) like 'Hand Weapons'));",conn %>
   <%=weapon("weaponName")%>
<% aw = 1 if not weapon.eof then while not weapon.eof%> <% aw = aw + 1 weapon.movenext wend end if weapon.close weapon.open "SELECT weapontable.weaponName,weapontable.weaponid FROM (weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId) INNER JOIN LevelWeaponTable ON weapontable.levelId = LevelWeaponTable.levelId WHERE (((weaponPetTable.userpetId)=" & attacker& ") AND ((LevelWeaponTable.levelName) like 'Heavy Artillary'));",conn %>
   <%=weapon("weaponName")%>
<% ed = 1 if not weapon.eof then%> <%while not weapon.eof%> <% ed = ed + 1 weapon.movenext wend end if weapon.close weapon.open "SELECT weapontable.weaponName,weapontable.weaponid FROM (weaponPetTable INNER JOIN weapontable ON weaponPetTable.weaponId = weapontable.weaponId) INNER JOIN LevelWeaponTable ON weapontable.levelId = LevelWeaponTable.levelId WHERE (((weaponPetTable.userpetId)=" & attacker& ") AND ((LevelWeaponTable.levelName) like 'Explosive Devices'));",conn %>
   <%=weapon("weaponName")%>
<% ha =1 if not weapon.eof then while not weapon.eof%> <% ha = ha + 1 weapon.movenext wend end if weapon.close %>
   <%=weapon("weaponName")%>
 
Select Where to attack(1 Place)
Head
Body
Legs


INSTRUCTIONS

First select your pet from the pulldown menu in the middle. Once selected, the current weapons that your pet has are located in the box to the right. To browse through the weapons of a certain weapon level, simply click on the text or the graphic for that weapon level. In order to buy weapons from different weapon levels, your pet must first own every weapon in the previous weapon levels. So in order to buy level 2 weapons, your pet would need to own all level 1 weapons. Each pet can only own 1 of every weapon.

Check back often as new weapons are added regularly!!!

<% if not session("petitemid")="" then set rsp =Server.CreateObject("adodb.recordset") rsp.open "SELECT UserPetTable.strength,UserPetTable.userpetName, PetTable.petName, UserPetTable.energylevel, PetTable.smallimg FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userPetId)=" & session("petitemid") & "));",conn if not rsp.eof then %> <%end if end if %>
" width="34" height="34">
Pet Name <%=rsp("userpetname")%>
Pet Type <%=rsp("petname")%>
Pet Strength <%=rsp("strength")%>
No. of weapons <%set rspp = Server.CreateObject("ADODB.RECORDSET") rspp.open "select count(weaponId) as countofweapon from weaponpettable where userpetid="&session("petselected"),conn if rspp("countofweapon") = "" then Response.Write("0") else Response.Write(rspp("countofweapon")) end if %>
Energy Level <%=rsp("energylevel")%>
 
<%set rsat = Server.CreateObject("ADODB.RECORDSET") rsat.open "select * from livefight where fightid="&session("fightid") & " and player1 = " & attacker,conn if not rsat.eof then weaponid = rsat("p1attack") set weapo = Server.CreateObject("ADODB.RECORDSET") weapo.open "select * from weapontable where weaponid = " & weaponid,conn else set rsat = Server.CreateObject("ADODB.RECORDSET") rsat.open "select * from livefight where fightid="&session("fightid") & " and player2 = " & attacker,conn if not rsat.eof then weaponid = rsat("p2attack") set weapo = Server.CreateObject("ADODB.RECORDSET") weapo.open "select * from weapontable where weaponid = " & weaponid,conn else Novalue = 1 end if end if %>
<%if not weapo.eof then %> " width="34" height="34"> <%else%> NO img avaialable <%end if%>
Weapon Name <%if not weapo.eof then %><%=weapo("weaponname")%> <%else%> NONE <%end if%>
 
<% session("attacker") = attacker session("defender") = defender %>