ds2.9a12/bin/
ds2.9a12/extra/
ds2.9a12/extra/crat/
ds2.9a12/extra/creremote/
ds2.9a12/extra/mingw/
ds2.9a12/extra/wolfpaw/
ds2.9a12/fluffos-2.14-ds13/
ds2.9a12/fluffos-2.14-ds13/Win32/
ds2.9a12/fluffos-2.14-ds13/compat/
ds2.9a12/fluffos-2.14-ds13/compat/simuls/
ds2.9a12/fluffos-2.14-ds13/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/
ds2.9a12/fluffos-2.14-ds13/testsuite/clone/
ds2.9a12/fluffos-2.14-ds13/testsuite/command/
ds2.9a12/fluffos-2.14-ds13/testsuite/data/
ds2.9a12/fluffos-2.14-ds13/testsuite/etc/
ds2.9a12/fluffos-2.14-ds13/testsuite/include/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/
ds2.9a12/fluffos-2.14-ds13/testsuite/inherit/master/
ds2.9a12/fluffos-2.14-ds13/testsuite/log/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/compiler/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/efuns/
ds2.9a12/fluffos-2.14-ds13/testsuite/single/tests/operators/
ds2.9a12/fluffos-2.14-ds13/testsuite/u/
ds2.9a12/lib/cmds/admins/
ds2.9a12/lib/cmds/common/
ds2.9a12/lib/cmds/creators/include/
ds2.9a12/lib/daemon/services/
ds2.9a12/lib/daemon/tmp/
ds2.9a12/lib/doc/
ds2.9a12/lib/doc/bguide/
ds2.9a12/lib/doc/efun/all/
ds2.9a12/lib/doc/efun/arrays/
ds2.9a12/lib/doc/efun/buffers/
ds2.9a12/lib/doc/efun/compile/
ds2.9a12/lib/doc/efun/floats/
ds2.9a12/lib/doc/efun/functions/
ds2.9a12/lib/doc/efun/general/
ds2.9a12/lib/doc/efun/mixed/
ds2.9a12/lib/doc/efun/numbers/
ds2.9a12/lib/doc/efun/parsing/
ds2.9a12/lib/doc/hbook/
ds2.9a12/lib/doc/help/classes/
ds2.9a12/lib/doc/help/races/
ds2.9a12/lib/doc/lfun/
ds2.9a12/lib/doc/lfun/all/
ds2.9a12/lib/doc/lfun/lib/abilities/
ds2.9a12/lib/doc/lfun/lib/armor/
ds2.9a12/lib/doc/lfun/lib/bank/
ds2.9a12/lib/doc/lfun/lib/bot/
ds2.9a12/lib/doc/lfun/lib/clay/
ds2.9a12/lib/doc/lfun/lib/clean/
ds2.9a12/lib/doc/lfun/lib/clerk/
ds2.9a12/lib/doc/lfun/lib/client/
ds2.9a12/lib/doc/lfun/lib/combat/
ds2.9a12/lib/doc/lfun/lib/connect/
ds2.9a12/lib/doc/lfun/lib/container/
ds2.9a12/lib/doc/lfun/lib/corpse/
ds2.9a12/lib/doc/lfun/lib/creator/
ds2.9a12/lib/doc/lfun/lib/daemon/
ds2.9a12/lib/doc/lfun/lib/damage/
ds2.9a12/lib/doc/lfun/lib/deterioration/
ds2.9a12/lib/doc/lfun/lib/donate/
ds2.9a12/lib/doc/lfun/lib/door/
ds2.9a12/lib/doc/lfun/lib/equip/
ds2.9a12/lib/doc/lfun/lib/file/
ds2.9a12/lib/doc/lfun/lib/fish/
ds2.9a12/lib/doc/lfun/lib/fishing/
ds2.9a12/lib/doc/lfun/lib/flashlight/
ds2.9a12/lib/doc/lfun/lib/follow/
ds2.9a12/lib/doc/lfun/lib/ftp_client/
ds2.9a12/lib/doc/lfun/lib/ftp_data_connection/
ds2.9a12/lib/doc/lfun/lib/fuel/
ds2.9a12/lib/doc/lfun/lib/furnace/
ds2.9a12/lib/doc/lfun/lib/genetics/
ds2.9a12/lib/doc/lfun/lib/holder/
ds2.9a12/lib/doc/lfun/lib/id/
ds2.9a12/lib/doc/lfun/lib/interactive/
ds2.9a12/lib/doc/lfun/lib/lamp/
ds2.9a12/lib/doc/lfun/lib/leader/
ds2.9a12/lib/doc/lfun/lib/light/
ds2.9a12/lib/doc/lfun/lib/limb/
ds2.9a12/lib/doc/lfun/lib/living/
ds2.9a12/lib/doc/lfun/lib/load/
ds2.9a12/lib/doc/lfun/lib/look/
ds2.9a12/lib/doc/lfun/lib/manipulate/
ds2.9a12/lib/doc/lfun/lib/meal/
ds2.9a12/lib/doc/lfun/lib/messages/
ds2.9a12/lib/doc/lfun/lib/player/
ds2.9a12/lib/doc/lfun/lib/poison/
ds2.9a12/lib/doc/lfun/lib/position/
ds2.9a12/lib/doc/lfun/lib/post_office/
ds2.9a12/lib/doc/lfun/lib/potion/
ds2.9a12/lib/doc/lfun/lib/room/
ds2.9a12/lib/doc/lfun/lib/server/
ds2.9a12/lib/doc/lfun/lib/spell/
ds2.9a12/lib/doc/lfun/lib/torch/
ds2.9a12/lib/doc/lfun/lib/vendor/
ds2.9a12/lib/doc/lfun/lib/virt_sky/
ds2.9a12/lib/doc/lfun/lib/weapon/
ds2.9a12/lib/doc/lfun/lib/worn_storage/
ds2.9a12/lib/doc/lpc/basic/
ds2.9a12/lib/doc/lpc/concepts/
ds2.9a12/lib/doc/lpc/constructs/
ds2.9a12/lib/doc/lpc/etc/
ds2.9a12/lib/doc/lpc/intermediate/
ds2.9a12/lib/doc/lpc/types/
ds2.9a12/lib/doc/misc/
ds2.9a12/lib/doc/old/
ds2.9a12/lib/domains/
ds2.9a12/lib/domains/Praxis/adm/
ds2.9a12/lib/domains/Praxis/attic/
ds2.9a12/lib/domains/Praxis/cemetery/mon/
ds2.9a12/lib/domains/Praxis/data/
ds2.9a12/lib/domains/Praxis/death/
ds2.9a12/lib/domains/Praxis/mountains/
ds2.9a12/lib/domains/Praxis/obj/armour/
ds2.9a12/lib/domains/Praxis/obj/magic/
ds2.9a12/lib/domains/Praxis/obj/weapon/
ds2.9a12/lib/domains/Praxis/orc_valley/
ds2.9a12/lib/domains/Ylsrim/
ds2.9a12/lib/domains/Ylsrim/adm/
ds2.9a12/lib/domains/Ylsrim/armor/
ds2.9a12/lib/domains/Ylsrim/broken/
ds2.9a12/lib/domains/Ylsrim/fish/
ds2.9a12/lib/domains/Ylsrim/meal/
ds2.9a12/lib/domains/Ylsrim/npc/
ds2.9a12/lib/domains/Ylsrim/obj/
ds2.9a12/lib/domains/Ylsrim/virtual/
ds2.9a12/lib/domains/Ylsrim/weapon/
ds2.9a12/lib/domains/campus/adm/
ds2.9a12/lib/domains/campus/etc/
ds2.9a12/lib/domains/campus/meals/
ds2.9a12/lib/domains/campus/save/
ds2.9a12/lib/domains/campus/txt/ai/charles/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/
ds2.9a12/lib/domains/campus/txt/ai/charles/bak2/bak1/
ds2.9a12/lib/domains/campus/txt/ai/charly/
ds2.9a12/lib/domains/campus/txt/ai/charly/bak/
ds2.9a12/lib/domains/campus/txt/jenny/
ds2.9a12/lib/domains/cave/doors/
ds2.9a12/lib/domains/cave/etc/
ds2.9a12/lib/domains/cave/meals/
ds2.9a12/lib/domains/cave/weap/
ds2.9a12/lib/domains/default/creator/
ds2.9a12/lib/domains/default/doors/
ds2.9a12/lib/domains/default/etc/
ds2.9a12/lib/domains/default/vehicles/
ds2.9a12/lib/domains/default/virtual/
ds2.9a12/lib/domains/default/weap/
ds2.9a12/lib/domains/town/txt/shame/
ds2.9a12/lib/domains/town/virtual/
ds2.9a12/lib/domains/town/virtual/bottom/
ds2.9a12/lib/domains/town/virtual/space/
ds2.9a12/lib/estates/
ds2.9a12/lib/ftp/
ds2.9a12/lib/lib/comp/
ds2.9a12/lib/lib/daemons/
ds2.9a12/lib/lib/daemons/include/
ds2.9a12/lib/lib/lvs/
ds2.9a12/lib/lib/user/
ds2.9a12/lib/lib/virtual/
ds2.9a12/lib/log/
ds2.9a12/lib/log/adm/
ds2.9a12/lib/log/archive/
ds2.9a12/lib/log/chan/
ds2.9a12/lib/log/errors/
ds2.9a12/lib/log/law/adm/
ds2.9a12/lib/log/law/email/
ds2.9a12/lib/log/law/names/
ds2.9a12/lib/log/law/sites-misc/
ds2.9a12/lib/log/law/sites-register/
ds2.9a12/lib/log/law/sites-tempban/
ds2.9a12/lib/log/law/sites-watch/
ds2.9a12/lib/log/open/
ds2.9a12/lib/log/reports/
ds2.9a12/lib/log/router/
ds2.9a12/lib/log/secure/
ds2.9a12/lib/log/watch/
ds2.9a12/lib/obj/book_source/
ds2.9a12/lib/obj/include/
ds2.9a12/lib/powers/prayers/
ds2.9a12/lib/powers/spells/
ds2.9a12/lib/realms/template/adm/
ds2.9a12/lib/realms/template/area/armor/
ds2.9a12/lib/realms/template/area/npc/
ds2.9a12/lib/realms/template/area/obj/
ds2.9a12/lib/realms/template/area/room/
ds2.9a12/lib/realms/template/area/weap/
ds2.9a12/lib/realms/template/bak/
ds2.9a12/lib/realms/template/cmds/
ds2.9a12/lib/save/kills/o/
ds2.9a12/lib/secure/cfg/classes/
ds2.9a12/lib/secure/cmds/builders/
ds2.9a12/lib/secure/cmds/creators/include/
ds2.9a12/lib/secure/cmds/players/
ds2.9a12/lib/secure/cmds/players/include/
ds2.9a12/lib/secure/daemon/imc2server/
ds2.9a12/lib/secure/daemon/include/
ds2.9a12/lib/secure/lib/
ds2.9a12/lib/secure/lib/include/
ds2.9a12/lib/secure/lib/net/include/
ds2.9a12/lib/secure/lib/std/
ds2.9a12/lib/secure/log/adm/
ds2.9a12/lib/secure/log/bak/
ds2.9a12/lib/secure/log/intermud/
ds2.9a12/lib/secure/log/network/
ds2.9a12/lib/secure/modules/
ds2.9a12/lib/secure/npc/
ds2.9a12/lib/secure/obj/include/
ds2.9a12/lib/secure/room/
ds2.9a12/lib/secure/save/
ds2.9a12/lib/secure/save/backup/
ds2.9a12/lib/secure/save/boards/
ds2.9a12/lib/secure/tmp/
ds2.9a12/lib/secure/upgrades/files/
ds2.9a12/lib/secure/verbs/creators/
ds2.9a12/lib/std/board/
ds2.9a12/lib/std/lib/
ds2.9a12/lib/tmp/
ds2.9a12/lib/verbs/admins/include/
ds2.9a12/lib/verbs/builders/
ds2.9a12/lib/verbs/common/
ds2.9a12/lib/verbs/common/include/
ds2.9a12/lib/verbs/creators/
ds2.9a12/lib/verbs/creators/include/
ds2.9a12/lib/verbs/rooms/
ds2.9a12/lib/verbs/rooms/include/
ds2.9a12/lib/www/client/
ds2.9a12/lib/www/errors/
ds2.9a12/lib/www/images/
ds2.9a12/lib/www/lpmuds/downloads_files/
ds2.9a12/lib/www/lpmuds/intermud_files/
ds2.9a12/lib/www/lpmuds/links_files/
ds2.9a12/win32/
#include <lib.h>
inherit LIB_BOT;
inherit LIB_ACTIVATE;

