예제 #1
0
        void SetData (uint32 type, uint32 data)
        {
            switch(type)
            {
                case DATA_ALTAR_DOORS:
                    m_auiEncounter[0] = data;
                    if(data == DONE)
                        SetDoor(uiAltarOfTheKeeperTempleDoor, true);
                    break;
                case DATA_ANCIENT_DOOR:
                    m_auiEncounter[1] = data;
                    if(data == DONE) //archeadas defeat
                    {
                        SetDoor(uiArchaedasTempleDoor, true); //re open enter door
                        SetDoor(uiAncientVaultDoor, true);
                    }
                    break;
                case DATA_IRONAYA_DOOR:
                    m_auiEncounter[2] = data;
                    break;
                case DATA_STONE_KEEPERS:
                    ActivateStoneKeepers();
                    break;
                case DATA_MINIONS:
                    switch(data)
                    {
                        case NOT_STARTED:
                            if(m_auiEncounter[0] == DONE) //if players opened the doors
                                SetDoor(uiArchaedasTempleDoor, true);
                            RespawnMinions();
                            break;
                        case IN_PROGRESS:
                            ActivateWallMinions();
                            break;
                        case SPECIAL:
                            DeActivateMinions();
                            break;
                    }
                    break;
                case DATA_IRONAYA_SEAL:
                    bKeystoneCheck = true;
                    break;
            }

            if(data == DONE)
            {
                OUT_SAVE_INST_DATA;

                std::ostringstream saveStream;
                saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2];

                str_data = saveStream.str();

                SaveToDB();
                OUT_SAVE_INST_DATA_COMPLETE;
            }
        }
예제 #2
0
		void SetData64(uint32 type, uint64 data) {
			// Archaedas
			if (type == 0) {
				ActivateArchaedas(data);
				SetDoor(uiArchaedasTempleDoor, false); //close when event is started
			}
		}
예제 #3
0
파일: yard.c 프로젝트: Lundex/bloodlines
void create() {
    ::create();
    SetProperty("light", 3);
    SetProperty("night light", 2);
    SetProperty("no castle", 1);
    SetShort("A small yard");
    SetDayLong( "Daytime makes this beautiful yard at the end of a "
            "small alley glow with peace. Quaint houses surround the yard "
            "on all flanks except to the west where the alley intersects "
            "Centre Path. There is a manhole where the alley meets the "
            "yard.");
    SetNightLong( "Very little stirs at the end of this small alley "
            "in the dark of the night. Some light illuminates the area from "
            "the lamps which are posted in front of the houses which "
            "surround the yard at the end of the alley.");

    SetDoor("/domains/Praxis/sewer_ent","down");
    "/domains/Praxis/sewer_ent"->SetOpen("manhole", 0);
    SetExits( 
            (["west" : "/domains/Praxis/s_centre2",
             "north" : "/domains/Praxis/sheriff",
             "down" : "/domains/Praxis/sewer_ent"]) );
    SetItems(
            (["alley" : "It looks beautiful here.",
             ({ "lamp", "lamps" }) : "Dimly illuminated lights.",
             "manhole" : (: this_object(), "look_at_manhole" :) ]) );
예제 #4
0
static void create() {
    room::create();

    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("Inside the cabin");
    SetLong("You are inside a small one-room cabin made entirely from heavy logs.  It is\n"+
        "very sparsely furnished, containing only most basic housekeeping equipment,\n"+
        "such as a bed, a chair and a table.");
    SetItems( ([ 
        "south" : "The wooden door leads south.",
        "bed" : "It is definitely not the most comfortable bed you have seen in your life.",
        "chair" : "It is made from oak and looks strong and sturdy.",
        "table" : "A heavy table that doesn't even appear to rock.",
        ] ));
    SetInventory( ([
        "/domains/diku-alfa/room/60.zon/obj/6003_fireplace" :1,
        "/domains/diku-alfa/room/60.zon/obj/6004_lantern_johns" : 1,
        "/domains/diku-alfa/room/60.zon/obj/6005_chest_wooden" : 1, 
        "/domains/diku-alfa/room/60.zon/meals/6013_water_barrel" : 1,      
        ]) );
    SetExits( ([
        "south" : "/domains/diku-alfa/room/60.zon/6009",
        ] ));
    SetDoor( "south" , "/domains/diku-alfa/room/doors/6009_6010");
}
 void SetGuidData(uint32 type, ObjectGuid data) override
 {
     // Archaedas
     if (type == 0)
     {
         ActivateArchaedas (data);
         SetDoor(archaedasTempleDoor, false); //close when event is started
     }
 }
예제 #6
0
파일: blue_room3.c 프로젝트: Elohim/FGmud
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("a blue room");
    SetLong("This is a blue room. Probability Lab 3 is west.");
    SetExits( ([
                "west" : "/domains/campus/room/plab"
                ]) );
    SetDoor("west","/domains/campus/doors/blue_door3");
}
예제 #7
0
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("a green room");
    SetLong("This is a green room. Probability Lab 2 is east.");
    SetExits( ([
                   "east" : "/domains/campus/room/plab2"
               ]) );
    SetDoor("east","/domains/campus/doors/green_door2");
}
예제 #8
0
파일: maintenance.c 프로젝트: Elohim/FGmud
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(0);
    SetShort("Maintenance room");
    SetLong("A room for access to service areas and to store "
            "maintenance supplies.");
    SetItems(([
                ]));
    SetInventory(([
                "/domains/campus/obj/simple_chair" : 1,
                "/domains/campus/obj/mtable" : 1,
                "/domains/campus/obj/mlocker" : 1,
                ]));
    SetExits( ([
                "up" : "/domains/campus/room/access9",
                "west" : "/domains/campus/room/sub_basement1.c",
                ]) );
    SetEnters( ([ 
                ]) );
    SetDoor("up", "/domains/campus/doors/hatch");
    SetDoor("west", "/domains/campus/doors/plain_door2");
}
예제 #9
0
		void Update(uint32 diff) {
			if (!bKeystoneCheck)
				return;

			if (uiIronayaSealDoorTimer <= diff) {
				ActivateIronaya();

				SetDoor(uiIronayaSealDoor, true);
				BlockGO(uiKeystoneGUID);

				SetData(DATA_IRONAYA_DOOR, DONE); //save state
				bKeystoneCheck = false;
			} else
				uiIronayaSealDoorTimer -= diff;
		}
