Jump to content

Making a turn in quest


SevenBlue

Recommended Posts

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

This is the legion ear quest's first line of code

Set vFreeformForlornHope03.LegionEarTotal to vFreeformForlornHope03.LegionEarTotal + vFreeformForlornHope03.LegionEar1



and this is mine

Set sbMarshallDialogue.GangerCount to sbMarshallDialogue.GangerCount + sbMarshallDialogue.GangerFingers

but mine isn't compiling.

Link to comment
Share on other sites

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 by SevenBlue
Link to comment
Share on other sites

 

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.capscount

By 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...