예제 #1
0
파일: manipulate.c 프로젝트: Elohim/FGmud
varargs mixed eventManipulate(object who, string component){
    mixed val;

    if( !component ){
        val = Manipulate["default"];
    }
    else {
        val = Manipulate[component];
    }
    if( arrayp(val) ){
        val = val[query_night()];
    }
    if( stringp(val) ){
        object env;

        env = environment(who);
        who->eventPrint(val);
        if( component ){
            env->eventPrint(who->GetName() + " moves the " + component +
                    " on " + GetDefiniteShort() + ".", who);
        }
        else {
            env->eventPrint(who->GetName() + " moves " +
                    GetDefiniteShort() + ".", who);
        }
        return 1;
    }
    else {
        if( functionp(val) & FP_OWNER_DESTED ){
            return "Error in evaluating functional.";
        }
        return evaluate(val, who, component);
    }
}
예제 #2
0
파일: turret.c 프로젝트: Elohim/FGmud
int eventShootDude(object ob){
    int dam, numlimbs;
    string limbname, str;
    string *limbs;
    if(!environment()) return 0;
    str = ob->GetName();
    if(!ammo){
        tell_room(environment(),"The gun turret clicks.");
        active = 0;
        return 0;
    }
    tell_object(this_object(),"You fire at "+ob->GetName()+"!");
    tell_room(environment(),"The gun turret fires at "+ob->GetName()+"!",
            ({this_object(),ob}));
예제 #3
0
int CanReceive(object ob) {
    if(privacy) {
        if(!interactive(ob)) {
            message("info","\n\nPRIVACY WARNING: "+ob->GetName()+" has entered the room.\n\n",this_object() );
        }
        else if(!archp(ob)) {
            message("info","You bounce off the conference room privacy shield.", ob);
            message("info",ob->GetName()+" bounced off the privacy shield.",this_object());
            if(!environment(ob)) ob->eventMoveLiving(ROOM_START);
            return 0;
        }

    }
    return room::CanReceive();
}
예제 #4
0
파일: orc_helmet.c 프로젝트: Elohim/FGmud
varargs int CheckOrc(object who, mixed where){
    object env = environment(who);
    if( who->GetRace() == "orc" ) {
        who->eventPrint("You can almost feel the power of the bear as "+
                "you wear its skull.");
        if(env) tell_room(env, who->GetName()+" wears "+GetShort()+
                ".", ({who}));
예제 #5
0
파일: look_in.c 프로젝트: Elohim/FGmud
varargs mixed eventShowInterior(object who, object target){
    object here,me,imhere,dabei;
    string this,str;
    here=environment(this_object());
    me=this_object();
    this=me->GetKeyName();
    str=me->GetInternalDesc();
    imhere=present(this,environment(who));
    dabei=present(this,who);

    if( target ){
        return "A strange event has occurred, which you should report.";
    }

    if(!imhere && !dabei){
        who->eventPrint("That is not here.");
        return 0;
    }

    if( !str || str == "" ){
        return 0;
    }
    if(!inherits(LIB_SURFACE, this_object())){
        environment(who)->eventPrint(who->GetName() + " looks inside " +
                GetShort() + ".", who);
    }
    who->eventPrint(str);

}
예제 #6
0
파일: steal.c 프로젝트: arylwen/terebi
mixed do_steal_wrd_from_liv(string wrd, object liv) {
    this_player()->eventPrint("You eye " + (string)liv->GetName() +
      " with thoughts on " + possessive(liv) +
      " pockets.");
    if( (int)this_player()->GetInCombat() )
        this_player()->SetAttack(0, (: eventSteal,this_player(), "money", liv :),
          ROUND_OTHER);
    else eventSteal(this_player(), "money", liv);
예제 #7
0
mixed do_ask_liv_to_str(object ob, string str) {
    string lang = this_player()->GetDefaultLanguage();
    //string pre = "In " + lang + ", ";
    string pre = "In ";
    int lvl;
    string msg = translate(str, lvl=(this_player()->GetLanguageLevel(lang)));
    if(lvl < 50) pre += "execrable "+lang+", ";
    else if(lvl < 60) pre += "very poor "+lang+", ";
    else if(lvl < 75) pre += "broken "+lang+", ";
    else if(lvl < 99) pre += "imperfect "+lang+", ";
    else pre += lang + ", ";
    msg = translate(msg, ob->GetLanguageLevel(lang));
    message("my_action", pre + "you ask "+ob->GetName()+" to "+str+".",
            this_player() );
    message("other_action", pre + this_player()->GetName()+" asks "
            "you to "+msg+".", ob);
    message("other_action", pre + this_player()->GetName()+" asks "+
            ob->GetName()+" to do something.",
            environment(ob), ({ ob, this_player() }) );
예제 #8
0
static mixed GetMissData(object targ, int type, string limb){
    string targ_name = targ->GetName(); 

    if(targ->GetDead() || this_object()->GetDead()) return 0;

    if( type == -2 ) switch( random(7) ){
        case 0:
            return ({ "%s completely %s %s.",
                    ({ "You", "miss", targ_name }),
                    ({ GetName(), "misses", "you" }),
                    ({ GetName(), "misses", targ_name }) });
예제 #9
0
파일: backstab.c 프로젝트: arylwen/terebi
int eventBackstab(object backstabber, object target) {
    object env;
    float tmp;
    int suprise;
    object *weapons;
    int numberOfWeapons;
    int numberOfStabs;
    int i;

    if(!backstabber || !(env = environment(backstabber))) return 0;
    if(!target || !present(target, env)) {
        backstabber->eventPrint("Your hapless victim is no longer present.");
        return 1;
    }

    tmp = backstabber->GetSkillLevel("stealth")*1.5;
    tmp += backstabber->GetStatLevel("charisma")/2.0;
    tmp += backstabber->GetStatLevel("luck")/3.0;
    tmp += backstabber->GetMobility()/3.0;
    tmp -= target->GetStatLevel("luck")/3.0;
    tmp -= target->GetStatLevel("wisdom")/3.0;
    tmp -= target->GetMobility()/5.0;
    tmp *= 1.0;
    if(tmp < 1.0) tmp = 1.0;
    suprise = to_int(tmp);

    backstabber->AddSkillPoints("stealth", to_int(suprise * 3.0));
    backstabber->AddStaminaPoints(-(5 + random(5)));
    moral_act(backstabber, target, -30);

    if(suprise < random(100) || !present(target, environment(backstabber))) {
        backstabber->eventPrint("%^RED%^" + target->GetName()
          + " evades your poorly executed backstab.%^RESET%^");
        target->eventPrint("%^RED%^You easily dodge " + possessive_noun(backstabber)
          + " attempted backstab.%^RESET%^");
        environment(backstabber)->eventPrint("%^RED%^" + target->GetName()
          + " dodges " + possessive_noun(backstabber) + " attempted backstab.%^RESET%^",
          ({backstabber, target}));
예제 #10
0
파일: backstab.c 프로젝트: arylwen/terebi
mixed do_backstab_liv(object ob) {
    object env;

    if(!(env = environment(this_player()))) return 0;
    if( (int)this_player()->GetPosition() != POSITION_STANDING )
        this_player()->eventStand();   
    if(!ob || !present(ob, env)) {
        this_player()->eventPrint("Your hapless victim is no longer present.");
        return 1;
    }
    this_player()->eventPrint("%^RED%^You sneak up behind " + ob->GetName() + "...%^RESET%^");
    this_player()->SetAttack(ob, (:eventBackstab, this_player(), ob:));
    return 1;
}
예제 #11
0
파일: buffer.c 프로젝트: arylwen/terebi
int hitCallback(object who, object agent, int x, class MagicProtection cl) {
    string str;
    object Caster = cl->caster;

    if( (int)agent->GetUndead() ) return 0;
    str = (string)agent->GetName() || (string)agent->GetShort();
    if( who == Caster ) {
        who->eventTrainSkill("magic defense",cl->args,x,1);
    }
    else if( Caster && playerp(who) && Caster != who ) {
        Caster->eventTrainSkill("magic defense",cl->args,0,1);
    } 

    send_messages("", "The %^YELLOW%^magical shield%^RESET%^ around "
      "$agent_name wavers as $target_name strikes it.",
      who, agent, environment(who), 0);
    return x;
}
예제 #12
0
파일: dest.c 프로젝트: arylwen/terebi
mixed do_dest_obj(object ob){
    string name;
    if(base_name(ob) == LIB_DUMMY) {
        write(capitalize(ob->GetShort())+" isn't a normal destable item. It remains in place.");
        return 1;
    }
    if(archp(ob) && !archp(this_player())){
        write("You can't dest an admin.");
        tell_player(ob, this_player()->GetName()+" just tried to dest you.");
        return 1;
    }
    if(!creatorp(this_player()) && strsrch(base_name(ob), homedir(this_player()))){
        write("As a builder, you can only dest items that you created.");
        return 1;
    }
    if(!living(ob)) name = ob->GetShort();
    else name = ob->GetName();
    write("You dest "+name+".");
    say( this_player()->GetMessage( "dest", ob ) );
    ob->eventDestruct();
    if(ob) destruct(ob);
    return 1;
}
예제 #13
0
파일: say.c 프로젝트: Elohim/FGmud
mixed can_say_to_liv(object ob) {
    if( !ob ) return 0;
    return "What is it you are trying to say to "+ ob->GetName() + "?";
}
예제 #14
0
func Dlg_Newton_1(object clonk)
{
	MessageBox(Format("$Newton1$", clonk->GetName()), clonk, dlg_target); // %s, good that you're here!
	return true;
}
예제 #15
0
파일: lice.c 프로젝트: Elohim/FGmud
int InfectMess(object ob){
    victim=ob;
    victimname=victim->GetName();
    tell_room(environment(victim), victimname+" looks suprised and grossed out.",({victim}) );
예제 #16
0
func Dlg_Newton_100(object clonk)
{
	SetBroadcast(true);
	MessageBox(Format("$Newton100$", clonk->GetName()), clonk, dlg_target); // %s, did you survive?
	return true;
}
예제 #17
0
파일: Script.c 프로젝트: 772/openclonk
func EncounterKing(object enemy, object player)
{
	if (!player) player = enemy; // Leads to a funny message, but better than a null pointer.
	Dialogue->MessageBoxAll(Format("$MsgEncounterKing$", player->GetName()), enemy, true);
	return true;
}
예제 #18
0
파일: flu.c 프로젝트: Elohim/FGmud
int InfectMess(object ob){
    victim=ob;
    victimname=victim->GetName();
    tell_room(environment(victim), victimname+" looks weak and woozy.",({victim}) );
예제 #19
0
파일: cold.c 프로젝트: Elohim/FGmud
int InfectMess(object ob){
    victim=ob;
    victimname=victim->GetName();
    tell_room(environment(victim), victimname+" looks pale and uncomfortable.",({victim}) );