Else Heart.Break() Sprak: Difference between revisions

From wikinotes
 
No edit summary
Line 1: Line 1:
= Language Core =
= Syntax =
<blockquote>
<blockquote>
== Variables ==
== Variables ==
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
var    list  = [false, true] ## a list
var    list  = [false, true] # a list
var    myVar = 1.0 ## Woks for numbers... what else?
var    myVar = 1.0           # Woks for numbers... what else?
number myNum = 1234
number myNum = 1234
string myStr = "test"
string myStr = "test"
bool  myBol = false
bool  myBol = false
Random() ## Random number
Random()                     # Random number


array letters      = "abcdefg" ## define an array
array letters      = "abcdefg"       # define an array
number letterCount = Count(letters) ## number of items in array
number letterCount = Count(letters) # number of items in array
</syntaxhighlight>
</syntaxhighlight>
== 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 ==
== Loops ==
<blockquote>
<blockquote>
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
## Iterate over variable
# Iterate over variable
loop x from 1 to 8
loop x from 1 to 8
Print( x )
    Print( x )
end
end


 
# Loop indefinitely (accepting commands)
## Loop indefinitely (accepting commands)
loop
loop
var cmd = Input(") ")
    var cmd = Input(") ")
end
end
</syntaxhighlight>
</syntaxhighlight>
Line 33: Line 42:
<blockquote>
<blockquote>
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
if varA == varB ## Unconfirmed
if varA == varB                 # Unconfirmed
Print("Success")
    Print("Success")
else if varA == varC
else if varA == varC
Print("Alternative Success")
    Print("Alternative Success")
End()
End()
</syntaxhighlight>
</syntaxhighlight>
Line 44: Line 53:
<blockquote>
<blockquote>
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
## Define Function
# Define Function
string MyFunction( string var )
string MyFunction( string var )
return var
    return var
End()
End()


void MyFunction( string var )
void MyFunction( string var )
Print("no return value")
    Print("no return value")
End()
End()
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
## Test if function exists on platform
# Test if function exists on platform
if HasFunction("Print")
if HasFunction("Print")
Print("Success")
    Print("Success")
End()
End()
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Language Core -->
</blockquote><!-- Functions -->
</blockquote><!-- Syntax -->


 
= World =
== Utility Functions ==
<blockquote>
== Functions ==
<blockquote>
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
loop()
loop()
Sleep(1) ## Sleep time in seconds
Sleep(1)             # Sleep time in seconds
GetUser() ## Identifies you as "Sebastian"
GetUser()             # Identifies you as "Sebastian"
GetRoom() ## Identifies room being accessed from
GetRoom()             # Identifies room being accessed from
GetHour() ## Gets hour, most TVs use this
GetHour()             # Gets hour, most TVs use this
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...)
Print( Name() ) ## Print ComputerName
Print(Name())         # Print ComputerName
Info() ## Print Computer Specs
Info()               # Print Computer Specs


var cs = GetConnections() ## List of all connections made to computer
var cs = GetConnections() # List of all connections made to computer


Say("something") ## Print, but out loud
Say("something")           # Print, but out loud
CreateDrink("Coke", 100) ## Creaate any arbitrary drink (haven't had success other thank coke...)
CreateDrink("Coke", 100)   # Creaate any arbitrary drink (haven't had success other thank coke...)
Ping( connection ) ## Test if connection exists
Ping( connection )         # Test if connection exists


bank = Connect("Finance Computer") ## Connect allows you to interact with outside systems
bank = Connect("Finance Computer")     # Connect allows you to interact with outside systems
bank.ChangeBalance("Sebastian", +100) # (each has their own set of commands)
bank.ChangeBalance("Sebastian", +100) # (each has their own set of commands)


ClearText() ## Clear the screen
ClearText()                     # Clear the screen
ClearCode() ## (?)
ClearCode()                     # (?)
AppendCode() ## (?)
AppendCode()                   # (?)
Drink(25) ## (?) sinks have this...
Drink(25)                       # (?) sinks have this...
MoveToRoom("MonadsApartment") ## Move item to room (used in trashcan)
MoveToRoom("MonadsApartment")   # Move item to room (used in trashcan)
Delete() ## Delete an item    (used in trashcan)
Delete()                       # Delete an item    (used in trashcan)
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Functions -->


== Attributes ==
== Attributes ==
<blockquote>
Attributes can be modified on consumable items (beverages, ciggarettes, ...).
Attributes can be modified on consumable items (beverages, ciggarettes, ...).
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
Drunkeness( 50 ) ## Standard Beer
Drunkeness( 50) # Standard Beer
Sleepiness( -25 ) ## Standard Coffee
Sleepiness(-25) # Standard Coffee
Smelliness( 10 ) ## Standard Drink
Smelliness( 10) # Standard Drink
Corruption( -25 ) ## Default Coke
Corruption(-25) # Default Coke
 
