Difference between revisions of "A beginner's guide, lesson 7 - Using Scripts in Quests"
Jump to navigation
Jump to search
m
A beginner's guide, lesson 7 - Using Scripts in Quests (edit)
Revision as of 03:23, 30 December 2009
, 03:23, 30 December 2009→Designing an Object Script
imported>Pyrocow m (→Factions: missing important disposition entry) |
imported>AbundantGeekery |
||
Line 435: | Line 435: | ||
If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 1) | If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 1) | ||
Player.RemoveItem "PotionCyrodiilicBrandy" 1 | Player.RemoveItem "PotionCyrodiilicBrandy" 1 | ||
ModDisposition player 15 | |||
Set BrandyTalk to 0 | Set BrandyTalk to 0 | ||
Else | Else | ||
Line 445: | Line 445: | ||
If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 2) | If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 2) | ||
Player.RemoveItem "PotionCyrodiilicBrandy" 2 | Player.RemoveItem "PotionCyrodiilicBrandy" 2 | ||
ModDisposition player 30 | |||
Set BrandyTalk to 0 | Set BrandyTalk to 0 | ||
Else | Else | ||
Line 455: | Line 455: | ||
If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 3) | If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 3) | ||
Player.RemoveItem "PotionCyrodiilicBrandy" 3 | Player.RemoveItem "PotionCyrodiilicBrandy" 3 | ||
ModDisposition player 45 | |||
Set BrandyTalk to 0 | Set BrandyTalk to 0 | ||
Else | Else | ||
Line 465: | Line 465: | ||
If(Player.GetItemCount "PotionCyrodiilicBrandy" >= 4) | If(Player.GetItemCount "PotionCyrodiilicBrandy" >= 4) | ||
Player.RemoveItem "PotionCyrodiilicBrandy" 4 | Player.RemoveItem "PotionCyrodiilicBrandy" 4 | ||
ModDisposition player 60 | |||
Set BrandyTalk to 0 | Set BrandyTalk to 0 | ||
Else | Else | ||
Line 476: | Line 476: | ||
We attach this script once compiled to the NPC character BGMsmith using the script box in the character interface. | We attach this script once compiled to the NPC character BGMsmith using the script box in the character interface. | ||
(I removed all the BGMSmithRef. 's that were before the ModDisposition commands because that didn't work for me and since you are attaching the entire script to him you don't need the reference. -AbundantGeekery) | |||
Let’s look more closely at this script. | Let’s look more closely at this script. | ||
Line 563: | Line 565: | ||
If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 1) | If (Player.GetItemCount "PotionCyrodiilicBrandy" >= 1) | ||
Player.RemoveItem "PotionCyrodiilicBrandy" 1 | Player.RemoveItem "PotionCyrodiilicBrandy" 1 | ||
ModDisposition player 15 | |||
Set BGM001.BrandyTalk to 0 | Set BGM001.BrandyTalk to 0 | ||
Set DoOnce to 0 | Set DoOnce to 0 | ||
Line 642: | Line 644: | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | | ||
<pre>Set | <pre>Set BGMSmith.BrandyTalk to 1 | ||
Set BGM001. DoNextBrandy to 1</pre> | Set BGM001. DoNextBrandy to 1</pre> | ||
|} | |} |