\n");
top.infofrminited=true;
showinfo("");
}
//send_msg("look_b");
}
function documentclick() {
if (event.button==2) {
s=prompt("请输入命令:","在此键入命令");
if((s!="") && (s!="在此键入命令") && (s!=null)) send_msg(s);
}
}
document.onmousedown=documentclick;
function clearsay() {
showinfo(""+document.frmCommand.tmpcmd.value+"
");
document.frmCommand.command.value = document.frmCommand.tmpcmd.value;
if (document.frmCommand.command.value=="") {
alert('你总得说点什么吧?');
return false;
}
//document.frmCommand.tmpcmd.value = "";
document.frmCommand.tmpcmd.select();
document.frmCommand.tmpcmd.focus();
return true;
}
function sendmsg(cmd) {send_msg(cmd);return false;}
function send_msg(cmd){
hidemenu();
cmd="/"+cmd;
document.frmCommand.command.value = cmd;
document.frmCommand.submit();
document.frmCommand.tmpcmd.focus();
}
function movehere() {
hidemenu();
x=event.clientX + document.body.scrollLeft-document.all.main.style.pixelLeft-10;
y=event.clientY + document.body.scrollTop-document.all.main.style.pixelTop-50;
move(selfname,x,y);
send_msg("move "+x+" "+y);
}
var actorReady=false;
var largestActorNo=0;
function printActor(No,name) {
document.write("
");
document.write("
");
document.write("");
document.write(" ");
document.write(" ");
document.write(" ");
document.write("");
document.write(" | ");
document.write("
");
document.write("");
document.write("  | ");
document.write("
");
document.write("");
document.write(" | "+name+" | ");
document.write("
");
document.write("
");
document.write("
");
largestActorNo=largestActorNo>No?largestActorNo:No;
dic[No]=name;
}
function selActor(name) {
if(!actorReady){
printActor(largestActorNo+1,name);
largestActorNo++;
}
for(i=0; i=4) dic[actNo]="";
else setTimeout("deadani(\""+name+"\","+(times+1)+")",300);
}
function clearActor() {
deadname="";
cleared=true;
for(i=0; i0) {mx=(dx>0)?10:-10;my=dy/(Math.abs(dx)/10);}
else {my=(dy>0)?10:-10;mx=dx*10/Math.abs(dy);}
if(((mx==0)&&(dx!=0))||(Math.abs(mx)>Math.abs(dx))) mx=dx;
if(((my==0)&&(dy!=0))||(Math.abs(my)>Math.abs(dy))) my=dy;
act.pixelLeft+=mx;
act.pixelTop+=my;
setTimeout("moveOne("+No+")",2);
}
function say(name,word) {
selActor(name);
if(name!="") {
if(wa!="") {
if(wb!="") {
wc.innerHTML=wb.innerHTML;
wc.style.color=wb.style.color;
}
wb.innerHTML=wa.innerHTML;
wb.style.color=wa.style.color;
}
wa.innerHTML=word;
wa.style.color="#000000";
showinfo("【"+name+"】"+word+"
");
DoDimWord=true;
}
else {
showinfo(word+"
");
}
}
function dimword() {
if(DoDimWord) {
for(var i=0; i=pic.length) return;
selActor(name);
actimg.src=pic[No].src;
imgno[actNo]=No;
chedpic=true;
}
function near(n1,n2) {
selActor(n2);
if(actNo>=length) return;
var x=actor.pixelLeft;
var y=actor.pixelTop;
selActor(n1);
if(actor.pixelLeft=length) return;
var x=actor.pixelLeft;
var y=actor.pixelTop;
var dir=near(n1,n2);
var pic_no=imgno[actNo];
if(imgno[actNo]<4) {
if(dir==1) chpic(n1,3);
else chpic(n1,8)
}
else if((imgno[actNo]>=4)&&(imgno[actNo]<=7)) {
if(dir==1) chpic(n1,7);
else chpic(n1,9)
}
chedpic=false;
setTimeout("move_chpic(\""+n1+"\","+x+","+y+","+pic_no+")",400);
}
function move_chpic(name,x,y,pic_no) {
move(name,x,y,1);
if(!chedpic) chpic(name,pic_no);
}
var infofrmtext="";
function showinfo(info) {
if(top.infofrminited) {
document.frames["ifrmmsg"].document.write(infofrmtext+info);
infofrmtext="";
}
else {
infofrmtext+=info;
}
}
function switchscroll() {
if(!top.infofrminited) return;
if(document.all.scrlbtn.innerHTML=="8") {
document.frames["ifrmmsg"].scrollOn();
document.all.scrlbtn.innerHTML="x";
}
else {
document.frames["ifrmmsg"].scrollOff();
document.all.scrlbtn.innerHTML="8";
}
}
function showinfo2(info) {
document.frames["frmoth"].showinfo(info);
}
var roomfrmloaded=false;
var roomfrmtitle="";
var roomfrmtext="Loading......";
function showroom(title,description) {
if(roomfrmloaded) {
document.all.roomtitle.innerHTML=title;
showinfo("你来到了"+title+"
");
document.frames["ifrmroom"].showroom(description);
//document.all.roomdescription.innerHTML=description;
}
else {
roomfrmtitle=title;
roomfrmtext=description;
}
}
function changeall(qx,mqx,jl,mjl,nl,mnl,sw,ys,jy,qn) {
document.frames["frmhp"].changeall(qx,mqx,jl,mjl,nl,mnl,sw,ys,jy,qn);
}
function cbClick(No) {
ctimesnow[No]=1;
doScript(No,0);
}
function doScript(No,line) {
if((cs[No][line]=="#end")||(cs[No][line]=="")||(cs[No][line]==null)) {
if(ctimesnow[No]>=ctimes[No]) return;
else {
ctimesnow[No]++;
doScript(No,0);
return;
}
}
send_msg(cs[No][line]);
setTimeout("doScript("+No+","+(line+1)+")",500);
}
function show_map(layerid){
if(layerid!="mudmap") hidden_map("mudmap");
if(layerid!="config") hidden_map("config");
if(layerid!="message") hidden_map("message");
eval(layerid+".style.visibility='';");
}
function showhp() {
document.all.oth.style.display="none";
document.all.hp.style.display="";
}
function showoth(cmd) {
document.all.hp.style.display="none";
document.frames["frmoth"].showinfo(" Loading....");
document.all.oth.style.display="";
send_msg(cmd);
}
function hidden_map(layerid){
eval(layerid+".style.visibility='hidden';");
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i