object player, bot, ob, noobster;
static string name, watchline;
static int count, active, tip, tipnumber, current_tip, hb, mooch, greeting, greetwait;
string *watchlist = ({});
static string save_file = "/domains/campus/save/jennybot.o";

mixed GreetingResponse(object who, mixed foo, string message, mixed bar){
    int greet;
    message = lower_case(message);
    if(!strsrch(message, "hi") || !strsrch(message, "hello")){
        tell_player(who,"The woman does not respond to your greeting, "+
          "but you sense that you can: \n%^BOLD%^look at woman%^RESET%^");
    }
    return 1;
}

string LongDesc(){
    string ret;
    if(!active){
        ret = "On closer inspection, this attractive "+
        "young lady is no lady at all...she's an android! "+
        "She appears to be totally motionless and frozen "+
        "in place, with a friendly smile. Perhaps you "+
        "can make her do something by typing: %^RED%^activate bot%^RESET%^ ";
    }
    else {
        ret = "On closer inspection, this attractive "+
        "young lady is no lady at all...she's an android! "+
        "She appears to be in the middle of giving an orientation "+
        "on this mud, with bizarrely friendly mannerisms. Perhaps you "+
        "can make her be quiet by typing: %^RED%^deactivate bot%^RESET%^ ";
    }
    return ret;
}


