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...

Script Requests


Tonycubed2
 Share

Recommended Posts

Hey Everyone!

 

I want to have a script that activates activators by shouting at them.

In the Quest "First Lesson" from the Winterhold College you have to cast a spell to get accepted, one option there is to shoot a firebolt at the gate stone on the ground which glows when hit and the quest goes on.

I want this gate stone to work as an activator for doors and have no idea how to script that.

It would be really cool if only a Dragonshout let you open doors

I'm not an english native speaker so i'm running out of keywords to search for it, everything i found were scripts that add spells when activate something...

 

Hope you guys can help!

 

 

Link to comment
Share on other sites

so my charge spell script mod continues to progress slowly (because i don't know athin about papyrus but lots about OCD)

 

heres the script ive made from lots of help from forums here and nexus

 

 

Scriptname hexaliasref extends ReferenceAlias  

 

 
GlobalVariable Property Hotkey Auto
Float Property TimeToPassForSpellOne Auto
Float Property TimeToPassForSpellTwo Auto
Float Property TimeToPassForSpellThree Auto
 
spell property ChargeSpellFire1 auto
spell property ChargeSpellFire2 auto
spell property ChargeSpellFire3 auto
 
sound property SoundCastFire1 auto ;  ; 
sound property SoundCastFire2 auto ;  ; 
sound property SoundCastFire3 auto ;  ; 
 
Float StartTime
Float CurrentTime
Int CurrentHK
 
EffectShader property EffectFire auto ; AlchArmorFireFX ;
 
Armor property ChargeSpellBook auto
 
sound property SoundChargeFire1 auto ;  ; 
sound property SoundChargeFire2 auto ;  ; 
sound property SoundChargeFire3 auto ;  ;
 
 
 
 
Event OnInit()
;initial hot key registration
CurrentHK = Hotkey.GetValueInt()
RegisterForKey(CurrentHK)
EndEvent
 
Event OnKeyDown(Int KeyCode)
;process the following when the hotkey is pressed
If KeyCode == CurrentHK
StartTime = Utility.GetCurrentGameTime()
While Input.IsKeyPressed(KeyCode)
EffectFire.Stop(PlayerActor) ;do nothing
EndWhile
CurrentTime = Utility.GetCurrentGameTime()
Float TimePassed = (CurrentTime - StartTime)
If TimePassed >= TimeToPassForSpellThree
If PlayerActor.isequipped(ChargeSpellBook)
SoundChargeFire3.play(PlayerActor);do third spell stuff
ChargeSpellFire3.Cast(PlayerActor, none)
EffectFire.Stop(PlayerActor)
 
 
ElseIf TimePassed >= TimeToPassForSpellTwo
If PlayerActor.isequipped(ChargeSpellBook)
SoundChargeFire2.play(PlayerActor);do second spell stuff
ChargeSpellFire.Cast(PlayerActor, none)
EffectFire.Stop(PlayerActor)
 
ElseIf TimePassed >= TimeToPassForSpellOne
If PlayerActor.isequipped(ChargeSpellBook)
EffectFire.Play(PlayerActor)
SoundChargeFire1.play(PlayerActor) ;do first spell stuff
ChargeSpellFire1.Cast(PlayerActor, none)
EffectFire.Stop(PlayerActor)
 
EndIf
EndIf
;process this if the hotkey was changed in the console -- requires user to press the old key so that the new key can be used.
If CurrentHK != Hotkey.GetValueInt()
UnregisterForKey(CurrentHK)
CurrentHK = Hotkey.GetValueInt()
RegisterForKey(CurrentHK)
EndIf
EndIf
EndEvent
 

 

 

 

Sadly while i thought this would work, i can't even test this out because it won't compile heres the error

 

 

C:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\hexaliasref.psc(75,0): mismatched input 'EndEvent' expecting ENDIF

 
now i always though the number (75,0) was the refwerences to which line the error came from which would mean its the last "EndEvent" instance tried changing it over to EndIF but then i get
 

 

C:\Program Files\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\hexaliasref.psc(0,-1): mismatched input '<EOF>' expecting ENDIF

 

 

Any infomation would be great

Link to comment
Share on other sites

You have 6 nested IF statements and only 4 ENDIF statements.

 

I also question your use of ELSEIF statements, as they are looking at different criteria than the original IF that they go with.

 

You might want to look at my basic tutorial on scripting in this forum.

Link to comment
Share on other sites

It really helps if you develop the habit of indenting your code properly. That makes it much easier to check that block start and end statements (if - endif, event - endevent, etc.) are properly paired, especially when your nesting starts getting deep. However, deep nesting is usually a sign that you need to break some code out into functions to simplify the structure of the script.

Link to comment
Share on other sites

thanks guys. currently got it to compile and its working, still testing for the sound plays and efects play but idles work and spells get cast appropiately, no doubt it can be clean up. but this is currently a working simplified charge spell script ,animation currently set to crossbow, gunblade style.

 

 

 

Scriptname test01charge extends ReferenceAlias  
 
 
 
GlobalVariable Property Hotkey Auto
Float Property TimeToPassForSpellOne Auto ; 1 :
Float Property TimeToPassForSpellTwo Auto ; 3 ;
Float Property TimeToPassForSpellThree Auto ; 5 ;
 
spell property ChargeSpellFire1 auto
spell property ChargeSpellFire2 auto
spell property ChargeSpellFire3 auto
idle property CrossbowAttackStart auto ; CrossbowAttackStart ;
sound property SoundCastFire1 auto  
sound property SoundCastFire2 auto    
sound property SoundCastFire3 auto    
Float StartTime
Float CurrentTime
 
 
EffectShader property EffectFire auto ; AlchArmorFireFX ;
 
 
 
sound property SoundChargeFire1 auto  
sound property SoundChargeFire2 auto   
sound property SoundChargeFire3 auto  
 
 
actor PlayerActor 
 
 
 
Event OnInit()
;initial hot key registration
RegisterForKey(45)
EndEvent
 
Event OnKeyDown(Int KeyCode)
;process the following when the hotkey is pressed
If KeyCode == 45
StartTime = Utility.GetCurrentGameTime()
While Input.IsKeyPressed(KeyCode)
 
game.getPlayer().PlayIdle(CrossbowAttackStart)
EffectFire.Play(game.getPlayer())
EndWhile
CurrentTime = Utility.GetCurrentGameTime()
Float TimePassed = (CurrentTime - StartTime)
If TimePassed >= TimeToPassForSpellThree
 
game.ShakeCamera(game.getPlayer(), 0.400000, 0.400000)
utility.Wait(0.80000)
SoundChargeFire3.play(game.getPlayer())
utility.Wait(0.20000)
ChargeSpellFire3.Cast(game.getPlayer())
EffectFire.Stop(game.getPlayer())
game.getPlayer().damageAv("stamina", 15)
utility.Wait(0.80000)
debug.sendAnimationEvent(game.getPlayer(), "attackStop")
 
 
 
ElseIf TimePassed >= TimeToPassForSpellTwo
  game.getPlayer().PlayIdle(CrossbowAttackStart)
SoundChargeFire2.play(game.getPlayer())
ChargeSpellFire2.Cast(game.getPlayer())
EffectFire.Stop(game.getPlayer())
game.getPlayer().damageAv("stamina", 10)
utility.Wait(0.80000)
debug.sendAnimationEvent(game.getPlayer(), "attackStop")
 
 
 
ElseIf TimePassed >= TimeToPassForSpellOne
game.getPlayer().PlayIdle(CrossbowAttackStart)
EffectFire.Play(game.getPlayer())
SoundChargeFire1.play(game.getPlayer())
ChargeSpellFire1.cast(game.getPlayer())
game.getPlayer().damageAv("stamina", 5)
EffectFire.Stop(game.getPlayer())
utility.Wait(0.80000)
debug.sendAnimationEvent(game.getPlayer(), "attackStop")
EndIf
EndIf
 
EndEvent

 

 

Edited by Hecks567
Link to comment
Share on other sites

Hi guys. I could use some help with a script. schatten made a script for me for my mod Coins of Tamriel. And it works really well, but I want to expand on it. The way it originally works is that when you pick up one of the coins from my mod it will add a set amount of the default coin to your inventory while also removing the coin you just picked up  To prevent spamming and another issue that I hope you guys will be able to help me with (I fixed the spamming part). Another reason I remove the coin is that the way Skyrim works is that it was only meant to have one type of coin. So you can't actually spend my coins which is why they get replaced with their value in the default coin when you pick them up. And that is where the new problem is.

 

In the new script I found away to allow the player to keep the coin they pick up while also preventing the player from spamming the coin to get an infinite amount of coin. But I ran into another problem and that is this. Lets say you have 4 gold coins (or 8 silver coins) which equal to 400 septims. And you go and spend those 400 septims. The way it stands now your still going to have those 4 gold coins in your inventory. So somehow I need a way to have it to where if you have gold or silver in your inventory and you spend their value, they will get removed from your inventory.

 

So if you have 4 gold coins in your inventory and you drop below that number -lets say you spend 50 septims-. It will remove one of the gold coins. So every time you drop below an even 100 number (100, 200, 300, ect) it will remove a gold coin. And if you drop below an even 50 number it will remove a silver coin. 

 

I don't know if any of this makes sense or if it's even doable. But I figured I would just ask and see.

 

Here are both the original and the new script if that helps. The scripts are attached to a quest.

 

Original script

Scriptname CoinsofTamriel extends referencealias


Miscobject Property gold002 auto
Miscobject Property gold003 auto
Miscobject Property gold001 auto


Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
  if (akBaseItem as miscobject) == gold002;checks to see if the added item is a silver coin.
      getactorreference().removeitem(akBaseItem, aiItemCount,true); getactorreference gets the reference of the alias. 
      getactorreference().additem(gold001, (aiItemCount * 50),true)
  endif


  if (akBaseItem as miscobject) == gold003;checks to see if the added item is a gold coin.
      getactorreference().removeitem(akBaseItem, aiItemCount,true)
      getactorreference().additem(gold001, (aiItemCount * 100),true)
  endif
endEvent

 

New Script.

Scriptname CoinsofTamriel extends referencealias


Miscobject Property gold001 auto
Miscobject Property gold002 auto
Miscobject Property gold003 auto


Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
  if (akBaseItem as miscobject) == gold002;checks to see if the added item is a silver coin. 
      getactorreference().additem(gold001, (aiItemCount * 50),true)
  endif


  if (akBaseItem as miscobject) == gold003;checks to see if the added item is a gold coin.
      getactorreference().additem(gold001, (aiItemCount * 100),true)
  endif
endEvent


Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
  if (akBaseItem as miscobject) == gold002;checks to see if the removed item is a silver coin. 
      getactorreference().removeitem(gold001, (aiItemCount * 50),true)
  endif


  if (akBaseItem as miscobject) == gold003;checks to see if the removed item is a gold coin.
      getactorreference().removeitem(gold001, (aiItemCount * 100),true)
  endif
endEvent

 

 

Link to comment
Share on other sites

  • 3 weeks later...

I need a script that will work the same way like the Regulator script in Fallout 3. If you have never played Fallout 3 and have no idea what I'm talking about, here's what I want it to do (Explained by someone else)

 

2) You need to make some 'regulator' NPCs who will accept those fingers and give gold septims (uh...unless you really want them to hand out bottle caps...) per finger. They can have a 'You got some fingers for me...?' dialogue conditioned to work only when the game checks and detects the player has...'fingers' in his or her inventory.

 