예제 #10
0
파일: shaft1.c 프로젝트: Elohim/FGmud
void create() {
    room::create();
    SetAmbientLight(10);
    SetShort("Elevator shaft");
    SetLong("Elevator shaft, first floor");
    SetClimate("indoors");
    SetItems( ([ 
                ]) );
    SetExits( ([
                "east" : "/domains/campus/room/science6",
                ]) );
    SetDoor("east", "/domains/campus/doors/eledoor1");
    SetFlyRoom("/domains/campus/room/shaft2");
    SetSinkRoom("/domains/campus/room/shaft0");
    SetMedium(MEDIUM_AIR);
}
예제 #11
0
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(0);
    SetShort("sub basement");
    SetLong("This is a basement deep under the campus. The basement continues west from here. There is a doorway to the east.");
    SetExits( ([
                "east" : "/domains/campus/room/maintenance",
                "west" : "/domains/campus/room/sub_basement2.c",
                ]) );
    SetInventory(([
                ]));
    SetDoor("east", "/domains/campus/doors/plain_door2");
    SetEnters( ([ 
                ]) );
}
예제 #12
0
 void ActivateStoneKeepers()
 {
     for (std::vector<uint64>::const_iterator i = vStoneKeeper.begin(); i != vStoneKeeper.end(); ++i)
     {
         Creature* target = instance->GetCreature(*i);
         if (!target || !target->isAlive() || target->getFaction() == 14)
             continue;
         target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
         target->setFaction(14);
         target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
         return;        // only want the first one we find
     }
     // if we get this far than all four are dead so open the door
     SetData(DATA_ALTAR_DOORS, DONE);
     SetDoor(uiArchaedasTempleDoor, true); //open next the door too
 }
