This forum is to be used for all discussions pertaining to Bethesda Softworks' The Elder Scrolls III: Morrowind and its Tribunal and Bloodmoon expansion packs.
I've spent ages making this script. It's not finished but I went to back it up and it's telling me the spell uvirith_enchant_book_sp can't be found. It's definitely there sitting in the spell list, saved at least ten times as well as an updated version of the plugin. I substituted the spell for fire bite as a test and the error moved to line 77 which was the next reference of the spell. This is really annoying me. I'm not that sure whether it's the spell or the script but I've spent a whole half hour tinkering with stuff and nothing has succeeded. Please help.
Thanks
ML
Begin uvirith_enchanttome
short button
short questionState
if ( OnActivate == 1 )
Set questionState to 1
Return
endif
if ( questionState == 0 )
Return
endif
if ( questionState == 1 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_SoulGem_Azura > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
endif
if ( questionState == 2 )
set button to GetButtonPressed
if ( button == 1 )
Set questionState to 0
Return
endif
if ( button == 0 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
Player->equip Misc_soulgem_petty
MessageBox "The Grace of Pride: Thank you for your pride, Lord Vivec. I shall not doubt myself, or my people, or my gods, and shall insist upon them, and my ancient rights."
[color="Red"]Cast uvirith_enchant_book_sp Player[/color]
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
Player->equip Misc_soulgem_lesser
MessageBox "The Grace of Pride: Thank you for your pride, Lord Vivec. I shall not doubt myself, or my people, or my gods, and shall insist upon them, and my ancient rights."
[color="Red"]Cast uvirith_enchant_book_sp Player[/color]
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
Player->equip Misc_soulgem_common
MessageBox "The Grace of Pride: Thank you for your pride, Lord Vivec. I shall not doubt myself, or my people, or my gods, and shall insist upon them, and my ancient rights."
[color="Red"]Cast uvirith_enchant_book_sp Player[/color]
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
Player->equip Misc_soulgem_greater
MessageBox "The Grace of Pride: Thank you for your pride, Lord Vivec. I shall not doubt myself, or my people, or my gods, and shall insist upon them, and my ancient rights."
[color="Red"]Cast uvirith_enchant_book_sp Player[/color]
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
Player->equip Misc_soulgem_grand
MessageBox "The Grace of Pride: Thank you for your pride, Lord Vivec. I shall not doubt myself, or my people, or my gods, and shall insist upon them, and my ancient rights."
[color="Red"]Cast uvirith_enchant_book_sp Player[/color]
Set questionState to 0
endif
endif
endif
End
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
Unfortunately I'm down in Cornwall at the moment so don't have access to the CS. If you haven't made progress by Friday (when I get back to London) I'll look into it.
The only thing I can suggest off the top of my head is to try putting the name of the spell in double quotes. I.E "uvirith_enchant_book_sp"
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.
And everything is hidden in the fine print.[/QUOTE]
I tried that as well. Would restarting the CS work?
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
I restarted the CS and it worked. I wasted a whole hour of my life trying to get that right. I could of been doing something much better during that time. (11PM-12AM) Like sleeping! Thanks anyway.
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
Begin uvirith_enchanttome
;This is version 1.9
;The spell does not currently cast at the same time, this version attempts to fix that seeing that version 1.2 failed
;Version 1.3 failed due to problems with the menu mode and the removing of the spell which has been changed to a curse instead of a spell being cast on a player
;Version 1.4 failed for the same reason as version 1.3, It turns out all I did was move some stuff about pointlessly
;Version 1.5 failed for the same reasons
;Version 1.6 failed due to the spell being removed at the wrong time
;Version 1.7 failed for the same reasons as 1.6 but I've nearly got it
;Version 1.8 failed because, yes you guessed it, the spell was removed at the wrong time
;If this script is being used in a different mod please use different spell IDs and change the name of the script
short button
short questionState
if (menumode == 1)
return
endif
if ( OnActivate == 1 )
player->addspell uvirith_enchant_book_sp
Set questionState to 1
Return
endif
if ( questionState == 0 )
Return
endif
if ( questionState == 1 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_SoulGem_Azura > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
endif
if ( questionState == 2 )
set button to GetButtonPressed
if ( button == 1 )
player->removespell uvirith_enchant_book_sp
Set questionState to 0
Return
endif
if ( button == 0 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
Player->equip Misc_soulgem_petty
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
Player->equip Misc_soulgem_lesser
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
Player->equip Misc_soulgem_common
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
Player->equip Misc_soulgem_greater
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
Player->equip Misc_soulgem_grand
Set questionState to 0
endif
if ( Player->GetItemCount Misc_SoulGem_Azura > 0 )
Player->equip Misc_SoulGem_Azura
Set questionState to 0
endif
MessageBox "You stare into the pages of the book and feel empowered by the knowledge that radiates from the ancient texts."
if (menumode == 0 )
return
endif
endif
endif
if (menumode == 1)
elseif (cellchanged == 1)
player->removespell uvirith_enchant_book_sp
else
Return
endif
End
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
Having just glanced at it it seems to me that you need to find a way to get past the first <if (menumode == 1)> in order to make the subsequent <if (menumode == 1)>'s to function.
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.
And everything is hidden in the fine print.[/QUOTE]
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
Magelord648 wrote:You mean the one right at the top?
Yes, as the script stands at the moment it prevents the script reader from reaching the last one it looks like to me.
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.
And everything is hidden in the fine print.[/QUOTE]
It gets past that. It only stops working when you close the enchanting screen. The spell is supposed to be removed but it isn't.
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
Could you tell us what exactly you're trying to accomplish?
I get the impression that on reading the book a spell that fortifies Enchant (and maybe Int and Luck) is cast on the PC; the script is then supposed to 'activate' the weakest soul gem in the PC's inventory for enchanting purposes; the PC then selects the item to be enchanted and the powers to be enchanted; on completion the spell is then supposed to be de-activated.
If that is what you're trying to accomplish I salute your ambition, 'cos that's one complex and darn near impossible undertaking. I can only assume that I've mis-interpreted what you're trying to achieve, so please enlighten me. If you don't wnat to 'go public', then just pm me.
That aside, do either of the removespell functions work?
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.
And everything is hidden in the fine print.[/QUOTE]
When the book (with the script attached) is activated the spell is added to the inventory. The PC is then asked if they want to enchant an item and if they click no the script stops and the spell goes. If the PC clicks yes the spell stays. Originally the spell went before you got to the enchant screen due to a command that removed the spell when out of menu mode. This was because when you select whether you want to make or recharge an item the message box doesn't count as menu mode. I fixed this by adding a menu mode checker that returns if not in menu mode. As soon as you get to the enchant screen this is passed. My problem is when you come out of the enchant or recharge screen the spell doesn't remove like it did before. So then I simply changed it so when the pc changes a cell or tries to go into the menu the spell will remove. That doesn't work either.
I hope that sheds a little light on the situation.
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
I know we're getting away from your original query, but why are you using addspell and not the
<Cast, "uvirith_enchant_book_sp", Player> function?
[QUOTE=Darth Gavinius;1096098]Distrbution of games, is becoming a little like Democracy (all about money and control) - in the end choice is an illusion and you have to choose your lesser evil.
And everything is hidden in the fine print.[/QUOTE]
When you cast it the spell doesn't get cast until when the menus stop which is after the enchant ones so all you get is something to equip your soulgems for you. Si to get around it I changed the spell to a curse in Version 1.3. This way is effective and it works but removing the spell is where it doesn't work.
This is version 1.2. It uses the cast command and if you test it you will find that it doesn't get a chance to cast until after the menus go.
Begin uvirith_enchanttome
;This is version 1.1
;The spell does not currently cast at the same time
;If this script is being used in a different mod please use different spell IDs and change the name of the script
short button
short questionState
if ( OnActivate == 1 )
Set questionState to 1
Return
endif
if ( questionState == 0 )
Return
endif
if ( questionState == 1 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
if ( Player->GetItemCount Misc_SoulGem_Azura > 0 )
MessageBox "Would you like to study the book to Enchant an Item?" "Yes" "No"
Set questionState to 2
Return
endif
endif
if ( questionState == 2 )
set button to GetButtonPressed
if ( button == 1 )
Set questionState to 0
Return
endif
if ( button == 0 )
if ( Player->GetItemCount Misc_soulgem_petty > 0 )
Player->equip Misc_soulgem_petty
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_lesser > 0 )
Player->equip Misc_soulgem_lesser
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_common > 0 )
Player->equip Misc_soulgem_common
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_greater > 0 )
Player->equip Misc_soulgem_greater
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
if ( Player->GetItemCount Misc_soulgem_grand > 0 )
Player->equip Misc_soulgem_grand
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
if ( Player->GetItemCount Misc_SoulGem_Azura > 0 )
Player->equip Misc_SoulGem_Azura
Cast uvirith_enchant_book_sp Player
Set questionState to 0
endif
MessageBox "You stare into the pages of the book and fell empowered by the knowledge that radiates from the ancient texts."
endif
endif
End
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.
I don't think anyone is checking this any more but I got it working. I added a message box with a button at the end which when pressed removed the spell.
Thanks for the help everyone!
I salute your ambition, 'cos that's one complex and darn near impossible undertaking.
I rule. :laugh:
[url="http://www.gamebanshee.com/forums/the-elder-scrolls-iii-morrowind-29/tel-uvirith-86692.html"]Uvirith Awakes[/url] - Please leave comments, all help is appreciated.