Jump to content

Script HELP


terasat

Recommended Posts

I have found a mod that does what I am looking for, but after modification of the mod, I am not getting the results I am looking for.

 

I have crunched the numbers, and then realized the script is not running at all.

 

scriptname 1LevelmanaScriptAdv

short doonce
float fQuestDelayTime

float mode

float oldMagicka
float newMagicka
float newIntelligence

float var1
float var2
float var3
float var4
float var5
float var6
float var7
float var8
float var9
float vMagic
float oOut
float vBirth
float vRace

begin GameMode

if ( doonce != 4 )
set doonce to 4
set mode to 1.0
set fQuestDelayTime to 0.01
set oldMagicka to -1
endif

set var8 to player.getav Restoration
set var7 to player.getav Mysticism
set var6 to player.getav Illusion
set var5 to player.getav Conjuration
set var4 to player.getav Alteration
set var3 to player.getav Destruction
set var2 to player.getav Intelligence
set var1 to player.getlevel

set vBirth to 0

if ( GetIsPlayerBirthsign BirthSignApprentice == 1 ) 
set vBirth to ( ( 5 * var1 ) + 100 )
endif

if ( GetIsPlayerBirthsign BirthSignMage == 1 ) 
set vBirth to ( ( 2.5 * var1 ) + 50 )
endif

if ( GetIsPlayerBirthsign BirthSignAtronach == 1 ) 
set vBirth to ( ( 7.5 * var1 ) + 150 )
endif

if ( Player.GetIsRace "HighElf" == 1 ) 
set vRace to 50
else
set vRace to 0
endif

set vMagic to ( var3 + var4 + var5 + var6 + var7 + var8 )
set oOut to ( ( ( var3 + var4 + var5 + var6 + var7 + var8 ) / 6 ) * 0.01 )

Set newMagicka to ( ( ( ( (var2 * var1 ) + vMagic ) / 2 ) * oOut ) + vBirth + 20 + vRace )

if ( newMagicka != oldMagicka )
player.setactorvalue Magicka newMagicka
endif

end

 

I don't know if I missed something, or if I have improper syntax as this is my first attempt at writing / editing a mod. any help would be great.

 

What it should do, is give you magica based on several things.

#1: Your int * level + all magic skill stats, gives a base amount of magica that you could if your magic skill stats are 100 and int 100.

#2: Your average magic skills give you a % of the #1, so if your max magica is 200, and you have 10% in magic skills you have 20 magica. Exec.

#3: adds your birth sign bonus, and a level bonus.

#4: base magica of 20 at all times, this will allow you to build up your magic if you ever want to be able to cast something later even while playing a pure warrior

#5: Race: If this is not put in, high elf bonus would not apply after resetting the magica.

 

The original mod did not cover anything but level and Int. Any other information that you need to help out let me know.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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