TheWanderer001 Posted March 29, 2015 Share Posted March 29, 2015 I'm trying to create a script which is on an item which will only allow it to be sold to selected merchants... and returned if it's not the right one.OBSE is being used and I can walk through a list of the local NPC(Actor := GetHighActors; merchant := Actor[x] : within in the Begin OnSell ... End) but can't find the way to detect who they actually are in order to filter on the ones I want.This is probably easy but I just haven't found it yet :(Any one ? Link to comment Share on other sites More sharing options...
TheWanderer001 Posted March 31, 2015 Author Share Posted March 31, 2015 (edited) Ok... found a solution :smile: I had to turn it on it's head and instead of trying to see which merchant it was... as I knew which merchants I was looking for... I check to see if the merchant can see the player instead...I could also possibly have done it with a quest... but didn't go that route though. Edited March 31, 2015 by The-Wanderer Link to comment Share on other sites More sharing options...
forli Posted April 1, 2015 Share Posted April 1, 2015 There is an easy way: GetActiveMenuRef ref merchant Begin MenuMode 1009 ... Let merchant:= GetActiveMenuRef 1009 ... End Link to comment Share on other sites More sharing options...
TheWanderer001 Posted April 1, 2015 Author Share Posted April 1, 2015 Hi Faithful poster Yes that will give me the merchant reference but I would still need a way to find out if it is one I'm lookin for or not ??? Link to comment Share on other sites More sharing options...
forli Posted April 1, 2015 Share Posted April 1, 2015 (edited) Once you obtained the merchant reference in the variable, you can use it as you want. You want to check if the merchant is the one you're looking for, ok, who's the one you're looking for?You're looking for a specific merchant "Mister X"? In this case, you can do: If ( merchant.GetIsReference MisterXbaseObject ) ; this is the merchant I need. Do stuff here... EndIf Edited April 1, 2015 by forli Link to comment Share on other sites More sharing options...
Recommended Posts