i was wondering if anyone could give me a script to apply to a book thats similer to Spell Tomes book scripts but with some extras. checks to see if you already have the spells provided by the script. and for it to loop so it initiates every time you opent he book
tyreil829
Aug 3 2008, 11:22 PM
still looking for a fix for it?
LTD might know if he is around
Col John Sheppard
right if anyone can help me with that fix the main post is actually about a page down
LoginToDownload
Aug 4 2008, 01:51 AM
I never downloaded Spell Tomes, but basically you open a book and a spell is given, right? Any particular reason why you want a check for if the player already has the spell, or just clean scripting? AddSpell doesn't actually do anything if the player already has the spell.
yeah i just want the powers added to the player whenever he reads the book. i'm just looking for a way to fix the bug of the vanishing spells in the older Toaster Says Share and Recruit
LoginToDownload
Aug 4 2008, 04:36 AM
In that case, the script should go...
CODE
scn MySpellbookScript
Begin OnActivate
AddSpell MySpell
;Repeat for other spells if necessary
end
Begin OnEquip
AddSpell MySpell
;Repeat for other spells if necessary
end
OnActivate runs when the book is activated in the world, and OnEquip when you select the book in your inventory.
ok thanks a bunch but how do i attatch the script to the book? and does addspell work on powers too?
EDIT: Oh and do i use the spells Base or Ref ID?
EDIT: i tried it and it said nested sotmhign blocks arnt allowd what did i do wrong?
darkninjaproductions
Aug 4 2008, 07:02 AM
you use the spell Ref ID.
you find the book you want in the CS and then open up its properties and click drop down menu and select the script.

there is the window that should pop up.
what do you mean by powers ?
cus if you mean skills then yes
CODE
player.ModActorValue "(Replace with skill)"
and this will boost your skill.
so in theory you will have something like this.
CODE
scn MySpellbookScript
Begin OnActivate
AddSpell MySpell
player.ModActorValue "skill"
;Repeat for other spells/skills if necessary
end
Begin OnEquip
AddSpell MySpell
player.modactorvalue "skill"
;Repeat for other spells/skills if necessary
end
no by powers i mean greater and Lesser powers that are also present int he spellbook but not considerd spells
EDIT still what did they mean "Nested Begin/end blocks are not allowd"?
darkninjaproductions
Aug 4 2008, 08:17 AM
just make shore there is a gap between begin and wat follows and between end and whatever is b4 it.
LoginToDownload
Aug 4 2008, 02:30 PM
Make sure that the structure of the Begin/End blocks goes...
Begin
Do Stuff
End
Begin
Do Stuff
End, instead of something like...
Begin
Do Stuff
Begin
Do Stuff
End
End. AddSpell does work on Greater and Lesser powers, and incidentally Abilities and Diseases. In fact, they're all (including actual spells) subtypes of the Spell. To attach the script to your book, open up the book in the Object window and select your script from the drop-down box labeled "Script", just below the ID.
does that include the two begins that exist in the two diffrent parts of the script? its listed above
LoginToDownload
Aug 4 2008, 10:33 PM
Yup. You have to end the first before beginning the next.
ok now i'm confused. how do i add powers? i'm tryign to have the book add some lesser powers
LoginToDownload
Aug 4 2008, 11:39 PM
You add powers as if they were spells. AddSpell VampDisease, (Porphyric Hemophilia) AddSpell BSMage, (Mage Birthsign Attributes) AddSpell lpRaceKhajiitNighteye (Eye of Night Lesser Power), and AddSpell StandardFireDamageTarget1Novice (Flare Spell) are all equally valid.
ok i'll see how this works
ok this script isnt working. I keep getting this messege
line 9 Nested Begin/end blocks are not allowd
LoginToDownload
Aug 5 2008, 09:47 PM
Can you copy the exact script you use? The example doesn't turn up any errors in my CS...
scn ToasterSpellBookScript
Begin OnActivate
AddSpell 1toastcrybattle.
AddSpell 1toastmenuspell
AddSpell 1toastpowerofhate
AddSpell 1toastpowerofsharing
Begin OnEquip
AddSpell 1toastcrybattle
AddSpell 1toastmenuspell
AddSpell 1toastpowerofhate
AddSpell 1toastpowerofsharing
end
LoginToDownload
Aug 5 2008, 10:32 PM
Yup. You're missing an "end". As is, it goes Begin Begin End. Add another end a line above Begin OnEquip and you should be golden.
thanks but i give up i cant get this fix working
ihateregisteringeverywhere
Aug 5 2008, 11:14 PM
And I held so much faith in you...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.