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

📄 ding.c

📁 C实现的MUD,对大家基本入门网络游戏很有帮助!
💻 C
📖 第 1 页 / 共 2 页
字号:
	if (!(fam = this_player()->query("family")) || fam["family_name"] != "星宿派")		return RANK_D->query_respect(this_player()) + 		"与本派素无来往,不知此话从何谈起?";	if (this_player()->query_temp("xxi5"))		return "我刚给过你这种东西了。";	ob = new("/d/xingxiu/npc/jobobj/tongbo");	ob->move(this_player());	this_player()->set_temp("xxi5",1);	return "好吧,那你就先用这个铜钹吧。这是本门必修之课";}string ask_du1(){	mapping fam; 	object ob;		if (!(fam = this_player()->query("family")) || fam["family_name"] != "星宿派")		return RANK_D->query_respect(this_player()) + 		"与本派素无来往,不知此话从何谈起?";	if (this_player()->query_skill("poison",1)<50)		return "你的毒技火候未到,用不了这种东西。";	if (query("zhen_count") < 1)		return "你来晚了,碧磷针都发完了。";	if (this_player()->query_temp("xxi1"))		return "我刚给过你这种东西了。";	add("zhen_count", -1);	ob = new("/d/xingxiu/npc/jobobj/blzhen");	ob->move(this_player());	this_player()->set_temp("xxi1",1);	return "好吧,那你就先用这些针吧。";}string ask_du2(){	mapping fam; 	object ob;		if (!(fam = this_player()->query("family")) || fam["family_name"] != "星宿派")		return RANK_D->query_respect(this_player()) + 		"与本派素无来往,不知此话从何谈起?";	if (this_player()->query_skill("poison",1)<100)		return "你的毒技火候未到,用不了这种东西。";	if (query("san_count") < 1)		return "你来晚了,现在没什么剩的了。";	if (this_player()->query_temp("xxi2"))		return "我刚给过你这种东西了。";	add("san_count", -1);	ob = new("/d/xingxiu/npc/jobobj/sanxiao");	this_player()->set_temp("xxi2",1);	ob->move(this_player());	return "好吧,这包毒药你拿回去善加利用吧。";}int ask_job(){        object me = this_player();        object ob;        mapping quest;        mapping skl;         string *sname, place;                int i, skill = 0;        quest = (__DIR__"lagjob")->query_quest();        skl = me->query_skills();        if ( !skl ) {                tell_object(me, "你去学一些本事先吧!\n");                return 1;                }        sname  = sort_array( keys(skl), (: strcmp :) );        for(i=0; i<sizeof(skl); i++)                 if (skl[sname[i]] >= skill && sname[i] != "literate" && sname[i] != "taoism")                        skill = skl[sname[i]];                                if (skill < 80) skill = 80;        if( me->query("family/family_name") != "星宿派")           {                      message_vision("$N对着$n说道。你是哪里来的奸细?\n", this_object(), me);                      return 1;            }      if( (int)me->query_skill("huagong-dafa",1) < 50)            {                message_vision("$N对着$n大喝一声:你的本门内功不够!\n", this_object(), me);                return 1;            }           if (me->query("combat_exp") < 100000) {                command("say " + RANK_D->query_respect(me) + "抢商人的事没那么容易,你还是练高经验再来吧");                return 1;}     if ((int)me->query_condition("guojob2_busy"))            {                      message_vision("$N对着$n摇了摇头说:你等会再来!\n", this_object(), me);                      return 1;            }        if ((int)me->query_condition("menpai_busy"))              {                      message_vision("$N对着$n摇了摇头说:你等会再来!\n", this_object(), me);                      return 1;            }        if (me->query("potential") < 200 || me->query("combat_exp") < 300) {                command("say 你的潜能太少了.找不到什么好货!!");                return 1;        }        if (me->query("kill_xingxiu") == 1) {                command("kick " + me->query("id"));                command("say 我不是给了你任务了吗?");                return 1;                }        else {                command("nod" + me->query("id"));                command("say " + RANK_D->query_respect(me) + "和我志同道合,有财大家一起发。");                command("say " + me->query("id") + " 听说在『" + quest["short"]             + "』附近有个富商路过,快去吧!\n" NOR);                me->set("kill_xingxiu", 1);                me->set("quest/quest_type", "抢");                me->set("quest/quest", "富商");                me->set("task_time", time() + 310);                me->apply_condition("menpai_busy",7);                ob = new(__DIR__"meinv",1);                ob->move(quest["place"]);                me->start_busy(3);                ob->set_temp("owner/id",me->query("id"));                ob->set("combat_exp", me->query("combat_exp"));                ob->set("max_force", me->query("max_force"));                ob->set("eff_kee", me->query("max_kee"));                ob->set("max_kee", me->query("max_kee"));                ob->set("kee", me->query("max_kee"));                ob->set_skill("dodge", skill);                ob->set_skill("force", skill);                ob->set_skill("parry", skill);                                ob->set("force_factor", random(10));                   return 1;               }                              }int ask_fail(){        object me = this_player();                if (me->query("kill_xingxiu") == 1) {                command("pk1");                command("say 你害得富商没抓到,坏我派发展大事,扣你150点POT.");                me->delete("kill_xingxiu");                me->apply_condition("menpai_busy",6);//                call_out("delete", 1);                return 1;                }}int accept_object(object me, object obj){   object ob=this_object();   if(!me || environment(me) != environment()) return 0;   if(!objectp(obj)) return 0;   if(!present(obj, me)) return notify_fail("你没有这件东西。");           if(me->query_temp("xxjob2") <2){       command("consider "+(string)me->query("id"));       command("say 你任务怎么做的,杀了几个敌人?");       return 0;       }   if(userp(obj)){       command("consider "+(string)me->query("id"));       command("say 你拿个快死的人来骗我?");       return 0;       }   if(obj->query("id") == "fu shang" && obj->query_temp("owner/id") != me->query("id")){       command("consider "+(string)me->query("id"));       command("say 我不是叫你抓这个人的!");       return 0;       }   if(obj->query("id") == "fu shang" && me->query("kill_xingxiu") == 1)   {       command("nod "+(string)me->query("id"));       command("say 嘿嘿.干得好!\n");       remove_call_out("destroying");       call_out("destroying", 0, obj, ob, me);                              return 1;       }   if(obj->query("money_id")) {       command("pat " + me->query("id"));       command("say 我要钱干什么?");       return 0;       }   else return 0;       }void destroying(object obj, object ob, object me){      object n_money;   int kar, exp, pot;   kar = random(me->query("kar")) * 7;if (kar >300) kar=300;   exp = 550 + kar;   pot = 450 + random(kar);   if(obj) destruct(obj);//   if(ob) destruct(ob);   if(!ob) return;   if(!me || environment(me) != environment()){      command("say 咦,人呢?");      return;      }   command("pat "+me->query("id"));                me->apply_condition("guojob2_busy",10);                me->apply_condition("huang_busy",10);   message_vision(HIR"$N对$n说道:你这次做得极为出色!我就指点你两手本门的奇功吧.\n"NOR,ob, me);                  message_vision(HIC "\n由于$N成功的抢到了商人,被奖励:\n"                + chinese_number(exp ) + "点实战经验,\n"                + chinese_number(pot ) + "点潜能,\n"                + chinese_number(50) + "点评价作为答谢。\n" NOR, me);                me->add("combat_exp", exp );                me->add("potential", pot );                me->add("score",50);                me->add("shen",-200);                me->delete("quest");                destruct(present("fu shang",ob));                me->delete("kill_xingxiu"); me->delete_temp("xxjob2");   message_vision(HIM"$N说完就把商人身上的钱财,搜了出来,然后把商人关进了后面的山洞......\n"NOR,ob);   return;      }

⌨️ 快捷键说明

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