1-- @docconsts @{
2
3FloorHigher = 0
4FloorLower = 15
5
6SkullNone = 0
7SkullYellow = 1
8SkullGreen = 2
9SkullWhite = 3
10SkullRed = 4
11SkullBlack = 5
12SkullOrange = 6
13
14ShieldNone = 0
15ShieldWhiteYellow = 1
16ShieldWhiteBlue = 2
17ShieldBlue = 3
18ShieldYellow = 4
19ShieldBlueSharedExp = 5
20ShieldYellowSharedExp = 6
21ShieldBlueNoSharedExpBlink = 7
22ShieldYellowNoSharedExpBlink = 8
23ShieldBlueNoSharedExp = 9
24ShieldYellowNoSharedExp = 10
25ShieldGray = 11
26
27EmblemNone = 0
28EmblemGreen = 1
29EmblemRed = 2
30EmblemBlue = 3
31EmblemMember = 4
32EmblemOther = 5
33
34VipIconFirst = 0
35VipIconLast = 10
36
37Directions = {
38 North = 0,
39 East = 1,
40 South = 2,
41 West = 3,
42 NorthEast = 4,
43 SouthEast = 5,
44 SouthWest = 6,
45 NorthWest = 7
46}
47
48Skill = {
49 Fist = 0,
50 Club = 1,
51 Sword = 2,
52 Axe = 3,
53 Distance = 4,
54 Shielding = 5,
55 Fishing = 6,
56 CriticalChance = 7,
57 CriticalDamage = 8,
58 LifeLeechChance = 9,
59 LifeLeechAmount = 10,
60 ManaLeechChance = 11,
61 ManaLeechAmount = 12
62}
63
64North = Directions.North
65East = Directions.East
66South = Directions.South
67West = Directions.West
68NorthEast = Directions.NorthEast
69SouthEast = Directions.SouthEast
70SouthWest = Directions.SouthWest
71NorthWest = Directions.NorthWest
72
73FightOffensive = 1
74FightBalanced = 2
75FightDefensive = 3
76
77DontChase = 0
78ChaseOpponent = 1
79
80PVPWhiteDove = 0
81PVPWhiteHand = 1
82PVPYellowHand = 2
83PVPRedFist = 3
84
85GameProtocolChecksum = 1
86GameAccountNames = 2
87GameChallengeOnLogin = 3
88GamePenalityOnDeath = 4
89GameNameOnNpcTrade = 5
90GameDoubleFreeCapacity = 6
91GameDoubleExperience = 7
92GameTotalCapacity = 8
93GameSkillsBase = 9
94GamePlayerRegenerationTime = 10
95GameChannelPlayerList = 11
96GamePlayerMounts = 12
97GameEnvironmentEffect = 13
98GameCreatureEmblems = 14
99GameItemAnimationPhase = 15
100GameMagicEffectU16 = 16
101GamePlayerMarket = 17
102GameSpritesU32 = 18
103GameTileAddThingWithStackpos = 19
104GameOfflineTrainingTime = 20
105GamePurseSlot = 21
106GameFormatCreatureName = 22
107GameSpellList = 23
108GameClientPing = 24
109GameExtendedClientPing = 25
110GameDoubleHealth = 28
111GameDoubleSkills = 29
112GameChangeMapAwareRange = 30
113GameMapMovePosition = 31
114GameAttackSeq = 32
115GameBlueNpcNameColor = 33
116GameDiagonalAnimatedText = 34
117GameLoginPending = 35
118GameNewSpeedLaw = 36
119GameForceFirstAutoWalkStep = 37
120GameMinimapRemove = 38
121GameDoubleShopSellAmount = 39
122GameContainerPagination = 40
123GameThingMarks = 41
124GameLooktypeU16 = 42
125GamePlayerStamina = 43
126GamePlayerAddons = 44
127GameMessageStatements = 45
128GameMessageLevel = 46
129GameNewFluids = 47
130GamePlayerStateU16 = 48
131GameNewOutfitProtocol = 49
132GamePVPMode = 50
133GameWritableDate = 51
134GameAdditionalVipInfo = 52
135GameBaseSkillU16 = 53
136GameCreatureIcons = 54
137GameHideNpcNames = 55
138GameSpritesAlphaChannel = 56
139GamePremiumExpiration = 57
140GameBrowseField = 58
141GameEnhancedAnimations = 59
142GameOGLInformation = 60
143GameMessageSizeCheck = 61
144GamePreviewState = 62
145GameLoginPacketEncryption = 63
146GameClientVersion = 64
147GameContentRevision = 65
148GameExperienceBonus = 66
149GameAuthenticator = 67
150GameUnjustifiedPoints = 68
151GameSessionKey = 69
152GameDeathType = 70
153GameIdleAnimations = 71
154GameKeepUnawareTiles = 72
155GameIngameStore = 73
156GameIngameStoreHighlights = 74
157GameIngameStoreServiceType = 75
158GameAdditionalSkills = 76
159GameDistanceEffectU16 = 77
160GamePrey = 78
161GameDoubleMagicLevel = 79
162
163GameExtendedOpcode = 80
164GameMinimapLimitedToSingleFloor = 81
165GameSendWorldName = 82
166
167GameDoubleLevel = 83
168GameDoubleSoul = 84
169GameDoublePlayerGoodsMoney = 85
170GameCreatureWalkthrough = 86 -- add Walkthrough for versions less than 854, unpass = msg->getU8(); in protocolgameparse.cpp
171GameDoubleTradeMoney = 87
172GameSequencedPackets = 88
173GameTibia12Protocol = 89
174
175GameNewWalking = 90
176GameSlowerManualWalking = 91
177GameItemTooltip = 93
178
179GameBot = 95
180GameBiggerMapCache = 96
181GameForceLight = 97
182GameNoDebug = 98
183GameBotProtection = 99
184
185GameCreatureDirectionPassable = 100
186GameFasterAnimations = 101
187GameCenteredOutfits = 102
188GameSendIdentifiers = 103
189GameWingsAndAura = 104
190GamePlayerStateU32 = 105
191GameOutfitShaders = 106
192GameForceAllowItemHotkeys = 107
193GameCountU16 = 108
194GameDrawAuraOnTop = 109
195
196GamePacketSizeU32 = 110
197GamePacketCompression = 111
198
199GameItemShader = 112
200GameCreatureAttachedEffect = 113
201GameCreatureShader = 114
202GameEffectsShader = 115
203GameWingOffset = 116
204GameAuraFrontAndBack = 115 -- To use that: First layer is bottom/back, second (blend layer) is top/front
205GameDontCacheFiles = 118 -- doesn't work with encryption and compression
206GameBigAurasCenter = 119 -- Automatic negative offset for aura bigger than 32x32
207GameNewUpdateWalk = 120 -- Walk update rate dependant on FPS
208GameNewCreatureStacking = 121 -- Ignore MAX_THINGS limit while adding to tile
209GameCreaturesMana = 122 -- get mana from server for creatures other than Player
210GameDontMergeAnimatedText = 123
211
212GameMissionId = 125
213GameItemCustomAttributes = 126
214GameAnimatedTextCustomFont = 127
215GameOutfitAttackData = 128
216
217LastGameFeature = 130
218
219TextColors = {
220 red = '#f55e5e', --'#c83200'
221 orange = '#f36500', --'#c87832'
222 yellow = '#ffff00', --'#e6c832'
223 green = '#00EB00', --'#3fbe32'
224 lightblue = '#5ff7f7',
225 blue = '#9f9dfd',
226 --blue1 = '#6e50dc',
227 --blue2 = '#3264c8',
228 --blue3 = '#0096c8',
229 white = '#ffffff', --'#bebebe'
230}
231
232MessageModes = {
233 None = 0,
234 Say = 1,
235 Whisper = 2,
236 Yell = 3,
237 PrivateFrom = 4,
238 PrivateTo = 5,
239 ChannelManagement = 6,
240 Channel = 7,
241 ChannelHighlight = 8,
242 Spell = 9,
243 NpcFrom = 10,
244 NpcTo = 11,
245 GamemasterBroadcast = 12,
246 GamemasterChannel = 13,
247 GamemasterPrivateFrom = 14,
248 GamemasterPrivateTo = 15,
249 Login = 16,
250 Warning = 17,
251 Game = 18,
252 Failure = 19,
253 Look = 20,
254 DamageDealed = 21,
255 DamageReceived = 22,
256 Heal = 23,
257 Exp = 24,
258 DamageOthers = 25,
259 HealOthers = 26,
260 ExpOthers = 27,
261 Status = 28,
262 Loot = 29,
263 TradeNpc = 30,
264 Guild = 31,
265 PartyManagement = 32,
266 Party = 33,
267 BarkLow = 34,
268 BarkLoud = 35,
269 Report = 36,
270 HotkeyUse = 37,
271 TutorialHint = 38,
272 Thankyou = 39,
273 Market = 40,
274 Mana = 41,
275 BeyondLast = 42,
276 MonsterYell = 43,
277 MonsterSay = 44,
278 Red = 45,
279 Blue = 46,
280 RVRChannel = 47,
281 RVRAnswer = 48,
282 RVRContinue = 49,
283 GameHighlight = 50,
284 NpcFromStartBlock = 51,
285 Last = 52,
286 Invalid = 255,
287}
288
289OTSERV_RSA = "1091201329673994292788609605089955415282375029027981291234687579" ..
290 "3726629149257644633073969600111060390723088861007265581882535850" ..
291 "3429057592827629436413108566029093628212635953836686562675849720" ..
292 "6207862794310902180176810615217550567108238764764442605581471797" ..
293 "07119674283982419152118103759076030616683978566631413"
294
295CIPSOFT_RSA = "1321277432058722840622950990822933849527763264961655079678763618" ..
296 "4334395343554449668205332383339435179772895415509701210392836078" ..
297 "6959821132214473291575712138800495033169914814069637740318278150" ..
298 "2907336840325241747827401343576296990629870233111328210165697754" ..
299 "88792221429527047321331896351555606801473202394175817"
300
301-- set to the latest Tibia.pic signature to make otclient compatible with official tibia
302PIC_SIGNATURE = 0x56C5DDE7
303
304OsTypes = {
305 Linux = 1,
306 Windows = 2,
307 Flash = 3,
308 OtclientLinux = 10,
309 OtclientWindows = 11,
310 OtclientMac = 12,
311}
312
313PathFindResults = {
314 Ok = 0,
315 Position = 1,
316 Impossible = 2,
317 TooFar = 3,
318 NoWay = 4,
319}
320
321PathFindFlags = {
322 AllowNullTiles = 1,
323 AllowCreatures = 2,
324 AllowNonPathable = 4,
325 AllowNonWalkable = 8,
326}
327
328VipState = {
329 Offline = 0,
330 Online = 1,
331 Pending = 2,
332}
333
334ExtendedIds = {
335 Activate = 0,
336 Locale = 1,
337 Ping = 2,
338 Sound = 3,
339 Game = 4,
340 Particles = 5,
341 MapShader = 6,
342 NeedsUpdate = 7,
343 Telegraph = 8
344}
345
346PreviewState = {
347 Default = 0,
348 Inactive = 1,
349 Active = 2
350}
351
352Blessings = {
353 None = 0,
354 Adventurer = 1,
355 SpiritualShielding = 2,
356 EmbraceOfTibia = 4,
357 FireOfSuns = 8,
358 WisdomOfSolitude = 16,
359 SparkOfPhoenix = 32
360}
361
362DeathType = {
363 Regular = 0,
364 Blessed = 1
365}
366
367ProductType = {
368 Other = 0,
369 NameChange = 1
370}
371
372StoreErrorType = {
373 NoError = -1,
374 PurchaseError = 0,
375 NetworkError = 1,
376 HistoryError = 2,
377 TransferError = 3,
378 Information = 4
379}
380
381StoreState = {
382 None = 0,
383 New = 1,
384 Sale = 2,
385 Timed = 3
386}
387
388AccountStatus = {
389 Ok = 0,
390 Frozen = 1,
391 Suspended = 2,
392}
393
394SubscriptionStatus = {
395 Free = 0,
396 Premium = 1,
397}
398
399ChannelEvent = {
400 Join = 0,
401 Leave = 1,
402 Invite = 2,
403 Exclude = 3,
404}
405
406-- Helper for item id validation (add at the end of the file)
407function g_things:isValidItemId(itemId)
408 -- This assumes g_things:getItemType(itemId) returns nil for invalid ids
409 return self:getItemType(itemId) ~= nil
410end
411
412-- @}
413