Stormscape Posted November 26, 2003 Share Posted November 26, 2003 I've created a new mod, with a traveling merchant that visits ThirskFort FrotmothANDRaven Rock So how do I write a script so he is only in one location at a time? I know script, if assigned on an NPC will effect all NPCs will thew same ID, So it's three different NPCs that look the same. Now writing a script that causes it to rotate every three game days where he is, in sequence would be hard for me. Link to comment Share on other sites More sharing options...
Marxist ßastard Posted November 26, 2003 Share Posted November 26, 2003 Here's what you'd have to do for the meat of the scripts, though it would be a better mod if you could use the same NPC at all three sites, resulting in the items sold to the NPC being retained throughout the three sites. Although it can't be done easily, I'm quite sure that it can be done with some fancy-pants NPC movement and use of GetPCCell conditionals. For the first one... If ( Day > 1 )If ( Day <= 11 )EnableElseDisable ...For the second one... If ( Day > 11 )If ( Day <= 21 )EnableElseDisable ...And the third... If ( Day > 21 )EnableElseIf ( Day == 1)EnableElseDisable ...And if you want an idea to go with the mod, then place certain objects that would make the NPC appear as if he were packing up at all three sites, and have them disabled until the gameday is equal to 11 for the first site, 21 for the second site, and 1 for the third site. Have a travel option avaliable with the NPC(s) that would allow you to travel with him when the day is equal to the aforementioned values. If you want to get really complex, then you could always give the NPC distinct schedules for each month and actually have him physically travel to each location a-la the Travelling Merchants plugin. Link to comment Share on other sites More sharing options...
Stormscape Posted November 27, 2003 Author Share Posted November 27, 2003 I'm not doing physical travel.I'll try the scripts, and maybe expirment with a travel option later on. Link to comment Share on other sites More sharing options...
Marxist ßastard Posted November 27, 2003 Share Posted November 27, 2003 Just remember that the code posted is only the meat of each script, meaning that you'll still need those pesky EndIfs, along with Begin and End declarations. If you want to have the items that the PC sells and buys kept the same, you'll have to have only one script, one NPC, and one instance of said NPC. Give the word and I'll see if I can sketch out what would be necessary to get that type of thing to work out. Link to comment Share on other sites More sharing options...
Stormscape Posted November 27, 2003 Author Share Posted November 27, 2003 That'd be nice, having the items stay the same. except said items are in a container, So buddy can run after thieves and pickpockets with his unique Daedric Dai-Katana that does serious buttkick with abosorb health 200 points per second for 5 seconds. Only Karstaag can survive him. Link to comment Share on other sites More sharing options...
Marxist ßastard Posted November 27, 2003 Share Posted November 27, 2003 If ( DDK == BadIdea )PostEndif DDK == BadIdea... Er, that is... The DDK is going to be a bad idea. Quite unbalancing... And if you're going to have most of the items in containers, then having a single NPC would at least make the NPC retain the items that the PC has sold to it, regardless of the current site. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.