Jump to content

Recommended Posts

Posted

Hiya Im writing a script that applies a blessing to a player when they release a soul from a soulgem via a spell. I want to make it so that greater, common, lesser, petty soulgems cause the player to recieve a blessing. Heres what I have so far

 

Scriptname zzz_ReleaseWhiteSoulScript extends activemagiceffect

SoulGem Property SoulGemGrand Auto
SoulGem Property SoulGemGreater Auto
SoulGem Property SoulGemCommon Auto
SoulGem Property SoulGemLesser Auto
SoulGem Property SoulGemPetty Auto
MiscObject Property SoulGemShards Auto
Sound Property FailureSFX Auto
message property failureMSG auto
message property SuccedGrandMSG auto
message property SuccedGreaterMSG auto
message property SuccedCommonMSG auto
message property SuccedLesserMSG auto
message property SuccedPettyMSG auto
Spell property BlessingGreater auto
Spell property BlessingCommon auto
Spell property BlessingLesser auto
Spell property BlessingPetty auto

EVENT OnEffectStart(Actor akTarget, Actor akCaster)
objectReference caster = akCaster
if caster.getItemCount(SoulGemGrand) >= 1
caster.removeItem(SoulGemGrand, 1, TRUE)
Game.GetPlayer().ModActorValue("magicka", 2)
caster.addItem(SoulGemShards, 2, FALSE)
SuccedGrandMSG.show()
elseif caster.getItemCount(SoulGemGreter) >= 1
caster.removeItem(SoulGemGreater, 1, TRUE)

-->
caster.addItem(SoulGemShards, 2, FALSE)
SuccedGreaterMSG.show()
elseif caster.getItemCount(SoulGemCommon) >= 1
caster.removeItem(SoulGemCommon, 1, TRUE)
--->
caster.addItem(SoulGemShards, 2, FALSE)
SuccedCommonMSG.show()
elseif caster.getItemCount(SoulGemLesser) >= 1
caster.removeItem(SoulGemLesser, 1, TRUE)
--->
caster.addItem(SoulGemShards, 2, FALSE)
SuccedLesserMSG.show()
elseif caster.getItemCount(SoulGemPetty) >= 1
caster.removeItem(SoulGemPetty, 1, TRUE)
--->
caster.addItem(SoulGemShards, 2, FALSE)
SuccedPettyMSG.show()
else
FailureSFX.play(caster)
failureMSG.show()
endif
endEVENT

 

As you can see there are gaps where the spell cast function should be as I have no idea how to do it.

Posted
  On 11/28/2014 at 4:19 AM, lofgren said:

Make the spells cast on self and have the player cast them. That is the way that shrines do it.

So I just need to put in (blessing Name).cast(playerRef, playerRef) ?

  • Recently Browsing   0 members

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