3) Another dialogue for 'Brill! Fingers!' if the player responds with 'Yup!', and script fragment which will remove...'fingers' from the player, and give him/her gol

Link to comment
Share on other sites

Greetings everyone. I'm attempting to create script that will allow you to provide whatever equipment you place in a chest to npcs with a specific id. 

 

For example, you place exactly one sword and one set of armor into the chest and all npcs with this id will equip that sword and armor.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

Hi there,

I wanted to know if there is any way to prevent the PushActorAway function from working on the Player Character?  I'm trying to make a spell with limited duration that prevents Knockdown effects on the player.  I'm hoping to not use a god mode toggle if possible.

Link to comment
Share on other sites

There's a project stuck in my head that wants to get out.

I want to create a few shipping routes through the Sea of Ghosts. The ships that sail here would go from the East to the West and vice versa.

None of them would dock at the Skyrim ports. It's just for added immersion. If you stand, staring at the sea, you'll see ships far off in the distance. 

The ships wouldn't need interiors/navmeshes/NPCs because they wouldn't be reachable without console commands.
I'm an extreme greenhorn when it comes to scripting, but I've set myself this goal nonetheless, and now I'm looking around for helpful guides/assistance to point me in the right direction.

The fact that Skyrims ships have rolled up sails is immaterial at the moment, thats a future project.
Reading my way through the Creation Kit Wiki's tutorials, I've not found a way to get this done. 

