Carnatics Posted August 27, 2013 Share Posted August 27, 2013 I want to make a mod that allows the player to barter with every npc to accomplish this it has to be done on script basejust to reduce the amount of work. so here is the idea making a simple conservation quest that has only the line "We should trade" or something similar and make this topic "link from ANY" "toplevel" and without any requiermentsnow every npc has this pharse. in the end script is the showbartermenu command, so far so good...now to the problem even if the npc has some stuff in his inventory it will not be shown because his services are not set to trade how the hell could i activate it for all npcs without affecting the allready existing venors lets say i make in the begin script line something like SetClass VendorWeapons how do i make the script use the npc iam talking to at the moment? and how do i reset the npcs class after the trade ? every help i welcome Link to comment Share on other sites More sharing options...
Belthan Posted August 27, 2013 Share Posted August 27, 2013 I believe SetClass is a reference function, so you can just call it in the result script and it will set the class of the conversation Subject. You could use a series of "if GetIsClass <whatever> == 1" statements beforehand to remember the NPCs original class (and possibly match them up with conditions on the dialog topic, if you don't want to code for every single class in the game). Then use SetClass again when the bartermenu is closed. Link to comment Share on other sites More sharing options...
Carnatics Posted August 28, 2013 Author Share Posted August 28, 2013 thanks for the replyi made a workarround 1 a talking option that every npc uses 2 a dummy npc in a special cell with its own merchant container 3 A Ranom Leveled item lis So when you choose the barter dialog, the begin script says add some random obects to the barter chest then Open the barterdmenu from the dummy npcand the endscript says remove all items from the barter chest so immediatly after the trade all items are removed and the only dialog option is goodbye (to prevent calling it 100times and cheat) the procedure is. --->hello--->lets Trade---->trading---->reseting the vendor chest to randomize---->goodbye this affects not the trading options for vendors cuz it works independently of each other Link to comment Share on other sites More sharing options...
Carnatics Posted August 28, 2013 Author Share Posted August 28, 2013 Topic can be closed .thx Link to comment Share on other sites More sharing options...
Recommended Posts