Jump to content

Would some kind soul take a look at these gdas/xls files, please?


LadyHonor

Recommended Posts

Here is the script....works for everything else but the castle exit.

#include "wrappers_h"
#include "utility_h"
#include "sys_ambient_h"
#include "plt_gen00pt_class_race_gend"
#include "plt_gen00pt_party"
#include "plt_genpt_dog_main"
#include "plt_bhn100pt_dog"
#include "plt_bhn100pt_gilmore"
#include "plt_lhc_highever_events"

void main()
{
    if (WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND, GEN_CLASS_WARRIOR) && WR_GetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_EQUIP_PLAYER) == FALSE)
    {
        object oGilmore =  GetObjectByTag("bhn100cr_gilmore");

        object oPlayersBoots =   GetItemInEquipSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
        object oPlayersChest = GetItemInEquipSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
        object oPlayersGloves = GetItemInEquipSlot(INVENTORY_SLOT_GLOVES,OBJECT_SELF);
        object oPlayersMnHand = GetItemInEquipSlot(INVENTORY_SLOT_MAIN, OBJECT_SELF);
        object oPlayersOffHand = GetItemInEquipSlot(INVENTORY_SLOT_OFFHAND, OBJECT_SELF);

        WR_DestroyObject(oPlayersBoots);
        WR_DestroyObject(oPlayersChest);
        WR_DestroyObject(oPlayersGloves);
        WR_DestroyObject(oPlayersMnHand);
        WR_DestroyObject(oPlayersOffHand);

        resource rArmor = R"lhc_noble_armor.uti";
        resource rBoots = R"lhc_noble_boots.uti";
        resource rGloves = R"lhc_noble_gloves.uti";
        resource rSword = R"lhc_noble_sword.uti";
        resource rShield = R"lhc_noble_shield.uti";
        resource rMedal = R"lhc_noble_medal.uti";
        resource rGShield = R"gen_im_arm_shd_kit_cus.uti";

        object oArmor= CreateItemOnObject(rArmor,OBJECT_SELF);
        object oBoots= CreateItemOnObject(rBoots,OBJECT_SELF);
        object oGloves= CreateItemOnObject(rGloves,OBJECT_SELF);
        object oSword= CreateItemOnObject(rSword,OBJECT_SELF);
        object oShield= CreateItemOnObject(rShield,OBJECT_SELF);
        object oMedal= CreateItemOnObject(rMedal,OBJECT_SELF);
        object oGShield= CreateItemOnObject(rGShield,oGilmore);

        EquipItem(OBJECT_SELF, oArmor, INVENTORY_SLOT_CHEST);
        EquipItem(OBJECT_SELF, oBoots, INVENTORY_SLOT_BOOTS);
        EquipItem(OBJECT_SELF, oGloves, INVENTORY_SLOT_GLOVES);
        EquipItem(OBJECT_SELF, oSword, INVENTORY_SLOT_MAIN);
        EquipItem(OBJECT_SELF, oShield, INVENTORY_SLOT_OFFHAND);
        EquipItem(OBJECT_SELF, oMedal, INVENTORY_SLOT_NECK);
        EquipItem(oGilmore, oGShield, INVENTORY_SLOT_OFFHAND);
        WR_SetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_EQUIP_PLAYER, TRUE);
    }
    if (WR_GetPlotFlag(PLT_GEN00PT_CLASS_RACE_GEND, GEN_CLASS_ROGUE) && WR_GetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_EQUIP_PLAYER) == FALSE)
    {
        object oGilmore =  GetObjectByTag("bhn100cr_gilmore");

        object oPlayersBoots =   GetItemInEquipSlot(INVENTORY_SLOT_BOOTS,OBJECT_SELF);
        object oPlayersChest = GetItemInEquipSlot(INVENTORY_SLOT_CHEST,OBJECT_SELF);
        object oPlayersGloves = GetItemInEquipSlot(INVENTORY_SLOT_GLOVES,OBJECT_SELF);

        WR_DestroyObject(oPlayersBoots);
        WR_DestroyObject(oPlayersChest);
        WR_DestroyObject(oPlayersGloves);

        resource rArmor = R"lh_studded_onyx.uti";
        resource rBoots = R"lh_studded_boots_onyx.uti";
        resource rGloves = R"lh_studded_gloves_onyx.uti";
        resource rGShield = R"gen_im_arm_shd_kit_cus.uti";

        object oArmor= CreateItemOnObject(rArmor,OBJECT_SELF);
        object oBoots= CreateItemOnObject(rBoots,OBJECT_SELF);
        object oGloves= CreateItemOnObject(rGloves,OBJECT_SELF);
        object oGShield= CreateItemOnObject(rGShield,oGilmore);

        EquipItem(OBJECT_SELF, oArmor, INVENTORY_SLOT_CHEST);
        EquipItem(OBJECT_SELF, oBoots, INVENTORY_SLOT_BOOTS);
        EquipItem(OBJECT_SELF, oGloves, INVENTORY_SLOT_GLOVES);
        EquipItem(oGilmore, oGShield, INVENTORY_SLOT_OFFHAND);
        WR_SetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_EQUIP_PLAYER, TRUE);
    }
    if (WR_GetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_HIGHEVER_CREATE_ITEMS) == FALSE)
    {
        object oArea = GetObjectByTag("bhn100ar_castle_cousland");
        object oMessenger = GetObjectByTag("lhc_messenger");

        location vMessenger = Location(GetArea(oArea), Vector(1.56114,-14.4458,0.00912), 178.6);
        location vTravel = Location(GetArea(oArea), Vector(16.1881,-6.0726,2.52325), 89.911);
        location vStatue = Location(GetArea(oArea), Vector(-69.4236,21.4038,3.00912), -89.911);

        CreateObject(OBJECT_TYPE_CREATURE, R"lhc_messenger.utc", vMessenger);
        CreateObject(OBJECT_TYPE_PLACEABLE, R"lhc_exit_castle.utp", vTravel);
        CreateObject(OBJECT_TYPE_PLACEABLE, R"lhc_naming_statue.utp", vStatue);
        SetPlotGiver(oMessenger, TRUE);
        Ambient_Start(oMessenger, AMBIENT_SYSTEM_ENABLED, AMBIENT_MOVE_NONE, AMBIENT_MOVE_PREFIX_NONE, 24, AMBIENT_ANIM_FREQ_ORDERED);
        WR_SetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_HIGHEVER_CREATE_ITEMS, TRUE);
    }
    if (WR_GetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_MESSAGE_DELIVERED) == FALSE)
    {
        object oArea = GetObjectByTag("bhn100ar_castle_cousland");
        object oExit = GetObjectByTag("lhc_exit_castle");

        SetObjectActive(oExit, FALSE);
    }
    if (WR_GetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_TRANSITION_CASTLE) == TRUE)
    {
        object oPC = GetMainControlled();
        object oArea = GetArea(oPC);

        WR_SetPlotFlag(PLT_LHC_HIGHEVER_EVENTS, LHC_TRANSITION_CASTLE, FALSE);

        location vHero = Location(GetArea(oPC), Vector(10.3916,-6.01946,0.40071), 90.0);
        command cJump = CommandJumpToLocation(vHero);
        object[] aParty = GetPartyList();
            int n;
            int nPartySize = GetArraySize(aParty);
            for (n = 0; n < nPartySize; n++)
            {
                WR_AddCommand(aParty[n], cJump, TRUE, FALSE, COMMAND_ADDBEHAVIOR_DONTCLEAR);
            }
    }
}
Link to comment
Share on other sites

it needs rotation, but I can't swear that using the rotation from .are is going to work. You appear to be using the 'first number' from the item using the area file method. I don't know if that is the correct number to use when there is only one orientation number.

 

to make sure that the dialogue occurs regardless of where the player has the mouse, you would have to 'brick' the door rather than having one placeable dead center.

 

and you have other options, it isn't like being able to talk to a door is a natural occurrence so that you have to do it that way or break immersion. You could use some other object or add a guard to the door for this conversation about whether you want to go to a day or night area. Or there is an 'invisible trigger' that some have talked about using to start conversations. Or you can do it as a part of the 'area' script that you are transitioning to.

Link to comment
Share on other sites

I DID IT!!!!!!!!!!!! YAY!!!!!!!!!!! *DANCING AROUND MY DEN* LOL

 

I made a door and using the same cooridinates as I did for the little invisible block, I wrote a script in the plot instead of PCRSCR to create the door after you've accepted the quest. I'm sure though it would work just as easily doing it in the PCRSCR, though. In the placeable properties, I set the door's initial state as Closed_Locked and impossible to pick, but it kept creating it as unlocked. Soooo, I took Tinimaus earlier advice and made a custom placeable script.

case EVENT_TYPE_USE:
            SetPlaceableState(oDoor, PLC_STATE_DOOR_LOCKED);
            UT_Talk(oDoor, oPC);
            Placeable_HandleUsed(ev);
            break;

When you first hover your pointer over it, it does show as unlocked, but as soon as you click it, it sets it as locked and impossible to pick, then brings up the dialog options, and is repeatable. YAY! :dance: I'm happy. :D

 

 

highlighted.jpg
dialog.jpg
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...