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 14KB

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