Player's Leveled Spell

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Introduction[edit | edit source]

In this article we are going to learn how to create a quest script for a leveled spell (a spell that becomes more powerful if you reach a higher level) for the player because there already exists a method for NPC’s just like the leveled lists (leveled spell). We are going to create 5 spells and 1 script (I used 5 different stages but you can choose that for yourself if you want to do so but then you’ll have to change the whole script). the script consists of 2 parts: In the first part we are going to determine the player’s destruction level (because my spell belongs to the school of destruction). Below 25 is novice, between 25 and 50 is apprentice, between 50 and 75 is journeyman, between 75 and 100 is expert and 100 (or above) is master. The second part is used to add the right spell to the player and to remove all the rest. This isn’t a difficult script so you should understand most of it if you read the script.

The Script[edit | edit source]

Scn Script

Short Novice
Short Apprentice
Short Journeyman
Short Expert
Short Master

Begin Gamemode
     If Player.GetActorValue Destruction <= 24
          Set Novice to 1
     Elseif Player.GetActorValue Destruction >= 25 && Player.GetActorValue Destruction <= 49
          Set Apprentice to 1
     Elseif Player.GetActorValue Destruction >= 50 && Player.GetActorValue Destruction <= 74
          Set Journeyman to 1
     Elseif Player.GetActorValue Destruction >= 75 && Player.GetActorValue Destruction <= 99
          Set Expert to 1
     Elseif Player.GetActorValue Destruction >= 100
          Set Master to 1
     Endif

     If Novice == 1
          Player.Addspell 000SpellNovice
          Player.Removespell 000SpellApprentice
          Player.Removespell 000SpellJourneyman
          Player.Removespell 000SpellExpert
          Player.Removespell 000SpellMaster
     Elseif Apprentice == 1
          Player.Removespell 000SpellNovice
          Player.Addspell 000SpellApprentice
          Player.Removespell 000SpellJourneyman
          Player.Removespell 000SpellExpert
          Player.Removespell 000SpellMaster
     Elseif Journeyman == 1
          Player.Removespell 000SpellNovice
          Player.Removespell 000SpellApprentice
          Player.Addspell 000SpellJourneyman
          Player.Removespell 000SpellExpert
          Player.Removespell 000SpellMaster
     Elseif Expert == 1
          Player.Removespell 000SpellNovice
          Player.Removespell 000SpellApprentice
          Player.Removespell 000SpellJourneyman
          Player.Addspell 000SpellExpert
          Player.Removespell 000SpellMaster
     Elseif Master == 1
          Player.Removespell 000SpellNovice
          Player.Removespell 000SpellApprentice
          Player.Removespell 000SpellJourneyman
          Player.Removespell 000SpellExpert
          Player.Addspell 000SpellMaster
     Endif
End

Notes[edit | edit source]

If you have some problems or questions, please put them on the talk page of this article and not on this page, thank you.