예제 #13
0
파일: corridor3.c 프로젝트: Elohim/FGmud
static void create() {
    room::create();
    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("Corridor");
    SetLong("You are in an east-west corridor on the first floor of the Virtual Campus administrative building. The building's snack bar lies to the north, and a door to the south leads into a stairwell. A foyer and the building exit lie west of here.");
    SetItems( (["corridor" : "This is a carpeted corridor, leading west.",
                "floor" : "The carpet is purple, and somewhat institutional.",
                "carpet" : "The carpet is purple, and somewhat institutional."]) );
    SetExits( ([
                "south" : "/domains/campus/room/stairwell",
                "east" : "/domains/campus/room/corridor",
                "west" : "/domains/campus/room/foyer",
                "north" : "/domains/campus/room/snack.c",
                ]) );
    SetDoor("south","/domains/campus/doors/top_stairs");
    SetProperty("no attack", 1);
}
예제 #14
0
void create() {
    room::create();
    SetAmbientLight(30);
    SetShort("Secret Lab");
    SetLong("This tidy workspace between campus levels seems to "+
      "be some kind of secret laboratory.");
    SetClimate("indoors");
    SetItems( ([ 
      ]) );
    SetInventory(([
        "/domains/campus/weap/zpem" : 1,
      ]));
    SetExits( ([
        "west" : "/domains/campus/room/shaft0",
        "east" : "/domains/campus/room/basement4.c",
      ]) );
    SetDoor("west","/domains/campus/doors/steel_door3");
}
예제 #15
0
static void create() {
    room::create();

    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("The Monster Pen");
    SetLong("This looks like the cage in which a large carnivor is being kept. Judging by\n"+
        "the state the walls are in, this could very well be a large AGGRESSIVE animal. \n"+
        "This makes you pretty insecure, this stating your feeling about the place, \n"+
        "quite mildly.");
    SetItems( ([ 
        "west" : "This looks like the only exit from here.",
        ] ));
    SetExits( ([
        "west" : "/domains/diku-alfa/room/79.zon/7904",
        ] ));
    SetDoor("west", "/domains/diku-alfa/room/doors/7904_7913");
}
예제 #16
0
static void create() {
    room::create();

    SetClimate("indoors");
    SetAmbientLight(0);
    SetShort("The treasure room");
    SetLong("This room is rich ornamented. The walls has carves showing\n"+
        "persons dancing around a sun which is drawed at the floor. It\n"+
        "looks very old, and it is very dusty. To the south you see a\n"+
        "secret door.");
    SetItems( ([ 
        "south" : "you can see a picture with some persons crawling around a\n"+
            "huge moon.",
        ] ));
    SetExits( ([
        "south" : "/domains/diku-alfa/room/74.zon/7415",
        ] ));
SetDoor("south", "/domains/diku-alfa/room/doors/7415_7416");
}
예제 #17
0
static void create() {
    room::create();

    SetClimate("indoors");
    SetAmbientLight(0);
    SetShort("The lair entrance.");
    SetLong("You are in a dry part of the sewer. To the north is a wooden door, you \n"+
        "can see some slime at the lower part of the door. You also see some skulls\n"+
        "and some broken bones.");
    SetItems( ([ 
        "north" : "You can see the lair.",
        "east" : "You see a crawlway.",
        "slime" : "The slime is slimy and uninteresting.",
        ] ));
    SetExits( ([
        "north" : "/domains/diku-alfa/room/72.zon/7204",
        "east" : "/domains/diku-alfa/room/72.zon/7209",
        ] ));
    SetDoor("north", "/domains/diku-alfa/room/doors/7204_7208"); 
}
예제 #18
0
static void create() {
    room::create();
    
    SetTerrainType(T_ROAD);
    SetAmbientLight(30);
    SetShort("A Gravel Path on the Graveyard");
    SetLong(" You are on a gravel path winding its way between dark evergreen trees on\n"+
        "the graveyard. The path leads north and east. A small shed is to the west.");
    SetItems( ([
        "north" : "The gravel path continues northwards.",
        "east" : "The gravel path continues eastwards.",
        "west" : "It is a small black-painted shed with a wooden door.",
        "shed" : "It is a small black-painted shed with a wooden door.",
        ]) );  
    SetExits( ([
        "north" : "/domains/diku-alfa/room/36.zon/3610",
        "east" : "/domains/diku-alfa/room/36.zon/3614",
        "west" : "/domains/diku-alfa/room/36.zon/3613",
        ]) );
    SetDoor("west", "/domains/diku-alfa/room/doors/3612_3613");
}
            void ActivateStoneKeepers()
            {
                if (GetData(DATA_ALTAR_DOORS) != DONE)
                {
                    for (GuidVector::const_iterator i = stoneKeepers.begin(); i != stoneKeepers.end(); ++i)
                    {
                        Creature* target = instance->GetCreature(*i);
                        if (!target || !target->IsAlive())
                            continue;
                        target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
                        target->setFaction(14);
                        target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                        target->RemoveAura(SPELL_MINION_FREEZE_ANIM);

                        return;        // only want the first one we find
                    }
                    // if we get this far than all four are dead so open the door
                    SetData(DATA_ALTAR_DOORS, DONE);
                    SetDoor(archaedasTempleDoor, true); //open next the door too
                }
            }
