Jump to content

Please Help


rohtvak

Recommended Posts

Hello I need some help with a script. I am trying to make a mod that uses up items for spells instead of magicka.

For this mod you have to collect ingredients to make potions, then once you have made the potion you cast the spell on a target NPC or Creature and if you have the potion in your inventory the spell effect works but if you don't have it the effect won't work. The script does not work can anyone tell me why? :wallbash:

 

Here is the script:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

ScriptName AAdeathspell

 

Begin ScriptEffectStart

 

if GetItemCount AAdeathpotion >= 1

kill

Message "HAHAHAH all of that collecting paid of in the end !!"

removeitem AAdeathpotion 1

else

MessageBox "You still need to make the potion."

endif

End

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Even if I have the potion in my inventory it still just displays the MessageBox "You still need to make the potion." and does nothing at all to the spells target. I have made mods before and know my way around the TEScs but I am very bad at scripting. So if you can help me in any way i would be thankfull. 0_o :wacko:

Link to comment
Share on other sites

Yesterday I finally figured out how to reference the caster in a spell script! (Yeah, I know I'm stupid not to have figured it out before.)

 

scn example

array_var temparray
ref tempref
short tempshort

Begin ScriptEffectStart

let temparray := GetActiveEffectCasters
let tempshort := ar_size temparray - 1
let tempref := temparray[tempshort]
;rest of your code

 

Just in case you want NPCs to be able to use the spell too.

Link to comment
Share on other sites

Ahhh so I was trying to make the npc poison it'self {It's tamriel so i guess you never know ! }

than you very much !!!

;D :D 8) :) :yes: :wink: :geek: :cool: :woot: :smile: :blush: :happy: :laugh: :mellow: :tongue: :teehee: :turned: :biggrin: :biggrin:

Link to comment
Share on other sites

Sorry back again. How do I get the number of things the PC has killed. Such as: GetNPCsKilledByPlayer. I know that's not a real command but I want a command like that. Any thoughts? :sweat:

 

 

 

 

 

Tis not so wide as a church door nor so deep as a well but tis enough twil do.

Link to comment
Share on other sites

Hi again. I Have two problems #1 I just managed to add 1 item to the inventory's of every single human NPC o_O and I have to do it again!??! So is there any way to make it faster than 700000000 :wallbash: :wallbash: :wallbash: Click and drags later?

# 2 Is there anything wrong with this script? because it does not work in game, in fact it does a C.T.D. :wallbash: :wallbash:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

ScriptName AAresurrectspell

 

Begin ScriptEffectStart

if Player.GetItemCount AAbloodhuman >= 1.00 && Player.GetItemCount SacredLotusSeeds >= 1.00

Resurrect

Player.Removeitem AAbloodhuman 1

Player.RemoveItem SacredLotusSeeds 1

Message "It's ALIVE !!!!!!!!!!!!!!!"

elseif Player.GetItemCount AAbloodhuman == 0.00 && Player.GetItemCount SacredLotusSeeds >= 1.00

MessageBox "You still need to collect the human blood"

elseif Player.GetItemCount SacredLotusSeeds == 0.00 && Player.GetItemCount AAbloodhuman >= 1.00

MessageBox "You still need to collect the Sacred Lotus Seeds"

elseif Player.GetItemCount AAbloodhuman == 0.00 && Player.GetItemCount SacredLotusSeeds == 0.00

MessageBox "You still need to collect both the Human Blood and the Sacred Lotus Seeds"

else

endif

End

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanxx for your help already !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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