Jump to content

Scripter Wanted


Recommended Posts

Hello readers.

 

I am currently working on a race mod and this particular race has 11% resistance to magic + character level. I do not believe I can create this ability without a script and I have almost no scripting knowledge, so I'm looking for anyone here who does. Help will be very appreciated. If I am to release this race for public download I will be sure to credit those who help me.

 

Thank you for reading.

Link to comment
Share on other sites

I can think of 2 ways to do this:

 

1. Create a custom ability for your race, giving 12% magic resist. Then create a quest and use this for the script:

 

 

scriptname example

short counter

Begin MenuMode 1027

if (Player.GetIsRace "Your Race")
	Player.ModAV ResistMagic 1
	set counter to (counter + 1)
endif

End

Begin GameMode

if (Player.GetIsRace "Your Race" == 0)
	if (counter > 0)
		set counter to (0 - counter)
		Player.ModAV ResistMagic counter
		set counter to 0
	endif
endif

if (Player.GetIsRace "Your Race")
	if (Player.GetLevel > 1) && (counter == 0)
		set counter to (Player.GetLevel - 1)
		Player.ModAV ResistMagic counter
	endif
endif

End

 

 

That will make it so whenever you get to the level up menu, your base magic resistance goes up by 1. However, this doesn't show up under your active effects, so it'll still say your resist is 12% even though it's higher. It'll also take care of things if you happen to switch races halfway through the game.

 

2. Create a lot of abilities (I think 39 should do it, so at level 39 Magic Resist maxes out at 50%) each with higher and higher amounts of magic resistance. Then create a quest and use the quest script to choose which ability to apply on the player:

 

 

scriptname example2

array_var MRA

short index

Begin MenuMode 1027

while (index < 39)
	Player.RemoveSpell MRA[index]
	set index to index + 1
loop

if (Player.GetIsRace "Your Race")
	set index to (Player.GetLevel - 1)
	if (index > 38)
		set index to 38
	endif
	Player.AddSpell MRA[index]
endif

set index to 0

End

Begin GameMode

if (MRA == 0)
	let MRA := ar_Construct Array
	let MRA[0] := "Your 12% Magic Resist Ability"
	let MRA[1] := "Your 13% Magic Resist Ability"
	let MRA[2] := "Your 14% Magic Resist Ability"
;		...
	let MRA[38] := "Your 50% Magic Resist Ability"
endif

End

 

 

The script will require OBSE. It will show the correct magic resistance when you check your active effects. It should also take care of things if you happen to switch races halfway through the game (but it only checks the abilities when it shows the level up menu).

Edited by fg109
Link to comment
Share on other sites

I can think of 2 ways to do this:

 

1. Create a custom ability for your race, giving 12% magic resist. Then create a quest and use this for the script:

 

 

scriptname example

short counter

Begin MenuMode 1027

if (Player.GetIsRace "Your Race")
	Player.ModAV ResistMagic 1
	set counter to (counter + 1)
endif

End

Begin GameMode

if (Player.GetIsRace "Your Race" == 0)
	if (counter > 0)
		set counter to (0 - counter)
		Player.ModAV ResistMagic counter
		set counter to 0
	endif
endif

if (Player.GetIsRace "Your Race")
	if (Player.GetLevel > 1) && (counter == 0)
		set counter to (Player.GetLevel - 1)
		Player.ModAV ResistMagic counter
	endif
endif

End

 

 

That will make it so whenever you get to the level up menu, your base magic resistance goes up by 1. However, this doesn't show up under your active effects, so it'll still say your resist is 12% even though it's higher. It'll also take care of things if you happen to switch races halfway through the game.

 

2. Create a lot of abilities (I think 39 should do it, so at level 39 Magic Resist maxes out at 50%) each with higher and higher amounts of magic resistance. Then create a quest and use the quest script to choose which ability to apply on the player:

 

 

scriptname example2

array_var MRA

short index

Begin MenuMode 1027

while (index < 39)
	Player.RemoveSpell MRA[index]
	set index to index + 1
loop

if (Player.GetIsRace "Your Race")
	set index to (Player.GetLevel - 1)
	if (index > 38)
		set index to 38
	endif
	Player.AddSpell MRA[index]
endif

set index to 0

End

Begin GameMode

if (MRA == 0)
	let MRA := ar_Construct Array
	let MRA[0] := "Your 12% Magic Resist Ability"
	let MRA[1] := "Your 13% Magic Resist Ability"
	let MRA[2] := "Your 14% Magic Resist Ability"
;		...
	let MRA[38] := "Your 50% Magic Resist Ability"
endif

End

 

 

The script will require OBSE. It will show the correct magic resistance when you check your active effects. It should also take care of things if you happen to switch races halfway through the game (but it only checks the abilities when it shows the level up menu).

 

Thank you very much for your help! I think I will try the second method so the active effects menu will display an accurate percentage of the player's magic resistance. I will be sure to credit you if I release this race for public download.

 

Thank you again and good luck to you in your current and future endeavors.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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