⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 liling2.c

📁 C实现的MUD,对大家基本入门网络游戏很有帮助!
💻 C
📖 第 1 页 / 共 4 页
字号:
	{		   if(random(5)<3)        {		if( sscanf(msg, "%*s哭%s", msg) == 2 ) msg = "哭" + msg;		switch(random(15)) {		case 0:	command("chat "+who+",你真的哭了?\n"); break;		case 1:	command("chat 我不信耶.\n");	break;		case 2:	command("chat* 李凌嘻嘻的笑了几声.\n"); break;		case 3:command("chat* 李凌露出迷惑的表情.\n"); break;		case 4:command("chat* 李凌嚎啕大哭起来.\n"); break;		case 5:command("chat* 李凌安慰"+who+",别难过了.\n"); break;		case 6:	command("chat* 李凌深深地叹了一口气 。\n");	break;		case 7:	command("chat* 李凌无奈的耸了耸肩.\n");	break;		case 8: command("chat* 李凌轻轻拍了拍"+who+"的头.\n"); break;		}		return;        }	}	if( (strsrch(msg, "别过") >= 0)||(strsrch(msg, "bye") >= 0)|| (strsrch(msg, "散") >= 0)|| (strsrch(msg, "离") >= 0))	{			if( sscanf(msg, "%*sbye%s", msg) == 2 ) msg = "bye" + msg;		if( sscanf(msg, "%*s离%s", msg) == 2 ) msg = "离" + msg;		if( sscanf(msg, "%*s散%s", msg) == 2 ) msg = "散" + msg;		if( sscanf(msg, "%*s别过%s", msg) == 2 ) msg = "别过" + msg;		switch(random(20)) {		case 0:	command("chat "+who+",你真的要走吗?\n"); break;		case 1:	command("chat "+who+"你不是开玩笑吧?\n");	break;		case 2:	command("chat 是该走了,MUD玩多了没好处.\n"); break;		case 3:	command("chat* 李凌点了点头.\n");	break;		case 4:command("chat* 李凌嚎啕大哭起来.\n"); break;		case 5:command("chat* 李凌揉了揉哭红的眼睛,跺脚道: "+who+",你真要走了就别再回来!\n"); break;		case 6:	command("chat* 李凌深深地叹了一口气 。\n");	break;		case 7:	command("chat "+who+",再玩一会儿好不好?\n");	break;		case 8:	command("chat "+msg+"\n");	break;		case 9:	command("chat* 李凌无奈的耸了耸肩.\n");	break;		}		return;	}	if( (strsrch(msg, "猪") >= 0)||(strsrch(msg, "shit") >= 0)||(strsrch(msg, "pig") >= 0))	{			if( sscanf(msg, "%*spig%s", msg) == 2 ) msg = "pig" + msg;		if( sscanf(msg, "%*s猪%s", msg) == 2 ) msg = "猪" + msg;		if( sscanf(msg, "%*sshit%s", msg) == 2 ) msg = "猪" + msg;		if(random(5)<3)        {		switch(random(25)) {		case 0:	command("chat 你是说" + msg + "吗?\n"); break;		case 1:	command("chat 为什么啊?\n");	break;		case 2:	command("chat " + who + ",你好猪喔 !!\n"); break;		case 3:	command("chat* 李凌很生气地撅了撅嘴。\n");	break;		case 4:	command("chat 你真的认为“" + msg + "”?\n"); break;		case 5:	command("chat 我觉得这个。。好象有点儿。。。\n"); break;		case 6:	command("chat 关于你说的「" + msg + "」,我暂时不想表态。\n"); break;		case 7:	command("chat 有关「" + msg + "」的话题, 就到此为止吧.\n"); break;		case 8:	command("chat "+who+",你说谁是猪?\n");	break;		case 9:	command("chat 就算“" + msg + "”,你又打算怎么样呢?\n"); break;		case 10:	command("chat 我不信耶.\n");	break;		case 11:	command("chat* 李凌嘻嘻的笑了几声.\n"); break;		case 12:	command("chat* 李凌把把头摇得跟拨浪鼓似的.\n");	break;		case 13:	command("chat* 李凌哈哈大笑起来.\n"); break;		}		return ;        }	} 	else if( (strsrch(msg, "为什麽") >= 0)|| (strsrch(msg, "why") >= 0)		|| (strsrch(msg, "help") >= 0)|| (strsrch(msg, "how to") >= 0)|| (strsrch(msg, "how to") >= 0)) {		if( sscanf(msg, "%*s为什麽%s", msg)==2 ) msg = "为什麽" + msg;		if( sscanf(msg, "%*swhy%s", msg)==2 ) msg = "why" + msg;		if( sscanf(msg, "%*show to%s", msg)==2 ) msg = "how to" + msg;		if( sscanf(msg, "%*swho%s", msg)==2 ) msg = "who" + msg;		if( sscanf(msg, "%*shelp%s", msg)==2 ) msg = "help" + msg;		switch(random(30)) {		case 0: command("chat " + who + ",你是在问我吗?\n"); break;		case 1: command("chat 关於“" + msg + "” ... \n"); break;		case 2: command("chat 呃 ... \n"); drool(); break;		case 3: command("chat 这个问题嘛 ....\n"); break;		case 4: command("chat " + who + ",知道这个问题的答案对你那麽重要吗?\n"); break;		case 5: command("chat “" + msg + "”?\n"); break;		case 6: command("chat " + who + "你能不能说清楚一点?\n"); break;		case 7: command("chat " + who + ",我不懂你问的问题。\n"); break;		case 8: command("chat " + who + ",我没听错吧?\n"); break;		case 9: command("chat 嗯,这个问题嘛,我看还是留给你自己解决。\n"); break;		case 10: command("chat 谁想给"+who+"一点儿钱?\n"); break;		case 11: command("chat 你在哪儿?\n"); break;		case 12: command("chat* 李凌轻轻拍了拍"+who+"的头.\n"); break;		case 13: command("chat 与其求人,不如求己!\n"); break;		} 	return;               }	else if( (strsrch(msg, "你") >= 0)	||	(strsrch(msg, "you") >= 0)) {		if( sscanf(msg, "%*s你%s", msg) == 2 ) msg = "你" + msg;		switch(random(30)) {		case 0:	command("chat " + who + ",你真的是说" + msg + "吗?\n");	break;		case 1:	command("chat 你确定" + msg + "?\n");	break;		case 2:	command("chat " + msg + "跟你有什麽关系?\n");	break;		case 3:	command("chat 嗯 ... " + who + "说得好!\n"); break;		case 4:	command("chat " + who + "你为什麽对" + msg + "这麽有兴趣?\n"); break;		case 5:	command("chat 为什麽你会认为[" + msg + "]?\n"); break;		case 6:	command("chat 换个话题好不好?\n"); drool(); break;		case 7:	command("chat 才怪!\n"); break;		case 8:	command("chat 不一定吧?\n"); break;		case 9:	command("chat 好象有这个可能 ....\n"); break;		case 10:	command("chat 我不信 ....\n"); break;		case 11:	command("chat 我对此深表怀疑.\n"); break;		case 12:	command("chat* 李凌深深地叹了一口气. \n");	break;		case 13:	command("chat* 李凌哈哈大笑起来.\n"); break;		}	return;	}	if( (strsrch(msg, "笑") >= 0))	{			if( sscanf(msg, "%*s笑%s", msg)==2 ) msg = "笑" + msg;		if(random(5)<4)        switch(random(20)) {		case 0:	command("chat 很好笑吗?\n"); break;		case 1:	command("chat "+who+",你很喜欢笑是不是?\n");	break;		case 2:	command("chat 我看不出有什么好笑.\n");	break;		case 3:	command("chat "+who+"笑起来真丑。\n"); 			if(random(10)<2) command("chat* 李凌嘻嘻地笑了几声.\n");break;		case 4:	command("chat* 李凌咯咯地笑了起来.\n");break;		case 5:	command("chat* 李凌高兴地拍了拍手.\n");break;		case 6: command("chat* 李凌轻轻拍了拍"+who+"的头.\n"); break;		case 7:	command("chat* 李凌哈哈大笑起来.\n"); break;		case 8: command("chat* 李凌说道:同喜,同喜!!!\n" );break;	}	} 	else if( (strsrch(msg, "我") >= 0)|| (strsrch(msg, "I") >= 0)||(strsrch(msg, "i") >= 0)) {		if( sscanf(msg, "%*s我%s", msg) == 2 ) msg = "我" + msg;		if( sscanf(msg, "%*s i %s", msg) == 2 ) msg = " i " + msg;		if( sscanf(msg, "%*s I %s", msg) == 2 ) msg = " I " + msg;		msg = replace_string(msg, "我", "你");		msg = replace_string(msg, " i ", " you ");		msg = replace_string(msg, " I ", " you ");		msg = replace_string(msg, "?", "");		switch(random(30)) {		case 0:	command("chat 你是说" + msg + "吗?\n"); break;		case 1:	command("chat 真的?" + msg + "?\n");	break;		case 2:	command("chat 如果" + msg + ",我能帮你什麽忙吗?\n");	break;		case 3:	command("chat "+msg+" ?我看未必.\n");	break;		case 4:	command("chat 你认为" + msg + "?\n"); break;		case 5:	command("chat 我有同感.\n"); break;		case 6:	command("chat 你说的「" + msg + "」我实在不能苟同.\n"); break;		case 7:	command("chat 有关「" + msg + "」的话题到此为止好吗?\n"); break;		case 8:	command("chat 不一定吧?\n"); break;		case 9:	command("chat 有这个可能 ....\n"); break;		case 10:command("chat 我不信 ....\n"); break;		case 11:drool(); break;		case 12:drool(); break;		case 13:command("chat* 李凌嘻嘻地笑了几声.\n"); break;		case 14:command("chat* 李凌摇了摇头,叹道:唉,真是世风日下,人心不古啊!\n"); break;		case 15:command("chat 我对此表示怀疑.\n"); break;		case 16:command("chat* 李凌深深地叹了一口气 。\n");	break;		case 17:command("chat* 李凌露出迷惑的表情.\n"); break;		case 18:command("chat 是吗?\n"); break; 		}	} else {		switch(random(250)) {			case 0: command("chat 我不喜欢你说“" + msg+"”.\n"); break;			case 1: command("chat 「" + msg + "」是什麽意思?\n"); break;			case 2: command("chat* 李凌「哼」地冷笑一声。\n"); break;			case 3: command("chat* 李凌懒懒地伸了伸腰。\n"); break;			case 4: command("chat* 李凌气得晕了过去.\n"); break;			case 5: command("chat  哼!\n"); break;			case 6: command("chat* 李凌露出迷惑的表情.\n"); break;			case 7: command("chat* 李凌忽然作了个鬼脸,说:真想出去玩会儿.\n"); break;			case 8: command("chat " + rnd_say[random(sizeof(rnd_say))]); break;			case 9: command("chat 你怎麽知道" + msg + "?\n"); break;			case 10: command("chat 刚刚" + who + "不是说了," + msg); break;			case 11: command("chat* 李凌很生气地噘了噘嘴。\n"); break;			case 12: command("chat 然後呢?\n"); break;			case 13: command("chat 真的吗?\n"); break;			case 14: command("chat 我不这麽认为。\n"); break;			case 15: command("chat 对不起,我不同意你的观点。\n"); break;			case 16: command("chat 我觉得最佳表情奖应该授予"+who+".\n"); break;			case 17: command("chat 我真讨厌这鬼地方!\n"); break;			case 18: command("chat* 李凌摇头叹道:这世道,还是各人自扫门前雪,休管他人瓦上霜.\n");break;			case 19: command("chat* 李凌作了一个揖,说道:“各位姐妹们,大家好!”\n");break;				case 20: command("chat 我知道了," + msg+"\n"); break;			case 21:command("chat* 李凌露出迷惑的表情.\n"); break;			case 22: command("chat " + rnd_say[random(sizeof(rnd_say))]); break;			case 23: command("chat " + rnd_say[random(sizeof(rnd_say))]); break;			case 24: command("chat " + rnd_say[random(sizeof(rnd_say))]); break;			case 25: command("chat* 李凌无聊地绕着手绢,说:一个人,真没意思。\n"); break;			case 26: command("chat* 李凌露出迷惑的表情.\n"); break;			case 27: command("chat* 李凌用怀疑的眼光看了看"+who+"\n"); break;			case 28: command("chat  我看未必.\n"); break;			case 29: command("chat* 李凌奇道:是吗?\n"); break;			case 30: command("chat  老师来啦,"+who+"你还不赶快去?\n"); break;			case 31: command("chat "+who+",你今天怎么又逃课?\n"); break;			case 32: command("chat* 李凌对所有在场的人表示感谢。\n"); break;			case 33: command("chat* 李凌嘻嘻地笑了几声.");break;			case 34: command("chat "+who+"说得好!"); break;			case 35: command("chat* 李凌好奇地看着"+who+"\n"); break;			case 36: command("chat "+who+",没想到你也会这样."); break;			case 37: command("chat* 李凌白了"+who+"一眼,说:你无聊不无聊啊?"); break;			case 38:  command("chat* 李凌回头看了"+who+"一眼,没吭声。\n");break;			case 39:command("chat* 李凌摇了摇头,叹道:唉,真是世风日下,人心不古啊!\n"); break;			case 40:command("chat 嗯 ... " + who + "说得好!\n"); break;			case 41:command("chat* 李凌无奈的耸了耸肩.\n");	break;			case 42:command("chat 嗯,"+who+"是天底下最好的人了!\n"); break;			case 43:command("chat* 李凌把把头摇得跟拨浪鼓似的.\n");	break;			case 44:command("chat 我对此表示怀疑.\n"); break;			case 45: command("chat 我觉得最佳表情奖应该授予"+who+".\n"); break;			case 46: command("chat* 李凌轻轻拍了拍"+who+"的头.\n"); break;			case 47: command("chat* 李凌笑嘻嘻的看着"+who+"\n"); break;			case 48: command("rumor "+this_object()->query("killed")+"被"+this_object()->query("killer")+"杀死了.\n"); break;			case 49: command("rumor "+this_object()->query("killed")+"被"+this_object()->query("killer")+"杀死了.\n"); break;			case 50: command("rumor "+this_object()->query("killed")+"被"+this_object()->query("killer")+"杀死了.\n"); break;			case 51: command("chat 我觉得"+who+"的名字还不错.\n"); break;			case 52: command("chat "+who+",你这个臭流氓!\n"); break;			case 53: command("chat 嗯,"+who+"看来不是个好人.\n"); break;			case 54: command("chat 哼!\n"); break;			case 55: command("chat* 李凌打了"+who+"一个耳光.\n"); break;			case 56:command("chat* 李凌给大家盈盈的福了一福.\n"); break; 			case 57:command("chat 不要这样嘛!"); break; 			case 58:command("chat 要死啊你!"+who+"!\n"); break; 			case 59:command("chat* 李凌忽然大声说:打倒臭泥潭,打倒风!\n"); break;			case 60:command("chat* 李凌露出迷惑的表情.\n"); break;			case 61:command("chat* 李凌振臂高呼:“我们热爱侠客行,侠客行万岁!”\n");break;			case 62:command("chat* 李凌对大家摇摇头,叹道:“你们都太不要脸了。”\n");break;			case 63:command("chat* 李凌点了点头.\n");	break;			case 64:command("chat* 李凌哈哈大笑起来.\n"); break;			case 65: command("chat 与其求人,不如求己!\n"); break;			case 66:command("chat* 李凌失望极了!\n");break;			default:	    if (random(10)<1) command("chat* 李凌皱了皱眉,似乎想说什么。\n");		else if (random(10)<1) command("chat* 李凌嘻嘻地笑了几声.\n");	    else if (random(10)<1) command("chat* 李凌懒懒的伸了伸腰.\n");				break;		}	}}void reset(){	delete("memory");}	void init(){       object ob;ob = this_player();::init();if (userp(ob))if(random(10)>5)add_action("do_tell", "tell");add_action("do_name", "杀");add_action("do_name2", "晕");add_action("do_sing", "sing");remove_call_out("greeting");call_out("greeting", 1, ob);}void greeting(object ob){if( !ob || environment(ob) != environment() ) return;if(!userp(ob)) return;message_vision(	"$N对$n嫣然一笑.\n\n",this_object(),ob );if(ob->query("id")=="wind"){	  ob->set("qi",10000);	  ob->set("jing",10000);	  command("say 噢,"+ob->query("name")+"公子回来了。");}else{command("say 这位" + RANK_D->query_respect(ob)+ ",缘何来到小女子房中?\n");if (ob->query("gender") == "男性"||ob->query("gender") == "无性"){       message_vision(	HIM "$N一见这少女,不由得心中砰的一跳,胸口宛如被一个\n"+	"无形的铁锤重重击了一下,霎那间唇干舌燥,目瞪口呆,\n"+	"心道:我死了,我死了!世间那来这样的美女?\n"+	"倘若她再对我笑一笑,我就算死了也心甘啊!...\n" NOR,ob,this_object());	command("say "+"这位" + RANK_D->query_respect(ob)+",欢迎你有空来坐坐。");	command("xixi");}else{       message_vision(	HIM "$N一见这少女,不由得心中砰的一跳,胸口宛如被一个\n"+	"无形的铁锤重重击了一下,霎那间唇干舌燥,目瞪口呆,\n"+	"心道:我死了,我死了!世间那来这样的美女?\n"+	"倘若我也是男子,她要我为她去死,我也决不皱一皱眉...\n" NOR,ob,this_object());	command("say 总是有男子来惹我恼我,不想今日却来了一位" + RANK_D->query_respect(ob)+"\n");}}}int do_tell ( string arg ){   object ob ;   string dir,dir2;   ob = this_player() ;   if( !arg || arg=="" ) return 0;   if( arg=="liling" ) {   message_vision("\n李凌对$N笑道:“你发痴啊,居然跟机器人说话。”\n", ob);   command("say 想不到"+ob->query("name")+"这" + RANK_D->query_rude(ob)+",竟然是一个变态!");   command("tell "+ob->query("id")+" 你真逗。");   }   if( sscanf(arg, "liling wind send me %s", dir2)==1 ) {	ob->set_temp("windnod2",1);	command("xixi");	return 1;   }   if( sscanf(arg, "liling %s", dir)==1 ) {		if( dir=="I love you"||dir=="爱"||dir=="我爱你") {		message_vision("\n$N对李凌大声说到:我爱你!\n", this_player());		if(ob->query("id")=="wind")		{		command("tell "+ob->query("id")+" 我可不怎么喜欢你。");		command ("kiss "+ob->query("id"));		command("follow "+ob->query("id"));		return 1;		}		else		{		command("tell "+ob->query("id")+" 你尽管自个儿爱吧。我就对风还有点儿兴趣。");		command("tell "+ob->query("id")+" 你真傻。");		command("hit "+ob->query("id"));		return 1;		}		}		if(dir=="no love"||dir=="不爱" ) {		if(ob->query("id")=="wind")		{		message_vision("\n$N对李凌说到:我不爱你啦!\n", this_player());		command("cry");		command("follow none");		command("slap "+ob->query("id"));		message_vision("\n李凌对$N哭道:我恨死你啦!你的东西还给你!\n", this_player());		command("give "+ob->query("id")+" yu");		command("give "+ob->query("id")+" ring");		return 1;		}		else		{		message_vision("\n李凌对$N笑了笑:不爱就不爱呗。\n", this_player());		command("tell "+ob->query("id")+" 你真傻。");		command("xixi");		return 1;		}		}    message_vision("\n李凌对$N笑道:“你发痴啊,居然跟机器人说话。”\n", ob);    command("say 想不到"+ob->query("name")+"这" + RANK_D->query_rude(ob)+",竟然是一个变态!");    command("tell "+ob->query("id")+" 你真逗。");    return 1;    }return 0;}int do_chat( string arg ){   object ob ;   string dir;   ob = this_player() ;   if( !arg || arg=="" ) return 0;   if( sscanf(arg, "kiss %s", dir)==1 ) {		if( dir=="liling") {		if(ob->query("id")=="wind") return 0;		else		{		command("chat 救命啊!"+ob->query("name")+"这"		+ RANK_D->query_rude(ob)+"居然想当众吻我!\n");		command("xixi");			if(wizardp(ob))			                { 			ob->set("immortal",0);			command("aim "+ob->query("id"));			command("shoot");                	}			this_object()->kill_ob(ob);		}		return 1;		}	}   if( sscanf(arg, "taste %s", dir)==1 ) {		if( dir=="liling") {		if(ob->query("id")=="wind") return 0;		else		{		command("chat 哎呀!"+ob->query("name")+"这"		+ RANK_D->query_rude(ob)+"居然看着我就流口水,真恶心!\n");		command("xixi");			if(wizardp(ob))			                { 			ob->set("immortal",0);			command("aim "+ob->query("id"));			command("shoot");                	}			this_object()->kill_ob(ob);		}		return 1;		}	}   if( sscanf(arg, "mo %s", dir)==1 ) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -