Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Neverwinter Nights: Enhanced Edition has been released! Visit to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Why isnt this working?

vonstormvonstorm Member Posts: 21
I have a conversation with a realtor that sells properties. When the realtor sells a property it gives the deed and marks the item as sold.
void main()
    // Get the PC who is in this conversation.
    object oPC = GetPCSpeaker();
    string pcname = GetName (oPC);
    // Give deed to the PC.
    CreateItemOnObject("deedwork003", oPC);
    // mark property as sold
    SetCampaignInt ("housing","workshop3",1,oPC);
    // debug
    int itest = GetCampaignInt("housing","workshop3",oPC);
    string stest = IntToString (itest);
    FloatingTextStringOnCreature ("Int is now "+stest, oPC);
    // assign name for sign
    SetCampaignString ("housing","workshop3",pcname,oPC);
     // Take 10000 gold from the PC.
    TakeGoldFromCreature(10000, oPC, TRUE);

Then each property in the conversation tree checks to see if its available to show up in the conversation
int StartingConditional()

    // Inspect local variables
     object oPC = GetPCSpeaker ();
     if(GetCampaignInt("housing", "workshop3",oPC) > 0)
        return FALSE;

    return TRUE;

Problem is that the property is still showing up after its sold -
What am I doing wrong?


Sign In or Register to comment.