Sprak connection functions: Difference between revisions

From wikinotes
(Created page with "This section is for interacting with specific computers. = 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 = <blockquote> == Goods == <bloc...")
 
No edit summary
Line 2: Line 2:


= FinanceComputer =
= FinanceComputer =
<blockquote>
The town's bank
The town's bank
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
Line 7: Line 8:
fin.ChangeBalance("Sebastian", +100)  # Change User's Balance
fin.ChangeBalance("Sebastian", +100)  # Change User's Balance
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- FinanceComputer -->


= Wellspring =
= Wellspring =
<blockquote>
Wellspring's inventory, and balance.
Wellspring's inventory, and balance.


Line 15: Line 18:
wells.RegisterSeller( name, amount ) # Register Sale for a User
wells.RegisterSeller( name, amount ) # Register Sale for a User
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Wellspring -->


= Factory =
= Factory =

Revision as of 03:00, 9 January 2023

This section is for interacting with specific computers.

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)        # possibly what happened to suit when hacking fusebox?
light.StartBlinking()