PDA

View Full Version : Merchants and Dubious


t7x53
05-17-2004, 09:01 PM
This is sort of out of place in Quests but I was hoping to get a little insight from some other quest builders. At the moment NPCs will still sell to you if you are Dubious to them. Is there a way to prevent an NPC from selling to someone that has dubious or lower faction. Did I miss something obvious and it should be working, or is it not yet implemented.

If its not implemented, any suggestions on trying to go about accomplishing this? :)

smogo
05-18-2004, 12:10 AM
Not implemented afaik.

Easiest way would be to block processing early in client_process (i think it's there where the right click calls for merchent interaction), and issue a reject messsage instead of opening the trade window.

No way handling this with quests imho. This would allow for more customized reject messages, but requires an event to be defined (in Perl at least). Just insights, however, to good luck working on that if you intend to :)

animepimp
05-18-2004, 01:56 AM
Yeah theres no way to do this in quests since none of the quest events trigger off of looking at the merchants inventory or buying or selling. You could write a new event that triggers when someone tries to buy something from a merchant, but the code to stop the merchant from displaying their inventory would still have to be in the server.

m0oni9
05-18-2004, 04:07 AM
Well.. I think you could just define a variable in the quest (ie: $shopfaction). The server would just need to check and see if that variable is defined in the quest package for that mob, and use that. A better way, if you even needed to have per-npc sell factions, might be to add a column into npc_types, and alter the npc type struct.