This thread seems like the best place to post this, without creating any new thread (I'm really just a first-time poster, so I don't want to do that yet.)

Kind regards,
Satchboogie

PS: Trainwiz has made a mod called Transportato that already goes beyond the scope of my plan, but as a result its also much heavier on the game I would think.
The goal is to be unintrusive and immersive.

Link to comment
Share on other sites

  • 2 weeks later...

Hey guys, I have a few ideas in my head of scripts that would make modding very interesting. I will stick with only one for now as it is most relevant to what I want to do. 

 

In it's most basic form, I want a script that will choose a random cell for a set door (either at the beginning of the game, or when you first activate the door, whichever is more doable), and allow that door to take you to that cell, and only that cell during your current save-game.

 

As an example, lets say a dungeon I make has 5 (for ease of description I will call them Dungeon1, Dungeon2, ect) different versions I have made for replay purposes. When I select the door, the game decides randomly that it choose Dungeon3 for this playthrough. I can go in and out of that door as many times as I want with this save game, but it will only let me go to Dungeon3.

 

However, lets say I start a new game, and go to the same dungeon. This time the game chooses Dungeon1, and it's completely different than dungeon3 as it is it's own cell. I can, again, go in and out of that starting door all I want, but for this specific save game I can only access Dungeon1.

 

