Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
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?

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.