Morrowind Script Library 03

Embed Size (px)

Citation preview

MORROWIND SCRIPT LIBRARY

Created by the Community Compiled and Edited by Nedius

ContentsVersion 0.3

SECTION Activators Creatures.. Display Cases. Doors Inventories .. Items Journals.. Locks ... Magic Misc Movers Music . NPCs (including mannequins) Scale ... Timer ... Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Contents Section Section Section Section Section Section Section Section Section Section Section Section Section Section Section

Thanks: This resource has been created by a whole host of modders working hard and then offering their work freely to the modding community. Below are the list of modders who have contributed to this resource. Thanks to them all.

Darknut, Chia, Zer010, Nikki, Melian, Enmesharra, cyran0, http://www.morrowind-mod.com, Fliggerty, Midgetalien, Trey Leavens, Pokeapoke, Qarl, Lurlock, Princess_stomper, Baratheon79, ixidorsbane, Aridale, Rocket, Boblen 1982, Kir, Thamior Amakiir, Stuporstar, Regaez, The Pixie, Symon69, abotIf you recognise an un-named (or, heaven forbid, named) script that you are the author of, please let me know so I can put it in place! Contact: [email protected]

Activators Beds Buttons Button Activator 2 Flushing Toilet Hurting Actor on contact Hurt actor on contact 2 Invisible Activator Light Switch Reset Activator Teleporting the player Weather Controller (static) Creatures Appearing skeletons trapped chest Making creatures appear by invisible activator Summon Creature on activating an item Visual effect on death Display Cases DISPLAY CASES TYPE - Lady E's which have the glass lids that lower when activated. DISPLAY CASE TYPE - Indigo Rage's Display Cases w/the red fabric interior DISPLAY CASE TYPE - Dongle's Green Glass Display Cabinet Doors

Air Lock Script Auto Closing Doors Auto-Locking doors Door Lock and Alternative Door Lock script Trapped Rug door Trapped Rug 2 Tribunals dark hole script option to pass through

Inventories Adding items after death

Items Making an item unpickupable Teleport Amulet Teleport Ring Teleport Ring 2 Teleport Ring 3 Throbbing items Making objects appear only when an item is in the inventory Sword in the stone Sword in the stone 2 Sword in the stone alternative Weather Controller (carryable) Journal Adding journal entries Using the Journal to make items appear Locks

Briefcase Lock Door Lock and Alternative Door Lock script Auto-Locking doors Keypad Lock

Magic

Magic regenerate

Misc Detecting Players Birthsign Detecting Players Facing Interiors Like Exteriors Keg Script Trash Can Movers Activator Wall move Closing a door Moving wall 1

Moving wall 2 Moving wall 3 Rotating Objects constantly. Up and Down constant movement Music Over-riding battle music NPCs

Chaning NPCs clothes daily Disposition Enforced clothing for a companion (abuse possible) Guard Script Making them fight Making them fight 2 Making them fight two NPCs Making followers warp to you Mannequins Simple Mannequin Armour Mannequin Armour Mannequin place holder Pacifying NPCs

Scale Scale Script 1, 2 & 3 Timers Timer 1

0.2 http://rapidshare.com/files/49624924/Morrowind_Script_Library.rtf.html 0.3 http://rapidshare.com/files/61453313/Morrowind_Script_Library_0.3.rtf.html

ACTIVATORSBed ScriptScript by BethesdaCODE begin Bed_Standard ;used for standard beds the player can activate and sleep in if ( MenuMode == 0) if ( OnActivate == 1 ) ShowRestMenu endif endif end

ButtonsScript by Nikki"Activate script"; which would be placed on a button of some sort. You need to make a global variable first, I'll call it "var01", you should name it something with your initials.

CODE begin button01 short State float xpos float ypos float zpos if ( MenuMode == 1 ) return endif if ( OnActivate ==1 ) if ( State == 0 ) set var01 to 1;your global variable set xpos to ( GetPos, X ) set ypos to ( GetPos, Y ) set zpos to ( GetPos, Z ) PlaySound "cent spider roar" set State to 1 endif endif end NOTE: For the mover, use Activator Wall move script.

Button Activator 2 (a-la Ghostgate)Submitted by Zer010, by Bethesda (?)Here's the classic button/lever leads to wall/gate/whatever moving script: the MW ghostgate script. this part is put on the activator: CODE Begin GG_OpenGate1 ;opens first gate as Ghostgate (say that 5 times) ;put on button float timer short state if ( MenuMode == 1 ) return endif if ( OnActivate == 1 ) if ( GG_Gate1_State == 0 ) PlaySound "Open Lock" "ex_gg_portcullis_01"->Playsound3DVP "Dwemer Door Open" 1.0 1.0 set GG_Gate1_State to 10 set state to 10 endif

endif

if ( State >= 10 ) set timer to ( timer + GetSecondsPassed ) ;move gate up (210 units) if ( timer < 3 ) "ex_gg_portcullis_01"->MoveWorld z 70 ;set back to start elseif ( timer > 21 ) "ex_gg_portcullis_01"->SetAtStart set State to 0 ;can now press button again set GG_Gate1_State to 0 set timer to 0

;move gate down (210 units) elseif ( timer > 18 ) ;use state so sound only plays once if ( State == 10 ) "ex_gg_portcullis_01"->Playsound3DVP "Dwemer Door Open" 1.0 1.0 endif "ex_gg_portcullis_01"->MoveWorld z -70 endif Set State to 20

endif

end GG_OpenGate1

It uses a global variable, GG_Gate1_State Also, the moved bit needs to have this "script": begin state short state end which adds a variable to track, although actually I've never seen it being used.

Flushing ToiletScript by PokeapokeCODE begin flush_script short state float timer if ( MenuMode == 1 ) return ;don't run time in Menu Mode. Very bad. endif if ( state == 0 ); flush is off if ( onActivate == 1 ) PlaySound3D "Dwemer Door Open" set state to 1 set timer to 1; will rotate for 1 second while opening endif elseif ( state == 1 ); flush is turning Rotate X -60; rotates 60 deg/sec set timer to ( timer - GetSecondsPassed ) if ( timer COE 0 0 Set xpos to My_PC_X Set ypos to My_PC_Y Set zpos to My_PC_Z ToggleMenus MenuTest MenuTest Player->SetPos x xpos Player->SetPos y ypos

Player->SetPos FixMe Player->SetPos Player->SetPos Player->SetPos FadeIn 0.1 Endif End

z zpos x xpos y ypos z zpos

Weather Controller (static)Script by Regaez

Here is a script I just recently wrote and it works! It randomly changes the weather when you activate it. It is static, so you cant pick it up. I attached it to the dwemer puzzle box it seemed to fit the script nicely!

CODE Begin Rz_weatherbox_script short change short state short misc if( MenuMode == 1) Return endif if( OnActivate == 1) set state to 10 set misc to Random, 8 endif if( state == 10) if( misc == 0) ChangeWeather, "West Gash Region", 0 ChangeWeather, "Bitter Coast Region", 0 ChangeWeather, "Azura's Coast Region", 0 ChangeWeather, "Ashlands Region", 0 ChangeWeather, "Ascadian Isles Region", 0 ChangeWeather, "Sheogorad", 0 ChangeWeather, "Molag Mar Region", 0 ChangeWeather, "Red Mountain Region", 0 ChangeWeather, "Grazelands Region", 0 MessageBox, "You fiddle around some...and the weather becomes clear!" set state to 0 endif if( misc == 1) ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather,

