Editing Useful Scripts
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
= GECK = | = GECK = | ||
==Timed Doors== | ==Timed Doors== | ||
Line 323: | Line 304: | ||
</pre> | </pre> | ||
== | ==Water Purifier== | ||
Script Type: Object | |||
<small>A very simple script, with an example of using an activator to manipulate items in the player's inventory. You can pick up some basics from this script. Based loosely on the House Nuka-Cola machine script in game, this is for use on an activator that purifies bottles of dirty water in the player's inventory.</small> | |||
<pre> | |||
scn AAAwpscript | |||
;This script is designed to handle a Water Purifier | |||
;This script is attached to the Water Purifier I have added in the player's megaton house | |||
;Basically all it does is check to see how many dirty waters the player is carrying, it removes them all and adds purified waters instead | |||
short DirtyOnMe ;declare a variable to store the number of dirty waters the player has | |||
begin OnActivate ;starts the script when the purifier is activated | |||
if ( IsActionRef Player == 1 ) | |||
;checks to make sure you are the player | |||
if ( Player.GetItemCount WaterUnpurified >= 1 ) | |||
;checks to make sure you actually have some dirty water on you | |||
ShowMessage AAAWPdirtywith | |||
;displays a message that tells the player what the machine does | |||
set DirtyOnMe to ( Player.GetItemCount WaterUnpurified ) | |||
;sets DirtyOnMe to however many Dirty Waters the player has | |||
Player.RemoveItem WaterUnpurified DirtyOnMe | |||
;removes all of the player's dirty water from the invent. | |||
player.AddItem WaterPurified DirtyOnMe | |||
;adds the purified water - same number as dirt waters removed | |||
elseif ( Player.GetItemCount WaterUnpurified < 1 ) | |||
;if the player has no dirty water in their invent | |||
ShowMessage AAAWPdirtywithout | |||
;display a message telling the player they need more dirty water | |||
endif | |||
endif | |||
end | |||
</pre> | </pre> | ||
= + [[Fallout Script Extender|FOSE]] = | = + [[Fallout Script Extender|FOSE]] = | ||
Line 477: | Line 413: | ||
endif | endif | ||
endif | endif | ||
End | End | ||
</pre> | </pre> |