Difference between revisions of "ShowBarterMenu"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>AlexanderSig
imported>Qazaaq
(moving vendor instructions)
Line 18: Line 18:
*If you call it with 100 discount, it will allow the player to view an NPC's inventory like a container -- freely move things back and forth.
*If you call it with 100 discount, it will allow the player to view an NPC's inventory like a container -- freely move things back and forth.


 
==See Also==
=='''See Also'''==
*[[Creating a new vendor]]
This tutorial will teach you about Dialogue, Buying things from NPCs and Talking Activators (Intercoms etc.)
 
How to make a vendor:
 
1 Create an NPC
 
2 Create a Quest, tick start game enabled, enter a quest ID and then click "Ok", then open the quest again.
 
3 Go into the topics tab of your quest, right click the white list on the left, click add topic, scroll down to "GREETING"
 
4 Also, create a new topic by right clicking on the list where you found "GREETING"
 
5 Right click the info tab of your GREETING and click new, make the response text whatever you want, this is what he'll say when you first talk to him. (Leave the prompt clear)
 
6 This is very important, right click the "conditions" tab and select new, click the "INVALID" button and scroll down to your NPC's ID (Make it == 1)
this makes it so that only your NPC will use the custom greeting you created.
 
7 Go to the new topic you created earlier, by using the same methods you used to create the GREETING.
 
(right click the "conditions" tab and select new, click the "INVALID" button and scroll down to your NPC's ID (Make it == 1)
 
Response text: (This is what he'll say when you click the "Buy" Button)
 
Prompt: (Whatever you want it to be) Example: I'd like to buy something.
 
Now, at the bottom in the "Result Script (Begin)" box type: SHOWBARTERMENU
 
8 Create a NEW (Meaning new ID etc.) container, put it inside your store's cell but somewhere where the player can't reach it, put whatever you want in it, this is what the merchant will sell (Hint: Caps)
 
9 Place your NPC inside your store, double click him in the render window and select merchant container, and scroll down to your container's ID, click okay, save and you're done.
 
10 Go to you quest's topic tab again and click the GREETING, go over to the "Add Topic" tab, right click it, select Add Topic and select your "Buy" topic ID.
 
Optional:
Phew, now, if you want to talk to him through an intercom.
 
1. Go to the Talking Activator Tab under "actors" and create a new one (New ID) and put it in your house.
 
2. Double click your NPC inside the store, at the top type a new ID at the top where it says "Reference Editor ID"
 
3. Create a new script:
scn (YourScriptID)
 
BEGIN OnActivate
 
setTalkingActivatorActor (Your NPC's Reference ID)
 
activate
 
END
 
and attach the script to your talking activator
 
=='''Reference'''==
None provided.
<!-- [[ShowBarterMenu_Reference|List of functions that use ShowBarterMenu]] (wiki) -->


[[Category:Functions]]
[[Category:Functions]]

Revision as of 15:08, 28 April 2009

Description

ShowBarterMenu Displays the Barter Menu. It is not called on a Reference and can take 1 parameter. The parameter is in the range [ -100, 100 ] and denotes the percentage of discount on Sell prices / inflation on Buy prices. See examples below.

Syntax

ShowBarterMenu PercentDiscount

Examples

ShowBarterMenu 50
sbm 50

The Barter Menu shows up, and the vendor sells items at 50% of their normal sell price and will buy items at 150% of their normal buy price.

Notes

  • The parameter default is 0 (no change to prices).
  • If you call it with 100 discount, it will allow the player to view an NPC's inventory like a container -- freely move things back and forth.

See Also