"West Gash Region", 1 "Bitter Coast Region", 1 "Azura's Coast Region", 1 "Ashlands Region", 1 "Ascadian Isles Region", 1

ChangeWeather, "Sheogorad", 1 ChangeWeather, "Molag Mar Region", 1 ChangeWeather, "Red Mountain Region", 1 ChangeWeather, "Grazelands Region", 1 MessageBox, "You fiddle around some...and the weather becomes cloudy!" set state to 0 endif if( misc == 2) ChangeWeather, "West Gash Region", 2 ChangeWeather, "Bitter Coast Region", 2 ChangeWeather, "Azura's Coast Region", 2 ChangeWeather, "Ashlands Region", 2 ChangeWeather, "Ascadian Isles Region", 2 ChangeWeather, "Sheogorad", 2 ChangeWeather, "Molag Mar Region", 2 ChangeWeather, "Red Mountain Region", 2 ChangeWeather, "Grazelands Region", 2 MessageBox, "You fiddle around some...and the weather becomes foggy!" set state to 0 endif if( misc == 3) ChangeWeather, "West Gash Region", 3 ChangeWeather, "Bitter Coast Region", 3 ChangeWeather, "Azura's Coast Region", 3 ChangeWeather, "Ashlands Region", 3 ChangeWeather, "Ascadian Isles Region", 3 ChangeWeather, "Sheogorad", 3 ChangeWeather, "Molag Mar Region", 3 ChangeWeather, "Red Mountain Region", 3 ChangeWeather, "Grazelands Region", 3 MessageBox, "You fiddle around some...and the weather becomes overcast!" set state to 0 endif if( misc == 4) ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather,

"West Gash Region", 4 "Bitter Coast Region", 4 "Azura's Coast Region", 4 "Ashlands Region", 4 "Ascadian Isles Region", 4 "Sheogorad", 4 "Molag Mar Region", 4 "Red Mountain Region", 4 "Grazelands Region", 4

MessageBox, "You fiddle around some...and the weather becomes rainy!" set state to 0 endif if( misc == 5) ChangeWeather, "West Gash Region", 5 ChangeWeather, "Bitter Coast Region", 5 ChangeWeather, "Azura's Coast Region", 5 ChangeWeather, "Ashlands Region", 5 ChangeWeather, "Ascadian Isles Region", 5 ChangeWeather, "Sheogorad", 5 ChangeWeather, "Molag Mar Region", 5 ChangeWeather, "Red Mountain Region", 5 ChangeWeather, "Grazelands Region", 5 MessageBox, "You fiddle around some...and the weather thunderous!" set state to 0 endif if( misc == 6) ChangeWeather, "West Gash Region", 6 ChangeWeather, "Bitter Coast Region", 6 ChangeWeather, "Azura's Coast Region", 6 ChangeWeather, "Ashlands Region", 6 ChangeWeather, "Ascadian Isles Region", 6 ChangeWeather, "Sheogorad", 6 ChangeWeather, "Molag Mar Region", 6 ChangeWeather, "Red Mountain Region", 6 ChangeWeather, "Grazelands Region", 6 MessageBox, "You fiddle around some...and the weather becomes ash-filled!" set state to 0 endif if( misc == 7) ChangeWeather, "West Gash Region", 7 ChangeWeather, "Bitter Coast Region", 7 ChangeWeather, "Azura's Coast Region", 7 ChangeWeather, "Ashlands Region", 7 ChangeWeather, "Ascadian Isles Region", 7 ChangeWeather, "Sheogorad", 7 ChangeWeather, "Molag Mar Region", 7 ChangeWeather, "Red Mountain Region", 7 ChangeWeather, "Grazelands Region", 7 MessageBox, "You fiddle around some...and the weather becomes blighted!" set state to 0 endif

endif End Rz_weatherbox_script

CREATURESAppearing Skeleton Traped chestScript bt _BILL_ of BethesdaScript 1 (on chest) CODE begin _Cursed_Chest short doOnce if ( OnActivate == 1 ) if ( doOnce == 1 ) Activate return else MessageBox "You suddenly feel quite cold..."

"contain_corpse_XXX1"->Disable "skeleton champ_XXX1"->Enable set "skeleton champ_XXX1".getimBoy to 1 "contain_corpse_XXX2"->Disable "skeleton champ_XXX2"->Enable set "skeleton champ_XXX2".getimBoy to 1 Set doOnce to 1 endif endif End Script 2 (on all skeletons) CODE begin BILL_GTs_Skeletal_Guardians short getimBoy if ( CellChanged == 1 ) Disable endif if ( MenuMode == 1 )

return endif if ( getimBoy == 1 ) if ( GetTarget "Player" == 0 ) StartCombat Player endif endif End

Making creatures appear by invisible activatorScript by NikkiThis one however makes monsters or NPCs warp into existance when you get near a certain invisible marker. First make a global variable. Call it something like "warp var01". Now attach this script to the enemy you want to do the warping:

CODE begin warpCreat01_script short state short playonce short doonce float timer float xpos float ypos float zpos if ( MenuMode == 1 ) return ;don't run time in Menu Mode. Very bad. endif if ( GetDisabled == 0 ) If (state==0) Disable set state to 1 endif endif if ( warp var01 == 1 ) If ( doonce == 0 ) set xpos to ( GetPos, X ) set ypos to ( GetPos, Y ) set zpos to ( GetPos, Z ) set zpos to ( zpos +30 ) Placeitem "sprigganup" xpos ypos zpos 0 Enable set doonce to 1 set playonce to 1 endif

endif If ( playonce == 1 ) set timer to ( timer + GetSecondsPassed ) If ( timer >= 0.50 ) SetFight 100 Startcombat Player Set playonce to 2 endif endif end And of course the good ol' trigger script to cause the warp to take effect when you get near the invisible marker. I reccomend using the activator mesh with the sound effect scripts on them. You can use the same global variable as the above script but you should not use them both in the same cell.

CODE begin WarpTrig01_script short doonce

if ( MenuMode == 1 ) return endif If ( GetDistance, Player = 245 ) set timer to ( timer + GetSecondsPassed ) ;slide lid down if ( Timer < 3 ) MoveWorld Z, -21 ;set back to start elseif ( Timer > 19 ) SetAtStart set State to 0 ;can now press button again set Timer to 0 elseif ( Timer > 16 ) if ( State == 245 ) PlaySound "Door Stone Close" set State to 246 endif MoveWorld Z, 21 endif

endif end