예제 #20
0
static void create() {
    room::create();

    SetClimate("indoors");
    SetAmbientLight(30);
    SetShort("In a shed on the Graveyard");
    SetLong("  You are in a small shed that looks as if it is used to store all sorts of\n"+
        "gardening equipment. The only exit appears to be through a door to the east.");
    SetItems( ([
        "east" : "The gravel path continues eastwards.",
        ]) );  
    SetExits( ([
        "east" : "/domains/diku-alfa/room/36.zon/3612",
        ]) );
    SetInventory( ([
        "/domains/diku-alfa/room/36.zon/npc/3600_henry" : 1,
        "/domains/diku-alfa/room/36.zon/meals/3602_brandy_empty" : 1,
        "/domains/diku-alfa/room/36.zon/obj/3603_wheelbarrow" : 1,
        "/domains/diku-alfa/room/36.zon/weap/3604_shovel" : 1,
        "/domains/diku-alfa/room/36.zon/weap/3605_rake" : 1,
        ]) );
    SetDoor("east", "/domains/diku-alfa/room/doors/3612_3613");
}
예제 #21
0
static void create() {
    room::create();
    
    SetTerrainType(T_ROAD);
    SetAmbientLight(30);
    SetShort("A Gravel Road on the Graveyard");
    SetLong(" You are on a well-kept gravel road that leads north-south through the\n"+
        "graveyard. On both sides of the road grow dark evergreen trees. An iron\n"+
        "grate is to the north.");
    SetItems( ([
        "north" : "Through the solid iron bars you see the Concourse.",
        "east" : "The gravel path leads eastwards between the dark evergreen trees.",
        "south" : "The gravel road continues southwards.",
        "west" : "The gravel path leads eastwards between the dark evergreen trees.",
        ]) );
    SetExits( ([
        "north" : "/domains/diku-alfa/room/31.zon/3129",
        "east" : "/domains/diku-alfa/room/36.zon/3650",
        "south" : "/domains/diku-alfa/room/36.zon/3601",
        "west" : "/domains/diku-alfa/room/36.zon/3606",
        ]) );
    SetDoor("north", "/domains/diku-alfa/room/doors/3129_3600");//requires key "3121" 
}
예제 #22
0
void CASW_VGUI_Door_Tooltip::OnThink()
{
	MDLCACHE_CRITICAL_SECTION();
	
	C_ASW_Player* pPlayer = C_ASW_Player::GetLocalASWPlayer();
	if ( pPlayer && m_bShowDoorUnderCursor )
	{
		C_ASW_Door* pDoorUnderCursor = C_ASW_Door::GetDoorNear( ASWInput()->GetCrosshairAimingPos() );
		if (pDoorUnderCursor && pDoorUnderCursor->IsOpen())	// don't show open doors
			pDoorUnderCursor = NULL;
		SetDoor(pDoorUnderCursor);		
	}
	// fade in/out as the door changes
	if (m_bQueuedDoor)
	{
		if (GetAlpha() <= 0)
		{
			m_hDoor = m_hQueuedDoor;			
			m_hQueuedDoor = NULL;
			m_bQueuedDoor = false;
			m_bDoingSlowFade = false;
			m_fNextUpdateTime = gpGlobals->curtime;
			if (GetDoor())
				vgui::GetAnimationController()->RunAnimationCommand(this, "Alpha", 200, 0, ASW_HEALTH_REPORT_FADE_TIME, vgui::AnimationController::INTERPOLATOR_LINEAR);
		}
		else if (GetAlpha() >= 200)
		{
			if (m_hQueuedDoor.Get() == NULL)
			{
				if (!m_bDoingSlowFade)
				{
					m_bDoingSlowFade = true;
					float delay = 0; // 1.5f
					vgui::GetAnimationController()->RunAnimationCommand(this, "Alpha", 0, delay, ASW_HEALTH_REPORT_FADE_TIME * 3, vgui::AnimationController::INTERPOLATOR_LINEAR);
				}
			}
			else
			{
				vgui::GetAnimationController()->RunAnimationCommand(this, "Alpha", 0, 0, ASW_HEALTH_REPORT_FADE_TIME, vgui::AnimationController::INTERPOLATOR_LINEAR);
				m_bDoingSlowFade = false;
			}
		}
		// if we're doing a slow fade out but the player has now mouse overed another door, do the fade quickly
		if (m_bDoingSlowFade && m_hQueuedDoor.Get() != NULL)
		{
			vgui::GetAnimationController()->RunAnimationCommand(this, "Alpha", 0, 0, ASW_HEALTH_REPORT_FADE_TIME, vgui::AnimationController::INTERPOLATOR_LINEAR);
			m_bDoingSlowFade = false;
		}
	}
	// check for updating health
	C_ASW_Door* pDoor = GetDoor();
	if (gpGlobals->curtime >= m_fNextUpdateTime && pDoor)
	{
		// set the health label accordingly
		int health = pDoor->GetHealth();

		if (health != m_iOldDoorHealth)
		{
			m_iOldDoorHealth = health;
			m_fDoorHealthFraction = pDoor->GetHealthFraction(m_iDoorType);
		}
		m_fNextUpdateTime = gpGlobals->curtime + 0.05f;
	}

	// reposition	
	if (pDoor)
	{	
		int mx, my, iDoorType;	
		if ( pDoor->IsAlive() && pDoor->GetHealthFraction(iDoorType) < 1.0f && !pDoor->IsOpen() && !pDoor->IsDormant() && GetDoorHealthBarPosition( pDoor, mx, my ) )
		{
			mx = clamp(mx, 0, ScreenWidth() - GetWide());
			my = clamp(my, 0, ScreenHeight() - GetTall());

			SetPos(mx, my);
		}
		else
		{
			SetDoor( NULL );
			return;
		}
	}
	
}