-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLongsonPlaystation
More file actions
68 lines (64 loc) · 1.69 KB
/
LongsonPlaystation
File metadata and controls
68 lines (64 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
void MainMenu()
ClearText()
Print("Welcome to HackMud")
Print("-----------------------")
Sleep(1)
Print("1. check for function")
Print("2. Sell Soda")
Print("3. todo")
Print("4. Exit")
PlaySound("Powerup 4")
string command = Input("> ")
if command == "1"
PlaySound("Blip 3")
CheckObject()
else if command == "2"
PlaySound("Blip 3")
SellSoda()
else if command == "3"
PlaySound("Blip 3")
else if command == "4"
PlaySound("Shoot 4")
ClearText()
break
else
Print("erreur de saisie: " + command)
Input("Press any key.")
end
MainMenu()
end
# FUNCTIONS
void SellSoda()
ClearText()
Print("Sell a Soda(tm)")
Print("-------------------")
Print("")
Print("How many Soda's you want to sell?")
number numberOfSodas = Input("")
string name = GetUser()
#connect to Wellspringer server
var wellspring = Connect("Wellspringer")
wellspring.RegisterSeller(name, numberOfSodas)
Print("")
Print("The amount of " + numberOfSodas + " Soda's has been registered.")
Input("Please press a key.")
end
void CheckObject()
#clear screen again
ClearText()
Print("Please type in the name of the object.")
#save users input in var oName
var oName = Input("")
ClearText()
Print("Which function you search for?")
var oFunc = Input("")
#connect to the object
var cName = Connect(oName)
#check if object has the function, the user searches for
if(cName.HasFunction(oFunc))
Print("The object has the function " + oFunc)
else
Print("The object doesn't have a function called " + oFunc)
end
end
MainMenu()