DISPLAY CASE TYPE - Indigo Rage's Display Cases w/the red fabric interior;This script is from IndigoRage it operates the cases that have the red fabric on the bottom. begin SA_Ind_displaycase short state short first short open short close float timer If (MenuMode == 1) Return endif If (OnActivate == 1) Set state to 1 endif If (state == 1) If (first == 0) playgroup, idle2, 0 set open to 1 endif endif if (open == 1) set timer to ( timer + GetSecondsPassed ) if ( timer < 0.5 ) Return endif set timer to 0 playgroup, idle3 set first to 1 set state to 0 set open to 0 endif if (state == 1) if (first == 1) playgroup, idle4, 0

set close to 1 endif endif if (close == 1) set timer to ( timer + GetSecondsPassed ) if ( timer < 0.5 ) Return endif set timer to 0 playgroup, idle set first to 0 set state to 0 set close to 0 endif end SA_Ind_displaycase

DISPLAY CASE TYPE - Dongle's Green Glass Display Cabinet;This script is from Dongle for use with the Green Glass Display Cases. Begin, SA_GlassDisplayScript Short State Short First Short Open Short Close Float Timer If ( MenuMode == 1 ) Return EndIf If ( OnActivate == 1 ) Set State to 1 EndIf If ( State == 1 ) If ( First == 0 ) PlayGroup, Idle2, 0 PlaySound3D, "Door Creaky Open" Set Open to 1 EndIf EndIf If ( Open == 1 ) Set Timer to ( Timer + GetSecondsPassed ) If ( Timer < 0.5 )

Return EndIf Set Timer to 0 PlayGroup, Idle3 Set First to 1 Set State to 0 Set Open to 0 EndIf If ( State == 1 ) If ( First == 1 ) PlayGroup, Idle4, 0 PlaySound3D, "Door Creaky Close" Set Close to 1 EndIf EndIf If ( Close == 1 ) Set Timer to ( Timer + GetSecondsPassed ) If ( Timer < 0.5 ) Return EndIf Set Timer to 0 PlayGroup, Idle Set First to 0 Set State to 0 Set Close to 0 EndIf End, SA_GlassDisplayScript

DOORSAir Lock ScriptScript by Regaez This is the airlock script. Place this on the desired switch. Waterlev and waterstate are global variables (short).

CODE Begin Rz_airlock_switch if( OnActivate == 1) set waterlev to (waterstate + 300) set waterstate to (waterstate + 600) endif if( waterstate > 0) ModWaterLevel, -0.5 set waterstate to (waterstate - 1) endif if( MenuMode == 1) return endif End Rz_airlock_switch Place this script on the door that you exit from to the flooded area (you usually enter from this door). CODE Begin Rz_airlock_exitdoor short height if( MenuMode == 1) return endif if( OnActivate == 1) set height to waterlev ModWaterLevel, height;this resets the water level when you leave the airlock Activate endif

End Rz_airlock_exitdoor

Place this script on the door which leads to the rest of the cell the area which is not flooded. You may need to play around with values depending on what the original waterlevel was I think I set mine to 15000.

CODE Begin Rz_airlock_flooddoor if( MenuMode == 1) return endif if( OnActivate == 1) if( GetWaterLevel > 14750) MessageBox "You need to drain the room of water first, before opening this door." elseif (GetWaterLevel < 14750) Activate endif endif End Rz_airlock_flooddoor

Auto Closing DoorsScript by EnmesharraI hate having doors opened all over the place about as much as I hate having to always stop and close the door. So I created this simple but useful script for my house mod. Put this on a door and the door will close by itself 5 seconds after being opened. CODE Begin ZZA_Door_close_script Short ContVar float timer ;if the door should happen to get messed up or if the player leaves the cell while a door is not finished ;closing itself this resets everything whenever the player enters the cell If ( cellchanged > 0 ) SetAtStart Set ContVar to 0 endif If ( ContVar == 0 ) If ( OnActivate ) Activate set ContVar to 1 set timer to 0 Endif Elseif ( ContVar == 1 ) If ( OnActivate ) ;if the player closes the door by hand set timer to 6 Endif set timer to timer + GetSecondsPassed If timer > 5 Activate set ContVar to 0 Endif Endif End

Door Lock script.Script by PokeapokeCODE Begin Door_lock If ( OnActivate == 1 ) If ( Player -> GetItemCount, "Door_key" >= 1 ) Activate Else; Either You have a Key, Or you don't MessageBox, "You need a key to open this door." EndIf EndIf End

Alternate Door Lock ScriptScript by Qarl

CODE Begin Door_lock If ( OnActivate ) If ( Player->GetItemCount "Door_key" < 1 ) playSound lockedDoor messageBox, "You need a key to open this door." return endif Activate EndIf End

Auto-Lock DoorsScript by Baratheon79CODE begin auto-relock_door_script short activate_count float relock_timer DontSaveObject if ( menumode == 1 ) return endif ;This part allows the player to open the door if they pick the lock or have ;the key in their inventory. if ( GetLocked == 0 ) if ( OnActivate == 1 ) if ( activate_count < 2 ) set activate_count to ( activate_count + 1 ) endif Activate endif else if ( OnActivate == 1 ) if ( Player->GetItemCount, "door_key" >= 1 ) Activate set activate_count to ( activate_count + 1 ) else Activate endif endif endif ;This section relocks the door once it's closed if ( activate_count == 2 ) if ( relock_timer < 2 ) set relock_timer to ( relock_timer + GetSecondsPassed ) elseif ( relock_timer >= 2 ) Lock, 100 PlaySound3D, "Open Lock" set activate_count to 0 set relock_timer to 0 endif

endif end

Trapped RugScript by RocketUse a different spell for this one, you might have to create one. CODE begin Script_Trapped_Rug short state if ( menuMode == 1 ) return endif if ( onActivate == 1 ) return endif if ( state == 2 ) return else if ( getStandingPC == 1 ) if ( state == 0 ) cast sp_trap_fire_5x50 player ; Place code here to raise ; alarm, summon guards etc ... set state to 1 endif else set state to 0 endif endif if ( getSoundPlaying "Disarm Trap" == 1 ) set state to 2 endif end Create a door using a rug model like f\Furn_rug_01.nif. Give it a name like "Handwoven Rug" and attach this script. Set the reference data to locked, level 0, with any trap spell.

Trapped Rug 2Im not sure if this is a door, static or activator script CODE begin BILL_common_trapped_rug ; hits the player with a glyph of weakness when he walks on the rug. ; trap resets 15 seconds later. ; ; script location: should be called from ac_furn_rug_big_04_dren ; variables short onMe short wait float timer

; is the Player on me?

if ( MenuMode == 1 ) return endif if ( wait == 1 ) set timer to ( timer + GetSecondsPassed ) if ( timer < 15 ) return else set timer to 0 set wait to 0 endif endif set onMe to ( GetStandingPC ) if ( onMe == 1 ) MessageBox, "You have triggered a trap..." Cast, "sp_glyphofweakness", Player set wait to 1 endif

end BILL_common_trapped_rug

Tribunals dark hole script a door with an option to pass throughCODE Begin DoorScript short button short messageOn ; this part gives you your choice on activating the Door if ( OnActivate == 1 ) MessageBox "Do you wish pass through the door?" "Yes" "No" set messageOn to 1 endif if ( messageOn == 1 ) set button to GetButtonPressed ;resets the variable so you can use the door multiple times if ( button >= 0 ) set messageOn to 0 endif ;should send you through the door normally if ( button == 0 ) Activate ; should just reset the script, allowing you to do it again elseif ( button == 1 ) set button to 0 return endif endif End DoorScript

