Jump to content

Ring of the Daywalker


JymXu

Recommended Posts

I'm writing a script for a ring so that when it's equipped, NPCs will treat the (vampire) player as normal as well as removes sun damage.

Right now it removes the aforementioned negatives when the ring is "picked up"/activated, but then I can't seem to add then back on without overriding the removal script.

 

So if someone could tell me...

 

How to check if an item is equipped, I think I can handle the rest.

 

Also if this is the wrong place for this post please let me know where the appropriate place is.

 

Thank you for your help

Link to comment
Share on other sites

Finally!!!

 

It took me long enough but I found the answer.

This works like a charm:

 

begin Daywalker

 

short state

short OnPCEquip

short doOnce

 

if ( PCVampire != 1) ; if player is not a vampire, don't do anything

return

endif

 

if ( OnPCEquip == 0)

if ( state == 0 ) ; if the ring is not equipped, don't do anything yet

return

else

Player->AddSpell, "Vampire Sun Damage"

Player->AddSpell, "Vampirism"

if ( doOnce == 1 )

return

else

MessageBox "You feel the sting of the sun once again." ; remind the player that the Sun hurts again

set doOnce to 1 ; to stop the script form looping

set state to 0 ; to allow the reapplication of effects once equipped again

endif

endif

else

if ( state == 0 ) ; do these steps if equipped

Player->RemoveSpell, "Vampire Sun Damage"

Player->RemoveSpell, "Vampirism"

MessageBox "You feel as though the night travels with you." ; let the player know that the Sun doesn't hurt

set state to 1 ; to show that it is equipped

set doOnce to 0 ; to allow reversal of effects once unequipped

endif

endif

 

end Daywalker

 

Then have this script run on your chosen ring.

I wrote this myself but used the "Morrowind Scripting for Dummies" as a guide.

 

Thanks to "Morrowind Scripting for Dummies" 9th Edition (and all those who help with it).

Link to comment
Share on other sites

  • 2 years later...

Have you uploaded this anywhere? I've tried mods that remove sun damage entirely but they don't seem to work with 'Vampire Embrace' or 'Vampiric Hunger', which I love to use. I also tried making the mod myself with the script you provided but alas couldn't get the effects to work right. I got the ring(well, mine's actually an amulet...) to show up in-game, and when equipped and unequipped it gives the messages. It also makes my face look normal when worn and then it goes back to vampiric when taken off. I was hoping to look vampiric with it on, and just have immunity to sun damage... is that not possible?

 

Decided I might as well upload what I made. http://morrowind.nexusmods.com/mods/42517/?tab=1&navtag=%2Fajax%2Fmoddescription%2F%3Fid%3D42517%26preview%3D&pUp=1

Edited by Sanguine Justice
Link to comment
Share on other sites

Try it like this :

 

begin Daywalker

short state
short OnPCEquip
short doOnce

if ( PCVampire != 1) ; if player is not a vampire, don't do anything
return
endif

if ( OnPCEquip == 0)
if ( state == 0 ) ; if the ring is not equipped, don't do anything yet
return
else
Player->AddSpell, "Vampire Sun Damage"
;Player->AddSpell, "Vampirism"
if ( doOnce == 1 )
return
else
MessageBox "You feel the sting of the sun once again." ; remind the player that the Sun hurts again
set doOnce to 1 ; to stop the script form looping
set state to 0 ; to allow the reapplication of effects once equipped again
endif
endif
else
if ( state == 0 ) ; do these steps if equipped
Player->RemoveSpell, "Vampire Sun Damage"
;Player->RemoveSpell, "Vampirism"
MessageBox "You feel as though the night travels with you." ; let the player know that the Sun doesn't hurt
set state to 1 ; to show that it is equipped
set doOnce to 0 ; to allow reversal of effects once unequipped
endif
endif

end Daywalker

 

with the add / remove vampirism spells commented out it should allow you to remove the sun damage while still showing as a vampire. Remember, the sun damage is the only part you really want to remove.

Edited by chaosislife
Link to comment
Share on other sites

  • Recently Browsing   0 members

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