static void create(){
    watchlist = ({});
    AddSave(({ "players" }) );
    ::create();
    restore_object(save_file);
    SetKeyName("jennybot");
    SetId(({"guide","guidebot","fembot","bot","jennifer","niffy","android","jenny","robot","woman","lady"}));
    SetAdjectives(({"orientation","young","female","polite","pretty","guide","newbie","simple","extremely"}));
    SetGender("female");
    SetShort("a polite young woman");
    SetLong( (: LongDesc :) );
    SetInventory(([
        "/domains/campus/armor/pillbox_hat" : "wear hat",
        "/domains/campus/armor/wglove_r" : "wear white right glove",
        "/domains/campus/armor/wglove_l" : "wear white left glove",
        "/domains/campus/armor/necklace" : "wear necklace on neck",
        "/domains/campus/armor/bluedress" : "wear dress",
      ]));
    SetMelee(1);
    SetPolyglot(1);
    SetLevel(99);
    SetRace("android");
    SetAction(1, ({
        "Jenny straightens her hair.",
        "Jenny the guide bot touches up her rouge a bit.", 
        "Jenny smiles."}));
    AddCommandResponse("shutdown", (: eventTurnOff :));
    AddCommandResponse("shut down", (: eventTurnOff :) );
    AddCommandResponse("shut up", (: eventTurnOff :));
    AddCommandResponse("go away", (: eventTurnOff :) );
    SetTalkResponses( ([
        "hi" : (: GreetingResponse :),
        "hello" : (: GreetingResponse :),
      ]) );
    set_heart_beat(1);
    ob=this_object();
    count=210;
    tip=0;
    tipnumber = 16;
    greeting = 0;
    greetwait = 0;
    SetLanguage("common",100);
    SetDefaultLanguage("common");
}