INVENTORYMaking items arrive post-death:CODE Begin XX_Death_Script If ( GetHealth = 0 ) set messageOn to 0 endif if ( button == 0 ) Player->PositionCell, insert x here, insert y here, insert z here, 180, "LOCATION" set reset to 1

elseif ( button == 1 ) set reset to 1 return endif endif

End

Teleport RingScripts from http://www.morrowind-mod.com

HOME TELEPORT RING;This script is for the home teleport ring, don't know who wrote this. Begin SA_AbuManor_TeleportRing short OnPCEquip if ( OnPCEquip == 1 ) Player->PositionCell, 2178 2610 1122 0 "Abu Manor" endif set OnPCEquip to 0 End SA_AbuManor_TeleportRing

Teleport Ring 2Script by Thamior AmakiirChange locations to where you want it to take you. CODE Begin da_tb_teleportring short button short messageOn short reset short OnPcEquip ;if ( MenuMode == 1 ) ; Return ;endif

if ( OnPCEquip == 0 ) set reset to 0 endif if ( reset == 1 ) return endif if ( OnPCEquip == 1 ) if ( reset == 0 ) Set OnPCEquip to 0 MessageBox "Where would you like to go?" "Balmora" "Vivec" "Sadrith Mora" "Tel Fyr" "Nowhere" set messageOn to 1 endif endif endif if ( messageOn == 1 ) set button to GetButtonPressed if ( button >= 0 ) set messageOn to 0 endif ;Balmora

if ( button == 0 ) playsound "conjuration hit" Player->PositionCell 4288, 4384, 15300, 90 "Balmora, Temple" set reset to 1 ;Vivec elseif ( button == 1 ) playsound "conjuration hit" Player->PositionCell 5248, 6336, 12850, 180 "Vivec, Hall of Wisdom" set reset to 1 ;Sadrith Mora elseif ( button == 2 ) playsound "conjuration hit" Player->PositionCell 3952, 4344, 1138, 0 "Sadrith Mora, Telvanni Council House, Entry" set reset to 1 return ;Tel Fyr elseif ( button == 3 ) playsound "conjuration hit" Player->PositionCell 108, 102, 54, 0 "Tower of Tel Fyr, Onyx Hall" set reset to 1 return elseif ( button == 4 ) set reset to 1 return endif endif End

Teleport Ring 3Script by Regaez

This is the teleporting ring script. Attach it to a ring (duh). It is currently set to teleport you to Balmora Square. It requires you to make a mark ability and a recall ability. And if you don't want to teleport to Balmora Square you'll just have to change the position cell info.

CODE Begin Rz_teleport_ring short OnPCEquip short button if ( MenuMode == 1 ) return endif if ( OnPCEquip == 1 ) MessageBox "How would you like to teleport?" "Balmora Square" "Mark and go to Balmora Square" "Recall" "Nevermind" set OnPCEquip to 2 endif if ( OnPCEquip == 2 ) set button to GetButtonPressed if ( button == -1 ) return endif if ( button == 0 ) player->PositionCell -23503 -15885 574 74 Balmora -3,-2 set OnPCEquip to 0 endif if ( button == 1 ) player->AddSpell Your_mark_abil_id set OnPCEquip to 3 endif if ( button == 2 ) player->AddSpell Your_recall_abil_id set OnPCEquip to 3 endif if ( button == 3 ) set OnPCEquip to 0 endif endif

if ( OnPCEquip == 3 ) if ( player->GetEffect sEffectMark == 1 ) player->RemoveSpell Your_mark_abil_id player->PositionCell -23503 -15885 574 74 Balmora -3,-2 set OnPCEquip to 0 elseif ( player->GetEffect sEffectRecall == 1 ) player->RemoveSpell Your_recall_abil_id set OnPCEquip to 0 endif endif End Rz_teleport_ring

Throbbing ItemsScript by FliggertyIt makes an object grow and shrink a little bit to simulate a "throbbing" effect. CODE begin throb_script float timer short state float temp short delay if ( MenuMode ) return endif set timer to ( timer + getsecondspassed ) if ( timer >= 3 );change this for delay between grow n shrink if ( state == 0 ) set state to 1 else set state to 0 endif set timer to 0 endif set delay to ( delay + 1 ) if ( delay < 5 );change this for growth speed Return endif set delay to 0 if ( state == 0 ) set temp to GetScale set temp to ( temp + 0.015 );tweak these values for size SetScale temp else set temp to GetScale set temp to ( temp - 0.015 ) SetScale temp endif end

Making objects appear only if the player has an item in their inventoryScript by Zer010This one makes the object it's attached to only appear if the player has a certain item in inventory. It would be pretty cool if you checked for a spell instead of an item, say one which you only got from a faction, since that's not obvious the object appearing would appear to be connected with belonging to said faction. It's from Trey Leavens at the forums

CODE begin scriptname short variable if ( variable == 0 ) if ( GetDisabled == 0 ) disable endif elseif ( variable == 1 ) if ( getdisabled == 1 ) enable endif endif if ( player->GetItemCount, "objectID" >= 1 ) set variable to 1 endif end

Sword in the StoneScript by Regaez

Ah, well here's a little "Sword in the Stone" sort of script. Basically you could put it on a sword stuck in the ground. It's pretty basic, but hey! Note: Comment from author: Oh, I'm writing it from memory, as I am not actually on my Morrowind-playing computer at the moment, so it may not be 100% the correct (I sometimes get muddled up with the greater than/less than signs).

CODE Begin R_strength_test if( MenuMode == 1) Return endif if( OnActivate == 1) if( player-> GetStrength < 50) MessageBox, "You are too weak. You cannot hope to pull this sword out.";or change the sword to whatever you want endif if( player-> GetStrength > 49) if( player-> GetStrength < 60) MessageBox, "You tug but your hands just slip off the hilt. More strength is need to pull out this sword." endif endif if( player-> GetStrength > 59) if( player-> GetStrength < 70) MessageBox, "You imagine a budge, but do not be fooled! You are still not strong enough." endif endif if( player-> GetStrength > 69) if( player-> GetStrength < 80) MessageBox, "It starts to feel like giving way..." endif endif if( player-> GetStrength > 79) if( player-> GetStrength < 90)

MessageBox, "You can feel the sword's futile efforts at resisting you grow weaker." endif endif

if( player-> GetStrength > 89) if( player-> GetStrength < 100) MessageBox, "There is no doubt about it - you shall have the sword with a little more strength in your pull." endif endif if( player-> GetStrength == 100) MessageBox, "You heave and the sword sings as it slides free from the grip of the ground!" Activate endif End R_strength_test

Another not from author: I would just like to make a last minute defense in case this script has some fatal flaws and say that I am not the best at scripting and... oh what the heck, you get the idea! If it's wrong then it's wrong and I'm sure you super dooper scripters out there can fix it in the blink of an eye!

Sword in the stone 2Script by Regaez

