Rece

Trouble with merchant script

Recommended Posts

Hey guys, I'm having just a little bit of trouble with a merchant. I've had FS try to fix the problem, but there were several different turnouts. So, each time he edited the script, or if I did, the store would open at random times.

 

For example: the 1st, 3rd, and 5th times, etc... Or 1st time, but none after that. Any solution to this? I've made two other merchants that work perfectly fine, but for some reason, this one doesn't work. If you guys have any suggestions, please leave them here :)

 

void main()
{
    object oStore = GetObjectByTag("rece_droidm");
    object oSpeaker = GetFirstPC();

    if(GetIsObjectValid(oStore) == 0)
    {
        oStore = CreateObject(OBJECT_TYPE_STORE, "rece_droidm", GetLocation(GetFirstPC()));
    }

    OpenStore(oStore, oSpeaker);
}

Share this post


Link to post
Share on other sites
Guest R2-X2

Perhaps the line is spoken by the NPC? For me, merchant scripts only work if the line is spoken by the PC. So I added an empty reply after the NPC's "open store" line, and had the script fire there.

Share this post


Link to post
Share on other sites

Also you really REALLY don't want to set the store in the same script you call up the store.

Like OE does, just set the store as you first talk to them, then later on call it. It's either way always on the map, so actually having it there by .git rather than spawning it in should be a second step if the first still isn't working.

Share this post


Link to post
Share on other sites

Well, I have the same problem! I tried out unlimited script variations - shop is in .git too... script fires at PC or NPC whatever... soon I have to delete my files at all I can't resolve this problem. 
Shop is opens, but if I close it, it opens again automatically. Unlimited times. I just don't understand I made similar and same mods of like this for k1 there weren't any problem like this.

Note: I tried with script ends with a line what re-opens dialogue and that still won't work. 
I need help as I can't resolve this alone.

Update Posted 15 June 2016 - 10:52 AM

Solved - but, I got another glitch or something with this script lines, when I close my store I can't click on objects, can't use anything even can't press escape to access menu. Why? Is there anything that I can do to resolve this?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.