Else Heart.Break() Sprak: Difference between revisions

From wikinotes
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Syntax =
= Notes =
<blockquote>
<blockquote>
== Variables ==
{| class="wikitable"
<syntaxhighlight lang="C">
|-
var    list  = [false, true] # a list
| [[sprak syntax]]
var    myVar = 1.0          # Woks for numbers... what else?
|-
number myNum = 1234
| [[sprak world functions]]
string myStr = "test"
|-
bool  myBol = false
| [[sprak entertainment functions]]
Random()                    # Random number
|-
 
| [[sprak connection functions]]
array letters      = "abcdefg"      # define an array
|-
number letterCount = Count(letters)  # number of items in array
|}
</syntaxhighlight>
</blockquote><!-- Notes -->
 
== Types ==
<blockquote>
you can determine Item types with the <code>GetType()</code> command.
 
<syntaxhighlight lang="C">
floppy # Floppy Diskette
key    # Keys
</syntaxhighlight>
</blockquote><!-- Types -->
 
== Loops ==
<blockquote>
<syntaxhighlight lang="C">
# Iterate over variable
loop x from 1 to 8
    Print( x )
end
 
# Loop indefinitely (accepting commands)
loop
    var cmd = Input(") ")
end
</syntaxhighlight>
</blockquote><!-- Loops -->
 
== Conditionals ==
<blockquote>
<syntaxhighlight lang="C">
if varA == varB                  # Unconfirmed
    Print("Success")
else if varA == varC
    Print("Alternative Success")
End()
</syntaxhighlight>
</blockquote><!-- Conditionals -->
 
== Functions ==
<blockquote>
<syntaxhighlight lang="C">
# Define Function
string MyFunction( string var )
    return var
End()
 
void MyFunction( string var )
    Print("no return value")
End()
</syntaxhighlight>
 
<syntaxhighlight lang="C">
# Test if function exists on platform
if HasFunction("Print")
    Print("Success")
End()
</syntaxhighlight>
</blockquote><!-- Functions -->
</blockquote><!-- Syntax -->
 
= World =
<blockquote>
== Functions ==
<blockquote>
<syntaxhighlight lang="C">
loop()
Sleep(1)              # Sleep time in seconds
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...)
Print(Name())        # Print ComputerName
Info()                # Print Computer Specs
 
var cs = GetConnections()  # List of all connections made to computer
 
Say("something")          # Print, but out loud
CreateDrink("Coke", 100)  # Creaate any arbitrary drink (haven't had success other thank coke...)
Ping( connection )        # Test if connection exists
 
bank = Connect("Finance Computer")    # Connect allows you to interact with outside systems
bank.ChangeBalance("Sebastian", +100)  # (each has their own set of commands)
 
ClearText()                    # Clear the screen
ClearCode()                    # (?)
AppendCode()                    # (?)
Drink(25)                      # (?) sinks have this...
MoveToRoom("MonadsApartment")  # Move item to room (used in trashcan)
Delete()                        # Delete an item    (used in trashcan)
</syntaxhighlight>
</blockquote><!-- Functions -->
 
== Attributes ==
<blockquote>
Attributes can be modified on consumable items (beverages, ciggarettes, ...).
<syntaxhighlight lang="C">
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
</syntaxhighlight>
</blockquote><!-- Attributes -->
 
== Terminals ==
<blockquote>
<syntaxhighlight lang="C">
Info()                # Get Info about the running system (Speed, modem, floppy drive, memory, screen x/y )
 
# Graphics
DisplayGraphics()    # (?) used on some computers
ClearText()          # Clear the screen
Print("abc")          # Print to screen
 
# Floppies
BootFromFloppy()      # Run a Floppy Diskette
var = LoadData()      # Get info on Floppy Diskette
 
# Other
var cmd = Input(">")  # save user-input to variable
Connect("")          # Connect to a external system
</syntaxhighlight>
</blockquote><!-- Terminals -->
 
== FuseBoxes ==
<syntaxhighlight lang="C">
# From Fusebox
powerTap = Connect("PowerTap")
name    = GetName()
powerTap.Tap(name)
 
# From Terminal
Connect("Plasa_FuseBox_Poor_FuseBox_1")
Slurp()
</syntaxhighlight>
 
</blockquote><!-- World -->
 