This would be my attempt at a "Random Dungeon" Ala Diablo 2. Each time I played Diablo 2 the maps seemed different. (Actually I think those maps are generated and thus a lot more random than what I am proposing however making a generator would be too much hassle I think.)

 

The reason I want to try this is pure replay value. A mods life would extend quite a bit with this feature. I would even love if other modders used this idea.

Link to comment
Share on other sites

  • 3 weeks later...

Hiya I'm trying to make a group of witch spells and I thought that a spell to apply the effect of a poison magically to the witches enemy would be perfect.

 

I would like a script that does the following

 

The player casts a spell while target is selected in crosshair

A menu pops up allowing the player to choose a poison (must be poison) from their inventory be it player made or standard

The full poison effect is applied to target

 

Thank you :)

Link to comment
Share on other sites

I ran into another snag

 

I also need a script that does the following...

 

Player casts a spell

player clicks on spriggen corpse and gets the option to sacrifice or leave be

If player clicks sacrifice

Spriggen corpse disappears

Player receives 5 permanent magicka points added to pool (like modav Magicka 5 command in game)

Taproot is added to the player

If player clicks on non spriggen corpse nothing happens and failure message shows.

 

Also Another script that does the following

 

Player casts spell

If player has spider egg creates eggsack at target crosshair

30 seconds after its creation eggsack spawns frostbite spider (permenent doesnt follow player though)

if spider dies eggsack spawns another

If player upon casting spell has no spider egg failure message shows and nothing happens

 

and finaly

 

player clicks on the eggsack menu is shown - destory/imbune with fire/imbune with frost/imbune with shock

If player click destroy eggsack is removed

If Player clicks immbune with fire script checks to see if the player has fire salts, removes firesalt and applies permenent firecloak spell to next spawned spider

If Player clicks immbune with frost script checks to see if the player has frost salts, removes frostsalt and applies permenent frostcloak spell to next spawned spider

If Player clicks immbune with thunder script checks to see if the player has void salts, removes voidsalt and applies permenent shockcloak spell to next spawned spider

 

Thanks again :)

Edited by WildWitch
Link to comment
Share on other sites

  • 1 month later...

Hi guys,

 

