SevenBlue Posted October 9, 2017 Share Posted October 9, 2017 I'm trying to make a quest where the player can turn in X amount of an item for X caps. I've tried mimicking the legion ear set up to no avail. I have this set up in the quest script section just fine. scn sbbountymasterscript ;This script governs the Lawbringer reward system Short GangerCount Short FingerCount But I can't compile this in the dialogue section. Set GangerCount to Player.GetItemCount SBPGFinger; Set FingerCount to (GangerCount) Player.removeitem SBPGFinger GangerCount; Player.additem caps001 FingerCount; anyone know what I'm doing wrong? Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 9, 2017 Share Posted October 9, 2017 My first guess would be that you need to specify where the declared variables are coming from: Set myquestID.GangerCount to player.getItemCount SBPGFinger Link to comment Share on other sites More sharing options...
SevenBlue Posted October 10, 2017 Author Share Posted October 10, 2017 This is the legion ear quest's first line of code Set vFreeformForlornHope03.LegionEarTotal to vFreeformForlornHope03.LegionEarTotal + vFreeformForlornHope03.LegionEar1and this is mine Set sbMarshallDialogue.GangerCount to sbMarshallDialogue.GangerCount + sbMarshallDialogue.GangerFingersbut mine isn't compiling. Link to comment Share on other sites More sharing options...
JustChill Posted October 10, 2017 Share Posted October 10, 2017 As uhmattbravo explained, it depends on where you defined your variables.Yet I see that they're in "sbbountymasterscript" which may be attached to a quest.If this in no quest script and not tied to the quest of "sbMarshallDialogue" they cannot be found and the script cannot be compiled. Link to comment Share on other sites More sharing options...
SevenBlue Posted October 11, 2017 Author Share Posted October 11, 2017 (edited) Alright my mistake for misunderstanding. This is quest script and it is tied to the quest. Okay I got it working, with just one final kink to work out. I'm trying to get the turn in to be five caps per finger but it's giving them at a 1:1 ratio. Any idea how to sort this out? Set sbmarshalldialogue.gangercount to player.getitemcount sbpgfinger player.removeitem sbpgfinger sbmarshalldialogue.gangercount player.additem caps001 sbmarshalldialogue.gangercount*5 Edited October 11, 2017 by SevenBlue Link to comment Share on other sites More sharing options...
JustChill Posted October 12, 2017 Share Posted October 12, 2017 Alright my mistake for misunderstanding. This is quest script and it is tied to the quest. Okay I got it working, with just one final kink to work out. I'm trying to get the turn in to be five caps per finger but it's giving them at a 1:1 ratio. Any idea how to sort this out? Set sbmarshalldialogue.gangercount to player.getitemcount sbpgfinger player.removeitem sbpgfinger sbmarshalldialogue.gangercount player.additem caps001 sbmarshalldialogue.gangercount*5 Hm in such cases it may not hurt to use a second variable. Set sbmarshalldialogue.gangercount to player.getitemcount sbpgfinger Set sbmarshalldialogue.capscount to sbmarshalldialogue.gangercount * 5 player.removeitem sbpgfinger sbmarshalldialogue.gangercount player.additem caps001 sbmarshalldialogue.capscountBy the way, if it happens that you use NVSE, you may even alter the message you receive for removing the fingers and adding the caps. Set sbmarshalldialogue.gangercount to player.getitemcount sbpgfinger Set sbmarshalldialogue.capscount to sbmarshalldialogue.gangercount * 5 player.removeitem sbpgfinger sbmarshalldialogue.gangercount 1 player.additem caps001 sbmarshalldialogue.capscount 1 ;1 at AddItem or RemoveItem stands for the NoSpam flag, which prevents the message from appearing! ;Now you can set up your own individual message you want the player to see, instead of the regular "Removed" and "Added" messages. ;) ;MessageEx is a NVSE function! So if you don't use NVSE or load your GECK with it, the code doesn't work. MessageEx "You've got %.0f caps for %.0f fingers." sbmarshalldialogue.capscount, sbmarshalldialogue.gangercount Link to comment Share on other sites More sharing options...
SevenBlue Posted October 13, 2017 Author Share Posted October 13, 2017 Finally got the chance to test your suggestion and it worked beautifully, thank you a bundle! Want me to name a npc in the mod after you as thanks? Link to comment Share on other sites More sharing options...
JustChill Posted October 17, 2017 Share Posted October 17, 2017 Hey, nah that's not necessary.I am already glad I could help you out. :) Link to comment Share on other sites More sharing options...
Recommended Posts