No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

const.h 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. /*
  2. * Copyright (c) 2010-2015 OTClient <https://github.com/edubart/otclient>
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. * THE SOFTWARE.
  21. */
  22. #ifndef CLIENT_CONST_H
  23. #define CLIENT_CONST_H
  24. namespace Otc
  25. {
  26. enum {
  27. TILE_PIXELS = 32,
  28. MAX_ELEVATION = 24,
  29. SEA_FLOOR = 7,
  30. MAX_Z = 15,
  31. UNDERGROUND_FLOOR = SEA_FLOOR+1,
  32. AWARE_UNDEGROUND_FLOOR_RANGE = 2,
  33. INVISIBLE_TICKS_PER_FRAME = 500,
  34. ITEM_TICKS_PER_FRAME = 500,
  35. ANIMATED_TEXT_DURATION = 1000,
  36. STATIC_DURATION_PER_CHARACTER = 60,
  37. MIN_STATIC_TEXT_DURATION = 3000,
  38. MAX_STATIC_TEXT_WIDTH = 200,
  39. MAX_AUTOWALK_STEPS_RETRY = 10,
  40. MAX_AUTOWALK_DIST = 127
  41. };
  42. enum DrawFlags {
  43. DrawGround = 1,
  44. DrawGroundBorders = 2,
  45. DrawOnBottom = 4,
  46. DrawOnTop = 8,
  47. DrawItems = 16,
  48. DrawCreatures = 32,
  49. DrawEffects = 64,
  50. DrawMissiles = 128,
  51. DrawCreaturesInformation = 256,
  52. DrawStaticTexts = 512,
  53. DrawAnimatedTexts = 1024,
  54. DrawAnimations = 2048,
  55. DrawBars = 4096,
  56. DrawNames = 8192,
  57. DrawLights = 16384,
  58. DrawWalls = DrawOnBottom | DrawOnTop,
  59. DrawEverything = DrawGround | DrawGroundBorders | DrawWalls | DrawItems |
  60. DrawCreatures | DrawEffects | DrawMissiles | DrawCreaturesInformation |
  61. DrawStaticTexts | DrawAnimatedTexts | DrawAnimations | DrawBars | DrawNames |
  62. DrawLights
  63. };
  64. enum DatOpts {
  65. DatGround = 0,
  66. DatGroundClip,
  67. DatOnBottom,
  68. DatOnTop,
  69. DatContainer,
  70. DatStackable,
  71. DatForceUse,
  72. DatMultiUse,
  73. DatWritable,
  74. DatWritableOnce,
  75. DatFluidContainer,
  76. DatSplash,
  77. DatBlockWalk,
  78. DatNotMoveable,
  79. DatBlockProjectile,
  80. DatBlockPathFind,
  81. DatPickupable,
  82. DatHangable,
  83. DatHookSouth,
  84. DatHookEast,
  85. DatRotable,
  86. DatLight,
  87. DatDontHide,
  88. DatTranslucent,
  89. DatDisplacement,
  90. DatElevation,
  91. DatLyingCorpse,
  92. DatAnimateAlways,
  93. DatMinimapColor,
  94. DatLensHelp,
  95. DatFullGround,
  96. DatIgnoreLook,
  97. DatCloth,
  98. DatAnimation, // lastest tibia
  99. DatLastOpt = 255
  100. };
  101. enum InventorySlot {
  102. InventorySlotHead = 1,
  103. InventorySlotNecklace,
  104. InventorySlotBackpack,
  105. InventorySlotArmor,
  106. InventorySlotRight,
  107. InventorySlotLeft,
  108. InventorySlotLegs,
  109. InventorySlotFeet,
  110. InventorySlotRing,
  111. InventorySlotAmmo,
  112. InventorySlotPurse,
  113. InventorySlotExt1,
  114. InventorySlotExt2,
  115. InventorySlotExt3,
  116. InventorySlotExt4,
  117. LastInventorySlot
  118. };
  119. enum Statistic {
  120. Health = 0,
  121. MaxHealth,
  122. FreeCapacity,
  123. Experience,
  124. Level,
  125. LevelPercent,
  126. Mana,
  127. MaxMana,
  128. MagicLevel,
  129. MagicLevelPercent,
  130. Soul,
  131. Stamina,
  132. LastStatistic
  133. };
  134. enum Skill {
  135. Fist = 0,
  136. Club,
  137. Sword,
  138. Axe,
  139. Distance,
  140. Shielding,
  141. Fishing,
  142. LastSkill
  143. };
  144. enum Direction {
  145. North = 0,
  146. East,
  147. South,
  148. West,
  149. NorthEast,
  150. SouthEast,
  151. SouthWest,
  152. NorthWest,
  153. InvalidDirection
  154. };
  155. enum FluidsColor {
  156. FluidTransparent = 0,
  157. FluidBlue,
  158. FluidRed,
  159. FluidBrown,
  160. FluidGreen,
  161. FluidYellow,
  162. FluidWhite,
  163. FluidPurple
  164. };
  165. enum FluidsType {
  166. FluidNone = 0,
  167. FluidWater,
  168. FluidMana,
  169. FluidBeer,
  170. FluidOil,
  171. FluidBlood,
  172. FluidSlime,
  173. FluidMud,
  174. FluidLemonade,
  175. FluidMilk,
  176. FluidWine,
  177. FluidHealth,
  178. FluidUrine,
  179. FluidRum,
  180. FluidFruidJuice,
  181. FluidCoconutMilk,
  182. FluidTea,
  183. FluidMead
  184. };
  185. enum FightModes {
  186. FightOffensive = 1,
  187. FightBalanced = 2,
  188. FightDefensive = 3
  189. };
  190. enum ChaseModes {
  191. DontChase = 0,
  192. ChaseOpponent = 1
  193. };
  194. enum PVPModes {
  195. WhiteDove = 0,
  196. WhiteHand = 1,
  197. YellowHand = 2,
  198. RedFist = 3
  199. };
  200. enum PlayerSkulls {
  201. SkullNone = 0,
  202. SkullYellow,
  203. SkullGreen,
  204. SkullWhite,
  205. SkullRed,
  206. SkullBlack,
  207. SkullOrange
  208. };
  209. enum PlayerShields {
  210. ShieldNone = 0,
  211. ShieldWhiteYellow, // 1 party leader
  212. ShieldWhiteBlue, // 2 party member
  213. ShieldBlue, // 3 party member sexp off
  214. ShieldYellow, // 4 party leader sexp off
  215. ShieldBlueSharedExp, // 5 party member sexp on
  216. ShieldYellowSharedExp, // 6 // party leader sexp on
  217. ShieldBlueNoSharedExpBlink, // 7 party member sexp inactive guilty
  218. ShieldYellowNoSharedExpBlink, // 8 // party leader sexp inactive guilty
  219. ShieldBlueNoSharedExp, // 9 party member sexp inactive innocent
  220. ShieldYellowNoSharedExp, // 10 party leader sexp inactive innocent
  221. ShieldGray // 11 member of another party
  222. };
  223. enum PlayerEmblems {
  224. EmblemNone = 0,
  225. EmblemGreen,
  226. EmblemRed,
  227. EmblemBlue,
  228. EmblemMember,
  229. EmblemOther
  230. };
  231. enum CreatureIcons {
  232. NpcIconNone = 0,
  233. NpcIconChat,
  234. NpcIconTrade,
  235. NpcIconQuest,
  236. NpcIconTradeQuest
  237. };
  238. enum PlayerStates {
  239. IconNone = 0,
  240. IconPoison = 1,
  241. IconBurn = 2,
  242. IconEnergy = 4,
  243. IconDrunk = 8,
  244. IconManaShield = 16,
  245. IconParalyze = 32,
  246. IconHaste = 64,
  247. IconSwords = 128,
  248. IconDrowning = 256,
  249. IconFreezing = 512,
  250. IconDazzled = 1024,
  251. IconCursed = 2048,
  252. IconPartyBuff = 4096,
  253. IconPzBlock = 8192,
  254. IconPz = 16384,
  255. IconBleeding = 32768,
  256. IconHungry = 65536
  257. };
  258. enum MessageMode {
  259. MessageNone = 0,
  260. MessageSay = 1,
  261. MessageWhisper = 2,
  262. MessageYell = 3,
  263. MessagePrivateFrom = 4,
  264. MessagePrivateTo = 5,
  265. MessageChannelManagement = 6,
  266. MessageChannel = 7,
  267. MessageChannelHighlight = 8,
  268. MessageSpell = 9,
  269. MessageNpcFrom = 10,
  270. MessageNpcTo = 11,
  271. MessageGamemasterBroadcast = 12,
  272. MessageGamemasterChannel = 13,
  273. MessageGamemasterPrivateFrom = 14,
  274. MessageGamemasterPrivateTo = 15,
  275. MessageLogin = 16,
  276. MessageWarning = 17,
  277. MessageGame = 18,
  278. MessageFailure = 19,
  279. MessageLook = 20,
  280. MessageDamageDealed = 21,
  281. MessageDamageReceived = 22,
  282. MessageHeal = 23,
  283. MessageExp = 24,
  284. MessageDamageOthers = 25,
  285. MessageHealOthers = 26,
  286. MessageExpOthers = 27,
  287. MessageStatus = 28,
  288. MessageLoot = 29,
  289. MessageTradeNpc = 30,
  290. MessageGuild = 31,
  291. MessagePartyManagement = 32,
  292. MessageParty = 33,
  293. MessageBarkLow = 34,
  294. MessageBarkLoud = 35,
  295. MessageReport = 36,
  296. MessageHotkeyUse = 37,
  297. MessageTutorialHint = 38,
  298. MessageThankyou = 39,
  299. MessageMarket = 40,
  300. MessageBeyondLast = 41,
  301. // deprecated
  302. MessageMonsterYell = 42,
  303. MessageMonsterSay = 43,
  304. MessageRed = 44,
  305. MessageBlue = 45,
  306. MessageRVRChannel = 46,
  307. MessageRVRAnswer = 47,
  308. MessageRVRContinue = 48,
  309. MessageGameHighlight = 49,
  310. MessageNpcFromStartBlock = 50,
  311. LastMessage = 51,
  312. MessageInvalid = 255
  313. };
  314. enum GameFeature {
  315. GameProtocolChecksum = 1,
  316. GameAccountNames = 2,
  317. GameChallengeOnLogin = 3,
  318. GamePenalityOnDeath = 4,
  319. GameNameOnNpcTrade = 5,
  320. GameDoubleFreeCapacity = 6,
  321. GameDoubleExperience = 7,
  322. GameTotalCapacity = 8,
  323. GameSkillsBase = 9,
  324. GamePlayerRegenerationTime = 10,
  325. GameChannelPlayerList = 11,
  326. GamePlayerMounts = 12,
  327. GameEnvironmentEffect = 13,
  328. GameCreatureEmblems = 14,
  329. GameItemAnimationPhase = 15,
  330. GameMagicEffectU16 = 16,
  331. GamePlayerMarket = 17,
  332. GameSpritesU32 = 18,
  333. // 19 unused
  334. GameOfflineTrainingTime = 20,
  335. GamePurseSlot = 21,
  336. GameFormatCreatureName = 22,
  337. GameSpellList = 23,
  338. GameClientPing = 24,
  339. GameExtendedClientPing = 25,
  340. GameDoubleHealth = 28,
  341. GameDoubleSkills = 29,
  342. GameChangeMapAwareRange = 30,
  343. GameMapMovePosition = 31,
  344. GameAttackSeq = 32,
  345. GameBlueNpcNameColor = 33,
  346. GameDiagonalAnimatedText = 34,
  347. GameLoginPending = 35,
  348. GameNewSpeedLaw = 36,
  349. GameForceFirstAutoWalkStep = 37,
  350. GameMinimapRemove = 38,
  351. GameDoubleShopSellAmount = 39,
  352. GameContainerPagination = 40,
  353. GameThingMarks = 41,
  354. GameLooktypeU16 = 42,
  355. GamePlayerStamina = 43,
  356. GamePlayerAddons = 44,
  357. GameMessageStatements = 45,
  358. GameMessageLevel = 46,
  359. GameNewFluids = 47,
  360. GamePlayerStateU16 = 48,
  361. GameNewOutfitProtocol = 49,
  362. GamePVPMode = 50,
  363. GameWritableDate = 51,
  364. GameAdditionalVipInfo = 52,
  365. GameBaseSkillU16 = 53,
  366. GameCreatureIcons = 54,
  367. GameHideNpcNames = 55,
  368. GameSpritesAlphaChannel = 56,
  369. GamePremiumExpiration = 57,
  370. GameBrowseField = 58,
  371. GameEnhancedAnimations = 59,
  372. GameOGLInformation = 60,
  373. GameMessageSizeCheck = 61,
  374. GamePreviewState = 62,
  375. GameLoginPacketEncryption = 63,
  376. GameClientVersion = 64,
  377. GameContentRevision = 65,
  378. GameExperienceBonus = 66,
  379. GameAuthenticator = 67,
  380. GameUnjustifiedPoints = 68,
  381. GameSessionKey = 69,
  382. GameDeathType = 70,
  383. LastGameFeature = 101
  384. };
  385. enum PathFindResult {
  386. PathFindResultOk = 0,
  387. PathFindResultSamePosition,
  388. PathFindResultImpossible,
  389. PathFindResultTooFar,
  390. PathFindResultNoWay
  391. };
  392. enum PathFindFlags {
  393. PathFindAllowNotSeenTiles = 1,
  394. PathFindAllowCreatures = 2,
  395. PathFindAllowNonPathable = 4,
  396. PathFindAllowNonWalkable = 8
  397. };
  398. enum AutomapFlags {
  399. MapMarkTick = 0,
  400. MapMarkQuestion,
  401. MapMarkExclamation,
  402. MapMarkStar,
  403. MapMarkCross,
  404. MapMarkTemple,
  405. MapMarkKiss,
  406. MapMarkShovel,
  407. MapMarkSword,
  408. MapMarkFlag,
  409. MapMarkLock,
  410. MapMarkBag,
  411. MapMarkSkull,
  412. MapMarkDollar,
  413. MapMarkRedNorth,
  414. MapMarkRedSouth,
  415. MapMarkRedEast,
  416. MapMarkRedWest,
  417. MapMarkGreenNorth,
  418. MapMarkGreenSouth
  419. };
  420. enum VipState {
  421. VipStateOffline = 0,
  422. VipStateOnline = 1,
  423. VipStatePending = 2
  424. };
  425. enum SpeedFormula {
  426. SpeedFormulaA = 0,
  427. SpeedFormulaB,
  428. SpeedFormulaC,
  429. LastSpeedFormula
  430. };
  431. enum Blessings {
  432. BlessingNone = 0,
  433. BlessingAdventurer = 1,
  434. BlessingSpiritualShielding = 1 << 1,
  435. BlessingEmbraceOfTibia = 1 << 2,
  436. BlessingFireOfSuns = 1 << 3,
  437. BlessingWisdomOfSolitude = 1 << 4,
  438. BlessingSparkOfPhoenix = 1 << 5
  439. };
  440. enum DeathType {
  441. DeathRegular = 0,
  442. DeathBlessed = 1
  443. };
  444. }
  445. #endif