|
#include
#include
inherit F_CLEAN_UP;
int main(object me, string arg)
{
string what, who;
object ob, victim;
mapping myfam, vtfam;
int sp, dp;
int nowtime;
object where = environment(me);
seteuid(getuid());
if ( (!(myfam = me->query("family")) || myfam["family_name"] != "灵鹫宫") )
return notify_fail("只有灵鹫宫的人才会美容!\n");
if( me->query_temp("beautying") )
return notify_fail("你正在给人美容!\n");
if( !arg || sscanf(arg, "%s",who)!=1 ) return
notify_fail("指令格式:makebeauty <人物>\n");
victim = present(who, environment(me));
if( !victim || victim == me) return notify_fail("对象不对。\n");
if( victim->name() != me->query("qtask/target")) return notify_fail(HIY"空中隐隐传来童佬的吼声:师门密技,别擅自乱用!\n"NOR);
nowtime = (int) me->query("qtask/time") - time();
if(nowtime<0)return notify_fail(HIR"已经没有时间!何苦费事?\n"NOR);
// if( !me->qurey("qtask/time")) return notify_fail(HIR"已经没有时间!何苦费事?\n"NOR);
if( !living(victim) || !objectp(victim))
return notify_fail("你要给谁美容?\n");
if ( (vtfam = victim->query("family")) && vtfam["family_name"] == "灵鹫宫" )
return notify_fail("别在鲁班门前弄大斧!\n");
if( userp(victim))
return notify_fail("不能给玩家美容!\n");
if( me->is_fighting() )
return notify_fail("打架还能给人美容?别割了别人的脸!\n");
if( victim->is_fighting() )
return notify_fail(victim->name() + "正在打架,没空理你!\n");
sp = me->query_skill("beauty", 1);
dp = victim->query("sen");
tell_object(me, HIC"你对着" + victim->name() + "的脸仔细的端详一阵.....\n啊!有了,随即伸手在" + victim->name() + "的脸上摩捏起来......\n");
tell_object(victim, me->name() + "对着你的脸一阵端详,似乎若有所思,然后伸出手在你脸上一阵按摩......\n");
message("vision", "只见" + me->name() + "对着" + victim->name() + "的脸一阵端详,似乎若有所思,然后伸出手在你脸上一阵按摩...... \n", environment(me), ({ me, victim }) );
me->set_temp("beautying", 1);
call_out( "compelete_beauty", 5, me, victim, sp, dp);
return 1;
}
private void compelete_beauty(object me, object victim, int sp, int dp)
{
object ob1;
int amount;
int reward;
int dx;
object where = environment(me);
me->delete_temp("beautying");
if( environment(victim) != environment(me) ) {
tell_object(me, "可惜,你要美容的人已经走了。\n");
return;
}
if( random(sp*6/5)
message_vision(victim->name() + "突然感到脸上一阵痛,原来是$N的指甲擦在皮肤上!\n"NOR, me);
tell_object(me, victim->name() + "对你的服务极不满意,决定杀了你泄恨!\n"NOR);
tell_object(victim, "看来被" + me->name() + "耍了,杀!\n");
CHANNEL_D->do_channel(victim, "nyj",me->name()+"!"
+"你想毁我容貌啊?当我好欺负啊?看招!");
message("vision", victim->name() + "对" + me->name() + "的服务不满,两人打起来了!\n",
environment(me), ({ me, victim }) );
victim->kill_ob(me);
me->kill_ob(victim);
me->start_busy(3);
return;
}
tell_object(me, victim->name() + "摸了摸光滑的脸蛋,满意地说“谢谢!”\n"NOR);
tell_object(victim, "在"+me->name()+"的妙手之下,你看起来漂亮多了!\n");
reward=victim->query("combat_exp")/2500+victim->query("sen")/10+me->query("int");
if(reward > 1000) reward= random(300)+ 800;
dx=COMBAT_D->chinese_daoxing(reward);
me->improve_skill("beauty", random(me->query("int")));
me->add("combat_exp",reward);
me->add("potential",reward/4);
me->delete("qtask");
CHANNEL_D->do_channel(victim, "es",me->name()+"("+me->query("id")+")"
+"为我美容,我决定奖励她"+exp+"经验."和"+ chinese_number(reward/4)+"点潜能.");
CHANNEL_D->do_channel(victim, "rumor",me->query("name")
+"为"+victim->name()+"美容得到"+ chinese_number(reward/4)+"点潜能和"+exp+"经验.");
}
int help(object me)
{
write(@HELP
指令格式 : makebeauty <某人>
注意:如果失败,对方会杀你,而你也自动下kill指令,有3秒busy!!
HELP
);
return 1;
} |
|