JymXu Posted January 20, 2011 Share Posted January 20, 2011 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 More sharing options...
JymXu Posted January 20, 2011 Author Share Posted January 20, 2011 Finally!!! It took me long enough but I found the answer.This works like a charm: begin Daywalker short stateshort OnPCEquipshort doOnce if ( PCVampire != 1) ; if player is not a vampire, don't do anything returnendif 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 endifelse 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 endifendif 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 More sharing options...
JymXu Posted January 20, 2011 Author Share Posted January 20, 2011 double checked it and it still works great if you remove/don't-put-in the parts about the Vampirism spell. Link to comment Share on other sites More sharing options...
Sanguine Justice Posted May 16, 2013 Share Posted May 16, 2013 (edited) 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 May 16, 2013 by Sanguine Justice Link to comment Share on other sites More sharing options...
chaosislife Posted May 20, 2013 Share Posted May 20, 2013 (edited) Try it like this : begin Daywalkershort stateshort OnPCEquipshort doOnceif ( PCVampire != 1) ; if player is not a vampire, don't do anythingreturnendifif ( OnPCEquip == 0)if ( state == 0 ) ; if the ring is not equipped, don't do anything yetreturnelsePlayer->AddSpell, "Vampire Sun Damage";Player->AddSpell, "Vampirism"if ( doOnce == 1 )returnelseMessageBox "You feel the sting of the sun once again." ; remind the player that the Sun hurts againset doOnce to 1 ; to stop the script form loopingset state to 0 ; to allow the reapplication of effects once equipped againendifendifelseif ( state == 0 ) ; do these steps if equippedPlayer->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 hurtset state to 1 ; to show that it is equippedset doOnce to 0 ; to allow reversal of effects once unequippedendifendifend 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 May 20, 2013 by chaosislife Link to comment Share on other sites More sharing options...
Recommended Posts