Else Heart.Break()

Else Heart.Break()

Not enough ratings
PJ568's universal system | PJ568 的万能系统
By PJ568
PJ568's universal system can provide you with many functions on single computer. Remote client is supported.
PJ568 的通用系统可实现单机多功能拓展。支持远程客户端。
   
Award
Favorite
Favorited
Unfavorite
Server source code | 服务端源代码
# Initialize PlaySound("Coin 1") ClearText() DisplayGraphics() Print("PJ568's Server System") Print(Bar()) Print(H()) Print(Bar()) array arr = [] arr[-1] = 0 arr[0] = GetHour() + ":" + GetMinute() + " > " # array arr : last term things # number ans[-1] : switch function # string ans[0] : strings show when before input # var ans[1] to ans[infinite] : things to print, can be used the next term loop string cmd = Input(arr[0]) arr = Main(cmd, arr) if Count(arr) - 2 >= 1 loop i from 1 to Count(arr) - 2 Print(arr)
Sleep(0.1)
end
end
end


array Main(string cmd, array arr)
number id = -1
array ans = []

if arr[-1] == 0
if cmd == "cd"
ans[1] = "ROOT"
else if cmd == "h" or cmd == "help" or cmd == "?" or cmd == "H"
ans[1] = "Available commands:"
ans[2] = "-connect"
ans[3] = "-tp:teleport to list"
ans[4] = "-info:Show system info"
ans[5] = "-findP:Locate Someone"
ans[6] = "-slurp:Teleport to connected locations"
ans[7] = "-break:Unlock a door"
ans[8] = "-register:Register soda sales"
ans[9] = "-GetMoney"
ans[10] = "-store:Save Data"
ans[11] = "-restore"
ans[12] = "-remoteCall/rCall"
# ans[13] = "-boot:boot from disk"
else if cmd == "cls" or cmd == "clear"
ans[1] = "Can't do."
else if cmd == "connect"
return loopInput(1, "ConnectName: ", ans)
else if cmd == "break"
ans[1] = "Breaking the door just connect..."
if breakDoor(id)
ans[2] = "Unlocked!"
else
ans[2] = "Nope..."
end
else if cmd == "register"
return loopInput(2, "Sales: ", ans)
else if cmd == "GetMoney" or cmd == "getmoney"
return loopInput(3, "$ amount: ", ans)
else if cmd == "tp"
ans[1] = "@This is PJ568's teleport program."
ans[2] = Bar()
return loopInput(4, "TP to: ", ans)
else if cmd == "info"
Info()
else if cmd == "slurp"
ConnectAll()
Slurp()
else if cmd == "store"
if HasFunction("SaveMemory")
return loopInput(5, "Key: ", ans)
else
ans[1] = "SaveMemory() is not exist on this computer"
end
else if cmd == "restore"
if HasFunction("LoadMemory")
return loopInput(7, "Key: ", ans)
else
ans[1] = "LoadMemory() is not exist on this computer"
end
else if cmd == "remoteCall" or cmd == "remotecall" or cmd == "rCall"
return loopInput(8, "Function name: ", ans)
# else if cmd == "boot"
# if HasFloppy()
# BootFromFloppy()
# else
# Print("Floppy drive not found.")
# end
else if cmd == "FindP" or cmd == "findP"
ans[1] = "Who do you want to find?"
return loopInput(10, "name: ", ans)
else
ans[1] = "Can't understand command: " + cmd
ans[2] = H()
end
else if arr[-1] == 1
id = Connect(cmd)
ans[1] = "Connection id: " + id
else if arr[-1] == 2
var wellspringer = Connect("Wellspringer")
wellspringer.RegisterSeller("Sebastian", cmd)
ans[1] = "OK!"
else if arr[-1] == 3
var financeComputer = Connect("FinanceComputer")
financeComputer.ChangeBalance("Sebastian", cmd)
ans[1] = "OK!"
else if arr[-1] == 4
if cmd == "h" or cmd == "help" or cmd == "?" or cmd == "H"
ans[1] = "Available locations:"
ans[2] = "-Home"
ans[3] = "-Lodge:Where Pixie work"
ans[4] = "-Pixie:Pexie's home"
ans[5] = "-Plaza"
ans[6] = "-Police"
ans[7] = "-soda:Soda warehouse"
ans[8] = "-Factory:Goods Factory"
ans[8] = "-Internet"
ans[9] = "To quit: quit"
return continueMain(ans, arr)
else if cmd == "home" or cmd == "Home"
TP("DesolateHouseLobby_TriPodComputer_TriPodComputer_1")
return continueMain(ans, arr)
else if cmd == "Plaza" or cmd == "plaza"
TP("Plaza_CurcuitLocker_4")
return continueMain(ans, arr)
else if cmd == "Factory" or cmd == "factory"
TP("FactoryMachineA")
return continueMain(ans, arr)
else if cmd == "Pixie" or cmd == "pixie"
TP("PlazaBackstreet_MediumSewerComputer_MediumSewerComputer_2")
return continueMain(ans, arr)
else if cmd == "Soda" or cmd == "soda"
TP("SodaStorage_ComputerWithConsoleOutput_1")
return continueMain(ans, arr)
else if cmd == "Lodge" or cmd == "lodge"
TP("Lodge_Room1_FuseBox_Poor_FuseBox_1")
return continueMain(ans, arr)
else if cmd == "Police" or cmd == "police"
TP("PoliceOfficeInterior_ministryOfficeWorkstationComputer_1")
return continueMain(ans, arr)
else if cmd == "Internet" or cmd == "internet"
TP("Internet_Internet_PoleComputer_1")
return continueMain(ans, arr)
else if cmd == "q" or cmd == "quit" or cmd == "Quit" or cmd == "Q"
ans[1] = "exiting tp program..."
else
ans[1] = "Try to tp to " + cmd + "."
TP(cmd)
return continueMain(ans, arr)
end
else if arr[-1] == 5
ans[1] = cmd
return loopInput(6, "Data: ", ans)
else if arr[-1] == 6
SaveMemory(arr[1], cmd)
ans[1] = "Data was saved."
else if arr[-1] == 7
ans[1] = LoadMemory(cmd)
else if arr[-1] == 8
RemoteFunctionCall(id, cmd, [])
ans[1] = "OK?"
else if arr[-1] == 10
var MF = Connect("MainFrame")
ans[1] = MF.GetPosition(cmd)
end
return endMain(ans)
end


