need scripters plz

Post » Thu Jul 15, 2010 6:40 am

i am working on a mod and in this mod has a sword that has a special effect. it is suppose to have a chance, depending on your luck attribute, to give you a soul fragment and each fragment will give you 30 strength until you hit 10 fragments. at 10 fragments you will cast an aoe spell that will do tons of frost damage to anyone 15 yards away. now this is my first script and i am unsure why it is not working. every time you get a fragment you should get a message saying you got so many fragments. when i tested it i did not see this. i was taking script from other components of that game and add some myself. i am unsure about variables, if they reset or not after each script which would screw this up. see wat you can cook up
ScriptName FrostmourneFragments

short RandomChance
short Fragments
float LuckMod

begin ScriptEffectStart
set Str to player.getAV Strength
set RandomChance to getRandomPercent
set LuckMod to player.getAV Luck
set LuckMod to LuckMod * 0.2
if LuckMod < 1
set LuckMod to 1
endif

if LuckMod > 10
set LuckMod to 10
endif
if RandomChance <= LuckMod
set Fragments to Fragments + 1
Message "Frostmourne has clained % Fragments",Fragments,1
endif

if Fragments == 1
player.setAV Strength 30
endif

if Fragments == 2
player.setAV Strength 60
endif

if Fragments == 3
player.setAV Strength 90
endif

if Fragments == 4
player.setAV Strength 120
endif

if Fragments == 5
player.setAV Strength 150
endif

if Fragments == 6
player.setAV Strength 180
endif

if Fragments == 7
player.setAV Strength 210
endif

if Fragments == 8
player.setAV Strength 240
endif

if Fragments == 9
player.setAV Strength 270
endif

if Fragments == 10
cast SoulFragments
set Fragments to 0
endif
end
User avatar
Sasha Brown
 
Posts: 3426
Joined: Sat Jan 20, 2007 4:46 pm

Post » Thu Jul 15, 2010 8:17 pm

Some problems I see are using setav and attributes exceeding 255. Make a quest and in the quest have the variables fragments then use QuestName.Fragments instead of fragments
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Thu Jul 15, 2010 11:52 am

yeah i saw that in mehrunez quest but i was unsure how to do it myself but i guess that will work. i will see how to do it thx.
User avatar
Sherry Speakman
 
Posts: 3487
Joined: Fri Oct 20, 2006 1:00 pm


Return to IV - Oblivion