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

📄 teamjob.c

📁 C实现的MUD,对大家基本入门网络游戏很有帮助!
💻 C
字号:
#include <ansi.h>int ckiller=4;mixed names = ({        ({        "少林广场","王府路","华藏庵","有所不为轩","紫霄宫大门",        "天微堂","日月坪","大雪山山谷","六和塔","全真教大门",         "墓门","桃花山庄正厅","神龙教大厅","独尊厅","星宿海",         "雪山寺山门","一品堂大院","昆仑派山门","燕子坞","五指堂",         "朱雀外门","青龙外门","白虎外门","玄武外门","天安门",        "扬州武馆","福威镖局","玄妙观","灵隐寺","泉州南门",        "灵州南门","诸葛亮殿","烟雨楼","南阳城","佛山南门",                        "蛇骨塔","长安乐坊","衡阳西街","喜州城","葛鲁城",         "伊犁","山海关","老龙头","长白天池","天山脚下",       "丽春院","涌泉寺","听雨轩","五老峰","紫金城",        "松风观","终南山脚","抱子岩","白马潭","升仙坊",                        "嘉应门","玄妙观","峻极禅院","侠义厅","萧家桥",         }),        });string ask_jianxi(){     object guo,ob;      object *team;	  int i=0,count=0,minexp,maxexp;int ckiller;      string where;	  guo =this_object();	  ob=this_player();	  	  if (ob->query_condition("mjb2_busy")) return "我没有收到任何消息。";	        //too low exp      if(ob->query("combat_exp")<1000000)      return  "你的功夫太差了。不要自寻死路!";//too low exp      team=ob->query_team();      count=sizeof(team);	 // write("\n"+sprintf("%d",count));	  if(count<=1)      return "就你一个人?"; //too few people      if(count>=5)	  return "此事不宜张扬。"; //too many people	  minexp=team[0]->query("combat_exp");	  maxexp=minexp;if (ob->query_condition("mjb2_busy")) return "我没有收到任何消息。";      	  for(i=1;i<count;i++)      { if(team[i]!=0)	  { if(team[i]->query("combat_exp")<minexp)	    minexp=team[i]->query("combat_exp");		if(team[i]->query("combat_exp")>maxexp)        maxexp=team[i]->query("combat_exp");	  }	  }	  if ((maxexp-minexp)>3000000)      return "你们的武功相差太悬殊。";//exp too far     //check ok      	  where=names[0][random(60)];	  guo->apply_condition("mjb_busy",30);	  ob->set_temp("team_count",count);ob->set_temp("tjob",where);	  ob->apply_condition("mjb_busy",60);ob->apply_condition("mjb2_busy",15);	  for(i=0;i<count;i++)	  team[i]->apply_condition("mjb_busy",60);ckiller=4;	  for(i=100;i*i*i/10<=maxexp;i++);         ob->apply_condition("mptjob",23);	  return    "我刚得到消息,有一伙别派弟子与我派作对。派奸细偷去了我派的机要文件\n"+		        "你们赶快去"+where+"设防阻截,把他们全部消灭。抢到文件后就地销毁(xiaohui)。\n"+			    "肯定会有不少别派弟子接应他,多加小心。"; }

⌨️ 快捷键说明

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