Jump to content

Script effect for chem


Deleted999565User

Recommended Posts

I need to create a remedy, which removes effects of poison added to player by radscorpion or deathclaw. But I don't know how to create working script for such item - I'm lost.

 

SCN aaaZuSkunksAntidoteScript

 

Begin OnActivate

 

if ( player.geteffect RadScorpion1Poison == 0 ) && ( player.geteffect RadScorpion2Poison == 0 ) && ( player.geteffect DeathclawPoison == 0 )

activate

showmessage AddonAntidoteNoNeed

player.additem Antidote 1

else

player.removespell RadScorpion1Poison 1

player.removespell RadScorpion2Poison 1

player.removespell DeathclawPoison 1

showmessage AddonAntidoteCure

endif

 

END

 

Of course there are no "geteffect" term in the game and I don't know that "removespell" is right. :/ And one more thing - "&&" is "AND". How is "OR"?

Link to comment
Share on other sites

1. If you want it to be a chem, youll have to make your antidote-ingestible and give it a new effect.

2. As Effect the code you have should be an effect script and "Begin OnActivate" should be replaced by "begin ScriptEffectStart"

3. The getEffect should be the function "Player.HasMagicEffect" I guess

 

Hope it helps

Link to comment
Share on other sites

Well, finally I've saved the script without any error messages. :) But there was another problem... ScriptEffect is in this editor completely useless:

 

http://img253.imageshack.us/img253/1674/scripteffectas5.th.png

 

This is everything. I can't place the script anywhere.

 

I've tried with this script, bounded to the antidote item:

 

SCN aaaZuSkunksAntidoteScript

Begin OnRelease

if ( player.IsSpellTarget RadScorpion1Poison == 0 ) && ( player.IsSpellTarget RadScorpion2Poison == 0 ) && ( player.IsSpellTarget DeathclawPoison == 0 )
	showmessage AddonMessageAntidoteNoNeed
else
	player.removespell RadScorpion1Poison
	player.removespell RadScorpion2Poison
	player.removespell DeathclawPoison
	showmessage AddonMessageAntidoteCure
endif

END

 

...But this also don't works.

 

Although I think I have an idea - is it possible to create a GameMode script, which checks the player's poison resistance and automatically removes the poisons, when it's equal or higher than 100? Then I'll need only to add to the antidote an effect of increasing poison resistance to the 100 for some period of time.

 

This could look like that:

 

SCN aaaZuSkunksAntidoteScript

Begin GameMode

if ( player.IsSpellTarget RadScorpion1Poison == 0 ) && ( player.IsSpellTarget RadScorpion2Poison == 0 ) && ( player.IsSpellTarget DeathclawPoison == 0 )
; Do Nothing
elseif ( player.getpoisonresistance >= 100 )
	player.removespell RadScorpion1Poison
	player.removespell RadScorpion2Poison
	player.removespell DeathclawPoison
endif

END

 

There is no "getpoisonresistance" term, though.

Link to comment
Share on other sites

For the Effect:

You have to create a new "Base Effect" (GECK:BaseEffect) that uses your script.

so:

1. Create a new Base Effect

2. Set the Archetype to "Script"

3. Set the Assoc.Item to aaaZuSkunksAntidoteScript (make sure your script is an EFFECT-Script and not quest or object).

4. Then add the base effect to your chem and set duration/magnitude if necessery (should not be necessary for your item).

 

Now, when you use the chem, the script should start in begin ScriptEffectStart

 

PoisonResistance: (http://cs.elderscrolls.com/constwiki/index.php/GetActorValue)

Try :

Player.getActorValue PoisonResist

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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