QuickBoost() ## (?) Snus
FastForward() ## (?) Drug
Slurp() ## Move yourself to active connection


QuickBoost()    # (?) Snus
FastForward()    # (?) Drug
Slurp()          # Move yourself to active connection
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Attributes -->


= Types =
== Terminals ==
<blockquote>
<blockquote>
you can determine Item types with the <code>GetType()</code> command.
<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">
<syntaxhighlight lang="C">
floppy ## Floppy Diskette
# From Fusebox
key ## Keys
powerTap = Connect("PowerTap")
name    = GetName()
powerTap.Tap(name)


# From Terminal
Connect("Plasa_FuseBox_Poor_FuseBox_1")
Slurp()
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Types -->


</blockquote><!-- World -->


= Entertainment =
= Entertainment =
Line 124: Line 160:
entertainment.
entertainment.
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
SetPitch(22) ## Determines the audio's pitch
SetPitch(22) # Determines the audio's pitch
</syntaxhighlight>
</syntaxhighlight>


Line 131: Line 167:
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
Apache
Apache
BlacKnuten ## Relaxing!
BlacKnuten # Relaxing!
Ponty ## Relaxing and Nice!
Ponty       # Relaxing and Nice!
</syntaxhighlight>
</syntaxhighlight>


== Radio ==
== Radio ==
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
## There seem to be at least radio channels from 1-4
# There seem to be at least radio channels from 1-4
DisconnectAll() ## Disconnect from all radio stations
DisconnectAll()                     # Disconnect from all radio stations
Connect("RadioStation_Channel"+ 3) ## Connect to RadioStationChannel 3
Connect("RadioStation_Channel"+ 3) # Connect to RadioStationChannel 3
TurnOnSound() ## Listen to Radio
TurnOnSound()                       # Listen to Radio
SetChannel(3) ## Remember the Radio Channel
SetChannel(3)                       # Remember the Radio Channel
</syntaxhighlight>
</syntaxhighlight>


Line 161: Line 197:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Entertainment -->
</blockquote><!-- Entertainment -->


= Passwords =
= Passwords =
<blockquote>
<blockquote>
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
## Generally speaking, the command to unlock doors is:
# Generally speaking, the command to unlock doors is:
Unlock( location )
Unlock( location )


## PowerPlant Entrance:
# PowerPlant Entrance:
## Factory_Corridor_DoorToServerRoom
# Factory_Corridor_DoorToServerRoom
zgh4522zcbw45
zgh4522zcbw45
##
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Passwords -->
</blockquote><!-- Passwords -->


Line 184: Line 215:
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
Hotel:
Hotel:
Hotel_Office_MediumComputer1_1
    Hotel_Office_MediumComputer1_1
SteeringComputer ## has disk drive
    SteeringComputer                 # has disk drive


HarborWest:
HarborWest:
HarborWest_LargeComputerL2_LargeComputerL2_1 ## can update money
    HarborWest_LargeComputerL2_LargeComputerL2_1 # can update money


Burrows:
Burrows:
Frank_Room_MediumComputer1_1 ## Shoe Store
    Frank_Room_MediumComputer1_1                                   # Shoe Store
Lodge_FirstCorridor_MediumSewercomputer_MediumSewerComputer_3 ## Shoe Store (disk)
    Lodge_FirstCorridor_MediumSewercomputer_MediumSewerComputer_3 # Shoe Store (disk)


Yvonne:
Yvonne:
Yvonne_ArcadeMachine2
    Yvonne_ArcadeMachine2


Chez Dot:
Chez Dot:
ArcadeMachine_ArcadeMachine
    ArcadeMachine_ArcadeMachine


TownHall_DoorToLongsonOffice
TownHall_DoorToLongsonOffice
Line 205: Line 236:
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
SeaShacks:
SeaShacks:
Seaschack2_RecorderComputerWithMonitor_1
    Seaschack2_RecorderComputerWithMonitor_1
Seaschack2_RecorderComputerWithMonitor_2
    Seaschack2_RecorderComputerWithMonitor_2
Seaschack2_RecorderComputerWithMonitor_3
    Seaschack2_RecorderComputerWithMonitor_3
Seashack2_NewComputerScreen_NewComputerScreen_1
    Seashack2_NewComputerScreen_NewComputerScreen_1
Seashack2_TriPodComputer_TriPodComputer1
    Seashack2_TriPodComputer_TriPodComputer1


PoliceStation
PoliceStation
PoliceOfficeInterior_TriPodComputer_TriPodComputer_1
    PoliceOfficeInterior_TriPodComputer_TriPodComputer_1


Sewer
Sewer
MediumSewerComputer_MediumSewerComputer
    MediumSewerComputer_MediumSewerComputer


Hotel
Hotel
Hotel_ServerBasement_LargeComputerL3_LargeComputerL3
    Hotel_ServerBasement_LargeComputerL3_LargeComputerL3


