Jump to content

Just a slight problem getting this to work


Videniofthesith

Recommended Posts

Scriptname a1aStoneofFear2

Ref Player

Begin OnAdd

	Player.addspell aaastonefearkill

		SetStage AAItem3 90

	Endif

if player.getitemcount aaacorpsehands 1

	Player.addspell aaastonefearweakness
	
	Setstage AAItem4 170

Endif

End

 

What i'm wanting it to do is simple, if you aren't wearing the gauntlets (aaacorpsehands) then it kills you (the spell) when you pick up the item, but if you are wearing them and you pick it up, it adds the weakness spell and sets the stage to aaitem4 170. Right now all I have got to work is if the item is in your inventory it doesn't kill you but also doesn't add the second spell or sets the stage, but if you drop the item, it kills you. So if someone can show me what I need to change in order to make this work, or point me somewhere that can help me, I would be must thankful.

Link to comment
Share on other sites

Player is a constant, and does not require a ref. You also have a rogue Endif. You are adding the kill spell without a condition. Try this:

 

 

Scriptname a1aStoneofFear2

Begin OnAdd

If player.getitemcount aaacorpsehands 1
	player.addspell aaastonefearweakness
	Setstage AAItem4 170
Else
	player.addspell aaastonefearkill
	SetStage AAItem3 90

Endif

End

 

Link to comment
Share on other sites

I tested the new script you gave me out, and nothing. If I dropped the hands, it didn't kill me, if I had them it didn't kill me nor did it update the quest stage. What happened? Edited by Videniofthesith
Link to comment
Share on other sites

and that will work if the player is Wearing the corpsehands?

 

The script checks if the player has corpsehands and adds weakness spell if so. If not, adds the kill spell. Thinking about it, the script may be more elegant like so:

 

 


Scriptname a1aStoneofFear2

Begin OnAdd

       If player.getitemcount aaacorpsehands <=0
               player.addspell aaastonefearkill
               SetStage AAItem3 90
       Else
               player.addspell aaastonefearweakness
               Setstage AAItem4 170
       Endif

End

 

 

Link to comment
Share on other sites

Well that one worked just fine, only thing I would want to change is make it so if you had the gloves equipped it wouldn't kill you, but if you didn't have them on, it kills you. But regardless, just happy this one works. I tried to set it so it would work, with a getonequip function, but no good.
Link to comment
Share on other sites

Well that one worked just fine, only thing I would want to change is make it so if you had the gloves equipped it wouldn't kill you, but if you didn't have them on, it kills you. But regardless, just happy this one works. I tried to set it so it would work, with a getonequip function, but no good.

 

That's because your script is checking OnEquip. You should be able to equip the gloves via script. Untested:

 

 

Scriptname a1aStoneofFear2

Begin OnAdd

short equipDelay

If ( equipDelay == 0 )
	set equipDelay to 1
Elseif ( equipDelay < 10 )
	set equipDelay to equipDelay + 1
Elseif ( equipDelay > 0 )
	player.equipItem aaacorpsehands
	If player.getitemcount aaacorpsehands <=0
		player.addspell aaastonefearkill
		SetStage AAItem3 90
	Else
		player.addspell aaastonefearweakness
		Setstage AAItem4 170
	Endif
	set equipDelay to -1
Endif

End

 

Link to comment
Share on other sites

That one did nothing, when I both picked it up with and without the gloves (Corpsehands). I may just say screw it and use the other one, unless of course you know the problem. Otherwise the only thing I need help with is

http://www.thenexusforums.com/index.php?/topic/300846-help-getting-a-spell-to-remove-and-add/

that one should be simple, I got it to work fine with adding the spell when you equip the sword, only the effect does get taken off when the sword is removed.

Link to comment
Share on other sites

That one did nothing, when I both picked it up with and without the gloves (Corpsehands). I may just say screw it and use the other one, unless of course you know the problem.

 

I wrote that off the top of my head, and as I don't have your mod, I'm not even going to try to fathom what's wrong.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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