-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeleputer's_TTS_E2.txt
150 lines (150 loc) · 5.32 KB
/
Teleputer's_TTS_E2.txt
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
@name TTS
@persist Target:entity Amount Text:string
if(first()){
runOnHTTP(1)
runOnChat(1)
holoCreate(1)
holoModel(1,"models/alyx.mdl")
holoEntity(1):animate(3,1)
holoAlpha(1,0)
streamDisable3D(1)
function void say(Stuff:string){
local Lang="en-us"
if(httpCanRequest()){
httpRequest("http://cc.suka.lol/"+"http://translate.google.com/translate_tts?ie=utf8&q="+httpUrlEncode(Stuff)+"&tl="+Lang+"&client=tw-ob")
} else{
timer("Wait",500)
}
}
function entity searchForPlayer(Person:string){
local P= findPlayerByName(Person)
if (!(P:isPlayer())){
P=findPlayerBySteamID(Person)
if (!(P:isPlayer())){
P=findPlayerBySteamID64(Person)
if (!(P:isPlayer())){
print("Invalid Player")
}
}
}
return P
}
}elseif(chatClk(owner())){
local LS=lastSaid():explode(" ")
Target=noentity()
Amount=0
Text=""
switch(LS[1,string]){
case "say",
Text=lastSaid():explode("say ")[2,string]
break
case "bal",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Query Matched. Player "+P:name() +" has a total of $" + P:money() + "."
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "ping",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Query Matched. Player "+P:name() +" has a ping of " + P:ping() + " miliseconds."
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "info",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Query Matched. Player "+P:name() +" has a steam id of " + P:steamID() + ". Posting ID in Chat"
print(P:name()+"<br>"+P:steamID()+"<br>"+P:steamID64())
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "friends",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Query Matched. Player "+P:name() +" has a total of " + P:steamFriends():count() + " steam friends on the server right now."
Target=owner()
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "status",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Query Matched. Player "+P:name() +" currently has " +P:health()+" Health and "+P:armor()+" Armor."
Target=owner()
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "give",
local P=searchForPlayer(LS[2,string])
Amount=LS[3,string]:toNumber()
if(P:isPlayer()){
Text="Query Matched. Giving Player "+P:name()+" $"+Amount+"."
moneyGive(P,Amount)
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "/pm",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Text="Player "+P:name()+" has one, new, message from "+owner():name()+" "
Text+=lastSaid():explode(LS[2,string])[2,string]
Target=P
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "/request",
local P=searchForPlayer(LS[2,string])
if(P:isPlayer()){
Amount = LS[3,string]:toNumber()
Text="Hello Player "+P:name()+" "+owner():name() +" would like to request $"+Amount+" from you with this message attached: "
Text+=lastSaid():explode(LS[3,string])[2,string]
Target=P
timer("RequestMoney",7500)
} else {
Text=("Sorry, I couldn't find anyone who fits that description.")
}
break
case "credit",
Text="Hello. I am a Text To Speech E2 made by Pie The Nice Guy. The HTTP website was discovered by im chris. It was broken when he sent it to Pie so Teleputer gave him a working one."
Target=owner()
break
default,
break
}
if(Text!=""){
timer("Wait",0)
print("Message Sending")
}
}elseif(httpClk()){
if(!(Target==noentity())){
holoPos(1,Target:toWorld(vec(50,0,0)))
holoAng(1,Target:angles()+ang(0,180,0))
holoAlpha(1,255)
holoEntity(1):streamStart(random(100,1000),httpData())
}else{
owner():streamStart(random(100,1000),httpData(),1)
}
print("Message Received")
timer("TurnOff",10000)
}elseif(clk("TurnOff")){
holoAlpha(1,0)
}elseif(clk("RequestMoney")){
moneyRequest(Target,Amount)
}elseif(clk("Wait")){
if(httpCanRequest()){
if(Text!=""){
say(Text)
}
}else{
timer("Wait",100)
}
}