Im trying to create a Fire claw which is a fire elemental werewolf with a base height increase of +.3 in the creation kit. im also going to retexture the wolf to have active flames going down its back and around its face. the script i need should be simple for any experienced scriptwriter (im new to skyrim's scripting). it is a script for the melee damage to also inflict fire damage of 15 points (Ill figure out how to change the values). And have a lasting burn duration of 20 seconds. 

in second to that i need a script that will allow the fire claw to breath fire whether in shout form or in actual dragon breath form (dragon breath is preferred but ill take anything).

thanks and let me know if i left anything out. :devil:

Link to comment
Share on other sites

Hi guys,

 

Im trying to create a Fire claw which is a fire elemental werewolf with a base height increase of +.3 in the creation kit. im also going to retexture the wolf to have active flames going down its back and around its face. the script i need should be simple for any experienced scriptwriter (im new to skyrim's scripting). it is a script for the melee damage to also inflict fire damage of 15 points (Ill figure out how to change the values). And have a lasting burn duration of 20 seconds. 

in second to that i need a script that will allow the fire claw to breath fire whether in shout form or in actual dragon breath form (dragon breath is preferred but ill take anything).

thanks and let me know if i left anything out. :devil:

I might be able to help with this - check out this thread - Overhauling Werewolf Scripts/Quest It probably wouldn't be scripting so much as modifying the Claw Damage ability of a Werewolf... Werewolf Shouts would be part of scripting. Edited by Vain
Link to comment
Share on other sites

  • 2 weeks later...
Hello guys, I need a scipt if it's possible !
 
I need a script for magical effect in ck for a custom spell.
 
Script : 
 
1. When release casted spell, script check if target if human and dead
 
2.1 if 1 is true targeted corpse disepear (or teleport un a custom cell) then add item1 in inventory
2.2 else show a notification in top left corner : 'Target Invalid'
 
Thx for help !
Edited by Iceman
Link to comment
Share on other sites

  • 2 weeks later...

:help: Hi everyone im working on a script and im a bit stuck, any help would be greatly appreciated.

 

The purpose of my script is to move a static object from point a1 to point b2 at a steady speed and then move back from point b to a on activation of a button.

The script below works but only lets me move the object to point b2 on activation, i need it then to move back from point b2 to point a1 on second activation. like a light switch.

 

Heres The Script.

 

 

ObjectReference Property ITEMTOANIMATE  Auto   
ObjectReference Property WALLUP  Auto
ObjectReference Property WALLDOWN  Auto
Sound Property MOVEMENTSOUND  Auto
 
Event OnActivate(ObjectReference akActionRef)
 
GoToState("Idle")
ITEMTOANIMATE.TranslateToRef(WALLDOWN, 2000, 0.0)
 
EndEvent
 
State Idle
 
Event OnActivate(ObjectReference akActionRef)
If (akActionRef == Game.GetPlayer()) 
GoToState("Inactive")
MOVEMENTSOUND.Play(WALLUP)
ITEMTOANIMATE.TranslateToRef(WALLUP, 25.0, 0.0)
 
EndIf
 
EndEvent
 
EndState
 
 
The way this script works is with 1 static object (wall for example) then a switch (impbutton) and 2 unique xmarkers.
the script is attatched to the button and on activation it moves the wall from 1 point to another in relativity to the position of the xmarkers.
 
i didnt write all the script myself and dont fully understand the syntax but i can tell by looking at it that it just needs a slight tweak,one again any assistance would be a big help.
 
Thanks For Reading :good:
Link to comment
Share on other sites

  • 2 months later...

Hey, folks. I'm new here, and I'm looking for help with scripting. I'm also new to scripting, although I do have a foundational understanding of how scripts work.

 

What I'm looking is an example of script that does something similar to this list:

 

-Differentiates between player and followers

-Causes NPCs to favor attacking the player

-Applies a spell on attack against player

-Script ends

 

After the script ends, the NPCs will be free to deal with followers normally, but should still be able to apply the same spell as was used against the player.

 

Any help is appreciated, and thanks.

Link to comment
Share on other sites

  • 1 month later...

Total Papyrus rookie here,

 

I'd like to create a script that for now just gives a message if the player is hit while unarmored, or hits another creature unarmed. What would be a script that accomplishes that and how would I hook it into a perk or effect so that it was loaded into the game?

 

edit: While waiting for moderation, I managed this for unarmored:

 

Create a perk which gives an ability, which gives an effect linked to this script:

 

Scriptname IronSkinTestScript extends ActiveMagicEffect
 
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
 
    debug.trace("We are hit.");
    debug.notification("We are hit.");

endEvent

 

It doesn't check for unarmored yet, but I'm getting close.

Edited by Arutema
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...