Sprak world functions: Difference between revisions
From wikinotes
(6 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
GetType() # Gets type of item (used in Trash Can) | GetType() # Gets type of item (used in Trash Can) | ||
GetPosition(name) # Get Coordinates of a user (ex: Pixie) (only police computer...) | GetPosition(name) # Get Coordinates of a user (ex: Pixie) (only police computer...) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Functions --> | </blockquote><!-- Functions --> | ||
Line 24: | Line 15: | ||
Attributes can be modified on consumable items (beverages, ciggarettes, ...). | Attributes can be modified on consumable items (beverages, ciggarettes, ...). | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Charisma(100) # | |||
Drunkeness( 50) # Standard Beer | Drunkeness( 50) # Standard Beer | ||
Sleepiness(-25) # Standard Coffee | Sleepiness(-25) # Standard Coffee | ||
Line 35: | Line 27: | ||
</blockquote><!-- Attributes --> | </blockquote><!-- Attributes --> | ||
= | = Items = | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | |||
CreateDrink("Coke", 100) # Creaate any arbitrary drink (haven't had success other thank coke...) | |||
Delete() # Delete an item (used in trashcan) | |||
MoveToRoom("MonadsApartment") # Move item to room (used in trashcan) | |||
Drink(25) # (?) sinks have this... | |||
</syntaxhighlight> | |||
</blockquote><!-- Items --> | |||
= Computers/Terminals = | |||
<blockquote> | |||
Node Specific | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Info() # Get Info about the running system (Speed, modem, floppy drive, memory, screen x/y ) | Info() # Get Info about the running system (Speed, modem, floppy drive, memory, screen x/y ) | ||
GetName() # name of current computer | |||
</syntaxhighlight> | |||
Floppies | |||
<syntaxhighlight lang="bash"> | |||
BootFromFloppy() # Run a Floppy Diskette | BootFromFloppy() # Run a Floppy Diskette | ||
var = LoadData() # Get info on Floppy Diskette | var = LoadData() # Get info on Floppy Diskette | ||
</syntaxhighlight> | |||
User Input | |||
<syntaxhighlight lang="bash"> | |||
var cmd = Input(">") # save user-input to variable | var cmd = Input(">") # save user-input to variable | ||
IsKeyPressed("up") # if user has key pressed | |||
</syntaxhighlight> | |||
Text Graphics | |||
<syntaxhighlight lang="bash"> | |||
ClearText() # Clear the screen | |||
Print("abc") # Print to screen | |||
Say("abc") # prints in text-bubble when used | |||
</syntaxhighlight> | |||
Graphics | |||
<syntaxhighlight lang="bash"> | |||
DisplayGraphics() # (?) used on some computers | |||
Color(1, 1, 0) # set color of ? | |||
Text(1, 1, "Score") # write word 'Score' at line-1, col-1 | |||
Rect(x1, y1, x2, y2) # draw rectangle between two points | |||
Line(x1, y1, x2, y2) # draw line between two points | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Terminals --> | </blockquote><!-- Terminals --> | ||
Line 58: | Line 77: | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# From Fusebox | # From Fusebox, uncertain what it does | ||
powerTap = Connect("PowerTap") | powerTap = Connect("PowerTap") | ||
name = GetName() | name = GetName() | ||
Line 68: | Line 87: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- FuseBoxes --> | </blockquote><!-- FuseBoxes --> | ||
= Doors = | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
Toggle(1111) # toggle lock/unlock door (from id) | |||
Lock(doorname) # unlock a door | |||
Unlock(doorname) # lock a door | |||
</syntaxhighlight> | |||
</blockquote><!-- Doors --> |
Latest revision as of 03:17, 10 January 2023
General
GetUser() # Identifies you as "Sebastian" GetRoom() # Identifies room being accessed from GetHour() # Gets hour, most TVs use this GetType() # Gets type of item (used in Trash Can) GetPosition(name) # Get Coordinates of a user (ex: Pixie) (only police computer...)
Human Attributes
Attributes can be modified on consumable items (beverages, ciggarettes, ...).
Charisma(100) # Drunkeness( 50) # Standard Beer Sleepiness(-25) # Standard Coffee Smelliness( 10) # Standard Drink Corruption(-25) # Default Coke QuickBoost() # (?) Snus FastForward() # (?) Drug Slurp() # Move yourself to active connection
Items
CreateDrink("Coke", 100) # Creaate any arbitrary drink (haven't had success other thank coke...) Delete() # Delete an item (used in trashcan) MoveToRoom("MonadsApartment") # Move item to room (used in trashcan) Drink(25) # (?) sinks have this...
Computers/Terminals
Node Specific
Info() # Get Info about the running system (Speed, modem, floppy drive, memory, screen x/y ) GetName() # name of current computerFloppies
BootFromFloppy() # Run a Floppy Diskette var = LoadData() # Get info on Floppy DisketteUser Input
var cmd = Input(">") # save user-input to variable IsKeyPressed("up") # if user has key pressedText Graphics
ClearText() # Clear the screen Print("abc") # Print to screen Say("abc") # prints in text-bubble when usedGraphics
DisplayGraphics() # (?) used on some computers Color(1, 1, 0) # set color of ? Text(1, 1, "Score") # write word 'Score' at line-1, col-1 Rect(x1, y1, x2, y2) # draw rectangle between two points Line(x1, y1, x2, y2) # draw line between two points
FuseBoxes
# From Fusebox, uncertain what it does powerTap = Connect("PowerTap") name = GetName() powerTap.Tap(name) # From Terminal Connect("Plasa_FuseBox_Poor_FuseBox_1") Slurp()
Doors
Toggle(1111) # toggle lock/unlock door (from id) Lock(doorname) # unlock a door Unlock(doorname) # lock a door