var ServerConnectClient(string cname)
var c = Connect(cname)
return c
end


bool breakDoor(var id)
bool is_unlocked = false
loop x from 0 to 99999
Print("Trying code: " + x)
var success = id.Unlock(x)
if success
is_unlocked = true
Print("Unlocked!")
Bar()
break
end
end
return is_unlocked
end


array loopInput(number level, string info, array ans)
ans[-1] = level
ans[0] = info
return ans
end


array endMain(array ans)
ans[-1] = 0
ans[0] = GetHour() + ":" + GetMinute() + " > "
return ans
end


array continueMain(array ans, array arr)
ans[-1] = arr[-1]
ans[0] = arr[0]
return ans
end


void TP(string location)
DisconnectAll()
Connect(location)
Slurp()
end


void ConnectAll()
Connect("DesolateHouseLobby_TriPodComputer_TriPodComputer_1")
Connect("Lodge_Room1_FuseBox_Poor_FuseBox_1")
Connect("Internet_Internet_PoleComputer_1")
Connect("PlazaBackstreet_MediumSewerComputer_MediumSewerComputer_2")
Connect("Plaza_CurcuitLocker_4")
Connect("Ministry_Elevator4_Door1")
Connect("Hotel_Exterior_CurcuitLocker_1")
Connect("HarborWestHouseRoom1_FuseBox_Poor_FuseBox_1")
Connect("CentralServer")
Connect("FactoryMachineA")
Connect("SodaStorage_ComputerWithConsoleOutput_1")
Connect("PoliceOfficeInterior_ministryOfficeWorkstationComputer_1")
Connect("HarborEast_StreetLight1")
end


string H()
return "? or h or help for help."
end


string Bar()
return "-----------------------"
end
Client source code | 客户端源代码
# Initialize PlaySound("Coin 1") var host = Connect("DesolateHouseLobby_TriPodComputer_TriPodComputer_1") host.ServerConnectClient(Name()) ClearText() DisplayGraphics() Print("PJ568's Client System") Print(Bar()) Print(H()) Print(Bar()) array arr = [] arr[-1] = 0 arr[0] = GetHour() + ":" + GetMinute() + " > " # number arr[-1] : switch function # string arr[0] : strings show when before input # var arr[1] to arr[infinite] : things to print, can be used the next term loop string cmd = Input(arr[0]) if cmd == "Info" or cmd == "info" Info() else arr = host.Main(cmd, arr) if Count(arr) - 2 >= 1 loop i from 1 to Count(arr) - 2 Print(arr)
Sleep(0.1)
end
end
end
end


string H()
return "? or h or help for help."
end


string Bar()
return "-----------------------"
end
How to use | 使用方法
Initialize | 初始化
1. Paste Server source code to computer named DesolateHouseLobby_TriPodComputer_TriPodComputer_1
(一)、将服务端源代码粘贴至 DesolateHouseLobby_TriPodComputer_TriPodComputer_1 计算机。

Use this code to teleporte to target computer:
使用以下代码以传送至目标计算机:
Connect("DesolateHouseLobby_TriPodComputer_TriPodComputer_1") Slurp()

Done.
完毕。


How to set up Client | 客户端的初始化方法
1. Make sure the computer supports Connect() Function and has a screen.
(一)、确保您使用的计算机支持网络连接功能且拥有屏幕。

Use this code to check:
使用以下代码以检查:
Info()

2. Paste Client source code to the computer.
(二)、将客户端源码粘贴至计算机。

Done.
完毕。


How to Use | 使用方法
1. h is always for help.
(一)、任何时候键入 h 以获取帮助信息。

13:24 > h Available commands: -connect -tp:teleport to list -info:Show system info -findP:Locate Someone -slurp:Teleport to connected locations -break:Unlock a door -register:Register soda sales -GetMoney -store:Save Data -restore -remoteCall/rCall

Have a good time.
感谢您的阅读。
1 Comments
Fruity Trump Dec 17, 2023 @ 8:23am