-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathLanguage.bb
More file actions
343 lines (323 loc) · 11.4 KB
/
Language.bb
File metadata and controls
343 lines (323 loc) · 11.4 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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
; Language string IDs
Const MaxLanguageString = 226
Const LS_ConnectingToServer = 0
Const LS_FileProgress = 1
Const LS_UpdateFile = 2
Const LS_UpdateProgress = 3
Const LS_InvalidHost = 4
Const LS_NoResponse = 5
Const LS_TooManyPlayers = 6
Const LS_LostConnection = 7
Const LS_ReceivingFiles = 8
Const LS_CheckingFiles = 9
Const LS_CouldNotDownload = 10
Const LS_Username = 11
Const LS_Password = 12
Const LS_EmailAddr = 13
Const LS_Connected = 14
Const LS_Error = 15
Const LS_InvalidUsername = 16
Const LS_InvalidPassword = 17
Const LS_WaitingForReply = 18
Const LS_DownloadingChars = 19
Const LS_InvalidCharName = 20
Const LS_AttributePoints = 21
Const LS_GraphicsOptions = 22
Const LS_SelectResolution = 23
Const LS_EnableAA = 24
Const LS_ColourDepth = 25
Const LS_SelectColourDepth = 26
Const LS_BestAvailable = 27
Const LS_OtherOptions = 28
Const LS_SndVolume = 29
Const LS_SkipMusic = 30
Const LS_ControlOptions = 31
Const LS_CForward = 32
Const LS_CStop = 33
Const LS_CTurnRight = 34
Const LS_CTurnLeft = 35
Const LS_CFlyUp = 36
Const LS_CFlyDown = 37
Const LS_CRun = 38
Const LS_CJump = 39
Const LS_CViewMode = 40
Const LS_CZoomIn = 41
Const LS_CZoomOut = 42
Const LS_CCamRight = 43
Const LS_CCamLeft = 44
Const LS_CPressKey = 45
Const LS_Unknown = 46
Const LS_AlreadyInGame = 47
Const LS_Weapon = 48
Const LS_Armour = 49
Const LS_Ring = 50
Const LS_Amulet = 51
Const LS_Potion = 52
Const LS_Ingredient = 53
Const LS_Image = 54
Const LS_Miscellaneous = 55
Const LS_OneHanded = 56
Const LS_TwoHanded = 57
Const LS_Ranged = 58
Const LS_Money = 59
Const LS_Cost = 60
Const LS_XPReceived = 61
Const LS_QuestLogUpdate = 62
Const LS_YouKilled = 63
Const LS_PickedUpItem = 64
Const LS_PlayerLeftZone = 65
Const LS_PlayerEnteredZone = 66
Const LS_EnteredZone = 67
Const LS_XHasJoinedParty = 68
Const LS_YouHaveJoinedParty = 69
Const LS_CouldNotJoinParty = 70
Const LS_PartyInvite = 71
Const LS_PartyInviteInstruction = 72
Const LS_CouldNotInviteParty = 73
Const LS_TradeInvite = 74
Const LS_TradeInviteInstruction = 75
Const LS_XIsOffline = 76
Const LS_PlayerNotFound = 77
Const LS_PlayersInGame = 78
Const LS_PlayersInZone = 79
Const LS_Season = 80
Const LS_AbilityNotRecharged = 81
Const LS_YouHit = 82
Const LS_For = 83
Const LS_DamageWow = 84
Const LS_HitsYou = 85
Const LS_AttacksYouMisses = 86
Const LS_YouAttack = 87
Const LS_AndMiss = 88
Const LS_NoInventorySpace = 89
Const LS_MemoriseAbility = 90
Const LS_MemorisingAbility = 91
Const LS_MaximumMemorised = 92
Const LS_AlreadyMemorised = 93
Const LS_Reputation = 94
Const LS_Level = 95
Const LS_Experience = 96
Const LS_ToUse = 97
Const LS_Type = 98
Const LS_Damage = 99
Const LS_Indestructible = 100
Const LS_Value = 101
Const LS_Mass = 102
Const LS_CanBeStacked = 103
Const LS_CannotBeStacked = 104
Const LS_DamageType = 105
Const LS_WeaponType = 106
Const LS_ArmourLevel = 107
Const LS_EffectsLast = 108
Const LS_Seconds = 109
Const LS_RaceOnly = 110
Const LS_ClassOnly = 111
Const LS_NoDescription = 112
Const LS_MemorisedYouMust = 113
Const LS_MoveItToActionBar = 114
Const LS_Trading = 115
Const LS_TradingNoSpace = 116
Const LS_TradingNoMoney = 117
Const LS_EscapeAgainToQuit = 118
Const LS_MemorisedAbilities = 119
Const LS_Page = 120
Const LS_QuitProgress = 121
Const LS_Map = 122
Const LS_ChooseAmount = 123
Const LS_ChooseAmountDetail = 124
Const LS_Party = 125
Const LS_LeaveParty = 126
Const LS_Abilities = 127
Const LS_Unmemorise = 128
Const LS_UnmemoriseDetail = 129
Const LS_Yes = 130
Const LS_No = 131
Const LS_Quests = 132
Const LS_ShowCompleted = 133
Const LS_Up = 134
Const LS_Down = 135
Const LS_Character = 136
Const LS_Attributes = 137
Const LS_Inventory = 138
Const LS_Drop = 139
Const LS_Use = 140
Const LS_IncreaseCost = 141
Const LS_DecreaseCost = 142
Const LS_Accept = 143
Const LS_Cancel = 144
Const LS_NoQuestsAvailable = 145
Const LS_Completed = 146
Const LS_CharacterTitle = 147
Const LS_AttributesTitle = 148
Const LS_Race = 149
Const LS_Gender = 150
Const LS_Class = 151
Const LS_Hair = 152
Const LS_Face = 153
Const LS_Beard = 154
Const LS_Clothes = 155
Const LS_CharacterName = 156
Const LS_UnusedPoints = 157
Const LS_Warning = 158
Const LS_Decline = 159
Const LS_InvertAxis1 = 160
Const LS_InvertAxis3 = 161
Const LS_CAttackTarget = 162
Const LS_CannotCreateChar = 163
Const LS_ReallyDeleteChar = 164
Const LS_CAlwaysRun = 165
Const LS_CCycleTarget = 166
Const LS_EnableGrass = 167
Const LS_YouAreBanned = 168
Const LS_AccountDoesNotExist = 169
Const LS_InvalidEmailAddress = 170
Const LS_UsernameAlreadyExists = 171
Const LS_Success = 172
Const LS_NewAccountCreated = 173
Const LS_CriticalDamage = 174
Const LS_WeaponDamaged = 175
Const LS_Ignoring = 176
Const LS_UnIgnoring = 177
Const LS_CMoveTo = 178
Const LS_CTalkTo = 179
Const LS_Faction = 180
Const LS_Interact = 181
Const LS_RetrievingList = 182
Const LS_Connect = 183
Const LS_AvailableServers = 184
Const LS_CSelect = 185
Const LS_AnisotropyLevel = 186
Const LS_Disabled = 187
Const LS_NewCharacter = 188
Const LS_Help = 189
; Slash Commands
Const LS_SCKick = 190
Const LS_SCUnIgnore = 191
Const LS_SCIgnore = 192
Const LS_SCNetDump = 193
Const LS_SCPet = 194
Const LS_SCLeave = 195
Const LS_SCOk = 196
Const LS_SCInvite = 197
Const LS_SCXP = 198
Const LS_SCGold = 199
Const LS_SCSetAttribute = 200
Const LS_SCSetAttributeMax = 201
Const LS_SCScript = 202
Const LS_SCMe = 203
Const LS_SCYell = 204
Const LS_SCGMSay = 205
Const LS_SCGuildSay = 206
Const LS_SCPartySay = 207
Const LS_SCPMSay = 208
Const LS_SCTrade = 209
Const LS_SCAllPlayers = 210
Const LS_SCPlayers = 211
Const LS_SCWarp = 212
Const LS_SCWarpOther = 213
Const LS_SCAbility = 214
Const LS_SCGive = 215
Const LS_SCWeather = 216
Const LS_SCTime = 217
Const LS_SCDate = 218
Const LS_SCSeason = 219
; New Additions
Const LS_QuitToContinue = 220
Const LS_QuitToMainMenu = 221
Const LS_QuitToWindows = 222
Const LS_QuitRequestTitle = 223
Const LS_QuitRequestText = 224
Const LS_WaitRelog = 225
Const LS_AccountAlreadyConnected = 226
; Array to store all strings
Dim LanguageString$(MaxLanguageString)
; Set defaults
LanguageString$(190) = "KICK"
LanguageString$(191) = "UNIGNORE"
LanguageString$(192) = "IGNORE"
LanguageString$(193) = "NETDUMP"
LanguageString$(194) = "PET"
LanguageString$(195) = "LEAVE"
LanguageString$(196) = "ACCEPT"
LanguageString$(197) = "INVITE"
LanguageString$(198) = "XP"
LanguageString$(199) = "GOLD"
LanguageString$(200) = "SETATTRIBUTE"
LanguageString$(201) = "SETATTRIBUTEMAX"
LanguageString$(202) = "SCRIPT"
LanguageString$(203) = "ME"
LanguageString$(204) = "YELL"
LanguageString$(205) = "GM"
LanguageString$(206) = "G"
LanguageString$(207) = "P"
LanguageString$(208) = "PM"
LanguageString$(209) = "TRADE"
LanguageString$(210) = "ALLPLAYERS"
LanguageString$(211) = "PLAYERS"
LanguageString$(212) = "WARP"
LanguageString$(213) = "WARPOTHER"
LanguageString$(214) = "ABILITY"
LanguageString$(215) = "GIVE"
LanguageString$(216) = "WEATHER"
LanguageString$(217) = "TIME"
LanguageString$(218) = "DATE"
LanguageString$(219) = "SEASON"
LanguageString$(220) = "Back to Game"
LanguageString$(221) = "Back to Mainmenu"
LanguageString$(222) = "Quit Game"
LanguageString$(223) = "Quit Game"
LanguageString$(224) = "Do you want to leave immediately or wait for 10 seconds?"
LanguageString$(225) = "After logout you must wait for 30 seconds to login again"
LanguageString$(226) = "This account is already connected"
; Loads all language strings from file
Function LoadLanguage(Filename$)
F = ReadFile(Filename$)
If F = 0 Then Return False
ID = 0
While Eof(F) = False
LString$ = Trim$(ReadLine$(F))
If Len(LString$) > 0
Pos = Instr(LString$, ";")
; Ignore lines which are comments only
If Pos <> 1
; Strip comments from the end of lines
If Pos > 1
LString$ = Left$(LString$, Pos - 1)
EndIf
; Add line
If ID > MaxLanguageString Then RuntimeError("Too many string constants in Language.txt!")
; Slash-command names live in the LS_SCKick..LS_SCSeason range
; (190..219); they're matched case-insensitively by
; ServerNet.bb's chat dispatch via `LanguageString$(LS_SC*)`,
; and the values shipped in `Data\Game Data\Language.txt`
; need to land UPPERCASE so the match succeeds against
; the engine's uppercased input. Pre-fix this guard
; referenced `LS_SKick` / `LS_SSeason` (missing the "C"),
; both undeclared identifiers that read as 0 in this
; non-Strict file. The range collapsed to `[0..0]` and
; every slash-command name kept whatever case Language.txt
; shipped with -- defaults (lines 241-270 below) happen to
; be UPPERCASE so the production server escapes the bug,
; but any locale shipping a customized Language.txt with
; lowercase entries silently breaks `/<command>` dispatch.
If ID >= LS_SCKick And ID <= LS_SCSeason Then LString$ = Upper(LString$)
LanguageString$(ID) = LString$
ID = ID + 1
EndIf
EndIf
Wend
CloseFile(F)
Return True
End Function
; Restore default language strings from file into LanguageRestore.txt
Function RestoreLanguage(Filename$)
; Load the present language file to restore the whole system
LoadLanguage("Data\Game Data\Language.txt")
Local F% = WriteFile(Filename$)
If F = 0 Then Return False
For i = 0 To MaxLanguageString
WriteLine( F, LanguageString$(i) )
Next
CloseFile(F)
Return True
End Function