Jump to content

Spells...


oblivion addict

Recommended Posts

I'm sorry if this has already been said but I'm kind of a n00b at modding. I just want to know how to put a spell into a vendor or book and have me be able to buy it or read the book and then get the new script spell that i have made. If you do have any experience on this, please reply! :)
Link to comment
Share on other sites

Use this code, but modify where it says xYourScriptNamex, and turn <tab> into an actual tab(press the tab button with <tab> selected):

 

 

 

[script]

scn xYourScriptName

 

short doonce

 

Begin OnActivate

<tab>if (doonce == 0)

<tab><tab>player.addspell xYourSpellNamex

<tab><tab>set doonce to 1

<tab><tab>Activate

<tab>else

<tab><tab>Activate

<tab>endif

[/script]

 

This is to add to a book, which will add that spell when read.

Link to comment
Share on other sites

Won't work as is, since you forgot an end. You don't actually need the doonce, as attempting to add a spell that the player already has doesn't do anything. (Actually, I think it may return 0 or 1 (not sure which) to a calling funtion, but that's not relevant here.)

 

scn xYourScriptName

Begin OnActivate
player.addspell xYourSpellNamex
Activate
end

 

Also, you can use the [ code]code here[ /code] tags for scripts and such.

Link to comment
Share on other sites

Oooooh....alrighty then. I just used someone else's script from a mod, modified it, and I guess I didn't see the end part....was using [script] [/script] as a made up separating technique...thanks Abramul. (Abrasive mullet, wasn't it?) I guess the doonce was just so it added spells once, so you could read the book as many times as you fancied.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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