[投稿] 凌霄城可拜師型npc示例
#include <ansi.h>
#include "lingxiao.h"
inherit NPC;
inherit F_MASTER;
inherit F_QUESTER;
inherit F_COAGENT;
mixed ask_skill1();
void create()
{
set_name("白自在", ({"bai zizai", "bai", "zizai"}));
set("nickname", HIY "威德先生" NOR);
set("long", "他就是凌宵城城主,雪山派第五代掌門人,江湖人稱威\n"
"德先生的百自在。相傳他年輕時巧逢靈藥,因而功力\n"
"大增。後來性情大變,自認為天下武功第一,狂傲非常。\n");
set("gender", "男性");
set("age", 65);
set("attitude", "friendly");
set("shen_type", 1);
set("str", 60);
set("int", 23);
set("con", 60);
set("dex", 45);
set("max_qi", 10000);
set("max_jing", 10000);
set("neili", 30000);
set("max_neili", 30000);
set("jiali", 200);
set("combat_exp", 3500000);
set("inquiry",([
"白自在" : "就是老子!"
"史婆婆" : "那是老子的夫人,可她......"
"白萬劍" : "那是老子的兒子!"
"阿繡" : "乖孫女差點給渾小子凌辱,現在也不知跑哪去了。"
"石中玉" : "如果抓到這渾小子,老子一定把他拆筋剝皮!"
"石破天" : "哼!這小子功夫倒是不錯。"
"寒梅六放" : "這招你還是去問祖師吧,老子不想教你。",
"百里飛梅" : "這種功夫只有女人才學得好,老子不想學,也學不來!",
"嶺雪寒山" : "去問祖師,別來煩老子!",
"冰魄寒光" : "這招老子不想教你,別來問我!",
"寒霜截氣" : "這招你去問祖師,我不教你這招。",
"孤鴻飛絕" : "老子輕功天下第一,你學不來!",
"神倒鬼跌三連環" : (: ask_skill1 :),
]));
set_skill("force", 380);
set_skill("lingxiao-xinfa", 380);
set_skill("dodge", 320);
set_skill("xueyan-piaoxu", 320);
set_skill("unarmed", 300);
set_skill("kaifei-shoufa", 300);
set_skill("sword", 400);
set_skill("xueshan-jian", 400);
set_skill("parry", 300);
set_skill("literate", 200);
set_skill("martial-cognize", 320);
map_skill("force", "lingxiao-xinfa");
map_skill("dodge", "xueyan-piaoxu");
map_skill("unarmed", "kaifei-shoufa");
map_skill("sword", "xueshan-jian");
create_family("凌霄城", 5, "掌門");
set("chat_chance_combat", 120);
set("chat_msg_combat", ({
(: perform_action, "sword.han" :),
(: perform_action, "sword.ling" :),
(: perform_action, "sword.bing" :),
(: perform_action, "unarmed.san" :),
(: perform_action, "dodge.gu" :)
(: exert_function, "recover" :),
(: exert_function, "powerup" :),
(: exert_function, "shield" :)
}));
setup();
carry_object("/clone/weapon/changjian")->wield();
carry_object(CLOTH_DIR+"bai")->wear();
}
void attempt_apprentice(object me)
{
if (! permit_recruit(me))
return;
if( query("shen", me)<10000 )
{
command("heng");
command("say 老子是人人稱道的正人君子,豈能收你為徒?");
return;
}
if( query("combat_exp", me)<400000 )
{
command("heng");
command("say 你江湖經驗太淺,就算拜了老子當師父,也不會有什麼作為。");
return;
}
if ((int)me->query_skill("lingxiao-xinfa", 1) < 150)
{
command("peer");
command("say 你本門內功差成這樣,居然也好意思來找老子!");
return;
}
if ((int)me->query_skill("xueshan-jian", 1) < 150)
{
command("say 你他媽在我雪山派待了這麼久,居然連本派劍法都沒練好?");
command("say 真是暴殄天物,氣死老子也!");
return;
}
command("haha");
command("say 你運氣好,碰巧老子今天心情不錯,就收下你吧!");
command("recruit "+query("id", me));
}
mixed ask_skill1()
{
object me;
me = this_player();
if( query("can_perform/kaifei-shoufa/san", me) )
return "自己下去練,別老跟我糾纏不休!";
if( query("family/family_name", me) != query("family/family_name") )
return "你是哪裡來的?快給我快快滾開!";
if (me->query_skill("kaifei-shoufa", 1) < 1)
return "你連老子的功夫都沒學,還談什麼絕招可言?";
if( query("family/gongji", me)<200 )
return "哼,你在本派中無所作為,還敢來跟老子學絕招?";
if (me->query_skill("force") < 150)
return "你的內功修行實在太差,下去練練再來!";
if (me->query_skill("kaifei-shoufa", 1) < 200)
return "你開飛手法練成這樣,好意思來找老子?";
message_vision(HIY "$n" HIY "望著$N" HIY "哈哈一笑,道:「好!好!"
"好!過來,老子傳你此\n招。」$N" HIY "一聽便到他跟"
"前,但聽$n" HIY "說道:「你瞧著,我這麼\n伸手,揪"
"住你的後頸,便摔你一個筋……」右手一探,果然已揪\n"
"住了$N" HIY "後頸。這一下出手既快,方位又奇,$N"
HIY "如何避得,只覺白\n自在手上力道大得出奇,給他一"
"抓之下,身子便騰空而起,跌在\n了地上。$n" HIY "一"
"笑,左手隨即探出,又已抓住$N" HIY "胸口,順勢一\n"
"甩,再次將$N" HIY "摔倒。此時卻見$n" HIY "左腳隨著"
"絆去,剎那間把快\n要倒地的$N" HIY "又給絆了一跤。\n"
NOR, me, this_object());
command("heihei");
command("say 老子這一揪、一抓、一絆,接連三招,號稱神倒鬼跌三連環。");
command("say 這三招你下去後慢慢練,日後受益無窮。");
tell_object(me, HIC "你學會了「神倒鬼跌三連環」。\n" NOR);
if (me->can_improve_skill("unarmed"))
me->improve_skill("unarmed", 150000);
if (me->can_improve_skill("kaifei-shoufa"))
me->improve_skill("kaifei-shoufa", 150000);
me->improve_skill("martial-cognize", 150000);
set("can_perform/kaifei-shoufa/san", 1, me);
addn("family/gongji", -200, me);
return 1;
}
//好的,這是我寫的白自在coding
//原本是想要把白自在設定成門派最高npc,可是回頭一想不對
//崑崙有何足道,血刀門有血刀老祖
//那凌霄城有凌霄子好像也沒有不合理的地方。
//所以我後來把凌霄子寫出來放在凌霄城的最後面
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.74.124.72
※ 文章網址: https://www.ptt.cc/bbs/mud_jy/M.1422958382.A.B90.html
推
02/03 18:31, , 1F
02/03 18:31, 1F
推
02/03 18:31, , 2F
02/03 18:31, 2F
推
02/03 18:31, , 3F
02/03 18:31, 3F
→
02/03 18:34, , 4F
02/03 18:34, 4F
→
02/03 18:36, , 5F
02/03 18:36, 5F
→
02/03 18:37, , 6F
02/03 18:37, 6F
推
02/03 20:19, , 7F
02/03 20:19, 7F
→
02/03 20:36, , 8F
02/03 20:36, 8F
→
02/03 20:37, , 9F
02/03 20:37, 9F
推
02/03 20:55, , 10F
02/03 20:55, 10F
→
02/03 20:57, , 11F
02/03 20:57, 11F
推
02/03 20:59, , 12F
02/03 20:59, 12F
→
02/03 21:04, , 13F
02/03 21:04, 13F
→
02/03 21:33, , 14F
02/03 21:33, 14F
→
02/03 21:36, , 15F
02/03 21:36, 15F
→
02/03 21:36, , 16F
02/03 21:36, 16F
推
02/05 19:05, , 17F
02/05 19:05, 17F
→
02/06 08:19, , 18F
02/06 08:19, 18F
→
02/06 08:20, , 19F
02/06 08:20, 19F
→
02/07 20:06, , 20F
02/07 20:06, 20F
推
02/08 11:19, , 21F
02/08 11:19, 21F
mud_jy 近期熱門文章
PTT遊戲區 即時熱門文章
28
54
101
197
104
198