Another Sword in the Stone theme script. Attach this to a Daedric Longsword or a weapon of your choice! CODE Begin Rz_dae_longsword_dummy short pickup if( MenuMode == 0) if( pickup == 0) if( OnActivate == 1) MessageBox "You try to pick the sword up but find it stuck fast to the ground." set pickup to 1 endif endif if( pickup == 1) if( OnActivate == 1) MessageBox "You try to pick the sword up but find it stuck fast to the ground." set pickup to 2 endif endif if( pickup == 2) if( OnActivate == 1) MessageBox "You try to pick the sword up but find it stuck fast to the ground." set pickup to 3 endif endif if( pickup == 3) if( OnActivate == 1) MessageBox "You try to pick the sword up but find it stuck fast to the ground." set pickup to 4 endif endif

if( pickup == 4) if( OnActivate == 1) MessageBox "The sword suddenly comes free, your perserverence paid off!" Activate

endif endif endif End Rz_dae_longsword_dummy

Alternativeby Symon69CODE Begin R_strength_test local pstr if ( MenuMode == 1) Return endif set pstr to player -> GetStrength if ( OnActivate ) if ( pstr < 50) MessageBox, "You are too weak. You cannot hope to pull this sword out.";or change the sword to whatever you want elseif ( pstr < 60) MessageBox, "You tug but your hands just slip off the hilt. More strength is need to pull out this sword." elseif ( pstr < 70) MessageBox, "You imagine a budge, but do not be fooled! You are still not strong enough." elseif ( pstr < 80) MessageBox, "It starts to feel like giving way..." elseif ( pstr < 90) MessageBox, "You can feel the sword's futile efforts at resisting you grow weaker." elseif ( pstr < 100) MessageBox, "There is no doubt about it - you shall have the sword with a little more strength in your pull." else MessageBox, "You heave and the sword sings as it slides free from the grip of the ground!" Activate endif endif End R_strength_test

Weather Controller (carryable)Script by Regaez

This is essentially the same script as above, but you can carry the object it is attached to! To use it you just drag it onto your person in the inventory menu. CODE Begin Rz_carry_weatherbox_script short change short state short misc short OnPCEquip if( MenuMode == 1) Return endif if( OnPCEquip == 1) set state to 10 set misc to Random, 8 set OnPCEquip to 0 endif if( state == 10) if( misc == 0) ChangeWeather, "West Gash Region", 0 ChangeWeather, "Bitter Coast Region", 0 ChangeWeather, "Azura's Coast Region", 0 ChangeWeather, "Ashlands Region", 0 ChangeWeather, "Ascadian Isles Region", 0 ChangeWeather, "Sheogorad", 0 ChangeWeather, "Molag Mar Region", 0 ChangeWeather, "Red Mountain Region", 0 ChangeWeather, "Grazelands Region", 0 MessageBox, "You fiddle around some...and the weather becomes clear!" set state to 0 endif if( misc == 1) ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather,

"West Gash Region", 1 "Bitter Coast Region", 1 "Azura's Coast Region", 1 "Ashlands Region", 1 "Ascadian Isles Region", 1

ChangeWeather, "Sheogorad", 1 ChangeWeather, "Molag Mar Region", 1 ChangeWeather, "Red Mountain Region", 1 ChangeWeather, "Grazelands Region", 1 MessageBox, "You fiddle around some...and the weather becomes cloudy!" set state to 0 endif if( misc == 2) ChangeWeather, "West Gash Region", 2 ChangeWeather, "Bitter Coast Region", 2 ChangeWeather, "Azura's Coast Region", 2 ChangeWeather, "Ashlands Region", 2 ChangeWeather, "Ascadian Isles Region", 2 ChangeWeather, "Sheogorad", 2 ChangeWeather, "Molag Mar Region", 2 ChangeWeather, "Red Mountain Region", 2 ChangeWeather, "Grazelands Region", 2 MessageBox, "You fiddle around some...and the weather becomes foggy!" set state to 0 endif if( misc == 3) ChangeWeather, "West Gash Region", 3 ChangeWeather, "Bitter Coast Region", 3 ChangeWeather, "Azura's Coast Region", 3 ChangeWeather, "Ashlands Region", 3 ChangeWeather, "Ascadian Isles Region", 3 ChangeWeather, "Sheogorad", 3 ChangeWeather, "Molag Mar Region", 3 ChangeWeather, "Red Mountain Region", 3 ChangeWeather, "Grazelands Region", 3 MessageBox, "You fiddle around some...and the weather becomes overcast!" set state to 0 endif if( misc == 4) ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather, ChangeWeather,

"West Gash Region", 4 "Bitter Coast Region", 4 "Azura's Coast Region", 4 "Ashlands Region", 4 "Ascadian Isles Region", 4 "Sheogorad", 4 "Molag Mar Region", 4 "Red Mountain Region", 4 "Grazelands Region", 4

MessageBox, "You fiddle around some...and the weather becomes rainy!" set state to 0 endif if( misc == 5) ChangeWeather, "West Gash Region", 5 ChangeWeather, "Bitter Coast Region", 5 ChangeWeather, "Azura's Coast Region", 5 ChangeWeather, "Ashlands Region", 5 ChangeWeather, "Ascadian Isles Region", 5 ChangeWeather, "Sheogorad", 5 ChangeWeather, "Molag Mar Region", 5 ChangeWeather, "Red Mountain Region", 5 ChangeWeather, "Grazelands Region", 5 MessageBox, "You fiddle around some...and the weather thunderous!" set state to 0 endif if( misc == 6) ChangeWeather, "West Gash Region", 6 ChangeWeather, "Bitter Coast Region", 6 ChangeWeather, "Azura's Coast Region", 6 ChangeWeather, "Ashlands Region", 6 ChangeWeather, "Ascadian Isles Region", 6 ChangeWeather, "Sheogorad", 6 ChangeWeather, "Molag Mar Region", 6 ChangeWeather, "Red Mountain Region", 6 ChangeWeather, "Grazelands Region", 6 MessageBox, "You fiddle around some...and the weather becomes ash-filled!" set state to 0 endif if( misc == 7) ChangeWeather, "West Gash Region", 7 ChangeWeather, "Bitter Coast Region", 7 ChangeWeather, "Azura's Coast Region", 7 ChangeWeather, "Ashlands Region", 7 ChangeWeather, "Ascadian Isles Region", 7 ChangeWeather, "Sheogorad", 7 ChangeWeather, "Molag Mar Region", 7 ChangeWeather, "Red Mountain Region", 7 ChangeWeather, "Grazelands Region", 7 MessageBox, "You fiddle around some...and the weather becomes blighted!" set state to 0 endif

endif End Rz_carry_weatherbox_script

JOURNALAdding journal entriesScript by Cyran0Well, here is a script that I frequently use in designing quests. It updates the players journal upon reading a book or note. It works whether the player reads the note by activating it in the world or equipping the note from inventory. CODE Begin lgnpc_fq_NoteScript ; Attached to note to trigger a journal update when player reads it. short readNote short OnPCEquip short PCSkipEquip if ( readNote == 1 ) return endif set PCSkipEquip to 0 if ( OnActivate == 1 ) if ( GetJournalIndex "lgnpc_fq_X" == 40 ) Journal "lgnpc_fq_X" 50 set readNote to 1 endif Activate return endif if ( menumode == 0 ) return endif set PCSkipEquip to 1 if ( OnPCEquip == 1 ) if ( GetJournalIndex "lgnpc_fq_X" == 40 ) Journal "lgnpc_fq_X" 50 endif