Factory
Factory
LapTop_LapTop
    LapTop_LapTop
Factory_Floor2_TriPodComputer_TriPodComputer_1
    Factory_Floor2_TriPodComputer_TriPodComputer_1
Factory_Floor2_ModernComputer_1
    Factory_Floor2_ModernComputer_1
Factory_Floor2_FlatScreen_FlatComputerScreen_4 ## 1-6
    Factory_Floor2_FlatScreen_FlatComputerScreen_4       # 1-6


   Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1
   Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1


MachineB1
    MachineB1
MachineB2
    MachineB2
SendPipe1   ## 1-4
    SendPipe1                                           # 1-4
 
 


Misc
Misc
LargeComputerL3_LargeComputerL3
    LargeComputerL3_LargeComputerL3
Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1
    Factory_ServerRoom_LargeComputerL3_LargeComputerL3_1
</syntaxhighlight>
</syntaxhighlight>


Line 243: Line 272:
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
fin = Connect("Finance Computer")
fin = Connect("Finance Computer")
fin.ChangeBalance( "Sebastian", +100 ) ## Change User's Balance
fin.ChangeBalance("Sebastian", +100) # Change User's Balance
</syntaxhighlight>
</syntaxhighlight>


Line 250: Line 279:


<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
wells = Connect("Wellspringer")  
wells = Connect("Wellspringer")
wells.RegisterSeller( name, amount ) ## Register Sale for a User
wells.RegisterSeller( name, amount ) # Register Sale for a User
</syntaxhighlight>
</syntaxhighlight>
</blockquote>


== Factory ==
== Factory ==
<blockquote>
=== goods ===
=== goods ===
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
string db = Connect("GoodsDatabase")
string db = Connect("GoodsDatabase")
db.Register( goodsType, quality )
db.Register(goodsType, quality)


var id = Connect("SendPipe2")
var id = Connect("SendPipe2")
Line 273: Line 299:
=== security ===
=== security ===
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
ZapPerson( name )
ZapPerson(name)
 
light.StartBlinking()
light.StartBlinking()
</syntaxhighlight>
</blockquote><!-- Factory -->
== FuseBoxes ==
<syntaxhighlight lang="C">
## From Fusebox
powerTap = Connect("PowerTap")
name    = GetName()
powerTap.Tap(name)
## From Terminal
Connect("Plasa_FuseBox_Poor_FuseBox_1")
Slurp()
</syntaxhighlight>
= Terminals =
<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>
</syntaxhighlight>
</blockquote><!-- Connections -->

Revision as of 14:44, 2 July 2022

Syntax

Variables

var    list  = [false, true] # a list
var    myVar = 1.0           # Woks for numbers... what else?
number myNum = 1234
string myStr = "test"
bool   myBol = false
Random()                     # Random number

array letters      = "abcdefg"       # define an array
number letterCount = Count(letters)  # number of items in array

Types

you can determine Item types with the GetType() command.

floppy # Floppy Diskette
key    # Keys

Loops

# Iterate over variable
loop x from 1 to 8
    Print( x )
end

# Loop indefinitely (accepting commands)
loop
    var cmd = Input(") ")
end

Conditionals

if varA == varB                  # Unconfirmed
    Print("Success")
else if varA == varC
    Print("Alternative Success")
End()

Functions

# Define Function
string MyFunction( string var )
    return var
End()

void MyFunction( string var )
    Print("no return value")
End()
# Test if function exists on platform
if HasFunction("Print")
    Print("Success")
End()

World

Functions

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)

Attributes

Attributes can be modified on consumable items (beverages, ciggarettes, ...).

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

Terminals

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

FuseBoxes

# From Fusebox
powerTap = Connect("PowerTap")
name     = GetName()
powerTap.Tap(name)

# From Terminal
Connect("Plasa_FuseBox_Poor_FuseBox_1")
Slurp()

Entertainment

Utility

Functions that seem to be able t be used for all categories of entertainment.

SetPitch(22)  # Determines the audio's pitch

Songs

Tracks can be played with PlayLoop("Apache")

Apache
BlacKnuten  # Relaxing!
Ponty       # Relaxing and Nice!

Radio

# 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

TV

Anime
Bergman
Talkshow
News
Terminator
TestScreen

Sounds

Sounds are frequently used with the loop command.

ThereminSound

Passwords

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

# PowerPlant Entrance:
# Factory_Corridor_DoorToServerRoom
zgh4522zcbw45

Connections

Misc Connections

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

FinanceComputer

The town's bank

fin = Connect("Finance Computer")
fin.ChangeBalance("Sebastian", +100)  # Change User's Balance

Wellspring

Wellspring's inventory, and balance.

wells = Connect("Wellspringer")
wells.RegisterSeller( name, amount ) # Register Sale for a User

Factory

goods

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 )

security

ZapPerson(name)
light.StartBlinking()