varargs int eventGreet(string newbie){
    object noob;
    string guy,prespiel,spiel;
    if((!newbie || newbie == "") || !noobster){
        return 0;
    }
    if(!newbie || newbie == "") newbie = noobster->GetKeyName();
    if(newbie && newbie != "there") noob = find_player(newbie);
    if(noob && newbie != "there") guy = noob->GetName();
    else guy = "there";
    tell_room(environment(this_object()),"The polite young "+
      "lady springs to life!\n");
    prespiel = "Jennybot says, \"%^BOLD%^CYAN%^ Hello, "+guy;
    spiel = read_file("/domains/campus/txt/jenny/spiel.txt");
    tell_room(environment(this_object()),prespiel+spiel);
    tell_room(environment(this_object()),"\n\t%^RED%^activate bot%^RESET%^\n");
    eventForce("yell DEDDA SORUZE: GETTO DA ZE!");
    tell_room(environment(this_object()),"The polite young "+
      "woman becomes totally motionless again.");
    noob->SetProperty("greeted",1);
    return 1;
}

int eventCheckNoob(){
    object array people;
    people=(get_livings(environment(this_object()),1));
    if(sizeof(people)){
        foreach(object dude in people){
            int greeted;
            greeted = dude->GetProperty("greeted");
            if(!greeted && dude->GetLevel() < 2 ) {
                greeting = 1;
                noobster = dude;
            }
        }
    }
    return 1;
}

void init(){
    ::init();
    add_action("next_tip","next");
    eventCheckNoob();
}

int next_tip(string str){
    if(!str) return 0;
    if(str=="") return 0;
    if(str="tip"){
        if(active != 1) { write("Jennybot is not active."); return 1; }
        if(tip == tipnumber) ob->eventForce("say Sorry. No more tips.");
        else {
            this_object()->eventDoTip(tip);
        }
        return 1;
    }
}

int refreshlist(){
    string playername;
    playername = this_player()->GetKeyName();
    if(watchlist && member_array(playername, watchlist) != -1) mooch = 1;
    else {
        if(!watchlist) watchlist = ({});
        watchlist += ({ playername });
        mooch = 0;
    }
    watchlist = distinct_array(watchlist);
    unguarded( (: save_object(save_file,1) :) );
    return 1;
}