= Entertainment =
<blockquote>
== Utility ==
Functions that seem to be able t be used for all categories of
entertainment.
<syntaxhighlight lang="C">
SetPitch(22)  # Determines the audio's pitch
</syntaxhighlight>
 
== Songs ==
Tracks can be played with <code>PlayLoop("Apache")</code>
<syntaxhighlight lang="C">
Apache
BlacKnuten  # Relaxing!
Ponty      # Relaxing and Nice!
</syntaxhighlight>
 
== Radio ==
<syntaxhighlight lang="C">
# There seem to be at least radio channels from 1-4
DisconnectAll()                    # Disconnect from all radio stations
Connect("RadioStation_Channel"+ 3)  # Connect to RadioStationChannel 3
TurnOnSound()                      # Listen to Radio
SetChannel(3)                      # Remember the Radio Channel
</syntaxhighlight>
 
== TV ==
<syntaxhighlight lang="C">
Anime
Bergman
Talkshow
News
Terminator
TestScreen
</syntaxhighlight>
 
== Sounds ==
Sounds are frequently used with the <code>loop</code>
command.
<syntaxhighlight lang="C">
ThereminSound
</syntaxhighlight>
</blockquote><!-- Entertainment -->


= Passwords =
= Passwords =
Line 209: Line 25:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Passwords -->
</blockquote><!-- Passwords -->
= Connections =
<blockquote>
== Misc Connections ==
<syntaxhighlight lang="C">
Hotel:
    Hotel_Office_MediumComputer1_1
    SteeringComputer                # has disk drive
HarborWest:
    HarborWest_LargeComputerL2_LargeComputerL2_1 # can update money
Burrows:
    Frank_Room_MediumComputer1_1                                  # Shoe Store
    Lodge_FirstCorridor_MediumSewercomputer_MediumSewerComputer_3  # Shoe Store (disk)
Yvonne:
    Yvonne_ArcadeMachine2
Chez Dot:
    ArcadeMachine_ArcadeMachine
TownHall_DoorToLongsonOffice
</syntaxhighlight>
<syntaxhighlight lang="C">
SeaShacks:
    Seaschack2_RecorderComputerWithMonitor_1
    Seaschack2_RecorderComputerWithMonitor_2
    Seaschack2_RecorderComputerWithMonitor_3
    Seashack2_NewComputerScreen_NewComputerScreen_1
    Seashack2_TriPodComputer_TriPodComputer1
PoliceStation
    PoliceOfficeInterior_TriPodComputer_TriPodComputer_1
Sewer
    MediumSewerComputer_MediumSewerComputer
Hotel
    Hotel_ServerBasement_LargeComputerL3_LargeComputerL3
Factory
    LapTop_LapTop
    Factory_Floor2_TriPodComputer_TriPodComputer_1
    Factory_Floor2_ModernComputer_1
    Factory_Floor2_FlatScreen_FlatComputerScreen_4      # 1-6
  Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1
    MachineB1
    MachineB2
    SendPipe1                                            # 1-4
Misc
    LargeComputerL3_LargeComputerL3
    Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1
</syntaxhighlight>
== FinanceComputer ==
The town's bank
<syntaxhighlight lang="C">
fin = Connect("Finance Computer")
fin.ChangeBalance("Sebastian", +100)  # Change User's Balance
</syntaxhighlight>
== Wellspring ==
Wellspring's inventory, and balance.
<syntaxhighlight lang="C">
wells = Connect("Wellspringer")
wells.RegisterSeller( name, amount ) # Register Sale for a User
</syntaxhighlight>
== Factory ==
=== goods ===
<syntaxhighlight lang="C">
string db = Connect("GoodsDatabase")
db.Register(goodsType, quality)
var id = Connect("SendPipe2")
Send(id)
var machine = Connect("MachineB2")
string result = machine.Convert()
Print("Result: "+ result )
</syntaxhighlight>
=== security ===
<syntaxhighlight lang="C">
ZapPerson(name)
light.StartBlinking()
</syntaxhighlight>
</blockquote><!-- Connections -->

Latest revision as of 03:01, 9 January 2023

Notes

sprak syntax
sprak world functions
sprak entertainment functions
sprak connection functions

Passwords

# Generally speaking, the command to unlock doors is:
Unlock( location )

# PowerPlant Entrance:
# Factory_Corridor_DoorToServerRoom
zgh4522zcbw45