Swapping out merchant items

正在查看此主题的用户

Is it possible to swap the items a vendor is selling depending on certain conditions, such as a particular skill level?

Thanks

Dain
 
I don't know, but I think that a vague location-based merchandise system exists.  However, it may just be coincidence that I only find khergit arrows in khergit towns.
 
Nah, it does not exist at all in native.
You can pretty much do anything you want with the mrechants inventory though, but it will take a bit of work.
 
Dain Ironfoot 说:
Is it possible to swap the items a vendor is selling depending on certain conditions, such as a particular skill level?

Thanks

Dain

Each merchant troop has it's own inventory which you can access via code. Check out fisheye's Autoloot code. It deals with troop inventory heavily, naturally. It should have all the code as examples that you'd need to remove items from an inventory. You'd just have to write the code for the conditions.
 
of course you can.

1) regroup all the items, make marks (_begin, _end) in module_constants.
2) set conditions in triggers, # Refresh Merchants etc.
  a) detect which town the merchant is in, which kingdom this town belongs to.
  b) setup a connection between the merchant and the town/kingdom.
  c) let the merchant purchase the only items between those *_begin and *_end.

done
 
If you want to just categorize items generally, you can use the itp_type_XYZABC flags. You'll be limited, though, to bows, arrows, one-handed weapons, polearms, shields, etc. as one group. But it's quicker. It's this way in Autoloot. If you want to make distinct categories such as "One-handed Blunt", then yes, you need to do like WilliamBerne says.
 
后退
顶部 底部