set readNote to 1 set OnPCEquip to 0 set PCSkipEquip to 0 Activate endif End lgnpc_fq_NoteScript

Using the Journal to make items appearThis script can be placed on an item, activator, NPC to make it appear only after a certain Journal entry has been reached. Remember to replace MY_JOUNRAL_INDEX with the journal name of the required entry. CODE Begin Journal_enable_script if ( GetDisabled == 0 ) if ( GetJournalIndex MY_JOUNRAL_INDEX < 20 ) Disable endif elseif ( GetDisabled == 1 ) if ( GetJournalIndex MY_JOUNRAL_INDEX >= 20 ) Enable endif endif End Journal_enable_script

LOCKSBriefcase LockScript by KirCODE begin CodeLock_Briefcase short status ; 0 - initialization ; -1 - locked and standby ; 2 - locked and activated ; 3 - processing buttons ; -4 - unlocked and standby ; 5 - unlocked and activated ; 6 - processing lockpicking ; 7 - blocking from reaction to OpenLockFail sound more than once short codesum short code1 short code2 short code3 short code4 short lock1 short lock2 short lock3 short lock4 short locksum short button short pickable float chance short i short j if ( OnActivate == 1 ) if ( status == -4 ) set status to 5 else set status to 2 endif endif if ( GetSoundPlaying "Open Lock Fail" == 1 )

if ( status == -1 ) set status to 6 return endif endif if ( status < 0 ) return endif if ( status == 7 ) if ( GetSoundPlaying "Open Lock Fail" == 0 ) set status to -1 endif return endif if ( status == 0 ) set pickable to 100; GetLuck ) set i to ( i / 10 ) set chance to ( chance + i ) ;messagebox "Security + Random + Luck chance %.3f" chance if ( Player->GetItemCount "skeleton_key" > 0 ); Morrowind only ; if ( Player->HasItemEquipped "skeleton_key" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 2 ) elseif ( Player->GetItemCount "pick_secretmaster" > 0 ); Morrowind only ; elseif ( Player->HasItemEquipped "pick_secretmaster" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 1.2 ) elseif ( Player->GetItemCount "pick_grandmaster" > 0 ); Morrowind only ; elseif ( Player->HasItemEquipped "pick_grandmaster" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 1.1 ) elseif ( Player->GetItemCount "pick_master" > 0 ); Morrowind only ; elseif ( Player->HasItemEquipped "pick_master" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 1.0 ) elseif ( Player->GetItemCount "pick_journeyman_01" > 0 ); Morrowind only ; elseif ( Player->HasItemEquipped "pick_journeyman_01" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 0.8 ) elseif ( Player->GetItemCount "pick_apprentice_01" > 0 ); Morrowind only ; elseif ( Player->HasItemEquipped "pick_apprentice_01" > 0 ); Tribunal/Bloodmoon set chance to ( chance * 0.6 ) endif ;messagebox "Total chance %.3f" chance if ( ( Chance * 2 ) < pickable ) set status to 7 MessageBox "You have no slightest idea how to crack this lock" return endif if ( ( Chance * 1.5 ) < pickable ) set status to 7 MessageBox "You tamper with the lock but have no success this time" return endif if ( ( Chance * 1.2 ) < pickable ) set status to 7 MessageBox "You almost pick up one of triggers but at the last moment it's off" return endif

set j to Random, 40; choosing random digit out of 4 set i to j / 10 set j to 0 if ( i == 0 ); skipping digits already picked if ( lock1 == code1 ); this fragment is repeated twice on purpose! set i to 1 endif endif if ( i == 1 ) if ( lock2 == code2 ) set i to 2 endif endif if ( i == 2 ) if ( lock3 == code3 ) set i to 3 endif endif if ( i == 3 ) if ( lock4 == code4 ) set i to 0 endif endif if ( i == 0 ) if ( lock1 == code1 ) set i to 1 endif endif if ( i == 1 ) if ( lock2 == code2 ) set i to 2 endif endif if ( i == 2 ) if ( lock3 == code3 ) set i to 3 endif endif if ( i == 3 ) if ( lock4 == code4 ) set i to 0; it should never occur, but version with "while" would occasionally hang the program messagebox "Program alert"; into eternal loop, so maybe I'm missing something. Mail me if you see this message endif

endif if ( i == 0 ) if ( Chance < pickable ) if ( lock1 < code1 ) MessageBox "You get the feeling that the first digit must be higher" set lock1 to lock1 + 1 else MessageBox "You get the feeling that the first digit must be lower" set lock1 to lock1 - 1 endif else set lock1 to code1 MessageBox "You manage to figure the first digit of the code. It is ' %.0f '", code1 endif set status to 7 elseif ( i == 1 ) if ( Chance < pickable ) if ( lock2 < code2 ) MessageBox "You get the feeling that the second digit must be higher" set lock2 to lock2 + 1 else MessageBox "You get the feeling that the second digit must be lower" set lock2 to lock2 - 1 endif else set lock2 to code2 MessageBox "You manage to figure the second digit of the code. It is ' %.0f '", code2 endif elseif ( i == 2 ) if ( Chance < pickable ) if ( lock3 < code3 ) MessageBox "You get the feeling that the third digit must be higher" set lock3 to lock3 + 1 else MessageBox "You get the feeling that the third digit must be lower" set lock3 to lock3 - 1 endif else set lock3 to code3 MessageBox "You manage to figure the third digit of the code. It is ' %.0f '", code3 endif elseif ( i == 3 ) if ( Chance < pickable ) if ( lock4 < code4 ) MessageBox "You get the feeling that the fourth digit must be higher"

set lock4 to lock4 + 1 else MessageBox "You get the feeling that the fourth digit must be lower" set lock4 to lock4 - 1 endif else set lock4 to code4 MessageBox "You manage to figure the fourth digit of the code. It is ' %.0f '", code4 endif endif set status to 7 set locksum to ( lock1 * 1000 ) + ( lock2 * 100 ) + ( lock3 * 10 ) + lock4 if ( locksum == codesum ) set status to 5 MessageBox "You've successfully picked the code lock" if ( pickable > 0 ) Unlock endif PlaySound "Open Lock" endif endif end

Keypad lockScript by KirCODE begin CodeLock_Numpad1 short status ; 0 - initialization ; -1 - locked and standby ; 2 - locked and activated ; 3 - processing buttons ; -4 - unlocked and standby ; 5 - unlocked and activated ; 6 - processing lockpicking ; 7 - blocking from reaction to OpenLockFail sound more than once long codesum long code short lock_length short lock_order short code1 short code2 short code3 short code4 short code5 short code6 short code7 short code8 short code9 short code10 short code11 short code12 short code13 short code14 short code15 short button short pickable float chance short doonce short correct short i if ( OnActivate == 1 ) if ( status == -4 )

