<%if session("userid") = "" then response.Redirect("login.asp") End if %> <% set rs = Server.CreateObject("Adodb.Recordset") rs.open "select cityid,cityno from city order by cityid",conn %> Select a City
 
<% chkmenu=9 %>
<%if Request("pet") = 1 then Response.Write("Select a Pet First...") end if rs.movenext %> <%if Request("level") = 1 then Response.Write("Your pet does not have enough energy to move to that city...") end if %>
">
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
">
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
"> <%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
<% set rs1 = server.CreateObject("Adodb.recordset") rs1.open "SELECT userPetTable.userPetId, userPetTable.userid, userPetTable.petId, userPetTable.userpetName FROM userPetTable WHERE (((userPetTable.userid)=" & session("userid") & ") AND ((userPetTable.energylevel)>0) AND ((userPetTable.status)='Grown Up')) ORDER BY userPetTable.userpetName;",conn if rs1.eof then Response.Redirect("pets.asp?p=1") end if %> <%if request("flag") = 2 then session("petitemid") = request("selectedpet") end if%> <%if session("petitemid")= "" then%> <%if not rs1.eof then%> <%session("petitemid") = rs1("userpetid") sqlstr = "select energylevel,cityid from userpettable where energylevel > 0 and userpetid = " & rs1("userpetid") end if else sqlstr = "select energylevel,cityid from userpettable where energylevel > 0 and userpetid = " & session("petitemid") end if set rs2 = Server.CreateObject("adodb.recordset") rs2.open sqlstr,conn if not rs2.eof then session("energylevel") = rs2("energylevel") set rscity = Server.CreateObject("Adodb.Recordset") rscity.open "select cityno from city where cityid = " & rs2("cityid"),conn session ("city") = rscity("cityno") end if rs2.close dim ppid if session("petitemid")= "" then%> <%if not rs1.eof then%> <%ppid=rs1("petid") %> <%else%> ppid=0 <%end if%> <%else%> <%ppid=session("petitemid")%> <%end if%> <%response.Write("") %> Select a Pet
<%if not session("petitemid") = "" then rs1.open "SELECT PetTable.petId,PetTable.pet_path FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userPetId)=" & session("petitemid") & ") and energylevel > 0);",conn if not rs1.eof then %> " width="100" height="100" > <% end if end if%>
<% set cityinn = Server.CreateObject("Adodb.recordset") cityinn.open "SELECT City.CityName, UserPetTable.cityid FROM City INNER JOIN UserPetTable ON City.cityid = UserPetTable.cityid WHERE (((UserPetTable.userpetid)=" & session("petitemid") & "));",conn if not cityinn.eof then%> Pet is currently in:
<%=cityinn("cityname")%> <%end if%>
<%rs.movenext%>
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close %> ">
"> <%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
">
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
"> <%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close rs.movenext %>
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close %>
">
<%rs.movenext%>
<%set rspets = Server.CreateObject("Adodb.Recordset") rspets.open "SELECT PetTable.smallimg, PetTable.petId, UserPetTable.status FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userid)="&session("userid")&") AND ((UserPetTable.cityid)="& rs("cityid") &") AND (Not (UserPetTable.status)='Run Away'));",conn for i=0 to 1 if not rspets.eof then %> " > <% rspets.movenext end if next if not rspets.eof then %> ')"> <% end if rspets.close %> ">
<%rs.movenext%>




INSTRUCTIONS

First select your pet from the pulldown menu in the middle. Once selected, the current items that your pet has are located in the box to the right. Also located to the right is the energy level of the selected pet. Every day each pet starts out with an energy level of 100. Each time the pet travels to another store, the energy level decreases. When this level reaches zero, that pet cannot travel around the stores until the next day. To travel to another store, just click on the image of that store. Each store carries the same items, the only difference being the prices of the items. Prices for each store are updated every minute and can increase or decrease. If you buy an item an wish to sell it, just find that same item in any of the stores and you will have the option to sell it back for the price in that store.

Check back often as new Mucho Items are added regularly!!!


<% set rsp =Server.CreateObject("adodb.recordset") rsp.open "SELECT 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 %>
" width="34" height="34">
Pet Name <%=rsp("userpetname")%>
Pet Type <%=rsp("petname")%>
Energy Level <%=rsp("energylevel")%>
 
<%end if%>
<%set rsi = Server.CreateObject("adodb.recordset") rsi.open "SELECT itemtable.itemName, PetItemTable.Cost, PetItemTable.quantity FROM (UserPetTable INNER JOIN PetItemTable ON UserPetTable.userPetId = PetItemTable.userpetid) INNER JOIN itemtable ON PetItemTable.itemId = itemtable.itemId WHERE (((UserPetTable.userPetId)=" & session("petitemid") & "));",conn ,adOpenStatic, adLockReadOnly if not rsi.eof then rsi.move clng(request("total"))+0,1 %>
0 <%else%> <%=request("total")%> <%end if%> " > <%for i=0 to 4 if not rsi.eof then total = total + rsi("cost") %> <% rsi.movenext end if next%>
Item Qty Cost
<%=rsi("itemname")%> <%=rsi("quantity")%> <%=rsi("cost")%>
<% set rst = Server.CreateObject("Adodb.Recordset") rst.open "SELECT sum(petitemtable.cost) as total FROM (UserPetTable INNER JOIN PetItemTable ON UserPetTable.userPetId = PetItemTable.userpetid) INNER JOIN itemtable ON PetItemTable.itemId = itemtable.itemId WHERE (((UserPetTable.userPetId)=" & session("petitemid") & "));",conn ,adOpenStatic, adLockReadOnly if not rst.eof then %> Total: <%=rst("total")%> <%end if%>
<%if rsi.recordcount > 5 then%>Back Next <%end if%> 
<%end if%>