• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Merchant!!

As you may know, 'Pchar' always refers to the main character and in dialog files 'NPchar' to the guy you're talking to.

You should delete those attributes you added to the Pchar after the dialog is over and re-add it when you talk again to that character, that's for avoiding potential bugs. I don't know much about the trading-items code (speaking of merchant, the only thing I played with was their sounds...), but if by default some items usually shouldn't be visible in this menu there have to be some reason for that.

I think that this time you can use a dialogexitquest for the DeleteAttribute(PChar,"alwaysshowitems.whatever"); part, just as you did first for the PChar.AlwaysShowItems.whatever = true;. I checked that and it worked.
 
DialogExitQuest is a really good idea! I think that should work!
The .alwaysshow attribute overrides any reasons for not showing an item, such as player level or the .rare attribute of the item. Really rare items are NEVER sold. But possibly they WILL be sold if they have a .alwaysshow attribue set. So there should not be such an attribute unless for a good reason. Such as you wanting a certain trader to sell certain items. But in that case the attribute should ONLY apply to that trader, so you need to give it just before opening his item trade interface and remove it shorty after.
 
Sorry took me a while to answer, I lost my internet, distributor problem. I'm using my cousin PC atm I took note of what you guys write and gonna work somethings out.

I also want my merchant to check the character if he got 1000cwt available for a supply run. The PChar will have to make 4 runs of supplies and I want the merchant the check if he really have the space for it. I look at the other merchant as reference and it's not the way I want it. For example; I want the PChar to bring 250 planks, worth 1000 in cargo, to Redmond. Also once at Redmond how I tell the NPChar to check if the PChar got the 250planks on bord?


<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
To check if the player has enough cargo space:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(GetSquadronFreeSpace(pchar, GOOD_PLANKS) > 250)<!--c2--></div><!--ec2-->
To check if the player has got 250 planks:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(GetSquadronGoods(pchar, GOOD_PLANKS)>250)<!--c2--></div><!--ec2-->
Hopefully that works.
 
Thx Pieter.


<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Back
Top