set status to 5 else set status to 2 set lock_order to 1 set codesum to 0 endif endif

if ( GetSoundPlaying "Open Lock Fail" == 1 ) if ( status == -1 ) set status to 6 endif endif if ( status < 0 ) return endif if ( status == 7 ) if ( GetSoundPlaying "Open Lock Fail" == 0 ) set status to -1 endif return endif if ( status == 0 ) set pickable to 100; disable set doonce to 4 return else return endif endif if doonce ( == 0 ) ;trigger when player stands on item if ( GetStandingPC == 1 ) Set doonce to 1 endif return endif if ( doOnce == 1 ) PlaySound "Door Stone Open" Set doOnce to 2 endif Set counter to counter + GetSecondsPassed "in_dwrv_wall_GDRN_1"->MoveWorld X 80

if ( counter > 6 ) Set doOnce to 3 Set counter to 0 endif end GDRN_LostStairTrap

Sliding wall trap 2Script submitted by Nedius, written by Nedius but made to work by EnmesharraThis should be placed on a mesh that the player stands on to activate a wall mover.CODE Begin GDRN_LostStairTrap float counter Short doOnce if ( doonce == 4 ) ;once script has done it's thing, keep it as short as possible return endif if ( MenuMode == 1 ) return endif

if ( doonce == 0 ) ;trigger when player stands on item if ( GetStandingPC == 1 ) Set doonce to 1 endif elseif ( doonce == 1 ) PlaySound "Door Stone Open" Set doOnce to 2 elseif ( doonce == 2 ) Set counter to counter + GetSecondsPassed "in_dwrv_wall_GDRN_1"->MoveWorld X 80 if ( counter > 6 ) Set doOnce to 3 Set counter to 0 endif elseif ( doOnce == 3 ) if ( CellChanged == 1 ) "in_dwrv_wall_GDRN_1"->disable set doonce to 4 return endif endif end GDRN_LostStairTrap

Sliding wall trap 3Submitted by Nedius, written by Nedius but made to work by EnmesharraThis should be placed on a mesh that the player stands on to activate a wall mover. CODE

Begin GDRN_LostStairTrap

short state float counter Short doOnce if ( MenuMode == 1 ) return endif if ( GetStandingPC == 0 ) ;its best to do it this way ... otherwise the whole script until you step on the mesh return endif If ( doOnce == 0) set state to 10 endif if ( state == 10 ) Set counter to counter + GetSecondsPassed if ( counter < 6 ) "in_dwrv_wall_GDRN_1"->Playsound3DVP "Door Stone Open" 1.0 1.0 "in_dwrv_wall_GDRN_1"->MoveWorld Z 320 elseif ( counter > 6.1 ) Set doOnce to 2 Set counter to 0 Set state to 0 endif

if ( CellChanged == 1 ) if ( doOnce == 2 ) "in_dwrv_wall_GDRN_1"->disable endif end GDRN_LostStairTrap

Rotating Objects constantly.Script by Nikki

This script will make an object rotate constantly. You should change the X/Y/Z value to alter the axis, the number to alter the speed. CODE Begin rotate if ( menumode == 1 ) return endif ;spin around if ( OnActivate == 0 ) Rotate Z 90 ; Rotate " this is the Axis" "this is the speed" return endif End rotate

Up and Down constant movementThis will make a mover rise and then fall again, constantly.

CODE begin updwn float float timer uptime

if ( MenuMode == 0 ) set uptime to 1 set timer to ( timer + GetSecondsPassed ) ;move up if ( timer < uptime ) Move Z,2 ;movedown elseif ( timer < (uptime * 3) ) Move Z, -2 ;up again elseif (timer < (uptime * 4 ) ) Move Z, 2 ;reset timer to zero else set timer to 0 SetAtStart endif endif end updwn

MUSICOver-Riding Battle MusicScript by NikkiThis script causes a certain music file to be played and overrides battle music. I always thought battle music ruined the element of suprise in MW, as levitation magic ruins the fun of exploration. First make two rats, one called "music rat 01" and another called "music rat 01b", check the references persist tab on rat01b. Give each of them a constant paralyze ability. Place this script on "music rat 01":

CODE begin no_battle_music Float timer Short doOnce set timer to ( timer + getSecondsPassed ) if ( CellChanged == 1 ) set doOnce to 0 endif if ( doOnce == 2 ) if ( timer > 112 ); insert the length of your track (in seconds) here StreamMusic "explore\Morrowind title.mp3"; insert your track name here set timer to 0 endif elseif ( doOnce == 1 ) if ( timer > 1 ) StreamMusic "explore\Morrowind title.mp3"; insert your track name here set doOnce to 2 set timer to 0 endif elseif ( doOnce == 0 ) StartCombat "music_rat01b" set timer to 0 set doOnce to 1 endif

end no_battle_music

Then place each of them in the cell somewhere where you cant see them like under a rock or something. They will try to fight one another but wont be able to move due to the paralyse ability. The music file you scripted on the other one will loop over and over as long as you are in the cell and will not be interuppted by battle music. I got this idea from another poster on this forum but the original had just one rat that attacked the player. The problem with that version is that any NPCs or creatures with startcombat scripted on them caused battle music to play again. This one is foolproof.

NPCsChanging NPCs clothes dailyScript by Trey LeavensHeres a simple script to make a npc wear different outfits on different days, for each day of the week, and pjs at night. substitute or add lines for whatever outfits you want. they do not have to be in it's inventory, the equip command additems and equips to npcs.

