Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Need for simple script- 2


Leodoidao
 Share

Recommended Posts

Greetings.

I´m in need for help again... need advice about how to do the following:

1- Player talks to a NPC and when the talk is done he just attacks player furiously, with no room for the "surrender/yelding weapon" option (get permanently hostile) :evil: .

What is the script? How can it be done?

2- A very simple spell that teleports player to a given interior cell (player home that will be added at the end of the quest)--- but this spell WILL ONLY WORK when casted in outdoors. :wave:

Anyone could help me?

Link to comment
Share on other sites

1. a. If you have you own topic on the NPC then in the last thing the NPC says you can check goodbye and put in the result script StartCombat player .

b. If you're not in control of the NPC's dialogue then attach this script somewhere (a quest would probably be best, or directly onto the NPC if it's your own):

scn CombatStart


short attack


Begin Menumode 1009

 if (TalkingNPC.getCurrentAIPackage == 6)

  set attack to 1

 endif

End


Begin Gamemode

 if (attack == 1)

  TalkingNPC.StartCombat player

  set attack to 0

 endif

End

 
I do not know how to make the NPC unyielding though. Possibly set the aggression and deposition really high? 2.
scn TeleportSpell


Begin ScriptEffectStart

 if (player.IsInInterior == 0)

  player.moveTo MyHouseXMarker

 endif

End

Link to comment
Share on other sites

For the first, you simply need to add a few lines to the Results Script of the dialog:


YourNPCEditorIDGoesHere.moddisposition player -100
YourNPCEditorIDGoesHere.startcombat player
[/codebox]

This will make the NPC hate the player so the player can't yield, and initiate combat. You might want to check the "Goodbye" box on that piece of dialogue too, so that dialogue will stop and game mode will resume automatically when the NPC is done with his line.

For the second, here is a very simple spell script. I am assuming you already know how to set up a basic spell with a script effect. For simplicity, place an XMarker or XMarkerHeading where you want the player to land when the spell is finished. Give it a persistent reference ID. Create a new script, and make sure you set the type to Magic.

[codebox]
ScriptName YourScriptNameGoesHere

short Ported

Begin ScriptEffectStart

If Player.IsInInterior == 1
Message "You cannot use this spell indoors."
;or "You cannot teleport from this location." or whatever you like, can also omit this line for no message.
Return
Else
set Ported to 1
Player.MoveTo YourXMarkerEditorIDGoesHere
EndIf

End

Begin ScriptEffectFinish

If Ported == 1
;we need to use this condition or the message will display even if the player didn't get teleported
SetPlayerInSEWorld 0
;change to 1 if teleporting into the Shivering Isles; this check ensures NPCs don't get the I HAVE NO GREETING bug when going from one side to the other
Message "Welcome to YourLocationNameGoesHere."
;optional, but a nice touch - edit to suit or omit for no message.
set Ported to 0
;reset to 0 so the message will only display once
EndIf

End

You can remove the comment lines (they start with a semi-colon) for tidiness when you're done. I just wanted you to see what each line did and where you could customize it to suit your preference.

Good luck! :evil:

Edit - Oops, sorry Critterman, I didn't mean to post on top of you! :wave:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...