int eventTurnOff(){
    if( active == 0 ){
        write("Jennybot is already inactive.");
    }
    tip = 0;
    if( active != 0) {
        eventForce("yell DEDDA SORUZE: GETTO DA ZE!");
        tell_room(environment(this_object()),"Jenny nods and becomes motionless again, "+
          "her expression now fixed and staring out into "+
          "space.");
    }
    active=0;
    return 1;
}

int eventTurnOn(){
    if(!ob) ob = this_object();
    player=this_player();
    name=this_player()->GetName();
    if(!name || !sizeof(name)) name = "player";
    if(active==1){
        write("Jennybot has already been activated.");
        return 1;
    }
    refreshlist();
    active=1;
    hb=0;
    tip=1;
    write("The female android comes to life! She "+
      "smiles at you and straightens her dress.");
    ob->eventForce("say Hello, "+name+"! I'm Jenny, the LPC University "+
      "newbie guide bot. I'm an extremely simple android, so "+
      "please don't expect a lot of interactivity.");
    ob->eventForce("smile "+name);
    ob->eventForce("say I'm here to give you a few "+
      "tips. To deactivate me, simply "+
      "type: %^RED%^deactivate bot%^CYAN%^.");
    ob->eventForce("say To jump to the next tip, type: next tip");
    return 1;
}

int eventAct4(){
    if(!new("/domains/campus/obj/note")->eventMove(this_object())){
        tell_room(environment(this_object()),"Oops! There's a bug, "+
          "and I don't have a note for you. Let's pretend I gave you "+
          "one and move on. Please email your admin about this, though.");
        return 1;
    }
    if(player && environment(this_object()) == environment(player)) {
        eventForce("give note to "+player->GetName());
    }
    return 1;
}

int eventAct6(){
    if(!new("/domains/campus/obj/map")->eventMove(this_object())){ 
        tell_room(environment(this_object()),"Oops! There's a bug, "+
          "and I don't have a map for you. Let's pretend I gave you "+ 
          "one and move on. Please email your admin about this, though."); 
        return 1;
    }
    if(player && environment(this_object()) == environment(player)) {
        eventForce("give map to "+player->GetName());
    }
    return 1;
}

int eventAct8(){
    if(mooch || !new("/domains/campus/armor/newbie_cap")->eventMove(this_object())){
        tell_room(environment(this_object()),
          "I don't have a hat for you. Let's pretend I gave you "+
          "one and move on.");
    }
    if(mooch || !new("/domains/campus/obj/squirtbag")->eventMove(this_object())){
        tell_room(environment(this_object()),
          "I don't have a bag for you. Let's pretend I gave you "+
          "one and move on.");
    }
    if(player && environment(this_object()) == environment(player)) {
        eventForce("give cap to "+player->GetName());
    }
    if(player && environment(this_object()) == environment(player)) {
        eventForce("give bag to "+player->GetName());
    }
    return 1;
}

int eventAct9(){
    eventForce("smile "+player->GetName());
    if(!new("/domains/campus/meals/badapple")->eventMove(this_object())){
        tell_room(environment(this_object()),"Oops! There's a bug, "+
          "and I don't have a rotten apple for you. Let's pretend I gave you "+
          "one and move on. Please email your admin about this, though.");
    }
    if(!new("/domains/campus/meals/apple")->eventMove(this_object())){
        tell_room(environment(this_object()),"Oops! There's a bug, "+
          "and I don't have an apple for you. Let's pretend I gave you "+
          "one and move on. Please email your admin about this, though.");
    }
    if(player && environment(this_object()) == environment(player)) {
        eventForce("give first apple to "+player->GetName());
        eventForce("give my apple to "+player->GetName());
        return 1;
    }
}

int eventAct11(){
    eventForce("smirk");
    return 1;
}

int eventSwitch(int arg){
    switch(arg){
    case 4:eventAct4();break;
    case 6:eventAct6();break;
    case 8:eventAct8();break;
    case 9:eventAct9();break;
    case 11:eventAct11();break;
    default:write("");break;
        return 1;
    }
}

int eventDoTip(int i){
    tip++;
    hb=0;
    eventSwitch(i);
    if(tip > tipnumber) {
        this_object()->eventTurnOff("bot");
        return 1;
    }
    tell_room(environment(this_object()),read_file("/domains/campus/txt/jenny/"+i+".txt"));

}

void heart_beat(){
    hb++;
    if(greeting) greetwait++;
    if(noobster && greetwait > 0){
        eventGreet();
        noobster = 0;
        greetwait = 0;
        greeting = 0;
    }
    if(hb > 20 && active) eventDoTip(tip);
}