CODE begin laundryscript short currentday short localday short shirtchange short pajammas if ( currentday != Day ) set currentday to day set localday to ( localday + 1 ) set shirtchange to 0 endif if ( pajammas == 0 ) if ( gamehour >= 20 ) equip, "nightgown" set pajammas to 1 endif if ( shirtchange == 0 ) if ( localday == 1 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01_c" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 2 ) if ( gamehour >= 6 )

equip, "extravagant_robe_01_h" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 3 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01_r" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 4 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01_t" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 5 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 6 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01_a" set shirtchange to 1 set pajammas to 0 endif endif if ( localday == 7 ) if ( gamehour >= 6 ) equip, "extravagant_robe_01_b" set shirtchange to 1 set pajammas to 0 set localday to 0 endif endif

endif end laundryscript

DispositionScript by MelianThis one is VERY simple, but I seem to remember people asking about NPC disposition control a lot in the past. Sets an NPC's in-game (not base) disposition to match a variable NPC_Disp. CODE begin NPC_local_script float temp ;short NPC_Disp ;can be local or global, as needed ;can also be a float if you like but not necessary unless you want to mod disp by a float value

if ( MenuMode == 1 ) if ( NPC_Disp < 0 ) set NPC_Disp to 0 elseif ( NPC_Disp > 100 ) set NPC_Disp to 100 endif set temp to ( GetDisposition ) set temp to ( NPC_Disp - temp ) ModDisposition temp endif end

The only way to change the NPC's disposition is to set NPC_Disp, nothing else will have any effect. So no "ModDisposition 10", it's "set NPC_Disp to ( NPC_Disp + 10 )".

Enforced clothing for a companionScript by EnmesharraThe concept is for a companion to have their own outfit and not wear the stuff you really just want them to carry for you. This is the simple version, the one I'm using in the mod will allow the player to choose from several outfits. The script is started in the result box of the companions greetings. When you give the companion things to carry, if they are more valuable or have a better armor rating then the companions personl stuff then they will immediately put them on. Once the dialog ends this script removes all clothes and re-equips the companions personal outfit. This would work for a merchant as well. The items ZZA_strip_01 through ZZA_strip_05 - are a set of clothing and armor that cover all body parts, ensuring the removal of all clothing/armor. The items ZZA_Comp_outfit_1 and ZZA_Comp_outfit_2 are the companions personal armor and boots. The potential for abuse exists in that it is easy for the player to create an infinate number of the companions outfit by removeing them each time. When I included checks to see if the companion still possed the outfit it slowed the redressing down too much (at least in the complicated multioutfit version). If someone is going to exploit this, they can just use the console to give themselves a bunch of money much more easily, so I didn't worry about it. (Except to make the companions outfit only worth 1 gold piece). CODE Begin ZZA_comp_dress_script short counter If ( menumode == 1 ) return endif if ( counter < 3 ) ;when called from a greeting the script will run before menu mode set counter to ( counter + 1 );registers, this delay prevents that. return endif If ( GetHealth GetDistance NPC2_ID ) > 2000 ); change 2000 as needed return endif set doOnce to 1 NPC1_ID->SetFight 100 NPC2_ID->SetFight 100 NPC1_ID->SetFlee 0 NPC2_ID->SetFlee 0 NPC1_ID->StartCombat NPC2_ID NPC2_ID->StartCombat NPC1_ID End Kite_NPCDuel

Making them fight 2This script should be placed on NPC1, and another on NPC2. However, the script for NPC2 should have the locations on NPC1 and NPC2 reversed. CODE Begin fightNPC1 Short NoLore short doOnceA if ( CellChanged == 0 ) Return endif if ( doOnceA == 0 ) if ( GetDeadCount NPC2 == 0 ) StartCombat NPC2 set doOnceA to 1 endif endif End fight NPC1

Making them fight two NPCsTo make an NPC fight with two NPCs, NPC 1 uses this script, NPCs 2 & 3 use the above script, suitably altered. CODE Begin fightNPC1 Short NoLore short doOnceA short doOnceB if ( CellChanged == 0 ) Return endif if ( doOnceA == 0 ) if ( GetDeadCount "NPC2" == 0 ) StartCombat "NPC2" set doOnceA to 1 endif endif if ( doOnceB == 0 ) if ( GetDeadCount "NPC3" == 0 ) StartCombat "NPC3" set doOnceB to 1 endif endif End fightNPC1

Making Companions warp to youScript by Grumpy, Submitted by Zer010This script is used a lot, it's Grumpy's companion script which causes a companion to "warp" back to you if it gets too far away ( meaning that it's stuck in a hedge or something ). You still need to put the companion in follow mode through dialogue/script. CODE float myx float myy float myz float timer if ( GetCurrentAIPackage == 3 ) if ( Player->GetEffect sEffectLevitate == 1 ) AIWander 0 0 0 0 endif if ( GetWeaponDrawn == 1 ) return elseif ( GetDistance Player > 800 ) set timer to timer + GetSecondsPassed if ( timer > 8 ) set timer to 0 set myx to ( Player->GetPos x ) set myy to ( Player->GetPos y ) set myz to ( Player->GetPos z ) SetPos x myx SetPos y myy SetPos z myz endif endif endif endif

MannequinsSimple MannequinScript by Zer010A simple mannequin script. This freezes an NPC into position so the player can put armour on them. They're fun but disturbingly detailed for mannequins. The simplest one is this: CODE begin simple_mannequin skipanim end You put it on an NPC with 0 life and "corpses persist" checked, their body stays upright. Problem is you can get rid of them if you hit "dispose of corpse" when activating them.

Simple MannequinScripts from http://www.morrowind-mod.com

ARMOR MANNEQUINS - Wooden Armor Mannequins

by Chris Janosi. These are non-weapon wielding & they are moveable so you need the placeholder script, which is provided here also.;script operates armor mannequins it came from Chris Janosi begin SA_mannequin short button short questionState SkipAnim if ( menumode == 1 ) return endif if ( OnActivate == 0 ) if ( questionState == 0 ) return endif endif if ( questionState == 0 ) MessageBox, "Armor Mannequin", "Move Mannequin", "Add/Remove Armor" set questionState to 1 endif if ( questionState == 1 ) set button to GetButtonPressed if ( button == 0 ) set questionState to 10 elseif ( button == 1 ) set questionState to 0 Activate endif endif if ( questionState == 10 ) MessageBox "Did you remove all items from the mannequin?", "Yes", "No" set questionState to 20 endif

if ( questionState == 20 ) set button to GetButtonPressed if ( button == 0 ) set questionState to 0 Disable player->addItem, "_SA_armorman_placeholder", 1 playSound "Item Misc Up" elseif ( button == 1 ) set questionState to 0 Activate endif endif end SA_mannequin ARMOR MANNEQUIN PLACEHOLDER SCRIPT- used with the above script for Chris Janosi Mannequins ;script operates armor mannequin placeholders it came from Chris Janosi begin SA_mannequinplaceholder short OnPCDrop if ( OnPCDrop == 1 ) Disable ; PlaceAtPC, "_SA_ArmorMann_Wooden", 1, 64, 0 PlaceAtPC, "_SA_ArmorMann_Wooden", 1, 0, 0 Set OnPCDrop to 0 endif end SA_mannequinplaceholder

Pacifying NPCsScript by LurlockCODE begin punching_Bag short OnPCHitMe if ( OnPCHitMe == 1 ) set OnPCHitMe to 0 stopCombat, player ;Here's a good place to play some sort of sound or whatever. endif end

For the scale of your choice, simply edit the setscale X number.

SCALE

Numerous modders have suggested these, or similar scripts. Here a selection. Thanks to all who submitted.Scale Script 1 CODE Begin ScaleScript short DoOnce if ( doOnce == 1 ) return endif SetScale 3.0 set DoOnce to 1 end ScaleScript

Scale Script 2 CODE Begin _scale_20 if ( getscale != 20.00 ) setscale 20.00 endif End _scale_20 Scale Script 3 CODE begin _scale_5 ;replace 5.0 with whatever scale you want it to have if ( getscale != 5.0 ) setscale 5.0 endif End

TIMERSTimer 1By Zer010

Well, here's a timer Placed on an activator, it'll make it do something five seconds after activation. CODE begin activate_timer float timer short doonce1 short doonce2 if ( OnActivate == 1 ) if ( doonce2 == 0 ) set doonce1 to 0 set doonce2 to 1 set timer to ( timer + GetSecondspassed ) if ( timer > 5 ) if ( doonce1 == 0 ) ;do something here set doonce1 to 1 set doonce2 to 0 set timer to 0 endif endif endif end

Or perhaps it would work with timer=5, and one fewer doonce? Dunno...