📄 pet.js
字号:
+" <td align=left><font face=arial style='font-size:7.5pt;'><span id='mpLine_right_no' name='mpLine_right_no'>"+rightSP+"</span>/"+rightMaxSP+"</font></td>" +" </table>" +"</div>" //+"<div id='innerReader' style='padding-bottom:5px;padding-top:5px;padding-left:10px;padding-right:10px;word-break:break-all;overflow-y:scroll;height:125;width:508;background-color:#74B8C8;position: absolute; left: 3;top: 225;visibility:visible;z-index: 10;'><u>"+leftName+"</u>和<u>"+rightName+"</u>的在战斗中...<br><br></div>" +"<span id='fighter_1_hp' style='display:none;position: absolute; left: 144;top: 135;visibility:visible;z-index: 11;font-weight:bold;color:#FF0000;font-size:18pt;'></span>" +"<span id='fighter_2_hp' style='display:none;position: absolute; left: 324;top: 135;visibility:visible;z-index: 11;font-weight:bold;color:#FF0000;font-size:18pt;'></span>" +"<span id='fighter_1_status' name='fighter_1_status' style='display:none;position: absolute; left: 144;top: 100;visibility:visible;z-index: 11;color:#FF0000;font-size:9pt;'></span>" +"<span id='fighter_2_status' name='fighter_2_status' style='display:none;position: absolute; left: 324;top: 100;visibility:visible;z-index: 11;color:#FF0000;font-size:10.5pt;font-weight:bold;'></span>" ); showFightTaskImg();}function _getAddStr(num){ if (num!=0){ if(num>0){ //t="<font color=green><b> +"+num+"</b></font>"; return "+"+num+""; }else{ //t="<font color=red><b> "+num+"</b></font>"; return ""+num+""; } } return "";}function _getAddStrColor(num){ if (num!=0){ if(num>0){ return "font-weight:bold;color:green;"; }else{ return "font-weight:bold;color:red;"; } } return "hand;color:black;";}/////////////var mapWin;function openMapWin(){ mapWin=window.open('http://mfl.mop.com/static/upload_pic/05/0824/1124869294749.gif');}////////////如果isBack==true\, 不刷新伏击对象。function setRoom(r,isBack){ room=r; //addTitle(r); s_nowRoom.innerHTML=r; try{ mapWin.move(getRoom()); }catch(x){err(x);} eventOnMove();//移动事件执行 if(!isBack){ fuji = -1; }}//function setRoom(r){/// setRoom(r,false);//}function getRoom(){ return room;}function buyItem(item,path,canAmount){ if(!canAmount){ if(confirm('确认要购买 ['+item+'] ?')){ cmd("buy "+path+" 1"); } }else{ var input=prompt('请输入要购买 ['+item+'] 的数量',1); if(input!=null){ if(checkInt(input)){ if(input<1){ alert("购买数量不能小于1个!"); buyItem(item,path,canAmount); }else{ cmd("buy "+path+" "+input); } }else{ alert("请输入正确的数字!"); buyItem(item,path,canAmount); } } }}function addCM(mes){ addMessage('chatReader',mes);}function addMY(mes){ addMessage('chatMyReader',mes);}function addRM(mes){ addMessage('roomReader',mes);}function addIM(mes){ addMessage('infoReader',mes);}function addNPCC(mes){ addMessage('npcChatReader',mes);}function addNPTM(mes){ var bg=document.getElementById("renPicBG"); bg.style.display="none"; document.getElementById('npcTaskReader').style.display=""; addMessage('npcTaskReader',mes);}function _look(name){ addRM("<font color=#760080>"+name+"盯着你左瞧右看,似乎又在动什么歪脑筋了.</font><br>");}//title:startfunction changeTitle(){ try{top.document.title=theTitle;}catch(x){}}//function addTitle(s){// top.document.title=theTitle+" 【"+s+"】";//}//战斗效果function combatDisply(){ if(huaLi==true){ huaLi=false; combatDisply_d.innerHTML="关"; }else{ huaLi=true; combatDisply_d.innerHTML="开"; }}//title:endfunction reOnlineNum(s,i,userId){ try{ //onlineNum.innerHTML=s; imEvent(i,userId); }catch(x){err("reOnlineNum(s)"+x);}}//debug:startvar isDebug=false;function openDebug(){ try{ if(!isDebug){ with(document.all){ actionWin_1.width=50; actionWin_1.height=50; actionWin_2.width=50; actionWin_2.height=50; actionWin_3.width=50; actionWin_3.height=50; actionWin_my.width=50; actionWin_my.height=50; workerWin.width=50; workerWin.height=50; reWin.width=50; reWin.height=50; } isDebug=true; }else{ with(document.all){ actionWin_1.width=0; actionWin_1.height=0; actionWin_2.width=0; actionWin_2.height=0; actionWin_3.width=0; actionWin_3.height=0; actionWin_my.width=0; actionWin_my.height=0; workerWin.width=0; workerWin.height=0; reWin.width=0; reWin.height=0; } isDebug=false; } }catch(x){err("reOnlineNum(s)"+x);}}//debug:endfunction _getShowIString(arr,coinStr,aItemNum){ if (aItemNum==null || aItemNum<=0){ aItemNum=25; } var hasNum; if(arr==null){ hasNum=0; }else{ hasNum=arr.length; } var o="" //+"<font color=blue>携带道具: "+arr.length+"</font><style>.sP{font-size:10px;}</style><div align=right id='divItemBarCoin'>"+coinStr+"</div><div id='showItems' style='margin-top:4px;'><table border=0 cellpadding='0' cellspacing='0' width=100%>"; +"<font color=blue>携带道具: <b style=\"color:"+(hasNum>=aItemNum?"red":"blue")+"\">"+hasNum+"</b> /"+aItemNum+"</font><style>.sP{font-size:10px;}</style><div align=right id='divItemBarCoin' >"+coinStr+"</div><div id='showItems' style='margin-top:4px;'><table border=0 cellpadding='0' cellspacing='0' width=100%>"; //for(var i=0;i<arr.length;i++){ for(var i=0;i<hasNum;i++){ o+="<tr "; if(i%2==0){ o+="bgcolor=#E1E1E1"; } o+=" height=26 onclick=\"_toolName='"+arr[i][0]+"';_toolPath='"+arr[i][9]+"';_toolImg='"+arr[i][4]+"';_canEquip2='"+arr[i][5]+"';_canUse="+arr[i][6]+";_canEquip="+arr[i][7]+";_canFuHua="+arr[i][10]+"; _canFenJie="+arr[i][12]+";_canShow="+arr[i][13]+"; toolsBar("+arr[i][3]+",this);\" style='cursor:hand;'>" +"<td><td width=32 valign=middle align=center><img src="+arr[i][8]+"></td><td width=5></td><td><font color="+arr[i][11]+">"+arr[i][0]+"</font></td><td width=30></td>" +"<td><font color=red><b>"+arr[i][1]+"</b>"+arr[i][2]+"</font></td>" +"</tr>" ; } o+="</table></div>"; return o;}function showIHide(arr,coinStr,aItemNum){ //if(arr!=null){ var winObj=_getWin("tools"); if(winObj.style.display==""){ _openWin("tools",_getShowIString(arr,coinStr,aItemNum)); } //}else{ // addRM("<font color=red>您目前没有任何道具!</font><br>"); // offOpenWin('tools'); // return; //}}function showI(arr,coinStr,aItemNum){ //if(arr!=null){ onOpenWin(_getWin("tools")); _openWin("tools",_getShowIString(arr,coinStr,aItemNum)); //}else{ // addRM("<font color=red>您目前没有任何道具!</font><br>"); // offOpenWin('tools'); // return; //}}function showCoin(coinStr){ var winObj=_getWin("tools"); if(winObj.style.display==""){ var divObj=document.getElementById("divItemBarCoin"); try{ if (divObj){ divObj.innerHTML=coinStr; } }catch(ex){ } }}//show chat/////////////////////////function showOnChat(){ document.all.showChatButton.style.backgroundColor="#A0CAD8"; document.all.showChatButton.style.color="#3F8194"; chatReaderOut.style.display=""; showOffInfo(); showOffThing(); showOffFriend(); showOffRank();}function showOffChat(){ document.all.showChatButton.style.backgroundColor="#5AA2BA"; document.all.showChatButton.style.color="#E9F2F5"; chatReaderOut.style.display="none";}function showChat(){ if(chatReaderOut.style.display=="none"){ showOnChat(); }else{ //showOffChat(); }}/////////////////////////function showOnInfo(){ document.all.showInfoButton.style.backgroundColor="#A0CAD8"; document.all.showInfoButton.style.color="#3F8194"; infoReaderOut.style.display=""; showOffChat(); showOffThing(); showOffFriend(); showOffRank();}function showOffInfo(){ document.all.showInfoButton.style.backgroundColor="#5AA2BA"; document.all.showInfoButton.style.color="#E9F2F5"; infoReaderOut.style.display="none";}function showInfo(){ if(infoReaderOut.style.display=="none"){ showOnInfo(); }else{ //showOffInfo(); }}//////////////////////////////////////////////////function showOnThing(){ document.all.showThingButton.style.backgroundColor="#A0CAD8"; document.all.showThingButton.style.color="#3F8194"; thingReaderOut.style.display=""; showOffChat(); showOffInfo(); showOffFriend(); showOffRank();}function showOffThing(){ document.all.showThingButton.style.backgroundColor="#5AA2BA"; document.all.showThingButton.style.color="#E9F2F5"; thingReaderOut.style.display="none";}function showThing(){ if(thingReaderOut.style.display=="none"){ showOnThing(); }else{ //showOffThing(); }}//////////////////////////////////////////////////function showOnFriend(){ document.all.showFriendButton.style.backgroundColor="#A0CAD8"; document.all.showFriendButton.style.color="#3F8194"; friendReaderOut.style.display=""; showOffChat(); showOffInfo(); showOffThing(); showOffRank();}function showOffFriend(){ document.all.showFriendButton.style.backgroundColor="#5AA2BA"; document.all.showFriendButton.style.color="#E9F2F5"; friendReaderOut.style.display="none";}function showFriend(){ if(friendReaderOut.style.display=="none"){ showOnFriend(); }else{ //showOffThing(); }}//////////////////////////////////////////////////function showOnRank(){ document.all.showRankButton.style.backgroundColor="#A0CAD8"; document.all.showRankButton.style.color="#3F8194"; rankReaderOut.style.display=""; showOffChat(); showOffInfo(); showOffThing(); showOffFriend();}function showOffRank(){ document.all.showRankButton.style.backgroundColor="#5AA2BA"; document.all.showRankButton.style.color="#E9F2F5"; rankReaderOut.style.display="none";}function showRank(){ if(rankReaderOut.style.display=="none"){ showOnRank(); }else{ //showOffThing(); }}/////////////////////////function changeChatAll(c){ if(c.checked){ addMY("<font color=#EC2313>全局聊天,全部玩家都可以看到你的话 <br><b> ㊣ 频繁发表无用言论会被封掉 ㊣</b></font><br>"); selectOption(-1); setTalkTo(-1); }else{ addMY("<font color=#F16458>场景聊天模式,只有本场景的玩家可以看到你的话.</font><br>"); } getObj("chat_rank").checked=false; getObj("chat_party").checked=false;}function changeChatPrivate(c){ if(c.checked){ addMY("<font color=#34792F>私聊模式,仅你和你的谈话对象可以看到.</font><br>"); }else{ addMY("<font color=#54BA4B>取消私聊模式,别人可以看到您的话.</font><br>"); }}function changeChatRank(c){ if(c.checked){ addMY("<font color=#34792F>队伍聊天模式,仅队伍中的玩家可以看到.</font><br>"); selectOption(-1); setTalkTo(-1); }else{ addMY("<font color=#54BA4B>取消队伍聊天模式.</font><br>"); } getObj("chat_all").checked=false; getObj("chat_party").checked=false;}function changeChatParty(c){ if(c.checked){ addMY("<font color=#34792F>公会聊天模式,公会中的玩家可以看到.</font><br>"); selectOption(-1); setTalkTo(-1); }else{ addMY("<font color=#54BA4B>取消公会聊天模式.</font><br>"); } getObj("chat_all").checked=false; getObj("chat_rank").checked=false;}///////////////////////function setTalkTo(userId){ document.all("talkToId").value=userId;}function talkTo(id,name){ try{ if(id==myId){ addMY("<font color=red>对自己说话?</font><br>"); showOnChat(); return; } getObj("chatChannel").value=""; addTalkToUser(name,id); setTalkTo(id); focusMes(); }catch(x){'talkTo()'+alert(x);}}function addTalkToUser(name, id) { addOption(id,name);}function selTalkTo(){ var input=prompt('请输入交谈对象名',""); if(input!=null){ if(""==input){ alert("请输入正确的用户名!"); selTalkTo(); return; }else{ getToTalkUser(input); } }else{ //选到区域上:start setTalkTo(-1); listChatChannel="-1";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -